From 25bc102e928bda45ebd6ec7bf986b45c5808b793 Mon Sep 17 00:00:00 2001 From: Kryppers <65094918+Kryppers@users.noreply.github.com> Date: Sat, 27 Mar 2021 19:13:26 +0000 Subject: [PATCH 01/11] New contact, who dis? updated redstone contact textures. --- .../models/block/redstone_contact/block.json | 158 +++++++++--------- .../block/redstone_contact/block_powered.json | 85 +++++++++- .../create/textures/block/contact_back.png | Bin 0 -> 885 bytes .../create/textures/block/contact_front.png | Bin 509 -> 6624 bytes .../create/textures/block/contact_side.png | Bin 454 -> 6076 bytes .../textures/block/contact_side_powered.png | Bin 485 -> 898 bytes 6 files changed, 159 insertions(+), 84 deletions(-) create mode 100644 src/main/resources/assets/create/textures/block/contact_back.png diff --git a/src/main/resources/assets/create/models/block/redstone_contact/block.json b/src/main/resources/assets/create/models/block/redstone_contact/block.json index 29e376ae3..274c963cd 100644 --- a/src/main/resources/assets/create/models/block/redstone_contact/block.json +++ b/src/main/resources/assets/create/models/block/redstone_contact/block.json @@ -1,82 +1,82 @@ { - "__comment": "Model generated using MrCrayfish's Model Creator (http://mrcrayfish.com/modelcreator/)", + "credit": "Made with Blockbench", "parent": "block/block", - "textures": { - "particle": "create:block/contact_side", - "0": "create:block/brass_casing", - "1": "create:block/contact_side", - "2": "create:block/contact_front" - }, - "elements": [ - { - "name": "Center", - "from": [ 2.0, 1.0, 2.0 ], - "to": [ 14.0, 15.0, 14.0 ], - "faces": { - "up": { "texture": "#0", "uv": [ 2.0, 2.0, 14.0, 14.0 ] }, - "down": { "texture": "#0", "uv": [ 2.0, 2.0, 14.0, 14.0 ] } - } - }, - { - "name": "Side", - "from": [ 0.0, 0.0, 0.0 ], - "to": [ 2.0, 16.0, 16.0 ], - "faces": { - "north": { "texture": "#1", "uv": [ 14.0, 0.0, 16.0, 16.0 ] }, - "east": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }, - "south": { "texture": "#1", "uv": [ 0.0, 0.0, 2.0, 16.0 ] }, - "west": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }, - "up": { "texture": "#1", "uv": [ 0.0, 0.0, 2.0, 16.0 ] }, - "down": { "texture": "#1", "uv": [ 0.0, 0.0, 2.0, 16.0 ] } - } - }, - { - "name": "Side", - "from": [ 14.0, 0.0, 0.0 ], - "to": [ 16.0, 16.0, 16.0 ], - "faces": { - "north": { "texture": "#1", "uv": [ 0.0, 0.0, 2.0, 16.0 ] }, - "east": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }, - "south": { "texture": "#1", "uv": [ 14.0, 0.0, 16.0, 16.0 ] }, - "west": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }, - "up": { "texture": "#1", "uv": [ 14.0, 0.0, 16.0, 16.0 ] }, - "down": { "texture": "#1", "uv": [ 14.0, 0.0, 16.0, 16.0 ] } - } - }, - { - "name": "Short Side", - "from": [ 2.0, 0.0, 0.0 ], - "to": [ 14.0, 16.0, 2.0 ], - "faces": { - "north": { "texture": "#1", "uv": [ 2.0, 0.0, 14.0, 16.0 ] }, - "south": { "texture": "#1", "uv": [ 2.0, 0.0, 14.0, 16.0 ] }, - "up": { "texture": "#1", "uv": [ 2.0, 0.0, 14.0, 2.0 ] }, - "down": { "texture": "#1", "uv": [ 2.0, 14.0, 14.0, 16.0 ] } - } - }, - { - "name": "Short Side", - "from": [ 2.0, 0.0, 14.0 ], - "to": [ 14.0, 16.0, 16.0 ], - "faces": { - "north": { "texture": "#1", "uv": [ 2.0, 0.0, 14.0, 16.0 ] }, - "south": { "texture": "#1", "uv": [ 2.0, 0.0, 14.0, 16.0 ] }, - "up": { "texture": "#1", "uv": [ 2.0, 14.0, 14.0, 16.0 ] }, - "down": { "texture": "#1", "uv": [ 2.0, 0.0, 14.0, 2.0 ] } - } - }, - { - "name": "Contact", - "from": [ 6.0, 15.0, 6.0 ], - "to": [ 10.0, 16.0, 10.0 ], - "shade": false, - "faces": { - "north": { "texture": "#2", "uv": [ 6.0, 10.0, 10.0, 11.0 ] }, - "east": { "texture": "#2", "uv": [ 10.0, 6.0, 11.0, 10.0 ], "rotation": 90 }, - "south": { "texture": "#2", "uv": [ 5.0, 6.0, 6.0, 10.0 ], "rotation": 90 }, - "west": { "texture": "#2", "uv": [ 6.0, 5.0, 10.0, 6.0 ] }, - "up": { "texture": "#2", "uv": [ 6.0, 6.0, 10.0, 10.0 ] } - } - } - ] + "textures": { + "0": "create:block/contact_front", + "1": "create:block/contact_side", + "3": "create:block/contact_back", + "particle": "create:block/contact_side" + }, + "elements": [ + { + "name": "Center", + "from": [2, 1, 2], + "to": [14, 15, 14], + "faces": { + "up": {"uv": [2, 2, 14, 14], "texture": "#0"}, + "down": {"uv": [2, 2, 14, 14], "texture": "#3"} + } + }, + { + "name": "Side", + "from": [0, 0, 0], + "to": [2, 16, 16], + "faces": { + "north": {"uv": [14, 0, 16, 16], "texture": "#1"}, + "east": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 2, 16], "texture": "#1"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 2, 16], "texture": "#0"}, + "down": {"uv": [0, 0, 2, 16], "texture": "#0"} + } + }, + { + "name": "Side", + "from": [14, 0, 0], + "to": [16, 16, 16], + "faces": { + "north": {"uv": [0, 0, 2, 16], "texture": "#1"}, + "east": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "south": {"uv": [14, 0, 16, 16], "texture": "#1"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "up": {"uv": [14, 0, 16, 16], "texture": "#0"}, + "down": {"uv": [14, 0, 16, 16], "texture": "#3"} + } + }, + { + "name": "Short Side", + "from": [2, 0, 0], + "to": [14, 16, 2], + "faces": { + "north": {"uv": [2, 0, 14, 16], "texture": "#1"}, + "south": {"uv": [2, 0, 14, 16], "texture": "#1"}, + "up": {"uv": [2, 0, 14, 2], "texture": "#0"}, + "down": {"uv": [2, 14, 14, 16], "texture": "#3"} + } + }, + { + "name": "Short Side", + "from": [2, 0, 14], + "to": [14, 16, 16], + "faces": { + "north": {"uv": [2, 0, 14, 16], "texture": "#1"}, + "south": {"uv": [2, 0, 14, 16], "texture": "#1"}, + "up": {"uv": [2, 14, 14, 16], "texture": "#0"}, + "down": {"uv": [2, 0, 14, 2], "texture": "#3"} + } + }, + { + "name": "Contact", + "from": [6, 15, 6], + "to": [10, 16, 10], + "shade": false, + "faces": { + "north": {"uv": [6, 6, 10, 7], "rotation": 180, "texture": "#0"}, + "east": {"uv": [9, 6, 10, 10], "rotation": 90, "texture": "#0"}, + "south": {"uv": [9, 6, 10, 10], "rotation": 270, "texture": "#0"}, + "west": {"uv": [6, 6, 10, 7], "texture": "#0"}, + "up": {"uv": [6, 6, 10, 10], "texture": "#0"} + } + } + ] } \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/redstone_contact/block_powered.json b/src/main/resources/assets/create/models/block/redstone_contact/block_powered.json index eedc44be7..6ffaa77a0 100644 --- a/src/main/resources/assets/create/models/block/redstone_contact/block_powered.json +++ b/src/main/resources/assets/create/models/block/redstone_contact/block_powered.json @@ -1,7 +1,82 @@ { - "parent": "create:block/redstone_contact/block", - "textures": { - "particle": "create:block/contact_side_powered", - "1": "create:block/contact_side_powered" - } + "credit": "Made with Blockbench", + "parent": "block/block", + "textures": { + "0": "create:block/contact_front", + "1": "create:block/contact_side_powered", + "3": "create:block/contact_back", + "particle": "create:block/contact_side_powered" + }, + "elements": [ + { + "name": "Center", + "from": [2, 1, 2], + "to": [14, 15, 14], + "faces": { + "up": {"uv": [2, 2, 14, 14], "texture": "#0"}, + "down": {"uv": [2, 2, 14, 14], "texture": "#3"} + } + }, + { + "name": "Side", + "from": [0, 0, 0], + "to": [2, 16, 16], + "faces": { + "north": {"uv": [14, 0, 16, 16], "texture": "#1"}, + "east": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 2, 16], "texture": "#1"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 2, 16], "texture": "#0"}, + "down": {"uv": [0, 0, 2, 16], "texture": "#0"} + } + }, + { + "name": "Side", + "from": [14, 0, 0], + "to": [16, 16, 16], + "faces": { + "north": {"uv": [0, 0, 2, 16], "texture": "#1"}, + "east": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "south": {"uv": [14, 0, 16, 16], "texture": "#1"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "up": {"uv": [14, 0, 16, 16], "texture": "#0"}, + "down": {"uv": [14, 0, 16, 16], "texture": "#3"} + } + }, + { + "name": "Short Side", + "from": [2, 0, 0], + "to": [14, 16, 2], + "faces": { + "north": {"uv": [2, 0, 14, 16], "texture": "#1"}, + "south": {"uv": [2, 0, 14, 16], "texture": "#1"}, + "up": {"uv": [2, 0, 14, 2], "texture": "#0"}, + "down": {"uv": [2, 14, 14, 16], "texture": "#3"} + } + }, + { + "name": "Short Side", + "from": [2, 0, 14], + "to": [14, 16, 16], + "faces": { + "north": {"uv": [2, 0, 14, 16], "texture": "#1"}, + "south": {"uv": [2, 0, 14, 16], "texture": "#1"}, + "up": {"uv": [2, 14, 14, 16], "texture": "#0"}, + "down": {"uv": [2, 0, 14, 2], "texture": "#3"} + } + }, + { + "name": "Contact", + "from": [6, 15, 6], + "to": [10, 16, 10], + "shade": false, + "faces": { + "north": {"uv": [6, 6, 10, 7], "rotation": 180, "texture": "#0"}, + "east": {"uv": [9, 6, 10, 10], "rotation": 90, "texture": "#0"}, + "south": {"uv": [9, 6, 10, 10], "rotation": 270, "texture": "#0"}, + "west": {"uv": [6, 6, 10, 7], "texture": "#0"}, + "up": {"uv": [6, 6, 10, 10], "texture": "#0"} + } + } + ] } \ No newline at end of file diff --git a/src/main/resources/assets/create/textures/block/contact_back.png b/src/main/resources/assets/create/textures/block/contact_back.png new file mode 100644 index 0000000000000000000000000000000000000000..7f872f17fd57d1288f2b5ea15679111e2044c055 GIT binary patch literal 885 zcmV-*1B(2KP)EX>4Tx04R}tkv&MmKpe$i(~2S$2kQsokfAzR5EXHhDi*;)X)CnqU~=gfG-*gu zTpR`0f`cE6RRbkxtGNhls^O8_R9XiiS!&O&nHKjq-(z z%L?Z$&T6^Jn)l={4Cb_z6xV5vAciHxk$?ypRg_SMg$S)0DJGJ%ANBALJN^W@WO9|j z$gzM5R7j2={11M2Yv!jW-K1a?=y2C8-O}Ve;Bp5TdeS9BawI=ZA)g1{&*+=7K;JFUz2^4T+{ftykfyGdZ-9eC zV5~sd>mKj!YVYmeGtK^f07G7Kl=s$Dy#N3J32;bRa{vGf6951U69E94oEQKA00(qQ zO+^Rg0~Z!3AIQx~`Tzg{gGod|R4C7tQcX+4KoA{kWU(xX9atiTJp{r+uTt=4{Rh43 zuWjqCP~tuGRtYSF8+QpQix&^0(R$K7&BvSBnK$ojHk%=$a}K^9A`bSixN|N+#KmHv zlp-Rf6aWwr0I>b@5z%I|Nt|;^snu!)05Qh5wgrI8@mL5Uga{!V`<^4q<$<$X_1-^M75_Zq-{0DntSyZpYo(OmXk*ee)mmRoCOl*^jHvQF zP1Dktr}bLpIa#and^(*1K+`laMusJbNJLkYiPl<58A4$6-Tgfyx~}uyAN!t&5OMUA zho)(M*SdkZ1h z9q}#m>uYXY8Z+PqCIEm7KJPHFMAmXymSxP?zOJ(@W0t>nVE^L${ANCvQa-KM0I;uX zPI>Qn=97YB-@m8ncDrSPyj0boj_0akX`I~Q;qmb=;zPu<|H}IVdV%jgYr@|W00000 LNkvXXu0mjfC9;>j literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/create/textures/block/contact_front.png b/src/main/resources/assets/create/textures/block/contact_front.png index 38f90a6eda475164fd1ba97c9c6c927a906766c4..5634e9a0f0bbf88d10bdd2f062cd1038899cdb47 100644 GIT binary patch literal 6624 zcmeHLdpwl+8lT)kl+!wHDbu*O=4ytSY20Ek7{;)o67S5s!({F=#waRmD#xmjwv<(| z*+T7Zq*O|^kxIFA5t2xS-LR!jE9ae|(m8wfoIdC5fA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kXuY1$u8#No!hgWnFYy1tfpb>fYybcN07*qoM6N<$g5xXN_W%F@ diff --git a/src/main/resources/assets/create/textures/block/contact_side.png b/src/main/resources/assets/create/textures/block/contact_side.png index 84bf793867a191dd205df6cf886825adbe0bb5c0..d8bb701c2cd84c66486bff7e91d7e279b9b8cfc3 100644 GIT binary patch literal 6076 zcmeHLc|4SB8=hp()=^Q&G)j?K4b4n5m5dA-981wcGw-}(2D6yOOo~)UA=)LR(t45- zC4~x|WJyt}NMFfzlBLpelJA|N(s%kgU%%gX{)^v?d7kIGuls(k=f3a9JDWY-oprUR zXv1JIT^AbF3;JuIcxkFb@8&Ou7%-UX!3ZBei5Ei#7m5UIZYT(stQLZBP|jt;VDbk! zOP6ndYOOOEH1VwJ;wKkOGks+mvUg(G)9K+&l?`qkep?K-*NwlL(={|?_j;VUWuB`^ zJMVOOnX`r&VME`;59NK?^yK!B!1C&Z6=sGy+oErL=6a_;gLDRJTtI0>&2yv*SsA0on;vp6CNNAhqp95xbZkEHAOVJ$|kPtUbGBQ z)yefNo}97=DbTX;hO65o;U{isIHs3oWkIdkWj0H!?zyt9BJ8ovK9zYz`oYhq)5hyJ z;T}(lEUO;z){F)Dt0LA)9v^P=En7+!L}cfz5d*H0~$m}Y7HvVPYhz;Te! z{j1}x_*>VEL(=;!Q#lpEAtwuJ2ilA>2;GTiYl%G@5&|v_TwC6AY3aPT#stl@Lt6HQ zj~z9!SGh6I;_r;t##*{>m*6Tb_pH^nV(;|0d!My$<$(1j({V;t9flQ?maf&BvE;<8 z!zX?_ey*r1R8pkrx_uo4KhExz`OTiKoX&pT!B8O8 z6J3;S5d7QRrPXPz@=3g8D{23_TkoiQR{Mk(zgXz?h&T|N-}$C+@6M(zyEf3 z%`20mXK&gw07Ty{x=~upi9C=UP@q>`g6m}K zVG~#$xA<_4On;riXC8AK)vnIk{rh|10x5UMVaV@jP@&v+ZFzQPVie=$JjrXITJ|c5 zBCV`g-$kA>Cbp&I`o8xQ$~_3==ZW?6)2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09QY_TM~J!1H@;bgR;!+zQ=S&bkb-&$ci3Ca#19rw^S$$<$|KGb^4Sy z{{=V7ek4c#&U`d%*xFGbTn$w*N8%ylf7kstfWr)KTma;Y1>XyOG-OzoQ5O*u^Y9#W z!9n*W`tyZ3k|l~l`UihTvhN@C08#&R@Bi8c zhQx*Lr15O5(Ij(})`ZSi&{r-@7pj8~p(=7mse2j5;M%$a+jeN5o^bxY_3rosvlGqU z>qNGeP>nk7s`(eW#??(9%g)ksA8Hnryp-*~IS^U7cHWz7#?+X`MC``5w@czvrT~7Z zJv+h81-tWX#+<&Z@~ZE+e~5qXy==sWg5BNW4+VsFSlu#x+S4bitfIwRoB5mK>!fDq z-K=7b_(#r)p8@qrvVX^D398Lt?r zsd>@Xg&}$?=Um3qU&>+&HkZTM;t1&xohfzAD`_!HfN?QleO%OFUuF^S zPyb}Qth~e`o`zbWH0efOfcf$G)5~&BZ4Dux!(Llf#XkGa(EDWUi4(Q7bTKDqP2$#5 pX*QF_t#di&aO!BDUTVsanwNWR+ANiN#dq^C7bkb>sfDXH{2NFCJa+&9 delta 439 zcmV;o0Z9J5FUA9q8Gix*005AYXf^-<00DDSM?wIu&K&6g000DMK}|sb0I`n?{9y$E z000SaNLh0L01m+b01m+cxRGn^00047Nklkv)FjlV;GrTO#7jX6 zg1_OhSHV9J#Diyl$sh6H4|pgoDkM$WY`RH|Z=Ge0Ui2}%%zw_j+1gEwi91g&KAey=Z z8`T%E1m9iH!S=XjSsZ+bglL3wNld6)6HR+LTC&nmdL;$OpdONddP@Wa8c=f%M(f2h zMTqSQ`SEB!@qf2v^B0`skaA6H`2 zZp~iVG~4Am@Az$+!M?%$h$Hh14CBF>ek*pF(zpqdelV=w6_^JA@vxYsNBG5mqm&}g hmAJh;vxWbF=o8#lpYL1bL_Poj002ovPDHLkV1i5c#y9`~ diff --git a/src/main/resources/assets/create/textures/block/contact_side_powered.png b/src/main/resources/assets/create/textures/block/contact_side_powered.png index a69505c23046691477e4def64cd6180cdcc313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af3b18700f7bc203256503edeb79 Mon Sep 17 00:00:00 2001 From: simibubi <31564874+simibubi@users.noreply.github.com> Date: Sat, 27 Mar 2021 20:14:55 +0100 Subject: [PATCH 02/11] Foolish not to avoid the lack of counteracting no-clip - Ejectors now occasionally track launched items, scanning for any obstacles in their trajectory - Fixed rendered items passing an Ejectors' target on clients ticking faster than their server - Removed outdated warnings for 'transposer funnels' --- src/generated/resources/.cache/cache | 28 +++--- .../create/blockstates/radial_chassis.json | 72 +++++++------- .../resources/assets/create/lang/en_us.json | 4 - .../assets/create/lang/unfinished/de_de.json | 6 +- .../assets/create/lang/unfinished/es_es.json | 4 - .../assets/create/lang/unfinished/es_mx.json | 6 +- .../assets/create/lang/unfinished/fr_fr.json | 6 +- .../assets/create/lang/unfinished/it_it.json | 4 - .../assets/create/lang/unfinished/ja_jp.json | 4 - .../assets/create/lang/unfinished/ko_kr.json | 4 - .../assets/create/lang/unfinished/nl_nl.json | 6 +- .../assets/create/lang/unfinished/pt_br.json | 6 +- .../assets/create/lang/unfinished/ru_ru.json | 4 - .../assets/create/lang/unfinished/zh_cn.json | 4 - .../assets/create/lang/unfinished/zh_tw.json | 4 - .../block/depot/EjectorRenderer.java | 13 ++- .../block/depot/EjectorTileEntity.java | 96 +++++++++++++++++-- .../block/funnel/FunnelTileEntity.java | 50 ---------- .../create/foundation/config/CKinetics.java | 2 + .../assets/create/lang/default/messages.json | 4 - 20 files changed, 152 insertions(+), 175 deletions(-) diff --git a/src/generated/resources/.cache/cache b/src/generated/resources/.cache/cache index a7ed66061..aab8b94c2 100644 --- a/src/generated/resources/.cache/cache +++ b/src/generated/resources/.cache/cache @@ -337,7 +337,7 @@ e8b0a401c10d1ba67ed71ba31bd5f9bc28571b65 assets/create/blockstates/powered_toggl d06cd9a1101b18d306a786320aab12018b1325d6 assets/create/blockstates/purple_sail.json 92957119abd5fbcca36a113b2a80255fd70fc303 assets/create/blockstates/purple_seat.json 61035f8afe75ff7bbd291da5d8690bcbebe679eb assets/create/blockstates/purple_valve_handle.json -6fa36883e76e9e403bb429c8f86b8c0d3bba0cff assets/create/blockstates/radial_chassis.json +4439fc83a8c7370ab44b211a3fd48abde20a4728 assets/create/blockstates/radial_chassis.json 45877c4d90a7185c2f304edbd67379d800920439 assets/create/blockstates/red_sail.json da1b08387af7afa0855ee8d040f620c01f20660a assets/create/blockstates/red_seat.json 722fc77bbf387af8a4016e42cbf9501d2b968881 assets/create/blockstates/red_valve_handle.json @@ -403,19 +403,19 @@ a3a11524cd3515fc01d905767b4b7ea782adaf03 assets/create/blockstates/yellow_seat.j 7f39521b211441f5c3e06d60c5978cebe16cacfb assets/create/blockstates/zinc_block.json b7181bcd8182b2f17088e5aa881f374c9c65470c assets/create/blockstates/zinc_ore.json ce0e5405da381a86625b908c569c5dbe347abdba assets/create/lang/en_ud.json -75e0c8fea601eecd505e00084e3001d54b315484 assets/create/lang/en_us.json -3f1b5016f59fc581352c4acca569dd68e82d96de assets/create/lang/unfinished/de_de.json -77c60af805305234d28421be451a6091c9222d44 assets/create/lang/unfinished/es_es.json -00cdb52c58844b3d9b00551929866ff7eb23aff8 assets/create/lang/unfinished/es_mx.json -41b68809a2c0267be7e6966274e00a69f370b743 assets/create/lang/unfinished/fr_fr.json -4606b3e7bcbb0b54802e52a800838343e84087ee assets/create/lang/unfinished/it_it.json -38e23ba73a515cb238d3899cc7517ff30223a3bc assets/create/lang/unfinished/ja_jp.json -0e34e4848b8e0ea0b73778477cc4790d6a637143 assets/create/lang/unfinished/ko_kr.json -f8c6e3946025b6af0172319b0a4fc12b6f12a10f assets/create/lang/unfinished/nl_nl.json -5a0d6736f89c5d9e78d893d8c6ceb4ee07b9428b assets/create/lang/unfinished/pt_br.json -ae45aacb4418411dec1e6248637094efec94bd24 assets/create/lang/unfinished/ru_ru.json -ba653601c0452116fd5f8b820a136b4833dcb426 assets/create/lang/unfinished/zh_cn.json -1087875125ce70b1543df07e3957b14b5ef60e9f assets/create/lang/unfinished/zh_tw.json +442123de75c67a2b562194981d62c6a6de053593 assets/create/lang/en_us.json +1a5739ce1ab4a923dcf5a7ed12f16af394aed719 assets/create/lang/unfinished/de_de.json +4f21f855b45e8b44aedcae94e5a41c797d05af45 assets/create/lang/unfinished/es_es.json +e971082462cd5a92a08c3a1481e8e7c6e1afcea1 assets/create/lang/unfinished/es_mx.json +64a39634a36da998fd11553340cd1fc652129ce9 assets/create/lang/unfinished/fr_fr.json +afb72ad7e2713819b3cda0110a41dcdbbcc0bb0b assets/create/lang/unfinished/it_it.json +583b4bddc044614efb1b08f9bfb36a49e0a67e4f assets/create/lang/unfinished/ja_jp.json +9baa3052e1a9440e1cb6d46950d2227f2be3435e assets/create/lang/unfinished/ko_kr.json +7701f3b29b3e92a9943c15000beb9df02143fe90 assets/create/lang/unfinished/nl_nl.json +9f935fe569d793f6ee581ebc24bff5740c91fbab assets/create/lang/unfinished/pt_br.json +9ede4dc1051fea0bcabc30da1d133c0048d29641 assets/create/lang/unfinished/ru_ru.json +2442b5fe4ed2d92ab3081e7422bfecdf1ac06610 assets/create/lang/unfinished/zh_cn.json +56268c452b57cf072f35839ebfa130213a966730 assets/create/lang/unfinished/zh_tw.json 846200eb548d3bfa2e77b41039de159b4b6cfb45 assets/create/models/block/acacia_window.json 1930fa3a3c98d53dd19e4ee7f55bc27fd47aa281 assets/create/models/block/acacia_window_pane_noside.json 1763ea2c9b981d187f5031ba608f3d5d3be3986a assets/create/models/block/acacia_window_pane_noside_alt.json diff --git a/src/generated/resources/assets/create/blockstates/radial_chassis.json b/src/generated/resources/assets/create/blockstates/radial_chassis.json index f97d8c8bc..8bd829ffc 100644 --- a/src/generated/resources/assets/create/blockstates/radial_chassis.json +++ b/src/generated/resources/assets/create/blockstates/radial_chassis.json @@ -89,8 +89,8 @@ }, { "when": { - "sticky_west": "true", - "axis": "x" + "axis": "x", + "sticky_west": "true" }, "apply": { "model": "create:block/radial_chassis_side_x_sticky", @@ -99,8 +99,8 @@ }, { "when": { - "sticky_west": "true", - "axis": "y" + "axis": "y", + "sticky_west": "true" }, "apply": { "model": "create:block/radial_chassis_side_y_sticky", @@ -109,8 +109,8 @@ }, { "when": { - "sticky_west": "true", - "axis": "z" + "axis": "z", + "sticky_west": "true" }, "apply": { "model": "create:block/radial_chassis_side_z_sticky", @@ -119,8 +119,8 @@ }, { "when": { - "sticky_west": "false", - "axis": "x" + "axis": "x", + "sticky_west": "false" }, "apply": { "model": "create:block/radial_chassis_side_x", @@ -129,8 +129,8 @@ }, { "when": { - "sticky_west": "false", - "axis": "y" + "axis": "y", + "sticky_west": "false" }, "apply": { "model": "create:block/radial_chassis_side_y", @@ -139,8 +139,8 @@ }, { "when": { - "sticky_west": "false", - "axis": "z" + "axis": "z", + "sticky_west": "false" }, "apply": { "model": "create:block/radial_chassis_side_z", @@ -149,8 +149,8 @@ }, { "when": { - "sticky_north": "true", - "axis": "x" + "axis": "x", + "sticky_north": "true" }, "apply": { "model": "create:block/radial_chassis_side_x_sticky" @@ -158,8 +158,8 @@ }, { "when": { - "sticky_north": "true", - "axis": "y" + "axis": "y", + "sticky_north": "true" }, "apply": { "model": "create:block/radial_chassis_side_y_sticky", @@ -168,8 +168,8 @@ }, { "when": { - "sticky_north": "true", - "axis": "z" + "axis": "z", + "sticky_north": "true" }, "apply": { "model": "create:block/radial_chassis_side_x_sticky", @@ -178,8 +178,8 @@ }, { "when": { - "sticky_north": "false", - "axis": "x" + "axis": "x", + "sticky_north": "false" }, "apply": { "model": "create:block/radial_chassis_side_x" @@ -187,8 +187,8 @@ }, { "when": { - "sticky_north": "false", - "axis": "y" + "axis": "y", + "sticky_north": "false" }, "apply": { "model": "create:block/radial_chassis_side_y", @@ -197,8 +197,8 @@ }, { "when": { - "sticky_north": "false", - "axis": "z" + "axis": "z", + "sticky_north": "false" }, "apply": { "model": "create:block/radial_chassis_side_x", @@ -207,8 +207,8 @@ }, { "when": { - "sticky_east": "true", - "axis": "x" + "axis": "x", + "sticky_east": "true" }, "apply": { "model": "create:block/radial_chassis_side_x_sticky", @@ -217,8 +217,8 @@ }, { "when": { - "sticky_east": "true", - "axis": "y" + "axis": "y", + "sticky_east": "true" }, "apply": { "model": "create:block/radial_chassis_side_y_sticky", @@ -227,8 +227,8 @@ }, { "when": { - "sticky_east": "true", - "axis": "z" + "axis": "z", + "sticky_east": "true" }, "apply": { "model": "create:block/radial_chassis_side_z_sticky" @@ -236,8 +236,8 @@ }, { "when": { - "sticky_east": "false", - "axis": "x" + "axis": "x", + "sticky_east": "false" }, "apply": { "model": "create:block/radial_chassis_side_x", @@ -246,8 +246,8 @@ }, { "when": { - "sticky_east": "false", - "axis": "y" + "axis": "y", + "sticky_east": "false" }, "apply": { "model": "create:block/radial_chassis_side_y", @@ -256,8 +256,8 @@ }, { "when": { - "sticky_east": "false", - "axis": "z" + "axis": "z", + "sticky_east": "false" }, "apply": { "model": "create:block/radial_chassis_side_z" diff --git a/src/generated/resources/assets/create/lang/en_us.json b/src/generated/resources/assets/create/lang/en_us.json index a3054d2c0..c7b5d21ad 100644 --- a/src/generated/resources/assets/create/lang/en_us.json +++ b/src/generated/resources/assets/create/lang/en_us.json @@ -1122,10 +1122,6 @@ "create.hint.hose_pulley": "The targeted body of fluid is considered infinite.", "create.hint.mechanical_arm_no_targets.title": "No Targets", "create.hint.mechanical_arm_no_targets": "It appears this _Mechanical_ _Arm_ has not been assigned any _targets._ Select belts, depots, funnels and other blocks by _right-clicking_ them while _holding_ the _Mechanical_ _Arm_ in your _hand_.", - "create.hint.horizontal_funnel.title": "Horizontal Funnels", - "create.hint.horizontal_funnel": "cannot transfer between inventories _directly_. Try running a _Mechanical_ _Belt_ or _Depot_ below your funnel to extract items from Inventories.", - "create.hint.upward_funnel.title": "Funnels facing upward", - "create.hint.upward_funnel": "can only transfer items inserted by _Arms_, fan-powered _Chutes_, or items _thrown_ at them. Try building some _Chutes_ if you are looking to move your items _vertically_.", "create.hint.empty_bearing.title": "Update Bearing", "create.hint.empty_bearing": "_Right-click_ the bearing with an _empty_ _hand_ to _attach_ the structure you just built in front of it.", "create.hint.full_deployer.title": "Deployer Item Overflow", diff --git a/src/generated/resources/assets/create/lang/unfinished/de_de.json b/src/generated/resources/assets/create/lang/unfinished/de_de.json index 8403ebbb3..043f0e322 100644 --- a/src/generated/resources/assets/create/lang/unfinished/de_de.json +++ b/src/generated/resources/assets/create/lang/unfinished/de_de.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 1510", + "_": "Missing Localizations: 1506", "_": "->------------------------] Game Elements [------------------------<-", @@ -1123,10 +1123,6 @@ "create.hint.hose_pulley": "UNLOCALIZED: The targeted body of fluid is considered infinite.", "create.hint.mechanical_arm_no_targets.title": "UNLOCALIZED: No Targets", "create.hint.mechanical_arm_no_targets": "UNLOCALIZED: It appears this _Mechanical_ _Arm_ has not been assigned any _targets._ Select belts, depots, funnels and other blocks by _right-clicking_ them while _holding_ the _Mechanical_ _Arm_ in your _hand_.", - "create.hint.horizontal_funnel.title": "UNLOCALIZED: Horizontal Funnels", - "create.hint.horizontal_funnel": "UNLOCALIZED: cannot transfer between inventories _directly_. Try running a _Mechanical_ _Belt_ or _Depot_ below your funnel to extract items from Inventories.", - "create.hint.upward_funnel.title": "UNLOCALIZED: Funnels facing upward", - "create.hint.upward_funnel": "UNLOCALIZED: can only transfer items inserted by _Arms_, fan-powered _Chutes_, or items _thrown_ at them. Try building some _Chutes_ if you are looking to move your items _vertically_.", "create.hint.empty_bearing.title": "UNLOCALIZED: Update Bearing", "create.hint.empty_bearing": "UNLOCALIZED: _Right-click_ the bearing with an _empty_ _hand_ to _attach_ the structure you just built in front of it.", "create.hint.full_deployer.title": "UNLOCALIZED: Deployer Item Overflow", diff --git a/src/generated/resources/assets/create/lang/unfinished/es_es.json b/src/generated/resources/assets/create/lang/unfinished/es_es.json index 22baf842f..b2e8c7da2 100644 --- a/src/generated/resources/assets/create/lang/unfinished/es_es.json +++ b/src/generated/resources/assets/create/lang/unfinished/es_es.json @@ -1123,10 +1123,6 @@ "create.hint.hose_pulley": "La masa de fluido objetivo se considera infinita", "create.hint.mechanical_arm_no_targets.title": "No hay objetivos", "create.hint.mechanical_arm_no_targets": "Parece que a este _brazo mecánico_ no se le ha asignado ningún _objetivo._ Selecciona correas, depósitos, embudos y otros bloques haciendo _clic derecho_ sobre ellos mientras _sostienes_ el _brazo mecánico_ en tu _mano_.", - "create.hint.horizontal_funnel.title": "Embudos horizontales", - "create.hint.horizontal_funnel": "No puede transferir entre inventarios _directamente_. Intenta pasar una _correa_ o un _depósito_ por debajo de tu embudo para extraer artículos de los inventarios", - "create.hint.upward_funnel.title": "Embudos hacia arriba", - "create.hint.upward_funnel": "sólo pueden transferir objetos insertados por _brazos_, y _ductos_ impulsados por ventilador, o elementos _lanzados_ hacia ellos. Intenta construir algunos _ductos_ si quieres mover tus objetos _verticalmente_", "create.hint.empty_bearing.title": "Rodamiento de reloj", "create.hint.empty_bearing": "_Haz clic con el botón derecho del ratón_ en el rodamiento con la _mano vacía_ para _adherir_ la estructura que acabas de construir delante de él", "create.hint.full_deployer.title": "Desbordamiento de elementos del desplegador", diff --git a/src/generated/resources/assets/create/lang/unfinished/es_mx.json b/src/generated/resources/assets/create/lang/unfinished/es_mx.json index e0c794f9e..b6c37a338 100644 --- a/src/generated/resources/assets/create/lang/unfinished/es_mx.json +++ b/src/generated/resources/assets/create/lang/unfinished/es_mx.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 1440", + "_": "Missing Localizations: 1436", "_": "->------------------------] Game Elements [------------------------<-", @@ -1123,10 +1123,6 @@ "create.hint.hose_pulley": "UNLOCALIZED: The targeted body of fluid is considered infinite.", "create.hint.mechanical_arm_no_targets.title": "UNLOCALIZED: No Targets", "create.hint.mechanical_arm_no_targets": "UNLOCALIZED: It appears this _Mechanical_ _Arm_ has not been assigned any _targets._ Select belts, depots, funnels and other blocks by _right-clicking_ them while _holding_ the _Mechanical_ _Arm_ in your _hand_.", - "create.hint.horizontal_funnel.title": "UNLOCALIZED: Horizontal Funnels", - "create.hint.horizontal_funnel": "UNLOCALIZED: cannot transfer between inventories _directly_. Try running a _Mechanical_ _Belt_ or _Depot_ below your funnel to extract items from Inventories.", - "create.hint.upward_funnel.title": "UNLOCALIZED: Funnels facing upward", - "create.hint.upward_funnel": "UNLOCALIZED: can only transfer items inserted by _Arms_, fan-powered _Chutes_, or items _thrown_ at them. Try building some _Chutes_ if you are looking to move your items _vertically_.", "create.hint.empty_bearing.title": "UNLOCALIZED: Update Bearing", "create.hint.empty_bearing": "UNLOCALIZED: _Right-click_ the bearing with an _empty_ _hand_ to _attach_ the structure you just built in front of it.", "create.hint.full_deployer.title": "UNLOCALIZED: Deployer Item Overflow", diff --git a/src/generated/resources/assets/create/lang/unfinished/fr_fr.json b/src/generated/resources/assets/create/lang/unfinished/fr_fr.json index a41a33360..af65f930a 100644 --- a/src/generated/resources/assets/create/lang/unfinished/fr_fr.json +++ b/src/generated/resources/assets/create/lang/unfinished/fr_fr.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 1222", + "_": "Missing Localizations: 1218", "_": "->------------------------] Game Elements [------------------------<-", @@ -1123,10 +1123,6 @@ "create.hint.hose_pulley": "UNLOCALIZED: The targeted body of fluid is considered infinite.", "create.hint.mechanical_arm_no_targets.title": "UNLOCALIZED: No Targets", "create.hint.mechanical_arm_no_targets": "UNLOCALIZED: It appears this _Mechanical_ _Arm_ has not been assigned any _targets._ Select belts, depots, funnels and other blocks by _right-clicking_ them while _holding_ the _Mechanical_ _Arm_ in your _hand_.", - "create.hint.horizontal_funnel.title": "UNLOCALIZED: Horizontal Funnels", - "create.hint.horizontal_funnel": "UNLOCALIZED: cannot transfer between inventories _directly_. Try running a _Mechanical_ _Belt_ or _Depot_ below your funnel to extract items from Inventories.", - "create.hint.upward_funnel.title": "UNLOCALIZED: Funnels facing upward", - "create.hint.upward_funnel": "UNLOCALIZED: can only transfer items inserted by _Arms_, fan-powered _Chutes_, or items _thrown_ at them. Try building some _Chutes_ if you are looking to move your items _vertically_.", "create.hint.empty_bearing.title": "UNLOCALIZED: Update Bearing", "create.hint.empty_bearing": "UNLOCALIZED: _Right-click_ the bearing with an _empty_ _hand_ to _attach_ the structure you just built in front of it.", "create.hint.full_deployer.title": "UNLOCALIZED: Deployer Item Overflow", diff --git a/src/generated/resources/assets/create/lang/unfinished/it_it.json b/src/generated/resources/assets/create/lang/unfinished/it_it.json index 87fc548f2..dde52b028 100644 --- a/src/generated/resources/assets/create/lang/unfinished/it_it.json +++ b/src/generated/resources/assets/create/lang/unfinished/it_it.json @@ -1123,10 +1123,6 @@ "create.hint.hose_pulley": "Il corpo fluido selezionato è considerato infinito.", "create.hint.mechanical_arm_no_targets.title": "Nessun bersaglio", "create.hint.mechanical_arm_no_targets": "Sembra che questo _braccio_ _meccanico_ non sia stato assegnato a nessun _bersaglio_. Seleziona nastri, depositi, imbuti e altri blocchi _cliccandoli_ _col_ _destro_ e _tenendo_ _in_ _mano_ il _braccio_ _meccanico_.", - "create.hint.horizontal_funnel.title": "Imbuto orizzontale", - "create.hint.horizontal_funnel": "Non puoi trasferire tra inventari _direttamente_. Prova a mettere un _nastro_ _meccanico_ o un _deposito_ sotto il tuo imbuto per estrarre gli oggetti dagli inventari.", - "create.hint.upward_funnel.title": "Imbuti rivolti verso l'alto", - "create.hint.upward_funnel": "Puoi solo inserire oggetti inseriti da _braccia_, _scivoli_ alimentati da ventilatori, od oggetti _gettati_ in essi. Prova a costruire degli _scivoli_ se stai cercando di muovere gli oggetti _verticalmente_.", "create.hint.empty_bearing.title": "Aggiorna il supporto", "create.hint.empty_bearing": "_Clicca_ _col_ _destro_ il supporto con una _mano_ _vuota_ per _attaccarci_ la struttura che ci hai appena costruito davanti.", "create.hint.full_deployer.title": "Overflow di oggetti dell'installatore", diff --git a/src/generated/resources/assets/create/lang/unfinished/ja_jp.json b/src/generated/resources/assets/create/lang/unfinished/ja_jp.json index 245f96ca6..73d0995a1 100644 --- a/src/generated/resources/assets/create/lang/unfinished/ja_jp.json +++ b/src/generated/resources/assets/create/lang/unfinished/ja_jp.json @@ -1123,10 +1123,6 @@ "create.hint.hose_pulley": "対象となる液体は無限とみなされています。", "create.hint.mechanical_arm_no_targets.title": "ターゲットが見つかりません", "create.hint.mechanical_arm_no_targets": "どうやらこの_メカニカルアーム_には_ターゲット_が割り当てられていないようです。_メカニカルアーム_を_手_に持って_右クリック_して、ベルト、デポ、ファンネルなどのブロックを選択します。", - "create.hint.horizontal_funnel.title": "水平ファンネル", - "create.hint.horizontal_funnel": "この状態ではインベントリ間でアイテムを_直接_転送することはできません。インベントリからアイテムを取り出すために、ファンネルの下 _メカニカルベルト_ や _デポ_ を置いてみて下さい。", - "create.hint.upward_funnel.title": "上向きファンネル", - "create.hint.upward_funnel": "この状態では_メカニカルアーム_や風を送り込んだ_シュート_、_落ちている_アイテムしか移動できません。アイテムを_縦_に移動させたい場合は、いくつか_シュート_を作ってみてください。", "create.hint.empty_bearing.title": "ベアリングの更新", "create.hint.empty_bearing": "_素手_でベアリングを_右クリック_して、その前に先ほど作った構造物を_接続_します。", "create.hint.full_deployer.title": "デプロイヤーのアイテムが溢れています", diff --git a/src/generated/resources/assets/create/lang/unfinished/ko_kr.json b/src/generated/resources/assets/create/lang/unfinished/ko_kr.json index 499ddcbc1..0788669d2 100644 --- a/src/generated/resources/assets/create/lang/unfinished/ko_kr.json +++ b/src/generated/resources/assets/create/lang/unfinished/ko_kr.json @@ -1123,10 +1123,6 @@ "create.hint.hose_pulley": "UNLOCALIZED: The targeted body of fluid is considered infinite.", "create.hint.mechanical_arm_no_targets.title": "목표 없음", "create.hint.mechanical_arm_no_targets": "이 _기계 팔_은 _목표_가 설정되지 않은 것 같습니다. _기계 팔을 손에 들고_ 벨트, 아이템 거치대, 깔때기를 _우클릭_하여 목표로 지정하세요.", - "create.hint.horizontal_funnel.title": "깔때기가 수평임", - "create.hint.horizontal_funnel": "깔때기는 더이상 아이템을 _직접_ 이동시킬 수 없습니다. _벨트나 아이템 거치대_위에 깔때기를 설치하여 아이템을 이동시키세요.", - "create.hint.upward_funnel.title": "깔때기가 위를 바라보고 있음", - "create.hint.upward_funnel": "_기계 팔_, 선풍기가 부착된 _슈트_를 이용하거나, 혹은 아이템이 _던져져야만_ 이동시킬 수 있습니다. 아이템을 _수직으로_ 옮기고 싶다면 _슈트_를 사용해보세요.", "create.hint.empty_bearing.title": "베어링 업데이트_", "create.hint.empty_bearing": "_맨 손_으로 베어링을 _우클릭_하여 구조물을 _부착_하세요.", "create.hint.full_deployer.title": "UNLOCALIZED: Deployer Item Overflow", diff --git a/src/generated/resources/assets/create/lang/unfinished/nl_nl.json b/src/generated/resources/assets/create/lang/unfinished/nl_nl.json index 1d6f597aa..375fd54da 100644 --- a/src/generated/resources/assets/create/lang/unfinished/nl_nl.json +++ b/src/generated/resources/assets/create/lang/unfinished/nl_nl.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 1709", + "_": "Missing Localizations: 1705", "_": "->------------------------] Game Elements [------------------------<-", @@ -1123,10 +1123,6 @@ "create.hint.hose_pulley": "UNLOCALIZED: The targeted body of fluid is considered infinite.", "create.hint.mechanical_arm_no_targets.title": "UNLOCALIZED: No Targets", "create.hint.mechanical_arm_no_targets": "UNLOCALIZED: It appears this _Mechanical_ _Arm_ has not been assigned any _targets._ Select belts, depots, funnels and other blocks by _right-clicking_ them while _holding_ the _Mechanical_ _Arm_ in your _hand_.", - "create.hint.horizontal_funnel.title": "UNLOCALIZED: Horizontal Funnels", - "create.hint.horizontal_funnel": "UNLOCALIZED: cannot transfer between inventories _directly_. Try running a _Mechanical_ _Belt_ or _Depot_ below your funnel to extract items from Inventories.", - "create.hint.upward_funnel.title": "UNLOCALIZED: Funnels facing upward", - "create.hint.upward_funnel": "UNLOCALIZED: can only transfer items inserted by _Arms_, fan-powered _Chutes_, or items _thrown_ at them. Try building some _Chutes_ if you are looking to move your items _vertically_.", "create.hint.empty_bearing.title": "UNLOCALIZED: Update Bearing", "create.hint.empty_bearing": "UNLOCALIZED: _Right-click_ the bearing with an _empty_ _hand_ to _attach_ the structure you just built in front of it.", "create.hint.full_deployer.title": "UNLOCALIZED: Deployer Item Overflow", diff --git a/src/generated/resources/assets/create/lang/unfinished/pt_br.json b/src/generated/resources/assets/create/lang/unfinished/pt_br.json index 7d318a947..f3be159ec 100644 --- a/src/generated/resources/assets/create/lang/unfinished/pt_br.json +++ b/src/generated/resources/assets/create/lang/unfinished/pt_br.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 1775", + "_": "Missing Localizations: 1771", "_": "->------------------------] Game Elements [------------------------<-", @@ -1123,10 +1123,6 @@ "create.hint.hose_pulley": "UNLOCALIZED: The targeted body of fluid is considered infinite.", "create.hint.mechanical_arm_no_targets.title": "UNLOCALIZED: No Targets", "create.hint.mechanical_arm_no_targets": "UNLOCALIZED: It appears this _Mechanical_ _Arm_ has not been assigned any _targets._ Select belts, depots, funnels and other blocks by _right-clicking_ them while _holding_ the _Mechanical_ _Arm_ in your _hand_.", - "create.hint.horizontal_funnel.title": "UNLOCALIZED: Horizontal Funnels", - "create.hint.horizontal_funnel": "UNLOCALIZED: cannot transfer between inventories _directly_. Try running a _Mechanical_ _Belt_ or _Depot_ below your funnel to extract items from Inventories.", - "create.hint.upward_funnel.title": "UNLOCALIZED: Funnels facing upward", - "create.hint.upward_funnel": "UNLOCALIZED: can only transfer items inserted by _Arms_, fan-powered _Chutes_, or items _thrown_ at them. Try building some _Chutes_ if you are looking to move your items _vertically_.", "create.hint.empty_bearing.title": "UNLOCALIZED: Update Bearing", "create.hint.empty_bearing": "UNLOCALIZED: _Right-click_ the bearing with an _empty_ _hand_ to _attach_ the structure you just built in front of it.", "create.hint.full_deployer.title": "UNLOCALIZED: Deployer Item Overflow", diff --git a/src/generated/resources/assets/create/lang/unfinished/ru_ru.json b/src/generated/resources/assets/create/lang/unfinished/ru_ru.json index cd3635698..879ba25c9 100644 --- a/src/generated/resources/assets/create/lang/unfinished/ru_ru.json +++ b/src/generated/resources/assets/create/lang/unfinished/ru_ru.json @@ -1123,10 +1123,6 @@ "create.hint.hose_pulley": "Целевой водный резервуар считается бесконечным.", "create.hint.mechanical_arm_no_targets.title": "Нет целей", "create.hint.mechanical_arm_no_targets": "Кажется, эта _Механическая рука_ не имеет никаких целей. Выберите _ремни_, _депо_, _воронки_, или другие блоки, с помощью _правого клика_, удерживая _Механическую руку_.", - "create.hint.horizontal_funnel.title": "Горизонтальные воронки", - "create.hint.horizontal_funnel": "Невозможно передавать предметы _напрямую_. Попробуйте запустить _механический ремень_ или _депо_ под вашей воронкой, чтобы извлекать предметы из присоеденённого инвентаря.", - "create.hint.upward_funnel.title": "Воронка направленна вверх", - "create.hint.upward_funnel": "Может перемещать только предметы, вставленные _рукой_, _желобами_ с вентиляторами, или брошенные на неё. Попробуйте использовать _желоба_, если вам нужно перемещать предметы по вертикали.", "create.hint.empty_bearing.title": "Обновить подшипник", "create.hint.empty_bearing": "_Правый клик_ по подшипнику _пустой рукой_, чтобы _присоединить_ к нему структуру, которую вы только что построили перед ним.", "create.hint.full_deployer.title": "Переполнение автономного активатора", diff --git a/src/generated/resources/assets/create/lang/unfinished/zh_cn.json b/src/generated/resources/assets/create/lang/unfinished/zh_cn.json index add7d93b3..3b343e167 100644 --- a/src/generated/resources/assets/create/lang/unfinished/zh_cn.json +++ b/src/generated/resources/assets/create/lang/unfinished/zh_cn.json @@ -1123,10 +1123,6 @@ "create.hint.hose_pulley": "目标液体对象被视为无限量的。", "create.hint.mechanical_arm_no_targets.title": "没有目标", "create.hint.mechanical_arm_no_targets": "看起来这个_动力臂_没有被分配给任何_目标_。在手持机械臂的同时,右键选取传送带、置物台、漏斗或其他设备来设置目标。", - "create.hint.horizontal_funnel.title": "水平漏斗", - "create.hint.horizontal_funnel": "无法_直接_在两个物品栏间移动物品。请使用传送带或者置物台来从物品栏中提取物品。", - "create.hint.upward_funnel.title": "漏斗向上", - "create.hint.upward_funnel": "只可以传送由_动力臂_,鼓风机驱动的_溜槽_或者被投掷的物品。请试着做一些溜槽来垂直运输物品。", "create.hint.empty_bearing.title": "更新轴承", "create.hint.empty_bearing": "_空手右键_轴承来_激活_你新建造的结构。", "create.hint.full_deployer.title": "机械手物品溢出", diff --git a/src/generated/resources/assets/create/lang/unfinished/zh_tw.json b/src/generated/resources/assets/create/lang/unfinished/zh_tw.json index 767b6f86c..6f2d608e7 100644 --- a/src/generated/resources/assets/create/lang/unfinished/zh_tw.json +++ b/src/generated/resources/assets/create/lang/unfinished/zh_tw.json @@ -1123,10 +1123,6 @@ "create.hint.hose_pulley": "UNLOCALIZED: The targeted body of fluid is considered infinite.", "create.hint.mechanical_arm_no_targets.title": "沒有目標", "create.hint.mechanical_arm_no_targets": "看起來這個_機械手臂_沒有被分配任何_目標_。在手持機械手臂的同時,右鍵選取輸送帶、置物臺、漏斗或其他設備來設定目標。", - "create.hint.horizontal_funnel.title": "水平漏斗", - "create.hint.horizontal_funnel": "無法_直接_在兩個庫存間移動物品。試著使用輸送帶或者置物臺來從庫存中提取物品。", - "create.hint.upward_funnel.title": "漏斗向上", - "create.hint.upward_funnel": "只可以傳送由_機械手臂_,鼓風機驅動的_滑道_或者被投擲的物品。試著做一些滑道來垂直輸送物品。", "create.hint.empty_bearing.title": "更新軸承", "create.hint.empty_bearing": "_空手右鍵_軸承來_添加_你新建造的結構。", "create.hint.full_deployer.title": "機械手物品溢出", diff --git a/src/main/java/com/simibubi/create/content/logistics/block/depot/EjectorRenderer.java b/src/main/java/com/simibubi/create/content/logistics/block/depot/EjectorRenderer.java index 29eaeb995..8c60e2dd2 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/depot/EjectorRenderer.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/depot/EjectorRenderer.java @@ -33,7 +33,7 @@ public class EjectorRenderer extends KineticTileEntityRenderer { public boolean isGlobalRenderer(KineticTileEntity p_188185_1_) { return true; } - + @Override protected void renderSafe(KineticTileEntity te, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffer, int light, int overlay) { @@ -48,17 +48,22 @@ public class EjectorRenderer extends KineticTileEntityRenderer { SuperByteBuffer model = AllBlockPartials.EJECTOR_TOP.renderOn(te.getBlockState()); applyLidAngle(te, angle, model.matrixStacker()); model.light(light) - .renderInto(ms, vertexBuilder); + .renderInto(ms, vertexBuilder); } MatrixStacker msr = MatrixStacker.of(ms); + float maxTime = + (float) (ejector.earlyTarget != null ? ejector.earlyTargetTime : ejector.launcher.getTotalFlyingTicks()); for (IntAttached intAttached : ejector.launchedItems) { - ms.push(); float time = intAttached.getFirst() + partialTicks; + if (time > maxTime) + continue; + + ms.push(); Vec3d launchedItemLocation = ejector.getLaunchedItemLocation(time); msr.translate(launchedItemLocation.subtract(new Vec3d(te.getPos()))); - Vec3d itemRotOffset = VecHelper.voxelSpace(0,3,0); + Vec3d itemRotOffset = VecHelper.voxelSpace(0, 3, 0); msr.translate(itemRotOffset); msr.rotateY(AngleHelper.horizontalAngle(ejector.getFacing())); msr.rotateX(time * 40); diff --git a/src/main/java/com/simibubi/create/content/logistics/block/depot/EjectorTileEntity.java b/src/main/java/com/simibubi/create/content/logistics/block/depot/EjectorTileEntity.java index 37fa0909b..8218fa025 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/depot/EjectorTileEntity.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/depot/EjectorTileEntity.java @@ -4,6 +4,8 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.List; +import javax.annotation.Nullable; + import com.mojang.blaze3d.matrix.MatrixStack; import com.simibubi.create.AllBlocks; import com.simibubi.create.content.contraptions.base.KineticTileEntity; @@ -20,6 +22,7 @@ import com.simibubi.create.foundation.utility.IntAttached; import com.simibubi.create.foundation.utility.Lang; import com.simibubi.create.foundation.utility.MatrixStacker; import com.simibubi.create.foundation.utility.NBTHelper; +import com.simibubi.create.foundation.utility.Pair; import com.simibubi.create.foundation.utility.VecHelper; import com.simibubi.create.foundation.utility.animation.LerpedFloat; import com.simibubi.create.foundation.utility.animation.LerpedFloat.Chaser; @@ -33,6 +36,7 @@ import net.minecraft.inventory.EquipmentSlotType; import net.minecraft.item.ElytraItem; import net.minecraft.item.ItemStack; import net.minecraft.nbt.CompoundNBT; +import net.minecraft.nbt.NBTUtil; import net.minecraft.network.datasync.EntityDataManager; import net.minecraft.tileentity.TileEntityType; import net.minecraft.util.Direction; @@ -41,7 +45,12 @@ import net.minecraft.util.SoundCategory; import net.minecraft.util.SoundEvents; import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.BlockRayTraceResult; import net.minecraft.util.math.MathHelper; +import net.minecraft.util.math.RayTraceContext; +import net.minecraft.util.math.RayTraceContext.BlockMode; +import net.minecraft.util.math.RayTraceContext.FluidMode; +import net.minecraft.util.math.RayTraceResult.Type; import net.minecraft.util.math.Vec3d; import net.minecraft.world.World; import net.minecraftforge.api.distmarker.Dist; @@ -62,6 +71,14 @@ public class EjectorTileEntity extends KineticTileEntity { boolean launch; State state; + // item collision + @Nullable + Pair earlyTarget; + float earlyTargetTime; + // runtime stuff + int scanCooldown; + ItemStack trackedItem; + public enum State { CHARGED, LAUNCHING, RETRACTING; } @@ -207,22 +224,30 @@ public class EjectorTileEntity extends KineticTileEntity { world.markAndNotifyBlock(pos, world.getChunkAt(pos), getBlockState(), getBlockState(), 0); if (depotBehaviour.heldItem != null) { - launchedItems.add(IntAttached.withZero(heldItemStack)); + addToLaunchedItems(heldItemStack); depotBehaviour.removeHeldItem(); } for (TransportedItemStack transportedItemStack : depotBehaviour.incoming) - launchedItems.add(IntAttached.withZero(transportedItemStack.stack)); + addToLaunchedItems(transportedItemStack.stack); depotBehaviour.incoming.clear(); ItemStackHandler outputs = depotBehaviour.processingOutputBuffer; for (int i = 0; i < outputs.getSlots(); i++) { ItemStack extractItem = outputs.extractItem(i, 64, false); if (!extractItem.isEmpty()) - launchedItems.add(IntAttached.withZero(extractItem)); + addToLaunchedItems(extractItem); } } + protected boolean addToLaunchedItems(ItemStack stack) { + if ((!world.isRemote || isVirtual()) && trackedItem == null && scanCooldown == 0) { + scanCooldown = AllConfigs.SERVER.kinetics.ejectorScanInterval.get(); + trackedItem = stack; + } + return launchedItems.add(IntAttached.withZero(stack)); + } + protected Direction getFacing() { BlockState blockState = getBlockState(); if (!AllBlocks.WEIGHTED_EJECTOR.has(blockState)) @@ -237,7 +262,10 @@ public class EjectorTileEntity extends KineticTileEntity { boolean doLogic = !world.isRemote || isVirtual(); State prevState = state; - float maxTime = Math.max(3, (float) launcher.getTotalFlyingTicks()); + float totalTime = Math.max(3, (float) launcher.getTotalFlyingTicks()); + + if (scanCooldown > 0) + scanCooldown--; if (launch) { launch = false; @@ -246,7 +274,11 @@ public class EjectorTileEntity extends KineticTileEntity { for (Iterator> iterator = launchedItems.iterator(); iterator.hasNext();) { IntAttached intAttached = iterator.next(); - if (intAttached.exceeds((int) maxTime)) { + boolean hit = false; + if (intAttached.getSecond() == trackedItem) + hit = scanTrajectoryForObstacles(intAttached.getFirst()); + float maxTime = earlyTarget != null ? Math.min(earlyTargetTime, totalTime) : totalTime; + if (hit || intAttached.exceeds((int) maxTime)) { placeItemAtTarget(doLogic, maxTime, intAttached); iterator.remove(); } @@ -276,7 +308,7 @@ public class EjectorTileEntity extends KineticTileEntity { lidProgress.setValue(0); sendData(); } - + float value = MathHelper.clamp(lidProgress.getValue() - getWindUpSpeed(), 0, 1); lidProgress.setValue(value); @@ -292,6 +324,31 @@ public class EjectorTileEntity extends KineticTileEntity { notifyUpdate(); } + private boolean scanTrajectoryForObstacles(int time) { + if (time == 0) + return false; + + Vec3d source = getLaunchedItemLocation(time); + Vec3d target = getLaunchedItemLocation(time + 1); + + BlockRayTraceResult rayTraceBlocks = + world.rayTraceBlocks(new RayTraceContext(source, target, BlockMode.COLLIDER, FluidMode.NONE, null)); + if (rayTraceBlocks.getType() == Type.MISS) { + if (earlyTarget != null && earlyTargetTime < time + 1) { + earlyTarget = null; + earlyTargetTime = 0; + } + return false; + } + + Vec3d vec = rayTraceBlocks.getHitVec(); + earlyTarget = Pair.of(vec.add(new Vec3d(rayTraceBlocks.getFace() + .getDirectionVec()).scale(.25f)), rayTraceBlocks.getPos()); + earlyTargetTime = (float) (time + (source.distanceTo(vec) / source.distanceTo(target))); + sendData(); + return true; + } + protected void nudgeEntities() { for (Entity entity : world.getEntitiesWithinAABB(Entity.class, new AxisAlignedBB(pos).grow(-1 / 16f, 0, -1 / 16f))) @@ -334,6 +391,8 @@ public class EjectorTileEntity extends KineticTileEntity { protected void placeItemAtTarget(boolean doLogic, float maxTime, IntAttached intAttached) { if (!doLogic) return; + if (intAttached.getSecond() == trackedItem) + trackedItem = null; DirectBeltInputBehaviour targetOpenInv = getTargetOpenInv(); if (targetOpenInv != null) { @@ -345,7 +404,7 @@ public class EjectorTileEntity extends KineticTileEntity { .isEmpty()) return; - Vec3d ejectVec = getLaunchedItemLocation(maxTime); + Vec3d ejectVec = earlyTarget != null ? earlyTarget.getFirst() : getLaunchedItemLocation(maxTime); Vec3d ejectMotionVec = getLaunchedItemMotion(maxTime); ItemEntity item = new ItemEntity(world, ejectVec.x, ejectVec.y, ejectVec.z, intAttached.getValue()); item.setMotion(ejectMotionVec); @@ -354,8 +413,10 @@ public class EjectorTileEntity extends KineticTileEntity { } public DirectBeltInputBehaviour getTargetOpenInv() { - return TileEntityBehaviour.get(world, pos.up(launcher.getVerticalDistance()) - .offset(getFacing(), Math.max(1, launcher.getHorizontalDistance())), DirectBeltInputBehaviour.TYPE); + BlockPos targetPos = earlyTarget != null ? earlyTarget.getSecond() + : pos.up(launcher.getVerticalDistance()) + .offset(getFacing(), Math.max(1, launcher.getHorizontalDistance())); + return TileEntityBehaviour.get(world, targetPos, DirectBeltInputBehaviour.TYPE); } public Vec3d getLaunchedItemLocation(float time) { @@ -363,7 +424,8 @@ public class EjectorTileEntity extends KineticTileEntity { } public Vec3d getLaunchedItemMotion(float time) { - return launcher.getGlobalVelocity(time, getFacing().getOpposite(), pos); + return launcher.getGlobalVelocity(time, getFacing().getOpposite(), pos) + .scale(.5f); } public void dropFlyingItems() { @@ -402,6 +464,12 @@ public class EjectorTileEntity extends KineticTileEntity { compound.put("Lid", lidProgress.writeNBT()); compound.put("LaunchedItems", NBTHelper.writeCompoundList(launchedItems, ia -> ia.serializeNBT(ItemStack::serializeNBT))); + + if (earlyTarget != null) { + compound.put("EarlyTarget", VecHelper.writeNBT(earlyTarget.getFirst())); + compound.put("EarlyTargetPos", NBTUtil.writeBlockPos(earlyTarget.getSecond())); + compound.putFloat("EarlyTargetTime", earlyTargetTime); + } } @Override @@ -421,6 +489,14 @@ public class EjectorTileEntity extends KineticTileEntity { lidProgress.readNBT(compound.getCompound("Lid"), clientPacket); launchedItems = NBTHelper.readCompoundList(compound.getList("LaunchedItems", NBT.TAG_COMPOUND), nbt -> IntAttached.read(nbt, ItemStack::read)); + + earlyTarget = null; + earlyTargetTime = 0; + if (compound.contains("EarlyTarget")) { + earlyTarget = Pair.of(VecHelper.readNBT(compound.getList("EarlyTarget", NBT.TAG_DOUBLE)), + NBTUtil.readBlockPos(compound.getCompound("EarlyTargetPos"))); + earlyTargetTime = compound.getFloat("EarlyTargetTime"); + } } public void updateSignal() { diff --git a/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelTileEntity.java b/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelTileEntity.java index 663f81567..a52cb2009 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelTileEntity.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelTileEntity.java @@ -4,17 +4,14 @@ import java.lang.ref.WeakReference; import java.util.List; import com.simibubi.create.AllBlocks; -import com.simibubi.create.content.contraptions.components.saw.SawTileEntity; import com.simibubi.create.content.contraptions.goggles.IHaveHoveringInformation; import com.simibubi.create.content.contraptions.relays.belt.BeltHelper; import com.simibubi.create.content.contraptions.relays.belt.BeltTileEntity; import com.simibubi.create.content.contraptions.relays.belt.transport.TransportedItemStack; -import com.simibubi.create.content.logistics.block.chute.ChuteTileEntity; import com.simibubi.create.content.logistics.block.funnel.BeltFunnelBlock.Shape; import com.simibubi.create.content.logistics.packet.FunnelFlapPacket; import com.simibubi.create.foundation.config.AllConfigs; import com.simibubi.create.foundation.gui.widgets.InterpolatedChasingValue; -import com.simibubi.create.foundation.item.TooltipHelper; import com.simibubi.create.foundation.networking.AllPackets; import com.simibubi.create.foundation.render.backend.FastRenderDispatcher; import com.simibubi.create.foundation.render.backend.instancing.IInstanceRendered; @@ -31,17 +28,12 @@ import net.minecraft.entity.item.ItemEntity; import net.minecraft.item.ItemStack; import net.minecraft.nbt.CompoundNBT; import net.minecraft.state.properties.BlockStateProperties; -import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntityType; import net.minecraft.util.Direction; import net.minecraft.util.math.AxisAlignedBB; -import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Vec3d; import net.minecraftforge.api.distmarker.Dist; -import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.fml.DistExecutor; -import net.minecraftforge.items.CapabilityItemHandler; -import net.minecraftforge.items.IItemHandler; public class FunnelTileEntity extends SmartTileEntity implements IHaveHoveringInformation, IInstanceRendered { @@ -344,48 +336,6 @@ public class FunnelTileEntity extends SmartTileEntity implements IHaveHoveringIn .onFunnelTransfer(world, pos, stack); } - @Override - // Hint players not to use funnels like 0.2 transposers - public boolean addToTooltip(List tooltip, boolean isPlayerSneaking) { - if (isPlayerSneaking) - return false; - BlockState state = getBlockState(); - if (!(state.getBlock() instanceof FunnelBlock)) - return false; - Direction funnelFacing = FunnelBlock.getFunnelFacing(state); - - if (world.getBlockState(pos.offset(funnelFacing.getOpposite())) - .getMaterial() - .isReplaceable()) - return false; - - BlockPos inputPos = pos.offset(funnelFacing); - TileEntity tileEntity = world.getTileEntity(inputPos); - if (tileEntity == null) - return false; - if (tileEntity instanceof BeltTileEntity) - return false; - if (tileEntity instanceof SawTileEntity) - return false; - if (tileEntity instanceof ChuteTileEntity) - return false; - - LazyOptional capability = tileEntity.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY); - if (!capability.isPresent()) - return false; - - if (funnelFacing == Direction.DOWN) { - TooltipHelper.addHint(tooltip, "hint.upward_funnel"); - return true; - } - if (!funnelFacing.getAxis() - .isHorizontal()) - return false; - - TooltipHelper.addHint(tooltip, "hint.horizontal_funnel"); - return true; - } - @Override public boolean shouldRenderAsTE() { return true; diff --git a/src/main/java/com/simibubi/create/foundation/config/CKinetics.java b/src/main/java/com/simibubi/create/foundation/config/CKinetics.java index c93875240..711b3e4dd 100644 --- a/src/main/java/com/simibubi/create/foundation/config/CKinetics.java +++ b/src/main/java/com/simibubi/create/foundation/config/CKinetics.java @@ -16,6 +16,7 @@ public class CKinetics extends ConfigBase { public ConfigFloat crankHungerMultiplier = f(.01f, 0, 1, "crankHungerMultiplier", Comments.crankHungerMultiplier); public ConfigInt minimumWindmillSails = i(8, 0, "minimumWindmillSails", Comments.minimumWindmillSails); public ConfigInt maxEjectorDistance = i(32, 0, "maxEjectorDistance", Comments.maxEjectorDistance); + public ConfigInt ejectorScanInterval = i(120, 10, "ejectorScanInterval", Comments.ejectorScanInterval); public ConfigGroup fan = group(1, "encasedFan", "Encased Fan"); public ConfigInt fanPushDistance = i(20, 5, "fanPushDistance", Comments.fanPushDistance); @@ -83,6 +84,7 @@ public class CKinetics extends ConfigBase { static String kineticValidationFrequency = "Game ticks between Kinetic Blocks checking whether their source is still valid."; static String minimumWindmillSails = "Amount of sail-type blocks required for a windmill to assemble successfully."; static String maxEjectorDistance = "Max Distance in blocks a Weighted Ejector can throw"; + static String ejectorScanInterval = "Time in ticks until the next item launched by an ejector scans blocks for potential collisions"; } public static enum DeployerAggroSetting { diff --git a/src/main/resources/assets/create/lang/default/messages.json b/src/main/resources/assets/create/lang/default/messages.json index f2212a3c6..3e39bd248 100644 --- a/src/main/resources/assets/create/lang/default/messages.json +++ b/src/main/resources/assets/create/lang/default/messages.json @@ -482,10 +482,6 @@ "create.hint.hose_pulley": "The targeted body of fluid is considered infinite.", "create.hint.mechanical_arm_no_targets.title": "No Targets", "create.hint.mechanical_arm_no_targets": "It appears this _Mechanical_ _Arm_ has not been assigned any _targets._ Select belts, depots, funnels and other blocks by _right-clicking_ them while _holding_ the _Mechanical_ _Arm_ in your _hand_.", - "create.hint.horizontal_funnel.title": "Horizontal Funnels", - "create.hint.horizontal_funnel": "cannot transfer between inventories _directly_. Try running a _Mechanical_ _Belt_ or _Depot_ below your funnel to extract items from Inventories.", - "create.hint.upward_funnel.title": "Funnels facing upward", - "create.hint.upward_funnel": "can only transfer items inserted by _Arms_, fan-powered _Chutes_, or items _thrown_ at them. Try building some _Chutes_ if you are looking to move your items _vertically_.", "create.hint.empty_bearing.title": "Update Bearing", "create.hint.empty_bearing": "_Right-click_ the bearing with an _empty_ _hand_ to _attach_ the structure you just built in front of it.", "create.hint.full_deployer.title": "Deployer Item Overflow", From c239cec8b416ad6e6e92412498fe0ed84be1c9ad Mon Sep 17 00:00:00 2001 From: Kryppers <65094918+Kryppers@users.noreply.github.com> Date: Sat, 27 Mar 2021 21:09:17 +0000 Subject: [PATCH 03/11] Update weighted_ejector_top.png --- .../textures/block/weighted_ejector_top.png | Bin 613 -> 6401 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/src/main/resources/assets/create/textures/block/weighted_ejector_top.png b/src/main/resources/assets/create/textures/block/weighted_ejector_top.png index 2f81eab874c231339c3c52223071013445a2fc19..e32d2acb52bed2e64f4e28fff356e5da1f40cf2d 100644 GIT binary patch literal 6401 zcmeHMdpwle8XmSw5q0Q7iD@E9b05sicBwE7hH)trwZ}K#Ffo^Ah8gTip`u-goqM`D zm9|hJckL(&DM{s8ZhLnlYD=N>%~0u_efBy1e&_rbzhTx|&-=XZde-~CYd&J=&UR`l zOI2Vnm>SjI#tr(tK>C`a1pU+-{lI|16vM(iyhLscF`O^pvDiT%TolR&;h==gg25z@ zay{91pRbxXaob3spkJV?e95CKdL8pe6UH)F9mH!?W9rsp|dpmv&hG zJ>EM1?Um=aB~C|tvjpAsrSB_udu5i_HG2PWK;hIcS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Aq2Q6FFB*wR7wn2JgWR(G{L=EWqDX+fy?!l#3U8StR=ybbSYd=`@Chv<`#$V$u7#se|)|NWQ-R1K~(qFtROE_=8#s zv!6zA*5F7cSbsMFF*rCl@^vme(lP%z3&&|)_9ckb;s#!>Jb-C(#N(`60x{UyH3UE= zqv2KVy8vjlJh&tt9@ahrPhSMlmt<(Q@NWRpO%h69bBIOb_m-}Z}1GqIB|%UXXD={Hg^-QN%D1z9PHK;?zr8h;Y$H`0=1(rMJ{b>Gr5u|xvA z(E#P;Sw_~pnVV}%$mjE3Bpmj4;eU>0+oGgWsk8y6ryqOP<(fvWtgwtVn+_ODptojy beNFibWt%7<`494E00000NkvXXu0mjfXq_Cx From 4ff20b42179b6fbdfc09ec088c681b373282ab04 Mon Sep 17 00:00:00 2001 From: grimmauld Date: Sat, 27 Mar 2021 22:42:27 +0100 Subject: [PATCH 04/11] Cogwheel refactor Part I - Moved hasIntegratedCogWheel and isSmallCog to ICogWheel --- .../contraptions/RotationPropagator.java | 16 +++++----- .../content/contraptions/base/IRotate.java | 2 -- .../contraptions/base/KineticBlock.java | 5 ---- .../contraptions/base/KineticTileEntity.java | 3 +- .../base/KineticTileEntityRenderer.java | 3 +- .../base/KineticTileInstance.java | 3 +- .../crafter/MechanicalCrafterBlock.java | 8 ++--- .../components/millstone/MillstoneBlock.java | 8 ++--- .../mixer/MechanicalMixerBlock.java | 8 ++--- .../contraptions/fluids/PumpBlock.java | 8 ++--- .../relays/advanced/SpeedControllerBlock.java | 3 +- .../relays/elementary/CogWheelBlock.java | 30 +++++++------------ .../relays/elementary/CogwheelBlockItem.java | 8 ++--- .../relays/elementary/ICogWheel.java | 22 ++++++++++++++ .../block/mechanicalArm/ArmBlock.java | 8 ++--- 15 files changed, 62 insertions(+), 73 deletions(-) create mode 100644 src/main/java/com/simibubi/create/content/contraptions/relays/elementary/ICogWheel.java diff --git a/src/main/java/com/simibubi/create/content/contraptions/RotationPropagator.java b/src/main/java/com/simibubi/create/content/contraptions/RotationPropagator.java index dd29f947e..faa8c2046 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/RotationPropagator.java +++ b/src/main/java/com/simibubi/create/content/contraptions/RotationPropagator.java @@ -1,6 +1,5 @@ package com.simibubi.create.content.contraptions; -import static com.simibubi.create.content.contraptions.relays.elementary.CogWheelBlock.isLargeCog; import static net.minecraft.state.properties.BlockStateProperties.AXIS; import java.util.LinkedList; @@ -12,6 +11,7 @@ import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.content.contraptions.relays.advanced.SpeedControllerBlock; import com.simibubi.create.content.contraptions.relays.advanced.SpeedControllerTileEntity; import com.simibubi.create.content.contraptions.relays.elementary.CogWheelBlock; +import com.simibubi.create.content.contraptions.relays.elementary.ICogWheel; import com.simibubi.create.content.contraptions.relays.encased.DirectionalShaftHalvesTileEntity; import com.simibubi.create.content.contraptions.relays.encased.EncasedBeltBlock; import com.simibubi.create.content.contraptions.relays.encased.SplitShaftTileEntity; @@ -66,8 +66,8 @@ public class RotationPropagator { alignedAxes && definitionFrom.hasShaftTowards(world, from.getPos(), stateFrom, direction) && definitionTo.hasShaftTowards(world, to.getPos(), stateTo, direction.getOpposite()); - boolean connectedByGears = definitionFrom.hasIntegratedCogwheel(world, from.getPos(), stateFrom) - && definitionTo.hasIntegratedCogwheel(world, to.getPos(), stateTo); + boolean connectedByGears = ICogWheel.isSmallCog(stateFrom) + && ICogWheel.isSmallCog(stateTo); float custom = from.propagateRotationTo(to, stateFrom, stateTo, diff, connectedByAxis, connectedByGears); if (custom != 0) @@ -98,10 +98,10 @@ public class RotationPropagator { } // Gear <-> Large Gear - if (isLargeCog(stateFrom) && definitionTo.hasIntegratedCogwheel(world, to.getPos(), stateTo)) + if (ICogWheel.isLargeCog(stateFrom) && ICogWheel.isSmallCog(stateTo)) if (isLargeToSmallCog(stateFrom, stateTo, definitionTo, diff)) return -2f; - if (isLargeCog(stateTo) && definitionFrom.hasIntegratedCogwheel(world, from.getPos(), stateFrom)) + if (ICogWheel.isLargeCog(stateTo) && ICogWheel.isSmallCog(stateFrom)) if (isLargeToSmallCog(stateTo, stateFrom, definitionFrom, diff)) return -.5f; @@ -109,7 +109,7 @@ public class RotationPropagator { if (connectedByGears) { if (diff.manhattanDistance(BlockPos.ZERO) != 1) return 0; - if (isLargeCog(stateTo)) + if (ICogWheel.isLargeCog(stateTo)) return 0; if (direction.getAxis() == definitionFrom.getRotationAxis(stateFrom)) return 0; @@ -137,7 +137,7 @@ public class RotationPropagator { } private static boolean isLargeToLargeGear(BlockState from, BlockState to, BlockPos diff) { - if (!isLargeCog(from) || !isLargeCog(to)) + if (!ICogWheel.isLargeCog(from) || !ICogWheel.isLargeCog(to)) return false; Axis fromAxis = from.get(AXIS); Axis toAxis = to.get(AXIS); @@ -186,7 +186,7 @@ public class RotationPropagator { } private static boolean isLargeCogToSpeedController(BlockState from, BlockState to, BlockPos diff) { - if (!isLargeCog(from) || !AllBlocks.ROTATION_SPEED_CONTROLLER.has(to)) + if (!ICogWheel.isLargeCog(from) || !AllBlocks.ROTATION_SPEED_CONTROLLER.has(to)) return false; if (!diff.equals(BlockPos.ZERO.down())) return false; diff --git a/src/main/java/com/simibubi/create/content/contraptions/base/IRotate.java b/src/main/java/com/simibubi/create/content/contraptions/base/IRotate.java index 225532912..fa025e01a 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/base/IRotate.java +++ b/src/main/java/com/simibubi/create/content/contraptions/base/IRotate.java @@ -118,8 +118,6 @@ public interface IRotate extends IWrenchable { } public boolean hasShaftTowards(IWorldReader world, BlockPos pos, BlockState state, Direction face); - - public boolean hasIntegratedCogwheel(IWorldReader world, BlockPos pos, BlockState state); public Axis getRotationAxis(BlockState state); diff --git a/src/main/java/com/simibubi/create/content/contraptions/base/KineticBlock.java b/src/main/java/com/simibubi/create/content/contraptions/base/KineticBlock.java index ee0734ae3..4836a2d72 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/base/KineticBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/base/KineticBlock.java @@ -72,11 +72,6 @@ public abstract class KineticBlock extends Block implements IRotate { return false; } - @Override - public boolean hasIntegratedCogwheel(IWorldReader world, BlockPos pos, BlockState state) { - return false; - } - @Override public boolean hasTileEntity(BlockState state) { return true; diff --git a/src/main/java/com/simibubi/create/content/contraptions/base/KineticTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/base/KineticTileEntity.java index f38efb6fa..ae701fb85 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/base/KineticTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/base/KineticTileEntity.java @@ -14,6 +14,7 @@ import com.simibubi.create.content.contraptions.base.IRotate.SpeedLevel; import com.simibubi.create.content.contraptions.base.IRotate.StressImpact; import com.simibubi.create.content.contraptions.goggles.IHaveGoggleInformation; import com.simibubi.create.content.contraptions.goggles.IHaveHoveringInformation; +import com.simibubi.create.content.contraptions.relays.elementary.ICogWheel; import com.simibubi.create.foundation.config.AllConfigs; import com.simibubi.create.foundation.item.TooltipHelper; import com.simibubi.create.foundation.render.backend.FastRenderDispatcher; @@ -529,7 +530,7 @@ public abstract class KineticTileEntity extends SmartTileEntity } protected boolean canPropagateDiagonally(IRotate block, BlockState state) { - return block.hasIntegratedCogwheel(world, pos, state); + return ICogWheel.isSmallCog(state); } @Override diff --git a/src/main/java/com/simibubi/create/content/contraptions/base/KineticTileEntityRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/base/KineticTileEntityRenderer.java index 6ff654402..fe297f718 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/base/KineticTileEntityRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/base/KineticTileEntityRenderer.java @@ -6,6 +6,7 @@ import com.simibubi.create.AllBlocks; import com.simibubi.create.CreateClient; import com.simibubi.create.content.contraptions.KineticDebugger; import com.simibubi.create.content.contraptions.relays.elementary.CogWheelBlock; +import com.simibubi.create.content.contraptions.relays.elementary.ICogWheel; import com.simibubi.create.foundation.render.Compartment; import com.simibubi.create.foundation.render.SuperByteBuffer; import com.simibubi.create.foundation.render.backend.FastRenderDispatcher; @@ -96,7 +97,7 @@ public class KineticTileEntityRenderer extends SafeTileEntityRenderer extends T } protected float getRotationOffset(final Direction.Axis axis) { - float offset = CogWheelBlock.isLargeCog(blockState) ? 11.25f : 0; + float offset = ICogWheel.isLargeCog(blockState) ? 11.25f : 0; double d = (((axis == Direction.Axis.X) ? 0 : pos.getX()) + ((axis == Direction.Axis.Y) ? 0 : pos.getY()) + ((axis == Direction.Axis.Z) ? 0 : pos.getZ())) % 2; if (d == 0) { diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/crafter/MechanicalCrafterBlock.java b/src/main/java/com/simibubi/create/content/contraptions/components/crafter/MechanicalCrafterBlock.java index 7f4c9d899..5d4d79ce6 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/crafter/MechanicalCrafterBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/crafter/MechanicalCrafterBlock.java @@ -7,6 +7,7 @@ import com.simibubi.create.content.contraptions.base.HorizontalKineticBlock; import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.content.contraptions.components.crafter.ConnectedInputHandler.ConnectedInput; import com.simibubi.create.content.contraptions.components.crafter.MechanicalCrafterTileEntity.Phase; +import com.simibubi.create.content.contraptions.relays.elementary.ICogWheel; import com.simibubi.create.foundation.block.ITE; import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour; import com.simibubi.create.foundation.tileEntity.behaviour.inventory.InvManipulationBehaviour; @@ -41,7 +42,7 @@ import net.minecraftforge.items.IItemHandler; import net.minecraftforge.items.ItemHandlerHelper; import net.minecraftforge.items.ItemStackHandler; -public class MechanicalCrafterBlock extends HorizontalKineticBlock implements ITE { +public class MechanicalCrafterBlock extends HorizontalKineticBlock implements ITE, ICogWheel { public static final EnumProperty POINTING = EnumProperty.create("pointing", Pointing.class); @@ -60,11 +61,6 @@ public class MechanicalCrafterBlock extends HorizontalKineticBlock implements IT return AllTileEntities.MECHANICAL_CRAFTER.create(); } - @Override - public boolean hasIntegratedCogwheel(IWorldReader world, BlockPos pos, BlockState state) { - return true; - } - @Override public Axis getRotationAxis(BlockState state) { return state.get(HORIZONTAL_FACING) diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/millstone/MillstoneBlock.java b/src/main/java/com/simibubi/create/content/contraptions/components/millstone/MillstoneBlock.java index 9696e6b11..7c7ecc989 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/millstone/MillstoneBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/millstone/MillstoneBlock.java @@ -3,6 +3,7 @@ package com.simibubi.create.content.contraptions.components.millstone; import com.simibubi.create.AllShapes; import com.simibubi.create.AllTileEntities; import com.simibubi.create.content.contraptions.base.KineticBlock; +import com.simibubi.create.content.contraptions.relays.elementary.ICogWheel; import com.simibubi.create.foundation.block.ITE; import com.simibubi.create.foundation.item.ItemHelper; import com.simibubi.create.foundation.utility.Iterate; @@ -30,7 +31,7 @@ import net.minecraftforge.items.IItemHandler; import net.minecraftforge.items.IItemHandlerModifiable; import net.minecraftforge.items.ItemStackHandler; -public class MillstoneBlock extends KineticBlock implements ITE { +public class MillstoneBlock extends KineticBlock implements ITE, ICogWheel { public MillstoneBlock(Properties properties) { super(properties); @@ -131,11 +132,6 @@ public class MillstoneBlock extends KineticBlock implements ITE { +public class MechanicalMixerBlock extends KineticBlock implements ITE, ICogWheel { public MechanicalMixerBlock(Properties properties) { super(properties); @@ -51,11 +52,6 @@ public class MechanicalMixerBlock extends KineticBlock implements ITE items) { items.add(new ItemStack(this)); } - - // IRotate - - @Override - public boolean hasIntegratedCogwheel(IWorldReader world, BlockPos pos, BlockState state) { - return !isLarge; - } } diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/elementary/CogwheelBlockItem.java b/src/main/java/com/simibubi/create/content/contraptions/relays/elementary/CogwheelBlockItem.java index 6d8018e30..9b5c2af90 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/elementary/CogwheelBlockItem.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/elementary/CogwheelBlockItem.java @@ -21,7 +21,6 @@ import com.simibubi.create.AllBlocks; import com.simibubi.create.AllShapes; import com.simibubi.create.content.contraptions.base.DirectionalKineticBlock; import com.simibubi.create.content.contraptions.base.HorizontalKineticBlock; -import com.simibubi.create.content.contraptions.base.IRotate; import com.simibubi.create.foundation.advancement.AllTriggers; import com.simibubi.create.foundation.utility.Iterate; import com.simibubi.create.foundation.utility.placement.IPlacementHelper; @@ -241,8 +240,7 @@ public class CogwheelBlockItem extends BlockItem { @Override public Predicate getStatePredicate() { - return s -> !AllBlocks.COGWHEEL.has(s) && s.getBlock() instanceof IRotate - && ((IRotate) s.getBlock()).hasIntegratedCogwheel(null, null, null); + return s -> !AllBlocks.COGWHEEL.has(s) && ICogWheel.isSmallCog(s); } @Override @@ -285,7 +283,7 @@ public class CogwheelBlockItem extends BlockItem { } } - static public boolean hasLargeCogwheelNeighbor(World world, BlockPos pos, Axis axis) { + public static boolean hasLargeCogwheelNeighbor(World world, BlockPos pos, Axis axis) { for (Direction dir : Iterate.directions) { if (dir.getAxis() == axis) continue; @@ -297,7 +295,7 @@ public class CogwheelBlockItem extends BlockItem { return false; } - static public boolean hasSmallCogwheelNeighbor(World world, BlockPos pos, Axis axis) { + public static boolean hasSmallCogwheelNeighbor(World world, BlockPos pos, Axis axis) { for (Direction dir : Iterate.directions) { if (dir.getAxis() == axis) continue; diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/elementary/ICogWheel.java b/src/main/java/com/simibubi/create/content/contraptions/relays/elementary/ICogWheel.java new file mode 100644 index 000000000..c8b4cab28 --- /dev/null +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/elementary/ICogWheel.java @@ -0,0 +1,22 @@ +package com.simibubi.create.content.contraptions.relays.elementary; + +import com.simibubi.create.content.contraptions.base.IRotate; +import net.minecraft.block.BlockState; + +public interface ICogWheel extends IRotate { + static boolean isSmallCog(BlockState state) { + return state.getBlock() instanceof ICogWheel && ((ICogWheel) state.getBlock()).isSmallCog(); + } + + static boolean isLargeCog(BlockState state) { + return state.getBlock() instanceof ICogWheel && ((ICogWheel) state.getBlock()).isLargeCog(); + } + + default boolean isLargeCog() { + return false; + } + + default boolean isSmallCog() { + return !isLargeCog(); + } +} diff --git a/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmBlock.java b/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmBlock.java index 13354fc17..cbf44210c 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmBlock.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmBlock.java @@ -1,5 +1,6 @@ package com.simibubi.create.content.logistics.block.mechanicalArm; +import com.simibubi.create.content.contraptions.relays.elementary.ICogWheel; import org.apache.commons.lang3.mutable.MutableBoolean; import com.simibubi.create.AllShapes; @@ -29,7 +30,7 @@ import net.minecraft.world.IBlockReader; import net.minecraft.world.IWorldReader; import net.minecraft.world.World; -public class ArmBlock extends KineticBlock implements ITE { +public class ArmBlock extends KineticBlock implements ITE, ICogWheel { public static final BooleanProperty CEILING = BooleanProperty.create("ceiling"); @@ -48,11 +49,6 @@ public class ArmBlock extends KineticBlock implements ITE { return getDefaultState().with(CEILING, ctx.getFace() == Direction.DOWN); } - @Override - public boolean hasIntegratedCogwheel(IWorldReader world, BlockPos pos, BlockState state) { - return true; - } - @Override public VoxelShape getShape(BlockState state, IBlockReader p_220053_2_, BlockPos p_220053_3_, ISelectionContext p_220053_4_) { From 7b022cd302536679ac751917a4514eeed5ada254 Mon Sep 17 00:00:00 2001 From: grimmauld Date: Sat, 27 Mar 2021 23:05:59 +0100 Subject: [PATCH 05/11] Cogwheel refactor Part II - Refactored getStateForPlacement to reduce doubled code --- .../relays/elementary/CogWheelBlock.java | 86 ++++++++----------- 1 file changed, 35 insertions(+), 51 deletions(-) diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/elementary/CogWheelBlock.java b/src/main/java/com/simibubi/create/content/contraptions/relays/elementary/CogWheelBlock.java index 65d64982b..ac973a053 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/elementary/CogWheelBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/elementary/CogWheelBlock.java @@ -5,18 +5,14 @@ import com.simibubi.create.AllShapes; import com.simibubi.create.content.contraptions.base.IRotate; import com.simibubi.create.content.contraptions.relays.advanced.SpeedControllerBlock; import com.simibubi.create.foundation.utility.Iterate; - +import mcp.MethodsReturnNonnullByDefault; import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.fluid.Fluids; -import net.minecraft.fluid.IFluidState; import net.minecraft.item.BlockItemUseContext; -import net.minecraft.item.ItemGroup; -import net.minecraft.item.ItemStack; import net.minecraft.state.properties.BlockStateProperties; import net.minecraft.util.Direction; import net.minecraft.util.Direction.Axis; -import net.minecraft.util.NonNullList; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.shapes.ISelectionContext; import net.minecraft.util.math.shapes.VoxelShape; @@ -24,7 +20,12 @@ import net.minecraft.world.IBlockReader; import net.minecraft.world.IWorldReader; import net.minecraft.world.World; -public class CogWheelBlock extends AbstractShaftBlock implements ICogWheel{ +import javax.annotation.ParametersAreNonnullByDefault; + +@ParametersAreNonnullByDefault +@MethodsReturnNonnullByDefault +@SuppressWarnings("deprecation") +public class CogWheelBlock extends AbstractShaftBlock implements ICogWheel { boolean isLarge; @@ -67,65 +68,48 @@ public class CogWheelBlock extends AbstractShaftBlock implements ICogWheel{ if (blockState.has(AXIS) && facing.getAxis() == blockState.get(AXIS)) continue; - boolean smallCog = ICogWheel.isSmallCog(blockState); - - if (ICogWheel.isLargeCog(blockState) || isLarge && smallCog) + if (ICogWheel.isLargeCog(blockState) || isLargeCog() && ICogWheel.isSmallCog(blockState)) return false; } return true; } + protected Axis getAxisForPlacement(BlockItemUseContext context) { + if (context.getPlayer() != null && context.getPlayer().isSneaking()) + return context.getFace().getAxis(); + + World world = context.getWorld(); + BlockState stateBelow = world.getBlockState(context.getPos().down()); + + if (AllBlocks.ROTATION_SPEED_CONTROLLER.has(stateBelow) && isLargeCog()) + return stateBelow.get(SpeedControllerBlock.HORIZONTAL_AXIS) == Axis.X ? Axis.Z : Axis.X; + + BlockPos placedOnPos = context.getPos().offset(context.getFace().getOpposite()); + BlockState placedAgainst = world.getBlockState(placedOnPos); + + Block block = placedAgainst.getBlock(); + if (ICogWheel.isSmallCog(placedAgainst)) + return ((IRotate) block).getRotationAxis(placedAgainst); + + Axis preferredAxis = getPreferredAxis(context); + return preferredAxis != null ? preferredAxis : context.getFace().getAxis(); + } + @Override public BlockState getStateForPlacement(BlockItemUseContext context) { - BlockPos placedOnPos = context.getPos() - .offset(context.getFace() - .getOpposite()); - World world = context.getWorld(); - BlockState placedAgainst = world.getBlockState(placedOnPos); - Block block = placedAgainst.getBlock(); - - if (context.getPlayer() != null && context.getPlayer() - .isSneaking()) - return this.getDefaultState() - .with(AXIS, context.getFace() - .getAxis()); - - BlockState stateBelow = world.getBlockState(context.getPos() - .down()); - IFluidState ifluidstate = context.getWorld() - .getFluidState(context.getPos()); - if (AllBlocks.ROTATION_SPEED_CONTROLLER.has(stateBelow) && isLarge) { - return this.getDefaultState() - .with(BlockStateProperties.WATERLOGGED, ifluidstate.getFluid() == Fluids.WATER) - .with(AXIS, stateBelow.get(SpeedControllerBlock.HORIZONTAL_AXIS) == Axis.X ? Axis.Z : Axis.X); - } - - if (!ICogWheel.isSmallCog(placedAgainst)) { - Axis preferredAxis = getPreferredAxis(context); - if (preferredAxis != null) - return this.getDefaultState() - .with(AXIS, preferredAxis) - .with(BlockStateProperties.WATERLOGGED, ifluidstate.getFluid() == Fluids.WATER); - return this.getDefaultState() - .with(AXIS, context.getFace() - .getAxis()) - .with(BlockStateProperties.WATERLOGGED, ifluidstate.getFluid() == Fluids.WATER); - } - - return getDefaultState().with(AXIS, ((IRotate) block).getRotationAxis(placedAgainst)); + boolean shouldWaterlog = context.getWorld().getFluidState(context.getPos()).getFluid() == Fluids.WATER; + return this.getDefaultState() + .with(AXIS, getAxisForPlacement(context)) + .with(BlockStateProperties.WATERLOGGED, shouldWaterlog); } @Override public float getParticleTargetRadius() { - return isLarge ? 1.125f : .65f; + return isLargeCog() ? 1.125f : .65f; } @Override public float getParticleInitialRadius() { - return isLarge ? 1f : .75f; - } - - public void fillItemGroup(ItemGroup group, NonNullList items) { - items.add(new ItemStack(this)); + return isLargeCog() ? 1f : .75f; } } From 5f49698a94a86fd9b0270946b06b5526c3186de8 Mon Sep 17 00:00:00 2001 From: JozsefA Date: Sat, 27 Mar 2021 15:06:56 -0700 Subject: [PATCH 06/11] Fix mixer weirdness. - Mixer and Press instances now use the quaternion shader. --- .../components/mixer/MixerInstance.java | 114 ++++++++---------- .../components/press/PressInstance.java | 25 ++-- 2 files changed, 68 insertions(+), 71 deletions(-) diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/mixer/MixerInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/mixer/MixerInstance.java index 50098f65f..9cd7c0c7b 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/mixer/MixerInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/mixer/MixerInstance.java @@ -1,91 +1,81 @@ package com.simibubi.create.content.contraptions.components.mixer; -import com.mojang.blaze3d.matrix.MatrixStack; import com.simibubi.create.AllBlockPartials; -import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.content.contraptions.base.RotatingData; import com.simibubi.create.content.contraptions.base.ShaftlessCogInstance; import com.simibubi.create.foundation.render.backend.instancing.*; -import com.simibubi.create.foundation.render.backend.instancing.impl.ModelData; +import com.simibubi.create.foundation.render.backend.instancing.impl.OrientedData; import com.simibubi.create.foundation.utility.AnimationTickHolder; -import com.simibubi.create.foundation.utility.MatrixStacker; + import net.minecraft.util.Direction; public class MixerInstance extends ShaftlessCogInstance implements IDynamicInstance { - private final InstanceKey mixerHead; - private final InstanceKey mixerPole; + private final InstanceKey mixerHead; + private final InstanceKey mixerPole; + private final MechanicalMixerTileEntity mixer; - public MixerInstance(InstancedTileRenderer dispatcher, KineticTileEntity tile) { - super(dispatcher, tile); + public MixerInstance(InstancedTileRenderer dispatcher, MechanicalMixerTileEntity tile) { + super(dispatcher, tile); + this.mixer = tile; - mixerHead = getRotatingMaterial().getModel(AllBlockPartials.MECHANICAL_MIXER_HEAD, blockState) - .createInstance(); + mixerHead = getRotatingMaterial().getModel(AllBlockPartials.MECHANICAL_MIXER_HEAD, blockState) + .createInstance(); - mixerHead.getInstance() - .setRotationAxis(Direction.Axis.Y); + mixerHead.getInstance() + .setRotationAxis(Direction.Axis.Y); - mixerPole = getTransformMaterial() - .getModel(AllBlockPartials.MECHANICAL_MIXER_POLE, blockState) - .createInstance(); + mixerPole = getOrientedMaterial() + .getModel(AllBlockPartials.MECHANICAL_MIXER_POLE, blockState) + .createInstance(); - MechanicalMixerTileEntity mixer = (MechanicalMixerTileEntity) tile; - float renderedHeadOffset = getRenderedHeadOffset(mixer); + float renderedHeadOffset = getRenderedHeadOffset(); - transformPole(renderedHeadOffset); - transformHead(mixer, renderedHeadOffset); - } + transformPole(renderedHeadOffset); + transformHead(renderedHeadOffset); + } - @Override - public void beginFrame() { - MechanicalMixerTileEntity mixer = (MechanicalMixerTileEntity) tile; + @Override + public void beginFrame() { - float renderedHeadOffset = getRenderedHeadOffset(mixer); + float renderedHeadOffset = getRenderedHeadOffset(); - if (mixer.running) { - transformPole(renderedHeadOffset); - } + transformPole(renderedHeadOffset); + transformHead(renderedHeadOffset); + } - transformHead(mixer, renderedHeadOffset); - } + private void transformHead(float renderedHeadOffset) { + float speed = mixer.getRenderedHeadRotationSpeed(AnimationTickHolder.getPartialTicks()); - private void transformHead(MechanicalMixerTileEntity mixer, float renderedHeadOffset) { - float speed = mixer.getRenderedHeadRotationSpeed(AnimationTickHolder.getPartialTicks()); + mixerHead.getInstance() + .setPosition(getInstancePosition()) + .nudge(0, -renderedHeadOffset, 0) + .setRotationalSpeed(speed * 2); + } - mixerHead.getInstance() - .setPosition(getInstancePosition()) - .nudge(0, -renderedHeadOffset, 0) - .setRotationalSpeed(speed * 2); - } + private void transformPole(float renderedHeadOffset) { + mixerPole.getInstance() + .setPosition(getInstancePosition()) + .nudge(0, -renderedHeadOffset, 0); + } - private void transformPole(float renderedHeadOffset) { - MatrixStack ms = new MatrixStack(); + private float getRenderedHeadOffset() { + return mixer.getRenderedHeadOffset(AnimationTickHolder.getPartialTicks()); + } - MatrixStacker msr = MatrixStacker.of(ms); - msr.translate(getInstancePosition()); - msr.translate(0, -renderedHeadOffset, 0); + @Override + public void updateLight() { + super.updateLight(); - mixerPole.getInstance().setTransform(ms); - } + relight(pos.down(), mixerHead.getInstance()); + relight(pos, mixerPole.getInstance()); + } - private float getRenderedHeadOffset(MechanicalMixerTileEntity mixer) { - return mixer.getRenderedHeadOffset(AnimationTickHolder.getPartialTicks()); - } - - @Override - public void updateLight() { - super.updateLight(); - - relight(pos.down(), mixerHead.getInstance()); - - relight(pos, mixerPole.getInstance()); - } - - @Override - public void remove() { - super.remove(); - mixerHead.delete(); - mixerPole.delete(); - } + @Override + public void remove() { + super.remove(); + mixerHead.delete(); + mixerPole.delete(); + } } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/press/PressInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/press/PressInstance.java index e9985adb6..d40e9d421 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/press/PressInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/press/PressInstance.java @@ -1,5 +1,8 @@ package com.simibubi.create.content.contraptions.components.press; +import net.minecraft.client.renderer.Quaternion; +import net.minecraft.client.renderer.Vector3f; + import com.mojang.blaze3d.matrix.MatrixStack; import com.simibubi.create.AllBlockPartials; import com.simibubi.create.content.contraptions.base.KineticTileEntity; @@ -8,19 +11,28 @@ import com.simibubi.create.foundation.render.backend.instancing.IDynamicInstance import com.simibubi.create.foundation.render.backend.instancing.InstanceKey; import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer; import com.simibubi.create.foundation.render.backend.instancing.impl.ModelData; +import com.simibubi.create.foundation.render.backend.instancing.impl.OrientedData; +import com.simibubi.create.foundation.utility.AngleHelper; import com.simibubi.create.foundation.utility.AnimationTickHolder; import com.simibubi.create.foundation.utility.MatrixStacker; public class PressInstance extends ShaftInstance implements IDynamicInstance { - private final InstanceKey pressHead; + private final InstanceKey pressHead; private final MechanicalPressTileEntity press; public PressInstance(InstancedTileRenderer dispatcher, MechanicalPressTileEntity tile) { super(dispatcher, tile); press = tile; - pressHead = AllBlockPartials.MECHANICAL_PRESS_HEAD.renderOnHorizontalModel(dispatcher, blockState).createInstance(); + pressHead = dispatcher.getOrientedMaterial() + .getModel(AllBlockPartials.MECHANICAL_PRESS_HEAD, blockState) + .createInstance(); + + Quaternion q = Vector3f.POSITIVE_Y.getDegreesQuaternion(AngleHelper.horizontalAngle(blockState.get(MechanicalPressBlock.HORIZONTAL_FACING))); + + pressHead.getInstance().setRotation(q); + transformModels(); } @@ -35,14 +47,9 @@ public class PressInstance extends ShaftInstance implements IDynamicInstance { private void transformModels() { float renderedHeadOffset = getRenderedHeadOffset(press); - MatrixStack ms = new MatrixStack(); - - MatrixStacker msr = MatrixStacker.of(ms); - msr.translate(getInstancePosition()); - msr.translate(0, -renderedHeadOffset, 0); - pressHead.getInstance() - .setTransform(ms); + .setPosition(getInstancePosition()) + .nudge(0, -renderedHeadOffset, 0); } private float getRenderedHeadOffset(MechanicalPressTileEntity press) { From 1bffb82ae4a82942404cbb27812166d52f262eae Mon Sep 17 00:00:00 2001 From: grimmauld Date: Sun, 28 Mar 2021 00:19:27 +0100 Subject: [PATCH 07/11] Cogwheel refactor Part III - Removed the calls to the AllBlocks entries where necessary - Made placement helpers call the same code as CogWheelBlock.isValidPosition --- .../relays/advanced/SpeedControllerBlock.java | 28 +++++------ .../advanced/SpeedControllerTileEntity.java | 5 +- .../relays/elementary/CogWheelBlock.java | 13 +++++- .../relays/elementary/CogwheelBlockItem.java | 43 ++++------------- .../relays/elementary/ICogWheel.java | 46 ++++++++++++++++++- .../elementary/SimpleKineticTileEntity.java | 3 +- 6 files changed, 83 insertions(+), 55 deletions(-) diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/advanced/SpeedControllerBlock.java b/src/main/java/com/simibubi/create/content/contraptions/relays/advanced/SpeedControllerBlock.java index 7cf8d25ed..5a7edbd98 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/advanced/SpeedControllerBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/advanced/SpeedControllerBlock.java @@ -1,6 +1,16 @@ package com.simibubi.create.content.contraptions.relays.advanced; +import com.simibubi.create.AllBlocks; +import com.simibubi.create.AllShapes; +import com.simibubi.create.AllTileEntities; +import com.simibubi.create.content.contraptions.base.HorizontalAxisKineticBlock; +import com.simibubi.create.content.contraptions.relays.elementary.CogWheelBlock; +import com.simibubi.create.content.contraptions.relays.elementary.CogwheelBlockItem; import com.simibubi.create.content.contraptions.relays.elementary.ICogWheel; +import com.simibubi.create.foundation.block.ITE; +import com.simibubi.create.foundation.utility.placement.IPlacementHelper; +import com.simibubi.create.foundation.utility.placement.PlacementHelpers; +import com.simibubi.create.foundation.utility.placement.PlacementOffset; import mcp.MethodsReturnNonnullByDefault; import net.minecraft.block.Block; import net.minecraft.block.BlockState; @@ -19,18 +29,11 @@ import net.minecraft.util.math.shapes.VoxelShape; import net.minecraft.world.IBlockReader; import net.minecraft.world.World; +import javax.annotation.ParametersAreNonnullByDefault; import java.util.function.Predicate; -import com.simibubi.create.AllBlocks; -import com.simibubi.create.AllShapes; -import com.simibubi.create.AllTileEntities; -import com.simibubi.create.content.contraptions.base.HorizontalAxisKineticBlock; -import com.simibubi.create.content.contraptions.relays.elementary.CogWheelBlock; -import com.simibubi.create.content.contraptions.relays.elementary.CogwheelBlockItem; -import com.simibubi.create.foundation.block.ITE; -import com.simibubi.create.foundation.utility.placement.IPlacementHelper; -import com.simibubi.create.foundation.utility.placement.PlacementHelpers; -import com.simibubi.create.foundation.utility.placement.PlacementOffset; +@ParametersAreNonnullByDefault +@MethodsReturnNonnullByDefault public class SpeedControllerBlock extends HorizontalAxisKineticBlock implements ITE { private static final int placementHelperId = PlacementHelpers.register(new PlacementHelper()); @@ -83,7 +86,7 @@ public class SpeedControllerBlock extends HorizontalAxisKineticBlock implements private static class PlacementHelper implements IPlacementHelper { @Override public Predicate getItemPredicate() { - return AllBlocks.LARGE_COGWHEEL::isIn; + return ((Predicate) ICogWheel::isLargeCogItem).and(ICogWheel::isDedicatedCogItem); } @Override @@ -101,8 +104,7 @@ public class SpeedControllerBlock extends HorizontalAxisKineticBlock implements Axis newAxis = state.get(HORIZONTAL_AXIS) == Axis.X ? Axis.Z : Axis.X; - if (CogwheelBlockItem.hasLargeCogwheelNeighbor(world, newPos, newAxis) - || CogwheelBlockItem.hasSmallCogwheelNeighbor(world, newPos, newAxis)) + if (!CogWheelBlock.isValidCogwheelPosition(true, world, newPos, newAxis)) return PlacementOffset.fail(); return PlacementOffset.success(newPos, s -> s.with(CogWheelBlock.AXIS, newAxis)); diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/advanced/SpeedControllerTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/relays/advanced/SpeedControllerTileEntity.java index 8c225b86a..725d2e204 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/advanced/SpeedControllerTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/advanced/SpeedControllerTileEntity.java @@ -7,6 +7,7 @@ import com.simibubi.create.content.contraptions.RotationPropagator; import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.content.contraptions.components.motor.CreativeMotorTileEntity; import com.simibubi.create.content.contraptions.relays.elementary.CogWheelBlock; +import com.simibubi.create.content.contraptions.relays.elementary.ICogWheel; import com.simibubi.create.foundation.config.AllConfigs; import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour; import com.simibubi.create.foundation.tileEntity.behaviour.ValueBoxTransform; @@ -118,8 +119,8 @@ public class SpeedControllerTileEntity extends KineticTileEntity { if (world == null || !world.isRemote) return; BlockState stateAbove = world.getBlockState(pos.up()); - hasBracket = AllBlocks.LARGE_COGWHEEL.has(stateAbove) && stateAbove.get(CogWheelBlock.AXIS) - .isHorizontal(); + hasBracket = ICogWheel.isDedicatedCogWheel(stateAbove.getBlock()) && ICogWheel.isLargeCog(stateAbove) + && stateAbove.get(CogWheelBlock.AXIS).isHorizontal(); } @Override diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/elementary/CogWheelBlock.java b/src/main/java/com/simibubi/create/content/contraptions/relays/elementary/CogWheelBlock.java index ac973a053..deb5c17df 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/elementary/CogWheelBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/elementary/CogWheelBlock.java @@ -59,8 +59,12 @@ public class CogWheelBlock extends AbstractShaftBlock implements ICogWheel { @Override public boolean isValidPosition(BlockState state, IWorldReader worldIn, BlockPos pos) { + return isValidCogwheelPosition(ICogWheel.isLargeCog(state), worldIn, pos, state.get(AXIS)); + } + + public static boolean isValidCogwheelPosition(boolean large, IWorldReader worldIn, BlockPos pos, Axis cogAxis) { for (Direction facing : Iterate.directions) { - if (facing.getAxis() == state.get(AXIS)) + if (facing.getAxis() == cogAxis) continue; BlockPos offsetPos = pos.offset(facing); @@ -68,7 +72,7 @@ public class CogWheelBlock extends AbstractShaftBlock implements ICogWheel { if (blockState.has(AXIS) && facing.getAxis() == blockState.get(AXIS)) continue; - if (ICogWheel.isLargeCog(blockState) || isLargeCog() && ICogWheel.isSmallCog(blockState)) + if (ICogWheel.isLargeCog(blockState) || large && ICogWheel.isSmallCog(blockState)) return false; } return true; @@ -112,4 +116,9 @@ public class CogWheelBlock extends AbstractShaftBlock implements ICogWheel { public float getParticleInitialRadius() { return isLargeCog() ? 1f : .75f; } + + @Override + public boolean isDedicatedCogWheel() { + return true; + } } diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/elementary/CogwheelBlockItem.java b/src/main/java/com/simibubi/create/content/contraptions/relays/elementary/CogwheelBlockItem.java index 9b5c2af90..b8b0a0d5e 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/elementary/CogwheelBlockItem.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/elementary/CogwheelBlockItem.java @@ -17,7 +17,6 @@ import net.minecraft.world.World; import java.util.List; import java.util.function.Predicate; -import com.simibubi.create.AllBlocks; import com.simibubi.create.AllShapes; import com.simibubi.create.content.contraptions.base.DirectionalKineticBlock; import com.simibubi.create.content.contraptions.base.HorizontalKineticBlock; @@ -99,7 +98,7 @@ public class CogwheelBlockItem extends BlockItem { continue; if (blockState.get(CogWheelBlock.AXIS) != axis) continue; - if (AllBlocks.LARGE_COGWHEEL.has(blockState) == large) + if (ICogWheel.isLargeCog(blockState) == large) continue; AllTriggers.triggerFor(AllTriggers.SHIFTING_GEARS, player); } @@ -113,7 +112,7 @@ public class CogwheelBlockItem extends BlockItem { @Override public Predicate getItemPredicate() { - return AllBlocks.COGWHEEL::isIn; + return ((Predicate) ICogWheel::isSmallCogItem).and(ICogWheel::isDedicatedCogItem); } @Override @@ -128,7 +127,7 @@ public class CogwheelBlockItem extends BlockItem { for (Direction dir : directions) { BlockPos newPos = pos.offset(dir); - if (hasLargeCogwheelNeighbor(world, newPos, state.get(AXIS))) + if (!CogWheelBlock.isValidCogwheelPosition(false, world, newPos, state.get(AXIS))) continue; if (!world.getBlockState(newPos) @@ -152,7 +151,7 @@ public class CogwheelBlockItem extends BlockItem { @Override public Predicate getItemPredicate() { - return AllBlocks.LARGE_COGWHEEL::isIn; + return ((Predicate) ICogWheel::isLargeCogItem).and(ICogWheel::isDedicatedCogItem); } @Override @@ -169,7 +168,7 @@ public class CogwheelBlockItem extends BlockItem { BlockPos newPos = pos.offset(dir) .offset(side); - if (hasLargeCogwheelNeighbor(world, newPos, dir.getAxis()) || hasSmallCogwheelNeighbor(world, newPos, dir.getAxis())) + if (!CogWheelBlock.isValidCogwheelPosition(true, world, newPos, dir.getAxis())) continue; if (!world.getBlockState(newPos) @@ -211,7 +210,7 @@ public class CogwheelBlockItem extends BlockItem { .isReplaceable()) continue; - if (AllBlocks.COGWHEEL.has(state) && hasSmallCogwheelNeighbor(world, newPos, state.get(AXIS))) + if (!CogWheelBlock.isValidCogwheelPosition(ICogWheel.isLargeCog(state), world, newPos, state.get(AXIS))) continue; return PlacementOffset.success(newPos, s -> s.with(AXIS, state.get(AXIS))); @@ -235,12 +234,12 @@ public class CogwheelBlockItem extends BlockItem { @Override public Predicate getItemPredicate() { - return AllBlocks.LARGE_COGWHEEL::isIn; + return ((Predicate) ICogWheel::isLargeCogItem).and(ICogWheel::isDedicatedCogItem); } @Override public Predicate getStatePredicate() { - return s -> !AllBlocks.COGWHEEL.has(s) && ICogWheel.isSmallCog(s); + return s -> !ICogWheel.isDedicatedCogWheel(s.getBlock()) && ICogWheel.isSmallCog(s); } @Override @@ -272,8 +271,7 @@ public class CogwheelBlockItem extends BlockItem { .isReplaceable()) continue; - if (hasLargeCogwheelNeighbor(world, newPos, newAxis) - || hasSmallCogwheelNeighbor(world, newPos, newAxis)) + if (!CogWheelBlock.isValidCogwheelPosition(false, world, newPos, newAxis)) return PlacementOffset.fail(); return PlacementOffset.success(newPos, s -> s.with(CogWheelBlock.AXIS, newAxis)); @@ -283,27 +281,4 @@ public class CogwheelBlockItem extends BlockItem { } } - public static boolean hasLargeCogwheelNeighbor(World world, BlockPos pos, Axis axis) { - for (Direction dir : Iterate.directions) { - if (dir.getAxis() == axis) - continue; - - if (AllBlocks.LARGE_COGWHEEL.has(world.getBlockState(pos.offset(dir)))) - return true; - } - - return false; - } - - public static boolean hasSmallCogwheelNeighbor(World world, BlockPos pos, Axis axis) { - for (Direction dir : Iterate.directions) { - if (dir.getAxis() == axis) - continue; - - if (AllBlocks.COGWHEEL.has(world.getBlockState(pos.offset(dir)))) - return true; - } - - return false; - } } diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/elementary/ICogWheel.java b/src/main/java/com/simibubi/create/content/contraptions/relays/elementary/ICogWheel.java index c8b4cab28..7f2ad6f2c 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/elementary/ICogWheel.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/elementary/ICogWheel.java @@ -1,15 +1,53 @@ package com.simibubi.create.content.contraptions.relays.elementary; import com.simibubi.create.content.contraptions.base.IRotate; +import net.minecraft.block.Block; import net.minecraft.block.BlockState; +import net.minecraft.item.BlockItem; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; public interface ICogWheel extends IRotate { + static boolean isSmallCog(BlockState state) { - return state.getBlock() instanceof ICogWheel && ((ICogWheel) state.getBlock()).isSmallCog(); + return isSmallCog(state.getBlock()); } static boolean isLargeCog(BlockState state) { - return state.getBlock() instanceof ICogWheel && ((ICogWheel) state.getBlock()).isLargeCog(); + return isLargeCog(state.getBlock()); + } + + static boolean isSmallCog(Block block) { + return block instanceof ICogWheel && ((ICogWheel) block).isSmallCog(); + } + + static boolean isLargeCog(Block block) { + return block instanceof ICogWheel && ((ICogWheel) block).isLargeCog(); + } + + static boolean isDedicatedCogWheel(Block block) { + return block instanceof ICogWheel && ((ICogWheel) block).isDedicatedCogWheel(); + } + + static boolean isDedicatedCogItem(ItemStack test) { + Item item = test.getItem(); + if (!(item instanceof BlockItem)) + return false; + return isDedicatedCogWheel(((BlockItem) item).getBlock()); + } + + static boolean isSmallCogItem(ItemStack test) { + Item item = test.getItem(); + if (!(item instanceof BlockItem)) + return false; + return isSmallCog(((BlockItem) item).getBlock()); + } + + static boolean isLargeCogItem(ItemStack test) { + Item item = test.getItem(); + if (!(item instanceof BlockItem)) + return false; + return isLargeCog(((BlockItem) item).getBlock()); } default boolean isLargeCog() { @@ -19,4 +57,8 @@ public interface ICogWheel extends IRotate { default boolean isSmallCog() { return !isLargeCog(); } + + default boolean isDedicatedCogWheel() { + return false; + } } diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/elementary/SimpleKineticTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/relays/elementary/SimpleKineticTileEntity.java index ddf55f972..2c3f47a6a 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/elementary/SimpleKineticTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/elementary/SimpleKineticTileEntity.java @@ -2,7 +2,6 @@ package com.simibubi.create.content.contraptions.relays.elementary; import java.util.List; -import com.simibubi.create.AllBlocks; import com.simibubi.create.content.contraptions.base.IRotate; import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.foundation.advancement.AllTriggers; @@ -34,7 +33,7 @@ public class SimpleKineticTileEntity extends KineticTileEntity { @Override public List addPropagationLocations(IRotate block, BlockState state, List neighbours) { - if (!AllBlocks.LARGE_COGWHEEL.has(state)) + if (!ICogWheel.isLargeCog(state)) return super.addPropagationLocations(block, state, neighbours); BlockPos.getAllInBox(new BlockPos(-1, -1, -1), new BlockPos(1, 1, 1)) From 4e7777a1304e279df8978e72ea2705dd9a0f9cb7 Mon Sep 17 00:00:00 2001 From: JozsefA Date: Sat, 27 Mar 2021 16:35:47 -0700 Subject: [PATCH 08/11] Fix more instancing nonsense. OrientedData was still applying the origin position shift, so some things (mechanical presses) wouldn't appear in the right spot. --- .../create/content/contraptions/base/KineticData.java | 6 ------ .../render/backend/instancing/impl/OrientedData.java | 8 -------- 2 files changed, 14 deletions(-) diff --git a/src/main/java/com/simibubi/create/content/contraptions/base/KineticData.java b/src/main/java/com/simibubi/create/content/contraptions/base/KineticData.java index 18e48cb8f..376f46514 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/base/KineticData.java +++ b/src/main/java/com/simibubi/create/content/contraptions/base/KineticData.java @@ -28,12 +28,6 @@ public class KineticData extends BasicData { return setPosition(pos.getX(), pos.getY(), pos.getZ()); } - public KineticData setPosition(int x, int y, int z) { - return setPosition((float) (x), - (float) (y), - (float) (z)); - } - public KineticData setPosition(float x, float y, float z) { this.x = x; this.y = y; diff --git a/src/main/java/com/simibubi/create/foundation/render/backend/instancing/impl/OrientedData.java b/src/main/java/com/simibubi/create/foundation/render/backend/instancing/impl/OrientedData.java index 97a741182..2b4c8a185 100644 --- a/src/main/java/com/simibubi/create/foundation/render/backend/instancing/impl/OrientedData.java +++ b/src/main/java/com/simibubi/create/foundation/render/backend/instancing/impl/OrientedData.java @@ -35,14 +35,6 @@ public class OrientedData extends BasicData { return setPosition(pos.getX(), pos.getY(), pos.getZ()); } - public OrientedData setPosition(int x, int y, int z) { - BlockPos origin = owner.renderer.getOriginCoordinate(); - - return setPosition((float) (x - origin.getX()), - (float) (y - origin.getY()), - (float) (z - origin.getZ())); - } - public OrientedData setPosition(float x, float y, float z) { this.posX = x; this.posY = y; From fcae7e5c9a8663b5f75443689d34fc6e5b44958e Mon Sep 17 00:00:00 2001 From: simibubi <31564874+simibubi@users.noreply.github.com> Date: Sun, 28 Mar 2021 00:45:14 +0100 Subject: [PATCH 09/11] Motion commotion - Update recipe for redstone contact - Counteracted ejector inaccuracies caused by deferred activation - Rewired ponder vertex sorting to evade Optifine incompatibilities --- src/generated/resources/.cache/cache | 2 +- .../crafting/logistics/redstone_contact.json | 10 ++--- .../java/com/simibubi/create/AllBlocks.java | 37 +++++++++--------- .../block/depot/EjectorTileEntity.java | 39 ++++++++++--------- .../logistics/block/depot/EntityLauncher.java | 2 +- .../data/recipe/StandardRecipeGen.java | 8 ++-- .../create/foundation/ponder/PonderUI.java | 15 +++---- .../renderState/SuperRenderTypeBuffer.java | 18 --------- 8 files changed, 58 insertions(+), 73 deletions(-) diff --git a/src/generated/resources/.cache/cache b/src/generated/resources/.cache/cache index aab8b94c2..f4ced7d43 100644 --- a/src/generated/resources/.cache/cache +++ b/src/generated/resources/.cache/cache @@ -2914,7 +2914,7 @@ fc75c87159569cb6ee978e6d51b0c3b0f504b5de data/create/recipes/crafting/logistics/ a32ac53848862837f3044ff9c81ed62c1134fe4f data/create/recipes/crafting/logistics/powered_latch.json 660eb73bcc66c1528cbd4d4204ad6b771f4bd721 data/create/recipes/crafting/logistics/powered_toggle_latch.json 74b8a38d252cce564cc63db2ade41ed2d656d025 data/create/recipes/crafting/logistics/pulse_repeater.json -bb73dac60392f4811df033c3d1d3256df5e022af data/create/recipes/crafting/logistics/redstone_contact.json +739f0d8b7f98a5639ed37f7fb8ce474d5e6ba0c6 data/create/recipes/crafting/logistics/redstone_contact.json bc511f7c225750743ae3e985502fa65beb1e7b8d data/create/recipes/crafting/logistics/redstone_link.json 10b16358664f2bb8a11589ef8ba3d69ee8d3b9fc data/create/recipes/crafting/logistics/stockpile_switch.json 0dc99b8a8c68d6a9250c3a1167ffb565be9622ec data/create/recipes/crafting/materials/andesite_alloy.json diff --git a/src/generated/resources/data/create/recipes/crafting/logistics/redstone_contact.json b/src/generated/resources/data/create/recipes/crafting/logistics/redstone_contact.json index 840a75afe..d8530defc 100644 --- a/src/generated/resources/data/create/recipes/crafting/logistics/redstone_contact.json +++ b/src/generated/resources/data/create/recipes/crafting/logistics/redstone_contact.json @@ -1,19 +1,19 @@ { "type": "minecraft:crafting_shaped", "pattern": [ - "WDW", " S ", - "WDW" + "CWC", + "CCC" ], "key": { "W": { "tag": "forge:dusts/redstone" }, - "D": { - "item": "create:brass_casing" + "C": { + "item": "minecraft:cobblestone" }, "S": { - "tag": "forge:ingots/iron" + "tag": "forge:plates/iron" } }, "result": { diff --git a/src/main/java/com/simibubi/create/AllBlocks.java b/src/main/java/com/simibubi/create/AllBlocks.java index 35295937e..87e0dc54a 100644 --- a/src/main/java/com/simibubi/create/AllBlocks.java +++ b/src/main/java/com/simibubi/create/AllBlocks.java @@ -480,15 +480,16 @@ public class AllBlocks { .item() .transform(customItemModel("_", "block")) .register(); - - public static final BlockEntry WEIGHTED_EJECTOR = REGISTRATE.block("weighted_ejector", EjectorBlock::new) - .initialProperties(SharedProperties::stone) - .properties(Block.Properties::nonOpaque) - .blockstate((c, p) -> p.horizontalBlock(c.getEntry(), AssetLookup.partialBaseModel(c, p), 180)) - .transform(StressConfigDefaults.setImpact(2.0)) - .item(EjectorItem::new) - .transform(customItemModel()) - .register(); + + public static final BlockEntry WEIGHTED_EJECTOR = + REGISTRATE.block("weighted_ejector", EjectorBlock::new) + .initialProperties(SharedProperties::stone) + .properties(Block.Properties::nonOpaque) + .blockstate((c, p) -> p.horizontalBlock(c.getEntry(), AssetLookup.partialBaseModel(c, p), 180)) + .transform(StressConfigDefaults.setImpact(2.0)) + .item(EjectorItem::new) + .transform(customItemModel()) + .register(); public static final BlockEntry CHUTE = REGISTRATE.block("chute", ChuteBlock::new) .initialProperties(SharedProperties::softMetal) @@ -906,6 +907,15 @@ public class AllBlocks { .transform(customItemModel()) .register(); + public static final BlockEntry REDSTONE_CONTACT = + REGISTRATE.block("redstone_contact", RedstoneContactBlock::new) + .initialProperties(SharedProperties::stone) + .onRegister(addMovementBehaviour(new ContactMovementBehaviour())) + .blockstate((c, p) -> p.directionalBlock(c.get(), AssetLookup.forPowered(c, p))) + .item() + .transform(customItemModel("_", "block")) + .register(); + public static final BlockEntry MECHANICAL_HARVESTER = REGISTRATE.block("mechanical_harvester", HarvesterBlock::new) .initialProperties(SharedProperties::stone) @@ -1150,15 +1160,6 @@ public class AllBlocks { .onRegister(connectedTextures(new BrassTunnelCTBehaviour())) .register(); - public static final BlockEntry REDSTONE_CONTACT = - REGISTRATE.block("redstone_contact", RedstoneContactBlock::new) - .initialProperties(SharedProperties::stone) - .onRegister(addMovementBehaviour(new ContactMovementBehaviour())) - .blockstate((c, p) -> p.directionalBlock(c.get(), AssetLookup.forPowered(c, p))) - .item() - .transform(customItemModel("_", "block")) - .register(); - public static final BlockEntry CONTENT_OBSERVER = REGISTRATE.block("content_observer", ContentObserverBlock::new) .initialProperties(SharedProperties::stone) diff --git a/src/main/java/com/simibubi/create/content/logistics/block/depot/EjectorTileEntity.java b/src/main/java/com/simibubi/create/content/logistics/block/depot/EjectorTileEntity.java index 8218fa025..69cc84372 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/depot/EjectorTileEntity.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/depot/EjectorTileEntity.java @@ -302,22 +302,27 @@ public class EjectorTileEntity extends KineticTileEntity { } if (state == State.RETRACTING) { - lidProgress.updateChaseSpeed(0); - if (lidProgress.getValue() == 0 && doLogic) { - state = State.CHARGED; - lidProgress.setValue(0); - sendData(); + if (lidProgress.getChaseTarget() == 1 && !lidProgress.settled()) { + lidProgress.tickChaser(); + } else { + lidProgress.updateChaseTarget(0); + lidProgress.updateChaseSpeed(0); + if (lidProgress.getValue() == 0 && doLogic) { + state = State.CHARGED; + lidProgress.setValue(0); + sendData(); + } + + float value = MathHelper.clamp(lidProgress.getValue() - getWindUpSpeed(), 0, 1); + lidProgress.setValue(value); + + int soundRate = (int) (1 / (getWindUpSpeed() * 5)) + 1; + float volume = .125f; + float pitch = 1.5f - lidProgress.getValue(); + if (((int) world.getGameTime()) % soundRate == 0 && doLogic) + world.playSound(null, pos, SoundEvents.BLOCK_WOODEN_BUTTON_CLICK_OFF, SoundCategory.BLOCKS, volume, + pitch); } - - float value = MathHelper.clamp(lidProgress.getValue() - getWindUpSpeed(), 0, 1); - lidProgress.setValue(value); - - int soundRate = (int) (1 / (getWindUpSpeed() * 5)) + 1; - float volume = .125f; - float pitch = 1.5f - lidProgress.getValue(); - if (((int) world.getGameTime()) % soundRate == 0 && doLogic) - world.playSound(null, pos, SoundEvents.BLOCK_WOODEN_BUTTON_CLICK_OFF, SoundCategory.BLOCKS, volume, - pitch); } if (state != prevState) @@ -509,10 +514,6 @@ public class EjectorTileEntity extends KineticTileEntity { public void setTarget(int horizontalDistance, int verticalDistance) { launcher.set(Math.max(1, horizontalDistance), verticalDistance); - if (horizontalDistance == 0 && verticalDistance == 0) { - state = State.CHARGED; - lidProgress.startWithValue(0); - } sendData(); } diff --git a/src/main/java/com/simibubi/create/content/logistics/block/depot/EntityLauncher.java b/src/main/java/com/simibubi/create/content/logistics/block/depot/EntityLauncher.java index cf91ddfef..752fff659 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/depot/EntityLauncher.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/depot/EntityLauncher.java @@ -36,7 +36,7 @@ public class EntityLauncher { public void applyMotion(Entity entity, Direction facing) { Vec3d motionVec = new Vec3d(0, yMotion, xMotion); motionVec = VecHelper.rotate(motionVec, AngleHelper.horizontalAngle(facing), Axis.Y); - entity.setMotion(motionVec.x, motionVec.y, motionVec.z); + entity.setMotion(motionVec.x * .91, motionVec.y * .98, motionVec.z * .91); } public int getHorizontalDistance() { diff --git a/src/main/java/com/simibubi/create/foundation/data/recipe/StandardRecipeGen.java b/src/main/java/com/simibubi/create/foundation/data/recipe/StandardRecipeGen.java index 5fddcde92..a05b192a2 100644 --- a/src/main/java/com/simibubi/create/foundation/data/recipe/StandardRecipeGen.java +++ b/src/main/java/com/simibubi/create/foundation/data/recipe/StandardRecipeGen.java @@ -790,11 +790,11 @@ public class StandardRecipeGen extends CreateRecipeProvider { REDSTONE_CONTACT = create(AllBlocks.REDSTONE_CONTACT).returns(2) .unlockedBy(I::brassCasing) .viaShaped(b -> b.key('W', I.redstone()) - .key('D', I.brassCasing()) - .key('S', I.iron()) - .patternLine("WDW") + .key('C', Blocks.COBBLESTONE) + .key('S', I.ironSheet()) .patternLine(" S ") - .patternLine("WDW")), + .patternLine("CWC") + .patternLine("CCC")), ANDESITE_FUNNEL = create(AllBlocks.ANDESITE_FUNNEL).returns(2) .unlockedBy(I::andesite) diff --git a/src/main/java/com/simibubi/create/foundation/ponder/PonderUI.java b/src/main/java/com/simibubi/create/foundation/ponder/PonderUI.java index 8cc99fedd..29435f48e 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/PonderUI.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/PonderUI.java @@ -369,7 +369,6 @@ public class PonderUI extends NavigatableSimiScreen { } protected void renderVisibleScenes(int mouseX, int mouseY, float partialTicks) { - SuperRenderTypeBuffer.vertexSortingOrigin = new BlockPos(0, 0, 800); renderScene(mouseX, mouseY, index, partialTicks); float lazyIndexValue = lazyIndex.getValue(partialTicks); if (Math.abs(lazyIndexValue - index) > 1 / 512f) @@ -388,13 +387,21 @@ public class PonderUI extends NavigatableSimiScreen { RenderSystem.enableBlend(); RenderSystem.enableDepthTest(); + RenderSystem.pushMatrix(); + + // has to be outside of MS transforms, important for vertex sorting + RenderSystem.translated(0, 0, 800); + ms.push(); + ms.translate(0, 0, -800); story.transform.updateScreenParams(width, height, slide); story.transform.apply(ms, partialTicks, false); story.transform.updateSceneRVE(partialTicks); story.renderScene(buffer, ms, partialTicks); buffer.draw(); + RenderSystem.popMatrix(); + MutableBoundingBox bounds = story.getBounds(); RenderSystem.pushMatrix(); RenderSystem.multMatrix(ms.peek() @@ -933,10 +940,4 @@ public class PonderUI extends NavigatableSimiScreen { skipCooling = 15; } - @Override - public void removed() { - super.removed(); - SuperRenderTypeBuffer.vertexSortingOrigin = BlockPos.ZERO; - } - } diff --git a/src/main/java/com/simibubi/create/foundation/renderState/SuperRenderTypeBuffer.java b/src/main/java/com/simibubi/create/foundation/renderState/SuperRenderTypeBuffer.java index 66cefb99d..9f64634bc 100644 --- a/src/main/java/com/simibubi/create/foundation/renderState/SuperRenderTypeBuffer.java +++ b/src/main/java/com/simibubi/create/foundation/renderState/SuperRenderTypeBuffer.java @@ -1,7 +1,5 @@ package com.simibubi.create.foundation.renderState; -import java.util.Objects; -import java.util.Optional; import java.util.SortedMap; import com.mojang.blaze3d.systems.RenderSystem; @@ -15,11 +13,9 @@ import net.minecraft.client.renderer.RegionRenderCacheBuilder; import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.model.ModelBakery; import net.minecraft.util.Util; -import net.minecraft.util.math.BlockPos; public class SuperRenderTypeBuffer implements IRenderTypeBuffer { - public static BlockPos vertexSortingOrigin = BlockPos.ZERO; static SuperRenderTypeBuffer instance; public static SuperRenderTypeBuffer getInstance() { @@ -100,20 +96,6 @@ public class SuperRenderTypeBuffer implements IRenderTypeBuffer { super(new BufferBuilder(256), createEntityBuilders()); } - public void draw(RenderType p_228462_1_) { - BlockPos v = vertexSortingOrigin; - BufferBuilder bufferbuilder = layerBuffers.getOrDefault(p_228462_1_, this.fallbackBuffer); - boolean flag = Objects.equals(this.currentLayer, p_228462_1_.asOptional()); - if (flag || bufferbuilder != this.fallbackBuffer) { - if (this.activeConsumers.remove(bufferbuilder)) { - p_228462_1_.draw(bufferbuilder, v.getX(), v.getY(), v.getZ()); - if (flag) { - this.currentLayer = Optional.empty(); - } - } - } - } - } } From 76bd3b3f5060830ea294169b22a3d31e0e43f193 Mon Sep 17 00:00:00 2001 From: simibubi <31564874+simibubi@users.noreply.github.com> Date: Sun, 28 Mar 2021 01:52:04 +0100 Subject: [PATCH 10/11] Pondering too fast - Added a button to slow down ponder scenes while any text is shown on screen --- src/generated/resources/.cache/cache | 26 ++--- .../resources/assets/create/lang/en_us.json | 1 + .../assets/create/lang/unfinished/de_de.json | 3 +- .../assets/create/lang/unfinished/es_es.json | 3 +- .../assets/create/lang/unfinished/es_mx.json | 3 +- .../assets/create/lang/unfinished/fr_fr.json | 3 +- .../assets/create/lang/unfinished/it_it.json | 3 +- .../assets/create/lang/unfinished/ja_jp.json | 3 +- .../assets/create/lang/unfinished/ko_kr.json | 3 +- .../assets/create/lang/unfinished/nl_nl.json | 3 +- .../assets/create/lang/unfinished/pt_br.json | 3 +- .../assets/create/lang/unfinished/ru_ru.json | 3 +- .../assets/create/lang/unfinished/zh_cn.json | 3 +- .../assets/create/lang/unfinished/zh_tw.json | 3 +- .../create/foundation/gui/AllIcons.java | 3 +- .../foundation/ponder/PonderLocalization.java | 1 + .../create/foundation/ponder/PonderUI.java | 99 ++++++++++++------ .../assets/create/textures/gui/icons.png | Bin 2881 -> 2923 bytes 18 files changed, 108 insertions(+), 58 deletions(-) diff --git a/src/generated/resources/.cache/cache b/src/generated/resources/.cache/cache index f4ced7d43..78ca66029 100644 --- a/src/generated/resources/.cache/cache +++ b/src/generated/resources/.cache/cache @@ -403,19 +403,19 @@ a3a11524cd3515fc01d905767b4b7ea782adaf03 assets/create/blockstates/yellow_seat.j 7f39521b211441f5c3e06d60c5978cebe16cacfb assets/create/blockstates/zinc_block.json b7181bcd8182b2f17088e5aa881f374c9c65470c assets/create/blockstates/zinc_ore.json ce0e5405da381a86625b908c569c5dbe347abdba assets/create/lang/en_ud.json -442123de75c67a2b562194981d62c6a6de053593 assets/create/lang/en_us.json -1a5739ce1ab4a923dcf5a7ed12f16af394aed719 assets/create/lang/unfinished/de_de.json -4f21f855b45e8b44aedcae94e5a41c797d05af45 assets/create/lang/unfinished/es_es.json -e971082462cd5a92a08c3a1481e8e7c6e1afcea1 assets/create/lang/unfinished/es_mx.json -64a39634a36da998fd11553340cd1fc652129ce9 assets/create/lang/unfinished/fr_fr.json -afb72ad7e2713819b3cda0110a41dcdbbcc0bb0b assets/create/lang/unfinished/it_it.json -583b4bddc044614efb1b08f9bfb36a49e0a67e4f assets/create/lang/unfinished/ja_jp.json -9baa3052e1a9440e1cb6d46950d2227f2be3435e assets/create/lang/unfinished/ko_kr.json -7701f3b29b3e92a9943c15000beb9df02143fe90 assets/create/lang/unfinished/nl_nl.json -9f935fe569d793f6ee581ebc24bff5740c91fbab assets/create/lang/unfinished/pt_br.json -9ede4dc1051fea0bcabc30da1d133c0048d29641 assets/create/lang/unfinished/ru_ru.json -2442b5fe4ed2d92ab3081e7422bfecdf1ac06610 assets/create/lang/unfinished/zh_cn.json -56268c452b57cf072f35839ebfa130213a966730 assets/create/lang/unfinished/zh_tw.json +e847bb88a7cf6bfa81f03f87f106a85c7e351da8 assets/create/lang/en_us.json +950f435754c82bb46d0f0bbd7fb0ea5c2a6db2be assets/create/lang/unfinished/de_de.json +953669a0880eb087bff8c6a0f31ab593826410ac assets/create/lang/unfinished/es_es.json +49dcba9e9e74421dc74e24a27f6876a9f9e4bafa assets/create/lang/unfinished/es_mx.json +db5fa9ea3a940cc378657db43d7de6f71abb8da3 assets/create/lang/unfinished/fr_fr.json +144bbca783790c63c1671388227a00780c23e5ba assets/create/lang/unfinished/it_it.json +8ebf781c5e3d8dd78eed9c1445d39a643dd1e2b1 assets/create/lang/unfinished/ja_jp.json +46f41cb9e6870bbb8aa4d58525f7ab07f5e911ff assets/create/lang/unfinished/ko_kr.json +eb16433d9ba6c3f9748074f48c22368c81cc52b3 assets/create/lang/unfinished/nl_nl.json +a4aa6902f68a6e4c2c0ce38dee6623e80a6cc65e assets/create/lang/unfinished/pt_br.json +8f889340f518084c90eba259ddbe822601462c4a assets/create/lang/unfinished/ru_ru.json +737e73147690f40aaae5ed51d24e3016fa9d778c assets/create/lang/unfinished/zh_cn.json +34826633b870307b430c64ec62695852b27cb872 assets/create/lang/unfinished/zh_tw.json 846200eb548d3bfa2e77b41039de159b4b6cfb45 assets/create/models/block/acacia_window.json 1930fa3a3c98d53dd19e4ee7f55bc27fd47aa281 assets/create/models/block/acacia_window_pane_noside.json 1763ea2c9b981d187f5031ba608f3d5d3be3986a assets/create/models/block/acacia_window_pane_noside_alt.json diff --git a/src/generated/resources/assets/create/lang/en_us.json b/src/generated/resources/assets/create/lang/en_us.json index c7b5d21ad..2032f7448 100644 --- a/src/generated/resources/assets/create/lang/en_us.json +++ b/src/generated/resources/assets/create/lang/en_us.json @@ -1829,6 +1829,7 @@ "create.ponder.previous": "Previous Scene", "create.ponder.replay": "Replay", "create.ponder.think_back": "Think Back", + "create.ponder.slow_text": "Comfy Reading", "create.ponder.shared.movement_anchors": "With the help of Chassis or Super Glue, larger structures can be moved.", "create.ponder.shared.rpm32": "32 RPM", "create.ponder.shared.sneak_and": "Sneak +", diff --git a/src/generated/resources/assets/create/lang/unfinished/de_de.json b/src/generated/resources/assets/create/lang/unfinished/de_de.json index 043f0e322..141fee0d9 100644 --- a/src/generated/resources/assets/create/lang/unfinished/de_de.json +++ b/src/generated/resources/assets/create/lang/unfinished/de_de.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 1506", + "_": "Missing Localizations: 1507", "_": "->------------------------] Game Elements [------------------------<-", @@ -1830,6 +1830,7 @@ "create.ponder.previous": "UNLOCALIZED: Previous Scene", "create.ponder.replay": "UNLOCALIZED: Replay", "create.ponder.think_back": "UNLOCALIZED: Think Back", + "create.ponder.slow_text": "UNLOCALIZED: Comfy Reading", "create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.", "create.ponder.shared.rpm32": "UNLOCALIZED: 32 RPM", "create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +", diff --git a/src/generated/resources/assets/create/lang/unfinished/es_es.json b/src/generated/resources/assets/create/lang/unfinished/es_es.json index b2e8c7da2..b5220f2d3 100644 --- a/src/generated/resources/assets/create/lang/unfinished/es_es.json +++ b/src/generated/resources/assets/create/lang/unfinished/es_es.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 541", + "_": "Missing Localizations: 542", "_": "->------------------------] Game Elements [------------------------<-", @@ -1830,6 +1830,7 @@ "create.ponder.previous": "UNLOCALIZED: Previous Scene", "create.ponder.replay": "UNLOCALIZED: Replay", "create.ponder.think_back": "UNLOCALIZED: Think Back", + "create.ponder.slow_text": "UNLOCALIZED: Comfy Reading", "create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.", "create.ponder.shared.rpm32": "UNLOCALIZED: 32 RPM", "create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +", diff --git a/src/generated/resources/assets/create/lang/unfinished/es_mx.json b/src/generated/resources/assets/create/lang/unfinished/es_mx.json index b6c37a338..8beff1428 100644 --- a/src/generated/resources/assets/create/lang/unfinished/es_mx.json +++ b/src/generated/resources/assets/create/lang/unfinished/es_mx.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 1436", + "_": "Missing Localizations: 1437", "_": "->------------------------] Game Elements [------------------------<-", @@ -1830,6 +1830,7 @@ "create.ponder.previous": "UNLOCALIZED: Previous Scene", "create.ponder.replay": "UNLOCALIZED: Replay", "create.ponder.think_back": "UNLOCALIZED: Think Back", + "create.ponder.slow_text": "UNLOCALIZED: Comfy Reading", "create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.", "create.ponder.shared.rpm32": "UNLOCALIZED: 32 RPM", "create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +", diff --git a/src/generated/resources/assets/create/lang/unfinished/fr_fr.json b/src/generated/resources/assets/create/lang/unfinished/fr_fr.json index af65f930a..17937cc79 100644 --- a/src/generated/resources/assets/create/lang/unfinished/fr_fr.json +++ b/src/generated/resources/assets/create/lang/unfinished/fr_fr.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 1218", + "_": "Missing Localizations: 1219", "_": "->------------------------] Game Elements [------------------------<-", @@ -1830,6 +1830,7 @@ "create.ponder.previous": "UNLOCALIZED: Previous Scene", "create.ponder.replay": "UNLOCALIZED: Replay", "create.ponder.think_back": "UNLOCALIZED: Think Back", + "create.ponder.slow_text": "UNLOCALIZED: Comfy Reading", "create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.", "create.ponder.shared.rpm32": "UNLOCALIZED: 32 RPM", "create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +", diff --git a/src/generated/resources/assets/create/lang/unfinished/it_it.json b/src/generated/resources/assets/create/lang/unfinished/it_it.json index dde52b028..207f43b51 100644 --- a/src/generated/resources/assets/create/lang/unfinished/it_it.json +++ b/src/generated/resources/assets/create/lang/unfinished/it_it.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 558", + "_": "Missing Localizations: 559", "_": "->------------------------] Game Elements [------------------------<-", @@ -1830,6 +1830,7 @@ "create.ponder.previous": "UNLOCALIZED: Previous Scene", "create.ponder.replay": "UNLOCALIZED: Replay", "create.ponder.think_back": "UNLOCALIZED: Think Back", + "create.ponder.slow_text": "UNLOCALIZED: Comfy Reading", "create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.", "create.ponder.shared.rpm32": "UNLOCALIZED: 32 RPM", "create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +", diff --git a/src/generated/resources/assets/create/lang/unfinished/ja_jp.json b/src/generated/resources/assets/create/lang/unfinished/ja_jp.json index 73d0995a1..d1f0cfd19 100644 --- a/src/generated/resources/assets/create/lang/unfinished/ja_jp.json +++ b/src/generated/resources/assets/create/lang/unfinished/ja_jp.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 565", + "_": "Missing Localizations: 566", "_": "->------------------------] Game Elements [------------------------<-", @@ -1830,6 +1830,7 @@ "create.ponder.previous": "UNLOCALIZED: Previous Scene", "create.ponder.replay": "UNLOCALIZED: Replay", "create.ponder.think_back": "UNLOCALIZED: Think Back", + "create.ponder.slow_text": "UNLOCALIZED: Comfy Reading", "create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.", "create.ponder.shared.rpm32": "UNLOCALIZED: 32 RPM", "create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +", diff --git a/src/generated/resources/assets/create/lang/unfinished/ko_kr.json b/src/generated/resources/assets/create/lang/unfinished/ko_kr.json index 0788669d2..506b241b9 100644 --- a/src/generated/resources/assets/create/lang/unfinished/ko_kr.json +++ b/src/generated/resources/assets/create/lang/unfinished/ko_kr.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 611", + "_": "Missing Localizations: 612", "_": "->------------------------] Game Elements [------------------------<-", @@ -1830,6 +1830,7 @@ "create.ponder.previous": "UNLOCALIZED: Previous Scene", "create.ponder.replay": "UNLOCALIZED: Replay", "create.ponder.think_back": "UNLOCALIZED: Think Back", + "create.ponder.slow_text": "UNLOCALIZED: Comfy Reading", "create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.", "create.ponder.shared.rpm32": "UNLOCALIZED: 32 RPM", "create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +", diff --git a/src/generated/resources/assets/create/lang/unfinished/nl_nl.json b/src/generated/resources/assets/create/lang/unfinished/nl_nl.json index 375fd54da..9ea591d07 100644 --- a/src/generated/resources/assets/create/lang/unfinished/nl_nl.json +++ b/src/generated/resources/assets/create/lang/unfinished/nl_nl.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 1705", + "_": "Missing Localizations: 1706", "_": "->------------------------] Game Elements [------------------------<-", @@ -1830,6 +1830,7 @@ "create.ponder.previous": "UNLOCALIZED: Previous Scene", "create.ponder.replay": "UNLOCALIZED: Replay", "create.ponder.think_back": "UNLOCALIZED: Think Back", + "create.ponder.slow_text": "UNLOCALIZED: Comfy Reading", "create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.", "create.ponder.shared.rpm32": "UNLOCALIZED: 32 RPM", "create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +", diff --git a/src/generated/resources/assets/create/lang/unfinished/pt_br.json b/src/generated/resources/assets/create/lang/unfinished/pt_br.json index f3be159ec..cd99e83ca 100644 --- a/src/generated/resources/assets/create/lang/unfinished/pt_br.json +++ b/src/generated/resources/assets/create/lang/unfinished/pt_br.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 1771", + "_": "Missing Localizations: 1772", "_": "->------------------------] Game Elements [------------------------<-", @@ -1830,6 +1830,7 @@ "create.ponder.previous": "UNLOCALIZED: Previous Scene", "create.ponder.replay": "UNLOCALIZED: Replay", "create.ponder.think_back": "UNLOCALIZED: Think Back", + "create.ponder.slow_text": "UNLOCALIZED: Comfy Reading", "create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.", "create.ponder.shared.rpm32": "UNLOCALIZED: 32 RPM", "create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +", diff --git a/src/generated/resources/assets/create/lang/unfinished/ru_ru.json b/src/generated/resources/assets/create/lang/unfinished/ru_ru.json index 879ba25c9..7f3f96767 100644 --- a/src/generated/resources/assets/create/lang/unfinished/ru_ru.json +++ b/src/generated/resources/assets/create/lang/unfinished/ru_ru.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 561", + "_": "Missing Localizations: 562", "_": "->------------------------] Game Elements [------------------------<-", @@ -1830,6 +1830,7 @@ "create.ponder.previous": "UNLOCALIZED: Previous Scene", "create.ponder.replay": "UNLOCALIZED: Replay", "create.ponder.think_back": "UNLOCALIZED: Think Back", + "create.ponder.slow_text": "UNLOCALIZED: Comfy Reading", "create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.", "create.ponder.shared.rpm32": "UNLOCALIZED: 32 RPM", "create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +", diff --git a/src/generated/resources/assets/create/lang/unfinished/zh_cn.json b/src/generated/resources/assets/create/lang/unfinished/zh_cn.json index 3b343e167..e5dba1fb9 100644 --- a/src/generated/resources/assets/create/lang/unfinished/zh_cn.json +++ b/src/generated/resources/assets/create/lang/unfinished/zh_cn.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 559", + "_": "Missing Localizations: 560", "_": "->------------------------] Game Elements [------------------------<-", @@ -1830,6 +1830,7 @@ "create.ponder.previous": "UNLOCALIZED: Previous Scene", "create.ponder.replay": "UNLOCALIZED: Replay", "create.ponder.think_back": "UNLOCALIZED: Think Back", + "create.ponder.slow_text": "UNLOCALIZED: Comfy Reading", "create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.", "create.ponder.shared.rpm32": "UNLOCALIZED: 32 RPM", "create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +", diff --git a/src/generated/resources/assets/create/lang/unfinished/zh_tw.json b/src/generated/resources/assets/create/lang/unfinished/zh_tw.json index 6f2d608e7..f51b62266 100644 --- a/src/generated/resources/assets/create/lang/unfinished/zh_tw.json +++ b/src/generated/resources/assets/create/lang/unfinished/zh_tw.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 564", + "_": "Missing Localizations: 565", "_": "->------------------------] Game Elements [------------------------<-", @@ -1830,6 +1830,7 @@ "create.ponder.previous": "UNLOCALIZED: Previous Scene", "create.ponder.replay": "UNLOCALIZED: Replay", "create.ponder.think_back": "UNLOCALIZED: Think Back", + "create.ponder.slow_text": "UNLOCALIZED: Comfy Reading", "create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.", "create.ponder.shared.rpm32": "UNLOCALIZED: 32 RPM", "create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +", diff --git a/src/main/java/com/simibubi/create/foundation/gui/AllIcons.java b/src/main/java/com/simibubi/create/foundation/gui/AllIcons.java index 577ea8028..cb12f0517 100644 --- a/src/main/java/com/simibubi/create/foundation/gui/AllIcons.java +++ b/src/main/java/com/simibubi/create/foundation/gui/AllIcons.java @@ -123,7 +123,8 @@ public class AllIcons implements IScreenRenderable { I_MTD_RIGHT = next(), I_MTD_SCAN = next(), I_MTD_REPLAY = next(), - I_MTD_USER_MODE = next(); + I_MTD_USER_MODE = next(), + I_MTD_SLOW_MODE = next(); public AllIcons(int x, int y) { iconX = x * 16; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/PonderLocalization.java b/src/main/java/com/simibubi/create/foundation/ponder/PonderLocalization.java index 62e359ab2..ad8a895fa 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/PonderLocalization.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/PonderLocalization.java @@ -80,6 +80,7 @@ public class PonderLocalization { addGeneral(object, PonderUI.PREVIOUS, "Previous Scene"); addGeneral(object, PonderUI.REPLAY, "Replay"); addGeneral(object, PonderUI.THINK_BACK, "Think Back"); + addGeneral(object, PonderUI.SLOW_TEXT, "Comfy Reading"); shared.forEach((k, v) -> object.addProperty(Create.ID + "." + langKeyForShared(k), v)); tag.forEach((k, v) -> { diff --git a/src/main/java/com/simibubi/create/foundation/ponder/PonderUI.java b/src/main/java/com/simibubi/create/foundation/ponder/PonderUI.java index 29435f48e..0c0e0c630 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/PonderUI.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/PonderUI.java @@ -1,5 +1,7 @@ package com.simibubi.create.foundation.ponder; +import static com.simibubi.create.foundation.ponder.PonderLocalization.LANG_PREFIX; + import java.util.ArrayList; import java.util.Collections; import java.util.List; @@ -21,6 +23,7 @@ import com.simibubi.create.foundation.ponder.content.PonderChapter; import com.simibubi.create.foundation.ponder.content.PonderIndex; import com.simibubi.create.foundation.ponder.content.PonderTag; import com.simibubi.create.foundation.ponder.content.PonderTagScreen; +import com.simibubi.create.foundation.ponder.elements.TextWindowElement; import com.simibubi.create.foundation.ponder.ui.PonderButton; import com.simibubi.create.foundation.renderState.SuperRenderTypeBuffer; import com.simibubi.create.foundation.utility.ColorHelper; @@ -58,14 +61,15 @@ public class PonderUI extends NavigatableSimiScreen { public static int ponderTicks; public static float ponderPartialTicksPaused; - public static final String PONDERING = PonderLocalization.LANG_PREFIX + "pondering"; - public static final String IDENTIFY_MODE = PonderLocalization.LANG_PREFIX + "identify_mode"; - public static final String IN_CHAPTER = PonderLocalization.LANG_PREFIX + "in_chapter"; - public static final String IDENTIFY = PonderLocalization.LANG_PREFIX + "identify"; - public static final String PREVIOUS = PonderLocalization.LANG_PREFIX + "previous"; - public static final String CLOSE = PonderLocalization.LANG_PREFIX + "close"; - public static final String NEXT = PonderLocalization.LANG_PREFIX + "next"; - public static final String REPLAY = PonderLocalization.LANG_PREFIX + "replay"; + public static final String PONDERING = LANG_PREFIX + "pondering"; + public static final String IDENTIFY_MODE = LANG_PREFIX + "identify_mode"; + public static final String IN_CHAPTER = LANG_PREFIX + "in_chapter"; + public static final String IDENTIFY = LANG_PREFIX + "identify"; + public static final String PREVIOUS = LANG_PREFIX + "previous"; + public static final String CLOSE = LANG_PREFIX + "close"; + public static final String NEXT = LANG_PREFIX + "next"; + public static final String REPLAY = LANG_PREFIX + "replay"; + public static final String SLOW_TEXT = LANG_PREFIX + "slow_text"; private List scenes; private List tags; @@ -76,6 +80,7 @@ public class PonderUI extends NavigatableSimiScreen { PonderChapter chapter = null; private boolean userViewMode; + private boolean slowTextMode; private boolean identifyMode; private ItemStack hoveredTooltipItem; private BlockPos hoveredBlockPos; @@ -90,10 +95,13 @@ public class PonderUI extends NavigatableSimiScreen { private int index = 0; private PonderTag referredToByTag; - private PonderButton left, right, scan, chap, userMode, close, replay; + private PonderButton left, right, scan, chap, userMode, close, replay, slowMode; private PonderProgressBar progressBar; private int skipCooling = 0; + private int extendedTickLength = 0; + private int extendedTickTimer = 0; + public static PonderUI of(ResourceLocation id) { return new PonderUI(PonderRegistry.compile(id)); } @@ -196,8 +204,13 @@ public class PonderUI extends NavigatableSimiScreen { .shortcut(bindings.keyBindDrop) .fade(0, -1)); + widgets.add(slowMode = new PonderButton(width - 20 - 31, bY, () -> { + slowTextMode = !slowTextMode; + }).showing(AllIcons.I_MTD_SLOW_MODE) + .fade(0, -1)); + if (PonderIndex.EDITOR_MODE) { - widgets.add(userMode = new PonderButton(width - 20 - 31, bY, () -> { + widgets.add(userMode = new PonderButton(width - 50 - 31, bY, () -> { userViewMode = !userViewMode; }).showing(AllIcons.I_MTD_USER_MODE) .fade(0, -1)); @@ -250,16 +263,32 @@ public class PonderUI extends NavigatableSimiScreen { referredToByTag = null; } - PonderScene activeScene = scenes.get(index); - if (!identifyMode) { - ponderTicks++; - if (skipCooling == 0) - activeScene.tick(); - } - lazyIndex.tickChaser(); fadeIn.tickChaser(); finishingFlash.tickChaser(); + PonderScene activeScene = scenes.get(index); + + extendedTickLength = 0; + if (slowTextMode) + activeScene.forEachVisible(TextWindowElement.class, twe -> extendedTickLength = 2); + + if (extendedTickTimer == 0) { + if (!identifyMode) { + ponderTicks++; + if (skipCooling == 0) + activeScene.tick(); + } + + if (!identifyMode) { + float lazyIndexValue = lazyIndex.getValue(); + if (Math.abs(lazyIndexValue - index) > 1 / 512f) + scenes.get(lazyIndexValue < index ? index - 1 : index + 1) + .tick(); + } + extendedTickTimer = extendedTickLength; + } else + extendedTickTimer--; + progressBar.tick(); if (activeScene.currentTime == activeScene.totalTime - 1) @@ -272,13 +301,6 @@ public class PonderUI extends NavigatableSimiScreen { } } - if (!identifyMode) { - float lazyIndexValue = lazyIndex.getValue(); - if (Math.abs(lazyIndexValue - index) > 1 / 512f) - scenes.get(lazyIndexValue < index ? index - 1 : index + 1) - .tick(); - } - updateIdentifiedItem(activeScene); } @@ -357,6 +379,7 @@ public class PonderUI extends NavigatableSimiScreen { @Override protected void renderWindow(int mouseX, int mouseY, float partialTicks) { + partialTicks = getPartialTicks(); RenderSystem.enableBlend(); renderVisibleScenes(mouseX, mouseY, skipCooling > 0 ? 0 : identifyMode ? ponderPartialTicksPaused : partialTicks); @@ -388,7 +411,7 @@ public class PonderUI extends NavigatableSimiScreen { RenderSystem.enableDepthTest(); RenderSystem.pushMatrix(); - + // has to be outside of MS transforms, important for vertex sorting RenderSystem.translated(0, 0, 800); @@ -400,8 +423,6 @@ public class PonderUI extends NavigatableSimiScreen { story.renderScene(buffer, ms, partialTicks); buffer.draw(); - RenderSystem.popMatrix(); - MutableBoundingBox bounds = story.getBounds(); RenderSystem.pushMatrix(); RenderSystem.multMatrix(ms.peek() @@ -492,8 +513,8 @@ public class PonderUI extends NavigatableSimiScreen { } RenderSystem.popMatrix(); - ms.pop(); + RenderSystem.popMatrix(); } protected void renderWidgets(int mouseX, int mouseY, float partialTicks) { @@ -547,7 +568,7 @@ public class PonderUI extends NavigatableSimiScreen { drawRightAlignedString(font, Lang.translate(IN_CHAPTER), 0, 0, tooltipColor); drawRightAlignedString(font, - Lang.translate(PonderLocalization.LANG_PREFIX + "chapter." + chapter.getId()), 0, 12, 0xffeeeeee); + Lang.translate(LANG_PREFIX + "chapter." + chapter.getId()), 0, 12, 0xffeeeeee); RenderSystem.popMatrix(); } @@ -594,6 +615,11 @@ public class PonderUI extends NavigatableSimiScreen { else userMode.dim(); } + + if (slowTextMode) + slowMode.flash(); + else + slowMode.dim(); { // Scene overlay @@ -680,6 +706,10 @@ public class PonderUI extends NavigatableSimiScreen { drawCenteredString(font, Lang.translate(NEXT), right.x + 10, tooltipY, tooltipColor); if (replay.isHovered()) drawCenteredString(font, Lang.translate(REPLAY), replay.x + 10, tooltipY, tooltipColor); + if (slowMode.isHovered()) + drawCenteredString(font, Lang.translate(SLOW_TEXT), slowMode.x + 5, tooltipY, tooltipColor); + if (PonderIndex.EDITOR_MODE && userMode.isHovered()) + drawCenteredString(font, "Editor View", userMode.x + 10, tooltipY, tooltipColor); RenderSystem.popMatrix(); } @@ -794,7 +824,7 @@ public class PonderUI extends NavigatableSimiScreen { @Override protected String getBreadcrumbTitle() { if (chapter != null) - return Lang.translate(PonderLocalization.LANG_PREFIX + "chapter." + chapter.getId()); + return Lang.translate(LANG_PREFIX + "chapter." + chapter.getId()); return stack.getItem() .getName() @@ -922,13 +952,18 @@ public class PonderUI extends NavigatableSimiScreen { } public static float getPartialTicks() { + float renderPartialTicks = Minecraft.getInstance() + .getRenderPartialTicks(); + if (Minecraft.getInstance().currentScreen instanceof PonderUI) { PonderUI ui = (PonderUI) Minecraft.getInstance().currentScreen; if (ui.identifyMode) return ponderPartialTicksPaused; + + return (renderPartialTicks + (ui.extendedTickLength - ui.extendedTickTimer)) / (ui.extendedTickLength + 1); } - return Minecraft.getInstance() - .getRenderPartialTicks(); + + return renderPartialTicks; } @Override diff --git a/src/main/resources/assets/create/textures/gui/icons.png b/src/main/resources/assets/create/textures/gui/icons.png index c9d661aee4462a0b8ea19468f8c50e180a0a9546..1dff79b367fb92985f19643b0fe3032bca2a9dae 100644 GIT binary patch literal 2923 zcmdT``9IWM8~%Qc8QYAVFo=+t79o)^#$J|5iL5D-Wf02NFxgUxAxoAlWe=f}B_mM` zPnH=WWEo_8>}!MR9q;q}@cs+$`FzgjI@dY(59j`z>$>mr2y1SH;1uHo003cPtZ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?`WE+i!N%v=zgn&+Emg7oYf@ zPAGVR^J?plSk5I9T40w}?W3F)3wij~X!|?`jeW!7gvgupP1{D&9#$-Zs1lg(b2BqH zAb=_=Ia3kwSd1c?w(k=Mhqj2hO=Ps;7{Hjne%k}B?0PWI+2r*IC%b&`W#Xt5e93im zgH54ki)Bzy8M)I9pwc(As@r<%0y;yXoP1=NYYv&$1U-$FNqD?vjGWE?)A6;vHWBF* zhx91sKVacgAF+Z~iEiI$q?V&30$B!7T1xBm8X`eu~z^ctmi7bL8F7($oQDFh% zol&y-D`{mhqUBofL?XI&SDO5Bun?zkVrn{&=KCs)I3 R_r9rsg^8{4Q$x4-e*=$OM{WQB From 1888f2d79b45c066a200f38cb81d71304868beba Mon Sep 17 00:00:00 2001 From: Kryppers <65094918+Kryppers@users.noreply.github.com> Date: Sun, 28 Mar 2021 02:13:53 +0100 Subject: [PATCH 11/11] Update weighted_ejector_casing.png --- .../block/weighted_ejector_casing.png | Bin 1308 -> 8195 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/src/main/resources/assets/create/textures/block/weighted_ejector_casing.png b/src/main/resources/assets/create/textures/block/weighted_ejector_casing.png index 502ecf49607f50725c84c6059aaa2f5033aca42c..1dc944109a28376d41af90a82ad1011bbefeb536 100644 GIT binary patch literal 8195 zcmeHKc|6o>+aF714chS|&vV@uXVWXVp}WIJe6NxZQ=RuY?|I(y`Ml46XJ&pgbKm#(`d-)ly|3&3-M<(cD^p>CO#&bg zNEmHqgaLlRoQrQQ@XZVi{0IW^*96)-u`pORn9iUPNn`?;6+kC|3H~G^2;@J|l0iz| zrY#cnbyh;3Tbr&U(tqMwliYLpjLeJXu9SqQr=*q4uc;ewPru|+z4T={j}kI6QgLaA zxmwvd{Nn9R6|@|QprZqezFN7@XJ_WORW%H1SFg)G7>27=+kd@v&-}BFMqkgI_Ur=q z)Vh_4h)uNR(dKSF+iuBm<=2$bq2u8VTWX)~tsA^pmiBpS-{F2A{oIs^uCXqs^ogn5 z$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