diff options
Diffstat (limited to 'src')
9 files changed, 170 insertions, 305 deletions
diff --git a/src/Java/gtPlusPlus/core/client/renderer/RenderGiantChicken.java b/src/Java/gtPlusPlus/core/client/renderer/RenderGiantChicken.java index d3c1e852d9..59621ef830 100644 --- a/src/Java/gtPlusPlus/core/client/renderer/RenderGiantChicken.java +++ b/src/Java/gtPlusPlus/core/client/renderer/RenderGiantChicken.java @@ -4,13 +4,9 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.RenderChicken; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLiving; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.util.MathHelper; +import net.minecraft.entity.passive.EntityChicken; import net.minecraft.util.ResourceLocation; -import gtPlusPlus.core.entity.monster.EntityGiantChickenBase; import gtPlusPlus.core.util.reflect.ReflectionUtils; @SideOnly(Side.CLIENT) @@ -37,80 +33,11 @@ public class RenderGiantChicken extends RenderChicken { } /** - * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then - * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic - * (Render<T extends Entity) and this method has signature public void func_76986_a(T entity, double d, double d1, - * double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that. - */ - public void doRender(EntityGiantChickenBase p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_) - { - this.doRender((EntityLiving)p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_); - } - - /** * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture. */ - protected ResourceLocation getEntityTexture(EntityGiantChickenBase p_110775_1_) + @Override + protected ResourceLocation getEntityTexture(EntityChicken p_110775_1_) { return chickenTexturesEx; } - - /** - * Defines what float the third param in setRotationAngles of ModelBase is - */ - protected float handleRotationFloat(EntityGiantChickenBase p_77044_1_, float p_77044_2_) - { - float f1 = p_77044_1_.field_70888_h + (p_77044_1_.field_70886_e - p_77044_1_.field_70888_h) * p_77044_2_; - float f2 = p_77044_1_.field_70884_g + (p_77044_1_.destPos - p_77044_1_.field_70884_g) * p_77044_2_; - return (MathHelper.sin(f1) + 1.0F) * f2; - } - - /** - * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then - * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic - * (Render<T extends Entity) and this method has signature public void func_76986_a(T entity, double d, double d1, - * double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that. - */ - public void doRender(EntityLiving p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_) - { - this.doRender((EntityGiantChickenBase)p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_); - } - - /** - * Defines what float the third param in setRotationAngles of ModelBase is - */ - protected float handleRotationFloat(EntityLivingBase p_77044_1_, float p_77044_2_) - { - return this.handleRotationFloat((EntityGiantChickenBase)p_77044_1_, p_77044_2_); - } - - /** - * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then - * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic - * (Render<T extends Entity) and this method has signature public void func_76986_a(T entity, double d, double d1, - * double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that. - */ - public void doRender(EntityLivingBase p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_) - { - this.doRender((EntityGiantChickenBase)p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_); - } - - /** - * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture. - */ - protected ResourceLocation getEntityTexture(Entity p_110775_1_) - { - return this.getEntityTexture((EntityGiantChickenBase)p_110775_1_); - } - - /** - * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then - * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic - * (Render<T extends Entity) and this method has signature public void func_76986_a(T entity, double d, double d1, - * double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that. - */ - public void doRender(Entity p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_) - { - this.doRender((EntityGiantChickenBase)p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_); - } }
\ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/entity/monster/EntityStaballoyConstruct.java b/src/Java/gtPlusPlus/core/entity/monster/EntityStaballoyConstruct.java index 385c3f4441..ff632fe283 100644 --- a/src/Java/gtPlusPlus/core/entity/monster/EntityStaballoyConstruct.java +++ b/src/Java/gtPlusPlus/core/entity/monster/EntityStaballoyConstruct.java @@ -30,11 +30,11 @@ public class EntityStaballoyConstruct extends EntityIronGolem { /* * Determines whether or not the entity is in a fluid at all. */ - private volatile boolean inFluid = false; - private volatile boolean mReflectFirstUpdate = true; - private volatile boolean isReadyToExplode = false; - private volatile int fuse = 60; - private volatile int attackTimer; + private boolean inFluid = false; + private boolean mReflectFirstUpdate = true; + private boolean isReadyToExplode = false; + private int fuse = 60; + private int attackTimer; public EntityStaballoyConstruct(World world) { super(world); @@ -256,7 +256,7 @@ public class EntityStaballoyConstruct extends EntityIronGolem { @Override public void setPlayerCreated(boolean p_70849_1_) { - + } /** @@ -289,83 +289,101 @@ public class EntityStaballoyConstruct extends EntityIronGolem { this.isImmuneToFire = true; } - if (this.getHealth() <= (this.getMaxHealth()*MathUtils.randDouble(0.02, 0.15))){ - float r = MathUtils.randFloat(0, 1); - if (r <= 0.1){ - this.isReadyToExplode = true; + if (!this.worldObj.isRemote) { + final float hp = getHealth(); + final float modifier = MathUtils.randInt(5,10)/100F; + final float amountToExplode = (hp*modifier); + + if (hp <= amountToExplode && !isReadyToExplode){ + if (this.ticksExisted >= 50) { + //Logger.INFO("Construct has low hp, trying to enable explosions. HP: "+this.getHealth()+", Max: "+this.getMaxHealth()+", Mod: "+modifier); + //Logger.INFO("Construct required HP to be <= "+amountToExplode); + float r = MathUtils.randFloat(0, 10); + if (r <= 0.1){ + this.isReadyToExplode = true; + //Logger.INFO("Construct can now explode."); + } + } } - } + //Handle Exploding + else if (hp <= amountToExplode && isReadyToExplode){ + //Logger.INFO("Trying to explode. ["+this.fuse+"]"); + if (this.fuse-- <= 0){ + //Logger.INFO("Fuse has run out."); + this.setDead(); + if (!this.worldObj.isRemote) + { + this.explode(); + } + } + else { + //Logger.INFO("Ticking fuse and spawning particles."); - //Handle Exploding - if (isReadyToExplode){ - if (this.fuse-- <= 0){ - this.setDead(); + int maxFuse = 60; + int fuseUsed = maxFuse-this.fuse; + float var2 = (float) (fuseUsed * 0.1); - if (!this.worldObj.isRemote) - { - this.explode(); - } - } - else { - - int maxFuse = 60; - int fuseUsed = maxFuse-this.fuse; - float var2 = (float) (fuseUsed * 0.1); - - this.setSize(1.4F+(var2/2), 2.9F+(var2/2)); - - float r = MathUtils.randFloat(0, 1); - int r2 = MathUtils.randInt(5, 15); - for (int o=0;o<r2;o++){ - if (r <= 0.3){ - this.worldObj.spawnParticle("smoke", 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.setSize(1.4F+(var2/2), 2.9F+(var2/2)); - } - else if (r <= 0.6){ - 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); + float r = MathUtils.randFloat(0, 1); + int r2 = MathUtils.randInt(5, 15); + for (int o=0;o<r2;o++){ + if (r <= 0.3){ + this.worldObj.spawnParticle("smoke", this.posX+MathUtils.randDouble(-2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); - } - if (r <= 0.3){ - this.worldObj.spawnParticle("cloud", this.posX+MathUtils.randDouble(-2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); + } + else if (r <= 0.6){ + 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); - } - else if (r <= 0.7){ - 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); + } + if (r <= 0.3){ + this.worldObj.spawnParticle("cloud", this.posX+MathUtils.randDouble(-2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); - } - if (r <= 0.2){ - this.worldObj.spawnParticle("explode", this.posX+MathUtils.randDouble(-2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); + } + else if (r <= 0.7){ + 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); - } - else if (r <= 0.5){ - this.worldObj.spawnParticle("largeexplode", this.posX+MathUtils.randDouble(-2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); + } + if (r <= 0.2){ + this.worldObj.spawnParticle("explode", this.posX+MathUtils.randDouble(-2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); - } - else if (r <= 0.7){ - this.worldObj.spawnParticle("hugeexplosion", this.posX+MathUtils.randDouble(-2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); + } + else if (r <= 0.5){ + this.worldObj.spawnParticle("largeexplode", this.posX+MathUtils.randDouble(-2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); + + } + else if (r <= 0.7){ + this.worldObj.spawnParticle("hugeexplosion", this.posX+MathUtils.randDouble(-2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); + } } - } - - } - } - //Get a private field from a super class if it exists. - try { - if (ReflectionUtils.getField(Class.forName("net.minecraft.entity.Entity"), "firstUpdate") != null && mReflectFirstUpdate == true){ - Field x = ReflectionUtils.getField(Class.forName("net.minecraft.entity.Entity"), "firstUpdate"); - try { - this.mReflectFirstUpdate = (boolean) x.get(this); - Logger.REFLECTION("Successfully got 'firstUpdate' variable state via reflection."); + } + } + else { + + } + + //Get a private field from a super class if it exists. + try { + if (mFirstUpdateField == null) { + mFirstUpdateField = ReflectionUtils.getField(Class.forName("net.minecraft.entity.Entity"), "firstUpdate"); + } + if (mFirstUpdateField != null && mReflectFirstUpdate == true){ + try { + this.mReflectFirstUpdate = (boolean) mFirstUpdateField.get(this); + } + catch (IllegalArgumentException | IllegalAccessException e) {} } - catch (IllegalArgumentException | IllegalAccessException e) {} } + catch (NoSuchFieldException | ClassNotFoundException e) {} } - catch (NoSuchFieldException | ClassNotFoundException e) {} super.onEntityUpdate(); } + private Field mFirstUpdateField; + @Override public int getMaxSpawnedInChunk() { return 1; @@ -483,43 +501,45 @@ public class EntityStaballoyConstruct extends EntityIronGolem { /* float f = 12.0F; this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, f, true);*/ - final float f = 6.5F; - ExplosionHandler explode = new ExplosionHandler(); - explode.createExplosion(this.worldObj, this, this.posX, this.posY, this.posZ, f, true, true); - - float r = MathUtils.randFloat(0, 1); - int r2 = MathUtils.randInt(20, 40); - for (int o=0;o<r2;o++){ - if (r <= 0.3){ - this.worldObj.spawnParticle("smoke", this.posX+MathUtils.randDouble(-4, 4), this.posY+MathUtils.randDouble(0, 3), this.posZ+MathUtils.randDouble(-4, 4), 0.0D, 0.0D, 0.0D); + if (!this.worldObj.isRemote) { + final float f = 6.5F; + ExplosionHandler explode = new ExplosionHandler(); + explode.createExplosion(this.worldObj, this, this.posX, this.posY, this.posZ, f, true, true); - } - else if (r <= 0.6){ - this.worldObj.spawnParticle("largesmoke", this.posX+MathUtils.randDouble(-4, 4), this.posY+MathUtils.randDouble(-4, 4), this.posZ+MathUtils.randDouble(-4, 4), 0.0D, 0.0D, 0.0D); + float r = MathUtils.randFloat(0, 1); + int r2 = MathUtils.randInt(20, 40); + for (int o=0;o<r2;o++){ + if (r <= 0.3){ + this.worldObj.spawnParticle("smoke", this.posX+MathUtils.randDouble(-4, 4), this.posY+MathUtils.randDouble(0, 3), this.posZ+MathUtils.randDouble(-4, 4), 0.0D, 0.0D, 0.0D); - } - if (r <= 0.3){ - this.worldObj.spawnParticle("cloud", this.posX+MathUtils.randDouble(-4, 4), this.posY+MathUtils.randDouble(-4, 4), this.posZ+MathUtils.randDouble(-4, 4), 0.0D, 0.0D, 0.0D); + } + else if (r <= 0.6){ + this.worldObj.spawnParticle("largesmoke", this.posX+MathUtils.randDouble(-4, 4), this.posY+MathUtils.randDouble(-4, 4), this.posZ+MathUtils.randDouble(-4, 4), 0.0D, 0.0D, 0.0D); - } - else if (r <= 0.7){ - this.worldObj.spawnParticle("flame", this.posX+MathUtils.randDouble(-4, 4), this.posY+MathUtils.randDouble(-4, 4), this.posZ+MathUtils.randDouble(-4, 4), 0.0D, 0.0D, 0.0D); + } + if (r <= 0.3){ + this.worldObj.spawnParticle("cloud", this.posX+MathUtils.randDouble(-4, 4), this.posY+MathUtils.randDouble(-4, 4), this.posZ+MathUtils.randDouble(-4, 4), 0.0D, 0.0D, 0.0D); - } - if (r <= 0.2){ - this.worldObj.spawnParticle("explode", this.posX+MathUtils.randDouble(-4, 4), this.posY+MathUtils.randDouble(-4, 4), this.posZ+MathUtils.randDouble(-4, 4), 0.0D, 0.0D, 0.0D); + } + else if (r <= 0.7){ + this.worldObj.spawnParticle("flame", this.posX+MathUtils.randDouble(-4, 4), this.posY+MathUtils.randDouble(-4, 4), this.posZ+MathUtils.randDouble(-4, 4), 0.0D, 0.0D, 0.0D); - } - else if (r <= 0.5){ - this.worldObj.spawnParticle("largeexplode", this.posX+MathUtils.randDouble(-4, 4), this.posY+MathUtils.randDouble(-4, 4), this.posZ+MathUtils.randDouble(-4, 4), 0.0D, 0.0D, 0.0D); + } + if (r <= 0.2){ + this.worldObj.spawnParticle("explode", this.posX+MathUtils.randDouble(-4, 4), this.posY+MathUtils.randDouble(-4, 4), this.posZ+MathUtils.randDouble(-4, 4), 0.0D, 0.0D, 0.0D); - } - else if (r <= 0.7){ - this.worldObj.spawnParticle("hugeexplosion", this.posX+MathUtils.randDouble(-4, 4), this.posY+MathUtils.randDouble(-4, 4), this.posZ+MathUtils.randDouble(-4, 4), 0.0D, 0.0D, 0.0D); + } + else if (r <= 0.5){ + this.worldObj.spawnParticle("largeexplode", this.posX+MathUtils.randDouble(-4, 4), this.posY+MathUtils.randDouble(-4, 4), this.posZ+MathUtils.randDouble(-4, 4), 0.0D, 0.0D, 0.0D); + + } + else if (r <= 0.7){ + this.worldObj.spawnParticle("hugeexplosion", this.posX+MathUtils.randDouble(-4, 4), this.posY+MathUtils.randDouble(-4, 4), this.posZ+MathUtils.randDouble(-4, 4), 0.0D, 0.0D, 0.0D); + } } } - + } @Override diff --git a/src/Java/gtPlusPlus/core/handler/COMPAT_HANDLER.java b/src/Java/gtPlusPlus/core/handler/COMPAT_HANDLER.java index efbb4add7e..1d4ebaaa0c 100644 --- a/src/Java/gtPlusPlus/core/handler/COMPAT_HANDLER.java +++ b/src/Java/gtPlusPlus/core/handler/COMPAT_HANDLER.java @@ -115,6 +115,7 @@ public class COMPAT_HANDLER { GregtechBufferDynamos.run(); GregtechAmazonWarehouse.run(); GregtechIndustrialCryogenicFreezer.run(); + GregtechThaumcraftDevices.run(); //New Horizons Content NewHorizonsAccelerator.run(); diff --git a/src/Java/gtPlusPlus/core/util/math/MathUtils.java b/src/Java/gtPlusPlus/core/util/math/MathUtils.java index 16e7f665ea..cda463ff10 100644 --- a/src/Java/gtPlusPlus/core/util/math/MathUtils.java +++ b/src/Java/gtPlusPlus/core/util/math/MathUtils.java @@ -365,13 +365,13 @@ public class MathUtils { } public static int getRandomFromArray(int[] mValues) { - int[] mLargeChanceArray = new int[mValues.length*1000]; + int[] mLargeChanceArray = new int[(mValues.length-1)*1000]; int mValueSelection; for (int g = 0; g < mLargeChanceArray.length; g++) { - mValueSelection = randInt(0, mValues.length); + mValueSelection = randInt(0, mValues.length-1); mLargeChanceArray[g] = mValues[mValueSelection]; } - return mLargeChanceArray[randInt(0, mLargeChanceArray.length)]; + return mLargeChanceArray[randInt(0, mLargeChanceArray.length-1)]; } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java index f223539ecc..81b40cc301 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java @@ -338,7 +338,9 @@ public enum GregtechItemList implements GregtechItemContainer { FusionComputer_UV2, Casing_Fusion_External, Casing_Fusion_Internal, //Crate Box - CrateStorage, + CrateStorage, + + Thaumcraft_Researcher, ; diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntityThaumcraftResearcher.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntityThaumcraftResearcher.java index 0d5d9f2738..b7c31e8514 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntityThaumcraftResearcher.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntityThaumcraftResearcher.java @@ -3,7 +3,6 @@ package gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; @@ -11,7 +10,6 @@ import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_Utility; import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.minecraft.gregtech.PollutionUtils; import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMetaTileEntity; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; @@ -55,52 +53,52 @@ public class GregtechMetaTileEntityThaumcraftResearcher extends GregtechMetaTile public ITexture[] getFront(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Screen_2)}; + return new ITexture[]{getSides(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Metal_Grate_A)}; } public ITexture[] getBack(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; + return new ITexture[]{getSides(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Metal_Grate_B)}; } public ITexture[] getBottom(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; + return new ITexture[]{getSides(aColor)[0]}; } public ITexture[] getTop(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; + return new ITexture[]{getSides(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Dimensional_Blue)}; } public ITexture[] getSides(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; + return new ITexture[]{new GT_RenderedTexture(TexturesGtBlock.Casing_Material_RedSteel)}; } public ITexture[] getFrontActive(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Screen_2)}; - } + return getFront(aColor); + } public ITexture[] getBackActive(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; - } + return getBack(aColor); + } public ITexture[] getBottomActive(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; + return getBottom(aColor); } public ITexture[] getTopActive(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; + return new ITexture[]{getSides(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Dimensional_Orange)}; } public ITexture[] getSidesActive(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; + return getSides(aColor); } @Override @@ -120,44 +118,22 @@ public class GregtechMetaTileEntityThaumcraftResearcher extends GregtechMetaTile @Override public boolean isEnetInput() {return true;} @Override public boolean isEnetOutput() {return false;} @Override public boolean isInputFacing(final byte aSide) {return aSide!=this.getBaseMetaTileEntity().getFrontFacing();} - @Override public boolean isOutputFacing(final byte aSide) {return aSide==this.getBaseMetaTileEntity().getFrontFacing();} + @Override public boolean isOutputFacing(final byte aSide) {return aSide==this.getBaseMetaTileEntity().getBackFacing();} @Override public boolean isTeleporterCompatible() {return false;} @Override public long getMinimumStoredEU() {return 0;} - @Override public long maxEUStore() {return 0;} - - @Override - public int getCapacity() { - return 0; - } - - @Override - public long maxEUInput() { - return 0; - } - - @Override - public long maxEUOutput() { - return 0; - } - - @Override - public long maxAmperesIn() { - return 0; - } - - @Override - public long maxAmperesOut() { - return 0; - } + @Override public long maxEUStore() {return 512000;} @Override public int rechargerSlotStartIndex() {return 0;} @Override public int dechargerSlotStartIndex() {return 0;} @Override public int rechargerSlotCount() {return 0;} @Override public int dechargerSlotCount() {return 0;} - @Override public int getProgresstime() {return (int)this.getBaseMetaTileEntity().getUniversalEnergyStored();} - @Override public int maxProgresstime() {return (int)this.getBaseMetaTileEntity().getUniversalEnergyCapacity();} @Override public boolean isAccessAllowed(final EntityPlayer aPlayer) {return true;} @Override + public int getCapacity() { + return 128000; + } + + @Override public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) { if (aBaseMetaTileEntity.isClientSide()) { @@ -168,23 +144,14 @@ public class GregtechMetaTileEntityThaumcraftResearcher extends GregtechMetaTile @Override public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { - return false; + return aSide==this.getBaseMetaTileEntity().getBackFacing(); } @Override public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { - return false; - } - - public int getCurrentChunkPollution(){ - return getCurrentChunkPollution(this.getBaseMetaTileEntity()); - } - - public int getCurrentChunkPollution(IGregTechTileEntity aBaseMetaTileEntity){ - return PollutionUtils.getPollution(aBaseMetaTileEntity); + return true; } - @Override public String[] getInfoData() { return new String[] { @@ -198,75 +165,8 @@ public class GregtechMetaTileEntityThaumcraftResearcher extends GregtechMetaTile } @Override - public int[] getAccessibleSlotsFromSide(final int p_94128_1_) { - return new int[] {}; - } - - @Override - public boolean canInsertItem(final int p_102007_1_, final ItemStack p_102007_2_, final int p_102007_3_) { - return false; - } - - @Override - public boolean canExtractItem(final int p_102008_1_, final ItemStack p_102008_2_, final int p_102008_3_) { - return false; - } - - @Override public int getSizeInventory() { - return 0; - } - - @Override - public ItemStack getStackInSlot(final int p_70301_1_) { - return null; - } - - @Override - public ItemStack decrStackSize(final int p_70298_1_, final int p_70298_2_) { - return null; - } - - @Override - public ItemStack getStackInSlotOnClosing(final int p_70304_1_) { - return null; - } - - @Override - public void setInventorySlotContents(final int p_70299_1_, final ItemStack p_70299_2_) { - } - - @Override - public String getInventoryName() { - return null; - } - - @Override - public boolean hasCustomInventoryName() { - return false; - } - - @Override - public int getInventoryStackLimit() { - return 0; - } - - @Override - public boolean isUseableByPlayer(final EntityPlayer p_70300_1_) { - return false; - } - - @Override - public void openInventory() { - } - - @Override - public void closeInventory() { - } - - @Override - public boolean isItemValidForSlot(final int p_94041_1_, final ItemStack p_94041_2_) { - return false; + return 2; } @Override @@ -296,8 +196,6 @@ public class GregtechMetaTileEntityThaumcraftResearcher extends GregtechMetaTile super.onFirstTick(aBaseMetaTileEntity); } - - @Override public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) { super.onPostTick(aBaseMetaTileEntity, aTick); diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechPollutionDevices.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechPollutionDevices.java index 4270450201..3741955e7b 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechPollutionDevices.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechPollutionDevices.java @@ -1,12 +1,5 @@ package gtPlusPlus.xmod.gregtech.registration.gregtech; -import static gtPlusPlus.core.recipe.common.CI.bitsd; - -import gregtech.api.enums.ItemList; -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.util.GT_ModHandler; - import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.recipe.common.CI; diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechThaumcraftDevices.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechThaumcraftDevices.java new file mode 100644 index 0000000000..398d2caf01 --- /dev/null +++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechThaumcraftDevices.java @@ -0,0 +1,26 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GregtechMetaPollutionCreator; + +public class GregtechThaumcraftDevices { + + public static void run() { + if (LoadedMods.Gregtech && LoadedMods.Thaumcraft) { + Logger.INFO("Gregtech5u Content | Registering Thaumcraft content."); + run1(); + } + } + + private static void run1() { + //956-960 + GregtechItemList.Thaumcraft_Researcher.set(new GregtechMetaPollutionCreator(956, "thaumcraft.gtpp.machine.01", + "Arcane Researcher", 5, "Thinking for you.", 0).getStackForm(1L)); + + + + } + +} diff --git a/src/Java/gtPlusPlus/xmod/thaumcraft/util/ThaumcraftUtils.java b/src/Java/gtPlusPlus/xmod/thaumcraft/util/ThaumcraftUtils.java index 399604b93b..2f5400e5f2 100644 --- a/src/Java/gtPlusPlus/xmod/thaumcraft/util/ThaumcraftUtils.java +++ b/src/Java/gtPlusPlus/xmod/thaumcraft/util/ThaumcraftUtils.java @@ -31,8 +31,6 @@ import thaumcraft.api.aspects.Aspect; import thaumcraft.api.aspects.AspectList; import thaumcraft.api.crafting.*; import thaumcraft.api.research.*; -import thaumcraft.common.Thaumcraft; -import thaumcraft.common.items.ItemResearchNotes; import thaumcraft.common.lib.research.ResearchManager; import thaumcraft.common.lib.research.ResearchNoteData; import thaumcraft.common.lib.utils.HexUtils; |