From d6e4d5a65f8189341a2b04d968df9f05d8dec700 Mon Sep 17 00:00:00 2001 From: lordIcocain Date: Tue, 17 Dec 2024 20:16:02 +0200 Subject: [PATCH 1/8] first commit --- .../java/appeng/api/definitions/IParts.java | 2 + .../java/appeng/api/definitions/Parts.java | 2 + src/main/java/appeng/core/Registration.java | 1 + .../appeng/core/api/definitions/ApiParts.java | 7 + .../java/appeng/items/parts/PartType.java | 4 + .../parts/networking/PartCreativeEnergy.java | 163 ++++++++++++++++++ .../appliedenergistics2/lang/en_US.lang | 1 + .../recipes/network/parts/index.recipe | 1 + .../parts/part-creative-energy-cell.recipe | 3 + .../blocks/ItemPart.PartCreativeEnergy.png | Bin 0 -> 446 bytes 10 files changed, 184 insertions(+) create mode 100644 src/main/java/appeng/parts/networking/PartCreativeEnergy.java create mode 100644 src/main/resources/assets/appliedenergistics2/recipes/network/parts/part-creative-energy-cell.recipe create mode 100644 src/main/resources/assets/appliedenergistics2/textures/blocks/ItemPart.PartCreativeEnergy.png diff --git a/src/main/java/appeng/api/definitions/IParts.java b/src/main/java/appeng/api/definitions/IParts.java index a654ef3d4be..92e28b2862c 100644 --- a/src/main/java/appeng/api/definitions/IParts.java +++ b/src/main/java/appeng/api/definitions/IParts.java @@ -44,6 +44,8 @@ public interface IParts { IItemDefinition quartzFiber(); + IItemDefinition partCreativeEnergy(); + IItemDefinition toggleBus(); IItemDefinition invertedToggleBus(); diff --git a/src/main/java/appeng/api/definitions/Parts.java b/src/main/java/appeng/api/definitions/Parts.java index 34dcc59da59..c5381356839 100644 --- a/src/main/java/appeng/api/definitions/Parts.java +++ b/src/main/java/appeng/api/definitions/Parts.java @@ -46,6 +46,8 @@ public class Parts { public AEItemDefinition partQuartzFiber; + public AEItemDefinition partCreativeEnergy; + public AEItemDefinition partToggleBus; public AEItemDefinition partInvertedToggleBus; diff --git a/src/main/java/appeng/core/Registration.java b/src/main/java/appeng/core/Registration.java index f757623ac54..e17bd2f3d09 100644 --- a/src/main/java/appeng/core/Registration.java +++ b/src/main/java/appeng/core/Registration.java @@ -336,6 +336,7 @@ private void assignParts(final Parts target, final IParts source) { // target.partLumenCableGlass = source.lumenCableGlass(); // target.partLumenCableDense = source.lumenCableDense(); target.partQuartzFiber = this.converter.of(source.quartzFiber()); + target.partCreativeEnergy = this.converter.of(source.partCreativeEnergy()); target.partToggleBus = this.converter.of(source.toggleBus()); target.partInvertedToggleBus = this.converter.of(source.invertedToggleBus()); target.partStorageBus = this.converter.of(source.storageBus()); diff --git a/src/main/java/appeng/core/api/definitions/ApiParts.java b/src/main/java/appeng/core/api/definitions/ApiParts.java index a8ade8f36a4..d2acfab5d47 100644 --- a/src/main/java/appeng/core/api/definitions/ApiParts.java +++ b/src/main/java/appeng/core/api/definitions/ApiParts.java @@ -36,6 +36,7 @@ public final class ApiParts implements IParts { // private final AEColoredItemDefinition lumenCableGlass; // private final AEColoredItemDefinition lumenCableDense; private final IItemDefinition quartzFiber; + private final IItemDefinition partCreativeEnergy; private final IItemDefinition toggleBus; private final IItemDefinition invertedToggleBus; private final IItemDefinition storageBus; @@ -88,6 +89,7 @@ public ApiParts(final DefinitionConstructor constructor, final IPartHelper partH // this.lumenCableGlass = Optional.absent(); // has yet to be implemented, no PartType defined for it yet // this.lumenCableDense = Optional.absent(); // has yet to be implemented, no PartType defined for it yet this.quartzFiber = new DamagedItemDefinition(itemMultiPart.createPart(PartType.QuartzFiber)); + this.partCreativeEnergy = new DamagedItemDefinition(itemMultiPart.createPart(PartType.PartCreativeEnergy)); this.toggleBus = new DamagedItemDefinition(itemMultiPart.createPart(PartType.ToggleBus)); this.invertedToggleBus = new DamagedItemDefinition(itemMultiPart.createPart(PartType.InvertedToggleBus)); this.storageBus = new DamagedItemDefinition(itemMultiPart.createPart(PartType.StorageBus)); @@ -189,6 +191,11 @@ public IItemDefinition quartzFiber() { return this.quartzFiber; } + @Override + public IItemDefinition partCreativeEnergy() { + return this.partCreativeEnergy; + } + @Override public IItemDefinition toggleBus() { return this.toggleBus; diff --git a/src/main/java/appeng/items/parts/PartType.java b/src/main/java/appeng/items/parts/PartType.java index 0dc16143549..1a5fed2fb4e 100644 --- a/src/main/java/appeng/items/parts/PartType.java +++ b/src/main/java/appeng/items/parts/PartType.java @@ -33,6 +33,7 @@ import appeng.parts.networking.PartCableCovered; import appeng.parts.networking.PartCableGlass; import appeng.parts.networking.PartCableSmart; +import appeng.parts.networking.PartCreativeEnergy; import appeng.parts.networking.PartDenseCable; import appeng.parts.networking.PartDenseCableCovered; import appeng.parts.networking.PartQuartzFiber; @@ -132,6 +133,9 @@ public boolean isCable() { QuartzFiber(140, EnumSet.of(AEFeature.Core), EnumSet.noneOf(IntegrationType.class), PartQuartzFiber.class), + PartCreativeEnergy(690, EnumSet.of(AEFeature.Core), EnumSet.noneOf(IntegrationType.class), + PartCreativeEnergy.class), + Monitor(160, EnumSet.of(AEFeature.Core), EnumSet.noneOf(IntegrationType.class), PartPanel.class), SemiDarkMonitor(180, EnumSet.of(AEFeature.Core), EnumSet.noneOf(IntegrationType.class), PartSemiDarkPanel.class), diff --git a/src/main/java/appeng/parts/networking/PartCreativeEnergy.java b/src/main/java/appeng/parts/networking/PartCreativeEnergy.java new file mode 100644 index 00000000000..1b935ad9c10 --- /dev/null +++ b/src/main/java/appeng/parts/networking/PartCreativeEnergy.java @@ -0,0 +1,163 @@ +/* + * This file is part of Applied Energistics 2. Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved. Applied + * Energistics 2 is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General + * Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any + * later version. Applied Energistics 2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General + * Public License for more details. You should have received a copy of the GNU Lesser General Public License along with + * Applied Energistics 2. If not, see . + */ + +package appeng.parts.networking; + +import java.util.EnumSet; + +import net.minecraft.client.renderer.RenderBlocks; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraftforge.common.util.ForgeDirection; + +import org.lwjgl.opengl.GL11; + +import appeng.api.config.AccessRestriction; +import appeng.api.config.Actionable; +import appeng.api.config.PowerMultiplier; +import appeng.api.networking.GridFlags; +import appeng.api.networking.IGridNode; +import appeng.api.networking.energy.IAEPowerStorage; +import appeng.api.parts.IPartCollisionHelper; +import appeng.api.parts.IPartHost; +import appeng.api.parts.IPartRenderHelper; +import appeng.client.texture.TextureUtils; +import appeng.me.helpers.AENetworkProxy; +import appeng.parts.AEBasePart; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class PartCreativeEnergy extends AEBasePart implements IAEPowerStorage { + + private final AENetworkProxy outerProxy = new AENetworkProxy( + this, + "outer", + this.getProxy().getMachineRepresentation(), + true); + + public PartCreativeEnergy(final ItemStack is) { + super(is); + this.getProxy().setIdlePowerUsage(0); + this.getProxy().setFlags(GridFlags.CANNOT_CARRY); + this.outerProxy.setIdlePowerUsage(0); + this.outerProxy.setFlags(GridFlags.CANNOT_CARRY); + } + + @Override + public void getBoxes(final IPartCollisionHelper bch) { + bch.addBox(6, 6, 10, 10, 10, 16); + } + + @Override + @SideOnly(Side.CLIENT) + public void renderInventory(final IPartRenderHelper rh, final RenderBlocks renderer) { + GL11.glTranslated(-0.2, -0.3, 0.0); + + rh.setTexture(this.getItemStack().getIconIndex()); + rh.setBounds(6.0f, 6.0f, 5.0f, 10.0f, 10.0f, 11.0f); + rh.renderInventoryBox(renderer); + rh.setTexture(null); + } + + @Override + @SideOnly(Side.CLIENT) + public void renderStatic(final int x, final int y, final int z, final IPartRenderHelper rh, + final RenderBlocks renderer) { + final IIcon myIcon = TextureUtils.checkTexture(this.getItemStack().getIconIndex()); + rh.setTexture(myIcon); + rh.setBounds(6, 6, 10, 10, 10, 16); + rh.renderBlock(x, y, z, renderer); + rh.setTexture(null); + } + + @Override + public void readFromNBT(final NBTTagCompound extra) { + super.readFromNBT(extra); + this.outerProxy.readFromNBT(extra); + } + + @Override + public void writeToNBT(final NBTTagCompound extra) { + super.writeToNBT(extra); + this.outerProxy.writeToNBT(extra); + } + + @Override + public void removeFromWorld() { + super.removeFromWorld(); + this.outerProxy.invalidate(); + } + + @Override + public void addToWorld() { + super.addToWorld(); + this.outerProxy.onReady(); + } + + @Override + public void setPartHostInfo(final ForgeDirection side, final IPartHost host, final TileEntity tile) { + super.setPartHostInfo(side, host, tile); + this.outerProxy.setValidSides(EnumSet.of(side)); + } + + @Override + public IGridNode getExternalFacingNode() { + return this.outerProxy.getNode(); + } + + @Override + public int cableConnectionRenderTo() { + return 16; + } + + @Override + public void onPlacement(final EntityPlayer player, final ItemStack held, final ForgeDirection side) { + super.onPlacement(player, held, side); + this.outerProxy.setOwner(player); + } + + @Override + public double injectAEPower(final double amt, final Actionable mode) { + return 0; + } + + @Override + public double getAEMaxPower() { + return Long.MAX_VALUE / 10000; + } + + @Override + public double getAECurrentPower() { + return Long.MAX_VALUE / 10000; + } + + @Override + public boolean isAEPublicPowerStorage() { + return true; + } + + @Override + public AccessRestriction getPowerFlow() { + return AccessRestriction.READ_WRITE; + } + + @Override + public boolean isInfinite() { + return true; + } + + @Override + public double extractAEPower(final double amt, final Actionable mode, final PowerMultiplier pm) { + return amt; + } +} diff --git a/src/main/resources/assets/appliedenergistics2/lang/en_US.lang b/src/main/resources/assets/appliedenergistics2/lang/en_US.lang index 6b4ca613713..aa68418e679 100644 --- a/src/main/resources/assets/appliedenergistics2/lang/en_US.lang +++ b/src/main/resources/assets/appliedenergistics2/lang/en_US.lang @@ -712,6 +712,7 @@ item.appliedenergistics2.ItemPart.P2PTunnel.name=P2P Tunnel item.appliedenergistics2.ItemPart.PatternTerminal.name=ME Pattern Terminal item.appliedenergistics2.ItemPart.PatternTerminalEx.name=ME Processing Pattern Terminal item.appliedenergistics2.ItemPart.QuartzFiber.name=Quartz Fiber +item.appliedenergistics2.ItemPart.PartCreativeEnergy.name=Portable Creative Energy Cell item.appliedenergistics2.ItemPart.StorageBus.name=ME Storage Bus item.appliedenergistics2.ItemPart.Terminal.name=ME Terminal item.appliedenergistics2.ItemPart.CraftingTerminal.name=ME Crafting Terminal diff --git a/src/main/resources/assets/appliedenergistics2/recipes/network/parts/index.recipe b/src/main/resources/assets/appliedenergistics2/recipes/network/parts/index.recipe index 1f8093c3cdc..d14d481fcf8 100644 --- a/src/main/resources/assets/appliedenergistics2/recipes/network/parts/index.recipe +++ b/src/main/resources/assets/appliedenergistics2/recipes/network/parts/index.recipe @@ -8,3 +8,4 @@ import=network/parts/quartz-fiber.recipe import=network/parts/terminals.recipe import=network/parts/toggle-buses.recipe import=network/parts/tunnels.recipe +import=network/parts/part-creative-energy-cell.recipe \ No newline at end of file diff --git a/src/main/resources/assets/appliedenergistics2/recipes/network/parts/part-creative-energy-cell.recipe b/src/main/resources/assets/appliedenergistics2/recipes/network/parts/part-creative-energy-cell.recipe new file mode 100644 index 00000000000..e842fe43d6b --- /dev/null +++ b/src/main/resources/assets/appliedenergistics2/recipes/network/parts/part-creative-energy-cell.recipe @@ -0,0 +1,3 @@ +shapeless= + ae2:ItemPart.QuartzFiber ae2:BlockCreativeEnergyCell + -> 1 ae2:ItemPart.PartCreativeEnergy \ No newline at end of file diff --git a/src/main/resources/assets/appliedenergistics2/textures/blocks/ItemPart.PartCreativeEnergy.png b/src/main/resources/assets/appliedenergistics2/textures/blocks/ItemPart.PartCreativeEnergy.png new file mode 100644 index 0000000000000000000000000000000000000000..e223f1d70363f4d67213994d23e21046e63af342 GIT binary patch literal 446 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%G|^0G|+7U0vN9H*R=(dWs1us>@q}l!=x-15#`yL4LviL4aZN{w4c?BAf*t zk;M!Qe9J(XvHi}~kXKn^Q|6eBAGBar0<#L`eU$n_eG%wTaQAls0U3GACFAUm_21uUKgWP^ZE z2_wS`peJE8nxzatsR`^1EI^e8M#ct=3m~R~Y-C*kF=+~r4FXI+bD6*@gDfq8ET}F+ z0|St3n3PxbgCp&EK&Gvyi(`mJ@YcSATnq*rPP(uE*H>=gYPwM<`zlf6(0hj^n*Ebz xg)p6+@kMA_YKzi5hMOvh^4Z*{g97bm?~-TEV?G(^wrwrQP)}Dsmvv4FO#q6CVgUdE literal 0 HcmV?d00001 From 9f297ca103b71fa1da89130bf8f3cc572afa04d4 Mon Sep 17 00:00:00 2001 From: lordIcocain Date: Tue, 17 Dec 2024 20:19:33 +0200 Subject: [PATCH 2/8] name --- src/main/resources/assets/appliedenergistics2/lang/en_US.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/assets/appliedenergistics2/lang/en_US.lang b/src/main/resources/assets/appliedenergistics2/lang/en_US.lang index aa68418e679..3cea1957e44 100644 --- a/src/main/resources/assets/appliedenergistics2/lang/en_US.lang +++ b/src/main/resources/assets/appliedenergistics2/lang/en_US.lang @@ -712,7 +712,7 @@ item.appliedenergistics2.ItemPart.P2PTunnel.name=P2P Tunnel item.appliedenergistics2.ItemPart.PatternTerminal.name=ME Pattern Terminal item.appliedenergistics2.ItemPart.PatternTerminalEx.name=ME Processing Pattern Terminal item.appliedenergistics2.ItemPart.QuartzFiber.name=Quartz Fiber -item.appliedenergistics2.ItemPart.PartCreativeEnergy.name=Portable Creative Energy Cell +item.appliedenergistics2.ItemPart.PartCreativeEnergy.name=Creative Energy Fiber item.appliedenergistics2.ItemPart.StorageBus.name=ME Storage Bus item.appliedenergistics2.ItemPart.Terminal.name=ME Terminal item.appliedenergistics2.ItemPart.CraftingTerminal.name=ME Crafting Terminal From 40f384edbe216a409c3ec4ac93ad1f74543a8d81 Mon Sep 17 00:00:00 2001 From: lordIcocain Date: Tue, 17 Dec 2024 20:23:48 +0200 Subject: [PATCH 3/8] rm --- .../appeng/parts/networking/PartCreativeEnergy.java | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/main/java/appeng/parts/networking/PartCreativeEnergy.java b/src/main/java/appeng/parts/networking/PartCreativeEnergy.java index 1b935ad9c10..46799670ab0 100644 --- a/src/main/java/appeng/parts/networking/PartCreativeEnergy.java +++ b/src/main/java/appeng/parts/networking/PartCreativeEnergy.java @@ -1,13 +1,3 @@ -/* - * This file is part of Applied Energistics 2. Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved. Applied - * Energistics 2 is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General - * Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any - * later version. Applied Energistics 2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General - * Public License for more details. You should have received a copy of the GNU Lesser General Public License along with - * Applied Energistics 2. If not, see . - */ - package appeng.parts.networking; import java.util.EnumSet; From 34c653a0f2617372aca25ee0329ee5ed832270d1 Mon Sep 17 00:00:00 2001 From: lordIcocain Date: Wed, 18 Dec 2024 12:59:57 +0200 Subject: [PATCH 4/8] no_extra_connection --- .../parts/networking/PartCreativeEnergy.java | 61 ------------------- 1 file changed, 61 deletions(-) diff --git a/src/main/java/appeng/parts/networking/PartCreativeEnergy.java b/src/main/java/appeng/parts/networking/PartCreativeEnergy.java index 46799670ab0..e2b11f075b9 100644 --- a/src/main/java/appeng/parts/networking/PartCreativeEnergy.java +++ b/src/main/java/appeng/parts/networking/PartCreativeEnergy.java @@ -1,46 +1,26 @@ package appeng.parts.networking; -import java.util.EnumSet; - import net.minecraft.client.renderer.RenderBlocks; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; -import net.minecraftforge.common.util.ForgeDirection; import org.lwjgl.opengl.GL11; import appeng.api.config.AccessRestriction; import appeng.api.config.Actionable; import appeng.api.config.PowerMultiplier; -import appeng.api.networking.GridFlags; -import appeng.api.networking.IGridNode; import appeng.api.networking.energy.IAEPowerStorage; import appeng.api.parts.IPartCollisionHelper; -import appeng.api.parts.IPartHost; import appeng.api.parts.IPartRenderHelper; import appeng.client.texture.TextureUtils; -import appeng.me.helpers.AENetworkProxy; import appeng.parts.AEBasePart; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; public class PartCreativeEnergy extends AEBasePart implements IAEPowerStorage { - private final AENetworkProxy outerProxy = new AENetworkProxy( - this, - "outer", - this.getProxy().getMachineRepresentation(), - true); - public PartCreativeEnergy(final ItemStack is) { super(is); - this.getProxy().setIdlePowerUsage(0); - this.getProxy().setFlags(GridFlags.CANNOT_CARRY); - this.outerProxy.setIdlePowerUsage(0); - this.outerProxy.setFlags(GridFlags.CANNOT_CARRY); } @Override @@ -70,52 +50,11 @@ public void renderStatic(final int x, final int y, final int z, final IPartRende rh.setTexture(null); } - @Override - public void readFromNBT(final NBTTagCompound extra) { - super.readFromNBT(extra); - this.outerProxy.readFromNBT(extra); - } - - @Override - public void writeToNBT(final NBTTagCompound extra) { - super.writeToNBT(extra); - this.outerProxy.writeToNBT(extra); - } - - @Override - public void removeFromWorld() { - super.removeFromWorld(); - this.outerProxy.invalidate(); - } - - @Override - public void addToWorld() { - super.addToWorld(); - this.outerProxy.onReady(); - } - - @Override - public void setPartHostInfo(final ForgeDirection side, final IPartHost host, final TileEntity tile) { - super.setPartHostInfo(side, host, tile); - this.outerProxy.setValidSides(EnumSet.of(side)); - } - - @Override - public IGridNode getExternalFacingNode() { - return this.outerProxy.getNode(); - } - @Override public int cableConnectionRenderTo() { return 16; } - @Override - public void onPlacement(final EntityPlayer player, final ItemStack held, final ForgeDirection side) { - super.onPlacement(player, held, side); - this.outerProxy.setOwner(player); - } - @Override public double injectAEPower(final double amt, final Actionable mode) { return 0; From 1d6ee4d6cf588532d18eeab763bd2918cae9d6f5 Mon Sep 17 00:00:00 2001 From: lordIcocain Date: Wed, 18 Dec 2024 13:17:07 +0200 Subject: [PATCH 5/8] fix --- .../parts/networking/PartCreativeEnergy.java | 1 + .../blocks/ItemPart.PartCreativeEnergy.png | Bin 446 -> 444 bytes 2 files changed, 1 insertion(+) diff --git a/src/main/java/appeng/parts/networking/PartCreativeEnergy.java b/src/main/java/appeng/parts/networking/PartCreativeEnergy.java index e2b11f075b9..7ab78e35eb4 100644 --- a/src/main/java/appeng/parts/networking/PartCreativeEnergy.java +++ b/src/main/java/appeng/parts/networking/PartCreativeEnergy.java @@ -21,6 +21,7 @@ public class PartCreativeEnergy extends AEBasePart implements IAEPowerStorage { public PartCreativeEnergy(final ItemStack is) { super(is); + this.getProxy().setIdlePowerUsage(0); } @Override diff --git a/src/main/resources/assets/appliedenergistics2/textures/blocks/ItemPart.PartCreativeEnergy.png b/src/main/resources/assets/appliedenergistics2/textures/blocks/ItemPart.PartCreativeEnergy.png index e223f1d70363f4d67213994d23e21046e63af342..d6d1c395b95e85c59ad01613d4707f6eafeadc4a 100644 GIT binary patch delta 88 zcmdnTyoY&14r73|r;B5VMsRWhD>Iv$n*_I$p`o#{V?+RBnwVG`2lsS_HZc`vNry=u rEX>Lt)gTe~DWM4f`AHZt delta 90 zcmV-g0Hy!D1HJ>WYyna|Nkl Date: Wed, 18 Dec 2024 19:52:38 +0200 Subject: [PATCH 6/8] rebrand --- .../parts/networking/PartCreativeEnergy.java | 34 ++++++++++++------ .../appliedenergistics2/lang/en_US.lang | 2 +- .../parts/part-creative-energy-cell.recipe | 2 +- .../blocks/ItemPart.PartCreativeEnergy.png | Bin 444 -> 456 bytes 4 files changed, 26 insertions(+), 12 deletions(-) diff --git a/src/main/java/appeng/parts/networking/PartCreativeEnergy.java b/src/main/java/appeng/parts/networking/PartCreativeEnergy.java index 7ab78e35eb4..e54a894f541 100644 --- a/src/main/java/appeng/parts/networking/PartCreativeEnergy.java +++ b/src/main/java/appeng/parts/networking/PartCreativeEnergy.java @@ -2,7 +2,6 @@ import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; import org.lwjgl.opengl.GL11; @@ -12,7 +11,7 @@ import appeng.api.networking.energy.IAEPowerStorage; import appeng.api.parts.IPartCollisionHelper; import appeng.api.parts.IPartRenderHelper; -import appeng.client.texture.TextureUtils; +import appeng.client.texture.CableBusTextures; import appeng.parts.AEBasePart; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -26,7 +25,8 @@ public PartCreativeEnergy(final ItemStack is) { @Override public void getBoxes(final IPartCollisionHelper bch) { - bch.addBox(6, 6, 10, 10, 10, 16); + bch.addBox(6, 6, 11, 10, 10, 12); + bch.addBox(4, 4, 12, 12, 12, 13); } @Override @@ -34,21 +34,35 @@ public void getBoxes(final IPartCollisionHelper bch) { public void renderInventory(final IPartRenderHelper rh, final RenderBlocks renderer) { GL11.glTranslated(-0.2, -0.3, 0.0); - rh.setTexture(this.getItemStack().getIconIndex()); - rh.setBounds(6.0f, 6.0f, 5.0f, 10.0f, 10.0f, 11.0f); + rh.setTexture( + CableBusTextures.PartTunnelSides.getIcon(), + CableBusTextures.PartTunnelSides.getIcon(), + CableBusTextures.BlockP2PTunnel2.getIcon(), + this.getItemStack().getIconIndex(), + CableBusTextures.PartTunnelSides.getIcon(), + CableBusTextures.PartTunnelSides.getIcon()); + rh.setBounds(4.0f, 4.0f, 12.0f, 12.0f, 12.0f, 13.0f); rh.renderInventoryBox(renderer); - rh.setTexture(null); } @Override @SideOnly(Side.CLIENT) public void renderStatic(final int x, final int y, final int z, final IPartRenderHelper rh, final RenderBlocks renderer) { - final IIcon myIcon = TextureUtils.checkTexture(this.getItemStack().getIconIndex()); - rh.setTexture(myIcon); - rh.setBounds(6, 6, 10, 10, 10, 16); + rh.setTexture( + CableBusTextures.PartTunnelSides.getIcon(), + CableBusTextures.PartTunnelSides.getIcon(), + CableBusTextures.BlockP2PTunnel2.getIcon(), + this.getItemStack().getIconIndex(), + CableBusTextures.PartTunnelSides.getIcon(), + CableBusTextures.PartTunnelSides.getIcon()); + rh.setBounds(4, 4, 12, 12, 12, 13); + rh.renderBlock(x, y, z, renderer); + + rh.setTexture(CableBusTextures.BlockP2PTunnel2.getIcon()); + + rh.setBounds(6, 6, 11, 10, 10, 12); rh.renderBlock(x, y, z, renderer); - rh.setTexture(null); } @Override diff --git a/src/main/resources/assets/appliedenergistics2/lang/en_US.lang b/src/main/resources/assets/appliedenergistics2/lang/en_US.lang index 3cea1957e44..3a91d056ead 100644 --- a/src/main/resources/assets/appliedenergistics2/lang/en_US.lang +++ b/src/main/resources/assets/appliedenergistics2/lang/en_US.lang @@ -712,7 +712,7 @@ item.appliedenergistics2.ItemPart.P2PTunnel.name=P2P Tunnel item.appliedenergistics2.ItemPart.PatternTerminal.name=ME Pattern Terminal item.appliedenergistics2.ItemPart.PatternTerminalEx.name=ME Processing Pattern Terminal item.appliedenergistics2.ItemPart.QuartzFiber.name=Quartz Fiber -item.appliedenergistics2.ItemPart.PartCreativeEnergy.name=Creative Energy Fiber +item.appliedenergistics2.ItemPart.PartCreativeEnergy.name=Creative Energy Anchor item.appliedenergistics2.ItemPart.StorageBus.name=ME Storage Bus item.appliedenergistics2.ItemPart.Terminal.name=ME Terminal item.appliedenergistics2.ItemPart.CraftingTerminal.name=ME Crafting Terminal diff --git a/src/main/resources/assets/appliedenergistics2/recipes/network/parts/part-creative-energy-cell.recipe b/src/main/resources/assets/appliedenergistics2/recipes/network/parts/part-creative-energy-cell.recipe index e842fe43d6b..aae851888d5 100644 --- a/src/main/resources/assets/appliedenergistics2/recipes/network/parts/part-creative-energy-cell.recipe +++ b/src/main/resources/assets/appliedenergistics2/recipes/network/parts/part-creative-energy-cell.recipe @@ -1,3 +1,3 @@ shapeless= - ae2:ItemPart.QuartzFiber ae2:BlockCreativeEnergyCell + ae2:ItemPart.CableAnchor ae2:BlockCreativeEnergyCell -> 1 ae2:ItemPart.PartCreativeEnergy \ No newline at end of file diff --git a/src/main/resources/assets/appliedenergistics2/textures/blocks/ItemPart.PartCreativeEnergy.png b/src/main/resources/assets/appliedenergistics2/textures/blocks/ItemPart.PartCreativeEnergy.png index d6d1c395b95e85c59ad01613d4707f6eafeadc4a..6c891e5a88a5589254a97642ec073ca57260fc54 100644 GIT binary patch delta 148 zcmdnPe1ds`qoHVkPl&6ouCAD%;))e3)a9*GQc`Z*xWT}{z!K;21xT@%1o;L32LlEv zZ)UfNdH*7uJzX3_G=h8kIJpie@UYDFJ@bG5nr$5!8l?$}k|zQmJqQw+@L;X`vWi)9 y2F2#hsxNdDEw?_pG~GivGt+9e-0dI2g1ljVEUD9(F17=$VDNPHb6Mw<&;$T_x;aGv delta 136 zcmX@XyoY&$qpnbZPl&6ouI`N+H#|K(#RL`A<*gVP7+6Hho&hPgk|4j}{~*AydH<6A z6N~-@SbMrShG+yQC$KWJxw%PjI~f`p8#_h>Fs6x#rEzdiXJ`{sah7zL|rg` lsM)ZPHA_S{_S7jZ2KIH#7i$*mm<=?U!PC{xWt~$(69B*?D#!o; From 392f4941bcf0e0f20070037f7353db75127f34f6 Mon Sep 17 00:00:00 2001 From: lordIcocain Date: Wed, 18 Dec 2024 19:57:34 +0200 Subject: [PATCH 7/8] change icon position on inventory --- src/main/java/appeng/parts/networking/PartCreativeEnergy.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/appeng/parts/networking/PartCreativeEnergy.java b/src/main/java/appeng/parts/networking/PartCreativeEnergy.java index e54a894f541..690863f5b8d 100644 --- a/src/main/java/appeng/parts/networking/PartCreativeEnergy.java +++ b/src/main/java/appeng/parts/networking/PartCreativeEnergy.java @@ -41,7 +41,7 @@ public void renderInventory(final IPartRenderHelper rh, final RenderBlocks rende this.getItemStack().getIconIndex(), CableBusTextures.PartTunnelSides.getIcon(), CableBusTextures.PartTunnelSides.getIcon()); - rh.setBounds(4.0f, 4.0f, 12.0f, 12.0f, 12.0f, 13.0f); + rh.setBounds(4.0f, 4.0f, 8.0f, 12.0f, 12.0f, 9.0f); rh.renderInventoryBox(renderer); } From 7f46be5b3038e94f17bcf6fff3e06e72f65819ce Mon Sep 17 00:00:00 2001 From: lordIcocain Date: Mon, 23 Dec 2024 20:59:39 +0200 Subject: [PATCH 8/8] moveon --- src/main/java/appeng/items/parts/PartType.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/appeng/items/parts/PartType.java b/src/main/java/appeng/items/parts/PartType.java index 1a5fed2fb4e..acafe21b24f 100644 --- a/src/main/java/appeng/items/parts/PartType.java +++ b/src/main/java/appeng/items/parts/PartType.java @@ -133,9 +133,6 @@ public boolean isCable() { QuartzFiber(140, EnumSet.of(AEFeature.Core), EnumSet.noneOf(IntegrationType.class), PartQuartzFiber.class), - PartCreativeEnergy(690, EnumSet.of(AEFeature.Core), EnumSet.noneOf(IntegrationType.class), - PartCreativeEnergy.class), - Monitor(160, EnumSet.of(AEFeature.Core), EnumSet.noneOf(IntegrationType.class), PartPanel.class), SemiDarkMonitor(180, EnumSet.of(AEFeature.Core), EnumSet.noneOf(IntegrationType.class), PartSemiDarkPanel.class), @@ -216,7 +213,10 @@ public boolean isCable() { PartInterfaceTerminal.class), PatternTerminalEx(500, EnumSet.of(AEFeature.Patterns), EnumSet.noneOf(IntegrationType.class), - PartPatternTerminalEx.class); + PartPatternTerminalEx.class), + + PartCreativeEnergy(690, EnumSet.of(AEFeature.Core), EnumSet.noneOf(IntegrationType.class), + PartCreativeEnergy.class); public final int baseDamage; private final Set features;