diff --git a/src/generated/resources/.cache/cache b/src/generated/resources/.cache/cache index 76c10722a..8f6ffe77d 100644 --- a/src/generated/resources/.cache/cache +++ b/src/generated/resources/.cache/cache @@ -407,19 +407,19 @@ a3a11524cd3515fc01d905767b4b7ea782adaf03 assets/create/blockstates/yellow_seat.j 7f39521b211441f5c3e06d60c5978cebe16cacfb assets/create/blockstates/zinc_block.json b7181bcd8182b2f17088e5aa881f374c9c65470c assets/create/blockstates/zinc_ore.json 768a724d6c921cb92790364cf7a692fe8742a885 assets/create/lang/en_ud.json -363aca3d1194218b7d48fcec33d36c1b9c555e4e assets/create/lang/en_us.json -616063d3a66a6e56ccee1584ce38986d363908df assets/create/lang/unfinished/de_de.json -aa49b660299817b148b362f9f5c357906de8df90 assets/create/lang/unfinished/es_es.json -c85b6b95decefd03769debc9d6a2ac1bff481dd4 assets/create/lang/unfinished/es_mx.json -5463fcf22674ed540ce860358508fbac609c49d1 assets/create/lang/unfinished/fr_fr.json -7fbd50f2325711f3a2fd086d8307ff1afb577220 assets/create/lang/unfinished/it_it.json -ff653860335529694629c7cabb7953afebc6fea3 assets/create/lang/unfinished/ja_jp.json -332556b3f5364601e872431fab0fe3cdf40ac373 assets/create/lang/unfinished/ko_kr.json -8043c3d6d26835c784d1163282a9d4a391a6c8dd assets/create/lang/unfinished/nl_nl.json -c562a4d350d9abb40e83ab4a78851eda3886dfe9 assets/create/lang/unfinished/pt_br.json -f58b4e50ef5042aad6b254db7ff8c219f06b9ea3 assets/create/lang/unfinished/ru_ru.json -e9e4cfbc8ef54b6c04ae77c776dfa7e546d05e02 assets/create/lang/unfinished/zh_cn.json -eb17617bb14d0ffac000f86d6f9aa23429e8f4c3 assets/create/lang/unfinished/zh_tw.json +124b1295041f1cf81abef436198cd4661605de95 assets/create/lang/en_us.json +457db5154ec9056cb9591d37dde32fcd4bc2e221 assets/create/lang/unfinished/de_de.json +1cf1ce2e651956c31fe102a1662e502530fe5f3d assets/create/lang/unfinished/es_es.json +2764a0c1e53af4a2a09c59f578d8d31ae2f8f954 assets/create/lang/unfinished/es_mx.json +8f523f374481dea50b48c039a57cd40db6a3246f assets/create/lang/unfinished/fr_fr.json +325f27d410cf186d7f647d0c68e69ca4f53b0b04 assets/create/lang/unfinished/it_it.json +7c49e14c88119dee9906eb68ed8dc8059b41aac8 assets/create/lang/unfinished/ja_jp.json +b9b02f0e812343e2009a9a698fa0f849e8bdf0e4 assets/create/lang/unfinished/ko_kr.json +b9ee851d4bfe9795a7db36c9cabe08c2e964a3a5 assets/create/lang/unfinished/nl_nl.json +462df1dafabcd4868a9cc87a95c83c8d6fe3d8c5 assets/create/lang/unfinished/pt_br.json +9bb453b675753803d43a33a534599405e5bb4620 assets/create/lang/unfinished/ru_ru.json +23c8bb09db6dae384fe6309e128790b4680476c6 assets/create/lang/unfinished/zh_cn.json +d4558a7672644a2df8acf16d2f11f9f42430b904 assets/create/lang/unfinished/zh_tw.json 487a511a01b2a4531fb672f917922312db78f958 assets/create/models/block/acacia_window.json b48060cba1a382f373a05bf0039054053eccf076 assets/create/models/block/acacia_window_pane_noside.json 3066db1bf03cffa1a9c7fbacf47ae586632f4eb3 assets/create/models/block/acacia_window_pane_noside_alt.json @@ -2993,7 +2993,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/assets/create/lang/en_us.json b/src/generated/resources/assets/create/lang/en_us.json index 9585a0a26..0d980854f 100644 --- a/src/generated/resources/assets/create/lang/en_us.json +++ b/src/generated/resources/assets/create/lang/en_us.json @@ -1126,10 +1126,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", @@ -1837,6 +1833,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 c4749347a..df607b4b9 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: 1514", + "_": "Missing Localizations: 1511", "_": "->------------------------] Game Elements [------------------------<-", @@ -1127,10 +1127,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", @@ -1838,6 +1834,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 38a0dc113..5a6ad44e7 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: 545", + "_": "Missing Localizations: 546", "_": "->------------------------] Game Elements [------------------------<-", @@ -1127,10 +1127,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", @@ -1838,6 +1834,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 428eefcf9..d55b3e5d5 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: 1437", "_": "->------------------------] Game Elements [------------------------<-", @@ -1127,10 +1127,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", @@ -1838,6 +1834,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 545b0237a..6be4a0171 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: 1226", + "_": "Missing Localizations: 1223", "_": "->------------------------] Game Elements [------------------------<-", @@ -1127,10 +1127,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", @@ -1838,6 +1834,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 84a82f2ce..8d26a7180 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: 562", + "_": "Missing Localizations: 563", "_": "->------------------------] Game Elements [------------------------<-", @@ -1127,10 +1127,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", @@ -1838,6 +1834,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 fd2b93bbb..3a47762bf 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: 569", + "_": "Missing Localizations: 570", "_": "->------------------------] Game Elements [------------------------<-", @@ -1127,10 +1127,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": "デプロイヤーのアイテムが溢れています", @@ -1838,6 +1834,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 90b3fb62e..9bec93b19 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: 615", + "_": "Missing Localizations: 616", "_": "->------------------------] Game Elements [------------------------<-", @@ -1127,10 +1127,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", @@ -1838,6 +1834,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 365abe188..237c04466 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: 1713", + "_": "Missing Localizations: 1710", "_": "->------------------------] Game Elements [------------------------<-", @@ -1127,10 +1127,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", @@ -1838,6 +1834,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 b73a1871e..2c1c22587 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: 1779", + "_": "Missing Localizations: 1776", "_": "->------------------------] Game Elements [------------------------<-", @@ -1127,10 +1127,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", @@ -1838,6 +1834,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 6d8760504..fde0ef759 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 [------------------------<-", @@ -1127,10 +1127,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": "Переполнение автономного активатора", @@ -1838,6 +1834,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 9e66fdcec..afa831153 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 [------------------------<-", @@ -1127,10 +1127,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": "机械手物品溢出", @@ -1838,6 +1834,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 e3aa3fae3..4fba514ba 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 [------------------------<-", @@ -1127,10 +1127,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": "機械手物品溢出", @@ -1838,6 +1834,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/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 a646636b0..62fec60ab 100644 --- a/src/main/java/com/simibubi/create/AllBlocks.java +++ b/src/main/java/com/simibubi/create/AllBlocks.java @@ -481,15 +481,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) @@ -907,6 +908,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) @@ -1151,15 +1161,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/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 a92b337d4..958290270 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 @@ -120,8 +120,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 f073783c9..36a74f631 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/KineticData.java b/src/main/java/com/simibubi/create/content/contraptions/base/KineticData.java index ad3b68db8..6ef3f6b5d 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 @@ -27,12 +27,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/content/contraptions/base/KineticTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/base/KineticTileEntity.java index 8082f35ee..5c451fc72 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 @@ -7,6 +7,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; @@ -521,7 +522,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 35db855a3..eb4280ed7 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; @@ -95,7 +96,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 277fa0c16..6bb2d2d90 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; @@ -40,7 +41,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); @@ -59,11 +60,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 e7e7f78bd..4f0863998 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 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..5c068861c 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,26 +1,33 @@ package com.simibubi.create.content.contraptions.components.press; -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.relays.encased.ShaftInstance; 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; +import net.minecraft.util.math.vector.Quaternion; +import net.minecraft.util.math.vector.Vector3f; 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 +42,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) { diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/PumpBlock.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/PumpBlock.java index 2bae022e7..cbbe18376 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/fluids/PumpBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/PumpBlock.java @@ -2,6 +2,7 @@ package com.simibubi.create.content.contraptions.fluids; import java.util.Random; +import com.simibubi.create.content.contraptions.relays.elementary.ICogWheel; import org.apache.commons.lang3.mutable.MutableBoolean; import com.simibubi.create.AllShapes; @@ -31,7 +32,7 @@ import net.minecraft.world.TickPriority; import net.minecraft.world.World; import net.minecraft.world.server.ServerWorld; -public class PumpBlock extends DirectionalKineticBlock implements IWaterLoggable { +public class PumpBlock extends DirectionalKineticBlock implements IWaterLoggable, ICogWheel { public PumpBlock(Properties p_i48415_1_) { super(p_i48415_1_); @@ -82,11 +83,6 @@ public class PumpBlock extends DirectionalKineticBlock implements IWaterLoggable return AllShapes.PUMP.get(state.get(FACING)); } - @Override - public boolean hasIntegratedCogwheel(IWorldReader world, BlockPos pos, BlockState state) { - return true; - } - @Override public void neighborChanged(BlockState state, World world, BlockPos pos, Block otherBlock, BlockPos neighborPos, boolean isMoving) { 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 14df97837..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,5 +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; @@ -18,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()); @@ -48,7 +52,7 @@ public class SpeedControllerBlock extends HorizontalAxisKineticBlock implements BlockState above = context.getWorld() .getBlockState(context.getPos() .up()); - if (CogWheelBlock.isLargeCog(above) && above.get(CogWheelBlock.AXIS) + if (ICogWheel.isLargeCog(above) && above.get(CogWheelBlock.AXIS) .isHorizontal()) return getDefaultState().with(HORIZONTAL_AXIS, above.get(CogWheelBlock.AXIS) == Axis.X ? Axis.Z : Axis.X); return super.getStateForPlacement(context); @@ -82,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 @@ -100,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 670c5a376..0f35e2dd1 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 @@ -5,6 +5,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; @@ -112,8 +113,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 123c02369..4b4ea6f1c 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,29 +5,29 @@ 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.FluidState; import net.minecraft.fluid.Fluids; 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; import net.minecraft.world.IBlockReader; import net.minecraft.world.IWorldReader; import net.minecraft.world.World; +import javax.annotation.ParametersAreNonnullByDefault; -public class CogWheelBlock extends AbstractShaftBlock { +@ParametersAreNonnullByDefault +@MethodsReturnNonnullByDefault +@SuppressWarnings("deprecation") +public class CogWheelBlock extends AbstractShaftBlock implements ICogWheel { boolean isLarge; - private CogWheelBlock(boolean large, Properties properties) { + protected CogWheelBlock(boolean large, Properties properties) { super(properties); isLarge = large; } @@ -40,12 +40,14 @@ public class CogWheelBlock extends AbstractShaftBlock { return new CogWheelBlock(true, properties); } - public static boolean isSmallCog(BlockState state) { - return AllBlocks.COGWHEEL.has(state); + @Override + public boolean isLargeCog() { + return isLarge; } - public static boolean isLargeCog(BlockState state) { - return AllBlocks.LARGE_COGWHEEL.has(state); + @Override + public boolean isSmallCog() { + return !isLarge; } @Override @@ -55,8 +57,12 @@ public class CogWheelBlock extends AbstractShaftBlock { @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); @@ -64,75 +70,53 @@ public class CogWheelBlock extends AbstractShaftBlock { if (blockState.contains(AXIS) && facing.getAxis() == blockState.get(AXIS)) continue; - boolean smallCog = isSmallCog(blockState); - if (!smallCog && blockState.getBlock() instanceof IRotate) - smallCog = ((IRotate) blockState.getBlock()).hasIntegratedCogwheel(worldIn, offsetPos, blockState); - - if (isLargeCog(blockState) || isLarge && smallCog) + if (ICogWheel.isLargeCog(blockState) || large && 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()); - FluidState 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 (!(block instanceof IRotate) - || !(((IRotate) block).hasIntegratedCogwheel(world, placedOnPos, 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; + return isLargeCog() ? 1f : .75f; } - public void fillItemGroup(ItemGroup group, NonNullList items) { - items.add(new ItemStack(this)); - } - - // IRotate - @Override - public boolean hasIntegratedCogwheel(IWorldReader world, BlockPos pos, BlockState state) { - return !isLarge; + 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 2293a1f1e..db7b6f488 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,11 +17,9 @@ 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; -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; @@ -100,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); } @@ -114,7 +112,7 @@ public class CogwheelBlockItem extends BlockItem { @Override public Predicate getItemPredicate() { - return AllBlocks.COGWHEEL::isIn; + return ((Predicate) ICogWheel::isSmallCogItem).and(ICogWheel::isDedicatedCogItem); } @Override @@ -129,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) @@ -153,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 @@ -170,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) @@ -212,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))); @@ -236,13 +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) && s.getBlock() instanceof IRotate - && ((IRotate) s.getBlock()).hasIntegratedCogwheel(null, null, null); + return s -> !ICogWheel.isDedicatedCogWheel(s.getBlock()) && ICogWheel.isSmallCog(s); } @Override @@ -274,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)); @@ -285,27 +281,4 @@ public class CogwheelBlockItem extends BlockItem { } } - static public 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; - } - - static public 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 new file mode 100644 index 000000000..7f2ad6f2c --- /dev/null +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/elementary/ICogWheel.java @@ -0,0 +1,64 @@ +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 isSmallCog(state.getBlock()); + } + + static boolean isLargeCog(BlockState state) { + 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() { + return false; + } + + 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)) 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 faf32bf6b..ed6742f5e 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(); Vector3d launchedItemLocation = ejector.getLaunchedItemLocation(time); msr.translate(launchedItemLocation.subtract(Vector3d.of(te.getPos()))); - Vector3d itemRotOffset = VecHelper.voxelSpace(0,3,0); + Vector3d 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 dd1dd8c31..8f0e30ae2 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,8 +45,13 @@ 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.vector.Vector3d; +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.world.World; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; @@ -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, 512); 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(); } @@ -270,28 +302,58 @@ public class EjectorTileEntity extends KineticTileEntity { } if (state == State.RETRACTING) { - 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); + 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(); + } - 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) notifyUpdate(); } + private boolean scanTrajectoryForObstacles(int time) { + if (time == 0) + return false; + + Vector3d source = getLaunchedItemLocation(time); + Vector3d 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; + } + + Vector3d vec = rayTraceBlocks.getHitVec(); + earlyTarget = Pair.of(vec.add(Vector3d.of(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 +396,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 +409,7 @@ public class EjectorTileEntity extends KineticTileEntity { .isEmpty()) return; - Vector3d ejectVec = getLaunchedItemLocation(maxTime); + Vector3d ejectVec = earlyTarget != null ? earlyTarget.getFirst() : getLaunchedItemLocation(maxTime); Vector3d ejectMotionVec = getLaunchedItemMotion(maxTime); ItemEntity item = new ItemEntity(world, ejectVec.x, ejectVec.y, ejectVec.z, intAttached.getValue()); item.setMotion(ejectMotionVec); @@ -354,8 +418,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 Vector3d getLaunchedItemLocation(float time) { @@ -363,7 +429,8 @@ public class EjectorTileEntity extends KineticTileEntity { } public Vector3d getLaunchedItemMotion(float time) { - return launcher.getGlobalVelocity(time, getFacing().getOpposite(), pos); + return launcher.getGlobalVelocity(time, getFacing().getOpposite(), pos) + .scale(.5f); } public void dropFlyingItems() { @@ -402,6 +469,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 +494,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() { @@ -433,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 e13cb021d..a2ae91d02 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) { Vector3d motionVec = new Vector3d(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/content/logistics/block/funnel/FunnelTileEntity.java b/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelTileEntity.java index f0ea6a15e..633fa8110 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 @@ -1,17 +1,14 @@ package com.simibubi.create.content.logistics.block.funnel; 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; @@ -27,18 +24,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.vector.Vector3d; -import net.minecraft.util.text.ITextComponent; 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; import java.lang.ref.WeakReference; import java.util.List; @@ -344,48 +335,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/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_) { 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/java/com/simibubi/create/foundation/data/recipe/StandardRecipeGen.java b/src/main/java/com/simibubi/create/foundation/data/recipe/StandardRecipeGen.java index 2ebf10f1b..b3189af72 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 @@ -780,11 +780,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/gui/AllIcons.java b/src/main/java/com/simibubi/create/foundation/gui/AllIcons.java index c73832576..fc489f449 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 3dfae3db0..674e3b5d2 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 8eacba7b8..d52737815 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/PonderUI.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/PonderUI.java @@ -1,10 +1,25 @@ 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; +import java.util.stream.IntStream; + +import org.apache.commons.lang3.mutable.MutableBoolean; +import org.lwjgl.opengl.GL11; + import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.systems.RenderSystem; import com.simibubi.create.foundation.gui.*; import com.simibubi.create.foundation.ponder.PonderScene.SceneTransform; -import com.simibubi.create.foundation.ponder.content.*; +import com.simibubi.create.foundation.ponder.content.DebugScenes; +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.*; @@ -34,28 +49,23 @@ import net.minecraft.world.gen.feature.template.PlacementSettings; import net.minecraft.world.gen.feature.template.Template; import net.minecraftforge.fml.client.gui.GuiUtils; import net.minecraftforge.registries.ForgeRegistries; -import org.apache.commons.lang3.mutable.MutableBoolean; -import org.lwjgl.opengl.GL11; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; import java.util.Random; -import java.util.stream.IntStream; 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; @@ -66,6 +76,7 @@ public class PonderUI extends NavigatableSimiScreen { PonderChapter chapter = null; private boolean userViewMode; + private boolean slowTextMode; private boolean identifyMode; private ItemStack hoveredTooltipItem; private BlockPos hoveredBlockPos; @@ -80,10 +91,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)); } @@ -186,8 +200,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)); @@ -240,16 +259,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) @@ -262,13 +297,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); } @@ -347,6 +375,7 @@ public class PonderUI extends NavigatableSimiScreen { @Override protected void renderWindow(MatrixStack ms, int mouseX, int mouseY, float partialTicks) { + partialTicks = getPartialTicks(); RenderSystem.enableBlend(); renderVisibleScenes(ms, mouseX, mouseY, skipCooling > 0 ? 0 : identifyMode ? ponderPartialTicksPaused : partialTicks); @@ -359,7 +388,6 @@ public class PonderUI extends NavigatableSimiScreen { } protected void renderVisibleScenes(MatrixStack ms, int mouseX, int mouseY, float partialTicks) { - SuperRenderTypeBuffer.vertexSortingOrigin = new BlockPos(0, 0, 800); renderScene(ms, mouseX, mouseY, index, partialTicks); float lazyIndexValue = lazyIndex.getValue(partialTicks); if (Math.abs(lazyIndexValue - index) > 1 / 512f) @@ -377,7 +405,13 @@ 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); @@ -472,8 +506,8 @@ public class PonderUI extends NavigatableSimiScreen { } ms.pop(); - ms.pop(); + RenderSystem.popMatrix(); } protected void renderWidgets(MatrixStack ms, int mouseX, int mouseY, float partialTicks) { @@ -526,7 +560,8 @@ public class PonderUI extends NavigatableSimiScreen { UIRenderHelper.streak(ms, 180, 4, 10, 26, (int) (150 * fade), 0x101010); drawRightAlignedString(textRenderer, ms, Lang.translate(IN_CHAPTER).getString(), 0, 0, tooltipColor); - drawRightAlignedString(textRenderer, ms, Lang.translate(PonderLocalization.LANG_PREFIX + "chapter." + chapter.getId()).getString(), 0, 12, 0xffeeeeee); + drawRightAlignedString(textRenderer, ms, + Lang.translate(LANG_PREFIX + "chapter." + chapter.getId()).getString(), 0, 12, 0xffeeeeee); ms.pop(); } @@ -576,6 +611,11 @@ public class PonderUI extends NavigatableSimiScreen { else userMode.dim(); } + + if (slowTextMode) + slowMode.flash(); + else + slowMode.dim(); { // Scene overlay @@ -661,7 +701,11 @@ public class PonderUI extends NavigatableSimiScreen { if (index != scenes.size() - 1 && right.isHovered()) drawCenteredText(ms, textRenderer, Lang.translate(NEXT), right.x + 10, tooltipY, tooltipColor); if (replay.isHovered()) - drawCenteredText(ms, textRenderer, Lang.translate(REPLAY), replay.x + 10, tooltipY, tooltipColor); + drawCenteredText(ms, textRenderer, Lang.translate(REPLAY), replay.x + 10, tooltipY, tooltipColor); + if (slowMode.isHovered()) + drawCenteredText(ms, textRenderer, Lang.translate(SLOW_TEXT), slowMode.x + 5, tooltipY, tooltipColor); + if (PonderIndex.EDITOR_MODE && userMode.isHovered()) + drawCenteredString(ms, textRenderer, "Editor View", userMode.x + 10, tooltipY, tooltipColor); ms.pop(); } @@ -775,7 +819,7 @@ public class PonderUI extends NavigatableSimiScreen { @Override protected String getBreadcrumbTitle() { if (chapter != null) - return Lang.translate(PonderLocalization.LANG_PREFIX + "chapter." + chapter.getId()).getString(); + return Lang.translate(LANG_PREFIX + "chapter." + chapter.getId()).getString(); return stack.getItem() .getName() @@ -900,13 +944,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 @@ -918,14 +967,7 @@ public class PonderUI extends NavigatableSimiScreen { skipCooling = 15; } - @Override - public void removed() { - super.removed(); - SuperRenderTypeBuffer.vertexSortingOrigin = BlockPos.ZERO; - } - public void drawRightAlignedString(FontRenderer fontRenderer, MatrixStack ms, String string, int x, int y, int color) { fontRenderer.draw(ms, string, (float)(x - fontRenderer.getStringWidth(string)), (float)y, color); } - } 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 be5fdf8f7..8e7df9a7c 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; 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 be9fa3e57..8cc83176a 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(); - } - } - } - } - } } 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", 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 000000000..7f872f17f Binary files /dev/null and b/src/main/resources/assets/create/textures/block/contact_back.png differ 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 38f90a6ed..5634e9a0f 100644 Binary files a/src/main/resources/assets/create/textures/block/contact_front.png and b/src/main/resources/assets/create/textures/block/contact_front.png differ 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 84bf79386..d8bb701c2 100644 Binary files a/src/main/resources/assets/create/textures/block/contact_side.png and b/src/main/resources/assets/create/textures/block/contact_side.png differ 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 a69505c23..716fb98ca 100644 Binary files a/src/main/resources/assets/create/textures/block/contact_side_powered.png and b/src/main/resources/assets/create/textures/block/contact_side_powered.png differ 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 502ecf496..1dc944109 100644 Binary files a/src/main/resources/assets/create/textures/block/weighted_ejector_casing.png and b/src/main/resources/assets/create/textures/block/weighted_ejector_casing.png differ 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 2f81eab87..e32d2acb5 100644 Binary files a/src/main/resources/assets/create/textures/block/weighted_ejector_top.png and b/src/main/resources/assets/create/textures/block/weighted_ejector_top.png differ diff --git a/src/main/resources/assets/create/textures/gui/icons.png b/src/main/resources/assets/create/textures/gui/icons.png index c9d661aee..1dff79b36 100644 Binary files a/src/main/resources/assets/create/textures/gui/icons.png and b/src/main/resources/assets/create/textures/gui/icons.png differ