aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author‭huajijam <strhuaji@gmail.com>2019-04-24 17:26:22 +0800
committer‭huajijam <strhuaji@gmail.com>2019-04-24 17:26:22 +0800
commitde9f7710d6f32af0d941085e1029a106b5bc22ff (patch)
tree71918df2e7294d96a2c3dd81dd02cc4b872fe111
parentf004369537bf82a3318f2d315af530944433dac5 (diff)
parentea049ad62ba64a414fccfa5cbb875d72e7e94d00 (diff)
downloadGT5-Unofficial-de9f7710d6f32af0d941085e1029a106b5bc22ff.tar.gz
GT5-Unofficial-de9f7710d6f32af0d941085e1029a106b5bc22ff.tar.bz2
GT5-Unofficial-de9f7710d6f32af0d941085e1029a106b5bc22ff.zip
Automatic synchronization
-rw-r--r--README.md5
-rw-r--r--src/Java/gtPlusPlus/api/objects/minecraft/FakeWorld.java5
-rw-r--r--src/Java/gtPlusPlus/core/common/CommonProxy.java8
-rw-r--r--src/Java/gtPlusPlus/core/entity/InternalEntityRegistry.java3
-rw-r--r--src/Java/gtPlusPlus/core/entity/projectile/EntityLightningAttack.java76
-rw-r--r--src/Java/gtPlusPlus/core/entity/projectile/EntityThrowableBomb.java46
-rw-r--r--src/Java/gtPlusPlus/core/handler/AchievementHandler.java3
-rw-r--r--src/Java/gtPlusPlus/core/handler/BookHandler.java2
-rw-r--r--src/Java/gtPlusPlus/core/item/ModItems.java7
-rw-r--r--src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java4
-rw-r--r--src/Java/gtPlusPlus/core/item/base/ore/BaseOreComponent.java4
-rw-r--r--src/Java/gtPlusPlus/core/item/chemistry/GenericChem.java2
-rw-r--r--src/Java/gtPlusPlus/core/item/general/throwables/ItemThrowableBomb.java3
-rw-r--r--src/Java/gtPlusPlus/core/material/ELEMENT.java1
-rw-r--r--src/Java/gtPlusPlus/core/material/Material.java40
-rw-r--r--src/Java/gtPlusPlus/core/proxy/ClientProxy.java5
-rw-r--r--src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java25
-rw-r--r--src/Java/gtPlusPlus/everglades/GTplusplus_Everglades.java19
-rw-r--r--src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_IC2_Hazmat.java22
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler_Adv.java2
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaPipeEntityFluid.java9
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java9
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/StaticFields59.java6
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/helpers/TreeFarmHelper.java2
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/helpers/treefarm/TreeGenerator.java295
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Choocher.java48
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Electric_Lighter.java132
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/bedrock/GregtechMetaTileEntity_BedrockMiningPlatformBase.java482
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricButcherKnife.java65
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricLighter.java40
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Ore.java6
-rw-r--r--src/Java/gtPlusPlus/xmod/thaumcraft/HANDLER_Thaumcraft.java6
32 files changed, 1159 insertions, 223 deletions
diff --git a/README.md b/README.md
index 5b25d656db..55c672cf55 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,10 @@
## Current Build Status
### CircleCI - [![CircleCI](https://circleci.com/gh/alkcorp/GTplusplus/tree/master.svg?style=svg)](https://circleci.com/gh/alkcorp/GTplusplus/tree/master)
-Click the CI button for the latest BETA builds! Please sign in with Github to find the artefacts (builds) located within each job.
+Click the Green Passed/Red Failed button for the latest BETA builds!
+Make sure you are signed in via Github/BitBucket.
+If you have not done so, login here first. [Sign into CircleCI here!](https://circleci.com/vcs-authorize/)
+Downloads can be found on the artefacts tab (builds) located within each job.
### Discord
[Join the GT++ Channel - Click here](https://discord.gg/YdXJbgb)
diff --git a/src/Java/gtPlusPlus/api/objects/minecraft/FakeWorld.java b/src/Java/gtPlusPlus/api/objects/minecraft/FakeWorld.java
new file mode 100644
index 0000000000..38cde74317
--- /dev/null
+++ b/src/Java/gtPlusPlus/api/objects/minecraft/FakeWorld.java
@@ -0,0 +1,5 @@
+package gtPlusPlus.api.objects.minecraft;
+
+public class FakeWorld {
+
+}
diff --git a/src/Java/gtPlusPlus/core/common/CommonProxy.java b/src/Java/gtPlusPlus/core/common/CommonProxy.java
index 301ca992a4..cacc471249 100644
--- a/src/Java/gtPlusPlus/core/common/CommonProxy.java
+++ b/src/Java/gtPlusPlus/core/common/CommonProxy.java
@@ -9,6 +9,7 @@ import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.event.FMLServerStartingEvent;
import cpw.mods.fml.common.registry.GameRegistry;
import gregtech.api.enums.ItemList;
+import gregtech.api.enums.OrePrefixes;
import gtPlusPlus.GTplusplus;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.api.objects.minecraft.ChunkManager;
@@ -30,6 +31,7 @@ import gtPlusPlus.core.handler.events.GeneralTooltipEventHandler;
import gtPlusPlus.core.handler.events.PickaxeBlockBreakEventHandler;
import gtPlusPlus.core.handler.events.ZombieBackupSpawnEventHandler;
import gtPlusPlus.core.item.ModItems;
+import gtPlusPlus.core.item.chemistry.GenericChem;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.lib.CORE.ConfigSwitches;
import gtPlusPlus.core.lib.LoadedMods;
@@ -42,6 +44,7 @@ import gtPlusPlus.core.util.player.PlayerCache;
import gtPlusPlus.plugin.villagers.block.BlockGenericSpawner;
import gtPlusPlus.xmod.eio.handler.HandlerTooltip_EIO;
import gtPlusPlus.xmod.galacticraft.handler.HandlerTooltip_GC;
+import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
import net.minecraft.entity.Entity;
import net.minecraftforge.common.ForgeChunkManager;
@@ -107,6 +110,7 @@ public class CommonProxy {
DEBUG_INIT.registerHandlers();
}
+ registerCustomItemsForMaterials();
ModBlocks.blockCustomMobSpawner = new BlockGenericSpawner();
if (!mFluidsGenerated && ItemList.valueOf("Cell_Empty").hasBeenSet()) {
@@ -216,5 +220,9 @@ public class CommonProxy {
Utils.createNewMobSpawner(1, EntitySickBlaze.class);
Utils.createNewMobSpawner(2, EntityStaballoyConstruct.class);
}
+
+ public void registerCustomItemsForMaterials() {
+ Material.registerComponentForMaterial(GenericChem.CARBYNE, OrePrefixes.plate, GregtechItemList.Carbyne_Sheet_Finished.get(1));
+ }
}
diff --git a/src/Java/gtPlusPlus/core/entity/InternalEntityRegistry.java b/src/Java/gtPlusPlus/core/entity/InternalEntityRegistry.java
index e5c779adcf..aec82119cc 100644
--- a/src/Java/gtPlusPlus/core/entity/InternalEntityRegistry.java
+++ b/src/Java/gtPlusPlus/core/entity/InternalEntityRegistry.java
@@ -13,6 +13,7 @@ import gtPlusPlus.core.entity.monster.EntityGiantChickenBase;
import gtPlusPlus.core.entity.monster.EntitySickBlaze;
import gtPlusPlus.core.entity.monster.EntityStaballoyConstruct;
import gtPlusPlus.core.entity.projectile.EntityHydrofluoricAcidPotion;
+import gtPlusPlus.core.entity.projectile.EntityLightningAttack;
import gtPlusPlus.core.entity.projectile.EntitySulfuricAcidPotion;
import gtPlusPlus.core.entity.projectile.EntityThrowableBomb;
import gtPlusPlus.core.entity.projectile.EntityToxinballSmall;
@@ -54,6 +55,8 @@ public class InternalEntityRegistry {
EntityRegistry.registerModEntity(EntityThrowableBomb.class, "EntityThrowableBomb", mEntityID++, GTplusplus.instance, 64, 10, true);
+ EntityRegistry.registerModEntity(EntityLightningAttack.class, "EntityLightningAttack", mEntityID++, GTplusplus.instance, 64, 20, true);
+
/**
* Globals, which generate spawn eggs. (Currently required for Giant chicken spawning)
*/
diff --git a/src/Java/gtPlusPlus/core/entity/projectile/EntityLightningAttack.java b/src/Java/gtPlusPlus/core/entity/projectile/EntityLightningAttack.java
new file mode 100644
index 0000000000..868517d1db
--- /dev/null
+++ b/src/Java/gtPlusPlus/core/entity/projectile/EntityLightningAttack.java
@@ -0,0 +1,76 @@
+package gtPlusPlus.core.entity.projectile;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import net.minecraft.entity.EntityLivingBase;
+import net.minecraft.entity.projectile.EntityWitherSkull;
+import net.minecraft.potion.Potion;
+import net.minecraft.potion.PotionEffect;
+import net.minecraft.util.DamageSource;
+import net.minecraft.util.MovingObjectPosition;
+import net.minecraft.world.EnumDifficulty;
+import net.minecraft.world.World;
+
+public class EntityLightningAttack extends EntityWitherSkull {
+
+ public EntityLightningAttack(World p_i1793_1_)
+ {
+ super(p_i1793_1_);
+ this.setSize(0.3125F, 0.3125F);
+ }
+
+ public EntityLightningAttack(World p_i1794_1_, EntityLivingBase p_i1794_2_, double p_i1794_3_, double p_i1794_5_, double p_i1794_7_)
+ {
+ super(p_i1794_1_, p_i1794_2_, p_i1794_3_, p_i1794_5_, p_i1794_7_);
+ this.setSize(0.3125F, 0.3125F);
+ }
+
+ @SideOnly(Side.CLIENT)
+ public EntityLightningAttack(World p_i1795_1_, double p_i1795_2_, double p_i1795_4_, double p_i1795_6_, double p_i1795_8_, double p_i1795_10_, double p_i1795_12_)
+ {
+ super(p_i1795_1_, p_i1795_2_, p_i1795_4_, p_i1795_6_, p_i1795_8_, p_i1795_10_, p_i1795_12_);
+ this.setSize(0.3125F, 0.3125F);
+ }
+
+
+ /**
+ * Called when this EntityFireball hits a block or entity.
+ */
+ protected void onImpact(MovingObjectPosition p_70227_1_) {
+
+ if (!this.worldObj.isRemote) {
+ if (p_70227_1_.entityHit != null) {
+ if (this.shootingEntity != null) {
+ if (p_70227_1_.entityHit.attackEntityFrom(DamageSource.causeMobDamage(this.shootingEntity), 8.0F)
+ && !p_70227_1_.entityHit.isEntityAlive()) {
+ this.shootingEntity.heal(0.5F);
+ }
+ } else {
+ p_70227_1_.entityHit.attackEntityFrom(DamageSource.lava, 10.0F);
+ }
+
+ if (p_70227_1_.entityHit instanceof EntityLivingBase) {
+ byte b0 = 0;
+
+ if (this.worldObj.difficultySetting == EnumDifficulty.NORMAL) {
+ b0 = 10;
+ } else if (this.worldObj.difficultySetting == EnumDifficulty.HARD) {
+ b0 = 40;
+ }
+
+ if (b0 > 0) {
+ ((EntityLivingBase) p_70227_1_.entityHit).addPotionEffect(new PotionEffect(Potion.poison.id, 20 * b0, 1));
+ ((EntityLivingBase) p_70227_1_.entityHit).addPotionEffect(new PotionEffect(Potion.confusion.id, 20 * b0, 1));
+ ((EntityLivingBase) p_70227_1_.entityHit).addPotionEffect(new PotionEffect(Potion.weakness.id, 20 * b0, 1));
+ }
+ }
+ }
+
+ this.worldObj.newExplosion(this, this.posX, this.posY, this.posZ, 1.0F, false,
+ this.worldObj.getGameRules().getGameRuleBooleanValue("mobGriefing"));
+ this.setDead();
+ }
+ }
+
+
+} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/core/entity/projectile/EntityThrowableBomb.java b/src/Java/gtPlusPlus/core/entity/projectile/EntityThrowableBomb.java
index 9e72daf687..49daa459e0 100644
--- a/src/Java/gtPlusPlus/core/entity/projectile/EntityThrowableBomb.java
+++ b/src/Java/gtPlusPlus/core/entity/projectile/EntityThrowableBomb.java
@@ -13,6 +13,7 @@ import gregtech.api.util.GT_Utility;
import gtPlusPlus.api.objects.minecraft.BlockPos;
import gtPlusPlus.core.util.math.MathUtils;
import gtPlusPlus.core.util.minecraft.EntityUtils;
+import gtPlusPlus.core.util.minecraft.gregtech.PollutionUtils;
public class EntityThrowableBomb extends EntityThrowable {
@@ -39,19 +40,26 @@ public class EntityThrowableBomb extends EntityThrowable {
if (object.entityHit != null) {
byte b0 = 6;
if (!GT_Utility.isWearingFullRadioHazmat((EntityLivingBase) object.entityHit)){
- object.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), b0);
- EntityUtils.setEntityOnFire(object.entityHit, 10);
+ object.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), 20);
+ EntityUtils.setEntityOnFire(object.entityHit, 20);
object.entityHit.fireResistance = 0;
ravage(EntityUtils.findBlockPosUnderEntity(object.entityHit));
}
}
- if (object.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK){
- ravage(new BlockPos(xBlock, yBlock, zBlock));
+ if (object.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK){
+
+ ravage(new BlockPos(xBlock, yBlock, zBlock));
+ for (BlockPos aSur : new BlockPos(xBlock, yBlock, zBlock).getSurroundingBlocks()) {
+ ravage(new BlockPos(aSur.xPos, aSur.yPos, aSur.zPos));
+ for (BlockPos aSur2 : new BlockPos(aSur.xPos, aSur.yPos, aSur.zPos).getSurroundingBlocks()) {
+ //ravage(new BlockPos(aSur2.xPos, aSur2.yPos, aSur2.zPos));
+ }
+ }
}
String mParticleType = "reddust";
int e=0;
- for (int i = 0; i < 24; ++i) {
+ for (int i = 0; i < 127; ++i) {
if ((e = MathUtils.randInt(0, 5)) <= 1){
if (e==0)
mParticleType = "largesmoke";
@@ -68,19 +76,41 @@ public class EntityThrowableBomb extends EntityThrowable {
private boolean ravage(BlockPos blockpos){
- int radius = 1;
+ int radius = 5;
for (int i=(blockpos.xPos-radius);i<(blockpos.xPos+radius);i++){
for (int j=(blockpos.yPos-radius);j<(blockpos.yPos+radius);j++){
for (int h=(blockpos.zPos-radius);h<(blockpos.zPos+radius);h++){
- int mChance = MathUtils.randInt(1, 10);
+ int mChance = MathUtils.randInt(0, 100);
if (mChance <= 3){
Block mBlockhit = worldObj.getBlock(i, j, h);
this.worldObj.spawnParticle("flame", this.posX+MathUtils.randDouble(-2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D);
this.worldObj.spawnParticle("largesmoke", this.posX+MathUtils.randDouble(2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D);
+ this.worldObj.spawnParticle("flame", this.posX+MathUtils.randDouble(-2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D);
+ this.worldObj.spawnParticle("largesmoke", this.posX+MathUtils.randDouble(2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D);
+ this.worldObj.spawnParticle("flame", this.posX+MathUtils.randDouble(-2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D);
+ this.worldObj.spawnParticle("largesmoke", this.posX+MathUtils.randDouble(2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D);
+ this.worldObj.spawnParticle("flame", this.posX+MathUtils.randDouble(-2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D);
+ this.worldObj.spawnParticle("largesmoke", this.posX+MathUtils.randDouble(2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D);
+ this.worldObj.spawnParticle("flame", this.posX+MathUtils.randDouble(-2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D);
+ this.worldObj.spawnParticle("largesmoke", this.posX+MathUtils.randDouble(2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D);
+ this.worldObj.spawnParticle("flame", this.posX+MathUtils.randDouble(-2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D);
+ this.worldObj.spawnParticle("largesmoke", this.posX+MathUtils.randDouble(2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D);
+ this.worldObj.spawnParticle("flame", this.posX+MathUtils.randDouble(-2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D);
+ this.worldObj.spawnParticle("largesmoke", this.posX+MathUtils.randDouble(2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D);
+ this.worldObj.spawnParticle("flame", this.posX+MathUtils.randDouble(-2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D);
+ this.worldObj.spawnParticle("largesmoke", this.posX+MathUtils.randDouble(2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D);
+ this.worldObj.spawnParticle("flame", this.posX+MathUtils.randDouble(-2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D);
+ this.worldObj.spawnParticle("largesmoke", this.posX+MathUtils.randDouble(2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D);
+ this.worldObj.spawnParticle("flame", this.posX+MathUtils.randDouble(-2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D);
+ this.worldObj.spawnParticle("largesmoke", this.posX+MathUtils.randDouble(2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D);
+ this.worldObj.spawnParticle("flame", this.posX+MathUtils.randDouble(-2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D);
+ this.worldObj.spawnParticle("largesmoke", this.posX+MathUtils.randDouble(2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D);
+ this.worldObj.spawnParticle("flame", this.posX+MathUtils.randDouble(-2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D);
+ this.worldObj.spawnParticle("largesmoke", this.posX+MathUtils.randDouble(2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D);
- //GT_Pollution.addPollution(worldObj.getChunkFromBlockCoords(blockpos.xPos, blockpos.zPos), mPol);
+ PollutionUtils.addPollution(worldObj.getChunkFromBlockCoords(blockpos.xPos, blockpos.zPos), 500);
this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 0.01f, true);
if (mBlockhit == Blocks.grass || mBlockhit == Blocks.mycelium){
worldObj.setBlock(i, j+1, h, Blocks.fire);
diff --git a/src/Java/gtPlusPlus/core/handler/AchievementHandler.java b/src/Java/gtPlusPlus/core/handler/AchievementHandler.java
index 4cd5431ebd..9053875058 100644
--- a/src/Java/gtPlusPlus/core/handler/AchievementHandler.java
+++ b/src/Java/gtPlusPlus/core/handler/AchievementHandler.java
@@ -19,6 +19,7 @@ import gtPlusPlus.core.material.ELEMENT;
import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
+import gtPlusPlus.xmod.gregtech.common.items.MetaGeneratedGregtechTools;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.stats.Achievement;
@@ -43,7 +44,7 @@ public class AchievementHandler {
GT_Log.out.println("Initializing GT++ achievements");
//register first
- this.registerAchievement(aBaseAchievementName, 0, 0, GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.HARDHAMMER, 1, Materials.Neutronium, Materials.Osmium, null), "", true);
+ this.registerAchievement(aBaseAchievementName, 0, 0, MetaGeneratedGregtechTools.INSTANCE.getToolWithStats(MetaGeneratedGregtechTools.ANGLE_GRINDER, 1, Materials.Osmium, Materials.Osmium, null), "", true);
//Useful Info
boolean cores = CORE.ConfigSwitches.requireControlCores;
diff --git a/src/Java/gtPlusPlus/core/handler/BookHandler.java b/src/Java/gtPlusPlus/core/handler/BookHandler.java
index 462cbd8cdb..860946f513 100644
--- a/src/Java/gtPlusPlus/core/handler/BookHandler.java
+++ b/src/Java/gtPlusPlus/core/handler/BookHandler.java
@@ -118,7 +118,7 @@ public class BookHandler {
//Test Novel
//20/21/22
book_MultiMachineManual = writeBookTemplate(
- "Manual_Multi_Machine", "Multi Machine Manual", "Alkalus",
+ "Manual_Multi_Machine", "Multi-Machine Manual", "Alkalus",
new String[] {
"This Multiblock, depending upon the mode used, can function as a variety of different machines. The idea behind this, was that most of these machines are rather niche compared to any others, as such, not used often.",
"To build, you need to construct a hollow 3x3x3 structure made from Multi-Use casings, With a minimum of 6. Any Casing position can be substituted out with an Input Hatch/Bus, an Output Hatch/Bus, Muffler, Maint. Hatch or Energy Injector Hatch.",
diff --git a/src/Java/gtPlusPlus/core/item/ModItems.java b/src/Java/gtPlusPlus/core/item/ModItems.java
index 68aacd6943..51d41674d3 100644
--- a/src/Java/gtPlusPlus/core/item/ModItems.java
+++ b/src/Java/gtPlusPlus/core/item/ModItems.java
@@ -653,7 +653,9 @@ public final class ModItems {
MaterialGenerator.generate(ALLOY.BABBIT_ALLOY, false);
MaterialGenerator.generate(ALLOY.BLACK_TITANIUM, false);
-
+
+ // High Level Bioplastic
+ MaterialGenerator.generate(ELEMENT.STANDALONE.RHUGNOR, false, false);
@@ -839,8 +841,7 @@ public final class ModItems {
else {
itemHotTitaniumIngot = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("ingotHotTitanium", 1);
}
- GT_Values.RA.addBlastRecipe(ELEMENT.getInstance().TITANIUM.getIngot(1), CI.getNumberedCircuit(16), itemHotTitaniumIngot, null, 10 * 20, 500, Materials.Titanium.mBlastFurnaceTemp);
-
+
//Special Sillyness
if (true) {
diff --git a/src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java b/src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java
index ceeff7e655..fe3934ed10 100644
--- a/src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java
+++ b/src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java
@@ -68,9 +68,9 @@ public class BaseItemComponent extends Item{
GT_OreDictUnificator.registerOre(componentType.getOreDictName()+material.getUnlocalizedName(), ItemUtils.getSimpleStack(this));
if (LoadedMods.Thaumcraft) {
- ThaumcraftUtils.addAspectToItem(ItemUtils.getSimpleStack(this), TC_Aspect_Wrapper.generate(TC_Aspects.METALLUM.mAspect), 1);
+ //ThaumcraftUtils.addAspectToItem(ItemUtils.getSimpleStack(this), TC_Aspect_Wrapper.generate(TC_Aspects.METALLUM.mAspect), 1);
if (componentMaterial.isRadioactive) {
- ThaumcraftUtils.addAspectToItem(ItemUtils.getSimpleStack(this), TC_Aspect_Wrapper.generate(TC_Aspects.RADIO.mAspect), componentMaterial.vRadiationLevel);
+ //ThaumcraftUtils.addAspectToItem(ItemUtils.getSimpleStack(this), TC_Aspect_Wrapper.generate(TC_Aspects.RADIO.mAspect), componentMaterial.vRadiationLevel);
}
}
registerComponent();
diff --git a/src/Java/gtPlusPlus/core/item/base/ore/BaseOreComponent.java b/src/Java/gtPlusPlus/core/item/base/ore/BaseOreComponent.java
index de47ed8225..6bb0ea8be8 100644
--- a/src/Java/gtPlusPlus/core/item/base/ore/BaseOreComponent.java
+++ b/src/Java/gtPlusPlus/core/item/base/ore/BaseOreComponent.java
@@ -58,9 +58,9 @@ public class BaseOreComponent extends Item{
registerComponent();
GT_OreDictUnificator.registerOre(componentType.getComponent()+material.getUnlocalizedName(), ItemUtils.getSimpleStack(this));
if (LoadedMods.Thaumcraft) {
- ThaumcraftUtils.addAspectToItem(ItemUtils.getSimpleStack(this), TC_Aspect_Wrapper.generate(TC_Aspects.METALLUM.mAspect), 1);
+ //ThaumcraftUtils.addAspectToItem(ItemUtils.getSimpleStack(this), TC_Aspect_Wrapper.generate(TC_Aspects.METALLUM.mAspect), 1);
if (componentMaterial.isRadioactive) {
- ThaumcraftUtils.addAspectToItem(ItemUtils.getSimpleStack(this), TC_Aspect_Wrapper.generate(TC_Aspects.RADIO.mAspect), componentMaterial.vRadiationLevel);
+ //ThaumcraftUtils.addAspectToItem(ItemUtils.getSimpleStack(this), TC_Aspect_Wrapper.generate(TC_Aspects.RADIO.mAspect), componentMaterial.vRadiationLevel);
}
}
diff --git a/src/Java/gtPlusPlus/core/item/chemistry/GenericChem.java b/src/Java/gtPlusPlus/core/item/chemistry/GenericChem.java
index ec1d51b502..c64ad07d2a 100644
--- a/src/Java/gtPlusPlus/core/item/chemistry/GenericChem.java
+++ b/src/Java/gtPlusPlus/core/item/chemistry/GenericChem.java
@@ -23,6 +23,8 @@ public class GenericChem extends ItemPackage {
public static final Material BAKELITE = new Material("Bakelite", MaterialState.SOLID, TextureSet.SET_DULL, new short[]{90, 140, 140}, 120, 240, 23, 24, true, null, 0);//Not a GT Inherited Material
public static final Material NYLON = new Material("Nylon", MaterialState.SOLID, TextureSet.SET_SHINY, new short[]{45, 45, 45}, 300, 600, 44, 48, true, null, 0);//Not a GT Inherited Material
+ public static final Material CARBYNE = new Material("Carbyne", MaterialState.SOLID, TextureSet.SET_DULL, new short[]{25, 25, 25}, 2500, 5000, 63, 52, true, null, 0);//Not a GT Inherited Material
+
//Refined PTFE
public static final Material TEFLON = new Material(
diff --git a/src/Java/gtPlusPlus/core/item/general/throwables/ItemThrowableBomb.java b/src/Java/gtPlusPlus/core/item/general/throwables/ItemThrowableBomb.java
index 9467c3a58c..e8f76ce64c 100644
--- a/src/Java/gtPlusPlus/core/item/general/throwables/ItemThrowableBomb.java
+++ b/src/Java/gtPlusPlus/core/item/general/throwables/ItemThrowableBomb.java
@@ -12,6 +12,7 @@ import gtPlusPlus.core.item.base.CoreItem;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.core.util.minecraft.NBTUtils;
+import gtPlusPlus.xmod.gregtech.common.items.MetaGeneratedGregtechTools;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
@@ -51,7 +52,7 @@ public class ItemThrowableBomb extends CoreItem {
for (ItemStack aPlaySlot : player.inventory.mainInventory) {
if (aPlaySlot != null) {
for (ItemStack aLighter : mLighters) {
- if (GT_Utility.areStacksEqual(aPlaySlot, aLighter)) {
+ if (GT_Utility.areStacksEqual(aPlaySlot, aLighter) || (aPlaySlot.getItem() instanceof MetaGeneratedGregtechTools && aPlaySlot.getItemDamage() == MetaGeneratedGregtechTools.ELECTRIC_LIGHTER)) {
hasLighter = true;
break;
}
diff --git a/src/Java/gtPlusPlus/core/material/ELEMENT.java b/src/Java/gtPlusPlus/core/material/ELEMENT.java
index e972992391..9ba6fe0f1d 100644
--- a/src/Java/gtPlusPlus/core/material/ELEMENT.java
+++ b/src/Java/gtPlusPlus/core/material/ELEMENT.java
@@ -213,6 +213,7 @@ public final class ELEMENT {
public static final Material CHRONOMATIC_GLASS = new Material("Chromatic Glass", MaterialState.SOLID, new short[]{255, 255, 255, 3}, 9200, 17550, 40, 51, false, "⌘☯𓍰 𓍱 𓍲 𓍳 𓍴 𓍵 𓍶 𓍷 𓍸 ☯⌘ ", 0);//Not a GT Inherited Material
public static final Material ADVANCED_NITINOL = new Material("Advanced Nitinol", MaterialState.SOLID, TextureSets.ENRICHED.get(), ALLOY.NITINOL_60.getRGB(), 8400, 14377, 40, 51, true, "⚷⚙⚷ Ni4Ti6", 0);//Not a GT Inherited Material
public static final Material HYPOGEN = new Material("Hypogen", MaterialState.SOLID, TextureSets.NUCLEAR.get(), new short[]{220, 120, 75, 2}, 12255, 19377, 240, 251, true, "Hy⚶", 0);//Not a GT Inherited Material
+ public static final Material RHUGNOR = new Material("Rhugnor", MaterialState.SOLID, TextureSets.ENRICHED.get(), new short[]{190, 0, 255, 0}, 8750, 14757, 184, 142, true, "Fs⚶", 0);//Not a GT Inherited Material //funeris
//Runescape materials
diff --git a/src/Java/gtPlusPlus/core/material/Material.java b/src/Java/gtPlusPlus/core/material/Material.java
index 8fb3c5fc3b..6b6be32107 100644
--- a/src/Java/gtPlusPlus/core/material/Material.java
+++ b/src/Java/gtPlusPlus/core/material/Material.java
@@ -14,6 +14,7 @@ import gregtech.api.enums.OrePrefixes;
import gregtech.api.enums.TextureSet;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.api.objects.data.AutoMap;
+import gtPlusPlus.core.item.base.BaseItemComponent.ComponentTypes;
import gtPlusPlus.core.item.base.cell.BaseItemCell;
import gtPlusPlus.core.lib.LoadedMods;
import gtPlusPlus.core.material.state.MaterialState;
@@ -1331,5 +1332,44 @@ public class Material {
return 75;
}
}
+
+
+
+
+ public boolean registerComponentForMaterial(ComponentTypes aPrefix, ItemStack aStack) {
+ return registerComponentForMaterial(this, aPrefix.getGtOrePrefix(), aStack);
+ }
+
+ public boolean registerComponentForMaterial(OrePrefixes aPrefix, ItemStack aStack) {
+ return registerComponentForMaterial(this, aPrefix, aStack);
+ }
+
+ public static boolean registerComponentForMaterial(Material componentMaterial, ComponentTypes aPrefix, ItemStack aStack) {
+ return registerComponentForMaterial(componentMaterial, aPrefix.getGtOrePrefix(), aStack);
+ }
+
+ public static boolean registerComponentForMaterial(Material componentMaterial, OrePrefixes aPrefix, ItemStack aStack) {
+ if (componentMaterial == null) {
+ return false;
+ }
+ //Register Component
+ Map<String, ItemStack> aMap = Material.mComponentMap.get(componentMaterial.getUnlocalizedName());
+ if (aMap == null) {
+ aMap = new HashMap<String, ItemStack>();
+ }
+ String aKey = aPrefix.name();
+ ItemStack x = aMap.get(aKey);
+ if (x == null) {
+ aMap.put(aKey, aStack);
+ Logger.MATERIALS("Registering a material component. Item: ["+componentMaterial.getUnlocalizedName()+"] Map: ["+aKey+"]");
+ Material.mComponentMap.put(componentMaterial.getUnlocalizedName(), aMap);
+ return true;
+ }
+ else {
+ //Bad
+ Logger.MATERIALS("Tried to double register a material component. ");
+ return false;
+ }
+ }
} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/core/proxy/ClientProxy.java b/src/Java/gtPlusPlus/core/proxy/ClientProxy.java
index c7374ca7d5..71befe0a37 100644
--- a/src/Java/gtPlusPlus/core/proxy/ClientProxy.java
+++ b/src/Java/gtPlusPlus/core/proxy/ClientProxy.java
@@ -47,7 +47,9 @@ import gtPlusPlus.core.entity.monster.EntityGiantChickenBase;
import gtPlusPlus.core.entity.monster.EntitySickBlaze;
import gtPlusPlus.core.entity.monster.EntityStaballoyConstruct;
import gtPlusPlus.core.entity.projectile.EntityHydrofluoricAcidPotion;
+import gtPlusPlus.core.entity.projectile.EntityLightningAttack;
import gtPlusPlus.core.entity.projectile.EntitySulfuricAcidPotion;
+import gtPlusPlus.core.entity.projectile.EntityThrowableBomb;
import gtPlusPlus.core.entity.projectile.EntityToxinballSmall;
import gtPlusPlus.core.handler.render.FirepitRender;
import gtPlusPlus.core.item.ModItems;
@@ -61,6 +63,7 @@ import gtPlusPlus.xmod.gregtech.common.render.GTPP_Render_MachineBlock;
import net.minecraft.client.Minecraft;
import net.minecraft.client.model.ModelBat;
import net.minecraft.client.particle.EntityFX;
+import net.minecraft.client.renderer.entity.RenderFireball;
import net.minecraft.client.renderer.entity.RenderSnowball;
import net.minecraft.entity.Entity;
@@ -138,6 +141,8 @@ public class ClientProxy extends CommonProxy implements Runnable{
RenderingRegistry.registerEntityRenderingHandler(EntityTeslaTowerLightning.class, new RenderPlasmaBolt());
RenderingRegistry.registerEntityRenderingHandler(EntityGiantChickenBase.class, new RenderGiantChicken(new ModelGiantChicken(), 1f));
RenderingRegistry.registerEntityRenderingHandler(EntityBatKing.class, new RenderBatKing());
+ RenderingRegistry.registerEntityRenderingHandler(EntityThrowableBomb.class, new RenderSnowball(ModItems.itemBomb, 1));
+ RenderingRegistry.registerEntityRenderingHandler(EntityLightningAttack.class, new RenderFireball(1F));
/**
* Tiles
diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java
index 68f7bdd762..483fce8ce5 100644
--- a/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java
+++ b/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java
@@ -17,6 +17,7 @@ import gregtech.api.util.ThermalFuel;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.item.ModItems;
+import gtPlusPlus.core.item.chemistry.GenericChem;
import gtPlusPlus.core.item.chemistry.IonParticles;
import gtPlusPlus.core.item.chemistry.RocketFuels;
import gtPlusPlus.core.item.crafting.ItemDummyResearch;
@@ -26,6 +27,7 @@ import gtPlusPlus.core.lib.LoadedMods;
import gtPlusPlus.core.material.ALLOY;
import gtPlusPlus.core.material.ELEMENT;
import gtPlusPlus.core.material.MaterialStack;
+import gtPlusPlus.core.material.NONMATERIAL;
import gtPlusPlus.core.material.ORES;
import gtPlusPlus.core.material.Particle;
import gtPlusPlus.core.material.nuclear.FLUORIDES;
@@ -146,6 +148,15 @@ public class RECIPES_GREGTECH {
2048 * 4,
(int) GT_Values.V[9],
600000000 * 2);
+
+ //Rhugnor
+ GT_Values.RA.addFusionReactorRecipe(
+ GenericChem.TEFLON.getFluid(64),
+ ALLOY.PIKYONIUM.getFluid(128),
+ ELEMENT.STANDALONE.RHUGNOR.getFluid(8),
+ 2048 * 4,
+ (int) GT_Values.V[7],
+ 150000000 * 2);
}
@@ -1736,6 +1747,20 @@ public class RECIPES_GREGTECH {
MaterialUtils.getVoltageForTier(GTNH ? 3 : 2),
2800);
+ //Krypton Processing
+ if (ModItems.itemHotTitaniumIngot != null) {
+ GT_Values.RA.addBlastRecipe(
+ ItemUtils.getItemStackOfAmountFromOreDict("ingotTitanium", 1),
+ CI.getNumberedCircuit(16),
+ GT_Values.NF,
+ GT_Values.NF,
+ ItemUtils.getItemStackOfAmountFromOreDict("ingotHotTitanium", 1),
+ null,
+ 10 * 20,
+ 500,
+ Materials.Titanium.mBlastFurnaceTemp);
+ }
+
}
diff --git a/src/Java/gtPlusPlus/everglades/GTplusplus_Everglades.java b/src/Java/gtPlusPlus/everglades/GTplusplus_Everglades.java
index db94bae390..698a5ec80a 100644
--- a/src/Java/gtPlusPlus/everglades/GTplusplus_Everglades.java
+++ b/src/Java/gtPlusPlus/everglades/GTplusplus_Everglades.java
@@ -132,6 +132,25 @@ public class GTplusplus_Everglades implements ActionListener {
ELEMENT.getInstance().TRINIUM_REFINED.getRGBA());
}
+
+
+ /*
+ * OSRS Materials
+ */
+
+ MaterialGenerator.generateOreMaterial(
+ ELEMENT.STANDALONE.GRANITE,
+ true,
+ false,
+ false,
+ ELEMENT.STANDALONE.GRANITE.getRGBA());
+ MaterialGenerator.generateOreMaterial(
+ ELEMENT.STANDALONE.RUNITE,
+ true,
+ false,
+ false,
+ ELEMENT.STANDALONE.RUNITE.getRGBA());
+
}
diff --git a/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_IC2_Hazmat.java b/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_IC2_Hazmat.java
index 4bb7ef7d46..59edf8dec0 100644
--- a/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_IC2_Hazmat.java
+++ b/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_IC2_Hazmat.java
@@ -20,7 +20,7 @@ public class ClassTransformer_IC2_Hazmat {
private final ClassWriter writer;
private final String className;
- public boolean hasCompleteHazmat(EntityLivingBase living) {
+ public static boolean hasCompleteHazmat(EntityLivingBase living) {
return HazmatUtils.hasCompleteHazmat(living);
}
@@ -79,11 +79,14 @@ public class ClassTransformer_IC2_Hazmat {
if (isObf) {
aEntityLivingBase = "sv";
}
+ FMLRelaunchLog.log("[GT++ ASM] IC2 Hazmat Patch", Level.INFO, "Method Handler: "+aEntityLivingBase);
FMLRelaunchLog.log("[GT++ ASM] IC2 Hazmat Patch", Level.INFO, "Injecting " + aMethodName + ".");
if (aMethodName.equals("hasCompleteHazmat")) {
- mv = cw.visitMethod(ACC_PUBLIC, "hasCompleteHazmat", "(L"+aEntityLivingBase+";)Z", null, null);
+
+ //Bad Local Variable - https://pastebin.com/TUCfdHqS
+ /*mv = cw.visitMethod(ACC_PUBLIC + ACC_STATIC, "hasCompleteHazmat", "(L"+aEntityLivingBase+";)Z", null, null);
mv.visitCode();
Label l0 = new Label();
mv.visitLabel(l0);
@@ -96,6 +99,21 @@ public class ClassTransformer_IC2_Hazmat {
mv.visitLocalVariable("this", "Lic2/core/item/armor/ItemArmorHazmat;", null, l0, l1, 0);
mv.visitLocalVariable("living", "L"+aEntityLivingBase+";", null, l0, l1, 1);
mv.visitMaxs(1, 2);
+ mv.visitEnd();*/
+
+
+ mv = cw.visitMethod(ACC_PUBLIC + ACC_STATIC, "hasCompleteHazmat", "(L"+aEntityLivingBase+";)Z", null, null);
+ mv.visitCode();
+ Label l0 = new Label();
+ mv.visitLabel(l0);
+ mv.visitLineNumber(24, l0);
+ mv.visitVarInsn(ALOAD, 0);
+ mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/core/util/minecraft/HazmatUtils", "hasCompleteHazmat", "(L"+aEntityLivingBase+";)Z", false);
+ mv.visitInsn(IRETURN);
+ Label l1 = new Label();
+ mv.visitLabel(l1);
+ mv.visitLocalVariable("living", "L"+aEntityLivingBase+";", null, l0, l1, 0);
+ mv.visitMaxs(1, 1);
mv.visitEnd();
}
FMLRelaunchLog.log("[GT++ ASM] IC2 Hazmat Patch", Level.INFO, "Method injection complete.");
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler_Adv.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler_Adv.java
index 8c0c47bea2..2832941bdd 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler_Adv.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler_Adv.java
@@ -23,7 +23,7 @@ public class GT_MetaTileEntity_Hatch_Muffler_Adv extends GT_MetaTileEntity_Hatch
super.onConfigLoad(aConfig);
if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK || CORE.GTNH) {
try {
- Integer a1 = (int) StaticFields59.getFieldFromGregtechProxy(false, "mPollutionSmogLimit");
+ Integer a1 = (int) StaticFields59.getFieldFromGregtechProxy("mPollutionSmogLimit");
if (a1 != null && a1 > 0) {
mPollutionSmogLimit = a1;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaPipeEntityFluid.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaPipeEntityFluid.java
index 929dee22e4..8a29dc5db2 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaPipeEntityFluid.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaPipeEntityFluid.java
@@ -1,10 +1,6 @@
package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraftforge.fluids.FluidStack;
-import gregtech.GT_Mod;
import gregtech.api.enums.Dyes;
-import gregtech.api.enums.Materials;
import gregtech.api.enums.OrePrefixes;
import gregtech.api.enums.SubTag;
import gregtech.api.interfaces.ITexture;
@@ -12,10 +8,9 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaPipeEntity_Fluid;
import gregtech.api.objects.GT_RenderedTexture;
-
-import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes.GT_Materials;
import gtPlusPlus.xmod.gregtech.common.StaticFields59;
+import net.minecraft.util.EnumChatFormatting;
public class GregtechMetaPipeEntityFluid extends GT_MetaPipeEntity_Fluid {
@@ -23,7 +18,7 @@ public class GregtechMetaPipeEntityFluid extends GT_MetaPipeEntity_Fluid {
public static final boolean mGt6Pipe;
static {
- Boolean aGt6 = (Boolean) StaticFields59.getFieldFromGregtechProxy(false, "gt6Pipe");
+ Boolean aGt6 = (Boolean) StaticFields59.getFieldFromGregtechProxy("gt6Pipe");
if (aGt6 != null) {
mGt6Pipe = aGt6;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java b/src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java
index 7505c2a808..77f3a31020 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java
@@ -32,6 +32,7 @@ import gtPlusPlus.api.objects.minecraft.FormattedTooltipString;
import gtPlusPlus.core.handler.AchievementHandler;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.material.ELEMENT;
+import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.minecraft.FluidUtils;
import gtPlusPlus.core.util.minecraft.MaterialUtils;
import gtPlusPlus.xmod.gregtech.api.metatileentity.BaseCustomTileEntity;
@@ -91,8 +92,10 @@ public class Meta_GT_Proxy {
throw new RuntimeException("");
}
- //Gotta set it here so that we don't try call gregtech too early.
- StaticFields59.mGT6StylePipes = (boolean) StaticFields59.getFieldFromGregtechProxy(true, "gt6Pipe");
+ //Gotta set it here so that we don't try call gregtech too early.
+ //Must set on the correct side
+ StaticFields59.mGT6StylePipes = (boolean) StaticFields59.getFieldFromGregtechProxy("gt6Pipe");
+
GT_Log.out.println("GT++ Mod: Registering the BaseMetaTileEntity.");
GameRegistry.registerTileEntity(tBaseMetaTileEntity.getClass(), "BaseMetaTileEntity_GTPP");
@@ -376,7 +379,7 @@ public class Meta_GT_Proxy {
* @deprecated Use {@link StaticFields59#getFieldFromGregtechProxy(boolean,String)} instead
*/
public static Object getFieldFromGregtechProxy(boolean client, String fieldName) {
- return StaticFields59.getFieldFromGregtechProxy(client, fieldName);
+ return StaticFields59.getFieldFromGregtechProxy(fieldName);
}
public void setCustomGregtechTooltip(String aNbtTagName, FormattedTooltipString aData) {
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/StaticFields59.java b/src/Java/gtPlusPlus/xmod/gregtech/common/StaticFields59.java
index 2a3fd5e77c..99563b60ef 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/StaticFields59.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/StaticFields59.java
@@ -22,6 +22,7 @@ import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
import gregtech.common.GT_Proxy;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
+import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.reflect.ProxyFinder;
import gtPlusPlus.core.util.reflect.ReflectionUtils;
import net.minecraft.block.Block;
@@ -183,6 +184,11 @@ public class StaticFields59 {
return null;
}
+
+ public static Object getFieldFromGregtechProxy(String fieldName) {
+ return getFieldFromGregtechProxy(Utils.isServer() ? false : true, fieldName);
+ }
+
public static Object getFieldFromGregtechProxy(boolean client, String fieldName) {
Object proxyGT;
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/TreeFarmHelper.java b/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/TreeFarmHelper.java
index 3c60ae664e..624058f356 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/TreeFarmHelper.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/TreeFarmHelper.java
@@ -320,7 +320,7 @@ public class TreeFarmHelper {
if(blockHumus != null){
return blockHumus;
}
- else if (ReflectionUtils.doesClassExist("forestry.core.blocks.BlockSoil")){
+ else if (isHumusLoaded){
final Class<?> humusClass = ReflectionUtils.getClass("forestry.core.blocks.BlockSoil");
final ItemStack humusStack = ItemUtils.getCorrectStacktype("Forestry:soil", 1);
if (humusClass != null){
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/treefarm/TreeGenerator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/treefarm/TreeGenerator.java
new file mode 100644
index 0000000000..7437bf19da
--- /dev/null
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/treefarm/TreeGenerator.java
@@ -0,0 +1,295 @@
+package gtPlusPlus.xmod.gregtech.common.helpers.treefarm;
+
+import java.util.Random;
+
+import gtPlusPlus.api.objects.data.AutoMap;
+import gtPlusPlus.core.lib.CORE;
+import net.minecraft.block.Block;
+import net.minecraft.block.BlockSapling;
+import net.minecraft.init.Blocks;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.Direction;
+import net.minecraft.world.World;
+import net.minecraft.world.gen.feature.WorldGenAbstractTree;
+import net.minecraftforge.common.util.ForgeDirection;
+
+public class TreeGenerator {
+
+ public static AutoMap<ItemStack> generateOutput(int aTreeSize){
+ AutoMap<ItemStack> aOutputMap = new AutoMap<ItemStack>();
+
+
+ return aOutputMap;
+ }
+
+ public class FakeWorldGenerator extends WorldGenAbstractTree
+ {
+ /** The minimum height of a generated tree. */
+ private final int minTreeHeight;
+ /** True if this tree should grow Vines. */
+ private final boolean vinesGrow;
+ /** The metadata value of the wood to use in tree generation. */
+ private final int metaWood;
+ /** The metadata value of the leaves to use in tree generation. */
+ private final int metaLeaves;
+
+ private boolean hasGenerated = false;
+ private AutoMap<ItemStack> aOutputsFromGenerator = new AutoMap<ItemStack>();
+
+ public FakeWorldGenerator()
+ {
+ this(4, 0, 0, false);
+ }
+
+ public FakeWorldGenerator(int aMinHeight, int aWoodMeta, int aLeafMeta, boolean aVines)
+ {
+ super(false);
+ this.minTreeHeight = aMinHeight;
+ this.metaWood = aWoodMeta;
+ this.metaLeaves = aLeafMeta;
+ this.vinesGrow = aVines;
+ }
+
+
+ public AutoMap<ItemStack> getOutputFromTree(){
+ if (!hasGenerated) {
+ generate(null, CORE.RANDOM, 0, 0, 0);
+ }
+ return aOutputsFromGenerator;
+ }
+
+
+ @Override
+ public boolean generate(World aWorld, Random aRand, int aWorldX, int aWorldRealY, int aWorldZ){
+
+ //Only Generate Once - This object is Cached
+ if (hasGenerated) {
+ return hasGenerated;
+ }
+
+ //Set some static values
+
+ //Dummy Value
+ int aWorldY = 10;
+
+ int l = CORE.RANDOM.nextInt(3) + this.minTreeHeight;
+ boolean flag = true;
+
+ if (aWorldY >= 1 && aWorldY + l + 1 <= 256)
+ {
+ byte b0;
+ int k1;
+ Block block;
+
+ for (int i1 = aWorldY; i1 <= aWorldY + 1 + l; ++i1)
+ {
+ b0 = 1;
+
+ if (i1 == aWorldY)
+ {
+ b0 = 0;
+ }
+
+ if (i1 >= aWorldY + 1 + l - 2)
+ {
+ b0 = 2;
+ }
+
+ for (int j1 = aWorldX - b0; j1 <= aWorldX + b0 && flag; ++j1)
+ {
+ for (k1 = aWorldZ - b0; k1 <= aWorldZ + b0 && flag; ++k1)
+ {
+ if (i1 >= 0 && i1 < 256)
+ {
+ block = aWorld.getBlock(j1, i1, k1);
+
+ if (!this.isReplaceable(aWorld, j1, i1, k1))
+ {
+ flag = false;
+ }
+ }
+ else
+ {
+ flag = false;
+ }
+ }
+ }
+ }
+
+ if (!flag)
+ {
+ return false;
+ }
+ else
+ {
+ Block block2 = aWorld.getBlock(aWorldX, aWorldY - 1, aWorldZ);
+
+ boolean isSoil = block2.canSustainPlant(aWorld, aWorldX, aWorldY - 1, aWorldZ, ForgeDirection.UP, (BlockSapling)Blocks.sapling);
+ if (isSoil && aWorldY < 256 - l - 1)
+ {
+ block2.onPlantGrow(aWorld, aWorldX, aWorldY - 1, aWorldZ, aWorldX, aWorldY, aWorldZ);
+ b0 = 3;
+ byte b1 = 0;
+ int l1;
+ int i2;
+ int j2;
+ int i3;
+
+ for (k1 = aWorldY - b0 + l; k1 <= aWorldY + l; ++k1)
+ {
+ i3 = k1 - (aWorldY + l);
+ l1 = b1 + 1 - i3 / 2;
+
+ for (i2 = aWorldX - l1; i2 <= aWorldX + l1; ++i2)
+ {
+ j2 = i2 - aWorldX;
+
+ for (int k2 = aWorldZ - l1; k2 <= aWorldZ + l1; ++k2)
+ {
+ int l2 = k2 - aWorldZ;
+
+ if (Math.abs(j2) != l1 || Math.abs(l2) != l1 || CORE.RANDOM.nextInt(2) != 0 && i3 != 0)
+ {
+ Block block1 = aWorld.getBlock(i2, k1, k2);
+
+ if (block1.isAir(aWorld, i2, k1, k2) || block1.isLeaves(aWorld, i2, k1, k2))
+ {
+ this.setBlockAndNotifyAdequately(aWorld, i2, k1, k2, Blocks.leaves, this.metaLeaves);
+ }
+ }
+ }
+ }
+ }
+
+ for (k1 = 0; k1 < l; ++k1)
+ {
+ block = aWorld.getBlock(aWorldX, aWorldY + k1, aWorldZ);
+
+ if (block.isAir(aWorld, aWorldX, aWorldY + k1, aWorldZ) || block.isLeaves(aWorld, aWorldX, aWorldY + k1, aWorldZ))
+ {
+ this.setBlockAndNotifyAdequately(aWorld, aWorldX, aWorldY + k1, aWorldZ, Blocks.log, this.metaWood);
+
+ if (this.vinesGrow && k1 > 0)
+ {
+ if (CORE.RANDOM.nextInt(3) > 0 && aWorld.isAirBlock(aWorldX - 1, aWorldY + k1, aWorldZ))
+ {
+ this.setBlockAndNotifyAdequately(aWorld, aWorldX - 1, aWorldY + k1, aWorldZ, Blocks.vine, 8);
+ }
+
+ if (CORE.RANDOM.nextInt(3) > 0 && aWorld.isAirBlock(aWorldX + 1, aWorldY + k1, aWorldZ))
+ {
+ this.setBlockAndNotifyAdequately(aWorld, aWorldX + 1, aWorldY + k1, aWorldZ, Blocks.vine, 2);
+ }
+
+ if (CORE.RANDOM.nextInt(3) > 0 && aWorld.isAirBlock(aWorldX, aWorldY + k1, aWorldZ - 1))
+ {
+ this.setBlockAndNotifyAdequately(aWorld, aWorldX, aWorldY + k1, aWorldZ - 1, Blocks.vine, 1);
+ }
+
+ if (CORE.RANDOM.nextInt(3) > 0 && aWorld.isAirBlock(aWorldX, aWorldY + k1, aWorldZ + 1))
+ {
+ this.setBlockAndNotifyAdequately(aWorld, aWorldX, aWorldY + k1, aWorldZ + 1, Blocks.vine, 4);
+ }
+ }
+ }
+ }
+
+ if (this.vinesGrow)
+ {
+ for (k1 = aWorldY - 3 + l; k1 <= aWorldY + l; ++k1)
+ {
+ i3 = k1 - (aWorldY + l);
+ l1 = 2 - i3 / 2;
+
+ for (i2 = aWorldX - l1; i2 <= aWorldX + l1; ++i2)
+ {
+ for (j2 = aWorldZ - l1; j2 <= aWorldZ + l1; ++j2)
+ {
+ if (aWorld.getBlock(i2, k1, j2).isLeaves(aWorld, i2, k1, j2))
+ {
+ if (CORE.RANDOM.nextInt(4) == 0 && aWorld.getBlock(i2 - 1, k1, j2).isAir(aWorld, i2 - 1, k1, j2))
+ {
+ this.growVines(aWorld, i2 - 1, k1, j2, 8);
+ }
+
+ if (CORE.RANDOM.nextInt(4) == 0 && aWorld.getBlock(i2 + 1, k1, j2).isAir(aWorld, i2 + 1, k1, j2))
+ {
+ this.growVines(aWorld, i2 + 1, k1, j2, 2);
+ }
+
+ if (CORE.RANDOM.nextInt(4) == 0 && aWorld.getBlock(i2, k1, j2 - 1).isAir(aWorld, i2, k1, j2 - 1))
+ {
+ this.growVines(aWorld, i2, k1, j2 - 1, 1);
+ }
+
+ if (CORE.RANDOM.nextInt(4) == 0 && aWorld.getBlock(i2, k1, j2 + 1).isAir(aWorld, i2, k1, j2 + 1))
+ {
+ this.growVines(aWorld, i2, k1, j2 + 1, 4);
+ }
+ }
+ }
+ }
+ }
+
+ if (CORE.RANDOM.nextInt(5) == 0 && l > 5)
+ {
+ for (k1 = 0; k1 < 2; ++k1)
+ {
+ for (i3 = 0; i3 < 4; ++i3)
+ {
+ if (CORE.RANDOM.nextInt(4 - k1) == 0)
+ {
+ l1 = CORE.RANDOM.nextInt(3);
+ this.setBlockAndNotifyAdequately(aWorld, aWorldX + Direction.offsetX[Direction.rotateOpposite[i3]], aWorldY + l - 5 + k1, aWorldZ + Direction.offsetZ[Direction.rotateOpposite[i3]], Blocks.cocoa, l1 << 2 | i3);
+ }
+ }
+ }
+ }
+ }
+
+ hasGenerated = true;
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ /**
+ * Grows vines downward from the given block for a given length. Args: World, x, starty, z, vine-length
+ */
+ private void growVines(World aWorld, int aX, int aY, int aZ, int aMeta)
+ {
+ this.setBlockAndNotifyAdequately(aWorld, aX, aY, aZ, Blocks.vine, aMeta);
+ int i1 = 4;
+
+ while (true)
+ {
+ --aY;
+
+ if (!aWorld.getBlock(aX, aY, aZ).isAir(aWorld, aX, aY, aZ) || i1 <= 0)
+ {
+ return;
+ }
+
+ this.setBlockAndNotifyAdequately(aWorld, aX, aY, aZ, Blocks.vine, aMeta);
+ --i1;
+ }
+ }
+
+ @Override
+ protected void setBlockAndNotifyAdequately(World aWorld, int aX, int aY, int aZ, Block aBlock, int aMeta) {
+
+ super.setBlockAndNotifyAdequately(aWorld, aX, aY, aZ, aBlock, aMeta);
+ }
+ }
+
+
+}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Choocher.java b/src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Choocher.java
index c74a31055d..f82e0e5cb0 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Choocher.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Choocher.java
@@ -10,6 +10,9 @@ import gregtech.api.items.GT_MetaBase_Item;
import gregtech.api.util.GT_LanguageManager;
import gregtech.common.items.behaviors.Behaviour_None;
import gregtech.common.items.behaviors.Behaviour_Wrench;
+import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.core.util.minecraft.NBTUtils;
+import gtPlusPlus.core.util.minecraft.PlayerUtils;
public class Behaviour_Choocher
extends Behaviour_None {
@@ -30,30 +33,47 @@ extends Behaviour_None {
if (aWorld.isRemote) {
return false;
}
+
+ boolean inWrenchMode;
+ if (NBTUtils.hasKey(aStack, "aMode")) {
+ inWrenchMode = NBTUtils.getBoolean(aStack, "aMode");
+ }
+ else {
+ aStack.getTagCompound().setBoolean("aMode", true);
+ inWrenchMode = true;
+ }
+
if (aPlayer.isSneaking()){
- if (this.isWrench){
- this.isWrench = false;
- return false;
- }
- this.isWrench = true;
- return false;
+ boolean aModeNew = Utils.invertBoolean(inWrenchMode);
+ aStack.getTagCompound().setBoolean("aMode", aModeNew);
+ PlayerUtils.messagePlayer(aPlayer, "Mode: "+(aModeNew ? "Wrench" : "Hammer"));
+ return true;
}
- else if (!aPlayer.isSneaking()){
- if (this.isWrench){
- this.wrench.onItemUseFirst(aItem, aStack, aPlayer, aWorld, aSide, aSide, aSide, aSide, hitZ, hitZ, hitZ);
- return false;
+ else {
+ if (inWrenchMode){
+ return this.wrench.onItemUseFirst(aItem, aStack, aPlayer, aWorld, aSide, aSide, aSide, aSide, hitZ, hitZ, hitZ);
+ }
+ else {
+ return this.prospecting.onItemUseFirst(aItem, aStack, aPlayer, aWorld, aX, aY, aZ, aSide, hitX, hitY, hitZ);
}
- this.prospecting.onItemUseFirst(aItem, aStack, aPlayer, aWorld, aX, aY, aZ, aSide, hitX, hitY, hitZ);
- return false;
}
- return false;
}
@Override
public List<String> getAdditionalToolTips(final GT_MetaBase_Item aItem, final List<String> aList, final ItemStack aStack) {
+ boolean inWrenchMode;
+ if (NBTUtils.hasKey(aStack, "aMode")) {
+ inWrenchMode = NBTUtils.getBoolean(aStack, "aMode");
+ }
+ else {
+ NBTUtils.setBoolean(aStack, "aMode", true);
+ aStack.getTagCompound().setBoolean("aMode", true);
+ inWrenchMode = true;
+ }
+
- if (this.isWrench){
+ if (inWrenchMode){
aList.add(this.mTooltip1+"Wrench");
aList.add(this.mTooltipW);
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Electric_Lighter.java b/src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Electric_Lighter.java
index 278b556733..64676fa907 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Electric_Lighter.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Electric_Lighter.java
@@ -7,9 +7,15 @@ import gregtech.api.GregTech_API;
import gregtech.api.items.GT_MetaBase_Item;
import gregtech.api.util.GT_LanguageManager;
import gregtech.api.util.GT_Utility;
-import gregtech.api.util.GT_Utility.ItemNBT;
import gregtech.common.items.behaviors.Behaviour_None;
import gtPlusPlus.api.objects.Logger;
+import gtPlusPlus.core.entity.projectile.EntityLightningAttack;
+import gtPlusPlus.core.entity.projectile.EntityThrowableBomb;
+import gtPlusPlus.core.lib.CORE;
+import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.core.util.minecraft.NBTUtils;
+import gtPlusPlus.core.util.minecraft.PlayerUtils;
+import gtPlusPlus.core.util.sys.KeyboardUtils;
import gtPlusPlus.xmod.gregtech.common.helpers.ChargingHelper;
import gtPlusPlus.xmod.gregtech.common.items.MetaGeneratedGregtechTools;
import ic2.api.item.IElectricItemManager;
@@ -19,15 +25,12 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.EnumChatFormatting;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
public class Behaviour_Electric_Lighter extends Behaviour_None {
- private final ItemStack mLighter;
-
- private final long mFuelAmount;
-
private final String mTooltip = GT_LanguageManager.addStringLocalization("gt.behaviour.lighter.tooltip",
"Can light things on Fire");
private final String mTooltipUses = GT_LanguageManager.addStringLocalization("gt.behaviour.lighter.uses",
@@ -35,9 +38,8 @@ public class Behaviour_Electric_Lighter extends Behaviour_None {
private final String mTooltipUnstackable = GT_LanguageManager.addStringLocalization("gt.behaviour.unstackable",
"Not usable when stacked!");
- public Behaviour_Electric_Lighter(ItemStack aFullLighter, long aFuelAmount) {
- this.mLighter = aFullLighter;
- this.mFuelAmount = aFuelAmount;
+ public Behaviour_Electric_Lighter() {
+
}
public boolean onLeftClickEntity(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, Entity aEntity) {
@@ -60,30 +62,97 @@ public class Behaviour_Electric_Lighter extends Behaviour_None {
public boolean onItemUse(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX,
int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) {
+ if (!aWorld.isRemote && aStack.stackSize == 1) {
+ if (aPlayer.isSneaking()) {
+ Logger.INFO("Changing Mode");
+ boolean aCurrentMode = NBTUtils.getBoolean(aStack, "aFireballMod");
+ Logger.INFO("Is currently in Fireball mode? "+aCurrentMode);
+ boolean aNewMode = Utils.invertBoolean(aCurrentMode);
+ Logger.INFO("Is now set to Fireball mode? "+aNewMode);
+ aStack.getTagCompound().setBoolean("aFireballMod", aNewMode);
+ //NBTUtils.setBoolean(aStack, "aFireballMode", aNewMode);
+ PlayerUtils.messagePlayer(aPlayer, "Current Mode: "+EnumChatFormatting.RED+(aNewMode ? "Projectile" : "Fire Starter"));
+ }
+ else {
+ boolean aCurrentMode = NBTUtils.getBoolean(aStack, "aFireballMod");
+ if (aCurrentMode) {
+ //Shoot Lightning Attack
+ aWorld.playSoundAtEntity(aPlayer, "random.bow", 0.5F, 0.4F / (CORE.RANDOM.nextFloat() * 0.4F + 0.8F));
+ if (!aWorld.isRemote) {
+ aWorld.spawnEntityInWorld(new EntityLightningAttack(aWorld, aPlayer, hitX, hitY, hitZ));
+ }
+ }
+ else {
+ //Lights Fires Mode
+ Logger.WARNING("Preparing Lighter a");
+ boolean rOutput = false;
+ ForgeDirection tDirection = ForgeDirection.getOrientation(aSide);
+ aX += tDirection.offsetX;
+ aY += tDirection.offsetY;
+ aZ += tDirection.offsetZ;
+ if (GT_Utility.isBlockAir(aWorld, aX, aY, aZ) && aPlayer.canPlayerEdit(aX, aY, aZ, aSide, aStack)) {
+ Logger.WARNING("Preparing Lighter b");
+ if (this.prepare(aStack) || aPlayer.capabilities.isCreativeMode) {
+ Logger.WARNING("Preparing Lighter c");
+ GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(6), 1.0F, 1.0F, aX, aY,
+ aZ);
+ aWorld.setBlock(aX, aY, aZ, Blocks.fire);
+ rOutput = true;
+ // ItemNBT.setLighterFuel(aStack, tFuelAmount);
+ return rOutput;
+ }
+ }
+ }
+ }
+ }
+ Logger.WARNING("Preparing Lighter z");
return false;
}
public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX,
int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) {
- if (!aWorld.isRemote && aStack.stackSize == 1) {
- Logger.WARNING("Preparing Lighter a");
- boolean rOutput = false;
- ForgeDirection tDirection = ForgeDirection.getOrientation(aSide);
- aX += tDirection.offsetX;
- aY += tDirection.offsetY;
- aZ += tDirection.offsetZ;
- if (GT_Utility.isBlockAir(aWorld, aX, aY, aZ) && aPlayer.canPlayerEdit(aX, aY, aZ, aSide, aStack)) {
- Logger.WARNING("Preparing Lighter b");
- if (this.prepare(aStack) || aPlayer.capabilities.isCreativeMode) {
- Logger.WARNING("Preparing Lighter c");
- GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(6), 1.0F, 1.0F, aX, aY,
- aZ);
- aWorld.setBlock(aX, aY, aZ, Blocks.fire);
- rOutput = true;
- // ItemNBT.setLighterFuel(aStack, tFuelAmount);
- return rOutput;
- }
+ if (!aWorld.isRemote && aStack.stackSize == 1) {
+ if (aPlayer.isSneaking()) {
+ Logger.INFO("Changing Mode");
+ boolean aCurrentMode = NBTUtils.getBoolean(aStack, "aFireballMod");
+ Logger.INFO("Is currently in Fireball mode? "+aCurrentMode);
+ boolean aNewMode = Utils.invertBoolean(aCurrentMode);
+ Logger.INFO("Is now set to Fireball mode? "+aNewMode);
+ aStack.getTagCompound().setBoolean("aFireballMod", aNewMode);
+ //NBTUtils.setBoolean(aStack, "aFireballMode", aNewMode);
+ PlayerUtils.messagePlayer(aPlayer, "Current Mode: "+EnumChatFormatting.RED+(aNewMode ? "Projectile" : "Fire Starter"));
}
+ else {
+ boolean aCurrentMode = NBTUtils.getBoolean(aStack, "aFireballMod");
+ if (aCurrentMode) {
+ //Shoot Lightning Attack
+ aWorld.playSoundAtEntity(aPlayer, "random.bow", 0.5F, 0.4F / (CORE.RANDOM.nextFloat() * 0.4F + 0.8F));
+ if (!aWorld.isRemote) {
+ aWorld.spawnEntityInWorld(new EntityLightningAttack(aWorld, aPlayer, hitX, hitY, hitZ));
+ }
+ }
+ else {
+ //Lights Fires Mode
+ Logger.WARNING("Preparing Lighter a");
+ boolean rOutput = false;
+ ForgeDirection tDirection = ForgeDirection.getOrientation(aSide);
+ aX += tDirection.offsetX;
+ aY += tDirection.offsetY;
+ aZ += tDirection.offsetZ;
+ if (GT_Utility.isBlockAir(aWorld, aX, aY, aZ) && aPlayer.canPlayerEdit(aX, aY, aZ, aSide, aStack)) {
+ Logger.WARNING("Preparing Lighter b");
+ if (this.prepare(aStack) || aPlayer.capabilities.isCreativeMode) {
+ Logger.WARNING("Preparing Lighter c");
+ GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(6), 1.0F, 1.0F, aX, aY,
+ aZ);
+ aWorld.setBlock(aX, aY, aZ, Blocks.fire);
+ rOutput = true;
+ // ItemNBT.setLighterFuel(aStack, tFuelAmount);
+ return rOutput;
+ }
+ }
+ }
+ }
}
Logger.WARNING("Preparing Lighter z");
return false;
@@ -138,6 +207,17 @@ public class Behaviour_Electric_Lighter extends Behaviour_None {
NBTTagCompound tNBT = aStack.getTagCompound();
aList.add(this.mTooltipUses + " " + aUses);
aList.add(this.mTooltipUnstackable);
+
+
+ boolean aCurrentMode;
+ if (NBTUtils.hasKey(aStack, "aFireballMode")) {
+ aCurrentMode = NBTUtils.getBoolean(aStack, "aFireballMod");
+ }
+ else {
+ aStack.getTagCompound().setBoolean("aFireballMod", false);
+ aCurrentMode = false;
+ }
+ aList.add("Current Mode: "+EnumChatFormatting.RED+(aCurrentMode ? "Projectile" : "Fire Starter"));
return aList;
}
} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/bedrock/GregtechMetaTileEntity_BedrockMiningPlatformBase.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/bedrock/GregtechMetaTileEntity_BedrockMiningPlatformBase.java
index 9ac67cf874..fb4884e278 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/bedrock/GregtechMetaTileEntity_BedrockMiningPlatformBase.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/bedrock/GregtechMetaTileEntity_BedrockMiningPlatformBase.java
@@ -3,14 +3,7 @@ package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.b
import java.util.ArrayList;
import java.util.HashMap;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.world.ChunkPosition;
-
+import gregtech.api.GregTech_API;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.Textures;
import gregtech.api.gui.GT_GUIContainer_MultiMachine;
@@ -22,16 +15,28 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockB
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_Utility;
-
+import gregtech.common.GT_Worldgen_GT_Ore_Layer;
import gtPlusPlus.api.objects.Logger;
+import gtPlusPlus.api.objects.data.AutoMap;
+import gtPlusPlus.api.objects.data.Pair;
import gtPlusPlus.api.objects.minecraft.BlockPos;
import gtPlusPlus.core.block.ModBlocks;
-import gtPlusPlus.core.lib.CORE;
+import gtPlusPlus.core.lib.LoadedMods;
+import gtPlusPlus.core.material.ELEMENT;
import gtPlusPlus.core.material.Material;
+import gtPlusPlus.core.material.ORES;
+import gtPlusPlus.core.util.math.MathUtils;
import gtPlusPlus.core.util.minecraft.FluidUtils;
import gtPlusPlus.core.util.minecraft.ItemUtils;
+import gtPlusPlus.core.util.minecraft.MiningUtils;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
+import net.minecraft.block.Block;
+import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.world.ChunkPosition;
import net.minecraftforge.common.util.ForgeDirection;
+import net.minecraftforge.oredict.OreDictionary;
public abstract class GregtechMetaTileEntity_BedrockMiningPlatformBase extends GT_MetaTileEntity_MultiBlockBase {
@@ -41,7 +46,7 @@ public abstract class GregtechMetaTileEntity_BedrockMiningPlatformBase extends G
private static final Block miningPipeTipBlock;
private final ArrayList<ChunkPosition> oreBlockPositions;
- protected double mProductionModifier = 100;
+ protected double mProductionModifier = 0;
private Block casingBlock;
private int casingMeta;
@@ -113,70 +118,46 @@ public abstract class GregtechMetaTileEntity_BedrockMiningPlatformBase extends G
public void saveNBTData(final NBTTagCompound aNBT) {
super.saveNBTData(aNBT);
aNBT.setDouble("mProductionModifier", mProductionModifier);
- for (int g = 0; g < 5; g++) {
- aNBT.setBoolean("isPickingPipes" + g, this.isPickingPipes[g]);
- }
}
public void loadNBTData(final NBTTagCompound aNBT) {
super.loadNBTData(aNBT);
this.mProductionModifier = aNBT.getDouble("mProductionModifier");
- for (int g = 0; g < 5; g++) {
- this.isPickingPipes[g] = aNBT.getBoolean("isPickingPipes" + g);
- }
}
public boolean checkRecipe(final ItemStack aStack) {
- this.setElectricityStats();
+ //this.setElectricityStats();
boolean[] didWork = new boolean[5];
-
- final int oldYHead = this.yHead[0];
- if (!this.checkPipesAndSetYHead() || !this.isEnergyEnough()) {
- this.stopMachine();
+
+ if (!this.tryConsumeDrillingFluid()) {
+ Logger.INFO("No drilling Fluid.");
return false;
}
- if (this.yHead[0] != oldYHead) {
- this.oreBlockPositions.clear();
+
+ if (MathUtils.isNumberEven((int) this.mProductionModifier)) {
+ if (!this.tryConsumePyrotheum()) {
+ Logger.INFO("No tryConsumePyrotheum Fluid.");
+ return false;
+ }
+ else {
+ mProductionModifier++;
+ }
}
-
- for (int g = 0; g < 5; g++) {
- if (this.isPickingPipes[g]) {
- if (this.tryPickPipe(g)) {
- this.mOutputItems = new ItemStack[] { GT_Utility.copyAmount(1L,
- new Object[] { GregtechMetaTileEntity_BedrockMiningPlatformBase.miningPipe }) };
- didWork[g] = true;
- continue;
- }
- this.isPickingPipes[g] = false;
- this.stopMachine();
- didWork[g] = false;
+ else {
+ if (!this.tryConsumeCryotheum()) {
+ Logger.INFO("No tryConsumeCryotheum Fluid.");
+ return false;
}
else {
- this.putMiningPipesFromInputsInController();
-
- if (!this.tryConsumeDrillingFluid()) {
- return false;
- }
-
- if (this.oreBlockPositions.isEmpty()) {
- // Hit bedrock Either retract pipe or Dig!
- if (!this.tryLowerPipe(g)) {
- // Mining Head is too high, we best retract.
- if (!mMiningHeads.isEmpty() && mMiningHeads.containsKey(g) && mMiningHeads.get(g).yPos >= 6) {
- for (int r = 0; r < 5; r++) {
- this.isPickingPipes[r] = true;
- }
- didWork[g] = this.isPickingPipes[g];
- }
- // Full Power!
- else {
- didWork[g] = true;
- }
- }
- }
+ mProductionModifier++;
}
}
+
+ for (int i = 0; i < 5; i++) {
+ process();
+ didWork[i] = true;
+ }
// Fail recipe handling if one pipe didn't handle properly, to try again
// next run.
@@ -186,7 +167,11 @@ public abstract class GregtechMetaTileEntity_BedrockMiningPlatformBase extends G
return false;
}
}
- // Logger.INFO("[Bedrock Miner] Success? [x]");
+
+ this.mEUt = 8000;
+ this.mMaxProgresstime = 1;
+ this.mEfficiencyIncrease = 10000;
+
return true;
}
@@ -228,13 +213,15 @@ public abstract class GregtechMetaTileEntity_BedrockMiningPlatformBase extends G
private void setElectricityStats() {
//this.mEfficiency = this.getCurrentEfficiency((ItemStack) null);
this.mEfficiencyIncrease = 10000;
- final int overclock = 1 << GT_Utility.getTier(this.getMaxInputVoltage()) - 1;
- this.mEUt = -12 * overclock * overclock;
+ final int overclock = 8 << GT_Utility.getTier(this.getMaxInputVoltage());
+ //this.mEUt = -12 * overclock * overclock;
+ Logger.INFO("Trying to set EU to "+(12 * overclock * overclock));
int mCombinedAvgTime = 0;
for (int g = 0; g < 5; g++) {
mCombinedAvgTime += (this.isPickingPipes[g] ? 80 : this.getBaseProgressTime()) / overclock;
}
- this.mMaxProgresstime = (mCombinedAvgTime / 5);
+ Logger.INFO("Trying to set Max Time to "+(mCombinedAvgTime));
+ //this.mMaxProgresstime = (mCombinedAvgTime / 5);
}
/*
@@ -282,16 +269,16 @@ public abstract class GregtechMetaTileEntity_BedrockMiningPlatformBase extends G
boolean g = (this.getBaseMetaTileEntity().getWorld().getTotalWorldTime() % 2 == 0);
consumed = (g ? tryConsumePyrotheum() : tryConsumeCryotheum());
if (consumed) {
- increaseProduction(g ? 2 : 1);
+ //increaseProduction(g ? 2 : 1);
}
else {
- lowerProduction(g ? 5 : 3);
+ //lowerProduction(g ? 5 : 3);
}
return consumed;
}
private boolean tryConsumePyrotheum() {
- return this.depleteInput(FluidUtils.getFluidStack("pyrotheum", 2));
+ return this.depleteInput(FluidUtils.getFluidStack("pyrotheum", 4));
}
private boolean tryConsumeCryotheum() {
@@ -382,11 +369,11 @@ public abstract class GregtechMetaTileEntity_BedrockMiningPlatformBase extends G
}
boolean didWork[] = new boolean[3];
- if (this.checkBlockAndMeta(this.xCenter[pipe], this.yHead[pipe] - 1, this.zCenter[pipe], Blocks.bedrock,
+ /*if (this.checkBlockAndMeta(this.xCenter[pipe], this.yHead[pipe] - 1, this.zCenter[pipe], Blocks.bedrock,
32767)) {
// Logger.INFO("[Bedrock Miner] Pipe "+pipe+" is at Bedrock.");
return false;
- }
+ }*/
didWork[0] = this.getBaseMetaTileEntity().getWorld().setBlock(this.xCenter[pipe], this.yHead[pipe] - 1,
this.zCenter[pipe], GregtechMetaTileEntity_BedrockMiningPlatformBase.miningPipeTipBlock);
if (didWork[0]) {
@@ -425,7 +412,72 @@ public abstract class GregtechMetaTileEntity_BedrockMiningPlatformBase extends G
public boolean checkMachine(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) {
this.updateCoordinates();
- for (int xOff = -1 + this.back.offsetX; xOff <= 1 + this.back.offsetX; ++xOff) {
+
+
+
+ int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
+ int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ;
+ int tAmount = 0;
+ if (!aBaseMetaTileEntity.getAirOffset(xDir, 0, zDir)) {
+ return false;
+ } else {
+
+ Block aCasing = Block.getBlockFromItem(getCasingBlockItem().getItem());
+
+ for (int i = -1; i < 2; ++i) {
+ for (int j = -1; j < 2; ++j) {
+ for (int h = -1; h < 2; ++h) {
+ if (h != 0 || (xDir + i != 0 || zDir + j != 0) && (i != 0 || j != 0)) {
+ IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i,
+ h, zDir + j);
+ Block aBlock = aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j);
+ int aMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j);
+
+ if (!this.addToMachineList(tTileEntity, 48)) {
+ if (aBlock != aCasing) {
+ Logger.INFO("Found Bad Casing");
+ return false;
+ }
+ if (aMeta != 3) {
+ Logger.INFO("Found Bad Meta");
+ return false;
+ }
+ }
+ ++tAmount;
+
+
+
+ /*if (!isValidBlockForStructure(tTileEntity, 48, true, aBlock, aMeta, sBlockCasings4, 0)) {
+ Logger.INFO("Bad centrifuge casing");
+ return false;
+ }*/
+
+ }
+ }
+ }
+ }
+ return tAmount >= 10;
+ }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /*for (int xOff = -1 + this.back.offsetX; xOff <= 1 + this.back.offsetX; ++xOff) {
for (int zOff = -1 + this.back.offsetZ; zOff <= 1 + this.back.offsetZ; ++zOff) {
if (xOff != 0 || zOff != 0) {
final Block tBlock = aBaseMetaTileEntity.getBlockOffset(xOff, 0, zOff);
@@ -436,7 +488,7 @@ public abstract class GregtechMetaTileEntity_BedrockMiningPlatformBase extends G
&& !this.addInputToMachineList(tTileEntity, this.casingTextureIndex)
&& !this.addOutputToMachineList(tTileEntity, this.casingTextureIndex)
&& !this.addEnergyInputToMachineList(tTileEntity, this.casingTextureIndex)) {
- Logger.INFO("[Bedrock Miner] Found bad blosck in Structure.");
+ Logger.INFO("[Bedrock Miner] Found bad block in Structure.");
if (tBlock != null) {
//Logger.INFO("[Bedrock Miner] Found "+(new ItemStack(tBlock, tBlock.getDamageValue(aBaseMetaTileEntity.getWorld(), xOff, 0, zOff))).getDisplayName()+", expected "+this.getCasingBlockItem().get(0L, new Object[0]).getDisplayName());
}
@@ -466,12 +518,12 @@ public abstract class GregtechMetaTileEntity_BedrockMiningPlatformBase extends G
}
}
Logger.INFO("[Bedrock Miner] Built.");
- return true;
+ return true;*/
}
private void updateCoordinates() {
this.xDrill = this.getBaseMetaTileEntity().getXCoord();
- this.yDrill = this.getBaseMetaTileEntity().getYCoord();
+ this.yDrill = this.getBaseMetaTileEntity().getYCoord()-1;
this.zDrill = this.getBaseMetaTileEntity().getZCoord();
this.back = ForgeDirection.getOrientation((int) this.getBaseMetaTileEntity().getBackFacing());
@@ -495,7 +547,7 @@ public abstract class GregtechMetaTileEntity_BedrockMiningPlatformBase extends G
private boolean checkPipesAndSetYHead() {
for (int g = 0; g < 5; g++) {
- this.yHead[g] = this.yDrill - 1;
+ this.yHead[g] = this.yDrill -5;
// Logger.INFO("[Bedrock Miner] Set yHead["+g+"] to
// "+this.yHead[g]+".");
while (this.checkBlockAndMeta(this.xCenter[g], this.yHead[g], this.zCenter[g],
@@ -504,7 +556,7 @@ public abstract class GregtechMetaTileEntity_BedrockMiningPlatformBase extends G
}
if (this.checkBlockAndMeta(this.xCenter[g], this.yHead[g], this.zCenter[g],
GregtechMetaTileEntity_BedrockMiningPlatformBase.miningPipeTipBlock, 32767)
- || ++this.yHead[g] == this.yDrill) {
+ || ++this.yHead[g] == this.yDrill || GT_Utility.isBlockAir(this.getBaseMetaTileEntity().getWorld(), this.xCenter[g], this.yHead[g], this.zCenter[g])) {
continue;
}
this.getBaseMetaTileEntity().getWorld().setBlock(this.xCenter[g], this.yHead[g], this.zCenter[g],
@@ -595,4 +647,288 @@ public abstract class GregtechMetaTileEntity_BedrockMiningPlatformBase extends G
miningPipeBlock = ModBlocks.blockFakeMiningPipe;
miningPipeTipBlock = ModBlocks.blockFakeMiningHead;
}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ private AutoMap<ItemStack> mOutputs;
+
+ public void process() {
+ ItemStack aOutput = generateOutputWithchance();
+ if (aOutput != null) {
+ this.addOutput(aOutput);
+ Logger.INFO("Mined some "+aOutput.getDisplayName());
+ }
+ this.updateSlots();
+ }
+
+ public ItemStack generateOutputWithchance() {
+ int aChance = MathUtils.randInt(0, 7500);
+ if (aChance < 100) {
+ return generateOutput();
+ }
+ else {
+ return null;
+ }
+ }
+
+ public ItemStack generateOutput() {
+ AutoMap<ItemStack> aData = generateOreForOutput();
+ int aMax = aData.size()-1;
+ return aData.get(MathUtils.randInt(0, aMax));
+ }
+
+ /**
+ * Here we generate valid ores and also a basic loot set
+ */
+
+ public AutoMap<ItemStack> generateOreForOutput() {
+
+ if (mOutputs != null) {
+ return mOutputs;
+ }
+
+ AutoMap<GT_Worldgen_GT_Ore_Layer> aOverWorldOres = MiningUtils.getOresForDim(0);
+ AutoMap<GT_Worldgen_GT_Ore_Layer> aNetherOres = MiningUtils.getOresForDim(-1);
+ AutoMap<GT_Worldgen_GT_Ore_Layer> aEndOres = MiningUtils.getOresForDim(1);
+
+ AutoMap<ItemStack> aTempMap = new AutoMap<ItemStack>();
+ Block tOreBlock = GregTech_API.sBlockOres1;
+ Logger.INFO("Ore Map contains "+aTempMap.size()+" values. [Initial]");
+
+ for (GT_Worldgen_GT_Ore_Layer layer : aOverWorldOres) {
+ if (layer.mEnabled) {
+ ItemStack aTempOreStack1 = ItemUtils.simpleMetaStack(tOreBlock, layer.mPrimaryMeta, 1);
+ ItemStack aTempOreStack2 = ItemUtils.simpleMetaStack(tOreBlock, layer.mSecondaryMeta, 1);
+ ItemStack aTempOreStack3 = ItemUtils.simpleMetaStack(tOreBlock, layer.mBetweenMeta, 1);
+ ItemStack aTempOreStack4 = ItemUtils.simpleMetaStack(tOreBlock, layer.mSporadicMeta, 1);
+ aTempMap.put(aTempOreStack1);
+ aTempMap.put(aTempOreStack2);
+ aTempMap.put(aTempOreStack3);
+ aTempMap.put(aTempOreStack4);
+ aTempMap.put(aTempOreStack1);
+ aTempMap.put(aTempOreStack2);
+ aTempMap.put(aTempOreStack3);
+ aTempMap.put(aTempOreStack4);
+ aTempMap.put(aTempOreStack1);
+ aTempMap.put(aTempOreStack2);
+ aTempMap.put(aTempOreStack3);
+ aTempMap.put(aTempOreStack4);
+ }
+ }
+ Logger.INFO("Ore Map contains "+aTempMap.size()+" values. [Overworld]");
+ for (GT_Worldgen_GT_Ore_Layer layer : aNetherOres) {
+ if (layer.mEnabled) {
+ ItemStack aTempOreStack1 = ItemUtils.simpleMetaStack(tOreBlock, layer.mPrimaryMeta, 1);
+ ItemStack aTempOreStack2 = ItemUtils.simpleMetaStack(tOreBlock, layer.mSecondaryMeta, 1);
+ ItemStack aTempOreStack3 = ItemUtils.simpleMetaStack(tOreBlock, layer.mBetweenMeta, 1);
+ ItemStack aTempOreStack4 = ItemUtils.simpleMetaStack(tOreBlock, layer.mSporadicMeta, 1);
+ aTempMap.put(aTempOreStack1);
+ aTempMap.put(aTempOreStack2);
+ aTempMap.put(aTempOreStack3);
+ aTempMap.put(aTempOreStack4);
+ aTempMap.put(aTempOreStack1);
+ aTempMap.put(aTempOreStack2);
+ aTempMap.put(aTempOreStack3);
+ aTempMap.put(aTempOreStack4);
+ }
+ }
+ Logger.INFO("Ore Map contains "+aTempMap.size()+" values. [Nether]");
+ for (GT_Worldgen_GT_Ore_Layer layer : aEndOres) {
+ if (layer.mEnabled) {
+ ItemStack aTempOreStack1 = ItemUtils.simpleMetaStack(tOreBlock, layer.mPrimaryMeta, 1);
+ ItemStack aTempOreStack2 = ItemUtils.simpleMetaStack(tOreBlock, layer.mSecondaryMeta, 1);
+ ItemStack aTempOreStack3 = ItemUtils.simpleMetaStack(tOreBlock, layer.mBetweenMeta, 1);
+ ItemStack aTempOreStack4 = ItemUtils.simpleMetaStack(tOreBlock, layer.mSporadicMeta, 1);
+ aTempMap.put(aTempOreStack1);
+ aTempMap.put(aTempOreStack2);
+ aTempMap.put(aTempOreStack3);
+ aTempMap.put(aTempOreStack4);
+ }
+ }
+ Logger.INFO("Ore Map contains "+aTempMap.size()+" values. [End]");
+
+ addOreTypeToMap(ELEMENT.getInstance().IRON, 200, aTempMap);
+ addOreTypeToMap(ELEMENT.getInstance().COPPER, 175, aTempMap);
+ addOreTypeToMap(ELEMENT.getInstance().TIN, 150, aTempMap);
+ addOreTypeToMap(ELEMENT.getInstance().GOLD, 150, aTempMap);
+ addOreTypeToMap(ELEMENT.getInstance().SILVER, 110, aTempMap);
+ addOreTypeToMap(ELEMENT.getInstance().NICKEL, 40, aTempMap);
+ addOreTypeToMap(ELEMENT.getInstance().ZINC, 40, aTempMap);
+ addOreTypeToMap(ELEMENT.getInstance().LEAD, 40, aTempMap);
+ addOreTypeToMap(ELEMENT.getInstance().ALUMINIUM, 30, aTempMap);
+ addOreTypeToMap(ELEMENT.getInstance().THORIUM, 20, aTempMap);
+ Logger.INFO("Ore Map contains "+aTempMap.size()+" values. [Extra Common Ores]");
+
+ AutoMap<Pair<String, Integer>> mMixedOreData = new AutoMap<Pair<String, Integer>>();
+ mMixedOreData.put(new Pair<String, Integer>("oreRuby", 30));
+ mMixedOreData.put(new Pair<String, Integer>("oreSapphire", 25));
+ mMixedOreData.put(new Pair<String, Integer>("oreEmerald", 25));
+ mMixedOreData.put(new Pair<String, Integer>("oreLapis", 40));
+ mMixedOreData.put(new Pair<String, Integer>("oreRedstone", 40));
+
+ if (LoadedMods.Thaumcraft || (OreDictionary.doesOreNameExist("oreAmber") && OreDictionary.doesOreNameExist("oreCinnabar"))) {
+ mMixedOreData.put(new Pair<String, Integer>("oreAmber", 20));
+ mMixedOreData.put(new Pair<String, Integer>("oreCinnabar", 20));
+ }
+ if (LoadedMods.Railcraft || OreDictionary.doesOreNameExist("oreSaltpeter")) {
+ mMixedOreData.put(new Pair<String, Integer>("oreSaltpeter", 10));
+ }
+ if (LoadedMods.IndustrialCraft2 || OreDictionary.doesOreNameExist("oreUranium")) {
+ mMixedOreData.put(new Pair<String, Integer>("oreUranium", 10));
+ }
+ if (OreDictionary.doesOreNameExist("oreSulfur")) {
+ mMixedOreData.put(new Pair<String, Integer>("oreSulfur", 15));
+ }
+ if (OreDictionary.doesOreNameExist("oreSilicon")) {
+ mMixedOreData.put(new Pair<String, Integer>("oreSilicon", 15));
+ }
+ if (OreDictionary.doesOreNameExist("oreApatite")) {
+ mMixedOreData.put(new Pair<String, Integer>("oreApatite", 25));
+ }
+
+ mMixedOreData.put(new Pair<String, Integer>("oreFirestone", 2));
+ mMixedOreData.put(new Pair<String, Integer>("oreBismuth", 20));
+ mMixedOreData.put(new Pair<String, Integer>("oreLithium", 20));
+ mMixedOreData.put(new Pair<String, Integer>("oreManganese", 20));
+ mMixedOreData.put(new Pair<String, Integer>("oreBeryllium", 20));
+ mMixedOreData.put(new Pair<String, Integer>("oreCoal", 75));
+ mMixedOreData.put(new Pair<String, Integer>("oreLignite", 75));
+ mMixedOreData.put(new Pair<String, Integer>("oreSalt", 15));
+ mMixedOreData.put(new Pair<String, Integer>("oreCalcite", 15));
+ mMixedOreData.put(new Pair<String, Integer>("oreBauxite", 20));
+ mMixedOreData.put(new Pair<String, Integer>("oreAlmandine", 15));
+ mMixedOreData.put(new Pair<String, Integer>("oreGraphite", 25));
+ mMixedOreData.put(new Pair<String, Integer>("oreGlauconite", 15));
+ mMixedOreData.put(new Pair<String, Integer>("orePyrolusite", 15));
+ mMixedOreData.put(new Pair<String, Integer>("oreGrossular", 15));
+ mMixedOreData.put(new Pair<String, Integer>("oreTantalite", 15));
+
+ for (Pair<String, Integer> g : mMixedOreData) {
+ for (int i=0; i<g.getValue();i++) {
+ aTempMap.put(ItemUtils.getItemStackOfAmountFromOreDict(g.getKey(), 1));
+ }
+ }
+ Logger.INFO("Ore Map contains "+aTempMap.size()+" values. [Extra Mixed Ores]");
+
+
+ addOreTypeToMap(ELEMENT.STANDALONE.RUNITE, 2, aTempMap);
+ addOreTypeToMap(ELEMENT.STANDALONE.GRANITE, 8, aTempMap);
+ Logger.INFO("Ore Map contains "+aTempMap.size()+" values. [OSRS Ores]");
+
+
+ AutoMap<Material> aMyOreMaterials = new AutoMap<Material>();
+ aMyOreMaterials.add(ORES.CROCROITE);
+ aMyOreMaterials.add(ORES.GEIKIELITE);
+ aMyOreMaterials.add(ORES.NICHROMITE);
+ aMyOreMaterials.add(ORES.TITANITE);
+ aMyOreMaterials.add(ORES.ZIMBABWEITE);
+ aMyOreMaterials.add(ORES.ZIRCONILITE);
+ aMyOreMaterials.add(ORES.GADOLINITE_CE);
+ aMyOreMaterials.add(ORES.GADOLINITE_Y);
+ aMyOreMaterials.add(ORES.LEPERSONNITE);
+ aMyOreMaterials.add(ORES.SAMARSKITE_Y);
+ aMyOreMaterials.add(ORES.SAMARSKITE_YB);
+ aMyOreMaterials.add(ORES.XENOTIME);
+ aMyOreMaterials.add(ORES.YTTRIAITE);
+ aMyOreMaterials.add(ORES.YTTRIALITE);
+ aMyOreMaterials.add(ORES.YTTROCERITE);
+ aMyOreMaterials.add(ORES.ZIRCON);
+ aMyOreMaterials.add(ORES.POLYCRASE);
+ aMyOreMaterials.add(ORES.ZIRCOPHYLLITE);
+ aMyOreMaterials.add(ORES.ZIRKELITE);
+ aMyOreMaterials.add(ORES.LANTHANITE_LA);
+ aMyOreMaterials.add(ORES.LANTHANITE_CE);
+ aMyOreMaterials.add(ORES.LANTHANITE_ND);
+ aMyOreMaterials.add(ORES.AGARDITE_Y);
+ aMyOreMaterials.add(ORES.AGARDITE_CD);
+ aMyOreMaterials.add(ORES.AGARDITE_LA);
+ aMyOreMaterials.add(ORES.AGARDITE_ND);
+ aMyOreMaterials.add(ORES.HIBONITE);
+ aMyOreMaterials.add(ORES.CERITE);
+ aMyOreMaterials.add(ORES.FLUORCAPHITE);
+ aMyOreMaterials.add(ORES.FLORENCITE);
+ aMyOreMaterials.add(ORES.CRYOLITE);
+ aMyOreMaterials.add(ORES.LAUTARITE);
+ aMyOreMaterials.add(ORES.LAFOSSAITE);
+ aMyOreMaterials.add(ORES.DEMICHELEITE_BR);
+ aMyOreMaterials.add(ORES.COMANCHEITE);
+ aMyOreMaterials.add(ORES.PERROUDITE);
+ aMyOreMaterials.add(ORES.HONEAITE);
+ aMyOreMaterials.add(ORES.ALBURNITE);
+ aMyOreMaterials.add(ORES.MIESSIITE);
+ aMyOreMaterials.add(ORES.KASHINITE);
+ aMyOreMaterials.add(ORES.IRARSITE);
+ aMyOreMaterials.add(ORES.RADIOBARITE);
+ aMyOreMaterials.add(ORES.DEEP_EARTH_REACTOR_FUEL_DEPOSIT);
+
+ for (Material aOreType : aMyOreMaterials) {
+ if (aOreType == ORES.DEEP_EARTH_REACTOR_FUEL_DEPOSIT || aOreType == ORES.RADIOBARITE) {
+ addOreTypeToMap(aOreType, 4, aTempMap);
+ }
+ else {
+ addOreTypeToMap(aOreType, 7, aTempMap);
+ }
+ }
+
+ //Cleanup Map
+ Logger.INFO("Ore Map contains "+aTempMap.size()+" values. [GT++]");
+ AutoMap<ItemStack> aCleanUp = new AutoMap<ItemStack>();
+ for (ItemStack verify : aTempMap) {
+ if (!ItemUtils.checkForInvalidItems(verify)) {
+ aCleanUp.put(verify);
+ }
+ }
+ Logger.INFO("Cleanup Map contains "+aCleanUp.size()+" values.");
+ for (ItemStack remove : aCleanUp) {
+ aTempMap.remove(remove);
+ }
+
+ //Generate Massive Map
+ AutoMap<ItemStack> aFinalMap = new AutoMap<ItemStack>();
+ for (ItemStack aTempItem : aTempMap) {
+ int aTempMulti = MathUtils.randInt(20, 50);
+ for (int i=0;i<aTempMulti;i++) {
+ aFinalMap.put(aTempItem.copy());
+ }
+ }
+ Logger.INFO("Final Ore Map contains "+aFinalMap.size()+" values.");
+ mOutputs = aFinalMap;
+ return mOutputs;
+ }
+
+
+ private static void addOreTypeToMap(Material aMaterial, int aAmount, AutoMap<ItemStack> aMap) {
+ for (int i=0; i<aAmount;i++) {
+ aMap.add(aMaterial.getOre(1));
+ }
+ }
+
+
+
+
+
+
+
} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricButcherKnife.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricButcherKnife.java
index ff4be9dd93..7aa7529817 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricButcherKnife.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricButcherKnife.java
@@ -13,6 +13,7 @@ import gregtech.common.items.behaviors.Behaviour_None;
import gregtech.common.tools.GT_Tool;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtTools;
import net.minecraft.block.Block;
+import net.minecraft.enchantment.Enchantment;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.monster.EntityIronGolem;
@@ -39,7 +40,7 @@ extends GT_Tool {
@Override
public int getToolDamagePerBlockBreak() {
- return 50;
+ return 100;
}
@Override
@@ -49,12 +50,12 @@ extends GT_Tool {
@Override
public int getToolDamagePerContainerCraft() {
- return 400;
+ return 100;
}
@Override
public int getToolDamagePerEntityAttack() {
- return 100;
+ return 200;
}
@Override
@@ -112,40 +113,9 @@ extends GT_Tool {
}
@Override
- public boolean isWeapon() {
- return true;
- }
-
- @Override
public boolean isMinableBlock(final Block aBlock, final byte aMetaData) {
final String tTool = aBlock.getHarvestTool(aMetaData);
- return (tTool != null) && (tTool.equals("sword") || tTool.equals("file"));
- }
-
-
- @Override
- public int convertBlockDrops(final List<ItemStack> aDrops, final ItemStack aStack, final EntityPlayer aPlayer, final Block aBlock, final int aX, final int aY, final int aZ, final byte aMetaData, final int aFortune, final boolean aSilkTouch, final BlockEvent.HarvestDropsEvent aEvent) {
- int rConversions = 0;
- /*GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe(null, true, 2147483647L, null, new ItemStack[]{new ItemStack(aBlock, 1, aMetaData)});
- if ((tRecipe == null) || (aBlock.hasTileEntity(aMetaData))) {
- for (final ItemStack tDrop : aDrops) {
- tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe(null, true, 2147483647L, null, new ItemStack[]{GT_Utility.copyAmount(1L, new Object[]{tDrop})});
- if (tRecipe != null) {
- final ItemStack tHammeringOutput = tRecipe.getOutput(0);
- if (tHammeringOutput != null) {
- rConversions += tDrop.stackSize;
- tDrop.stackSize *= tHammeringOutput.stackSize;
- tHammeringOutput.stackSize = tDrop.stackSize;
- GT_Utility.setStack(tDrop, tHammeringOutput);
- }
- }
- }
- } else {
- aDrops.clear();
- aDrops.add(tRecipe.getOutput(0));
- rConversions++;
- }*/
- return rConversions;
+ return (tTool != null) && (tTool.equals("sword") || tTool.equals("knife"));
}
@Override
@@ -193,5 +163,30 @@ extends GT_Tool {
public boolean isGrafter() {
return false;
}
+
+ @Override
+ public int getHurtResistanceTime(int aOriginalHurtResistance, Entity aEntity) {
+ return aOriginalHurtResistance * 2;
+ }
+
+ @Override
+ public boolean isWeapon() {
+ return true;
+ }
+
+ @Override
+ public boolean isMiningTool() {
+ return false;
+ }
+
+ @Override
+ public Enchantment[] getEnchantments(ItemStack aStack) {
+ return LOOTING_ENCHANTMENT;
+ }
+
+ @Override
+ public int[] getEnchantmentLevels(ItemStack aStack) {
+ return new int[]{(4 + GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mToolQuality) / 2};
+ }
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricLighter.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricLighter.java
index cf6f33cc36..36e1161e83 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricLighter.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricLighter.java
@@ -9,7 +9,6 @@ import gregtech.api.enums.Materials;
import gregtech.api.enums.Textures.ItemIcons;
import gregtech.api.interfaces.IIconContainer;
import gregtech.api.items.GT_MetaGenerated_Tool;
-import gregtech.common.items.behaviors.Behaviour_None;
import gregtech.common.tools.GT_Tool;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtTools;
import gtPlusPlus.xmod.gregtech.common.items.behaviours.Behaviour_Electric_Lighter;
@@ -23,7 +22,6 @@ import net.minecraft.stats.AchievementList;
import net.minecraft.util.ChatComponentText;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.IChatComponent;
-import net.minecraftforge.event.world.BlockEvent;
public class TOOL_Gregtech_ElectricLighter
extends GT_Tool {
@@ -119,36 +117,9 @@ extends GT_Tool {
@Override
public boolean isMinableBlock(final Block aBlock, final byte aMetaData) {
- final String tTool = aBlock.getHarvestTool(aMetaData);
- return (tTool != null) && (tTool.equals("sword") || tTool.equals("file"));
+ return false;
}
-
- @Override
- public int convertBlockDrops(final List<ItemStack> aDrops, final ItemStack aStack, final EntityPlayer aPlayer, final Block aBlock, final int aX, final int aY, final int aZ, final byte aMetaData, final int aFortune, final boolean aSilkTouch, final BlockEvent.HarvestDropsEvent aEvent) {
- int rConversions = 0;
- /*GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe(null, true, 2147483647L, null, new ItemStack[]{new ItemStack(aBlock, 1, aMetaData)});
- if ((tRecipe == null) || (aBlock.hasTileEntity(aMetaData))) {
- for (final ItemStack tDrop : aDrops) {
- tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe(null, true, 2147483647L, null, new ItemStack[]{GT_Utility.copyAmount(1L, new Object[]{tDrop})});
- if (tRecipe != null) {
- final ItemStack tHammeringOutput = tRecipe.getOutput(0);
- if (tHammeringOutput != null) {
- rConversions += tDrop.stackSize;
- tDrop.stackSize *= tHammeringOutput.stackSize;
- tHammeringOutput.stackSize = tDrop.stackSize;
- GT_Utility.setStack(tDrop, tHammeringOutput);
- }
- }
- }
- } else {
- aDrops.clear();
- aDrops.add(tRecipe.getOutput(0));
- rConversions++;
- }*/
- return rConversions;
- }
-
@Override
public ItemStack getBrokenItem(final ItemStack aStack) {
return null;
@@ -164,10 +135,7 @@ extends GT_Tool {
return !aIsToolHead
? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa
: Materials.Silver.mRGBa;
- }
-
-
-
+ }
@Override
public void onToolCrafted(final ItemStack aStack, final EntityPlayer aPlayer) {
@@ -182,12 +150,12 @@ extends GT_Tool {
@Override
public IChatComponent getDeathMessage(final EntityLivingBase aPlayer, final EntityLivingBase aEntity) {
- return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " has been Ground out of existence by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE);
+ return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " has been prodded out of existence by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE);
}
@Override
public void onStatsAddedToTool(final GT_MetaGenerated_Tool aItem, final int aID) {
- aItem.addItemBehavior(aID, new Behaviour_Electric_Lighter(null, 32000));
+ aItem.addItemBehavior(aID, new Behaviour_Electric_Lighter());
}
@Override
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Ore.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Ore.java
index 15627a827f..1cb999241a 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Ore.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Ore.java
@@ -107,7 +107,7 @@ public class RecipeGen_Ore extends RecipeGen_Base {
//If Fourth Output has no solid output, try the Fifth (If it exists)
if (!bonusB.hasSolidForm() && material.getComposites().size() >= 5 && material.getComposites().get(4) != null) {
bonusB = material.getComposites().get(4).getStackMaterial();
- //If Fifth Output has no solid output, default out to Chrome.
+ //If Fifth Output has no solid output, default out to Stone dust.
if (!bonusB.hasSolidForm()) {
allFailed = true;
bonusB = mStone;
@@ -127,11 +127,11 @@ public class RecipeGen_Ore extends RecipeGen_Base {
//Default out if it's made of fluids or some shit.
if (bonusA == null) {
- bonusA = tVoltageMultiplier <= 100 ? material : mStone;
+ bonusA = tVoltageMultiplier > 100 ? material : mStone;
}
//Default out if it's made of fluids or some shit.
if (allFailed || bonusB == null) {
- bonusB = tVoltageMultiplier <= 100 ? material : mStone;
+ bonusB = tVoltageMultiplier > 100 ? material : mStone;
}
AutoMap<Pair<Integer, Material>> componentMap = new AutoMap<Pair<Integer, Material>>();
diff --git a/src/Java/gtPlusPlus/xmod/thaumcraft/HANDLER_Thaumcraft.java b/src/Java/gtPlusPlus/xmod/thaumcraft/HANDLER_Thaumcraft.java
index 35e608b0ca..8cdfb2afb6 100644
--- a/src/Java/gtPlusPlus/xmod/thaumcraft/HANDLER_Thaumcraft.java
+++ b/src/Java/gtPlusPlus/xmod/thaumcraft/HANDLER_Thaumcraft.java
@@ -43,9 +43,9 @@ public class HANDLER_Thaumcraft {
//sThaumcraftCompat = (IThaumcraftCompat) GT_Utility.callConstructor("gtPlusPlus.xmod.thaumcraft.aspect.GTPP_AspectCompat", 0, null, GT_Values.D1, new Object[0]);
- sThaumcraftCompat = new GTPP_AspectCompat();
+ //sThaumcraftCompat = new GTPP_AspectCompat();
- if (!sItemsToGetAspects.isEmpty() && false) {
+ /*if (!sItemsToGetAspects.isEmpty() && false) {
for (Pair<ItemStack, GTPP_AspectStack[]> j : sItemsToGetAspects) {
if (j .getKey() != null && (j.getValue() != null && j.getValue().length > 0)) {
List<GTPP_AspectStack> list = Arrays.asList(j.getValue());
@@ -57,7 +57,7 @@ public class HANDLER_Thaumcraft {
}
}
}
- }
+ }*/
}
}