From abe2da3ee692bf0183e34322d5fca68eff2b6d14 Mon Sep 17 00:00:00 2001 From: reobf <2215595288@qq.com> Date: Thu, 20 Feb 2025 22:03:08 +0800 Subject: [PATCH] update --- src/main/java/reobf/proghatches/ae/PartMAP2P.java | 6 ++++-- .../proghatches/ae/PartStockingExportBus.java | 3 ++- .../java/reobf/proghatches/block/BlockIOHub.java | 8 ++++++-- .../java/reobf/proghatches/eio/MAConduit.java | 3 ++- .../reobf/proghatches/gt/cover/SmartArmCover.java | 2 +- .../gt/cover/WirelessControlCover.java | 4 ++-- .../gt/metatileentity/DualInputHatch.java | 2 +- .../gt/metatileentity/RestrictedInputBusME.java | 4 ++-- .../gt/metatileentity/RestrictedInputHatchME.java | 4 ++-- .../reobf/proghatches/item/ItemMEPlunger.java | 14 +++++++------- .../textures/blocks/blockMAConduit.png | Bin 0 -> 550 bytes .../proghatches/textures/{ => gui}/formula0.png | Bin .../proghatches/textures/{ => gui}/formula1.png | Bin .../textures/{ => gui}/restrict_mode0.png | Bin .../textures/{ => gui}/restrict_mode1.png | Bin .../proghatches/textures/{ => gui}/states.png | Bin .../proghatches/textures/{ => gui}/uuid_cover.png | Bin .../textures/{ => gui}/uuid_machine.png | Bin 18 files changed, 29 insertions(+), 21 deletions(-) create mode 100644 src/main/resources/assets/proghatches/textures/blocks/blockMAConduit.png rename src/main/resources/assets/proghatches/textures/{ => gui}/formula0.png (100%) rename src/main/resources/assets/proghatches/textures/{ => gui}/formula1.png (100%) rename src/main/resources/assets/proghatches/textures/{ => gui}/restrict_mode0.png (100%) rename src/main/resources/assets/proghatches/textures/{ => gui}/restrict_mode1.png (100%) rename src/main/resources/assets/proghatches/textures/{ => gui}/states.png (100%) rename src/main/resources/assets/proghatches/textures/{ => gui}/uuid_cover.png (100%) rename src/main/resources/assets/proghatches/textures/{ => gui}/uuid_machine.png (100%) diff --git a/src/main/java/reobf/proghatches/ae/PartMAP2P.java b/src/main/java/reobf/proghatches/ae/PartMAP2P.java index 4e0792b..3ccef7f 100644 --- a/src/main/java/reobf/proghatches/ae/PartMAP2P.java +++ b/src/main/java/reobf/proghatches/ae/PartMAP2P.java @@ -19,8 +19,10 @@ import appeng.parts.p2p.PartP2PTunnelStatic; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import reobf.proghatches.block.BlockIOHub; import reobf.proghatches.fmp.ICraftingMachinePart; import reobf.proghatches.fmp.LayerCraftingMachine.StateHolder; +import reobf.proghatches.main.MyMod; public class PartMAP2P extends PartP2PTunnelStatic implements ICraftingMachinePart { @@ -208,7 +210,7 @@ private TileEntity getTarget() { @Override @SideOnly(Side.CLIENT) public void renderInventory(final IPartRenderHelper rh, final RenderBlocks renderer) { - rh.setTexture(Blocks.crafting_table.getIcon(1, 0)); + rh.setTexture(MyMod.iohub.getIcon(0, BlockIOHub.magicNO_ma)); rh.setBounds(2, 2, 14, 14, 14, 16); rh.renderInventoryBox(renderer); @@ -232,7 +234,7 @@ public void renderStatic(final int x, final int y, final int z, final IPartRende final RenderBlocks renderer) { this.setRenderCache(rh.useSimplifiedRendering(x, y, z, this, this.getRenderCache())); - rh.setTexture(Blocks.crafting_table.getIcon(1, 0)); + rh.setTexture(MyMod.iohub.getIcon(0, BlockIOHub.magicNO_ma)); rh.setBounds(2, 2, 14, 14, 14, 16); rh.renderBlock(x, y, z, renderer); diff --git a/src/main/java/reobf/proghatches/ae/PartStockingExportBus.java b/src/main/java/reobf/proghatches/ae/PartStockingExportBus.java index d0cc4b6..3bbe17a 100644 --- a/src/main/java/reobf/proghatches/ae/PartStockingExportBus.java +++ b/src/main/java/reobf/proghatches/ae/PartStockingExportBus.java @@ -10,6 +10,7 @@ import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; +import com.glodblock.github.common.item.ItemFluidDrop; import com.gtnewhorizons.modularui.api.ModularUITextures; import com.gtnewhorizons.modularui.api.forge.ItemStackHandler; import com.gtnewhorizons.modularui.api.screen.ModularWindow; @@ -256,7 +257,7 @@ public TickRateModulation tickingRequest(IGridNode node, int TicksSinceLastCall) for (IAEItemStack iae : iinv.getStorageList()) { // IAEItemStack iae=iinv.getStorageList().getFirstItem(); if (iae == null) break; - + if(iae.getItem( )instanceof ItemFluidDrop){continue;} final IAEItemStack itemsToAdd = inv.extractItems( iae.copy() .setStackSize(itemToSend), diff --git a/src/main/java/reobf/proghatches/block/BlockIOHub.java b/src/main/java/reobf/proghatches/block/BlockIOHub.java index 95529fc..a640f86 100644 --- a/src/main/java/reobf/proghatches/block/BlockIOHub.java +++ b/src/main/java/reobf/proghatches/block/BlockIOHub.java @@ -22,7 +22,8 @@ public class BlockIOHub extends BlockContainer { - private IIcon inv_me_slave; + + private IIcon inv_me_slave; public BlockIOHub() { super(new MaterialMachines()); @@ -55,7 +56,7 @@ public void registerBlockIcons(IIconRegister reg) { overlay_dual = reg.registerIcon("proghatches:overlay_dual"); overlay_dual_active = reg.registerIcon("proghatches:overlay_dual_active"); - + ma=reg.registerIcon("proghatches:blockMAConduit"); super.registerBlockIcons(reg); } @@ -110,6 +111,7 @@ public boolean onBlockActivated(World worldIn, int x, int y, int z, EntityPlayer public static IIcon provider_in_overlay; public static IIcon provider_in_active_overlay; public static IIcon overlay_dual,overlay_dual_active; + public static IIcon ma; static public int magicNO_provider_overlay = 0x7e; static public int magicNO_provider_active_overlay = 0x7d; static public int magicNO_provider_in_overlay = 0x7c; @@ -117,6 +119,7 @@ public boolean onBlockActivated(World worldIn, int x, int y, int z, EntityPlayer static public int magicNO_inv_me_slave = 0x7a; static public int magicNO_overlay_dual = 0x79; static public int magicNO_overlay_dual_active= 0x78; + static public int magicNO_ma = 0x77; @SideOnly(value = Side.CLIENT) @Override public IIcon getIcon(int side, int meta) { @@ -130,6 +133,7 @@ public IIcon getIcon(int side, int meta) { if(meta==magicNO_overlay_dual)return overlay_dual; if(meta==magicNO_overlay_dual_active)return overlay_dual_active; + if(meta==magicNO_ma)return ma; //spotless:on return super.getIcon(side, meta); } diff --git a/src/main/java/reobf/proghatches/eio/MAConduit.java b/src/main/java/reobf/proghatches/eio/MAConduit.java index 808b412..e85534a 100644 --- a/src/main/java/reobf/proghatches/eio/MAConduit.java +++ b/src/main/java/reobf/proghatches/eio/MAConduit.java @@ -44,6 +44,7 @@ import crazypants.enderio.conduit.render.DefaultConduitRenderer; import crazypants.enderio.tool.ToolUtil; import reobf.proghatches.ae.PartMAP2P; +import reobf.proghatches.block.BlockIOHub; import reobf.proghatches.fmp.LayerCraftingMachine.StateHolder; import reobf.proghatches.main.MyMod; @@ -131,7 +132,7 @@ public boolean setNetwork(AbstractConduitNetwork network) { @Override public IIcon getTextureForState(CollidableComponent component) { - return Blocks.crafting_table.getIcon(1, 0); + return MyMod.iohub.getIcon(0, BlockIOHub.magicNO_ma); } @Override diff --git a/src/main/java/reobf/proghatches/gt/cover/SmartArmCover.java b/src/main/java/reobf/proghatches/gt/cover/SmartArmCover.java index 9b4b3c8..0b53a6b 100644 --- a/src/main/java/reobf/proghatches/gt/cover/SmartArmCover.java +++ b/src/main/java/reobf/proghatches/gt/cover/SmartArmCover.java @@ -499,7 +499,7 @@ protected void addUIWidgets(ModularWindow.Builder builder) { builder.widget(new DrawableWidget().setDrawable(() -> - UITexture.fullImage(new ResourceLocation("proghatches", "textures/formula" + getCoverData().mode + ".png")) + UITexture.fullImage(new ResourceLocation("proghatches", "textures/gui/formula" + getCoverData().mode + ".png")) ) .addTooltip(LangManager.translateToLocal("programmable_hatches.cover.smart.tips.0")) diff --git a/src/main/java/reobf/proghatches/gt/cover/WirelessControlCover.java b/src/main/java/reobf/proghatches/gt/cover/WirelessControlCover.java index c701250..eee81ce 100644 --- a/src/main/java/reobf/proghatches/gt/cover/WirelessControlCover.java +++ b/src/main/java/reobf/proghatches/gt/cover/WirelessControlCover.java @@ -480,7 +480,7 @@ protected void addUIWidgets(ModularWindow.Builder builder) { .fullImage(GregTech.ID, "blocks/iconsets/OVERLAY_FRONT_IMPLOSION_COMPRESSOR.png"); public static final UITexture ON = UITexture .fullImage(GregTech.ID, "blocks/iconsets/OVERLAY_FRONT_IMPLOSION_COMPRESSOR_ACTIVE.png"); - public static final UITexture MACHINE = UITexture.fullImage("proghatches", "uuid_machine.png"); - public static final UITexture COVER = UITexture.fullImage("proghatches", "uuid_cover.png"); + public static final UITexture MACHINE = UITexture.fullImage("proghatches", "gui/uuid_machine.png"); + public static final UITexture COVER = UITexture.fullImage("proghatches", "gui/uuid_cover.png"); } diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/DualInputHatch.java b/src/main/java/reobf/proghatches/gt/metatileentity/DualInputHatch.java index da17938..7581b62 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/DualInputHatch.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/DualInputHatch.java @@ -503,7 +503,7 @@ public MarkerWidget(DualInputHatch dualInputHatch) { 1, 1); private static final SizedDrawable t1 = new SizedDrawable( - AdaptableUITexture.of("proghatches", "states", 16, 16, 0), + AdaptableUITexture.of("proghatches", "gui/states", 16, 16, 0), 16, 16, 1, diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/RestrictedInputBusME.java b/src/main/java/reobf/proghatches/gt/metatileentity/RestrictedInputBusME.java index 0820456..d768fe2 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/RestrictedInputBusME.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/RestrictedInputBusME.java @@ -393,8 +393,8 @@ public void loadNBTData(NBTTagCompound aNBT) { multiples = aNBT.getInteger("multiples"); } - static AdaptableUITexture mode0 = AdaptableUITexture.of("proghatches", "restrict_mode0", 18, 18, 1); - static AdaptableUITexture mode1 = AdaptableUITexture.of("proghatches", "restrict_mode1", 18, 18, 1); + static AdaptableUITexture mode0 = AdaptableUITexture.of("proghatches", "gui/restrict_mode0", 18, 18, 1); + static AdaptableUITexture mode1 = AdaptableUITexture.of("proghatches", "gui/restrict_mode1", 18, 18, 1); /* * @Override diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/RestrictedInputHatchME.java b/src/main/java/reobf/proghatches/gt/metatileentity/RestrictedInputHatchME.java index 2468d45..0a704c8 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/RestrictedInputHatchME.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/RestrictedInputHatchME.java @@ -294,8 +294,8 @@ public void loadNBTData(NBTTagCompound aNBT) { multiples = aNBT.getInteger("multiples"); } - static AdaptableUITexture mode0 = AdaptableUITexture.of("proghatches", "restrict_mode0", 18, 18, 1); - static AdaptableUITexture mode1 = AdaptableUITexture.of("proghatches", "restrict_mode1", 18, 18, 1); + static AdaptableUITexture mode0 = AdaptableUITexture.of("proghatches", "gui/restrict_mode0", 18, 18, 1); + static AdaptableUITexture mode1 = AdaptableUITexture.of("proghatches", "gui/restrict_mode1", 18, 18, 1); /* * @Override diff --git a/src/main/java/reobf/proghatches/item/ItemMEPlunger.java b/src/main/java/reobf/proghatches/item/ItemMEPlunger.java index 044455c..0591b01 100644 --- a/src/main/java/reobf/proghatches/item/ItemMEPlunger.java +++ b/src/main/java/reobf/proghatches/item/ItemMEPlunger.java @@ -136,7 +136,8 @@ public boolean check(ItemStack stack, Entity player, IGrid grid) { for (IGridNode node : grid.getMachines(TileWireless.class)) { IWirelessAccessPoint accessPoint = (IWirelessAccessPoint) node.getMachine(); - if (stack.getItemDamage() == 0) if (accessPoint.isActive() && accessPoint.getLocation() + if (stack.getItemDamage() == 0) + if (accessPoint.isActive() && accessPoint.getLocation() .getDimension() == player.dimension) { WorldCoord distance = accessPoint.getLocation() .subtract((int) player.posX, (int) player.posY, (int) player.posZ); @@ -145,12 +146,11 @@ public boolean check(ItemStack stack, Entity player, IGrid grid) { return true; } - } else { - if (accessPoint.isActive()) { - return true; - } - - } + } + + if (stack.getItemDamage() == 1) { + return accessPoint.isActive(); + } } return false; diff --git a/src/main/resources/assets/proghatches/textures/blocks/blockMAConduit.png b/src/main/resources/assets/proghatches/textures/blocks/blockMAConduit.png new file mode 100644 index 0000000000000000000000000000000000000000..5cd53a54bfa92e0515ef839552d6a9ef71d94ab1 GIT binary patch literal 550 zcmV+>0@?kEP)XDIWu$Se6xK=XRRqGh`y|Zgl;vIu`NU!Q){eX9VbKwss;H4D@lj z#FcOb$b7dIrg*o5CY!C4=uxD=9`{;UkNX{b0t9c6Tvx3xrI+0yx=Ho(WoEI1vMZf5 z(`A=s0|5S9Iw}F+=L&!V<2u#Hm(UR~;4#r@qLuZD_If&sH8TjRKx=;h5SZ{QG}CRT z@wPhFAyX~23=EL5CJVPID&Q6vV1I<2^8rr*?6(>SfU=t*-iWq^I&fg4!Otf%3=m1ttOjB0dv_ij_gcCLT9`%0`Tcms`NM o)PB{N+eA?{3r?+wFRlIN-zVDKhlDB9a{vGU07*qoM6N<$f_q~6J^%m! literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/proghatches/textures/formula0.png b/src/main/resources/assets/proghatches/textures/gui/formula0.png similarity index 100% rename from src/main/resources/assets/proghatches/textures/formula0.png rename to src/main/resources/assets/proghatches/textures/gui/formula0.png diff --git a/src/main/resources/assets/proghatches/textures/formula1.png b/src/main/resources/assets/proghatches/textures/gui/formula1.png similarity index 100% rename from src/main/resources/assets/proghatches/textures/formula1.png rename to src/main/resources/assets/proghatches/textures/gui/formula1.png diff --git a/src/main/resources/assets/proghatches/textures/restrict_mode0.png b/src/main/resources/assets/proghatches/textures/gui/restrict_mode0.png similarity index 100% rename from src/main/resources/assets/proghatches/textures/restrict_mode0.png rename to src/main/resources/assets/proghatches/textures/gui/restrict_mode0.png diff --git a/src/main/resources/assets/proghatches/textures/restrict_mode1.png b/src/main/resources/assets/proghatches/textures/gui/restrict_mode1.png similarity index 100% rename from src/main/resources/assets/proghatches/textures/restrict_mode1.png rename to src/main/resources/assets/proghatches/textures/gui/restrict_mode1.png diff --git a/src/main/resources/assets/proghatches/textures/states.png b/src/main/resources/assets/proghatches/textures/gui/states.png similarity index 100% rename from src/main/resources/assets/proghatches/textures/states.png rename to src/main/resources/assets/proghatches/textures/gui/states.png diff --git a/src/main/resources/assets/proghatches/textures/uuid_cover.png b/src/main/resources/assets/proghatches/textures/gui/uuid_cover.png similarity index 100% rename from src/main/resources/assets/proghatches/textures/uuid_cover.png rename to src/main/resources/assets/proghatches/textures/gui/uuid_cover.png diff --git a/src/main/resources/assets/proghatches/textures/uuid_machine.png b/src/main/resources/assets/proghatches/textures/gui/uuid_machine.png similarity index 100% rename from src/main/resources/assets/proghatches/textures/uuid_machine.png rename to src/main/resources/assets/proghatches/textures/gui/uuid_machine.png