From 685e23522f271cb33a493e269d7ca885833f3359 Mon Sep 17 00:00:00 2001 From: Astoria Date: Sun, 9 Apr 2023 19:54:34 -0500 Subject: [PATCH] New items, and recipes! Probably going to change them later, but stuff can now be crafted! --- .../net/brokenmoon/afloydwiremod/WireMod.java | 29 +++++++++++++++--- .../afloydwiremod/WiremodConfig.java | 18 ++++++++--- .../assets/afloydwiremod/config.toml | 3 ++ .../assets/afloydwiremod/item/circuitdead.png | Bin 0 -> 297 bytes .../assets/afloydwiremod/item/circuitdie.ase | Bin 0 -> 1141 bytes .../assets/afloydwiremod/item/circuitdie.png | Bin 0 -> 276 bytes .../assets/afloydwiremod/item/redsilica.ase | Bin 0 -> 837 bytes .../assets/afloydwiremod/item/redsilica.png | Bin 0 -> 288 bytes .../resources/lang/afloydwiremod/en_US.lang | 6 ++++ 9 files changed, 46 insertions(+), 10 deletions(-) create mode 100644 src/main/resources/assets/afloydwiremod/item/circuitdead.png create mode 100644 src/main/resources/assets/afloydwiremod/item/circuitdie.ase create mode 100644 src/main/resources/assets/afloydwiremod/item/circuitdie.png create mode 100644 src/main/resources/assets/afloydwiremod/item/redsilica.ase create mode 100644 src/main/resources/assets/afloydwiremod/item/redsilica.png diff --git a/src/main/java/net/brokenmoon/afloydwiremod/WireMod.java b/src/main/java/net/brokenmoon/afloydwiremod/WireMod.java index 5512c83..0a7a974 100644 --- a/src/main/java/net/brokenmoon/afloydwiremod/WireMod.java +++ b/src/main/java/net/brokenmoon/afloydwiremod/WireMod.java @@ -14,12 +14,14 @@ import net.brokenmoon.afloydwiremod.tileentity.*; import net.fabricmc.api.ModInitializer; import net.minecraft.src.Block; import net.minecraft.src.Item; +import net.minecraft.src.ItemStack; import net.minecraft.src.Material; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import turniplabs.halplibe.helper.BlockHelper; import turniplabs.halplibe.helper.EntityHelper; import turniplabs.halplibe.helper.ItemHelper; +import turniplabs.halplibe.helper.RecipeHelper; public class WireMod implements ModInitializer { @@ -38,15 +40,18 @@ public class WireMod implements ModInitializer { AccessorPacket.callAddIdClassMapping(config.chipSettingsPacket, true, true, WiremodSettingsPacket.class); } + //Tile public static Block ChipTile = BlockHelper.createBlock(MOD_ID, new ChipTile(config.chipTileID, Material.iron), "chipTile", "chip.png", Block.soundMetalFootstep,1.5f, 6f, 0 ); - - public static Item ToolProgrammer = ItemHelper.createItem(MOD_ID, new ToolProgrammer(config.programmerItemID), "toolProgrammer", "progtool.png"); - public static ToolWiring ToolWiringClass = new ToolWiring(config.wiringItemID); - public static Item ToolWiring = ItemHelper.createItem(MOD_ID, ToolWiringClass, "toolWiring", "wiretool.png"); - public static Block LinkTileInactive = BlockHelper.createBlock(MOD_ID, new RedstoneLinkTile(config.linkTileInactiveID, Material.iron, false), "linkTile", "linkOff.png", Block.soundStoneFootstep, 1.5f, 6f, 0); public static Block LinkTileActive = BlockHelper.createBlock(MOD_ID, new RedstoneLinkTile(config.linkTileActiveID, Material.iron, true), "linkTile", "linkOn.png", Block.soundStoneFootstep, 1.5f, 6f, 0); public static Block ScreenTile = BlockHelper.createBlock(MOD_ID, new DisplayTile(config.displayTileID, Material.glass), "displayTile", "display.png", Block.soundGlassFootstep, 1.5f, 6f, 0); + //Item + public static Item ToolProgrammer = ItemHelper.createItem(MOD_ID, new ToolProgrammer(config.programmerItemID), "toolProgrammer", "progtool.png"); + public static ToolWiring ToolWiringClass = new ToolWiring(config.wiringItemID); + public static Item ToolWiring = ItemHelper.createItem(MOD_ID, ToolWiringClass, "toolWiring", "wiretool.png"); + public static Item RedSilica = ItemHelper.createItem(MOD_ID, new Item(config.redsilicaID), "redSilica", "redsilica.png"); + public static Item ChipDie = ItemHelper.createItem(MOD_ID, new Item(config.dieID), "chipDie", "circuitdie.png"); + public static Item BrokenDie = ItemHelper.createItem(MOD_ID, new Item(config.dieOvercookedID), "chipDieBroken", "circuitdead.png"); @Override public void onInitialize() { @@ -56,5 +61,19 @@ public class WireMod implements ModInitializer { EntityHelper.createTileEntity(RedstoneLinkTileEntity.class, "Redstone Link"); EntityHelper.createSpecialTileEntity(AbstractWireTileEntity.class, new TERWire(), "Wire"); EntityHelper.createSpecialTileEntity(DisplayTileEntity.class, new TERDisplay(), "Display"); + + //Recipes + //Silica + RecipeHelper.Crafting.createShapelessRecipe(RedSilica, 8, new Object[]{new ItemStack(Item.dustRedstone, 1), new ItemStack(Item.dustRedstone, 1), new ItemStack(Item.dustRedstone, 1), new ItemStack(Block.sand, 1)}); + //Dies + RecipeHelper.Smelting.createRecipe(ChipDie, RedSilica); + RecipeHelper.Blasting.createRecipe(BrokenDie, RedSilica); + //Tools + RecipeHelper.Crafting.createRecipe(ToolWiring, 1, new Object[]{"ABC", "#D#", "#D#", 'A', Item.nuggetIron, 'B', Item.ingotIron, 'C', RedSilica, 'D', Item.stick}); + RecipeHelper.Crafting.createRecipe(ToolProgrammer, 1, new Object[]{"ABC", "#D#", "#D#", 'A', Item.nuggetIron, 'B', Item.ingotIron, 'C', ChipDie, 'D', Item.stick}); + //Blocks + RecipeHelper.Crafting.createRecipe(ChipTile, 1, new Object[]{"#A#", "ABA", "#A#", 'A', Item.nuggetIron, 'B', ChipDie}); + RecipeHelper.Crafting.createRecipe(ScreenTile, 1, new Object[]{"#A#", "BCB", "#B#", 'A', Block.glass, 'B', Item.nuggetIron, 'C', ChipDie}); + RecipeHelper.Crafting.createRecipe(LinkTileInactive, 1, new Object[]{"#A#", "BCB", "#B#", 'A', Block.blockRedstone, 'B', Item.nuggetIron, 'C', ChipDie}); } } diff --git a/src/main/java/net/brokenmoon/afloydwiremod/WiremodConfig.java b/src/main/java/net/brokenmoon/afloydwiremod/WiremodConfig.java index 8e1fcbb..625d5e6 100644 --- a/src/main/java/net/brokenmoon/afloydwiremod/WiremodConfig.java +++ b/src/main/java/net/brokenmoon/afloydwiremod/WiremodConfig.java @@ -15,12 +15,17 @@ public class WiremodConfig { public int wiringPacket; public int wiringSettingsPacket; public int chipSettingsPacket; - public int programmerItemID; - public int wiringItemID; + //Tiles public int chipTileID; public int linkTileInactiveID; public int linkTileActiveID; public int displayTileID; + //Items + public int programmerItemID; + public int wiringItemID; + public int redsilicaID; + public int dieID; + public int dieOvercookedID; public WiremodConfig(){ @@ -33,14 +38,17 @@ public class WiremodConfig { wiringSettingsPacket = toml.getLong("ids.packet.wiringSettingsGui", (long)113).intValue(); syncPacket = toml.getLong("ids.packet.sync", (long)114).intValue(); chipSettingsPacket = toml.getLong("ids.packet.chipSettingsGui", (long)115).intValue(); - //Items - programmerItemID = toml.getLong("ids.item.programmingTool", (long)906).intValue(); - wiringItemID = toml.getLong("ids.item.wiringTool", (long)907).intValue(); //Tiles chipTileID = toml.getLong("ids.tile.chipTile", (long)905).intValue(); linkTileInactiveID = toml.getLong("ids.tile.linkTileInactive", (long)906).intValue(); linkTileActiveID = toml.getLong("ids.tile.linkTileActive", (long)907).intValue(); displayTileID = toml.getLong("ids.tile.displayTile", (long)908).intValue(); + //Items + programmerItemID = toml.getLong("ids.item.programmingTool", (long)909).intValue(); + wiringItemID = toml.getLong("ids.item.wiringTool", (long)910).intValue(); + redsilicaID = toml.getLong("ids.item.redSilica", (long)911).intValue(); + dieID = toml.getLong("ids.item.chipDie", (long)912).intValue(); + dieOvercookedID = toml.getLong("ids.item.chipDieOvercooked", (long)913).intValue(); } public static File getConfig() { diff --git a/src/main/resources/assets/afloydwiremod/config.toml b/src/main/resources/assets/afloydwiremod/config.toml index 5ca244c..90dc827 100644 --- a/src/main/resources/assets/afloydwiremod/config.toml +++ b/src/main/resources/assets/afloydwiremod/config.toml @@ -9,6 +9,9 @@ displayTile = 908 [ids.item] programmingTool = 909 wiringTool = 910 +redSilica = 911 +chipDie = 912 +chipDieOvercooked = 913 [ids.packet] programming = 109 diff --git a/src/main/resources/assets/afloydwiremod/item/circuitdead.png b/src/main/resources/assets/afloydwiremod/item/circuitdead.png new file mode 100644 index 0000000000000000000000000000000000000000..056d63746afc70a72697bdd32a95b383fabc2e4f GIT binary patch literal 297 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1IggaDrqS0JsV zVB)G_lV)kyA7*{OQ0?Y|w0DPR{r+S&^JzfVJ_GY9dES}&LEb7xHkS7GB?bvi(RmM( zXaA2s`{eZPKmY&#pS^Z_OI>?rR#s$KP?=NL8Y82d;mOylclA&A>dH6xoxJBf&<=%? zAirP+plWrE~cZg zPbW#yUFvv3+lMK>Gvos1%+1I+H>o3aVv_kOp|v{yHC~GC;Qx8YhH;NO$FrmQ~c0$n=ysWcN8JS84C+s z*MXEmN(d1JLG(g|pk+a6A3`znLu&Q{K~fo^MeDy?=?Lpn=W>4>&U5bb|DAhpgNSHm zfT1W{VZ;!T4fpC`i3u$7_0`q?H~TCkTK*8pr$(Y}4DL{tj|>WVj`;?b{k5VDs_;`k zk%~iqu4~vuH2)qGk&?)mH(&zjq$|`cV&_dzBAX4km!ReNNEq*a;Sz)u1jd z70k$}2NNu9V5xH!wD$PHV`KB+MgMSga>p~R)Qr(g3P#WgxcL3B zfCBOnj%36l6M;xWlroUS3c%k33KU8Q%bM-AY~s%{zQ)Q3F6;hXPKv`*BKFUxqbaY^ zUTbx^s_Zt_;jDAm?AzAdC=1@`YN!wF+_dISF&S&itW|X-sD`ir3CO>4s7MN@rrtwi z1{oEIj0R6`%) z)12^$HY_cNZ_MD6FhPwYC<2YGmR5mDEb{uYt2LTvj^n~^a9r-5v&oy|wwgG3i@HD| zInGedjPS65ZzF(RuwOXuhc+Y;%e`K2=CwYBL?SQE5)AF1jq+vgiXKs^-!UQSp|K{u zf$*;lOlaWqwO_Z$@?%XY(ow@xcR97~kaV}c?XqR+n6hZjN#kDx3weB_z(2P3fzrjI znU`Jj#&Yv;lSS{7THVdn`Xdo1&Anm@0(--BP_eFGDDVY2LCovem literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/afloydwiremod/item/circuitdie.png b/src/main/resources/assets/afloydwiremod/item/circuitdie.png new file mode 100644 index 0000000000000000000000000000000000000000..2f472292b51ab46cbdb75836fe5fc86d3c574f3e GIT binary patch literal 276 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1IggaDrqS0JsV zVB)G_lV)kyA7*{OQ0?Y|w0DPR{r+S&^JzfVJ_GY9dES}&LEb7xHkS7GB?bvi(RmM( zXaA2s`{eZPKmY&#pS^Z_OI>?rR#s$KP?=NL8Y82d;mOylclA&A>dH6xoxJBf&<=%? zAirP+plWlb8l?Vn+ r@mREKf=dy*mbi*S=Q}~0IyQ#h*IdO(`(7;pn!w=c>gTe~DWM4fVx)E; literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/afloydwiremod/item/redsilica.ase b/src/main/resources/assets/afloydwiremod/item/redsilica.ase new file mode 100644 index 0000000000000000000000000000000000000000..6c2d2a434828b31b1e34bcade257abedf28d9e5f GIT binary patch literal 837 zcmb`GK}b_^9LIlq&u!|01Vguz|D1`QoNJ`wU}9`Y^AHw`=-`u?upJhKMH0l4P}#+a zQt3R{A?Q%xE$C2zC}ebw_|t*SNZ{^{*JUcX6&vh(yk&f z-W7#Y1HEuDH3;`_cf#_<6#TKZ27mv$09U_XhS_%^*te2{$xII%OLo9;bO6R;(=cSr z!W+3mm@b)c{PQ>XY3~G@G?CKlH}LVpd6>y&;q}xQyf<8cufkzizLthx9=wH%PcOm3 zt&o{z19jGWS9I6}J3t?I#IZ&hUt}>w6GsHGLk%yaFha+2F-|H_+)NVHd?j!QM-s$qRvsI zQ5x(bhEZIa$V(v5btU21U3sMS>w`ltFFw=c%sJ1;etWIXTDN0u13!kPX&Bz&$cG(i UNzWf0boldkH-kq3X?!lpKcG#%OaK4? literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/afloydwiremod/item/redsilica.png b/src/main/resources/assets/afloydwiremod/item/redsilica.png new file mode 100644 index 0000000000000000000000000000000000000000..080265e4fc10d6c5a9ec4744507ea616adfa5b4b GIT binary patch literal 288 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1IggaDrqS0JsV zVB)G_lV)kyA7*{OQ0?Y|w0DPR{r+S&^JzfVJ_GY9dES}&LEb7xHkS7GB?bvi(RmM( zXaA2s`{eZPKmY&#pS^Z_OI>?rR#s$KP?=NL8Y82d;mOylclA&A>dH6xoxJBf&<=%? zAirP+plWO}TyQX;R9ge!Mz&?GJ z6Gy1!zUHa3jhy#qx0Q7+6)1bD;PvyWbH?oxmS1~$e=~E;70u>Y3N($u)78&qol`;+ E01@GTy#N3J literal 0 HcmV?d00001 diff --git a/src/main/resources/lang/afloydwiremod/en_US.lang b/src/main/resources/lang/afloydwiremod/en_US.lang index bdcc36a..c1e720b 100644 --- a/src/main/resources/lang/afloydwiremod/en_US.lang +++ b/src/main/resources/lang/afloydwiremod/en_US.lang @@ -2,6 +2,12 @@ item.afloydwiremod.toolProgrammer.name=Programming Tool item.afloydwiremod.toolProgrammer.desc=Used to program chips. item.afloydwiremod.toolWiring.name=Wiring Tool item.afloydwiremod.toolWiring.desc=Used to connect outputs to inputs. +item.afloydwiremod.redSilica.name=Red Silica +item.afloydwiremod.redSilica.desc=Smeltable into logical products. +item.afloydwiremod.chipDie.name=Silicon Die +item.afloydwiremod.chipDie.desc=Too fragile to use unpackaged. +item.afloydwiremod.chipDieBroken.name=Broken Die +item.afloydwiremod.chipDieBroken.desc=Destroyed by the temperatures of the Blast Furnace. tile.afloydwiremod.chipTile.name=Chip tile.afloydwiremod.chipTile.desc=Used to preform mathematical calculations. tile.afloydwiremod.linkTile.name=Redstone Link