From 3834bff82603423ae6b0de542d76fc471738ec78 Mon Sep 17 00:00:00 2001 From: Astoria Date: Thu, 11 Apr 2024 10:40:05 -0500 Subject: [PATCH] Textures! Not great ones, but they exist. --- .../net/brokenmoon/redcontrol/RedControl.java | 4 +-- .../redcontrol/blocks/NetworkCarrier.java | 14 +++++++++++ .../assets/redcontrol/blockstates/cpu.json | 8 ++++++ .../redcontrol/blockstates/disk_drive.json | 8 ++++++ .../redcontrol/blockstates/monitor.json | 8 ++++++ .../assets/redcontrol/models/block/cpu.json | 23 ++++++++++++++++++ .../redcontrol/models/block/disk_drive.json | 23 ++++++++++++++++++ .../redcontrol/models/block/monitor.json | 23 ++++++++++++++++++ .../assets/redcontrol/models/item/cpu.json | 3 +++ .../redcontrol/models/item/disk_drive.json | 3 +++ .../redcontrol/models/item/monitor.json | 3 +++ .../assets/redcontrol/textures/block/cpu.ase | Bin 0 -> 418 bytes .../assets/redcontrol/textures/block/cpu.png | Bin 0 -> 231 bytes .../redcontrol/textures/block/disk_drive.ase | Bin 0 -> 411 bytes .../redcontrol/textures/block/disk_drive.png | Bin 0 -> 226 bytes .../redcontrol/textures/block/monitor.ase | Bin 0 -> 993 bytes .../redcontrol/textures/block/monitor.png | Bin 0 -> 1105 bytes .../textures/block/monitor_back.png | Bin 0 -> 297 bytes .../textures/block/monitor_bottom.png | Bin 0 -> 109 bytes .../textures/block/monitor_front.png | Bin 0 -> 276 bytes .../textures/block/monitor_left.png | Bin 0 -> 272 bytes .../textures/block/monitor_right.png | Bin 0 -> 267 bytes .../redcontrol/textures/block/monitor_top.png | Bin 0 -> 105 bytes 23 files changed, 118 insertions(+), 2 deletions(-) create mode 100644 src/main/resources/assets/redcontrol/blockstates/cpu.json create mode 100644 src/main/resources/assets/redcontrol/blockstates/disk_drive.json create mode 100644 src/main/resources/assets/redcontrol/blockstates/monitor.json create mode 100644 src/main/resources/assets/redcontrol/models/block/cpu.json create mode 100644 src/main/resources/assets/redcontrol/models/block/disk_drive.json create mode 100644 src/main/resources/assets/redcontrol/models/block/monitor.json create mode 100644 src/main/resources/assets/redcontrol/models/item/cpu.json create mode 100644 src/main/resources/assets/redcontrol/models/item/disk_drive.json create mode 100644 src/main/resources/assets/redcontrol/models/item/monitor.json create mode 100644 src/main/resources/assets/redcontrol/textures/block/cpu.ase create mode 100644 src/main/resources/assets/redcontrol/textures/block/cpu.png create mode 100644 src/main/resources/assets/redcontrol/textures/block/disk_drive.ase create mode 100644 src/main/resources/assets/redcontrol/textures/block/disk_drive.png create mode 100644 src/main/resources/assets/redcontrol/textures/block/monitor.ase create mode 100644 src/main/resources/assets/redcontrol/textures/block/monitor.png create mode 100644 src/main/resources/assets/redcontrol/textures/block/monitor_back.png create mode 100644 src/main/resources/assets/redcontrol/textures/block/monitor_bottom.png create mode 100644 src/main/resources/assets/redcontrol/textures/block/monitor_front.png create mode 100644 src/main/resources/assets/redcontrol/textures/block/monitor_left.png create mode 100644 src/main/resources/assets/redcontrol/textures/block/monitor_right.png create mode 100644 src/main/resources/assets/redcontrol/textures/block/monitor_top.png diff --git a/src/main/java/net/brokenmoon/redcontrol/RedControl.java b/src/main/java/net/brokenmoon/redcontrol/RedControl.java index 550beea..e3fd360 100644 --- a/src/main/java/net/brokenmoon/redcontrol/RedControl.java +++ b/src/main/java/net/brokenmoon/redcontrol/RedControl.java @@ -46,10 +46,10 @@ public class RedControl implements ModInitializer { LOGGER.info("Initializing RedControl!"); Registry.register(Registries.BLOCK, new Identifier("redcontrol", "cpu"), CPU); Registry.register(Registries.BLOCK, new Identifier("redcontrol", "monitor"), MONITOR); - Registry.register(Registries.BLOCK, new Identifier("redcontrol", "drive"), DRIVE); + Registry.register(Registries.BLOCK, new Identifier("redcontrol", "disk_drive"), DRIVE); Registry.register(Registries.ITEM, new Identifier("redcontrol", "cpu"), new BlockItem(CPU, new FabricItemSettings())); Registry.register(Registries.ITEM, new Identifier("redcontrol", "monitor"), new BlockItem(MONITOR, new FabricItemSettings())); - Registry.register(Registries.ITEM, new Identifier("redcontrol", "drive"), new BlockItem(DRIVE, new FabricItemSettings())); + Registry.register(Registries.ITEM, new Identifier("redcontrol", "disk_drive"), new BlockItem(DRIVE, new FabricItemSettings())); } } \ No newline at end of file diff --git a/src/main/java/net/brokenmoon/redcontrol/blocks/NetworkCarrier.java b/src/main/java/net/brokenmoon/redcontrol/blocks/NetworkCarrier.java index 53db078..6efecca 100644 --- a/src/main/java/net/brokenmoon/redcontrol/blocks/NetworkCarrier.java +++ b/src/main/java/net/brokenmoon/redcontrol/blocks/NetworkCarrier.java @@ -7,7 +7,10 @@ import net.brokenmoon.redcontrol.mixin.RedBusAccessor; import net.minecraft.block.*; import net.minecraft.entity.LivingEntity; import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.ItemPlacementContext; import net.minecraft.item.ItemStack; +import net.minecraft.state.StateManager; +import net.minecraft.state.property.Properties; import net.minecraft.text.Text; import net.minecraft.util.ActionResult; import net.minecraft.util.Hand; @@ -97,4 +100,15 @@ public abstract class NetworkCarrier extends BlockWithEntity implements BlockEnt return ActionResult.SUCCESS; } + + @Override + protected void appendProperties(StateManager.Builder builder) { + builder.add(Properties.HORIZONTAL_FACING); + } + + @Override + public BlockState getPlacementState(ItemPlacementContext ctx) { + return super.getPlacementState(ctx).with(Properties.HORIZONTAL_FACING, ctx.getHorizontalPlayerFacing().getOpposite()); + } + } diff --git a/src/main/resources/assets/redcontrol/blockstates/cpu.json b/src/main/resources/assets/redcontrol/blockstates/cpu.json new file mode 100644 index 0000000..f817c96 --- /dev/null +++ b/src/main/resources/assets/redcontrol/blockstates/cpu.json @@ -0,0 +1,8 @@ +{ + "variants": { + "facing=north": { "model": "redcontrol:block/cpu", "uvlock": false }, + "facing=east": { "model": "redcontrol:block/cpu", "y": 90, "uvlock": false }, + "facing=south": { "model": "redcontrol:block/cpu", "y": 180, "uvlock": false }, + "facing=west": { "model": "redcontrol:block/cpu", "y": 270, "uvlock": false } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/redcontrol/blockstates/disk_drive.json b/src/main/resources/assets/redcontrol/blockstates/disk_drive.json new file mode 100644 index 0000000..cf95c47 --- /dev/null +++ b/src/main/resources/assets/redcontrol/blockstates/disk_drive.json @@ -0,0 +1,8 @@ +{ + "variants": { + "facing=north": { "model": "redcontrol:block/disk_drive", "uvlock": false }, + "facing=east": { "model": "redcontrol:block/disk_drive", "y": 90, "uvlock": false }, + "facing=south": { "model": "redcontrol:block/disk_drive", "y": 180, "uvlock": false }, + "facing=west": { "model": "redcontrol:block/disk_drive", "y": 270, "uvlock": false } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/redcontrol/blockstates/monitor.json b/src/main/resources/assets/redcontrol/blockstates/monitor.json new file mode 100644 index 0000000..dfa8163 --- /dev/null +++ b/src/main/resources/assets/redcontrol/blockstates/monitor.json @@ -0,0 +1,8 @@ +{ + "variants": { + "facing=north": { "model": "redcontrol:block/monitor", "uvlock": false }, + "facing=east": { "model": "redcontrol:block/monitor", "y": 90, "uvlock": false }, + "facing=south": { "model": "redcontrol:block/monitor", "y": 180, "uvlock": false }, + "facing=west": { "model": "redcontrol:block/monitor", "y": 270, "uvlock": false } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/redcontrol/models/block/cpu.json b/src/main/resources/assets/redcontrol/models/block/cpu.json new file mode 100644 index 0000000..64cebdb --- /dev/null +++ b/src/main/resources/assets/redcontrol/models/block/cpu.json @@ -0,0 +1,23 @@ +{ "parent": "block/block", + "textures": { + "front": "redcontrol:block/cpu", + "left": "redcontrol:block/monitor_left", + "right": "redcontrol:block/monitor_right", + "back": "redcontrol:block/monitor_back", + "top": "redcontrol:block/monitor_bottom", + "bottom": "redcontrol:block/monitor_top" + }, + "elements": [ + { "from": [ 0, 0, 0 ], + "to": [ 16, 16, 16 ], + "faces": { + "down": { "texture": "#bottom", "cullface": "down" }, + "up": { "texture": "#top", "cullface": "up" }, + "north": { "texture": "#front", "cullface": "north" }, + "south": { "texture": "#back", "cullface": "south" }, + "west": { "texture": "#right", "cullface": "west" }, + "east": { "texture": "#left", "cullface": "east" } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/redcontrol/models/block/disk_drive.json b/src/main/resources/assets/redcontrol/models/block/disk_drive.json new file mode 100644 index 0000000..b839bb0 --- /dev/null +++ b/src/main/resources/assets/redcontrol/models/block/disk_drive.json @@ -0,0 +1,23 @@ +{ "parent": "block/block", + "textures": { + "front": "redcontrol:block/disk_drive", + "left": "redcontrol:block/monitor_left", + "right": "redcontrol:block/monitor_right", + "back": "redcontrol:block/monitor_back", + "top": "redcontrol:block/monitor_bottom", + "bottom": "redcontrol:block/monitor_top" + }, + "elements": [ + { "from": [ 0, 0, 0 ], + "to": [ 16, 16, 16 ], + "faces": { + "down": { "texture": "#bottom", "cullface": "down" }, + "up": { "texture": "#top", "cullface": "up" }, + "north": { "texture": "#front", "cullface": "north" }, + "south": { "texture": "#back", "cullface": "south" }, + "west": { "texture": "#right", "cullface": "west" }, + "east": { "texture": "#left", "cullface": "east" } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/redcontrol/models/block/monitor.json b/src/main/resources/assets/redcontrol/models/block/monitor.json new file mode 100644 index 0000000..343d9d4 --- /dev/null +++ b/src/main/resources/assets/redcontrol/models/block/monitor.json @@ -0,0 +1,23 @@ +{ "parent": "block/block", + "textures": { + "front": "redcontrol:block/monitor_front", + "left": "redcontrol:block/monitor_left", + "right": "redcontrol:block/monitor_right", + "back": "redcontrol:block/monitor_back", + "top": "redcontrol:block/monitor_bottom", + "bottom": "redcontrol:block/monitor_top" + }, + "elements": [ + { "from": [ 0, 0, 0 ], + "to": [ 16, 16, 16 ], + "faces": { + "down": { "texture": "#bottom", "cullface": "down" }, + "up": { "texture": "#top", "cullface": "up" }, + "north": { "texture": "#front", "cullface": "north" }, + "south": { "texture": "#back", "cullface": "south" }, + "west": { "texture": "#right", "cullface": "west" }, + "east": { "texture": "#left", "cullface": "east" } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/redcontrol/models/item/cpu.json b/src/main/resources/assets/redcontrol/models/item/cpu.json new file mode 100644 index 0000000..4530cc2 --- /dev/null +++ b/src/main/resources/assets/redcontrol/models/item/cpu.json @@ -0,0 +1,3 @@ +{ + "parent": "redcontrol:block/cpu" +} \ No newline at end of file diff --git a/src/main/resources/assets/redcontrol/models/item/disk_drive.json b/src/main/resources/assets/redcontrol/models/item/disk_drive.json new file mode 100644 index 0000000..4125203 --- /dev/null +++ b/src/main/resources/assets/redcontrol/models/item/disk_drive.json @@ -0,0 +1,3 @@ +{ + "parent": "redcontrol:block/disk_drive" +} \ No newline at end of file diff --git a/src/main/resources/assets/redcontrol/models/item/monitor.json b/src/main/resources/assets/redcontrol/models/item/monitor.json new file mode 100644 index 0000000..a63f05a --- /dev/null +++ b/src/main/resources/assets/redcontrol/models/item/monitor.json @@ -0,0 +1,3 @@ +{ + "parent": "redcontrol:block/monitor" +} \ No newline at end of file diff --git a/src/main/resources/assets/redcontrol/textures/block/cpu.ase b/src/main/resources/assets/redcontrol/textures/block/cpu.ase new file mode 100644 index 0000000000000000000000000000000000000000..3da393b7ddb644a768c3a32b9819df528384e17a GIT binary patch literal 418 zcmZ3)$iVPmDItzu+j zX>VU*kkAyJ_b_?(|M;^{PT&6X|NsBlYqz)5wP$8!MTP~HId!cuGP)U_e7$;C|8%de zd;@uqO$y9F5(fSQ8SD%`iIu5E3Wmi%4yyu0>OT{Nh6GN<9Ak6SpZRti8`@@Rc}mRw zr&Ij;zg!htLfNF{59|4}-~K;l^{V8u|H|K*7ws?1xb`o9Yw5rE)KvCmA77q7&&!Zp dQntAF@&8P|yo6aYe~;XW&j<_;OXk;vd$@?2>?JRTKxb3 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/redcontrol/textures/block/disk_drive.ase b/src/main/resources/assets/redcontrol/textures/block/disk_drive.ase new file mode 100644 index 0000000000000000000000000000000000000000..de5b0f988ff29ab4286ce8745f6bce5beaf5cdac GIT binary patch literal 411 zcmbQu$iVPmDI4A6dY*vH*=017dasu$4%b zWC7VMAlE4X8A=K!t{OIJmWKUd*7pn5ZZ1fBcX-zCPi8Zp24w9sFrSj=ov9z>tzu+j zX>VU*kkAyJ_b_?(|M;^{PT&6X|NsBlYqz)5wP$8!MTP~HId!cuGP)U_e7$;C|8%de zd;@uqO$y9F5(fSQ8SD%`iIu5E3WhmA4yyu0>OT{Nh6GN<9Ak6SpZRti8`@@Rc}h&L zbFJL@f0NOr2tyCP`E{bINB>WH^yt5|0{{PaB9Smc_TpeUB~+6OMS+^I(Hi Z{JTD-Ym*+9r~}=};OXk;vd$@?2>_=;Syli5 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/redcontrol/textures/block/monitor.ase b/src/main/resources/assets/redcontrol/textures/block/monitor.ase new file mode 100644 index 0000000000000000000000000000000000000000..0e6b10da22eeb781f737baa7bf2a13ff9e4759dd GIT binary patch literal 993 zcmaFJ%)szqDI*DFI2m^Ano1ZS-(G-&3qb=wa>tON}hM7evr3{ zk&UIjeThLrQ*_?LRtWQ zy}I%Z;?Oq zt2Tz^B&mH=y{IBRx$BCEcg^zKW}yNH%|ohIa2<6LwGpw+$bY-?%aZT&et(>2#H~Cz zwfvs?>uts#HZ>z1f_%8iDn5Y_*z!O3$5ANRpS5d7&};pG9>H+dTW6 z<;FAi)mN6qu?1Rd3fEaRubQ7SVdLyClXdIQ7lqw{i-9hhM6@dfxWUja#-1|L;~uM8&nH75iDWuX_CJl@K3) z*@Hi)m-j7RQ=eJM8W#WiLY8jCM|a7McU$70Sc-OYqq)K^LeS@qyI}joOCWdEpNW;$!#J zw>}K7ber{Qc17K+Z>!hHNB^FFBIfum8v2sdk&X<~aZEWbSW0p7Ql2kIMJAXT$UUAOD`ev2L329K%!n z>wWE#ZPeE1C;gp0r+(_C+WHHz-*-L!|Gw_-^Ld}G_ah^p$9tE5IQ8@FkJS6obME)q z8^3W}TFA2WmD-iGe#Q1@3X^B@)%9uf{`P$uk>LLXNJz3gDGnnjq4b->EM5n-@mKmm;OJh(=_#H%>(^u(vAB=TpRb#a&MHsEx*|Q?d#)r_h-G;e_9p& F8UUqopg{lt literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/redcontrol/textures/block/monitor.png b/src/main/resources/assets/redcontrol/textures/block/monitor.png new file mode 100644 index 0000000000000000000000000000000000000000..434d1965c4c8c8ae969dcb42e5a745be4f44ef55 GIT binary patch literal 1105 zcmV-X1g`suP)Px(3rR#lRA_Vs6LSht9qltIi`U~K~7%tTC3%v3d z81=#!FZ34}y)fRHNbn0UL`0)O-3B8fnpW7>v5k2#PVL9(S-YNEmh4HIzHQIx`#gQ$ z^PY1mz#|^qzf<yxcN}9_Anw;jga1fpD>dr_o|5y^%u0S>Gcac z0gb$qX8@q7qY=G*>#pJY)ted1*YGOv?aUKL?d&2EvLj(84*(-WC(ASue&NyM_nLiR zf4uzd`+~){Xubi^$rFqWo%B7W03&&V1N-9^-xdLOJz+R?vnudgC#-KGnn5d-tTwiTc)N-)KVw#*gq4;eD>^VS19T!2tTrJ6%a5Rx^XJ`?ijdEUdgj3kndQvHAS;1u<0REN6*Dt3X zx8(t*0M;B~h8se5ZEK0FCLons!otE=oIih#X(tj%iz6O0Do{xwk}}VpJx4r#kZEfI zQmG}(&d%Y`p*ZH|J|dAw+S-GI0|uvxq9DJqiPjboqoc?0^yvrf%mV47uk*23KW1m= zpeTP3jYgR^P{|MxfJRJ`Iv~q3(+-C_Y)KK)dh+>=O~ZL~^q6h`aJU15g9DId8Ir`d z6N%)%2DEBZ3kKeT3bZJnH3pH3PX~@hH+QT_Pi;niyhf^hUa;}>w4+c_>8Ci zbsvF-fS}P35HuPBf<{9?&}aw<8VvzK!}EUN=#j&o_5+_je`)LoxWMg?U;Q6wFK9%- zjGsS&-90BzEUck*M+EZ9JCuq!V6*a9V$UAF{(Ol*KJx>j(2QasgO;{VwC(JM(A4CI zD}MwO@(PND3^sDVQ7YuHW7j^EOC>*C@lT;jimYuN09pYQSGlJSLER7Hx);DLg?QC< zx8NqAy&Z@|M3jnUDC;cD=GpWd1WR8{5al3xU}SsV7R$_k;K^ X;II()?-{W400000NkvXXu0mjfRzwb` literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/redcontrol/textures/block/monitor_back.png b/src/main/resources/assets/redcontrol/textures/block/monitor_back.png new file mode 100644 index 0000000000000000000000000000000000000000..18b441e562359d7d0f1801aa5e792cdfa06d5b1d GIT binary patch literal 297 zcmV+^0oMMBP)Px#<4Ht8R5*>TlTB;FKoEwXjUS0xNQsda?6sx$g8%<7c<~QZ3N<1wx@7F`COv2l zVvySPg@HNj4A0EFqu$?MYXTI76a#ddBu&$s3bodECTLU?@c8_JvpeEJ&UQ7&yArAj zfXU?ieJjDid=sf2&KmkjMlyOrbvmsCtqtr!Px#&PhZ;R5*?8lEDpvKoCVAgg_0;-4k9+P>c;why_@ICo8Z33$X!XyxRiAgNdj} zP(%;9${Hld*?*Z$cHZBgnbo|mdjn{-I~?~r(j*}{9Z2GsI@0A~y9vm$3)k#Y3zRYd z!Z08VgP%YEA?$a8@pM)jEcR+%*S!^A@AU_j@M^gzPta6Y`T}oXl$e{180%?D_NKC5(#9`|5tX?PGj#?kL*>HW|wz89C-ppNcFF zv&sg@aT~C0t58?#4LHwwgJGXZ)5E6Y{qv1vEDB~Q{5~=9@eDSbx<6AMURtWnGilN! zp73=s$4^h2KK-!CgNKLRd8(?cc>es^!y|83bKvx|$B&QlFh2>HIzd4Fgc}>fn|JBG U?rBFtfxcq!boFyt=akR{0K>CuCIA2c literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/redcontrol/textures/block/monitor_right.png b/src/main/resources/assets/redcontrol/textures/block/monitor_right.png new file mode 100644 index 0000000000000000000000000000000000000000..1b960d93eb855af8b8f35adea6b5d5456e7829d8 GIT binary patch literal 267 zcmV+m0rdWfP)Px##Ysd#R5*>TkwFTAP!NW{qHWG1HzMW*qE!)r*KwuCsa2N|65LA{FmY$#3vyel z1QSigf#Lm&Vcy4lv%`M(2Jn2BF}3JB7={tLz9P>b)oa^p=A*vtA~>HejUmr>ahzkn z1prE^DvQW40)SUpj$bg;MsEvgnvo>;%E0#~(^_bAZCPg3zcnpEo9nKs5rknxnq~k5 z!S!!$5ZLybIKH9O6T>h%Gk|58bplOWvfXYdiUN`DoFw-qfry5PR=f7U`~fn1VNA58 R(h~px002ovPDHLkV1f_8ZL|OY literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/redcontrol/textures/block/monitor_top.png b/src/main/resources/assets/redcontrol/textures/block/monitor_top.png new file mode 100644 index 0000000000000000000000000000000000000000..f3e98e755e756dc31b4160ae86039fcb51a021b3 GIT binary patch literal 105 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|ls#P>Lo9le zW407Lt7qe45LTV#&MRS>aD{;-!NlBD^2Qwwh9zfMW~S->eh5^~;OXk;vd$@?2>{Ln B8=e3F literal 0 HcmV?d00001