diff --git a/build.gradle b/build.gradle index 8bcef5a..691af07 100644 --- a/build.gradle +++ b/build.gradle @@ -373,7 +373,7 @@ catch (Exception ignored) { // Pulls version first from the VERSION env and then git tag String identifiedVersion = null -String versionOverride = '0.0.15p3' +String versionOverride = '0.0.15p4' try { // Produce a version based on the tag, or for branches something like 0.2.2-configurable-maven-and-extras.38+43090270b6-dirty if (versionOverride == null) { diff --git a/src/main/java/reobf/proghatches/gt/cover/SmartArmCover.java b/src/main/java/reobf/proghatches/gt/cover/SmartArmCover.java index 571b2ed..751748f 100644 --- a/src/main/java/reobf/proghatches/gt/cover/SmartArmCover.java +++ b/src/main/java/reobf/proghatches/gt/cover/SmartArmCover.java @@ -21,6 +21,7 @@ import com.google.common.collect.ImmutableList; import com.google.common.io.ByteArrayDataInput; import com.google.gson.Gson; +import com.gtnewhorizons.modularui.api.drawable.Text; import com.gtnewhorizons.modularui.api.drawable.UITexture; import com.gtnewhorizons.modularui.api.math.Alignment; import com.gtnewhorizons.modularui.api.math.Color; @@ -455,9 +456,11 @@ protected void addUIWidgets(ModularWindow.Builder builder) { .setPos(startX + spaceX, startY + spaceY).setSize(14 * 4, 14)) - .widget(TextWidget.dynamicString(() -> { - return StatCollector - .translateToLocal("programmable_hatches.cover.smart.io." + getCoverData().io); + .widget(TextWidget.dynamicText(() -> { + return Text.localised("programmable_hatches.cover.smart.io." + getCoverData().io) + //StatCollector.translateToLocal() + + ; }).setSynced(false).setTextAlignment(Alignment.CenterLeft).setDefaultColor(COLOR_TEXT_GRAY.get()) .setPos(startX + spaceX, 4 + startY + spaceY * 0)) diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/PatternDualInputHatch.java b/src/main/java/reobf/proghatches/gt/metatileentity/PatternDualInputHatch.java index 375e12c..900f637 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/PatternDualInputHatch.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/PatternDualInputHatch.java @@ -1,9 +1,12 @@ package reobf.proghatches.gt.metatileentity; +import static gregtech.api.objects.XSTR.XSTR_INSTANCE; + import java.util.EnumSet; import java.util.Optional; import java.util.function.Consumer; +import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.InventoryCrafting; @@ -12,10 +15,12 @@ import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.event.ForgeEventFactory; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidTank; +import reobf.proghatches.gt.metatileentity.BufferedDualInputHatch.DualInvBuffer; import reobf.proghatches.gt.metatileentity.util.MappingItemHandler; import reobf.proghatches.lang.LangManager; @@ -431,20 +436,21 @@ public boolean canFill(ForgeDirection side, Fluid aFluid) { return false; } + public class Inst extends PatternDualInputHatch{ + public Inst(String mName, byte mTier, String[] mDescriptionArray, ITexture[][][] mTextures, boolean mMultiFluid, + int bufferNum) {super(mName, mTier, mDescriptionArray, mTextures, mMultiFluid, bufferNum);} + @Override + public boolean supportsFluids() { + return PatternDualInputHatch.this.supportsFluids(); + } + + } + @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new PatternDualInputHatch(mName, mTier, mDescriptionArray, mTextures, mMultiFluid, bufferNum - ){ - @Override - public boolean supportsFluids() { - return PatternDualInputHatch.this.supportsFluids(); - } - - }; - - + return new Inst(mName, mTier, mDescriptionArray, mTextures, mMultiFluid, bufferNum); } @Override public void initTierBasedField() { @@ -774,6 +780,30 @@ public void onBlockDestroyed() { e.printStackTrace(); } super.onBlockDestroyed(); + + IGregTechTileEntity te = this.getBaseMetaTileEntity(); + World aWorld = te.getWorld(); + int aX = te.getXCoord(); + short aY = te.getYCoord(); + int aZ = te.getZCoord(); + + for (int i = 0; i < pattern.length; i++) { + final ItemStack tItem = pattern[i]; + if ((tItem != null) && (tItem.stackSize > 0)) { + final EntityItem tItemEntity = new EntityItem(aWorld, aX + XSTR_INSTANCE.nextFloat() * 0.8F + 0.1F, + aY + XSTR_INSTANCE.nextFloat() * 0.8F + 0.1F, aZ + XSTR_INSTANCE.nextFloat() * 0.8F + 0.1F, + new ItemStack(tItem.getItem(), tItem.stackSize, tItem.getItemDamage())); + if (tItem.hasTagCompound()) { + tItemEntity.getEntityItem().setTagCompound((NBTTagCompound) tItem.getTagCompound().copy()); + } + tItemEntity.motionX = (XSTR_INSTANCE.nextGaussian() * 0.05D); + tItemEntity.motionY = (XSTR_INSTANCE.nextGaussian() * 0.25D); + tItemEntity.motionZ = (XSTR_INSTANCE.nextGaussian() * 0.05D); + aWorld.spawnEntityInWorld(tItemEntity); + tItem.stackSize = 0; + pattern[i] = null; + } + } } public int fluidLimit() { @@ -793,4 +823,5 @@ boolean showFluidLimit() { public int getInventoryFluidLimit() { return Integer.MAX_VALUE; } + } diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/SuperChestME.java b/src/main/java/reobf/proghatches/gt/metatileentity/SuperChestME.java index 6f3b935..8d5b33e 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/SuperChestME.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/SuperChestME.java @@ -1,23 +1,40 @@ package reobf.proghatches.gt.metatileentity; +import static gregtech.api.metatileentity.BaseTileEntity.TOOLTIP_DELAY; +import static gregtech.api.objects.XSTR.XSTR_INSTANCE; + import java.util.ArrayList; import java.util.EnumSet; import java.util.HashMap; import java.util.List; +import java.util.Optional; +import java.util.function.Consumer; +import java.util.function.Supplier; +import java.util.stream.IntStream; import javax.annotation.Nonnull; import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; import com.gtnewhorizons.modularui.api.ModularUITextures; +import com.gtnewhorizons.modularui.api.drawable.IDrawable; +import com.gtnewhorizons.modularui.api.drawable.ItemDrawable; +import com.gtnewhorizons.modularui.api.drawable.UITexture; import com.gtnewhorizons.modularui.api.forge.ItemStackHandler; +import com.gtnewhorizons.modularui.api.math.Color; import com.gtnewhorizons.modularui.api.screen.UIBuildContext; +import com.gtnewhorizons.modularui.api.widget.Widget; import com.gtnewhorizons.modularui.common.internal.wrapper.BaseSlot; +import com.gtnewhorizons.modularui.common.widget.CycleButtonWidget; import com.gtnewhorizons.modularui.common.widget.DrawableWidget; import com.gtnewhorizons.modularui.common.widget.SlotWidget; +import com.gtnewhorizons.modularui.common.widget.textfield.BaseTextFieldWidget; +import com.gtnewhorizons.modularui.common.widget.textfield.TextFieldWidget; import com.gtnewhorizons.modularui.api.screen.ModularWindow.Builder; import appeng.api.config.AccessRestriction; import appeng.api.config.Actionable; +import appeng.api.implementations.tiles.IColorableTile; import appeng.api.networking.GridFlags; import appeng.api.networking.IGridNode; import appeng.api.networking.events.MENetworkCellArrayUpdate; @@ -32,7 +49,9 @@ import appeng.api.storage.data.IAEItemStack; import appeng.api.storage.data.IAEStack; import appeng.api.storage.data.IItemList; +import appeng.api.util.AEColor; import appeng.api.util.DimensionalCoord; +import appeng.client.texture.ExtraBlockTextures; import appeng.me.GridAccessException; import appeng.me.helpers.AENetworkProxy; import appeng.me.helpers.IGridProxyable; @@ -44,13 +63,17 @@ import appeng.util.item.ItemList; import gregtech.api.GregTech_API; import gregtech.api.gui.modularui.GT_UIInfos; +import gregtech.api.gui.modularui.GT_UITextures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBus; import gregtech.api.util.GT_Utility; +import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; @@ -59,9 +82,13 @@ import net.minecraft.util.StatCollector; import net.minecraftforge.common.util.ForgeDirection; import reobf.proghatches.gt.metatileentity.util.BaseSlotPatched; +import reobf.proghatches.lang.LangManager; import reobf.proghatches.main.registration.Registration; +import reobf.proghatches.util.IIconTexture; + +public class SuperChestME extends GT_MetaTileEntity_Hatch implements ICellContainer, IGridProxyable -public class SuperChestME extends GT_MetaTileEntity_Hatch implements ICellContainer, IGridProxyable{ +{ public SuperChestME(String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); @@ -69,7 +96,12 @@ public SuperChestME(String aName, int aTier, int aInvSlotCount, String[] aDescri } public SuperChestME(int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount ) { - super(aID, aName, aNameRegional, aTier, aInvSlotCount, new String[0], new ITexture[0]); + super(aID, aName, aNameRegional, aTier, aInvSlotCount, reobf.proghatches.main.Config.get("SCME", + ImmutableMap.of( + "items",commonSizeCompute(aTier) + ) + + ), new ITexture[0]); Registration.items.add(new ItemStack(GregTech_API.sBlockMachines, 1, aID)); } @Override @@ -191,12 +223,27 @@ public void blinkCell(int slot) { @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture}; + return new ITexture[]{aBaseTexture + , new IIconTexture + (ExtraBlockTextures.MEChest.getIcon(), + 0xffffff) + , new IIconTexture + (ExtraBlockTextures.BlockMEChestItems_Light.getIcon(), + 0xD7BBEC) + + }; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - // TODO Auto-generated method stub - return new ITexture[]{aBaseTexture}; + return new ITexture[]{aBaseTexture + , new IIconTexture + (ExtraBlockTextures.MEChest.getIcon(), + 0xffffff) + , new IIconTexture + (ExtraBlockTextures.BlockMEChestItems_Light.getIcon(), + 0xD7BBEC) + + }; } @Override public DimensionalCoord getLocation() { @@ -207,13 +254,18 @@ public DimensionalCoord getLocation() { @SuppressWarnings({ "unchecked", "rawtypes" }) IMEInventoryHandler handler =new MEInventoryHandler(new UnlimitedWrapper() - , StorageChannel .ITEMS); - + , StorageChannel .ITEMS){ + public boolean getSticky() {return sticky;}; + public int getPriority() {return piority;}; + }; + boolean sticky; + int piority; @Override public void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity) { super.onFirstTick(aBaseMetaTileEntity); getProxy().onReady(); + onColorChangeServer(aBaseMetaTileEntity.getColorization()); } public class UnlimitedWrapper implements IMEInventory { @@ -437,18 +489,68 @@ public void addUIWidgets(Builder builder, UIBuildContext buildContext) { builder.widget(new SlotWidget(new BaseSlotPatched(this.getInventoryHandler(), 2)) .setPos(3+18*3, 3) ); - builder.widget(new DrawableWidget().setDrawable(ModularUITextures.ICON_INFO) + + Widget w; + builder.widget(w=new DrawableWidget().setDrawable(ModularUITextures.ICON_INFO) .setPos(3+18*4+1, 3+1).setSize(16,16) - .addTooltip("xxxxxxx") - + // .addTooltip("xxxxxxx") ); + + IntStream + .range(0, + Integer.valueOf(StatCollector.translateToLocal( + "programmable_hatches.gt.mechest.tooltip"))) + .forEach(s -> w.addTooltip(LangManager.translateToLocal( + "programmable_hatches.gt.mechest.tooltip." + + s))); + + + builder.widget(createButton(() -> + sticky + , val -> { + sticky = val;post(); + //updateSlots(); + }, + new ItemDrawable(new ItemStack(Items.slime_ball)), + ImmutableList.of( + StatCollector.translateToLocal("programmable_hatches.gt.sticky") + + ) + + + , 0) + .setPos( 3,3+18*2)); + + builder.widget(new TextFieldWidget() + .setPattern(BaseTextFieldWidget.NATURAL_NUMS) + .setGetter(()->piority+"") + .setSetter(s-> + {try{piority=Integer.parseInt(s);}catch(Exception e){piority=0;};post();}) + .setSynced(true,true) + + .setFocusOnGuiOpen(true).setTextColor(Color.WHITE.dark(1)) + .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD.withOffset(-1, -1, 2, 2)) + .addTooltip(StatCollector.translateToLocal("programmable_hatches.gt.piority")) + .setPos(3+2,18*3+3+1).setSize(16*8,16)) + + ; + + + +} + private Widget createButton(Supplier getter, Consumer setter, IDrawable picture, + List tooltip, int offset) { + return new CycleButtonWidget().setToggle(getter, setter).setTextureGetter(__->picture) + .setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE).setTooltipShowUpDelay(TOOLTIP_DELAY) + .setPos(7 + offset * 18, 62).setSize(18, 18).addTooltips(tooltip); } @Override public void loadNBTData(NBTTagCompound aNBT) { getProxy().readFromNBT(aNBT); super.loadNBTData(aNBT); + piority=aNBT.getInteger("piority"); + sticky= aNBT.getBoolean("sticky"); } @Override @@ -464,13 +566,54 @@ public void saveNBTData(NBTTagCompound aNBT) { if(t!=null)t.setInteger("Count", mInventory[i].stackSize);} } - - + aNBT.setInteger("piority", piority); + aNBT.setBoolean("sticky", sticky); +} +@Override +public void setItemNBT(NBTTagCompound aNBT) { + final NBTTagList tItemList = new NBTTagList(); + for (int i = 0; i < getRealInventory().length; i++) { + final ItemStack tStack = getRealInventory()[i]; + if (tStack != null) { + final NBTTagCompound tTag = new NBTTagCompound(); + tTag.setInteger("IntSlot", i); + tStack.writeToNBT(tTag); + tTag.setInteger("Count", tStack.stackSize); + tItemList.appendTag(tTag); + } + } + aNBT.setTag("Inventory", tItemList); + if(piority!=0)aNBT.setInteger("piority", piority); + if(sticky)aNBT.setBoolean("sticky", sticky); +} +@Override +public boolean shouldDropItemAt(int index) { + + return false; } public static String name(int t){ return StatCollector.translateToLocalFormatted("mesuperchest.name."+(t>=5), suffix[t-1]); } public static String[] suffix={"I","II","III","IV","V","I","II","III","IV","V"}; +@Override +public void onColorChangeServer(byte aColor) { + + super.onColorChangeServer(aColor); + AEColor c; + if(aColor==-1){ + c=(AEColor.Transparent); + }else + c=(AEColor.values()[15-aColor]); + +try{ +getProxy().setColor(c); +getGridNode(null).updateState(); +}catch(Exception e){} + +} + + + } diff --git a/src/main/java/reobf/proghatches/item/ItemProgrammingCircuit.java b/src/main/java/reobf/proghatches/item/ItemProgrammingCircuit.java index 4450d8b..1a0eef2 100644 --- a/src/main/java/reobf/proghatches/item/ItemProgrammingCircuit.java +++ b/src/main/java/reobf/proghatches/item/ItemProgrammingCircuit.java @@ -158,6 +158,13 @@ public static ItemStack parse(NBTTagCompound tag){ +} + +public static boolean isNew(ItemStack is) { + if(is.getTagCompound()==null)return true; + String tg = Optional.ofNullable(is).map(ItemStack::getTagCompound) + .map(tag -> tag.getCompoundTag("targetCircuit")).map(t->t.getString("string_id")).orElse(""); + return !tg.isEmpty(); } public static Optional getCircuit(ItemStack is) { try { diff --git a/src/main/java/reobf/proghatches/main/Config.java b/src/main/java/reobf/proghatches/main/Config.java index 22f789c..5a30307 100644 --- a/src/main/java/reobf/proghatches/main/Config.java +++ b/src/main/java/reobf/proghatches/main/Config.java @@ -41,10 +41,10 @@ public static void synchronizeConfiguration(File configFile) { "Append 'Added by ProgrammableHatches' at the end of machine desc."); debug = configuration.getBoolean("debug", Configuration.CATEGORY_GENERAL, debug, "Allow you see some technical info in waila, for debugging."); - experimentalOptimize = configuration.getBoolean("experimentalOptimize", Configuration.CATEGORY_GENERAL, experimentalOptimize, - "If on, , trun it off it breaks something."); - sleep = configuration.getBoolean("Hatch sleep mode", Configuration.CATEGORY_GENERAL, sleep, - "If on, hatch will sleep when not busy to ease server load, trun it off it breaks something."); + experimentalOptimize = configuration.getBoolean("Piority mode","Experimental", experimentalOptimize, + "When on, buffer with more copies gets handled first. If off, just handle the first non-empty buffer first."); + sleep = configuration.getBoolean("Hatch sleep mode", "Experimental", sleep, + "When on, hatch will sleep when not busy, to ease server load."); if (configuration.hasChanged()) { diff --git a/src/main/java/reobf/proghatches/main/MyMod.java b/src/main/java/reobf/proghatches/main/MyMod.java index 5b2b2d2..1c1ea53 100644 --- a/src/main/java/reobf/proghatches/main/MyMod.java +++ b/src/main/java/reobf/proghatches/main/MyMod.java @@ -65,6 +65,7 @@ import cpw.mods.fml.relauncher.Side; import gregtech.api.enums.GT_Values; import gregtech.api.interfaces.tileentity.ICoverable; +import gregtech.api.metatileentity.BaseMetaTileEntity; import gregtech.api.net.GT_Packet_SendCoverData; import gregtech.api.util.shutdown.ShutDownReason; import gregtech.api.util.shutdown.ShutDownReasonRegistry; @@ -95,7 +96,7 @@ public class MyMod { public static MyMod instance; { - BlockEUInterface.class.getDeclaredFields(); + BaseMetaTileEntity.class.getDeclaredFields(); //BlockEUInterface. instance = this; } @@ -211,7 +212,7 @@ public void postInit(FMLPostInitializationEvent event) { InterfaceTerminalRegistry.instance().register(PartEUP2PInterface.class); InterfaceTerminalRegistry.instance().register(PartFluidP2PInterface.class); InterfaceTerminalRegistry.instance().register(TileFluidInterface_EU.class); - InterfaceTerminalRegistry.instance().register(PatternDualInputHatch.class); + InterfaceTerminalRegistry.instance().register(PatternDualInputHatch.Inst.class); } @SubscribeEvent(priority = EventPriority.HIGH, receiveCanceled = false) diff --git a/src/main/java/reobf/proghatches/main/mixin/MixinPlugin.java b/src/main/java/reobf/proghatches/main/mixin/MixinPlugin.java index e687f1c..9ca1836 100644 --- a/src/main/java/reobf/proghatches/main/mixin/MixinPlugin.java +++ b/src/main/java/reobf/proghatches/main/mixin/MixinPlugin.java @@ -142,6 +142,7 @@ public List getMixins() { ret.add("eucrafting." + "MixinEUSourceCoverChunkUnloadNotification"); } //ret.add("MixinBaseSlot");// + ret.add("MixinAEAdaptorSkipStackSizeCheck"); ret.add("MixinAwarenessForDualHatch"); if (!"true".equals(pp.get("noRemoveUnusedCacheInModularUIContainer"))) diff --git a/src/main/java/reobf/proghatches/main/mixin/mixins/MixinAEItemStackCompare.java b/src/main/java/reobf/proghatches/main/mixin/mixins/MixinAEItemStackCompare.java index a930b57..50b9ed6 100644 --- a/src/main/java/reobf/proghatches/main/mixin/mixins/MixinAEItemStackCompare.java +++ b/src/main/java/reobf/proghatches/main/mixin/mixins/MixinAEItemStackCompare.java @@ -35,7 +35,11 @@ public void a(AEItemStack other,CallbackInfoReturnable r){ Optional a = ItemProgrammingCircuit.getCircuit(other.getItemStack()); Optional b = ItemProgrammingCircuit.getCircuit(this.getItemStack()); - + boolean aa=ItemProgrammingCircuit.isNew(other.getItemStack()); + boolean bb=ItemProgrammingCircuit.isNew(this.getItemStack()); + if(aa!=bb){ + r.setReturnValue(aa?1:-1);return; + } if(a.isPresent()&&b.isPresent()){ r.setReturnValue(AEItemStack.create(b.get()).compareTo(AEItemStack.create(a.get()))); } diff --git a/src/main/java/reobf/proghatches/util/IIconTexture.java b/src/main/java/reobf/proghatches/util/IIconTexture.java index 25ed13c..3b74d13 100644 --- a/src/main/java/reobf/proghatches/util/IIconTexture.java +++ b/src/main/java/reobf/proghatches/util/IIconTexture.java @@ -13,10 +13,10 @@ public class IIconTexture extends GT_TextureBase implements ITexture { private final IIcon mBlock; // private final byte mSide, mMeta; + private int rgb; - protected IIconTexture(IIcon aBlock, short[] aRGBa) { - if (aRGBa.length != 4) - throw new IllegalArgumentException("RGBa doesn't have 4 Values @ GT_CopiedBlockTexture"); + public IIconTexture(IIcon aBlock, int rgb) { + this.rgb=rgb; mBlock = aBlock; } @@ -36,7 +36,7 @@ public void renderXPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int final IIcon aIcon = getIcon(ForgeDirection.EAST.ordinal()); aRenderer.field_152631_f = true; startDrawingQuads(aRenderer, 1.0f, 0.0f, 0.0f); - new LightingHelper(aRenderer).setupLightingXPos(aBlock, aX, aY, aZ).setupColor(ForgeDirection.EAST, 0xffffff); + new LightingHelper(aRenderer).setupLightingXPos(aBlock, aX, aY, aZ).setupColor(ForgeDirection.EAST, rgb); aRenderer.renderFaceXPos(aBlock, aX, aY, aZ, aIcon); draw(aRenderer); aRenderer.field_152631_f = false; @@ -46,7 +46,7 @@ public void renderXPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int public void renderXNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { startDrawingQuads(aRenderer, -1.0f, 0.0f, 0.0f); final IIcon aIcon = getIcon(ForgeDirection.WEST.ordinal()); - new LightingHelper(aRenderer).setupLightingXNeg(aBlock, aX, aY, aZ).setupColor(ForgeDirection.WEST, 0xffffff); + new LightingHelper(aRenderer).setupLightingXNeg(aBlock, aX, aY, aZ).setupColor(ForgeDirection.WEST, rgb); aRenderer.renderFaceXNeg(aBlock, aX, aY, aZ, aIcon); draw(aRenderer); } @@ -55,7 +55,7 @@ public void renderXNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int public void renderYPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { startDrawingQuads(aRenderer, 0.0f, 1.0f, 0.0f); final IIcon aIcon = getIcon(ForgeDirection.UP.ordinal()); - new LightingHelper(aRenderer).setupLightingYPos(aBlock, aX, aY, aZ).setupColor(ForgeDirection.UP, 0xffffff); + new LightingHelper(aRenderer).setupLightingYPos(aBlock, aX, aY, aZ).setupColor(ForgeDirection.UP, rgb); aRenderer.renderFaceYPos(aBlock, aX, aY, aZ, aIcon); draw(aRenderer); } @@ -64,7 +64,7 @@ public void renderYPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int public void renderYNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { startDrawingQuads(aRenderer, 0.0f, -1.0f, 0.0f); final IIcon aIcon = getIcon(ForgeDirection.DOWN.ordinal()); - new LightingHelper(aRenderer).setupLightingYNeg(aBlock, aX, aY, aZ).setupColor(ForgeDirection.DOWN, 0xffffff); + new LightingHelper(aRenderer).setupLightingYNeg(aBlock, aX, aY, aZ).setupColor(ForgeDirection.DOWN, rgb); aRenderer.renderFaceYNeg(aBlock, aX, aY, aZ, aIcon); draw(aRenderer); } @@ -73,7 +73,7 @@ public void renderYNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int public void renderZPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { startDrawingQuads(aRenderer, 0.0f, 0.0f, 1.0f); final IIcon aIcon = getIcon(ForgeDirection.SOUTH.ordinal()); - new LightingHelper(aRenderer).setupLightingZPos(aBlock, aX, aY, aZ).setupColor(ForgeDirection.SOUTH, 0xffffff); + new LightingHelper(aRenderer).setupLightingZPos(aBlock, aX, aY, aZ).setupColor(ForgeDirection.SOUTH, rgb); aRenderer.renderFaceZPos(aBlock, aX, aY, aZ, aIcon); draw(aRenderer); } @@ -83,7 +83,7 @@ public void renderZNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int startDrawingQuads(aRenderer, 0.0f, 0.0f, -1.0f); final IIcon aIcon = getIcon(ForgeDirection.NORTH.ordinal()); aRenderer.field_152631_f = true; - new LightingHelper(aRenderer).setupLightingZNeg(aBlock, aX, aY, aZ).setupColor(ForgeDirection.NORTH, 0xffffff); + new LightingHelper(aRenderer).setupLightingZNeg(aBlock, aX, aY, aZ).setupColor(ForgeDirection.NORTH, rgb); aRenderer.renderFaceZNeg(aBlock, aX, aY, aZ, aIcon); draw(aRenderer); aRenderer.field_152631_f = false; diff --git a/src/main/resources/assets/proghatches/lang/en_US.lang b/src/main/resources/assets/proghatches/lang/en_US.lang index 2fb2d5b..8791757 100644 --- a/src/main/resources/assets/proghatches/lang/en_US.lang +++ b/src/main/resources/assets/proghatches/lang/en_US.lang @@ -317,3 +317,9 @@ mesuperchest.name.false=ME Super Chest %s mesuperchest.name.true=ME Quantum Chest %s hatch.input.buffered.me.itemonly.name=Programmable Crafting Input Bus programmable_hatches.gt.slave.compat=Do not support GT5u Buffer! +programmable_hatches.gt.mechest.tooltip=3 +programmable_hatches.gt.mechest.tooltip.0=There are 16 input slots(#1~#16). +programmable_hatches.gt.mechest.tooltip.1=When storage slot(#0) is not empty, will try transfering items in input slots to storage slot. +programmable_hatches.gt.mechest.tooltip.2=The first 2 non-empty input slots are displayed on the left side. +programmable_hatches.gt.sticky=Sticky Mode +programmable_hatches.gt.piority=Piority diff --git a/src/main/resources/assets/proghatches/lang/en_US/SCME.lang b/src/main/resources/assets/proghatches/lang/en_US/SCME.lang new file mode 100644 index 0000000..84e9294 --- /dev/null +++ b/src/main/resources/assets/proghatches/lang/en_US/SCME.lang @@ -0,0 +1 @@ +Hold {items} items at maximum \ No newline at end of file diff --git a/src/main/resources/assets/proghatches/lang/zh_CN.lang b/src/main/resources/assets/proghatches/lang/zh_CN.lang index c3d77aa..50f96cf 100644 --- a/src/main/resources/assets/proghatches/lang/zh_CN.lang +++ b/src/main/resources/assets/proghatches/lang/zh_CN.lang @@ -354,3 +354,9 @@ mesuperchest.name.false=ME超级箱 %s mesuperchest.name.true=ME量子箱 %s hatch.input.buffered.me.itemonly.name=编程样板输入总线 programmable_hatches.gt.slave.compat=不支持GT5u总成! +programmable_hatches.gt.mechest.tooltip=3 +programmable_hatches.gt.mechest.tooltip.0=一共有16个输入格(#1~#16) +programmable_hatches.gt.mechest.tooltip.1=存储格(#0)未到上限时,输入格物品会被转移到存储格 +programmable_hatches.gt.mechest.tooltip.2=左侧至多显示输入格中的前2个非空格 +programmable_hatches.gt.sticky=黏性模式 +programmable_hatches.gt.piority=优先级 diff --git a/src/main/resources/assets/proghatches/lang/zh_CN/SCME.lang b/src/main/resources/assets/proghatches/lang/zh_CN/SCME.lang new file mode 100644 index 0000000..f5bb309 --- /dev/null +++ b/src/main/resources/assets/proghatches/lang/zh_CN/SCME.lang @@ -0,0 +1 @@ +最多存储{items}物品 \ No newline at end of file