Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
reobf committed Feb 20, 2025
1 parent 0f69d42 commit abe2da3
Show file tree
Hide file tree
Showing 18 changed files with 29 additions and 21 deletions.
6 changes: 4 additions & 2 deletions src/main/java/reobf/proghatches/ae/PartMAP2P.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<PartMAP2P> implements ICraftingMachinePart {

Expand Down Expand Up @@ -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);
Expand All @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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),
Expand Down
8 changes: 6 additions & 2 deletions src/main/java/reobf/proghatches/block/BlockIOHub.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@

public class BlockIOHub extends BlockContainer {

private IIcon inv_me_slave;

private IIcon inv_me_slave;

public BlockIOHub() {
super(new MaterialMachines());
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -110,13 +111,15 @@ 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;
static public int magicNO_provider_in_active_overlay = 0x7b;
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) {
Expand All @@ -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);
}
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/reobf/proghatches/eio/MAConduit.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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");

}
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 7 additions & 7 deletions src/main/java/reobf/proghatches/item/ItemMEPlunger.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit abe2da3

Please sign in to comment.