diff options
29 files changed, 250 insertions, 86 deletions
diff --git a/src/main/java/com/github/technus/tectech/TecTech.java b/src/main/java/com/github/technus/tectech/TecTech.java index 0e6088832c..b8abed2abf 100644 --- a/src/main/java/com/github/technus/tectech/TecTech.java +++ b/src/main/java/com/github/technus/tectech/TecTech.java @@ -4,9 +4,6 @@ import com.github.technus.tectech.auxiliary.Reference; import com.github.technus.tectech.auxiliary.TecTechConfig; import com.github.technus.tectech.loader.MainLoader; import com.github.technus.tectech.proxy.CommonProxy; -import com.github.technus.tectech.thing.block.QuantumGlass; -import com.github.technus.tectech.thing.casing.GT_Container_CasingsTT; -import com.github.technus.tectech.thing.item.DebugBuilder; import com.github.technus.tectech.thing.item.DebugContainer_EM; import com.github.technus.tectech.thing.machineTT; import cpw.mods.fml.common.Loader; diff --git a/src/main/java/com/github/technus/tectech/dataFramework/quantumDataPacket.java b/src/main/java/com/github/technus/tectech/dataFramework/quantumDataPacket.java index 7b14a8535e..78229bd6a1 100644 --- a/src/main/java/com/github/technus/tectech/dataFramework/quantumDataPacket.java +++ b/src/main/java/com/github/technus/tectech/dataFramework/quantumDataPacket.java @@ -1,7 +1,6 @@ package com.github.technus.tectech.dataFramework; import com.github.technus.tectech.vec3pos; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import net.minecraft.nbt.NBTTagCompound; import java.util.TreeSet; diff --git a/src/main/java/com/github/technus/tectech/loader/MainLoader.java b/src/main/java/com/github/technus/tectech/loader/MainLoader.java index e3000759b3..34a831147c 100644 --- a/src/main/java/com/github/technus/tectech/loader/MainLoader.java +++ b/src/main/java/com/github/technus/tectech/loader/MainLoader.java @@ -1,7 +1,7 @@ package com.github.technus.tectech.loader; import com.github.technus.tectech.TecTech; -import com.github.technus.tectech.thing.block.QuantumGlass; +import com.github.technus.tectech.thing.block.QuantumGlassBlock; import com.github.technus.tectech.thing.casing.GT_Container_CasingsTT; import com.github.technus.tectech.thing.item.DebugBuilder; import com.github.technus.tectech.thing.item.DebugContainer_EM; @@ -35,7 +35,7 @@ public class MainLoader { } public void registerThingsInTabs(){ - QuantumGlass.INSTANCE.setCreativeTab(mainTab); + QuantumGlassBlock.INSTANCE.setCreativeTab(mainTab); GT_Container_CasingsTT.sBlockCasingsTT.setCreativeTab(mainTab); DebugContainer_EM.INSTANCE.setCreativeTab(mainTab); DebugBuilder.INSTANCE.setCreativeTab(mainTab); diff --git a/src/main/java/com/github/technus/tectech/loader/ThingsLoader.java b/src/main/java/com/github/technus/tectech/loader/ThingsLoader.java index d08fbba709..c16172b11e 100644 --- a/src/main/java/com/github/technus/tectech/loader/ThingsLoader.java +++ b/src/main/java/com/github/technus/tectech/loader/ThingsLoader.java @@ -1,22 +1,15 @@ package com.github.technus.tectech.loader; -import com.github.technus.tectech.TecTech; -import com.github.technus.tectech.elementalMatter.classes.cElementalPrimitive; -import com.github.technus.tectech.elementalMatter.definitions.*; -import com.github.technus.tectech.thing.block.QuantumGlass; +import com.github.technus.tectech.thing.block.QuantumGlassBlock; import com.github.technus.tectech.thing.item.DebugBuilder; import com.github.technus.tectech.thing.item.DebugContainer_EM; -import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_Rack; -import com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_computer; -import com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_quantizer; -import com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_MultiblockBase_EM; /** * Created by danie_000 on 16.11.2016. */ public class ThingsLoader implements Runnable { public void run() { - QuantumGlass.run(); + QuantumGlassBlock.run(); DebugContainer_EM.run(); DebugBuilder.run(); } diff --git a/src/main/java/com/github/technus/tectech/thing/block/QuantumGlass.java b/src/main/java/com/github/technus/tectech/thing/block/QuantumGlassBlock.java index 39a8951d21..39b8d4bae8 100644 --- a/src/main/java/com/github/technus/tectech/thing/block/QuantumGlass.java +++ b/src/main/java/com/github/technus/tectech/thing/block/QuantumGlassBlock.java @@ -15,11 +15,11 @@ import static com.github.technus.tectech.auxiliary.Reference.MODID; /** * Created by danie_000 on 17.12.2016. */ -public final class QuantumGlass extends BlockBase { +public final class QuantumGlassBlock extends BlockBase { public static IIcon stuff; - public static QuantumGlass INSTANCE; + public static QuantumGlassBlock INSTANCE; - public QuantumGlass() { + public QuantumGlassBlock() { super(Material.iron); this.setBlockBounds(0, 0, 0, 1, 1, 1); setBlockName("quantumGlass"); @@ -83,7 +83,7 @@ public final class QuantumGlass extends BlockBase { } public static void run(){ - INSTANCE=new QuantumGlass(); - GameRegistry.registerBlock(INSTANCE, INSTANCE.getUnlocalizedName()); + INSTANCE=new QuantumGlassBlock(); + GameRegistry.registerBlock(INSTANCE,QuantumGlassItem.class,INSTANCE.getUnlocalizedName()); } } diff --git a/src/main/java/com/github/technus/tectech/thing/block/QuantumGlassItem.java b/src/main/java/com/github/technus/tectech/thing/block/QuantumGlassItem.java new file mode 100644 index 0000000000..45931cabc6 --- /dev/null +++ b/src/main/java/com/github/technus/tectech/thing/block/QuantumGlassItem.java @@ -0,0 +1,29 @@ +package com.github.technus.tectech.thing.block; + +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; + +import java.util.List; + +import static com.github.technus.tectech.CommonValues.tecMark; + +/** + * Created by Tec on 11.04.2017. + */ +public class QuantumGlassItem extends ItemBlock { + public static QuantumGlassItem INSTANCE; + + public QuantumGlassItem(Block b){ + super(b); + } + + @Override + public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { + aList.add(tecMark); + aList.add("Dense yet transparent"); + aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "Glassy & Classy"); + } +} diff --git a/src/main/java/com/github/technus/tectech/thing/block/QuantumGlassRender.java b/src/main/java/com/github/technus/tectech/thing/block/QuantumGlassRender.java index 6169f142b3..e6da9a499e 100644 --- a/src/main/java/com/github/technus/tectech/thing/block/QuantumGlassRender.java +++ b/src/main/java/com/github/technus/tectech/thing/block/QuantumGlassRender.java @@ -23,7 +23,7 @@ public final class QuantumGlassRender implements ISimpleBlockRenderingHandler { Tessellator tessellator = Tessellator.instance; //Get icons from custom register (useful for renderers and fluids) - IIcon side = QuantumGlass.stuff; + IIcon side = QuantumGlassBlock.stuff; tessellator.startDrawingQuads(); tessellator.setNormal(0.0F, -1.0F, 0.0F); renderer.renderFaceYNeg(block, 0.0D, 0.0D, 0.0D, side); @@ -61,46 +61,46 @@ public final class QuantumGlassRender implements ISimpleBlockRenderingHandler { tes.setNormal(0F, 1F, 0F); tes.setBrightness(15728880); tes.setColorOpaque_F(0F, 1F, 1F); - IIcon side = QuantumGlass.stuff; + IIcon side = QuantumGlassBlock.stuff; GL11.glDisable(GL11.GL_CULL_FACE); //South - if (world.getBlock(x, y, z + 1).getClass() != QuantumGlass.class) { + if (world.getBlock(x, y, z + 1).getClass() != QuantumGlassBlock.class) { tes.addVertexWithUV(x, y, z + 0.999, side.getMinU(), side.getMaxV()); //0.999 instead of 1 for fighting (textures overlapping) tes.addVertexWithUV(x, y + 1, z + 0.999, side.getMinU(), side.getMinV()); tes.addVertexWithUV(x + 1, y + 1, z + 0.999, side.getMaxU(), side.getMinV()); tes.addVertexWithUV(x + 1, y, z + 0.999, side.getMaxU(), side.getMaxV()); } //East - if (world.getBlock(x + 1, y, z).getClass() != QuantumGlass.class) { + if (world.getBlock(x + 1, y, z).getClass() != QuantumGlassBlock.class) { tes.addVertexWithUV(x + 0.999, y, z + 1, side.getMinU(), side.getMaxV()); tes.addVertexWithUV(x + 0.999, y + 1, z + 1, side.getMinU(), side.getMinV()); tes.addVertexWithUV(x + 0.999, y + 1, z, side.getMaxU(), side.getMinV()); tes.addVertexWithUV(x + 0.999, y, z, side.getMaxU(), side.getMaxV()); } //North - if (world.getBlock(x, y, z - 1).getClass() != QuantumGlass.class) { + if (world.getBlock(x, y, z - 1).getClass() != QuantumGlassBlock.class) { tes.addVertexWithUV(x + 1, y, z + 0.001, side.getMinU(), side.getMaxV()); tes.addVertexWithUV(x + 1, y + 1, z + 0.001, side.getMinU(), side.getMinV()); tes.addVertexWithUV(x, y + 1, z + 0.001, side.getMaxU(), side.getMinV()); tes.addVertexWithUV(x, y, z + 0.001, side.getMaxU(), side.getMaxV()); } //West - if (world.getBlock(x - 1, y, z).getClass() != QuantumGlass.class) { + if (world.getBlock(x - 1, y, z).getClass() != QuantumGlassBlock.class) { tes.addVertexWithUV(x + 0.001, y, z, side.getMinU(), side.getMaxV()); tes.addVertexWithUV(x + 0.001, y + 1, z, side.getMinU(), side.getMinV()); tes.addVertexWithUV(x + 0.001, y + 1, z + 1, side.getMaxU(), side.getMinV()); tes.addVertexWithUV(x + 0.001, y, z + 1, side.getMaxU(), side.getMaxV()); } //Top - if (world.getBlock(x, y + 1, z).getClass() != QuantumGlass.class) { + if (world.getBlock(x, y + 1, z).getClass() != QuantumGlassBlock.class) { tes.addVertexWithUV(x, y + 0.999, z + 1, side.getMinU(), side.getMaxV()); tes.addVertexWithUV(x, y + 0.999, z, side.getMinU(), side.getMinV()); tes.addVertexWithUV(x + 1, y + 0.999, z, side.getMaxU(), side.getMinV()); tes.addVertexWithUV(x + 1, y + 0.999, z + 1, side.getMaxU(), side.getMaxV()); } //Bottom - if (world.getBlock(x, y - 1, z).getClass() != QuantumGlass.class) { + if (world.getBlock(x, y - 1, z).getClass() != QuantumGlassBlock.class) { tes.addVertexWithUV(x, y + 0.001, z, side.getMinU(), side.getMaxV()); tes.addVertexWithUV(x, y + 0.001, z + 1, side.getMinU(), side.getMinV()); tes.addVertexWithUV(x + 1, y + 0.001, z + 1, side.getMaxU(), side.getMinV()); diff --git a/src/main/java/com/github/technus/tectech/thing/casing/GT_Item_CasingsTT.java b/src/main/java/com/github/technus/tectech/thing/casing/GT_Item_CasingsTT.java index e8e8fc8f17..bdc7b6e340 100644 --- a/src/main/java/com/github/technus/tectech/thing/casing/GT_Item_CasingsTT.java +++ b/src/main/java/com/github/technus/tectech/thing/casing/GT_Item_CasingsTT.java @@ -2,6 +2,13 @@ package com.github.technus.tectech.thing.casing; import gregtech.common.blocks.GT_Item_Casings_Abstract; import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; + +import java.util.List; + +import static com.github.technus.tectech.CommonValues.tecMark; /** * Created by danie_000 on 03.10.2016. @@ -11,4 +18,58 @@ public class GT_Item_CasingsTT public GT_Item_CasingsTT(Block par1) { super(par1); } + + @Override + public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { + aList.add(tecMark); + switch(aStack.getItemDamage()){ + case 0: + aList.add("Nice and clean casing."); + aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "Dust can break it!?"); + break; + case 1: + aList.add("Contains high bandwidth bus"); + aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "couple thousand qubits wide."); + break; + case 2: + aList.add("Air vent with a filter."); + aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "Perfectly muffled sound!"); + break; + case 3: + aList.add("Stops elemental things."); + aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "Radiation and emotions too..."); + break; + case 4: + aList.add("Creates a field that..."); + aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "can stop even force carriers."); + break; + case 5: + aList.add("Cooling and stabilization."); + aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "Like a comfortable bed."); + break; + case 6: + aList.add("Well it does things too..."); + aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "[use this coil]"); + break; + case 7: + aList.add("Remote connection."); + aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "Better use a stick."); + break; + case 8: + aList.add("C is no longer the limit."); + aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "Wibbly wobbly timey wimey stuff."); + break; + case 9: + aList.add("Reinforced accelerator tunnel."); + aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "Most advanced pipe ever."); + break; + case 10: + aList.add("Lazy man way of determining sides."); + aList.add(EnumChatFormatting.BLUE.toString() + "0, 1, 2, 3, 4, 5, 6?!"); + break; + default: + aList.add("Damn son where did you get that."); + aList.add(EnumChatFormatting.BLUE.toString() + "From outer space..."); + } + } } diff --git a/src/main/java/com/github/technus/tectech/thing/item/DebugBuilder.java b/src/main/java/com/github/technus/tectech/thing/item/DebugBuilder.java index cb085867e4..87df7d05ad 100644 --- a/src/main/java/com/github/technus/tectech/thing/item/DebugBuilder.java +++ b/src/main/java/com/github/technus/tectech/thing/item/DebugBuilder.java @@ -10,6 +10,7 @@ import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.EnumChatFormatting; import net.minecraft.world.World; import java.util.List; @@ -33,11 +34,10 @@ public class DebugBuilder extends Item { public boolean onItemUseFirst(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); if (aPlayer instanceof EntityPlayerMP) { - aStack.stackSize = 1; if (tTileEntity != null && tTileEntity instanceof IGregTechTileEntity) { IMetaTileEntity metaTE = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity(); if (metaTE != null && metaTE instanceof constructableTT) { - ((constructableTT) metaTE).construct(); + ((constructableTT) metaTE).construct(aStack.stackSize); return true; } } @@ -49,6 +49,7 @@ public class DebugBuilder extends Item { public void addInformation(ItemStack aStack, EntityPlayer ep, List aList, boolean boo) { aList.add(CommonValues.tecMark); aList.add("Constructs Multiblocks"); + aList.add(EnumChatFormatting.BLUE+"Quantity Matters"); } public static void run(){ diff --git a/src/main/java/com/github/technus/tectech/thing/item/DebugContainer_EM.java b/src/main/java/com/github/technus/tectech/thing/item/DebugContainer_EM.java index cefd90daec..aaf7272a49 100644 --- a/src/main/java/com/github/technus/tectech/thing/item/DebugContainer_EM.java +++ b/src/main/java/com/github/technus/tectech/thing/item/DebugContainer_EM.java @@ -1,7 +1,7 @@ package com.github.technus.tectech.thing.item; -import com.github.technus.tectech.TecTech; import com.github.technus.tectech.CommonValues; +import com.github.technus.tectech.TecTech; import com.github.technus.tectech.elementalMatter.classes.cElementalInstanceStackTree; import com.github.technus.tectech.elementalMatter.classes.tElementalException; import com.github.technus.tectech.elementalMatter.interfaces.iElementalInstanceContainer; @@ -15,6 +15,7 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.EnumChatFormatting; import net.minecraft.world.World; import java.util.Collections; @@ -76,7 +77,10 @@ public class DebugContainer_EM extends Item { if (tNBT!=null && tNBT.hasKey("info")) { aList.add("Contains:"); Collections.addAll(aList, cElementalInstanceStackTree.infoFromNBT(tNBT.getCompoundTag("info"))); - }else aList.add("Container for elemental matter"); + }else { + aList.add("Container for elemental matter"); + aList.add(EnumChatFormatting.BLUE+"Right click on elemental hatches"); + } } catch (Exception e) { aList.add("---Unexpected Termination---"); } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/constructableTT.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/constructableTT.java index 9e737e2aa4..79e61da747 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/constructableTT.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/constructableTT.java @@ -4,5 +4,5 @@ package com.github.technus.tectech.thing.metaTileEntity; * Created by Tec on 24.03.2017. */ public interface constructableTT { - void construct(); + void construct(int qty); } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_DataConnector.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_DataConnector.java index 8f34e15e1e..dbc2d94a2a 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_DataConnector.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_DataConnector.java @@ -1,7 +1,7 @@ package com.github.technus.tectech.thing.metaTileEntity.hatch; -import com.github.technus.tectech.dataFramework.quantumDataPacket; import com.github.technus.tectech.CommonValues; +import com.github.technus.tectech.dataFramework.quantumDataPacket; import com.github.technus.tectech.thing.machineTT; import com.github.technus.tectech.thing.metaTileEntity.pipe.iConnectsToDataPipe; import gregtech.api.enums.Dyes; diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_ElementalContainer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_ElementalContainer.java index 830d19ebfe..db3b4a77c5 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_ElementalContainer.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_ElementalContainer.java @@ -1,7 +1,7 @@ package com.github.technus.tectech.thing.metaTileEntity.hatch; -import com.github.technus.tectech.TecTech; import com.github.technus.tectech.CommonValues; +import com.github.technus.tectech.TecTech; import com.github.technus.tectech.elementalMatter.classes.cElementalInstanceStackTree; import com.github.technus.tectech.elementalMatter.classes.tElementalException; import com.github.technus.tectech.elementalMatter.interfaces.iElementalInstanceContainer; diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_MufflerElemental.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_MufflerElemental.java index 7b3a8bae26..5f0044bab9 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_MufflerElemental.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_MufflerElemental.java @@ -1,7 +1,7 @@ package com.github.technus.tectech.thing.metaTileEntity.hatch; -import com.github.technus.tectech.TecTech; import com.github.technus.tectech.CommonValues; +import com.github.technus.tectech.TecTech; import com.github.technus.tectech.thing.machineTT; import gregtech.api.enums.Dyes; import gregtech.api.enums.Textures; diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Rack.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Rack.java index ddd68639e4..190726a634 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Rack.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Rack.java @@ -127,16 +127,15 @@ public class GT_MetaTileEntity_Hatch_Rack extends GT_MetaTileEntity_Hatch implem @Override public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { if (aBaseMetaTileEntity.isClientSide()) return true; - if(aBaseMetaTileEntity.isActive()) - aPlayer.addChatComponentMessage(new ChatComponentText("It is still active...")); - else if(heat>0) - aPlayer.addChatComponentMessage(new ChatComponentText("It is still warm...")); - else + //if(aBaseMetaTileEntity.isActive()) + // aPlayer.addChatComponentMessage(new ChatComponentText("It is still active...")); + //else if(heat>0) + // aPlayer.addChatComponentMessage(new ChatComponentText("It is still warm...")); + //else aBaseMetaTileEntity.openGUI(aPlayer); return true; } - //TODO implement: glitches with OC, random component burning with OC private int getComputationPower(float overclock, float overvolt, boolean tickingComponents){ float computation=0,heat=0; for(int i=0;i<mInventory.length;i++){ diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Uncertainty.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Uncertainty.java index 042b2cf49d..b412326167 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Uncertainty.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Uncertainty.java @@ -1,7 +1,7 @@ package com.github.technus.tectech.thing.metaTileEntity.hatch; -import com.github.technus.tectech.TecTech; import com.github.technus.tectech.CommonValues; +import com.github.technus.tectech.TecTech; import com.github.technus.tectech.thing.machineTT; import com.github.technus.tectech.thing.metaTileEntity.hatch.gui.GT_Container_Uncertainty; import com.github.technus.tectech.thing.metaTileEntity.hatch.gui.GT_GUIContainer_Uncertainty; @@ -258,9 +258,10 @@ public class GT_MetaTileEntity_Hatch_Uncertainty extends GT_MetaTileEntity_Hatch return status = (byte) result; } - private void shift() {//TODO MAKE IT MORE EVIL - final int i = TecTech.Rnd.nextInt(16); - matrix[i] += (((matrix[i] & 1) == 0) ? 2 : -2) * TecTech.Rnd.nextInt(5); + private void shift() { + final int i = TecTech.Rnd.nextInt(16),j=TecTech.Rnd.nextInt(128); + matrix[i] += (((matrix[i] & 1) == 0) ? 2 : -2) * j>>5; + matrix[i] += j==0?1:0; if(matrix[i]<0) matrix[i]=0; else if (matrix[i]>1000) matrix[i]=999; } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_Container_Rack.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_Container_Rack.java index 5f1889c215..747c962ad8 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_Container_Rack.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_Container_Rack.java @@ -5,10 +5,11 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.gui.GT_ContainerMetaTile_Machine; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import net.minecraft.client.Minecraft; +import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.ICrafting; import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; import java.util.Iterator; @@ -60,6 +61,43 @@ public class GT_Container_Rack extends GT_ContainerMetaTile_Machine { this.heat = par2!=0; return; } - if(heat || mActive!=0) Minecraft.getMinecraft().displayGuiScreen(null); + //TODO TEST!!! + //if(heat || mActive!=0) Minecraft.getMinecraft().displayGuiScreen(null); + } + + @Override + public ItemStack slotClick(int aSlotIndex, int aMouseclick, int aShifthold, EntityPlayer aPlayer) { + if(heat || mActive!=0) return null; + return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); + } + + @Override + public ItemStack transferStackInSlot(EntityPlayer aPlayer, int aSlotIndex) { + if(heat || mActive!=0) return null; + return super.transferStackInSlot(aPlayer, aSlotIndex); + } + + @Override + public boolean canDragIntoSlot(Slot par1Slot) { + if(heat || mActive!=0) return false; + return super.canDragIntoSlot(par1Slot); + } + + @Override + public void putStacksInSlots(ItemStack[] par1ArrayOfItemStack) { + if(heat || mActive!=0) return; + super.putStacksInSlots(par1ArrayOfItemStack); + } + + @Override + protected boolean mergeItemStack(ItemStack aStack, int aStartIndex, int aSlotCount, boolean par4) { + if(heat || mActive!=0) return false; + return super.mergeItemStack(aStack, aStartIndex, aSlotCount, par4); + } + + @Override + public void putStackInSlot(int par1, ItemStack par2ItemStack) { + if(heat || mActive!=0) return; + super.putStackInSlot(par1, par2ItemStack); } } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_Rack.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_Rack.java index c5aa1cf8a3..d232cfa80d 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_Rack.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_Rack.java @@ -24,5 +24,11 @@ public class GT_GUIContainer_Rack extends GT_GUIContainerMetaTile_Machine { int x = (this.width - this.xSize) / 2; int y = (this.height - this.ySize) / 2; this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); + if (this.mContainer != null) { + if(((GT_Container_Rack)mContainer).mActive==1) + drawTexturedModalRect(x + 151, y + 23, 183, 23, 18, 18); + if(((GT_Container_Rack)mContainer |
