Renaming II

- TileEntity -> BlockEntity
This commit is contained in:
PepperCode1 2023-01-19 13:35:41 -08:00
parent 624b2d71d1
commit f2b472f90d
696 changed files with 6630 additions and 6631 deletions

View file

@ -566,30 +566,30 @@ bf2b0310500213ff853c748c236eb5d01f61658e assets/create/blockstates/yellow_toolbo
7f39521b211441f5c3e06d60c5978cebe16cacfb assets/create/blockstates/zinc_block.json 7f39521b211441f5c3e06d60c5978cebe16cacfb assets/create/blockstates/zinc_block.json
b7181bcd8182b2f17088e5aa881f374c9c65470c assets/create/blockstates/zinc_ore.json b7181bcd8182b2f17088e5aa881f374c9c65470c assets/create/blockstates/zinc_ore.json
3054a5519fbf91481b0c9c8160a20679fa9530da assets/create/lang/en_ud.json 3054a5519fbf91481b0c9c8160a20679fa9530da assets/create/lang/en_ud.json
c57c7f223e483ec45f7b94a33582f2bf66c4cf60 assets/create/lang/en_us.json 10368a860ae28910f8b376da5a71ed5329e878d6 assets/create/lang/en_us.json
a8a98ef3d6c5d586001f26b52be79074fbbf698b assets/create/lang/unfinished/cs_cz.json 0aca1235610eae2a297eda6f96780115f8cd0a8e assets/create/lang/unfinished/cs_cz.json
12babbc5593d305389ef8251e29531fa8301c7dc assets/create/lang/unfinished/da_dk.json 91513e2231501328a1a2e99c8bd90a51c8513c1b assets/create/lang/unfinished/da_dk.json
6d3b2431c3499dc73220bb81a9e3e183964d5cc0 assets/create/lang/unfinished/de_de.json e2e4f2644ca0cfbe26436abadc6553333fe2ce89 assets/create/lang/unfinished/de_de.json
aa0b7e416178db0cf2b9ac2ecead98e86a99a80a assets/create/lang/unfinished/es_cl.json ef633c12441059ac2d6795e39bb70578696da6e0 assets/create/lang/unfinished/es_cl.json
1b383a69d1f17ffad2548959375e901bb49744b6 assets/create/lang/unfinished/es_es.json 2d4d14e4c1fb9d9c8590a33570981cca83e0f44f assets/create/lang/unfinished/es_es.json
8800449d59b970abefa17a4f4880e18e69feb045 assets/create/lang/unfinished/es_mx.json 2fb12650950d8867501f5b00ff6edbedd8e231e4 assets/create/lang/unfinished/es_mx.json
01b50942474c627bb2071c6585fd96296daa3547 assets/create/lang/unfinished/fr_fr.json 645f1b7cc8d99de345fa3e5f2d1967e49b17d32b assets/create/lang/unfinished/fr_fr.json
c993975f362688389c39d6213081b5408874236a assets/create/lang/unfinished/hu_hu.json 0e6f608edc0d95337a6cce21d26cc8c5c7284bfc assets/create/lang/unfinished/hu_hu.json
5066f4b4a13e8a5a03f2405859508ab7bfe6bdb5 assets/create/lang/unfinished/it_it.json 0afaccef5e6b4bc2149bef652e5dd51c426c816a assets/create/lang/unfinished/it_it.json
5293c84a5e3d19c51fb414092c13a955f7045f33 assets/create/lang/unfinished/ja_jp.json ee8bd262d30c4b176d012902d0371648f5f5d5d4 assets/create/lang/unfinished/ja_jp.json
1d0d011e4da491eef7f69be41dd92f194a8a2872 assets/create/lang/unfinished/ko_kr.json 499063468b398b7b31182c109b68e751361b04fa assets/create/lang/unfinished/ko_kr.json
fd10e7de1e60c3c6537781b67e215effb3d96964 assets/create/lang/unfinished/nl_nl.json 5beecf8025e06933a488a4e8224927e001f759cb assets/create/lang/unfinished/nl_nl.json
0b1cfb3738eecd97d28ad7eb8110a4f03ef5682b assets/create/lang/unfinished/no_no.json 7e6a23b7f7c24ebbd08c135a8565787f65c6e0f0 assets/create/lang/unfinished/no_no.json
dd9fb706e979d00a90f5f9a947541c5b4cebc024 assets/create/lang/unfinished/pl_pl.json da8649af75b2b52a99ae4c30a106768f917192b4 assets/create/lang/unfinished/pl_pl.json
086802842bb63805d358b5ea9d70aeb9d490331f assets/create/lang/unfinished/pt_br.json 3fba7b5d3649aac2cb759bed41d8690b5cf4dbd1 assets/create/lang/unfinished/pt_br.json
538445e2d4b6626136b25a1c04a0445b00a229c5 assets/create/lang/unfinished/pt_pt.json 3e83cdf96cde7c50f3f106a7e1f4c029cf26bfe2 assets/create/lang/unfinished/pt_pt.json
01bc95d3f4844e642b8f4848f325e7d2f670bcbb assets/create/lang/unfinished/ro_ro.json 4a9f031baa04241b34779c74a75ca9f73ee589b7 assets/create/lang/unfinished/ro_ro.json
967f93516721dda8974359cc5fb088e6fa50d627 assets/create/lang/unfinished/ru_ru.json fa470b919e1f304ed0eb43cf3b47f2e9c9f1a470 assets/create/lang/unfinished/ru_ru.json
321146806a1364b3ad4feac1592df680be230e42 assets/create/lang/unfinished/sv_se.json ec236461ebc2bddf2a1281b4d8713ba0bbb40012 assets/create/lang/unfinished/sv_se.json
aa3feff9a8b3314002939bef8793c3ae4ee07758 assets/create/lang/unfinished/th_th.json 906d8450cd95b65824ff23c1db38096cdc3802ec assets/create/lang/unfinished/th_th.json
af6ce2a42851ee2b16fc156d6f0198ddf9fa8f74 assets/create/lang/unfinished/uk_ua.json a7122f134d4cdad8802f097822c38158b3042fa5 assets/create/lang/unfinished/uk_ua.json
35057efca9e51b76f0ce8292e52c87c830873d1d assets/create/lang/unfinished/zh_cn.json 0e0501505897acbc7bb2fe5cb20faa71727285ab assets/create/lang/unfinished/zh_cn.json
1c56066b9d1094dcf43a307a432b830d916c4bab assets/create/lang/unfinished/zh_tw.json 7829c9e8b9e5fa92b7327b839d914162a2ab5f06 assets/create/lang/unfinished/zh_tw.json
487a511a01b2a4531fb672f917922312db78f958 assets/create/models/block/acacia_window.json 487a511a01b2a4531fb672f917922312db78f958 assets/create/models/block/acacia_window.json
b48060cba1a382f373a05bf0039054053eccf076 assets/create/models/block/acacia_window_pane_noside.json b48060cba1a382f373a05bf0039054053eccf076 assets/create/models/block/acacia_window_pane_noside.json
3066db1bf03cffa1a9c7fbacf47ae586632f4eb3 assets/create/models/block/acacia_window_pane_noside_alt.json 3066db1bf03cffa1a9c7fbacf47ae586632f4eb3 assets/create/models/block/acacia_window_pane_noside_alt.json

View file

@ -1198,12 +1198,12 @@
"create.gui.schematicannon.option.replaceWithAny": "Replace Solid with Any", "create.gui.schematicannon.option.replaceWithAny": "Replace Solid with Any",
"create.gui.schematicannon.option.replaceWithEmpty": "Replace Solid with Empty", "create.gui.schematicannon.option.replaceWithEmpty": "Replace Solid with Empty",
"create.gui.schematicannon.option.skipMissing": "Skip missing Blocks", "create.gui.schematicannon.option.skipMissing": "Skip missing Blocks",
"create.gui.schematicannon.option.skipTileEntities": "Protect Tile Entities", "create.gui.schematicannon.option.skipBlockEntities": "Protect Block Entities",
"create.gui.schematicannon.slot.gunpowder": "Add gunpowder to fuel the cannon", "create.gui.schematicannon.slot.gunpowder": "Add gunpowder to fuel the cannon",
"create.gui.schematicannon.slot.listPrinter": "Place books here to print a Checklist for your Schematic", "create.gui.schematicannon.slot.listPrinter": "Place books here to print a Checklist for your Schematic",
"create.gui.schematicannon.slot.schematic": "Add your Schematic here. Make sure it is deployed at a specific location.", "create.gui.schematicannon.slot.schematic": "Add your Schematic here. Make sure it is deployed at a specific location.",
"create.gui.schematicannon.option.skipMissing.description": "If the cannon cannot find a required Block for placement, it will continue at the next Location.", "create.gui.schematicannon.option.skipMissing.description": "If the cannon cannot find a required Block for placement, it will continue at the next Location.",
"create.gui.schematicannon.option.skipTileEntities.description": "The cannon will avoid replacing data holding blocks such as Chests.", "create.gui.schematicannon.option.skipBlockEntities.description": "The cannon will avoid replacing data holding blocks such as Chests.",
"create.gui.schematicannon.option.dontReplaceSolid.description": "The cannon will never replace any Solid blocks in its working area, only non-Solid and Air.", "create.gui.schematicannon.option.dontReplaceSolid.description": "The cannon will never replace any Solid blocks in its working area, only non-Solid and Air.",
"create.gui.schematicannon.option.replaceWithSolid.description": "The cannon will only replace Solid blocks in its working area if the Schematic contains a solid Block at the Location.", "create.gui.schematicannon.option.replaceWithSolid.description": "The cannon will only replace Solid blocks in its working area if the Schematic contains a solid Block at the Location.",
"create.gui.schematicannon.option.replaceWithAny.description": "The cannon will replace Solid blocks in its working area if the Schematic contains any Block at the Location.", "create.gui.schematicannon.option.replaceWithAny.description": "The cannon will replace Solid blocks in its working area if the Schematic contains any Block at the Location.",

View file

@ -1199,12 +1199,12 @@
"create.gui.schematicannon.option.replaceWithAny": "UNLOCALIZED: Replace Solid with Any", "create.gui.schematicannon.option.replaceWithAny": "UNLOCALIZED: Replace Solid with Any",
"create.gui.schematicannon.option.replaceWithEmpty": "UNLOCALIZED: Replace Solid with Empty", "create.gui.schematicannon.option.replaceWithEmpty": "UNLOCALIZED: Replace Solid with Empty",
"create.gui.schematicannon.option.skipMissing": "UNLOCALIZED: Skip missing Blocks", "create.gui.schematicannon.option.skipMissing": "UNLOCALIZED: Skip missing Blocks",
"create.gui.schematicannon.option.skipTileEntities": "UNLOCALIZED: Protect Tile Entities", "create.gui.schematicannon.option.skipBlockEntities": "UNLOCALIZED: Protect Block Entities",
"create.gui.schematicannon.slot.gunpowder": "UNLOCALIZED: Add gunpowder to fuel the cannon", "create.gui.schematicannon.slot.gunpowder": "UNLOCALIZED: Add gunpowder to fuel the cannon",
"create.gui.schematicannon.slot.listPrinter": "UNLOCALIZED: Place books here to print a Checklist for your Schematic", "create.gui.schematicannon.slot.listPrinter": "UNLOCALIZED: Place books here to print a Checklist for your Schematic",
"create.gui.schematicannon.slot.schematic": "UNLOCALIZED: Add your Schematic here. Make sure it is deployed at a specific location.", "create.gui.schematicannon.slot.schematic": "UNLOCALIZED: Add your Schematic here. Make sure it is deployed at a specific location.",
"create.gui.schematicannon.option.skipMissing.description": "UNLOCALIZED: If the cannon cannot find a required Block for placement, it will continue at the next Location.", "create.gui.schematicannon.option.skipMissing.description": "UNLOCALIZED: If the cannon cannot find a required Block for placement, it will continue at the next Location.",
"create.gui.schematicannon.option.skipTileEntities.description": "UNLOCALIZED: The cannon will avoid replacing data holding blocks such as Chests.", "create.gui.schematicannon.option.skipBlockEntities.description": "UNLOCALIZED: The cannon will avoid replacing data holding blocks such as Chests.",
"create.gui.schematicannon.option.dontReplaceSolid.description": "UNLOCALIZED: The cannon will never replace any Solid blocks in its working area, only non-Solid and Air.", "create.gui.schematicannon.option.dontReplaceSolid.description": "UNLOCALIZED: The cannon will never replace any Solid blocks in its working area, only non-Solid and Air.",
"create.gui.schematicannon.option.replaceWithSolid.description": "UNLOCALIZED: The cannon will only replace Solid blocks in its working area if the Schematic contains a solid Block at the Location.", "create.gui.schematicannon.option.replaceWithSolid.description": "UNLOCALIZED: The cannon will only replace Solid blocks in its working area if the Schematic contains a solid Block at the Location.",
"create.gui.schematicannon.option.replaceWithAny.description": "UNLOCALIZED: The cannon will replace Solid blocks in its working area if the Schematic contains any Block at the Location.", "create.gui.schematicannon.option.replaceWithAny.description": "UNLOCALIZED: The cannon will replace Solid blocks in its working area if the Schematic contains any Block at the Location.",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 1353", "_": "Missing Localizations: 1354",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -1199,12 +1199,12 @@
"create.gui.schematicannon.option.replaceWithAny": "Erstat massiv med enhver", "create.gui.schematicannon.option.replaceWithAny": "Erstat massiv med enhver",
"create.gui.schematicannon.option.replaceWithEmpty": "Erstat massiv med tomt", "create.gui.schematicannon.option.replaceWithEmpty": "Erstat massiv med tomt",
"create.gui.schematicannon.option.skipMissing": "Spring over manglende blokke", "create.gui.schematicannon.option.skipMissing": "Spring over manglende blokke",
"create.gui.schematicannon.option.skipTileEntities": "Beskyt blokojekter", "create.gui.schematicannon.option.skipBlockEntities": "UNLOCALIZED: Protect Block Entities",
"create.gui.schematicannon.slot.gunpowder": "UNLOCALIZED: Add gunpowder to fuel the cannon", "create.gui.schematicannon.slot.gunpowder": "UNLOCALIZED: Add gunpowder to fuel the cannon",
"create.gui.schematicannon.slot.listPrinter": "UNLOCALIZED: Place books here to print a Checklist for your Schematic", "create.gui.schematicannon.slot.listPrinter": "UNLOCALIZED: Place books here to print a Checklist for your Schematic",
"create.gui.schematicannon.slot.schematic": "UNLOCALIZED: Add your Schematic here. Make sure it is deployed at a specific location.", "create.gui.schematicannon.slot.schematic": "UNLOCALIZED: Add your Schematic here. Make sure it is deployed at a specific location.",
"create.gui.schematicannon.option.skipMissing.description": "UNLOCALIZED: If the cannon cannot find a required Block for placement, it will continue at the next Location.", "create.gui.schematicannon.option.skipMissing.description": "UNLOCALIZED: If the cannon cannot find a required Block for placement, it will continue at the next Location.",
"create.gui.schematicannon.option.skipTileEntities.description": "UNLOCALIZED: The cannon will avoid replacing data holding blocks such as Chests.", "create.gui.schematicannon.option.skipBlockEntities.description": "UNLOCALIZED: The cannon will avoid replacing data holding blocks such as Chests.",
"create.gui.schematicannon.option.dontReplaceSolid.description": "UNLOCALIZED: The cannon will never replace any Solid blocks in its working area, only non-Solid and Air.", "create.gui.schematicannon.option.dontReplaceSolid.description": "UNLOCALIZED: The cannon will never replace any Solid blocks in its working area, only non-Solid and Air.",
"create.gui.schematicannon.option.replaceWithSolid.description": "UNLOCALIZED: The cannon will only replace Solid blocks in its working area if the Schematic contains a solid Block at the Location.", "create.gui.schematicannon.option.replaceWithSolid.description": "UNLOCALIZED: The cannon will only replace Solid blocks in its working area if the Schematic contains a solid Block at the Location.",
"create.gui.schematicannon.option.replaceWithAny.description": "UNLOCALIZED: The cannon will replace Solid blocks in its working area if the Schematic contains any Block at the Location.", "create.gui.schematicannon.option.replaceWithAny.description": "UNLOCALIZED: The cannon will replace Solid blocks in its working area if the Schematic contains any Block at the Location.",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 40", "_": "Missing Localizations: 42",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -1199,12 +1199,12 @@
"create.gui.schematicannon.option.replaceWithAny": "Feste Blöcke immer ersetzen", "create.gui.schematicannon.option.replaceWithAny": "Feste Blöcke immer ersetzen",
"create.gui.schematicannon.option.replaceWithEmpty": "Feste Blöcke mit Leere ersetzen", "create.gui.schematicannon.option.replaceWithEmpty": "Feste Blöcke mit Leere ersetzen",
"create.gui.schematicannon.option.skipMissing": "Fehlende Blöcke ignorieren", "create.gui.schematicannon.option.skipMissing": "Fehlende Blöcke ignorieren",
"create.gui.schematicannon.option.skipTileEntities": "Tile Entities ignorieren", "create.gui.schematicannon.option.skipBlockEntities": "UNLOCALIZED: Protect Block Entities",
"create.gui.schematicannon.slot.gunpowder": "Füge Schwarzpulver hinzu um die Kanone zu betreiben", "create.gui.schematicannon.slot.gunpowder": "Füge Schwarzpulver hinzu um die Kanone zu betreiben",
"create.gui.schematicannon.slot.listPrinter": "Platziere hier Bücher um eine Checkliste für deinen Bauplan zu drucken", "create.gui.schematicannon.slot.listPrinter": "Platziere hier Bücher um eine Checkliste für deinen Bauplan zu drucken",
"create.gui.schematicannon.slot.schematic": "Füge Bauplan hier hinzu. Stelle sicher dass er an einer spezifischen Position bereitgestellt wird.", "create.gui.schematicannon.slot.schematic": "Füge Bauplan hier hinzu. Stelle sicher dass er an einer spezifischen Position bereitgestellt wird.",
"create.gui.schematicannon.option.skipMissing.description": "Wenn die Bauplankanone einen benötigten Block nicht finden kann, wird sie einfach beim nächsten weiter machen.", "create.gui.schematicannon.option.skipMissing.description": "Wenn die Bauplankanone einen benötigten Block nicht finden kann, wird sie einfach beim nächsten weiter machen.",
"create.gui.schematicannon.option.skipTileEntities.description": "Die Bauplankanone wird versuchen, Blöcke mit extra Daten, beispielsweise Truhen, nicht zu ersetzen.", "create.gui.schematicannon.option.skipBlockEntities.description": "UNLOCALIZED: The cannon will avoid replacing data holding blocks such as Chests.",
"create.gui.schematicannon.option.dontReplaceSolid.description": "Die Kanone wird ausschließlich nicht feste Blöcke und Luft in ihrem Arbeitsbereich ersetzen.", "create.gui.schematicannon.option.dontReplaceSolid.description": "Die Kanone wird ausschließlich nicht feste Blöcke und Luft in ihrem Arbeitsbereich ersetzen.",
"create.gui.schematicannon.option.replaceWithSolid.description": "Die Kanone wird feste Blöcke nur dann ersetzen, wenn an der Position vorher bereits ein fester Block war.", "create.gui.schematicannon.option.replaceWithSolid.description": "Die Kanone wird feste Blöcke nur dann ersetzen, wenn an der Position vorher bereits ein fester Block war.",
"create.gui.schematicannon.option.replaceWithAny.description": "Die Kanone wird feste Blöcke ersetzen, wenn der Bauplan an der Position einen Block enthält.", "create.gui.schematicannon.option.replaceWithAny.description": "Die Kanone wird feste Blöcke ersetzen, wenn der Bauplan an der Position einen Block enthält.",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 1059", "_": "Missing Localizations: 1061",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -1199,12 +1199,12 @@
"create.gui.schematicannon.option.replaceWithAny": "Reemplazar Sólido con cualquier cosa", "create.gui.schematicannon.option.replaceWithAny": "Reemplazar Sólido con cualquier cosa",
"create.gui.schematicannon.option.replaceWithEmpty": "Reemplazar Sólido con Vacío", "create.gui.schematicannon.option.replaceWithEmpty": "Reemplazar Sólido con Vacío",
"create.gui.schematicannon.option.skipMissing": "Saltarse objetos faltantes", "create.gui.schematicannon.option.skipMissing": "Saltarse objetos faltantes",
"create.gui.schematicannon.option.skipTileEntities": "Proteject objetos con información", "create.gui.schematicannon.option.skipBlockEntities": "UNLOCALIZED: Protect Block Entities",
"create.gui.schematicannon.slot.gunpowder": "Añade pólvora para alimentar el cañon", "create.gui.schematicannon.slot.gunpowder": "Añade pólvora para alimentar el cañon",
"create.gui.schematicannon.slot.listPrinter": "Coloca libros aquí para imprimir una lista de verificación para tu esquema", "create.gui.schematicannon.slot.listPrinter": "Coloca libros aquí para imprimir una lista de verificación para tu esquema",
"create.gui.schematicannon.slot.schematic": "Pon tu Esquema aquí. Asegurate de haberlo desplegado en la ubicación deseada.", "create.gui.schematicannon.slot.schematic": "Pon tu Esquema aquí. Asegurate de haberlo desplegado en la ubicación deseada.",
"create.gui.schematicannon.option.skipMissing.description": "Si el cañón no puede encontrar un Bloque requerido para colocarlo, saltará a la siguiente Ubicación.", "create.gui.schematicannon.option.skipMissing.description": "Si el cañón no puede encontrar un Bloque requerido para colocarlo, saltará a la siguiente Ubicación.",
"create.gui.schematicannon.option.skipTileEntities.description": "El cañón evitará reemplazar bloques con almacenamiento de datos como cofres o máquinas.", "create.gui.schematicannon.option.skipBlockEntities.description": "UNLOCALIZED: The cannon will avoid replacing data holding blocks such as Chests.",
"create.gui.schematicannon.option.dontReplaceSolid.description": "El cañón nunca reemplazará ningún bloque sólido en su área de trabajo, solo no-sólidos y aire.", "create.gui.schematicannon.option.dontReplaceSolid.description": "El cañón nunca reemplazará ningún bloque sólido en su área de trabajo, solo no-sólidos y aire.",
"create.gui.schematicannon.option.replaceWithSolid.description": "El cañón solo reemplazará los bloques sólidos en su área de trabajo si el esquema contiene un bloque sólido en esa ubicación.", "create.gui.schematicannon.option.replaceWithSolid.description": "El cañón solo reemplazará los bloques sólidos en su área de trabajo si el esquema contiene un bloque sólido en esa ubicación.",
"create.gui.schematicannon.option.replaceWithAny.description": "El cañón reemplazará los bloques sólidos en su área de trabajo si el esquema contiene algún bloque de cualquier tipo en la ubicación.", "create.gui.schematicannon.option.replaceWithAny.description": "El cañón reemplazará los bloques sólidos en su área de trabajo si el esquema contiene algún bloque de cualquier tipo en la ubicación.",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 104", "_": "Missing Localizations: 106",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -1199,12 +1199,12 @@
"create.gui.schematicannon.option.replaceWithAny": "Sustituir sólido por cualquiera", "create.gui.schematicannon.option.replaceWithAny": "Sustituir sólido por cualquiera",
"create.gui.schematicannon.option.replaceWithEmpty": "Sustituir sólido por vacío", "create.gui.schematicannon.option.replaceWithEmpty": "Sustituir sólido por vacío",
"create.gui.schematicannon.option.skipMissing": "Omitir los bloques que faltan", "create.gui.schematicannon.option.skipMissing": "Omitir los bloques que faltan",
"create.gui.schematicannon.option.skipTileEntities": "Proteger a las entidades", "create.gui.schematicannon.option.skipBlockEntities": "UNLOCALIZED: Protect Block Entities",
"create.gui.schematicannon.slot.gunpowder": "Añade pólvora para alimentar el cañón", "create.gui.schematicannon.slot.gunpowder": "Añade pólvora para alimentar el cañón",
"create.gui.schematicannon.slot.listPrinter": "Coloque los libros aquí para imprimir una lista de comprobación para su esquema", "create.gui.schematicannon.slot.listPrinter": "Coloque los libros aquí para imprimir una lista de comprobación para su esquema",
"create.gui.schematicannon.slot.schematic": "Añada su esquema aquí. Asegúrese de que se despliega en un lugar específico.", "create.gui.schematicannon.slot.schematic": "Añada su esquema aquí. Asegúrese de que se despliega en un lugar específico.",
"create.gui.schematicannon.option.skipMissing.description": "Si el cañón no encuentra un bloque necesario para su colocación, continuará en la siguiente ubicación.", "create.gui.schematicannon.option.skipMissing.description": "Si el cañón no encuentra un bloque necesario para su colocación, continuará en la siguiente ubicación.",
"create.gui.schematicannon.option.skipTileEntities.description": "El cañón evitará reemplazar los bloques que contienen datos, como los cofres.", "create.gui.schematicannon.option.skipBlockEntities.description": "UNLOCALIZED: The cannon will avoid replacing data holding blocks such as Chests.",
"create.gui.schematicannon.option.dontReplaceSolid.description": "El cañón nunca sustituirá ningún bloque sólido en su zona de trabajo, sólo los no sólidos y el aire.", "create.gui.schematicannon.option.dontReplaceSolid.description": "El cañón nunca sustituirá ningún bloque sólido en su zona de trabajo, sólo los no sólidos y el aire.",
"create.gui.schematicannon.option.replaceWithSolid.description": "El cañón sólo reemplazará los bloques sólidos en su área de trabajo si el esquema contiene un bloque sólido en la ubicación.", "create.gui.schematicannon.option.replaceWithSolid.description": "El cañón sólo reemplazará los bloques sólidos en su área de trabajo si el esquema contiene un bloque sólido en la ubicación.",
"create.gui.schematicannon.option.replaceWithAny.description": "El cañón reemplazará los bloques sólidos en su área de trabajo si el esquema contiene algún bloque en la ubicación.", "create.gui.schematicannon.option.replaceWithAny.description": "El cañón reemplazará los bloques sólidos en su área de trabajo si el esquema contiene algún bloque en la ubicación.",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 104", "_": "Missing Localizations: 106",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -1199,12 +1199,12 @@
"create.gui.schematicannon.option.replaceWithAny": "Sustituir sólido por cualquiera", "create.gui.schematicannon.option.replaceWithAny": "Sustituir sólido por cualquiera",
"create.gui.schematicannon.option.replaceWithEmpty": "Sustituir sólido por vacío", "create.gui.schematicannon.option.replaceWithEmpty": "Sustituir sólido por vacío",
"create.gui.schematicannon.option.skipMissing": "Omitir los bloques que faltan", "create.gui.schematicannon.option.skipMissing": "Omitir los bloques que faltan",
"create.gui.schematicannon.option.skipTileEntities": "Proteger a las entidades", "create.gui.schematicannon.option.skipBlockEntities": "UNLOCALIZED: Protect Block Entities",
"create.gui.schematicannon.slot.gunpowder": "Añade pólvora para alimentar el cañón", "create.gui.schematicannon.slot.gunpowder": "Añade pólvora para alimentar el cañón",
"create.gui.schematicannon.slot.listPrinter": "Coloque los libros aquí para imprimir una lista de comprobación para su esquema", "create.gui.schematicannon.slot.listPrinter": "Coloque los libros aquí para imprimir una lista de comprobación para su esquema",
"create.gui.schematicannon.slot.schematic": "Añada su esquema aquí. Asegúrese de que se despliega en un lugar específico.", "create.gui.schematicannon.slot.schematic": "Añada su esquema aquí. Asegúrese de que se despliega en un lugar específico.",
"create.gui.schematicannon.option.skipMissing.description": "Si el cañón no encuentra un bloque necesario para su colocación, continuará en la siguiente ubicación.", "create.gui.schematicannon.option.skipMissing.description": "Si el cañón no encuentra un bloque necesario para su colocación, continuará en la siguiente ubicación.",
"create.gui.schematicannon.option.skipTileEntities.description": "El cañón evitará reemplazar los bloques que contienen datos, como los cofres.", "create.gui.schematicannon.option.skipBlockEntities.description": "UNLOCALIZED: The cannon will avoid replacing data holding blocks such as Chests.",
"create.gui.schematicannon.option.dontReplaceSolid.description": "El cañón nunca sustituirá ningún bloque sólido en su zona de trabajo, sólo los no sólidos y el aire.", "create.gui.schematicannon.option.dontReplaceSolid.description": "El cañón nunca sustituirá ningún bloque sólido en su zona de trabajo, sólo los no sólidos y el aire.",
"create.gui.schematicannon.option.replaceWithSolid.description": "El cañón sólo reemplazará los bloques sólidos en su área de trabajo si el esquema contiene un bloque sólido en la ubicación.", "create.gui.schematicannon.option.replaceWithSolid.description": "El cañón sólo reemplazará los bloques sólidos en su área de trabajo si el esquema contiene un bloque sólido en la ubicación.",
"create.gui.schematicannon.option.replaceWithAny.description": "El cañón reemplazará los bloques sólidos en su área de trabajo si el esquema contiene algún bloque en la ubicación.", "create.gui.schematicannon.option.replaceWithAny.description": "El cañón reemplazará los bloques sólidos en su área de trabajo si el esquema contiene algún bloque en la ubicación.",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 40", "_": "Missing Localizations: 42",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -1199,12 +1199,12 @@
"create.gui.schematicannon.option.replaceWithAny": "Remplacer le solide par n'importe quoi", "create.gui.schematicannon.option.replaceWithAny": "Remplacer le solide par n'importe quoi",
"create.gui.schematicannon.option.replaceWithEmpty": "Remplacer le solide par rien", "create.gui.schematicannon.option.replaceWithEmpty": "Remplacer le solide par rien",
"create.gui.schematicannon.option.skipMissing": "Ignorer les blocs manquants", "create.gui.schematicannon.option.skipMissing": "Ignorer les blocs manquants",
"create.gui.schematicannon.option.skipTileEntities": "Protéger les entités de blocs", "create.gui.schematicannon.option.skipBlockEntities": "UNLOCALIZED: Protect Block Entities",
"create.gui.schematicannon.slot.gunpowder": "Ajouter de la poudre à canon pour alimenter le canon", "create.gui.schematicannon.slot.gunpowder": "Ajouter de la poudre à canon pour alimenter le canon",
"create.gui.schematicannon.slot.listPrinter": "Placez des livres ici pour imprimer une liste des matériaux de votre schéma", "create.gui.schematicannon.slot.listPrinter": "Placez des livres ici pour imprimer une liste des matériaux de votre schéma",
"create.gui.schematicannon.slot.schematic": "Ajoutez votre schéma ici. Soyez sûr qu'il est déployé à un emplacement spécifique.", "create.gui.schematicannon.slot.schematic": "Ajoutez votre schéma ici. Soyez sûr qu'il est déployé à un emplacement spécifique.",
"create.gui.schematicannon.option.skipMissing.description": "Si le canon ne peut pas trouver un bloc requis pour le placement, il continuera au prochain emplacement.", "create.gui.schematicannon.option.skipMissing.description": "Si le canon ne peut pas trouver un bloc requis pour le placement, il continuera au prochain emplacement.",
"create.gui.schematicannon.option.skipTileEntities.description": "Le canon évitera de remplacer les blocs de stockage de données tels que les coffres.", "create.gui.schematicannon.option.skipBlockEntities.description": "UNLOCALIZED: The cannon will avoid replacing data holding blocks such as Chests.",
"create.gui.schematicannon.option.dontReplaceSolid.description": "Le canon ne remplacera jamais les blocs solides dans sa zone de travail, seulement non solides et air.", "create.gui.schematicannon.option.dontReplaceSolid.description": "Le canon ne remplacera jamais les blocs solides dans sa zone de travail, seulement non solides et air.",
"create.gui.schematicannon.option.replaceWithSolid.description": "Le canon ne remplacera les blocs solides dans sa zone de travail que si le schéma contient un bloc solide à l'emplacement.", "create.gui.schematicannon.option.replaceWithSolid.description": "Le canon ne remplacera les blocs solides dans sa zone de travail que si le schéma contient un bloc solide à l'emplacement.",
"create.gui.schematicannon.option.replaceWithAny.description": "Le canon remplacera les blocs solides dans sa zone de travail si le schéma contient un bloc à l'emplacement.", "create.gui.schematicannon.option.replaceWithAny.description": "Le canon remplacera les blocs solides dans sa zone de travail si le schéma contient un bloc à l'emplacement.",

View file

@ -1199,12 +1199,12 @@
"create.gui.schematicannon.option.replaceWithAny": "Tömör blokk kicserélése bármire", "create.gui.schematicannon.option.replaceWithAny": "Tömör blokk kicserélése bármire",
"create.gui.schematicannon.option.replaceWithEmpty": "Tömör blokk kicserélése üresre", "create.gui.schematicannon.option.replaceWithEmpty": "Tömör blokk kicserélése üresre",
"create.gui.schematicannon.option.skipMissing": "Hiányzó blokkok kihagyása", "create.gui.schematicannon.option.skipMissing": "Hiányzó blokkok kihagyása",
"create.gui.schematicannon.option.skipTileEntities": "UNLOCALIZED: Protect Tile Entities", "create.gui.schematicannon.option.skipBlockEntities": "UNLOCALIZED: Protect Block Entities",
"create.gui.schematicannon.slot.gunpowder": "Az ágyú tüzeléséhez adj hozzá puskaport", "create.gui.schematicannon.slot.gunpowder": "Az ágyú tüzeléséhez adj hozzá puskaport",
"create.gui.schematicannon.slot.listPrinter": "Helyezz ide könyveket, hogy a tervrajzod számára ellenőrzőlistát nyomtass", "create.gui.schematicannon.slot.listPrinter": "Helyezz ide könyveket, hogy a tervrajzod számára ellenőrzőlistát nyomtass",
"create.gui.schematicannon.slot.schematic": "A tervrajzod ide rakd. Bizonyosodj meg arról, hogy egy megadott helyre van lehelyezve.", "create.gui.schematicannon.slot.schematic": "A tervrajzod ide rakd. Bizonyosodj meg arról, hogy egy megadott helyre van lehelyezve.",
"create.gui.schematicannon.option.skipMissing.description": "UNLOCALIZED: If the cannon cannot find a required Block for placement, it will continue at the next Location.", "create.gui.schematicannon.option.skipMissing.description": "UNLOCALIZED: If the cannon cannot find a required Block for placement, it will continue at the next Location.",
"create.gui.schematicannon.option.skipTileEntities.description": "UNLOCALIZED: The cannon will avoid replacing data holding blocks such as Chests.", "create.gui.schematicannon.option.skipBlockEntities.description": "UNLOCALIZED: The cannon will avoid replacing data holding blocks such as Chests.",
"create.gui.schematicannon.option.dontReplaceSolid.description": "A löveg a munkaterületen soha sem fog kicserélni egyetlen tömör blokkot sem, csak nem-tömör és levegő blokkokat.", "create.gui.schematicannon.option.dontReplaceSolid.description": "A löveg a munkaterületen soha sem fog kicserélni egyetlen tömör blokkot sem, csak nem-tömör és levegő blokkokat.",
"create.gui.schematicannon.option.replaceWithSolid.description": "UNLOCALIZED: The cannon will only replace Solid blocks in its working area if the Schematic contains a solid Block at the Location.", "create.gui.schematicannon.option.replaceWithSolid.description": "UNLOCALIZED: The cannon will only replace Solid blocks in its working area if the Schematic contains a solid Block at the Location.",
"create.gui.schematicannon.option.replaceWithAny.description": "UNLOCALIZED: The cannon will replace Solid blocks in its working area if the Schematic contains any Block at the Location.", "create.gui.schematicannon.option.replaceWithAny.description": "UNLOCALIZED: The cannon will replace Solid blocks in its working area if the Schematic contains any Block at the Location.",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 40", "_": "Missing Localizations: 42",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -1199,12 +1199,12 @@
"create.gui.schematicannon.option.replaceWithAny": "Sostituisci solidi con qualsiasi", "create.gui.schematicannon.option.replaceWithAny": "Sostituisci solidi con qualsiasi",
"create.gui.schematicannon.option.replaceWithEmpty": "Sostituisci solidi con il vuoto", "create.gui.schematicannon.option.replaceWithEmpty": "Sostituisci solidi con il vuoto",
"create.gui.schematicannon.option.skipMissing": "Salta i blocchi mancanti", "create.gui.schematicannon.option.skipMissing": "Salta i blocchi mancanti",
"create.gui.schematicannon.option.skipTileEntities": "Proteggi i blocchi entità", "create.gui.schematicannon.option.skipBlockEntities": "UNLOCALIZED: Protect Block Entities",
"create.gui.schematicannon.slot.gunpowder": "Aggiungi polvere da sparo per alimentare il cannone", "create.gui.schematicannon.slot.gunpowder": "Aggiungi polvere da sparo per alimentare il cannone",
"create.gui.schematicannon.slot.listPrinter": "Piazza qui i libri per stampare una lista di controllo per il tuo progetto", "create.gui.schematicannon.slot.listPrinter": "Piazza qui i libri per stampare una lista di controllo per il tuo progetto",
"create.gui.schematicannon.slot.schematic": "Aggiungi qui il tuo progetto. Assicurati che sia piazzato in una posizione specifica.", "create.gui.schematicannon.slot.schematic": "Aggiungi qui il tuo progetto. Assicurati che sia piazzato in una posizione specifica.",
"create.gui.schematicannon.option.skipMissing.description": "Se il cannone non riesce a trovare un blocco richiesto per il posizionamento, continuerà nella posizione successiva.", "create.gui.schematicannon.option.skipMissing.description": "Se il cannone non riesce a trovare un blocco richiesto per il posizionamento, continuerà nella posizione successiva.",
"create.gui.schematicannon.option.skipTileEntities.description": "Il cannone eviterà di sostituire i blocchi entità come bauli o fornaci.", "create.gui.schematicannon.option.skipBlockEntities.description": "UNLOCALIZED: The cannon will avoid replacing data holding blocks such as Chests.",
"create.gui.schematicannon.option.dontReplaceSolid.description": "Il cannone non sostituirà mai alcun blocco solido nella sua area di lavoro, solo non-solidi e aria.", "create.gui.schematicannon.option.dontReplaceSolid.description": "Il cannone non sostituirà mai alcun blocco solido nella sua area di lavoro, solo non-solidi e aria.",
"create.gui.schematicannon.option.replaceWithSolid.description": "Il cannone sostituirà i blocchi solidi nella sua area di lavoro se lo schema contiene un blocco solido in quella posizione.", "create.gui.schematicannon.option.replaceWithSolid.description": "Il cannone sostituirà i blocchi solidi nella sua area di lavoro se lo schema contiene un blocco solido in quella posizione.",
"create.gui.schematicannon.option.replaceWithAny.description": "Il cannone sostituirà i blocchi solidi nella sua area di lavoro se lo schema contiene un blocco qualunque in quella posizione.", "create.gui.schematicannon.option.replaceWithAny.description": "Il cannone sostituirà i blocchi solidi nella sua area di lavoro se lo schema contiene un blocco qualunque in quella posizione.",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 69", "_": "Missing Localizations: 71",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -1199,12 +1199,12 @@
"create.gui.schematicannon.option.replaceWithAny": "固体ブロックを任意のブロックに置き換える", "create.gui.schematicannon.option.replaceWithAny": "固体ブロックを任意のブロックに置き換える",
"create.gui.schematicannon.option.replaceWithEmpty": "固体ブロックを空気に置き換える", "create.gui.schematicannon.option.replaceWithEmpty": "固体ブロックを空気に置き換える",
"create.gui.schematicannon.option.skipMissing": "不足しているブロックをスキップ", "create.gui.schematicannon.option.skipMissing": "不足しているブロックをスキップ",
"create.gui.schematicannon.option.skipTileEntities": "タイルエンティティを保護する", "create.gui.schematicannon.option.skipBlockEntities": "UNLOCALIZED: Protect Block Entities",
"create.gui.schematicannon.slot.gunpowder": "火薬を燃料として概略図砲に入れてください。", "create.gui.schematicannon.slot.gunpowder": "火薬を燃料として概略図砲に入れてください。",
"create.gui.schematicannon.slot.listPrinter": "本をここに入れると概略図の材料チェックリストを印刷します。", "create.gui.schematicannon.slot.listPrinter": "本をここに入れると概略図の材料チェックリストを印刷します。",
"create.gui.schematicannon.slot.schematic": "概略図をここに入れてください。特定の場所に配置されていることを確認してください。", "create.gui.schematicannon.slot.schematic": "概略図をここに入れてください。特定の場所に配置されていることを確認してください。",
"create.gui.schematicannon.option.skipMissing.description": "配置に必要なブロックを見つけられない場合、次の場所に進みます。", "create.gui.schematicannon.option.skipMissing.description": "配置に必要なブロックを見つけられない場合、次の場所に進みます。",
"create.gui.schematicannon.option.skipTileEntities.description": "チェストなどのデータ保持ブロックの置き換えによる消滅を回避します。", "create.gui.schematicannon.option.skipBlockEntities.description": "UNLOCALIZED: The cannon will avoid replacing data holding blocks such as Chests.",
"create.gui.schematicannon.option.dontReplaceSolid.description": "その作業範囲の固体ブロックを置き換えることはなく、非固体ブロックと空気のみを置き換えます。", "create.gui.schematicannon.option.dontReplaceSolid.description": "その作業範囲の固体ブロックを置き換えることはなく、非固体ブロックと空気のみを置き換えます。",
"create.gui.schematicannon.option.replaceWithSolid.description": "固体ブロックを設置する場合にのみ、その位置の固体ブロックを置き換えます。", "create.gui.schematicannon.option.replaceWithSolid.description": "固体ブロックを設置する場合にのみ、その位置の固体ブロックを置き換えます。",
"create.gui.schematicannon.option.replaceWithAny.description": "任意のブロックを設置する場合に、その位置の固体ブロックを置き換えます。", "create.gui.schematicannon.option.replaceWithAny.description": "任意のブロックを設置する場合に、その位置の固体ブロックを置き換えます。",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 48", "_": "Missing Localizations: 50",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -1199,12 +1199,12 @@
"create.gui.schematicannon.option.replaceWithAny": "온전한 블록을 아무 재료로 대체함", "create.gui.schematicannon.option.replaceWithAny": "온전한 블록을 아무 재료로 대체함",
"create.gui.schematicannon.option.replaceWithEmpty": "온전한 블록을 공기로 채움", "create.gui.schematicannon.option.replaceWithEmpty": "온전한 블록을 공기로 채움",
"create.gui.schematicannon.option.skipMissing": "부족한 블록을 무시하고 진행", "create.gui.schematicannon.option.skipMissing": "부족한 블록을 무시하고 진행",
"create.gui.schematicannon.option.skipTileEntities": "블록 엔티티 보호", "create.gui.schematicannon.option.skipBlockEntities": "UNLOCALIZED: Protect Block Entities",
"create.gui.schematicannon.slot.gunpowder": "화약을 넣어 대포 연료를 채우세요", "create.gui.schematicannon.slot.gunpowder": "화약을 넣어 대포 연료를 채우세요",
"create.gui.schematicannon.slot.listPrinter": "책을 넣어 건축 재료 체크리스트를 인쇄하세요", "create.gui.schematicannon.slot.listPrinter": "책을 넣어 건축 재료 체크리스트를 인쇄하세요",
"create.gui.schematicannon.slot.schematic": "여기에 설계도를 넣으세요. 건설 구역이 설정되어 있어야 합니다.", "create.gui.schematicannon.slot.schematic": "여기에 설계도를 넣으세요. 건설 구역이 설정되어 있어야 합니다.",
"create.gui.schematicannon.option.skipMissing.description": "만약 대포가 설치에 필요한 블록을 찾지 못할 경우,건너뛰고 다음 블록 설치를 진행합니다.", "create.gui.schematicannon.option.skipMissing.description": "만약 대포가 설치에 필요한 블록을 찾지 못할 경우,건너뛰고 다음 블록 설치를 진행합니다.",
"create.gui.schematicannon.option.skipTileEntities.description": "대포가 상자, 화로같이 데이터가 담긴 블록을 설치하지 않습니다.", "create.gui.schematicannon.option.skipBlockEntities.description": "UNLOCALIZED: The cannon will avoid replacing data holding blocks such as Chests.",
"create.gui.schematicannon.option.dontReplaceSolid.description": "대포가 작업구역의 온전한 블록을 대체하지 않습니다.", "create.gui.schematicannon.option.dontReplaceSolid.description": "대포가 작업구역의 온전한 블록을 대체하지 않습니다.",
"create.gui.schematicannon.option.replaceWithSolid.description": "대포가 작업구역의 온전한 블록을 대포가 가진 재료로 대체합니다.", "create.gui.schematicannon.option.replaceWithSolid.description": "대포가 작업구역의 온전한 블록을 대포가 가진 재료로 대체합니다.",
"create.gui.schematicannon.option.replaceWithAny.description": "대포가 작업구역의 온전한 블록을 대포가 가진 어떠한 재료로든 대체합니다.", "create.gui.schematicannon.option.replaceWithAny.description": "대포가 작업구역의 온전한 블록을 대포가 가진 어떠한 재료로든 대체합니다.",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 1830", "_": "Missing Localizations: 1832",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -1199,12 +1199,12 @@
"create.gui.schematicannon.option.replaceWithAny": "Vervang vast met alles", "create.gui.schematicannon.option.replaceWithAny": "Vervang vast met alles",
"create.gui.schematicannon.option.replaceWithEmpty": "Vervang vast met leeg", "create.gui.schematicannon.option.replaceWithEmpty": "Vervang vast met leeg",
"create.gui.schematicannon.option.skipMissing": "Sla missende blokken over", "create.gui.schematicannon.option.skipMissing": "Sla missende blokken over",
"create.gui.schematicannon.option.skipTileEntities": "Bescherm Tile Entities", "create.gui.schematicannon.option.skipBlockEntities": "UNLOCALIZED: Protect Block Entities",
"create.gui.schematicannon.slot.gunpowder": "UNLOCALIZED: Add gunpowder to fuel the cannon", "create.gui.schematicannon.slot.gunpowder": "UNLOCALIZED: Add gunpowder to fuel the cannon",
"create.gui.schematicannon.slot.listPrinter": "UNLOCALIZED: Place books here to print a Checklist for your Schematic", "create.gui.schematicannon.slot.listPrinter": "UNLOCALIZED: Place books here to print a Checklist for your Schematic",
"create.gui.schematicannon.slot.schematic": "UNLOCALIZED: Add your Schematic here. Make sure it is deployed at a specific location.", "create.gui.schematicannon.slot.schematic": "UNLOCALIZED: Add your Schematic here. Make sure it is deployed at a specific location.",
"create.gui.schematicannon.option.skipMissing.description": "Als het Bouwtekeningkannon niet een geschikt blok kan vinden om te plaatsen gaat hij door naar de volgende positie.", "create.gui.schematicannon.option.skipMissing.description": "Als het Bouwtekeningkannon niet een geschikt blok kan vinden om te plaatsen gaat hij door naar de volgende positie.",
"create.gui.schematicannon.option.skipTileEntities.description": "Het Bouwtekeningkannon probeert blokken met data zoals kisten te vermijden", "create.gui.schematicannon.option.skipBlockEntities.description": "UNLOCALIZED: The cannon will avoid replacing data holding blocks such as Chests.",
"create.gui.schematicannon.option.dontReplaceSolid.description": "Het Bouwtekeningkannon zal nooit vaste blokken in zijn gebied vervangen, alleen niet-vaste blokken en lucht", "create.gui.schematicannon.option.dontReplaceSolid.description": "Het Bouwtekeningkannon zal nooit vaste blokken in zijn gebied vervangen, alleen niet-vaste blokken en lucht",
"create.gui.schematicannon.option.replaceWithSolid.description": "Het Bouwtekeningkannon zal alleen vaste blokken in zijn gebied veranderen als de bouwtekening een vast blok bevat op zijn positie.", "create.gui.schematicannon.option.replaceWithSolid.description": "Het Bouwtekeningkannon zal alleen vaste blokken in zijn gebied veranderen als de bouwtekening een vast blok bevat op zijn positie.",
"create.gui.schematicannon.option.replaceWithAny.description": "Het Bouwtekeningkannon zal vaste blokken in zijn gebied vervangen als de bouwtekening een blok op bevat op zijn positie.", "create.gui.schematicannon.option.replaceWithAny.description": "Het Bouwtekeningkannon zal vaste blokken in zijn gebied vervangen als de bouwtekening een blok op bevat op zijn positie.",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 2359", "_": "Missing Localizations: 2360",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -1199,12 +1199,12 @@
"create.gui.schematicannon.option.replaceWithAny": "UNLOCALIZED: Replace Solid with Any", "create.gui.schematicannon.option.replaceWithAny": "UNLOCALIZED: Replace Solid with Any",
"create.gui.schematicannon.option.replaceWithEmpty": "UNLOCALIZED: Replace Solid with Empty", "create.gui.schematicannon.option.replaceWithEmpty": "UNLOCALIZED: Replace Solid with Empty",
"create.gui.schematicannon.option.skipMissing": "UNLOCALIZED: Skip missing Blocks", "create.gui.schematicannon.option.skipMissing": "UNLOCALIZED: Skip missing Blocks",
"create.gui.schematicannon.option.skipTileEntities": "UNLOCALIZED: Protect Tile Entities", "create.gui.schematicannon.option.skipBlockEntities": "UNLOCALIZED: Protect Block Entities",
"create.gui.schematicannon.slot.gunpowder": "UNLOCALIZED: Add gunpowder to fuel the cannon", "create.gui.schematicannon.slot.gunpowder": "UNLOCALIZED: Add gunpowder to fuel the cannon",
"create.gui.schematicannon.slot.listPrinter": "UNLOCALIZED: Place books here to print a Checklist for your Schematic", "create.gui.schematicannon.slot.listPrinter": "UNLOCALIZED: Place books here to print a Checklist for your Schematic",
"create.gui.schematicannon.slot.schematic": "UNLOCALIZED: Add your Schematic here. Make sure it is deployed at a specific location.", "create.gui.schematicannon.slot.schematic": "UNLOCALIZED: Add your Schematic here. Make sure it is deployed at a specific location.",
"create.gui.schematicannon.option.skipMissing.description": "UNLOCALIZED: If the cannon cannot find a required Block for placement, it will continue at the next Location.", "create.gui.schematicannon.option.skipMissing.description": "UNLOCALIZED: If the cannon cannot find a required Block for placement, it will continue at the next Location.",
"create.gui.schematicannon.option.skipTileEntities.description": "Kanonen vil unngå å erstatte blokker som inneholder data, slik som kister.", "create.gui.schematicannon.option.skipBlockEntities.description": "UNLOCALIZED: The cannon will avoid replacing data holding blocks such as Chests.",
"create.gui.schematicannon.option.dontReplaceSolid.description": "Kanonen vil aldri erstatte solide blokker i arbeidsområdet, bare ikke usolide blokker og luft.", "create.gui.schematicannon.option.dontReplaceSolid.description": "Kanonen vil aldri erstatte solide blokker i arbeidsområdet, bare ikke usolide blokker og luft.",
"create.gui.schematicannon.option.replaceWithSolid.description": "Kanonen vil bare erstatte solide blokker i arbeidsområdet om byggeplanen inneholder en solid blokk på samme posisjon.", "create.gui.schematicannon.option.replaceWithSolid.description": "Kanonen vil bare erstatte solide blokker i arbeidsområdet om byggeplanen inneholder en solid blokk på samme posisjon.",
"create.gui.schematicannon.option.replaceWithAny.description": "Kanonen vil erstatte solide blokker i arbeidsområdet hvis bygeplanen inneholder uansett type blokk på samme posisjon.", "create.gui.schematicannon.option.replaceWithAny.description": "Kanonen vil erstatte solide blokker i arbeidsområdet hvis bygeplanen inneholder uansett type blokk på samme posisjon.",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 49", "_": "Missing Localizations: 51",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -1199,12 +1199,12 @@
"create.gui.schematicannon.option.replaceWithAny": "Zastępuj stałe dowolnymi", "create.gui.schematicannon.option.replaceWithAny": "Zastępuj stałe dowolnymi",
"create.gui.schematicannon.option.replaceWithEmpty": "Zastępuj stałe pustymi", "create.gui.schematicannon.option.replaceWithEmpty": "Zastępuj stałe pustymi",
"create.gui.schematicannon.option.skipMissing": "Pomijaj brakujące bloki", "create.gui.schematicannon.option.skipMissing": "Pomijaj brakujące bloki",
"create.gui.schematicannon.option.skipTileEntities": "Chroń byty bloków", "create.gui.schematicannon.option.skipBlockEntities": "UNLOCALIZED: Protect Block Entities",
"create.gui.schematicannon.slot.gunpowder": "Dodaj prochu, aby załadować armatę", "create.gui.schematicannon.slot.gunpowder": "Dodaj prochu, aby załadować armatę",
"create.gui.schematicannon.slot.listPrinter": "Daj tu książki, aby wydrukować listę", "create.gui.schematicannon.slot.listPrinter": "Daj tu książki, aby wydrukować listę",
"create.gui.schematicannon.slot.schematic": "Daj tu swój schemat. Upewnij się, że jest postawiony w odpowiednim miejscu.", "create.gui.schematicannon.slot.schematic": "Daj tu swój schemat. Upewnij się, że jest postawiony w odpowiednim miejscu.",
"create.gui.schematicannon.option.skipMissing.description": "Jeśli armata nie znajdzie wymaganego bloku, przejdzie w następne miejsce", "create.gui.schematicannon.option.skipMissing.description": "Jeśli armata nie znajdzie wymaganego bloku, przejdzie w następne miejsce",
"create.gui.schematicannon.option.skipTileEntities.description": "Armata będzie unikać zastępowania bloków przechowujących dane, takich jak skrzynie.", "create.gui.schematicannon.option.skipBlockEntities.description": "UNLOCALIZED: The cannon will avoid replacing data holding blocks such as Chests.",
"create.gui.schematicannon.option.dontReplaceSolid.description": "Armata nigdy nie będzie zastępować jakichkolwiek stałych bloków, jedynie nie-stałe i powietrze.", "create.gui.schematicannon.option.dontReplaceSolid.description": "Armata nigdy nie będzie zastępować jakichkolwiek stałych bloków, jedynie nie-stałe i powietrze.",
"create.gui.schematicannon.option.replaceWithSolid.description": "Armata będzie zastępować stałe bloki jedynie, jeśli schemat zawiera stały blok w tym miejscu.", "create.gui.schematicannon.option.replaceWithSolid.description": "Armata będzie zastępować stałe bloki jedynie, jeśli schemat zawiera stały blok w tym miejscu.",
"create.gui.schematicannon.option.replaceWithAny.description": "Armata będzie zastępować stałe bloki jedynie, jeśli schemat zawiera dowolny blok w tym miejscu.", "create.gui.schematicannon.option.replaceWithAny.description": "Armata będzie zastępować stałe bloki jedynie, jeśli schemat zawiera dowolny blok w tym miejscu.",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 45", "_": "Missing Localizations: 47",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -1199,12 +1199,12 @@
"create.gui.schematicannon.option.replaceWithAny": "Substituir Sólidos com Qualquer", "create.gui.schematicannon.option.replaceWithAny": "Substituir Sólidos com Qualquer",
"create.gui.schematicannon.option.replaceWithEmpty": "Substituir Sólidos com Vazio", "create.gui.schematicannon.option.replaceWithEmpty": "Substituir Sólidos com Vazio",
"create.gui.schematicannon.option.skipMissing": "Pulando Blocos faltantes", "create.gui.schematicannon.option.skipMissing": "Pulando Blocos faltantes",
"create.gui.schematicannon.option.skipTileEntities": "Proteger tile entities", "create.gui.schematicannon.option.skipBlockEntities": "UNLOCALIZED: Protect Block Entities",
"create.gui.schematicannon.slot.gunpowder": "Adicionar pólvora para carregar o canhão", "create.gui.schematicannon.slot.gunpowder": "Adicionar pólvora para carregar o canhão",
"create.gui.schematicannon.slot.listPrinter": "Coloque livros aqui para imprimir uma lista para o seu esquema", "create.gui.schematicannon.slot.listPrinter": "Coloque livros aqui para imprimir uma lista para o seu esquema",
"create.gui.schematicannon.slot.schematic": "Adicione o seu esquema aqui. Tenha certeza que ele está colocado em um lugar especifico.", "create.gui.schematicannon.slot.schematic": "Adicione o seu esquema aqui. Tenha certeza que ele está colocado em um lugar especifico.",
"create.gui.schematicannon.option.skipMissing.description": "Se o Canhão de esquema não encontrar o Bloco para colocar, ele irá continuar para a próxima. Posição.", "create.gui.schematicannon.option.skipMissing.description": "Se o Canhão de esquema não encontrar o Bloco para colocar, ele irá continuar para a próxima. Posição.",
"create.gui.schematicannon.option.skipTileEntities.description": "O Canhão de esquema vai evitar substituir blocos que contêm dados como Baús.", "create.gui.schematicannon.option.skipBlockEntities.description": "UNLOCALIZED: The cannon will avoid replacing data holding blocks such as Chests.",
"create.gui.schematicannon.option.dontReplaceSolid.description": "O Canhão de esquema nunca irá substituir Blocos sólidos na área em trabalho, apenas não-Sólidos e Ar.", "create.gui.schematicannon.option.dontReplaceSolid.description": "O Canhão de esquema nunca irá substituir Blocos sólidos na área em trabalho, apenas não-Sólidos e Ar.",
"create.gui.schematicannon.option.replaceWithSolid.description": "O Canhão de esquema irá apenas substituir Blocos sólidos na área de trabalho, se o Esquema conter um bloco Sólido naquela posição.", "create.gui.schematicannon.option.replaceWithSolid.description": "O Canhão de esquema irá apenas substituir Blocos sólidos na área de trabalho, se o Esquema conter um bloco Sólido naquela posição.",
"create.gui.schematicannon.option.replaceWithAny.description": "O Canhão de esquema irá substituir Blocos sólidos na área de trabalho, se o Esquema conter qualquer Bloco naquela posição.", "create.gui.schematicannon.option.replaceWithAny.description": "O Canhão de esquema irá substituir Blocos sólidos na área de trabalho, se o Esquema conter qualquer Bloco naquela posição.",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 2252", "_": "Missing Localizations: 2254",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -1199,12 +1199,12 @@
"create.gui.schematicannon.option.replaceWithAny": "Substituir Sólidos com Qualquer", "create.gui.schematicannon.option.replaceWithAny": "Substituir Sólidos com Qualquer",
"create.gui.schematicannon.option.replaceWithEmpty": "Substituir Sólidos com Vazio", "create.gui.schematicannon.option.replaceWithEmpty": "Substituir Sólidos com Vazio",
"create.gui.schematicannon.option.skipMissing": "Pulando Blocos faltantes", "create.gui.schematicannon.option.skipMissing": "Pulando Blocos faltantes",
"create.gui.schematicannon.option.skipTileEntities": "Proteger Entidades Entalhadas", "create.gui.schematicannon.option.skipBlockEntities": "UNLOCALIZED: Protect Block Entities",
"create.gui.schematicannon.slot.gunpowder": "UNLOCALIZED: Add gunpowder to fuel the cannon", "create.gui.schematicannon.slot.gunpowder": "UNLOCALIZED: Add gunpowder to fuel the cannon",
"create.gui.schematicannon.slot.listPrinter": "UNLOCALIZED: Place books here to print a Checklist for your Schematic", "create.gui.schematicannon.slot.listPrinter": "UNLOCALIZED: Place books here to print a Checklist for your Schematic",
"create.gui.schematicannon.slot.schematic": "UNLOCALIZED: Add your Schematic here. Make sure it is deployed at a specific location.", "create.gui.schematicannon.slot.schematic": "UNLOCALIZED: Add your Schematic here. Make sure it is deployed at a specific location.",
"create.gui.schematicannon.option.skipMissing.description": "Se o Canhão de esquema não encontrar o Bloco para colocar, ele irá continuar para a próx. Posição.", "create.gui.schematicannon.option.skipMissing.description": "Se o Canhão de esquema não encontrar o Bloco para colocar, ele irá continuar para a próx. Posição.",
"create.gui.schematicannon.option.skipTileEntities.description": "O Canhão de esquema vai evitar substituir blocos que contêm dados como Baus.", "create.gui.schematicannon.option.skipBlockEntities.description": "UNLOCALIZED: The cannon will avoid replacing data holding blocks such as Chests.",
"create.gui.schematicannon.option.dontReplaceSolid.description": "O Canhão de esquema nunca irá substituir Blocos sólidos na área em trabalho, apenas não-Sólidos e Ar.", "create.gui.schematicannon.option.dontReplaceSolid.description": "O Canhão de esquema nunca irá substituir Blocos sólidos na área em trabalho, apenas não-Sólidos e Ar.",
"create.gui.schematicannon.option.replaceWithSolid.description": "O Canhão de esquema irá apenas substituir Blocos sólidos na área de trabalho, se o Esquema conter um bloco Sólido naquela posição.", "create.gui.schematicannon.option.replaceWithSolid.description": "O Canhão de esquema irá apenas substituir Blocos sólidos na área de trabalho, se o Esquema conter um bloco Sólido naquela posição.",
"create.gui.schematicannon.option.replaceWithAny.description": "O Canhão de esquema irá substituir Blocos sólidos na área de trabalho, se o Esquema conter qualquer Bloco naquela posição.", "create.gui.schematicannon.option.replaceWithAny.description": "O Canhão de esquema irá substituir Blocos sólidos na área de trabalho, se o Esquema conter qualquer Bloco naquela posição.",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 739", "_": "Missing Localizations: 741",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -1199,12 +1199,12 @@
"create.gui.schematicannon.option.replaceWithAny": "Înlocuiește Solid cu Orice", "create.gui.schematicannon.option.replaceWithAny": "Înlocuiește Solid cu Orice",
"create.gui.schematicannon.option.replaceWithEmpty": "Înlocuiește Solid cu Gol", "create.gui.schematicannon.option.replaceWithEmpty": "Înlocuiește Solid cu Gol",
"create.gui.schematicannon.option.skipMissing": "Ocolește Blocuri lipsă", "create.gui.schematicannon.option.skipMissing": "Ocolește Blocuri lipsă",
"create.gui.schematicannon.option.skipTileEntities": "Protejează Entități", "create.gui.schematicannon.option.skipBlockEntities": "UNLOCALIZED: Protect Block Entities",
"create.gui.schematicannon.slot.gunpowder": "Adaugă praf de pușcă pentru a alimenta tunul", "create.gui.schematicannon.slot.gunpowder": "Adaugă praf de pușcă pentru a alimenta tunul",
"create.gui.schematicannon.slot.listPrinter": "Plasează cărți aici pentru a imprima o listă de verificare pentru Schema ta", "create.gui.schematicannon.slot.listPrinter": "Plasează cărți aici pentru a imprima o listă de verificare pentru Schema ta",
"create.gui.schematicannon.slot.schematic": "Adaugă-ti Schema aici. Asigură-te că este instalată la o locație specifică.", "create.gui.schematicannon.slot.schematic": "Adaugă-ti Schema aici. Asigură-te că este instalată la o locație specifică.",
"create.gui.schematicannon.option.skipMissing.description": "Dacă tunul nu poate găsi un bloc necesar pentru plasare, va continua la locația următoare.", "create.gui.schematicannon.option.skipMissing.description": "Dacă tunul nu poate găsi un bloc necesar pentru plasare, va continua la locația următoare.",
"create.gui.schematicannon.option.skipTileEntities.description": "Tunul va evita să înlocuiască blocuri care țin date, cum ar fi Cuferele..", "create.gui.schematicannon.option.skipBlockEntities.description": "UNLOCALIZED: The cannon will avoid replacing data holding blocks such as Chests.",
"create.gui.schematicannon.option.dontReplaceSolid.description": "Tunul nu va înlocui niciodată orice bloc Solid în zona lui de locru, doar non-Solid și Aer.", "create.gui.schematicannon.option.dontReplaceSolid.description": "Tunul nu va înlocui niciodată orice bloc Solid în zona lui de locru, doar non-Solid și Aer.",
"create.gui.schematicannon.option.replaceWithSolid.description": "Tunul va înlocui daor blocuri Solide în zona lui de lucru dacă Schema conține un Bloc solid la acea Locație.", "create.gui.schematicannon.option.replaceWithSolid.description": "Tunul va înlocui daor blocuri Solide în zona lui de lucru dacă Schema conține un Bloc solid la acea Locație.",
"create.gui.schematicannon.option.replaceWithAny.description": "Tunul va înlocui blocuri Solide în zona lui de lucru dacă Schema conține orice Bloc la acea Locație.", "create.gui.schematicannon.option.replaceWithAny.description": "Tunul va înlocui blocuri Solide în zona lui de lucru dacă Schema conține orice Bloc la acea Locație.",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 45", "_": "Missing Localizations: 47",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -1199,12 +1199,12 @@
"create.gui.schematicannon.option.replaceWithAny": "Заменять твёрдые блоки любыми блоками", "create.gui.schematicannon.option.replaceWithAny": "Заменять твёрдые блоки любыми блоками",
"create.gui.schematicannon.option.replaceWithEmpty": "Заменять твёрдые блоки воздухом", "create.gui.schematicannon.option.replaceWithEmpty": "Заменять твёрдые блоки воздухом",
"create.gui.schematicannon.option.skipMissing": "Пропускать отсутствующие блоки", "create.gui.schematicannon.option.skipMissing": "Пропускать отсутствующие блоки",
"create.gui.schematicannon.option.skipTileEntities": "Защитить имущество", "create.gui.schematicannon.option.skipBlockEntities": "UNLOCALIZED: Protect Block Entities",
"create.gui.schematicannon.slot.gunpowder": "Добавьте порох, чтобы заправить пушку", "create.gui.schematicannon.slot.gunpowder": "Добавьте порох, чтобы заправить пушку",
"create.gui.schematicannon.slot.listPrinter": "Положите книгу, чтобы создать список предметов для схематики", "create.gui.schematicannon.slot.listPrinter": "Положите книгу, чтобы создать список предметов для схематики",
"create.gui.schematicannon.slot.schematic": "Положите свою схематику здесь. Убедитесь что она размещена в правильном месте", "create.gui.schematicannon.slot.schematic": "Положите свою схематику здесь. Убедитесь что она размещена в правильном месте",
"create.gui.schematicannon.option.skipMissing.description": "Если пушка не сможет найти требуемый блок, то она перейдёт к следующему.", "create.gui.schematicannon.option.skipMissing.description": "Если пушка не сможет найти требуемый блок, то она перейдёт к следующему.",
"create.gui.schematicannon.option.skipTileEntities.description": "Пушка не будет заменять блоки-хранилища, такие как сундуки.", "create.gui.schematicannon.option.skipBlockEntities.description": "UNLOCALIZED: The cannon will avoid replacing data holding blocks such as Chests.",
"create.gui.schematicannon.option.dontReplaceSolid.description": "Пушка не будет заменять твёрдые блоки, только нетвёрдые и воздух.", "create.gui.schematicannon.option.dontReplaceSolid.description": "Пушка не будет заменять твёрдые блоки, только нетвёрдые и воздух.",
"create.gui.schematicannon.option.replaceWithSolid.description": "Пушка будет заменять твёрдые блоки только в случае, если в схеме в этом месте расположен другой твёрдый блок.", "create.gui.schematicannon.option.replaceWithSolid.description": "Пушка будет заменять твёрдые блоки только в случае, если в схеме в этом месте расположен другой твёрдый блок.",
"create.gui.schematicannon.option.replaceWithAny.description": "Пушка будет заменять любые твёрдые блоки, кроме замены на воздух.", "create.gui.schematicannon.option.replaceWithAny.description": "Пушка будет заменять любые твёрдые блоки, кроме замены на воздух.",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 1248", "_": "Missing Localizations: 1250",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -1199,12 +1199,12 @@
"create.gui.schematicannon.option.replaceWithAny": "Ersätt Fast med Valfri", "create.gui.schematicannon.option.replaceWithAny": "Ersätt Fast med Valfri",
"create.gui.schematicannon.option.replaceWithEmpty": "Ersätt Fast med Tom", "create.gui.schematicannon.option.replaceWithEmpty": "Ersätt Fast med Tom",
"create.gui.schematicannon.option.skipMissing": "Hoppa över saknande Block", "create.gui.schematicannon.option.skipMissing": "Hoppa över saknande Block",
"create.gui.schematicannon.option.skipTileEntities": "Skydda Block Enheter", "create.gui.schematicannon.option.skipBlockEntities": "UNLOCALIZED: Protect Block Entities",
"create.gui.schematicannon.slot.gunpowder": "Tillsätt krut för att driva kanonen", "create.gui.schematicannon.slot.gunpowder": "Tillsätt krut för att driva kanonen",
"create.gui.schematicannon.slot.listPrinter": "Placera böcker här för att skriva ut en Checklista för din Schematic", "create.gui.schematicannon.slot.listPrinter": "Placera böcker här för att skriva ut en Checklista för din Schematic",
"create.gui.schematicannon.slot.schematic": "Lägg till din Schematic här. Dubbelkolla så att den blir utplacerat på en specifik plats.", "create.gui.schematicannon.slot.schematic": "Lägg till din Schematic här. Dubbelkolla så att den blir utplacerat på en specifik plats.",
"create.gui.schematicannon.option.skipMissing.description": "Om kanonen ej kan hitta ett nödvändigt block för placering, kommer den att fortsätta på nästa plats.", "create.gui.schematicannon.option.skipMissing.description": "Om kanonen ej kan hitta ett nödvändigt block för placering, kommer den att fortsätta på nästa plats.",
"create.gui.schematicannon.option.skipTileEntities.description": "Kanonen kommer undvika att ersätta informationsinnehavande block såsom kistor.", "create.gui.schematicannon.option.skipBlockEntities.description": "UNLOCALIZED: The cannon will avoid replacing data holding blocks such as Chests.",
"create.gui.schematicannon.option.dontReplaceSolid.description": "Kanonen kommer aldrig att ersätta fasta block i dess arbetsområde, endast ej fasta block och luft.", "create.gui.schematicannon.option.dontReplaceSolid.description": "Kanonen kommer aldrig att ersätta fasta block i dess arbetsområde, endast ej fasta block och luft.",
"create.gui.schematicannon.option.replaceWithSolid.description": "Kanonen kommer bara ersätta fasta block i dess arbetsområde om Schematic innehåller ett fast block på platsen.", "create.gui.schematicannon.option.replaceWithSolid.description": "Kanonen kommer bara ersätta fasta block i dess arbetsområde om Schematic innehåller ett fast block på platsen.",
"create.gui.schematicannon.option.replaceWithAny.description": "Kanonen kommer att ersätta fasta block i dess arbetsområde om Schematic innehåller något block på platsen.", "create.gui.schematicannon.option.replaceWithAny.description": "Kanonen kommer att ersätta fasta block i dess arbetsområde om Schematic innehåller något block på platsen.",

View file

@ -1199,12 +1199,12 @@
"create.gui.schematicannon.option.replaceWithAny": "UNLOCALIZED: Replace Solid with Any", "create.gui.schematicannon.option.replaceWithAny": "UNLOCALIZED: Replace Solid with Any",
"create.gui.schematicannon.option.replaceWithEmpty": "UNLOCALIZED: Replace Solid with Empty", "create.gui.schematicannon.option.replaceWithEmpty": "UNLOCALIZED: Replace Solid with Empty",
"create.gui.schematicannon.option.skipMissing": "UNLOCALIZED: Skip missing Blocks", "create.gui.schematicannon.option.skipMissing": "UNLOCALIZED: Skip missing Blocks",
"create.gui.schematicannon.option.skipTileEntities": "UNLOCALIZED: Protect Tile Entities", "create.gui.schematicannon.option.skipBlockEntities": "UNLOCALIZED: Protect Block Entities",
"create.gui.schematicannon.slot.gunpowder": "UNLOCALIZED: Add gunpowder to fuel the cannon", "create.gui.schematicannon.slot.gunpowder": "UNLOCALIZED: Add gunpowder to fuel the cannon",
"create.gui.schematicannon.slot.listPrinter": "UNLOCALIZED: Place books here to print a Checklist for your Schematic", "create.gui.schematicannon.slot.listPrinter": "UNLOCALIZED: Place books here to print a Checklist for your Schematic",
"create.gui.schematicannon.slot.schematic": "UNLOCALIZED: Add your Schematic here. Make sure it is deployed at a specific location.", "create.gui.schematicannon.slot.schematic": "UNLOCALIZED: Add your Schematic here. Make sure it is deployed at a specific location.",
"create.gui.schematicannon.option.skipMissing.description": "UNLOCALIZED: If the cannon cannot find a required Block for placement, it will continue at the next Location.", "create.gui.schematicannon.option.skipMissing.description": "UNLOCALIZED: If the cannon cannot find a required Block for placement, it will continue at the next Location.",
"create.gui.schematicannon.option.skipTileEntities.description": "UNLOCALIZED: The cannon will avoid replacing data holding blocks such as Chests.", "create.gui.schematicannon.option.skipBlockEntities.description": "UNLOCALIZED: The cannon will avoid replacing data holding blocks such as Chests.",
"create.gui.schematicannon.option.dontReplaceSolid.description": "UNLOCALIZED: The cannon will never replace any Solid blocks in its working area, only non-Solid and Air.", "create.gui.schematicannon.option.dontReplaceSolid.description": "UNLOCALIZED: The cannon will never replace any Solid blocks in its working area, only non-Solid and Air.",
"create.gui.schematicannon.option.replaceWithSolid.description": "UNLOCALIZED: The cannon will only replace Solid blocks in its working area if the Schematic contains a solid Block at the Location.", "create.gui.schematicannon.option.replaceWithSolid.description": "UNLOCALIZED: The cannon will only replace Solid blocks in its working area if the Schematic contains a solid Block at the Location.",
"create.gui.schematicannon.option.replaceWithAny.description": "UNLOCALIZED: The cannon will replace Solid blocks in its working area if the Schematic contains any Block at the Location.", "create.gui.schematicannon.option.replaceWithAny.description": "UNLOCALIZED: The cannon will replace Solid blocks in its working area if the Schematic contains any Block at the Location.",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 213", "_": "Missing Localizations: 215",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -1199,12 +1199,12 @@
"create.gui.schematicannon.option.replaceWithAny": "Замінювати суцільні блоки будь-якими блоками", "create.gui.schematicannon.option.replaceWithAny": "Замінювати суцільні блоки будь-якими блоками",
"create.gui.schematicannon.option.replaceWithEmpty": "Замінювати суцільні блоки повітрям", "create.gui.schematicannon.option.replaceWithEmpty": "Замінювати суцільні блоки повітрям",
"create.gui.schematicannon.option.skipMissing": "Пропускати відсутні блоки", "create.gui.schematicannon.option.skipMissing": "Пропускати відсутні блоки",
"create.gui.schematicannon.option.skipTileEntities": "Захищати блоки-сутності", "create.gui.schematicannon.option.skipBlockEntities": "UNLOCALIZED: Protect Block Entities",
"create.gui.schematicannon.slot.gunpowder": "Додайте порох, щоб заправити гармату", "create.gui.schematicannon.slot.gunpowder": "Додайте порох, щоб заправити гармату",
"create.gui.schematicannon.slot.listPrinter": "Покладіть книгу, щоб створити список предметів для схематики", "create.gui.schematicannon.slot.listPrinter": "Покладіть книгу, щоб створити список предметів для схематики",
"create.gui.schematicannon.slot.schematic": "Покладіть вашу схему сюди. Переконайтеся, що схематика розташована у конкретному місці.", "create.gui.schematicannon.slot.schematic": "Покладіть вашу схему сюди. Переконайтеся, що схематика розташована у конкретному місці.",
"create.gui.schematicannon.option.skipMissing.description": "Якщо гармата не може знайти необхідний блок, вона будуватиме в наступному місці.", "create.gui.schematicannon.option.skipMissing.description": "Якщо гармата не може знайти необхідний блок, вона будуватиме в наступному місці.",
"create.gui.schematicannon.option.skipTileEntities.description": "Гармата не замінюватиме блоки, які зберігають данні, такі як скрині.", "create.gui.schematicannon.option.skipBlockEntities.description": "UNLOCALIZED: The cannon will avoid replacing data holding blocks such as Chests.",
"create.gui.schematicannon.option.dontReplaceSolid.description": "Гармата ніколи не замінюватиме суцільні блоки, тільки замінюватиме несуцільні блоки та повітря.", "create.gui.schematicannon.option.dontReplaceSolid.description": "Гармата ніколи не замінюватиме суцільні блоки, тільки замінюватиме несуцільні блоки та повітря.",
"create.gui.schematicannon.option.replaceWithSolid.description": "Гармата замінюватиме суцільні блоки лише у випадку, якщо у схемі в цьому місці розташований суцільний блок.", "create.gui.schematicannon.option.replaceWithSolid.description": "Гармата замінюватиме суцільні блоки лише у випадку, якщо у схемі в цьому місці розташований суцільний блок.",
"create.gui.schematicannon.option.replaceWithAny.description": "Гармата замінюватиме суцільні блоки у випадку, якщо у схемі в цьому місці розташований будь-який блок.", "create.gui.schematicannon.option.replaceWithAny.description": "Гармата замінюватиме суцільні блоки у випадку, якщо у схемі в цьому місці розташований будь-який блок.",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 48", "_": "Missing Localizations: 50",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -1199,12 +1199,12 @@
"create.gui.schematicannon.option.replaceWithAny": "用任何方块替换工作区域内的方块", "create.gui.schematicannon.option.replaceWithAny": "用任何方块替换工作区域内的方块",
"create.gui.schematicannon.option.replaceWithEmpty": "用空气替换工作区域内的方块", "create.gui.schematicannon.option.replaceWithEmpty": "用空气替换工作区域内的方块",
"create.gui.schematicannon.option.skipMissing": "跳过缺少的方块", "create.gui.schematicannon.option.skipMissing": "跳过缺少的方块",
"create.gui.schematicannon.option.skipTileEntities": "保护存储方块", "create.gui.schematicannon.option.skipBlockEntities": "UNLOCALIZED: Protect Block Entities",
"create.gui.schematicannon.slot.gunpowder": "向蓝图加农炮添加火药以提供动力", "create.gui.schematicannon.slot.gunpowder": "向蓝图加农炮添加火药以提供动力",
"create.gui.schematicannon.slot.listPrinter": "在此处放置书以打印蓝图所需的材料清单", "create.gui.schematicannon.slot.listPrinter": "在此处放置书以打印蓝图所需的材料清单",
"create.gui.schematicannon.slot.schematic": "在此处添加你的蓝图,务必确保其已经被部署在特定位置", "create.gui.schematicannon.slot.schematic": "在此处添加你的蓝图,务必确保其已经被部署在特定位置",
"create.gui.schematicannon.option.skipMissing.description": "如果缺失材料,蓝图加农炮将忽略当前缺失材料并且使用其他已有材料继续工作", "create.gui.schematicannon.option.skipMissing.description": "如果缺失材料,蓝图加农炮将忽略当前缺失材料并且使用其他已有材料继续工作",
"create.gui.schematicannon.option.skipTileEntities.description": "蓝图加农炮将避免替换存储数据的方块,如箱子", "create.gui.schematicannon.option.skipBlockEntities.description": "UNLOCALIZED: The cannon will avoid replacing data holding blocks such as Chests.",
"create.gui.schematicannon.option.dontReplaceSolid.description": "蓝图加农炮将不会替换工作范围内的任何固体方块", "create.gui.schematicannon.option.dontReplaceSolid.description": "蓝图加农炮将不会替换工作范围内的任何固体方块",
"create.gui.schematicannon.option.replaceWithSolid.description": "蓝图加农炮会使用所提供的固体方块来替换工作区域内的其他固体方块", "create.gui.schematicannon.option.replaceWithSolid.description": "蓝图加农炮会使用所提供的固体方块来替换工作区域内的其他固体方块",
"create.gui.schematicannon.option.replaceWithAny.description": "蓝图加农炮会使用任何所提供的方块来替换工作区域内的固体方块", "create.gui.schematicannon.option.replaceWithAny.description": "蓝图加农炮会使用任何所提供的方块来替换工作区域内的固体方块",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 46", "_": "Missing Localizations: 48",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -1199,12 +1199,12 @@
"create.gui.schematicannon.option.replaceWithAny": "用任何方塊替換工作區域內的方塊", "create.gui.schematicannon.option.replaceWithAny": "用任何方塊替換工作區域內的方塊",
"create.gui.schematicannon.option.replaceWithEmpty": "用空氣替換工作區域內的方塊", "create.gui.schematicannon.option.replaceWithEmpty": "用空氣替換工作區域內的方塊",
"create.gui.schematicannon.option.skipMissing": "繞過缺少的方塊", "create.gui.schematicannon.option.skipMissing": "繞過缺少的方塊",
"create.gui.schematicannon.option.skipTileEntities": "保護儲存方塊", "create.gui.schematicannon.option.skipBlockEntities": "UNLOCALIZED: Protect Block Entities",
"create.gui.schematicannon.slot.gunpowder": "向藍圖加農炮裝填火藥以提供動能", "create.gui.schematicannon.slot.gunpowder": "向藍圖加農炮裝填火藥以提供動能",
"create.gui.schematicannon.slot.listPrinter": "在此處放置書以列印藍圖所需的材料清單", "create.gui.schematicannon.slot.listPrinter": "在此處放置書以列印藍圖所需的材料清單",
"create.gui.schematicannon.slot.schematic": "在此處放置你的藍圖,務必確保其已被部署在特定位置", "create.gui.schematicannon.slot.schematic": "在此處放置你的藍圖,務必確保其已被部署在特定位置",
"create.gui.schematicannon.option.skipMissing.description": "如果材料不夠,藍圖大炮將忽略目前不夠的材料並且使用其他已有材料繼續工作", "create.gui.schematicannon.option.skipMissing.description": "如果材料不夠,藍圖大炮將忽略目前不夠的材料並且使用其他已有材料繼續工作",
"create.gui.schematicannon.option.skipTileEntities.description": "藍圖將避免更換儲存方塊,如箱子", "create.gui.schematicannon.option.skipBlockEntities.description": "UNLOCALIZED: The cannon will avoid replacing data holding blocks such as Chests.",
"create.gui.schematicannon.option.dontReplaceSolid.description": "藍圖加農炮將不會替換工作範圍內的任何固體方塊", "create.gui.schematicannon.option.dontReplaceSolid.description": "藍圖加農炮將不會替換工作範圍內的任何固體方塊",
"create.gui.schematicannon.option.replaceWithSolid.description": "藍圖加農炮會使用所提供的固體方塊來替換工作區域內的其他固體方塊", "create.gui.schematicannon.option.replaceWithSolid.description": "藍圖加農炮會使用所提供的固體方塊來替換工作區域內的其他固體方塊",
"create.gui.schematicannon.option.replaceWithAny.description": "藍圖加農炮會使用任何所提供的方塊來替換工作區域內的固體方塊", "create.gui.schematicannon.option.replaceWithAny.description": "藍圖加農炮會使用任何所提供的方塊來替換工作區域內的固體方塊",

View file

@ -111,7 +111,7 @@ public class Create {
AllPaletteBlocks.register(); AllPaletteBlocks.register();
AllMenuTypes.register(); AllMenuTypes.register();
AllEntityTypes.register(); AllEntityTypes.register();
AllTileEntities.register(); AllBlockEntityTypes.register();
AllEnchantments.register(); AllEnchantments.register();
AllRecipeTypes.register(modEventBus); AllRecipeTypes.register(modEventBus);
AllParticleTypes.register(modEventBus); AllParticleTypes.register(modEventBus);

View file

@ -1,6 +1,6 @@
package com.simibubi.create; package com.simibubi.create;
import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer; import com.simibubi.create.content.contraptions.base.KineticBlockEntityRenderer;
import com.simibubi.create.content.contraptions.components.structureMovement.glue.SuperGlueSelectionHandler; import com.simibubi.create.content.contraptions.components.structureMovement.glue.SuperGlueSelectionHandler;
import com.simibubi.create.content.contraptions.components.structureMovement.interaction.controls.TrainHUD; import com.simibubi.create.content.contraptions.components.structureMovement.interaction.controls.TrainHUD;
import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionRenderDispatcher; import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionRenderDispatcher;
@ -76,10 +76,10 @@ public class CreateClient {
} }
public static void clientInit(final FMLClientSetupEvent event) { public static void clientInit(final FMLClientSetupEvent event) {
BUFFER_CACHE.registerCompartment(CachedBufferer.GENERIC_TILE); BUFFER_CACHE.registerCompartment(CachedBufferer.GENERIC_BLOCK);
BUFFER_CACHE.registerCompartment(CachedBufferer.PARTIAL); BUFFER_CACHE.registerCompartment(CachedBufferer.PARTIAL);
BUFFER_CACHE.registerCompartment(CachedBufferer.DIRECTIONAL_PARTIAL); BUFFER_CACHE.registerCompartment(CachedBufferer.DIRECTIONAL_PARTIAL);
BUFFER_CACHE.registerCompartment(KineticTileEntityRenderer.KINETIC_TILE); BUFFER_CACHE.registerCompartment(KineticBlockEntityRenderer.KINETIC_BLOCK);
BUFFER_CACHE.registerCompartment(SBBContraptionManager.CONTRAPTION, 20); BUFFER_CACHE.registerCompartment(SBBContraptionManager.CONTRAPTION, 20);
BUFFER_CACHE.registerCompartment(WorldSectionElement.DOC_WORLD_SECTION, 20); BUFFER_CACHE.registerCompartment(WorldSectionElement.DOC_WORLD_SECTION, 20);

View file

@ -6,7 +6,7 @@ import java.util.function.Consumer;
import com.simibubi.create.Create; import com.simibubi.create.Create;
import com.simibubi.create.compat.tconstruct.SpoutCasting; import com.simibubi.create.compat.tconstruct.SpoutCasting;
import com.simibubi.create.content.contraptions.fluids.actors.SpoutTileEntity; import com.simibubi.create.content.contraptions.fluids.actors.SpoutBlockEntity;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.resources.ResourceLocation; import net.minecraft.resources.ResourceLocation;
@ -43,7 +43,7 @@ public abstract class BlockSpoutingBehaviour {
* @param simulate whether the spout is testing or actually performing this behaviour * @param simulate whether the spout is testing or actually performing this behaviour
* @return amount filled into the block, 0 to idle/cancel * @return amount filled into the block, 0 to idle/cancel
*/ */
public abstract int fillBlock(Level world, BlockPos pos, SpoutTileEntity spout, FluidStack availableFluid, public abstract int fillBlock(Level world, BlockPos pos, SpoutBlockEntity spout, FluidStack availableFluid,
boolean simulate); boolean simulate);
public static void registerDefaults() { public static void registerDefaults() {

View file

@ -13,8 +13,8 @@ import javax.annotation.Nullable;
import org.apache.commons.lang3.tuple.Pair; import org.apache.commons.lang3.tuple.Pair;
import com.simibubi.create.content.contraptions.fluids.tank.CreativeFluidTankTileEntity; import com.simibubi.create.content.contraptions.fluids.tank.CreativeFluidTankBlockEntity;
import com.simibubi.create.foundation.tileEntity.IMultiTileContainer; import com.simibubi.create.foundation.blockEntity.IMultiBlockEntityContainer;
import com.simibubi.create.foundation.utility.Iterate; import com.simibubi.create.foundation.utility.Iterate;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
@ -31,14 +31,14 @@ import net.minecraftforge.items.CapabilityItemHandler;
public class ConnectivityHandler { public class ConnectivityHandler {
public static <T extends BlockEntity & IMultiTileContainer> void formMulti(T be) { public static <T extends BlockEntity & IMultiBlockEntityContainer> void formMulti(T be) {
SearchCache<T> cache = new SearchCache<>(); SearchCache<T> cache = new SearchCache<>();
List<T> frontier = new ArrayList<>(); List<T> frontier = new ArrayList<>();
frontier.add(be); frontier.add(be);
formMulti(be.getType(), be.getLevel(), cache, frontier); formMulti(be.getType(), be.getLevel(), cache, frontier);
} }
private static <T extends BlockEntity & IMultiTileContainer> void formMulti(BlockEntityType<?> type, private static <T extends BlockEntity & IMultiBlockEntityContainer> void formMulti(BlockEntityType<?> type,
BlockGetter level, SearchCache<T> cache, List<T> frontier) { BlockGetter level, SearchCache<T> cache, List<T> frontier) {
PriorityQueue<Pair<Integer, T>> creationQueue = makeCreationQueue(); PriorityQueue<Pair<Integer, T>> creationQueue = makeCreationQueue();
Set<BlockPos> visited = new HashSet<>(); Set<BlockPos> visited = new HashSet<>();
@ -110,7 +110,7 @@ public class ConnectivityHandler {
} }
} }
private static <T extends BlockEntity & IMultiTileContainer> int tryToFormNewMulti(T be, SearchCache<T> cache, private static <T extends BlockEntity & IMultiBlockEntityContainer> int tryToFormNewMulti(T be, SearchCache<T> cache,
boolean simulate) { boolean simulate) {
int bestWidth = 1; int bestWidth = 1;
int bestAmount = -1; int bestAmount = -1;
@ -132,7 +132,7 @@ public class ConnectivityHandler {
return bestAmount; return bestAmount;
splitMultiAndInvalidate(be, cache, false); splitMultiAndInvalidate(be, cache, false);
if (be instanceof IMultiTileContainer.Fluid ifluid && ifluid.hasTank()) if (be instanceof IMultiBlockEntityContainer.Fluid ifluid && ifluid.hasTank())
ifluid.setTankSize(0, bestAmount); ifluid.setTankSize(0, bestAmount);
tryToFormNewMultiOfWidth(be, bestWidth, cache, false); tryToFormNewMultiOfWidth(be, bestWidth, cache, false);
@ -145,7 +145,7 @@ public class ConnectivityHandler {
return bestAmount; return bestAmount;
} }
private static <T extends BlockEntity & IMultiTileContainer> int tryToFormNewMultiOfWidth(T be, int width, private static <T extends BlockEntity & IMultiBlockEntityContainer> int tryToFormNewMultiOfWidth(T be, int width,
SearchCache<T> cache, boolean simulate) { SearchCache<T> cache, boolean simulate) {
int amount = 0; int amount = 0;
int height = 0; int height = 0;
@ -158,7 +158,7 @@ public class ConnectivityHandler {
// optional fluid handling // optional fluid handling
IFluidTank beTank = null; IFluidTank beTank = null;
FluidStack fluid = FluidStack.EMPTY; FluidStack fluid = FluidStack.EMPTY;
if (be instanceof IMultiTileContainer.Fluid ifluid && ifluid.hasTank()) { if (be instanceof IMultiBlockEntityContainer.Fluid ifluid && ifluid.hasTank()) {
beTank = ifluid.getTank(0); beTank = ifluid.getTank(0);
fluid = beTank.getFluid(); fluid = beTank.getFluid();
} }
@ -213,7 +213,7 @@ public class ConnectivityHandler {
break Search; break Search;
} }
} }
if (controller instanceof IMultiTileContainer.Fluid ifluidCon && ifluidCon.hasTank()) { if (controller instanceof IMultiBlockEntityContainer.Fluid ifluidCon && ifluidCon.hasTank()) {
FluidStack otherFluid = ifluidCon.getFluid(0); FluidStack otherFluid = ifluidCon.getFluid(0);
if (!fluid.isEmpty() && !otherFluid.isEmpty() && !fluid.isFluidEqual(otherFluid)) if (!fluid.isEmpty() && !otherFluid.isEmpty() && !fluid.isFluidEqual(otherFluid))
break Search; break Search;
@ -245,17 +245,17 @@ public class ConnectivityHandler {
extraData = be.modifyExtraData(extraData); extraData = be.modifyExtraData(extraData);
if (part instanceof IMultiTileContainer.Fluid ifluidPart && ifluidPart.hasTank()) { if (part instanceof IMultiBlockEntityContainer.Fluid ifluidPart && ifluidPart.hasTank()) {
IFluidTank tankAt = ifluidPart.getTank(0); IFluidTank tankAt = ifluidPart.getTank(0);
FluidStack fluidAt = tankAt.getFluid(); FluidStack fluidAt = tankAt.getFluid();
if (!fluidAt.isEmpty()) { if (!fluidAt.isEmpty()) {
// making this generic would be a rather large mess, unfortunately // making this generic would be a rather large mess, unfortunately
if (beTank != null && fluid.isEmpty() if (beTank != null && fluid.isEmpty()
&& beTank instanceof CreativeFluidTankTileEntity.CreativeSmartFluidTank) { && beTank instanceof CreativeFluidTankBlockEntity.CreativeSmartFluidTank) {
((CreativeFluidTankTileEntity.CreativeSmartFluidTank) beTank) ((CreativeFluidTankBlockEntity.CreativeSmartFluidTank) beTank)
.setContainedFluid(fluidAt); .setContainedFluid(fluidAt);
} }
if (be instanceof IMultiTileContainer.Fluid ifluidBE && ifluidBE.hasTank() if (be instanceof IMultiBlockEntityContainer.Fluid ifluidBE && ifluidBE.hasTank()
&& beTank != null) { && beTank != null) {
beTank.fill(fluidAt, IFluidHandler.FluidAction.EXECUTE); beTank.fill(fluidAt, IFluidHandler.FluidAction.EXECUTE);
} }
@ -278,18 +278,18 @@ public class ConnectivityHandler {
return amount; return amount;
} }
public static <T extends BlockEntity & IMultiTileContainer> void splitMulti(T be) { public static <T extends BlockEntity & IMultiBlockEntityContainer> void splitMulti(T be) {
splitMultiAndInvalidate(be, null, false); splitMultiAndInvalidate(be, null, false);
} }
// tryReconnect helps whenever only a few tanks have been removed // tryReconnect helps whenever only a few tanks have been removed
private static <T extends BlockEntity & IMultiTileContainer> void splitMultiAndInvalidate(T be, private static <T extends BlockEntity & IMultiBlockEntityContainer> void splitMultiAndInvalidate(T be,
@Nullable SearchCache<T> cache, boolean tryReconnect) { @Nullable SearchCache<T> cache, boolean tryReconnect) {
Level level = be.getLevel(); Level level = be.getLevel();
if (level == null) if (level == null)
return; return;
be = be.getControllerTE(); be = be.getControllerBE();
if (be == null) if (be == null)
return; return;
@ -305,7 +305,7 @@ public class ConnectivityHandler {
// fluid handling, if present // fluid handling, if present
FluidStack toDistribute = FluidStack.EMPTY; FluidStack toDistribute = FluidStack.EMPTY;
int maxCapacity = 0; int maxCapacity = 0;
if (be instanceof IMultiTileContainer.Fluid ifluidBE && ifluidBE.hasTank()) { if (be instanceof IMultiBlockEntityContainer.Fluid ifluidBE && ifluidBE.hasTank()) {
toDistribute = ifluidBE.getFluid(0); toDistribute = ifluidBE.getFluid(0);
maxCapacity = ifluidBE.getTankSize(0); maxCapacity = ifluidBE.getTankSize(0);
if (!toDistribute.isEmpty() && !be.isRemoved()) if (!toDistribute.isEmpty() && !be.isRemoved())
@ -330,16 +330,16 @@ public class ConnectivityHandler {
.equals(origin)) .equals(origin))
continue; continue;
T controllerBE = partAt.getControllerTE(); T controllerBE = partAt.getControllerBE();
partAt.setExtraData((controllerBE == null ? null : controllerBE.getExtraData())); partAt.setExtraData((controllerBE == null ? null : controllerBE.getExtraData()));
partAt.removeController(true); partAt.removeController(true);
if (!toDistribute.isEmpty() && partAt != be) { if (!toDistribute.isEmpty() && partAt != be) {
FluidStack copy = toDistribute.copy(); FluidStack copy = toDistribute.copy();
IFluidTank tank = IFluidTank tank =
(partAt instanceof IMultiTileContainer.Fluid ifluidPart ? ifluidPart.getTank(0) : null); (partAt instanceof IMultiBlockEntityContainer.Fluid ifluidPart ? ifluidPart.getTank(0) : null);
// making this generic would be a rather large mess, unfortunately // making this generic would be a rather large mess, unfortunately
if (tank instanceof CreativeFluidTankTileEntity.CreativeSmartFluidTank creativeTank) { if (tank instanceof CreativeFluidTankBlockEntity.CreativeSmartFluidTank creativeTank) {
if (creativeTank.isEmpty()) if (creativeTank.isEmpty())
creativeTank.setContainedFluid(toDistribute); creativeTank.setContainedFluid(toDistribute);
} else { } else {
@ -360,10 +360,10 @@ public class ConnectivityHandler {
} }
} }
if (be instanceof IMultiTileContainer.Inventory inv && inv.hasInventory()) if (be instanceof IMultiBlockEntityContainer.Inventory inv && inv.hasInventory())
be.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) be.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY)
.invalidate(); .invalidate();
if (be instanceof IMultiTileContainer.Fluid fluid && fluid.hasTank()) if (be instanceof IMultiBlockEntityContainer.Fluid fluid && fluid.hasTank())
be.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY) be.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY)
.invalidate(); .invalidate();
@ -371,12 +371,12 @@ public class ConnectivityHandler {
formMulti(be.getType(), level, cache == null ? new SearchCache<>() : cache, frontier); formMulti(be.getType(), level, cache == null ? new SearchCache<>() : cache, frontier);
} }
private static <T extends BlockEntity & IMultiTileContainer> PriorityQueue<Pair<Integer, T>> makeCreationQueue() { private static <T extends BlockEntity & IMultiBlockEntityContainer> PriorityQueue<Pair<Integer, T>> makeCreationQueue() {
return new PriorityQueue<>((one, two) -> two.getKey() - one.getKey()); return new PriorityQueue<>((one, two) -> two.getKey() - one.getKey());
} }
@Nullable @Nullable
public static <T extends BlockEntity & IMultiTileContainer> T partAt(BlockEntityType<?> type, BlockGetter level, public static <T extends BlockEntity & IMultiBlockEntityContainer> T partAt(BlockEntityType<?> type, BlockGetter level,
BlockPos pos) { BlockPos pos) {
BlockEntity be = level.getBlockEntity(pos); BlockEntity be = level.getBlockEntity(pos);
if (be != null && be.getType() == type && !be.isRemoved()) if (be != null && be.getType() == type && !be.isRemoved())
@ -384,7 +384,7 @@ public class ConnectivityHandler {
return null; return null;
} }
public static <T extends BlockEntity & IMultiTileContainer> boolean isConnected(BlockGetter level, BlockPos pos, public static <T extends BlockEntity & IMultiBlockEntityContainer> boolean isConnected(BlockGetter level, BlockPos pos,
BlockPos other) { BlockPos other) {
T one = checked(level.getBlockEntity(pos)); T one = checked(level.getBlockEntity(pos));
T two = checked(level.getBlockEntity(other)); T two = checked(level.getBlockEntity(other));
@ -396,13 +396,13 @@ public class ConnectivityHandler {
@Nullable @Nullable
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
private static <T extends BlockEntity & IMultiTileContainer> T checked(BlockEntity be) { private static <T extends BlockEntity & IMultiBlockEntityContainer> T checked(BlockEntity be) {
if (be instanceof IMultiTileContainer) if (be instanceof IMultiBlockEntityContainer)
return (T) be; return (T) be;
return null; return null;
} }
private static class SearchCache<T extends BlockEntity & IMultiTileContainer> { private static class SearchCache<T extends BlockEntity & IMultiBlockEntityContainer> {
Map<BlockPos, Optional<T>> controllerMap; Map<BlockPos, Optional<T>> controllerMap;
public SearchCache() { public SearchCache() {

View file

@ -0,0 +1,58 @@
package com.simibubi.create.api.event;
import java.lang.reflect.Type;
import java.util.Map;
import com.simibubi.create.foundation.blockEntity.BlockEntityBehaviour;
import com.simibubi.create.foundation.blockEntity.SmartBlockEntity;
import com.simibubi.create.foundation.blockEntity.behaviour.BehaviourType;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraftforge.eventbus.api.GenericEvent;
/**
* Event that is fired just before a SmartBlockEntity is being deserialized<br>
* Also if a new one is placed<br>
* Use it to attach a new {@link BlockEntityBehaviour} or replace existing ones
* (with caution)<br>
* <br>
* Actual setup of the behaviours internal workings and data should be done in
* BlockEntityBehaviour#read() and BlockEntityBehaviour#initialize()
* respectively.<br>
* <br>
* Because of the earliness of this event, the added behaviours will have access
* to the initial NBT read (unless the BE was placed, not loaded), thereby
* allowing block entities to store and retrieve data for injected behaviours.
*/
public class BlockEntityBehaviourEvent<T extends SmartBlockEntity> extends GenericEvent<T> {
private T smartBlockEntity;
private Map<BehaviourType<?>, BlockEntityBehaviour> behaviours;
public BlockEntityBehaviourEvent(T blockEntity, Map<BehaviourType<?>, BlockEntityBehaviour> behaviours) {
smartBlockEntity = blockEntity;
this.behaviours = behaviours;
}
@Override
public Type getGenericType() {
return smartBlockEntity.getClass();
}
public void attach(BlockEntityBehaviour behaviour) {
behaviours.put(behaviour.getType(), behaviour);
}
public BlockEntityBehaviour remove(BehaviourType<?> type) {
return behaviours.remove(type);
}
public T getBlockEntity() {
return smartBlockEntity;
}
public BlockState getBlockState() {
return smartBlockEntity.getBlockState();
}
}

View file

@ -1,58 +0,0 @@
package com.simibubi.create.api.event;
import java.lang.reflect.Type;
import java.util.Map;
import com.simibubi.create.foundation.tileEntity.SmartTileEntity;
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
import com.simibubi.create.foundation.tileEntity.behaviour.BehaviourType;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraftforge.eventbus.api.GenericEvent;
/**
* Event that is fired just before a SmartTileEntity is being deserialized<br>
* Also if a new one is placed<br>
* Use it to attach a new {@link TileEntityBehaviour} or replace existing ones
* (with caution)<br>
* <br>
* Actual setup of the behaviours internal workings and data should be done in
* TileEntityBehaviour#read() and TileEntityBehaviour#initialize()
* respectively.<br>
* <br>
* Because of the earliness of this event, the added behaviours will have access
* to the initial NBT read (unless the TE was placed, not loaded), thereby
* allowing tiles to store and retrieve data for injected behaviours.
*/
public class TileEntityBehaviourEvent<T extends SmartTileEntity> extends GenericEvent<T> {
private T smartTileEntity;
private Map<BehaviourType<?>, TileEntityBehaviour> behaviours;
public TileEntityBehaviourEvent(T tileEntity, Map<BehaviourType<?>, TileEntityBehaviour> behaviours) {
smartTileEntity = tileEntity;
this.behaviours = behaviours;
}
@Override
public Type getGenericType() {
return smartTileEntity.getClass();
}
public void attach(TileEntityBehaviour behaviour) {
behaviours.put(behaviour.getType(), behaviour);
}
public TileEntityBehaviour remove(BehaviourType<?> type) {
return behaviours.remove(type);
}
public T getTileEntity() {
return smartTileEntity;
}
public BlockState getBlockState() {
return smartTileEntity.getBlockState();
}
}

View file

@ -46,10 +46,10 @@ import com.simibubi.create.content.contraptions.components.deployer.DeployerAppl
import com.simibubi.create.content.contraptions.components.deployer.ManualApplicationRecipe; import com.simibubi.create.content.contraptions.components.deployer.ManualApplicationRecipe;
import com.simibubi.create.content.contraptions.components.fan.HauntingRecipe; import com.simibubi.create.content.contraptions.components.fan.HauntingRecipe;
import com.simibubi.create.content.contraptions.components.fan.SplashingRecipe; import com.simibubi.create.content.contraptions.components.fan.SplashingRecipe;
import com.simibubi.create.content.contraptions.components.press.MechanicalPressTileEntity; import com.simibubi.create.content.contraptions.components.press.MechanicalPressBlockEntity;
import com.simibubi.create.content.contraptions.components.press.PressingRecipe; import com.simibubi.create.content.contraptions.components.press.PressingRecipe;
import com.simibubi.create.content.contraptions.components.saw.CuttingRecipe; import com.simibubi.create.content.contraptions.components.saw.CuttingRecipe;
import com.simibubi.create.content.contraptions.components.saw.SawTileEntity; import com.simibubi.create.content.contraptions.components.saw.SawBlockEntity;
import com.simibubi.create.content.contraptions.fluids.actors.FillingRecipe; import com.simibubi.create.content.contraptions.fluids.actors.FillingRecipe;
import com.simibubi.create.content.contraptions.fluids.potion.PotionFluid; import com.simibubi.create.content.contraptions.fluids.potion.PotionFluid;
import com.simibubi.create.content.contraptions.fluids.recipe.PotionMixingRecipes; import com.simibubi.create.content.contraptions.fluids.recipe.PotionMixingRecipes;
@ -177,7 +177,7 @@ public class CreateJEI implements IModPlugin {
.addAllRecipesIf(r -> r instanceof CraftingRecipe && !(r instanceof IShapedRecipe<?>) .addAllRecipesIf(r -> r instanceof CraftingRecipe && !(r instanceof IShapedRecipe<?>)
&& r.getIngredients() && r.getIngredients()
.size() > 1 .size() > 1
&& !MechanicalPressTileEntity.canCompress(r) && !AllRecipeTypes.shouldIgnoreInAutomation(r), && !MechanicalPressBlockEntity.canCompress(r) && !AllRecipeTypes.shouldIgnoreInAutomation(r),
BasinRecipe::convertShapeless) BasinRecipe::convertShapeless)
.catalyst(AllBlocks.MECHANICAL_MIXER::get) .catalyst(AllBlocks.MECHANICAL_MIXER::get)
.catalyst(AllBlocks.BASIN::get) .catalyst(AllBlocks.BASIN::get)
@ -206,7 +206,7 @@ public class CreateJEI implements IModPlugin {
.enableWhen(c -> c.allowShapedSquareInPress) .enableWhen(c -> c.allowShapedSquareInPress)
.addAllRecipesIf( .addAllRecipesIf(
r -> (r instanceof CraftingRecipe) && !(r instanceof MechanicalCraftingRecipe) r -> (r instanceof CraftingRecipe) && !(r instanceof MechanicalCraftingRecipe)
&& MechanicalPressTileEntity.canCompress(r) && !AllRecipeTypes.shouldIgnoreInAutomation(r), && MechanicalPressBlockEntity.canCompress(r) && !AllRecipeTypes.shouldIgnoreInAutomation(r),
BasinRecipe::convertShapeless) BasinRecipe::convertShapeless)
.catalyst(AllBlocks.MECHANICAL_PRESS::get) .catalyst(AllBlocks.MECHANICAL_PRESS::get)
.catalyst(AllBlocks.BASIN::get) .catalyst(AllBlocks.BASIN::get)
@ -232,7 +232,7 @@ public class CreateJEI implements IModPlugin {
woodCutting = builder(CondensedBlockCuttingRecipe.class) woodCutting = builder(CondensedBlockCuttingRecipe.class)
.enableIf(c -> c.allowWoodcuttingOnSaw.get() && ModList.get() .enableIf(c -> c.allowWoodcuttingOnSaw.get() && ModList.get()
.isLoaded("druidcraft")) .isLoaded("druidcraft"))
.addRecipes(() -> CondensedBlockCuttingRecipe.condenseRecipes(getTypedRecipesExcluding(SawTileEntity.woodcuttingRecipeType.get(), AllRecipeTypes::shouldIgnoreInAutomation))) .addRecipes(() -> CondensedBlockCuttingRecipe.condenseRecipes(getTypedRecipesExcluding(SawBlockEntity.woodcuttingRecipeType.get(), AllRecipeTypes::shouldIgnoreInAutomation)))
.catalyst(AllBlocks.MECHANICAL_SAW::get) .catalyst(AllBlocks.MECHANICAL_SAW::get)
.doubleItemIcon(AllBlocks.MECHANICAL_SAW.get(), Items.OAK_STAIRS) .doubleItemIcon(AllBlocks.MECHANICAL_SAW.get(), Items.OAK_STAIRS)
.emptyBackground(177, 70) .emptyBackground(177, 70)

View file

@ -1,7 +1,7 @@
package com.simibubi.create.compat.storageDrawers; package com.simibubi.create.compat.storageDrawers;
import com.simibubi.create.compat.Mods; import com.simibubi.create.compat.Mods;
import com.simibubi.create.foundation.tileEntity.behaviour.filtering.FilteringBehaviour; import com.simibubi.create.foundation.blockEntity.behaviour.filtering.FilteringBehaviour;
import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.BlockEntity;
@ -9,9 +9,9 @@ import net.minecraftforge.items.IItemHandler;
public class StorageDrawers { public class StorageDrawers {
public static boolean isDrawer(BlockEntity tile) { public static boolean isDrawer(BlockEntity be) {
return tile != null && Mods.STORAGEDRAWERS.asId() return be != null && Mods.STORAGEDRAWERS.asId()
.equals(tile.getType() .equals(be.getType()
.getRegistryName() .getRegistryName()
.getNamespace()); .getNamespace());
} }

View file

@ -2,7 +2,7 @@ package com.simibubi.create.compat.tconstruct;
import com.simibubi.create.api.behaviour.BlockSpoutingBehaviour; import com.simibubi.create.api.behaviour.BlockSpoutingBehaviour;
import com.simibubi.create.compat.Mods; import com.simibubi.create.compat.Mods;
import com.simibubi.create.content.contraptions.fluids.actors.SpoutTileEntity; import com.simibubi.create.content.contraptions.fluids.actors.SpoutBlockEntity;
import com.simibubi.create.foundation.config.AllConfigs; import com.simibubi.create.foundation.config.AllConfigs;
import com.simibubi.create.foundation.fluid.FluidHelper; import com.simibubi.create.foundation.fluid.FluidHelper;
import com.simibubi.create.foundation.utility.RegisteredObjects; import com.simibubi.create.foundation.utility.RegisteredObjects;
@ -25,23 +25,23 @@ public class SpoutCasting extends BlockSpoutingBehaviour {
ResourceLocation BASIN = new ResourceLocation("tconstruct", "basin"); ResourceLocation BASIN = new ResourceLocation("tconstruct", "basin");
@Override @Override
public int fillBlock(Level level, BlockPos pos, SpoutTileEntity spout, FluidStack availableFluid, public int fillBlock(Level level, BlockPos pos, SpoutBlockEntity spout, FluidStack availableFluid,
boolean simulate) { boolean simulate) {
if (!enabled()) if (!enabled())
return 0; return 0;
BlockEntity te = level.getBlockEntity(pos); BlockEntity blockEntity = level.getBlockEntity(pos);
if (te == null) if (blockEntity == null)
return 0; return 0;
IFluidHandler handler = te.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY, Direction.UP) IFluidHandler handler = blockEntity.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY, Direction.UP)
.orElse(null); .orElse(null);
if (handler == null) if (handler == null)
return 0; return 0;
if (handler.getTanks() != 1) if (handler.getTanks() != 1)
return 0; return 0;
ResourceLocation registryName = RegisteredObjects.getKeyOrThrow(te.getType()); ResourceLocation registryName = RegisteredObjects.getKeyOrThrow(blockEntity.getType());
if (!registryName.equals(TABLE) && !registryName.equals(BASIN)) if (!registryName.equals(TABLE) && !registryName.equals(BASIN))
return 0; return 0;
if (!handler.isFluidValid(0, availableFluid)) if (!handler.isFluidValid(0, availableFluid))

View file

@ -2,8 +2,8 @@ package com.simibubi.create.content.contraptions;
import com.simibubi.create.CreateClient; import com.simibubi.create.CreateClient;
import com.simibubi.create.content.contraptions.base.IRotate; import com.simibubi.create.content.contraptions.base.IRotate;
import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.content.contraptions.base.KineticBlockEntity;
import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer; import com.simibubi.create.content.contraptions.base.KineticBlockEntityRenderer;
import com.simibubi.create.foundation.config.AllConfigs; import com.simibubi.create.foundation.config.AllConfigs;
import com.simibubi.create.foundation.utility.Color; import com.simibubi.create.foundation.utility.Color;
import com.simibubi.create.foundation.utility.VecHelper; import com.simibubi.create.foundation.utility.VecHelper;
@ -26,34 +26,34 @@ public class KineticDebugger {
public static void tick() { public static void tick() {
if (!isActive()) { if (!isActive()) {
if (KineticTileEntityRenderer.rainbowMode) { if (KineticBlockEntityRenderer.rainbowMode) {
KineticTileEntityRenderer.rainbowMode = false; KineticBlockEntityRenderer.rainbowMode = false;
CreateClient.BUFFER_CACHE.invalidate(); CreateClient.BUFFER_CACHE.invalidate();
} }
return; return;
} }
KineticTileEntity te = getSelectedTE(); KineticBlockEntity be = getSelectedBE();
if (te == null) if (be == null)
return; return;
Level world = Minecraft.getInstance().level; Level world = Minecraft.getInstance().level;
BlockPos toOutline = te.hasSource() ? te.source : te.getBlockPos(); BlockPos toOutline = be.hasSource() ? be.source : be.getBlockPos();
BlockState state = te.getBlockState(); BlockState state = be.getBlockState();
VoxelShape shape = world.getBlockState(toOutline) VoxelShape shape = world.getBlockState(toOutline)
.getBlockSupportShape(world, toOutline); .getBlockSupportShape(world, toOutline);
if (te.getTheoreticalSpeed() != 0 && !shape.isEmpty()) if (be.getTheoreticalSpeed() != 0 && !shape.isEmpty())
CreateClient.OUTLINER.chaseAABB("kineticSource", shape.bounds() CreateClient.OUTLINER.chaseAABB("kineticSource", shape.bounds()
.move(toOutline)) .move(toOutline))
.lineWidth(1 / 16f) .lineWidth(1 / 16f)
.colored(te.hasSource() ? Color.generateFromLong(te.network).getRGB() : 0xffcc00); .colored(be.hasSource() ? Color.generateFromLong(be.network).getRGB() : 0xffcc00);
if (state.getBlock() instanceof IRotate) { if (state.getBlock() instanceof IRotate) {
Axis axis = ((IRotate) state.getBlock()).getRotationAxis(state); Axis axis = ((IRotate) state.getBlock()).getRotationAxis(state);
Vec3 vec = Vec3.atLowerCornerOf(Direction.get(AxisDirection.POSITIVE, axis) Vec3 vec = Vec3.atLowerCornerOf(Direction.get(AxisDirection.POSITIVE, axis)
.getNormal()); .getNormal());
Vec3 center = VecHelper.getCenterOf(te.getBlockPos()); Vec3 center = VecHelper.getCenterOf(be.getBlockPos());
CreateClient.OUTLINER.showLine("rotationAxis", center.add(vec), center.subtract(vec)) CreateClient.OUTLINER.showLine("rotationAxis", center.add(vec), center.subtract(vec))
.lineWidth(1 / 16f); .lineWidth(1 / 16f);
} }
@ -68,7 +68,7 @@ public class KineticDebugger {
return Minecraft.getInstance().options.renderDebug; return Minecraft.getInstance().options.renderDebug;
} }
public static KineticTileEntity getSelectedTE() { public static KineticBlockEntity getSelectedBE() {
HitResult obj = Minecraft.getInstance().hitResult; HitResult obj = Minecraft.getInstance().hitResult;
ClientLevel world = Minecraft.getInstance().level; ClientLevel world = Minecraft.getInstance().level;
if (obj == null) if (obj == null)
@ -79,11 +79,11 @@ public class KineticDebugger {
return null; return null;
BlockHitResult ray = (BlockHitResult) obj; BlockHitResult ray = (BlockHitResult) obj;
BlockEntity te = world.getBlockEntity(ray.getBlockPos()); BlockEntity be = world.getBlockEntity(ray.getBlockPos());
if (!(te instanceof KineticTileEntity)) if (!(be instanceof KineticBlockEntity))
return null; return null;
return (KineticTileEntity) te; return (KineticBlockEntity) be;
} }
} }

View file

@ -4,14 +4,14 @@ import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;
import java.util.Map; import java.util.Map;
import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.content.contraptions.base.KineticBlockEntity;
public class KineticNetwork { public class KineticNetwork {
public Long id; public Long id;
public boolean initialized; public boolean initialized;
public Map<KineticTileEntity, Float> sources; public Map<KineticBlockEntity, Float> sources;
public Map<KineticTileEntity, Float> members; public Map<KineticBlockEntity, Float> members;
private float currentCapacity; private float currentCapacity;
private float currentStress; private float currentStress;
@ -33,18 +33,18 @@ public class KineticNetwork {
updateCapacity(); updateCapacity();
} }
public void addSilently(KineticTileEntity te, float lastCapacity, float lastStress) { public void addSilently(KineticBlockEntity be, float lastCapacity, float lastStress) {
if (members.containsKey(te)) if (members.containsKey(be))
return; return;
if (te.isSource()) { if (be.isSource()) {
unloadedCapacity -= lastCapacity * getStressMultiplierForSpeed(te.getGeneratedSpeed()); unloadedCapacity -= lastCapacity * getStressMultiplierForSpeed(be.getGeneratedSpeed());
float addedStressCapacity = te.calculateAddedStressCapacity(); float addedStressCapacity = be.calculateAddedStressCapacity();
sources.put(te, addedStressCapacity); sources.put(be, addedStressCapacity);
} }
unloadedStress -= lastStress * getStressMultiplierForSpeed(te.getTheoreticalSpeed()); unloadedStress -= lastStress * getStressMultiplierForSpeed(be.getTheoreticalSpeed());
float stressApplied = te.calculateStressApplied(); float stressApplied = be.calculateStressApplied();
members.put(te, stressApplied); members.put(be, stressApplied);
unloadedMembers--; unloadedMembers--;
if (unloadedMembers < 0) if (unloadedMembers < 0)
@ -55,36 +55,36 @@ public class KineticNetwork {
unloadedStress = 0; unloadedStress = 0;
} }
public void add(KineticTileEntity te) { public void add(KineticBlockEntity be) {
if (members.containsKey(te)) if (members.containsKey(be))
return; return;
if (te.isSource()) if (be.isSource())
sources.put(te, te.calculateAddedStressCapacity()); sources.put(be, be.calculateAddedStressCapacity());
members.put(te, te.calculateStressApplied()); members.put(be, be.calculateStressApplied());
updateFromNetwork(te); updateFromNetwork(be);
te.networkDirty = true; be.networkDirty = true;
} }
public void updateCapacityFor(KineticTileEntity te, float capacity) { public void updateCapacityFor(KineticBlockEntity be, float capacity) {
sources.put(te, capacity); sources.put(be, capacity);
updateCapacity(); updateCapacity();
} }
public void updateStressFor(KineticTileEntity te, float stress) { public void updateStressFor(KineticBlockEntity be, float stress) {
members.put(te, stress); members.put(be, stress);
updateStress(); updateStress();
} }
public void remove(KineticTileEntity te) { public void remove(KineticBlockEntity be) {
if (!members.containsKey(te)) if (!members.containsKey(be))
return; return;
if (te.isSource()) if (be.isSource())
sources.remove(te); sources.remove(be);
members.remove(te); members.remove(be);
te.updateFromNetwork(0, 0, 0); be.updateFromNetwork(0, 0, 0);
if (members.isEmpty()) { if (members.isEmpty()) {
TorquePropagator.networks.get(te.getLevel()) TorquePropagator.networks.get(be.getLevel())
.remove(this.id); .remove(this.id);
return; return;
} }
@ -96,12 +96,12 @@ public class KineticNetwork {
} }
public void sync() { public void sync() {
for (KineticTileEntity te : members.keySet()) for (KineticBlockEntity be : members.keySet())
updateFromNetwork(te); updateFromNetwork(be);
} }
private void updateFromNetwork(KineticTileEntity te) { private void updateFromNetwork(KineticBlockEntity be) {
te.updateFromNetwork(currentCapacity, currentStress, getSize()); be.updateFromNetwork(currentCapacity, currentStress, getSize());
} }
public void updateCapacity() { public void updateCapacity() {
@ -132,15 +132,15 @@ public class KineticNetwork {
public float calculateCapacity() { public float calculateCapacity() {
float presentCapacity = 0; float presentCapacity = 0;
for (Iterator<KineticTileEntity> iterator = sources.keySet() for (Iterator<KineticBlockEntity> iterator = sources.keySet()
.iterator(); iterator.hasNext();) { .iterator(); iterator.hasNext();) {
KineticTileEntity te = iterator.next(); KineticBlockEntity be = iterator.next();
if (te.getLevel() if (be.getLevel()
.getBlockEntity(te.getBlockPos()) != te) { .getBlockEntity(be.getBlockPos()) != be) {
iterator.remove(); iterator.remove();
continue; continue;
} }
presentCapacity += getActualCapacityOf(te); presentCapacity += getActualCapacityOf(be);
} }
float newMaxStress = presentCapacity + unloadedCapacity; float newMaxStress = presentCapacity + unloadedCapacity;
return newMaxStress; return newMaxStress;
@ -148,26 +148,26 @@ public class KineticNetwork {
public float calculateStress() { public float calculateStress() {
float presentStress = 0; float presentStress = 0;
for (Iterator<KineticTileEntity> iterator = members.keySet() for (Iterator<KineticBlockEntity> iterator = members.keySet()
.iterator(); iterator.hasNext();) { .iterator(); iterator.hasNext();) {
KineticTileEntity te = iterator.next(); KineticBlockEntity be = iterator.next();
if (te.getLevel() if (be.getLevel()
.getBlockEntity(te.getBlockPos()) != te) { .getBlockEntity(be.getBlockPos()) != be) {
iterator.remove(); iterator.remove();
continue; continue;
} }
presentStress += getActualStressOf(te); presentStress += getActualStressOf(be);
} }
float newStress = presentStress + unloadedStress; float newStress = presentStress + unloadedStress;
return newStress; return newStress;
} }
public float getActualCapacityOf(KineticTileEntity te) { public float getActualCapacityOf(KineticBlockEntity be) {
return sources.get(te) * getStressMultiplierForSpeed(te.getGeneratedSpeed()); return sources.get(be) * getStressMultiplierForSpeed(be.getGeneratedSpeed());
} }
public float getActualStressOf(KineticTileEntity te) { public float getActualStressOf(KineticBlockEntity be) {
return members.get(te) * getStressMultiplierForSpeed(te.getTheoreticalSpeed()); return members.get(be) * getStressMultiplierForSpeed(be.getTheoreticalSpeed());
} }
private static float getStressMultiplierForSpeed(float speed) { private static float getStressMultiplierForSpeed(float speed) {

View file

@ -7,15 +7,15 @@ import java.util.List;
import com.simibubi.create.AllBlocks; import com.simibubi.create.AllBlocks;
import com.simibubi.create.content.contraptions.base.IRotate; import com.simibubi.create.content.contraptions.base.IRotate;
import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.content.contraptions.base.KineticBlockEntity;
import com.simibubi.create.content.contraptions.relays.advanced.SpeedControllerBlock; 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.advanced.SpeedControllerBlockEntity;
import com.simibubi.create.content.contraptions.relays.elementary.CogWheelBlock; 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.elementary.ICogWheel;
import com.simibubi.create.content.contraptions.relays.encased.DirectionalShaftHalvesTileEntity; import com.simibubi.create.content.contraptions.relays.encased.DirectionalShaftHalvesBlockEntity;
import com.simibubi.create.content.contraptions.relays.encased.EncasedBeltBlock; import com.simibubi.create.content.contraptions.relays.encased.EncasedBeltBlock;
import com.simibubi.create.content.contraptions.relays.encased.SplitShaftTileEntity; import com.simibubi.create.content.contraptions.relays.encased.SplitShaftBlockEntity;
import com.simibubi.create.content.contraptions.relays.gearbox.GearboxTileEntity; import com.simibubi.create.content.contraptions.relays.gearbox.GearboxBlockEntity;
import com.simibubi.create.foundation.config.AllConfigs; import com.simibubi.create.foundation.config.AllConfigs;
import com.simibubi.create.foundation.utility.Iterate; import com.simibubi.create.foundation.utility.Iterate;
@ -41,7 +41,7 @@ public class RotationPropagator {
* @param to * @param to
* @return * @return
*/ */
private static float getRotationSpeedModifier(KineticTileEntity from, KineticTileEntity to) { private static float getRotationSpeedModifier(KineticBlockEntity from, KineticBlockEntity to) {
final BlockState stateFrom = from.getBlockState(); final BlockState stateFrom = from.getBlockState();
final BlockState stateTo = to.getBlockState(); final BlockState stateTo = to.getBlockState();
@ -121,17 +121,17 @@ public class RotationPropagator {
return 0; return 0;
} }
private static float getConveyedSpeed(KineticTileEntity from, KineticTileEntity to) { private static float getConveyedSpeed(KineticBlockEntity from, KineticBlockEntity to) {
final BlockState stateFrom = from.getBlockState(); final BlockState stateFrom = from.getBlockState();
final BlockState stateTo = to.getBlockState(); final BlockState stateTo = to.getBlockState();
// Rotation Speed Controller <-> Large Gear // Rotation Speed Controller <-> Large Gear
if (isLargeCogToSpeedController(stateFrom, stateTo, to.getBlockPos() if (isLargeCogToSpeedController(stateFrom, stateTo, to.getBlockPos()
.subtract(from.getBlockPos()))) .subtract(from.getBlockPos())))
return SpeedControllerTileEntity.getConveyedSpeed(from, to, true); return SpeedControllerBlockEntity.getConveyedSpeed(from, to, true);
if (isLargeCogToSpeedController(stateTo, stateFrom, from.getBlockPos() if (isLargeCogToSpeedController(stateTo, stateFrom, from.getBlockPos()
.subtract(to.getBlockPos()))) .subtract(to.getBlockPos())))
return SpeedControllerTileEntity.getConveyedSpeed(to, from, false); return SpeedControllerBlockEntity.getConveyedSpeed(to, from, false);
float rotationSpeedModifier = getRotationSpeedModifier(from, to); float rotationSpeedModifier = getRotationSpeedModifier(from, to);
return from.getTheoreticalSpeed() * rotationSpeedModifier; return from.getTheoreticalSpeed() * rotationSpeedModifier;
@ -156,17 +156,17 @@ public class RotationPropagator {
return true; return true;
} }
private static float getAxisModifier(KineticTileEntity te, Direction direction) { private static float getAxisModifier(KineticBlockEntity be, Direction direction) {
if (!(te.hasSource()||te.isSource()) || !(te instanceof DirectionalShaftHalvesTileEntity)) if (!(be.hasSource()||be.isSource()) || !(be instanceof DirectionalShaftHalvesBlockEntity))
return 1; return 1;
Direction source = ((DirectionalShaftHalvesTileEntity) te).getSourceFacing(); Direction source = ((DirectionalShaftHalvesBlockEntity) be).getSourceFacing();
if (te instanceof GearboxTileEntity) if (be instanceof GearboxBlockEntity)
return direction.getAxis() == source.getAxis() ? direction == source ? 1 : -1 return direction.getAxis() == source.getAxis() ? direction == source ? 1 : -1
: direction.getAxisDirection() == source.getAxisDirection() ? -1 : 1; : direction.getAxisDirection() == source.getAxisDirection() ? -1 : 1;
if (te instanceof SplitShaftTileEntity) if (be instanceof SplitShaftBlockEntity)
return ((SplitShaftTileEntity) te).getRotationSpeedModifier(direction); return ((SplitShaftBlockEntity) be).getRotationSpeedModifier(direction);
return 1; return 1;
} }
@ -205,7 +205,7 @@ public class RotationPropagator {
* @param worldIn * @param worldIn
* @param pos * @param pos
*/ */
public static void handleAdded(Level worldIn, BlockPos pos, KineticTileEntity addedTE) { public static void handleAdded(Level worldIn, BlockPos pos, KineticBlockEntity addedTE) {
if (worldIn.isClientSide) if (worldIn.isClientSide)
return; return;
if (!worldIn.isLoaded(pos)) if (!worldIn.isLoaded(pos))
@ -218,11 +218,11 @@ public class RotationPropagator {
* *
* @param currentTE * @param currentTE
*/ */
private static void propagateNewSource(KineticTileEntity currentTE) { private static void propagateNewSource(KineticBlockEntity currentTE) {
BlockPos pos = currentTE.getBlockPos(); BlockPos pos = currentTE.getBlockPos();
Level world = currentTE.getLevel(); Level world = currentTE.getLevel();
for (KineticTileEntity neighbourTE : getConnectedNeighbours(currentTE)) { for (KineticBlockEntity neighbourTE : getConnectedNeighbours(currentTE)) {
float speedOfCurrent = currentTE.getTheoreticalSpeed(); float speedOfCurrent = currentTE.getTheoreticalSpeed();
float speedOfNeighbour = neighbourTE.getTheoreticalSpeed(); float speedOfNeighbour = neighbourTE.getTheoreticalSpeed();
float newSpeed = getConveyedSpeed(currentTE, neighbourTE); float newSpeed = getConveyedSpeed(currentTE, neighbourTE);
@ -306,29 +306,29 @@ public class RotationPropagator {
* *
* @param worldIn * @param worldIn
* @param pos * @param pos
* @param removedTE * @param removedBE
*/ */
public static void handleRemoved(Level worldIn, BlockPos pos, KineticTileEntity removedTE) { public static void handleRemoved(Level worldIn, BlockPos pos, KineticBlockEntity removedBE) {
if (worldIn.isClientSide) if (worldIn.isClientSide)
return; return;
if (removedTE == null) if (removedBE == null)
return; return;
if (removedTE.getTheoreticalSpeed() == 0) if (removedBE.getTheoreticalSpeed() == 0)
return; return;
for (BlockPos neighbourPos : getPotentialNeighbourLocations(removedTE)) { for (BlockPos neighbourPos : getPotentialNeighbourLocations(removedBE)) {
BlockState neighbourState = worldIn.getBlockState(neighbourPos); BlockState neighbourState = worldIn.getBlockState(neighbourPos);
if (!(neighbourState.getBlock() instanceof IRotate)) if (!(neighbourState.getBlock() instanceof IRotate))
continue; continue;
BlockEntity tileEntity = worldIn.getBlockEntity(neighbourPos); BlockEntity blockEntity = worldIn.getBlockEntity(neighbourPos);
if (!(tileEntity instanceof KineticTileEntity)) if (!(blockEntity instanceof KineticBlockEntity))
continue; continue;
final KineticTileEntity neighbourTE = (KineticTileEntity) tileEntity; final KineticBlockEntity neighbourBE = (KineticBlockEntity) blockEntity;
if (!neighbourTE.hasSource() || !neighbourTE.source.equals(pos)) if (!neighbourBE.hasSource() || !neighbourBE.source.equals(pos))
continue; continue;
propagateMissingSource(neighbourTE); propagateMissingSource(neighbourBE);
} }
} }
@ -339,44 +339,44 @@ public class RotationPropagator {
* *
* @param updateTE * @param updateTE
*/ */
private static void propagateMissingSource(KineticTileEntity updateTE) { private static void propagateMissingSource(KineticBlockEntity updateTE) {
final Level world = updateTE.getLevel(); final Level world = updateTE.getLevel();
List<KineticTileEntity> potentialNewSources = new LinkedList<>(); List<KineticBlockEntity> potentialNewSources = new LinkedList<>();
List<BlockPos> frontier = new LinkedList<>(); List<BlockPos> frontier = new LinkedList<>();
frontier.add(updateTE.getBlockPos()); frontier.add(updateTE.getBlockPos());
BlockPos missingSource = updateTE.hasSource() ? updateTE.source : null; BlockPos missingSource = updateTE.hasSource() ? updateTE.source : null;
while (!frontier.isEmpty()) { while (!frontier.isEmpty()) {
final BlockPos pos = frontier.remove(0); final BlockPos pos = frontier.remove(0);
BlockEntity tileEntity = world.getBlockEntity(pos); BlockEntity blockEntity = world.getBlockEntity(pos);
if (!(tileEntity instanceof KineticTileEntity)) if (!(blockEntity instanceof KineticBlockEntity))
continue; continue;
final KineticTileEntity currentTE = (KineticTileEntity) tileEntity; final KineticBlockEntity currentBE = (KineticBlockEntity) blockEntity;
currentTE.removeSource(); currentBE.removeSource();
currentTE.sendData(); currentBE.sendData();
for (KineticTileEntity neighbourTE : getConnectedNeighbours(currentTE)) { for (KineticBlockEntity neighbourBE : getConnectedNeighbours(currentBE)) {
if (neighbourTE.getBlockPos() if (neighbourBE.getBlockPos()
.equals(missingSource)) .equals(missingSource))
continue; continue;
if (!neighbourTE.hasSource()) if (!neighbourBE.hasSource())
continue; continue;
if (!neighbourTE.source.equals(pos)) { if (!neighbourBE.source.equals(pos)) {
potentialNewSources.add(neighbourTE); potentialNewSources.add(neighbourBE);
continue; continue;
} }
if (neighbourTE.isSource()) if (neighbourBE.isSource())
potentialNewSources.add(neighbourTE); potentialNewSources.add(neighbourBE);
frontier.add(neighbourTE.getBlockPos()); frontier.add(neighbourBE.getBlockPos());
} }
} }
for (KineticTileEntity newSource : potentialNewSources) { for (KineticBlockEntity newSource : potentialNewSources) {
if (newSource.hasSource() || newSource.isSource()) { if (newSource.hasSource() || newSource.isSource()) {
propagateNewSource(newSource); propagateNewSource(newSource);
return; return;
@ -384,27 +384,27 @@ public class RotationPropagator {
} }
} }
private static KineticTileEntity findConnectedNeighbour(KineticTileEntity currentTE, BlockPos neighbourPos) { private static KineticBlockEntity findConnectedNeighbour(KineticBlockEntity currentTE, BlockPos neighbourPos) {
BlockState neighbourState = currentTE.getLevel() BlockState neighbourState = currentTE.getLevel()
.getBlockState(neighbourPos); .getBlockState(neighbourPos);
if (!(neighbourState.getBlock() instanceof IRotate)) if (!(neighbourState.getBlock() instanceof IRotate))
return null; return null;
if (!neighbourState.hasBlockEntity()) if (!neighbourState.hasBlockEntity())
return null; return null;
BlockEntity neighbourTE = currentTE.getLevel() BlockEntity neighbourBE = currentTE.getLevel()
.getBlockEntity(neighbourPos); .getBlockEntity(neighbourPos);
if (!(neighbourTE instanceof KineticTileEntity)) if (!(neighbourBE instanceof KineticBlockEntity))
return null; return null;
KineticTileEntity neighbourKTE = (KineticTileEntity) neighbourTE; KineticBlockEntity neighbourKBE = (KineticBlockEntity) neighbourBE;
if (!(neighbourKTE.getBlockState() if (!(neighbourKBE.getBlockState()
.getBlock() instanceof IRotate)) .getBlock() instanceof IRotate))
return null; return null;
if (!isConnected(currentTE, neighbourKTE) && !isConnected(neighbourKTE, currentTE)) if (!isConnected(currentTE, neighbourKBE) && !isConnected(neighbourKBE, currentTE))
return null; return null;
return neighbourKTE; return neighbourKBE;
} }
public static boolean isConnected(KineticTileEntity from, KineticTileEntity to) { public static boolean isConnected(KineticBlockEntity from, KineticBlockEntity to) {
final BlockState stateFrom = from.getBlockState(); final BlockState stateFrom = from.getBlockState();
final BlockState stateTo = to.getBlockState(); final BlockState stateTo = to.getBlockState();
return isLargeCogToSpeedController(stateFrom, stateTo, to.getBlockPos() return isLargeCogToSpeedController(stateFrom, stateTo, to.getBlockPos()
@ -412,34 +412,34 @@ public class RotationPropagator {
|| from.isCustomConnection(to, stateFrom, stateTo); || from.isCustomConnection(to, stateFrom, stateTo);
} }
private static List<KineticTileEntity> getConnectedNeighbours(KineticTileEntity te) { private static List<KineticBlockEntity> getConnectedNeighbours(KineticBlockEntity be) {
List<KineticTileEntity> neighbours = new LinkedList<>(); List<KineticBlockEntity> neighbours = new LinkedList<>();
for (BlockPos neighbourPos : getPotentialNeighbourLocations(te)) { for (BlockPos neighbourPos : getPotentialNeighbourLocations(be)) {
final KineticTileEntity neighbourTE = findConnectedNeighbour(te, neighbourPos); final KineticBlockEntity neighbourBE = findConnectedNeighbour(be, neighbourPos);
if (neighbourTE == null) if (neighbourBE == null)
continue; continue;
neighbours.add(neighbourTE); neighbours.add(neighbourBE);
} }
return neighbours; return neighbours;
} }
private static List<BlockPos> getPotentialNeighbourLocations(KineticTileEntity te) { private static List<BlockPos> getPotentialNeighbourLocations(KineticBlockEntity be) {
List<BlockPos> neighbours = new LinkedList<>(); List<BlockPos> neighbours = new LinkedList<>();
if (!te.getLevel() if (!be.getLevel()
.isAreaLoaded(te.getBlockPos(), 1)) .isAreaLoaded(be.getBlockPos(), 1))
return neighbours; return neighbours;
for (Direction facing : Iterate.directions) for (Direction facing : Iterate.directions)
neighbours.add(te.getBlockPos() neighbours.add(be.getBlockPos()
.relative(facing)); .relative(facing));
BlockState blockState = te.getBlockState(); BlockState blockState = be.getBlockState();
if (!(blockState.getBlock() instanceof IRotate)) if (!(blockState.getBlock() instanceof IRotate))
return neighbours; return neighbours;
IRotate block = (IRotate) blockState.getBlock(); IRotate block = (IRotate) blockState.getBlock();
return te.addPropagationLocations(block, blockState, neighbours); return be.addPropagationLocations(block, blockState, neighbours);
} }
} }

View file

@ -4,7 +4,7 @@ import java.util.HashMap;
import java.util.Map; import java.util.Map;
import com.simibubi.create.Create; import com.simibubi.create.Create;
import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.content.contraptions.base.KineticBlockEntity;
import com.simibubi.create.foundation.utility.WorldHelper; import com.simibubi.create.foundation.utility.WorldHelper;
import net.minecraft.world.level.LevelAccessor; import net.minecraft.world.level.LevelAccessor;
@ -23,16 +23,16 @@ public class TorquePropagator {
Create.LOGGER.debug("Removed Kinetic Network Space for " + WorldHelper.getDimensionID(world)); Create.LOGGER.debug("Removed Kinetic Network Space for " + WorldHelper.getDimensionID(world));
} }
public KineticNetwork getOrCreateNetworkFor(KineticTileEntity te) { public KineticNetwork getOrCreateNetworkFor(KineticBlockEntity be) {
Long id = te.network; Long id = be.network;
KineticNetwork network; KineticNetwork network;
Map<Long, KineticNetwork> map = networks.computeIfAbsent(te.getLevel(), $ -> new HashMap<>()); Map<Long, KineticNetwork> map = networks.computeIfAbsent(be.getLevel(), $ -> new HashMap<>());
if (id == null) if (id == null)
return null; return null;
if (!map.containsKey(id)) { if (!map.containsKey(id)) {
network = new KineticNetwork(); network = new KineticNetwork();
network.id = te.network; network.id = be.network;
map.put(id, network); map.put(id, network);
} }
network = map.get(id); network = map.get(id);

View file

@ -6,8 +6,8 @@ import net.minecraft.core.Direction;
import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BlockStateProperties;
public class BackHalfShaftInstance extends HalfShaftInstance { public class BackHalfShaftInstance extends HalfShaftInstance {
public BackHalfShaftInstance(MaterialManager modelManager, KineticTileEntity tile) { public BackHalfShaftInstance(MaterialManager materialManager, KineticBlockEntity blockEntity) {
super(modelManager, tile); super(materialManager, blockEntity);
} }
@Override @Override

View file

@ -6,8 +6,8 @@ import com.simibubi.create.content.contraptions.base.flwdata.RotatingData;
import com.simibubi.create.foundation.render.AllMaterialSpecs; import com.simibubi.create.foundation.render.AllMaterialSpecs;
public class CutoutRotatingInstance extends SingleRotatingInstance { public class CutoutRotatingInstance extends SingleRotatingInstance {
public CutoutRotatingInstance(MaterialManager modelManager, KineticTileEntity tile) { public CutoutRotatingInstance(MaterialManager materialManager, KineticBlockEntity blockEntity) {
super(modelManager, tile); super(materialManager, blockEntity);
} }
protected Material<RotatingData> getRotatingMaterial() { protected Material<RotatingData> getRotatingMaterial() {

View file

@ -15,12 +15,12 @@ import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.BlockState;
public abstract class GeneratingKineticTileEntity extends KineticTileEntity { public abstract class GeneratingKineticBlockEntity extends KineticBlockEntity {
public boolean reActivateSource; public boolean reActivateSource;
public GeneratingKineticTileEntity(BlockEntityType<?> typeIn, BlockPos pos, BlockState state) { public GeneratingKineticBlockEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) {
super(typeIn, pos, state); super(type, pos, state);
} }
protected void notifyStressCapacityChange(float capacity) { protected void notifyStressCapacityChange(float capacity) {
@ -37,11 +37,11 @@ public abstract class GeneratingKineticTileEntity extends KineticTileEntity {
@Override @Override
public void setSource(BlockPos source) { public void setSource(BlockPos source) {
super.setSource(source); super.setSource(source);
BlockEntity tileEntity = level.getBlockEntity(source); BlockEntity blockEntity = level.getBlockEntity(source);
if (!(tileEntity instanceof KineticTileEntity)) if (!(blockEntity instanceof KineticBlockEntity))
return; return;
KineticTileEntity sourceTe = (KineticTileEntity) tileEntity; KineticBlockEntity sourceBE = (KineticBlockEntity) blockEntity;
if (reActivateSource && Math.abs(sourceTe.getSpeed()) >= Math.abs(getGeneratedSpeed())) if (reActivateSource && Math.abs(sourceBE.getSpeed()) >= Math.abs(getGeneratedSpeed()))
reActivateSource = false; reActivateSource = false;
} }

View file

@ -9,8 +9,8 @@ import net.minecraft.core.Direction;
import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BlockStateProperties;
public class HalfShaftInstance extends SingleRotatingInstance { public class HalfShaftInstance extends SingleRotatingInstance {
public HalfShaftInstance(MaterialManager modelManager, KineticTileEntity tile) { public HalfShaftInstance(MaterialManager materialManager, KineticBlockEntity blockEntity) {
super(modelManager, tile); super(materialManager, blockEntity);
} }
@Override @Override

View file

@ -7,8 +7,8 @@ import net.minecraft.world.level.block.state.properties.BlockStateProperties;
public class HorizontalHalfShaftInstance extends HalfShaftInstance { public class HorizontalHalfShaftInstance extends HalfShaftInstance {
public HorizontalHalfShaftInstance(MaterialManager modelManager, KineticTileEntity tile) { public HorizontalHalfShaftInstance(MaterialManager materialManager, KineticBlockEntity blockEntity) {
super(modelManager, tile); super(materialManager, blockEntity);
} }
@Override @Override

View file

@ -1,7 +1,7 @@
package com.simibubi.create.content.contraptions.base; package com.simibubi.create.content.contraptions.base;
import com.simibubi.create.foundation.advancement.AdvancementBehaviour; import com.simibubi.create.foundation.advancement.AdvancementBehaviour;
import com.simibubi.create.foundation.block.ITE; import com.simibubi.create.foundation.block.IBE;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
@ -22,15 +22,15 @@ public abstract class KineticBlock extends Block implements IRotate {
@Override @Override
public void onPlace(BlockState state, Level worldIn, BlockPos pos, BlockState oldState, boolean isMoving) { public void onPlace(BlockState state, Level worldIn, BlockPos pos, BlockState oldState, boolean isMoving) {
// onBlockAdded is useless for init, as sometimes the TE gets re-instantiated // onBlockAdded is useless for init, as sometimes the BE gets re-instantiated
// however, if a block change occurs that does not change kinetic connections, // however, if a block change occurs that does not change kinetic connections,
// we can prevent a major re-propagation here // we can prevent a major re-propagation here
BlockEntity tileEntity = worldIn.getBlockEntity(pos); BlockEntity blockEntity = worldIn.getBlockEntity(pos);
if (tileEntity instanceof KineticTileEntity) { if (blockEntity instanceof KineticBlockEntity) {
KineticTileEntity kineticTileEntity = (KineticTileEntity) tileEntity; KineticBlockEntity kineticBlockEntity = (KineticBlockEntity) blockEntity;
kineticTileEntity.preventSpeedUpdate = 0; kineticBlockEntity.preventSpeedUpdate = 0;
if (oldState.getBlock() != state.getBlock()) if (oldState.getBlock() != state.getBlock())
return; return;
@ -39,13 +39,13 @@ public abstract class KineticBlock extends Block implements IRotate {
if (!areStatesKineticallyEquivalent(oldState, state)) if (!areStatesKineticallyEquivalent(oldState, state))
return; return;
kineticTileEntity.preventSpeedUpdate = 2; kineticBlockEntity.preventSpeedUpdate = 2;
} }
} }
@Override @Override
public void onRemove(BlockState pState, Level pLevel, BlockPos pPos, BlockState pNewState, boolean pIsMoving) { public void onRemove(BlockState pState, Level pLevel, BlockPos pPos, BlockState pNewState, boolean pIsMoving) {
ITE.onRemove(pState, pLevel, pPos, pNewState); IBE.onRemove(pState, pLevel, pPos, pNewState);
} }
@Override @Override
@ -65,18 +65,18 @@ public abstract class KineticBlock extends Block implements IRotate {
if (worldIn.isClientSide()) if (worldIn.isClientSide())
return; return;
BlockEntity tileEntity = worldIn.getBlockEntity(pos); BlockEntity blockEntity = worldIn.getBlockEntity(pos);
if (!(tileEntity instanceof KineticTileEntity)) if (!(blockEntity instanceof KineticBlockEntity))
return; return;
KineticTileEntity kte = (KineticTileEntity) tileEntity; KineticBlockEntity kbe = (KineticBlockEntity) blockEntity;
if (kte.preventSpeedUpdate > 0) if (kbe.preventSpeedUpdate > 0)
return; return;
// Remove previous information when block is added // Remove previous information when block is added
kte.warnOfMovement(); kbe.warnOfMovement();
kte.clearKineticInformation(); kbe.clearKineticInformation();
kte.updateSpeed = true; kbe.updateSpeed = true;
} }
@Override @Override
@ -85,12 +85,12 @@ public abstract class KineticBlock extends Block implements IRotate {
if (worldIn.isClientSide) if (worldIn.isClientSide)
return; return;
BlockEntity tileEntity = worldIn.getBlockEntity(pos); BlockEntity blockEntity = worldIn.getBlockEntity(pos);
if (!(tileEntity instanceof KineticTileEntity)) if (!(blockEntity instanceof KineticBlockEntity))
return; return;
KineticTileEntity kte = (KineticTileEntity) tileEntity; KineticBlockEntity kbe = (KineticBlockEntity) blockEntity;
kte.effects.queueRotationIndicators(); kbe.effects.queueRotationIndicators();
} }
public float getParticleTargetRadius() { public float getParticleTargetRadius() {

View file

@ -18,12 +18,12 @@ import com.simibubi.create.content.contraptions.goggles.IHaveHoveringInformation
import com.simibubi.create.content.contraptions.relays.elementary.ICogWheel; import com.simibubi.create.content.contraptions.relays.elementary.ICogWheel;
import com.simibubi.create.content.contraptions.relays.gearbox.GearboxBlock; import com.simibubi.create.content.contraptions.relays.gearbox.GearboxBlock;
import com.simibubi.create.foundation.block.BlockStressValues; import com.simibubi.create.foundation.block.BlockStressValues;
import com.simibubi.create.foundation.blockEntity.BlockEntityBehaviour;
import com.simibubi.create.foundation.blockEntity.SmartBlockEntity;
import com.simibubi.create.foundation.config.AllConfigs; import com.simibubi.create.foundation.config.AllConfigs;
import com.simibubi.create.foundation.item.TooltipHelper; import com.simibubi.create.foundation.item.TooltipHelper;
import com.simibubi.create.foundation.sound.SoundScapes; import com.simibubi.create.foundation.sound.SoundScapes;
import com.simibubi.create.foundation.sound.SoundScapes.AmbienceGroup; import com.simibubi.create.foundation.sound.SoundScapes.AmbienceGroup;
import com.simibubi.create.foundation.tileEntity.SmartTileEntity;
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
import com.simibubi.create.foundation.utility.Lang; import com.simibubi.create.foundation.utility.Lang;
import net.minecraft.ChatFormatting; import net.minecraft.ChatFormatting;
@ -46,7 +46,7 @@ import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.fml.DistExecutor; import net.minecraftforge.fml.DistExecutor;
public class KineticTileEntity extends SmartTileEntity implements IHaveGoggleInformation, IHaveHoveringInformation { public class KineticBlockEntity extends SmartBlockEntity implements IHaveGoggleInformation, IHaveHoveringInformation {
public @Nullable Long network; public @Nullable Long network;
public @Nullable BlockPos source; public @Nullable BlockPos source;
@ -67,7 +67,7 @@ public class KineticTileEntity extends SmartTileEntity implements IHaveGoggleInf
protected float lastStressApplied; protected float lastStressApplied;
protected float lastCapacityProvided; protected float lastCapacityProvided;
public KineticTileEntity(BlockEntityType<?> typeIn, BlockPos pos, BlockState state) { public KineticBlockEntity(BlockEntityType<?> typeIn, BlockPos pos, BlockState state) {
super(typeIn, pos, state); super(typeIn, pos, state);
effects = new KineticEffectHandler(this); effects = new KineticEffectHandler(this);
updateSpeed = true; updateSpeed = true;
@ -125,10 +125,10 @@ public class KineticTileEntity extends SmartTileEntity implements IHaveGoggleInf
if (!level.isLoaded(source)) if (!level.isLoaded(source))
return; return;
BlockEntity tileEntity = level.getBlockEntity(source); BlockEntity blockEntity = level.getBlockEntity(source);
KineticTileEntity sourceTe = KineticBlockEntity sourceBE =
tileEntity instanceof KineticTileEntity ? (KineticTileEntity) tileEntity : null; blockEntity instanceof KineticBlockEntity ? (KineticBlockEntity) blockEntity : null;
if (sourceTe == null || sourceTe.speed == 0) { if (sourceBE == null || sourceBE.speed == 0) {
removeSource(); removeSource();
detachKinetics(); detachKinetics();
return; return;
@ -292,14 +292,14 @@ public class KineticTileEntity extends SmartTileEntity implements IHaveGoggleInf
if (level == null || level.isClientSide) if (level == null || level.isClientSide)
return; return;
BlockEntity tileEntity = level.getBlockEntity(source); BlockEntity blockEntity = level.getBlockEntity(source);
if (!(tileEntity instanceof KineticTileEntity)) { if (!(blockEntity instanceof KineticBlockEntity)) {
removeSource(); removeSource();
return; return;
} }
KineticTileEntity sourceTe = (KineticTileEntity) tileEntity; KineticBlockEntity sourceBE = (KineticBlockEntity) blockEntity;
setNetwork(sourceTe.network); setNetwork(sourceBE.network);
} }
public void removeSource() { public void removeSource() {
@ -360,32 +360,32 @@ public class KineticTileEntity extends SmartTileEntity implements IHaveGoggleInf
if (world.isClientSide) if (world.isClientSide)
return; return;
BlockEntity tileEntityIn = world.getBlockEntity(pos); BlockEntity blockEntity = world.getBlockEntity(pos);
BlockState currentState = world.getBlockState(pos); BlockState currentState = world.getBlockState(pos);
boolean isKinetic = tileEntityIn instanceof KineticTileEntity; boolean isKinetic = blockEntity instanceof KineticBlockEntity;
if (currentState == state) if (currentState == state)
return; return;
if (tileEntityIn == null || !isKinetic) { if (blockEntity == null || !isKinetic) {
world.setBlock(pos, state, 3); world.setBlock(pos, state, 3);
return; return;
} }
KineticTileEntity tileEntity = (KineticTileEntity) tileEntityIn; KineticBlockEntity kineticBlockEntity = (KineticBlockEntity) blockEntity;
if (state.getBlock() instanceof KineticBlock if (state.getBlock() instanceof KineticBlock
&& !((KineticBlock) state.getBlock()).areStatesKineticallyEquivalent(currentState, state)) { && !((KineticBlock) state.getBlock()).areStatesKineticallyEquivalent(currentState, state)) {
if (tileEntity.hasNetwork()) if (kineticBlockEntity.hasNetwork())
tileEntity.getOrCreateNetwork() kineticBlockEntity.getOrCreateNetwork()
.remove(tileEntity); .remove(kineticBlockEntity);
tileEntity.detachKinetics(); kineticBlockEntity.detachKinetics();
tileEntity.removeSource(); kineticBlockEntity.removeSource();
} }
world.setBlock(pos, state, 3); world.setBlock(pos, state, 3);
} }
@Override @Override
public void addBehaviours(List<TileEntityBehaviour> behaviours) {} public void addBehaviours(List<BlockEntityBehaviour> behaviours) {}
@Override @Override
public boolean addToTooltip(List<Component> tooltip, boolean isPlayerSneaking) { public boolean addToTooltip(List<Component> tooltip, boolean isPlayerSneaking) {
@ -500,18 +500,18 @@ public class KineticTileEntity extends SmartTileEntity implements IHaveGoggleInf
* Specify ratio of transferred rotation from this kinetic component to a * Specify ratio of transferred rotation from this kinetic component to a
* specific other. * specific other.
* *
* @param target other Kinetic TE to transfer to * @param target other Kinetic BE to transfer to
* @param stateFrom this TE's blockstate * @param stateFrom this BE's blockstate
* @param stateTo other TE's blockstate * @param stateTo other BE's blockstate
* @param diff difference in position (to.pos - from.pos) * @param diff difference in position (to.pos - from.pos)
* @param connectedViaAxes whether these kinetic blocks are connected via mutual * @param connectedViaAxes whether these kinetic blocks are connected via mutual
* IRotate.hasShaftTowards() * IRotate.hasShaftTowards()
* @param connectedViaCogs whether these kinetic blocks are connected via mutual * @param connectedViaCogs whether these kinetic blocks are connected via mutual
* IRotate.hasIntegratedCogwheel() * IRotate.hasIntegratedCogwheel()
* @return factor of rotation speed from this TE to other. 0 if no rotation is * @return factor of rotation speed from this BE to other. 0 if no rotation is
* transferred, or the standard rules apply (integrated shafts/cogs) * transferred, or the standard rules apply (integrated shafts/cogs)
*/ */
public float propagateRotationTo(KineticTileEntity target, BlockState stateFrom, BlockState stateTo, BlockPos diff, public float propagateRotationTo(KineticBlockEntity target, BlockState stateFrom, BlockState stateTo, BlockPos diff,
boolean connectedViaAxes, boolean connectedViaCogs) { boolean connectedViaAxes, boolean connectedViaCogs) {
return 0; return 0;
} }
@ -554,7 +554,7 @@ public class KineticTileEntity extends SmartTileEntity implements IHaveGoggleInf
* @return true if this and the other component should check their propagation * @return true if this and the other component should check their propagation
* factor and are not already connected via integrated cogs or shafts * factor and are not already connected via integrated cogs or shafts
*/ */
public boolean isCustomConnection(KineticTileEntity other, BlockState state, BlockState otherState) { public boolean isCustomConnection(KineticBlockEntity other, BlockState state, BlockState otherState) {
return false; return false;
} }

View file

@ -13,21 +13,21 @@ import net.minecraft.core.Direction;
import net.minecraft.core.Direction.Axis; import net.minecraft.core.Direction.Axis;
import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.BlockState;
public abstract class KineticTileInstance<T extends KineticTileEntity> extends BlockEntityInstance<T> { public abstract class KineticBlockEntityInstance<T extends KineticBlockEntity> extends BlockEntityInstance<T> {
protected final Direction.Axis axis; protected final Direction.Axis axis;
public KineticTileInstance(MaterialManager modelManager, T tile) { public KineticBlockEntityInstance(MaterialManager materialManager, T blockEntity) {
super(modelManager, tile); super(materialManager, blockEntity);
axis = (blockState.getBlock()instanceof IRotate irotate) ? irotate.getRotationAxis(blockState) : Axis.Y; axis = (blockState.getBlock() instanceof IRotate irotate) ? irotate.getRotationAxis(blockState) : Axis.Y;
} }
protected final void updateRotation(RotatingData instance) { protected final void updateRotation(RotatingData instance) {
updateRotation(instance, getRotationAxis(), getTileSpeed()); updateRotation(instance, getRotationAxis(), getBlockEntitySpeed());
} }
protected final void updateRotation(RotatingData instance, Direction.Axis axis) { protected final void updateRotation(RotatingData instance, Direction.Axis axis) {
updateRotation(instance, axis, getTileSpeed()); updateRotation(instance, axis, getBlockEntitySpeed());
} }
protected final void updateRotation(RotatingData instance, float speed) { protected final void updateRotation(RotatingData instance, float speed) {
@ -42,11 +42,11 @@ public abstract class KineticTileInstance<T extends KineticTileEntity> extends B
} }
protected final RotatingData setup(RotatingData key) { protected final RotatingData setup(RotatingData key) {
return setup(key, getRotationAxis(), getTileSpeed()); return setup(key, getRotationAxis(), getBlockEntitySpeed());
} }
protected final RotatingData setup(RotatingData key, Direction.Axis axis) { protected final RotatingData setup(RotatingData key, Direction.Axis axis) {
return setup(key, axis, getTileSpeed()); return setup(key, axis, getBlockEntitySpeed());
} }
protected final RotatingData setup(RotatingData key, float speed) { protected final RotatingData setup(RotatingData key, float speed) {
@ -77,7 +77,7 @@ public abstract class KineticTileInstance<T extends KineticTileEntity> extends B
return axis; return axis;
} }
protected float getTileSpeed() { protected float getBlockEntitySpeed() {
return blockEntity.getSpeed(); return blockEntity.getSpeed();
} }

View file

@ -8,10 +8,10 @@ import com.mojang.blaze3d.vertex.VertexConsumer;
import com.simibubi.create.AllBlocks; import com.simibubi.create.AllBlocks;
import com.simibubi.create.content.contraptions.KineticDebugger; import com.simibubi.create.content.contraptions.KineticDebugger;
import com.simibubi.create.content.contraptions.relays.elementary.ICogWheel; import com.simibubi.create.content.contraptions.relays.elementary.ICogWheel;
import com.simibubi.create.foundation.blockEntity.renderer.SafeBlockEntityRenderer;
import com.simibubi.create.foundation.render.CachedBufferer; import com.simibubi.create.foundation.render.CachedBufferer;
import com.simibubi.create.foundation.render.SuperByteBuffer; import com.simibubi.create.foundation.render.SuperByteBuffer;
import com.simibubi.create.foundation.render.SuperByteBufferCache; import com.simibubi.create.foundation.render.SuperByteBufferCache;
import com.simibubi.create.foundation.tileEntity.renderer.SafeTileEntityRenderer;
import com.simibubi.create.foundation.utility.AnimationTickHolder; import com.simibubi.create.foundation.utility.AnimationTickHolder;
import com.simibubi.create.foundation.utility.Color; import com.simibubi.create.foundation.utility.Color;
@ -26,9 +26,9 @@ import net.minecraft.core.Direction.AxisDirection;
import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BlockStateProperties;
public class KineticTileEntityRenderer extends SafeTileEntityRenderer<KineticTileEntity> { public class KineticBlockEntityRenderer extends SafeBlockEntityRenderer<KineticBlockEntity> {
public static final SuperByteBufferCache.Compartment<BlockState> KINETIC_TILE = new SuperByteBufferCache.Compartment<>(); public static final SuperByteBufferCache.Compartment<BlockState> KINETIC_BLOCK = new SuperByteBufferCache.Compartment<>();
public static boolean rainbowMode = false; public static boolean rainbowMode = false;
protected static final RenderType[] REVERSED_CHUNK_BUFFER_LAYERS = RenderType.chunkBufferLayers().toArray(RenderType[]::new); protected static final RenderType[] REVERSED_CHUNK_BUFFER_LAYERS = RenderType.chunkBufferLayers().toArray(RenderType[]::new);
@ -36,71 +36,71 @@ public class KineticTileEntityRenderer extends SafeTileEntityRenderer<KineticTil
ArrayUtils.reverse(REVERSED_CHUNK_BUFFER_LAYERS); ArrayUtils.reverse(REVERSED_CHUNK_BUFFER_LAYERS);
} }
public KineticTileEntityRenderer(BlockEntityRendererProvider.Context context) { public KineticBlockEntityRenderer(BlockEntityRendererProvider.Context context) {
} }
@Override @Override
protected void renderSafe(KineticTileEntity te, float partialTicks, PoseStack ms, MultiBufferSource buffer, protected void renderSafe(KineticBlockEntity be, float partialTicks, PoseStack ms, MultiBufferSource buffer,
int light, int overlay) { int light, int overlay) {
if (Backend.canUseInstancing(te.getLevel())) return; if (Backend.canUseInstancing(be.getLevel())) return;
BlockState state = getRenderedBlockState(te); BlockState state = getRenderedBlockState(be);
RenderType type = getRenderType(te, state); RenderType type = getRenderType(be, state);
if (type != null) if (type != null)
renderRotatingBuffer(te, getRotatedModel(te, state), ms, buffer.getBuffer(type), light); renderRotatingBuffer(be, getRotatedModel(be, state), ms, buffer.getBuffer(type), light);
} }
protected BlockState getRenderedBlockState(KineticTileEntity te) { protected BlockState getRenderedBlockState(KineticBlockEntity be) {
return te.getBlockState(); return be.getBlockState();
} }
protected RenderType getRenderType(KineticTileEntity te, BlockState state) { protected RenderType getRenderType(KineticBlockEntity be, BlockState state) {
for (RenderType type : REVERSED_CHUNK_BUFFER_LAYERS) for (RenderType type : REVERSED_CHUNK_BUFFER_LAYERS)
if (ItemBlockRenderTypes.canRenderInLayer(state, type)) if (ItemBlockRenderTypes.canRenderInLayer(state, type))
return type; return type;
return null; return null;
} }
protected SuperByteBuffer getRotatedModel(KineticTileEntity te, BlockState state) { protected SuperByteBuffer getRotatedModel(KineticBlockEntity be, BlockState state) {
return CachedBufferer.block(KINETIC_TILE, state); return CachedBufferer.block(KINETIC_BLOCK, state);
} }
public static void renderRotatingKineticBlock(KineticTileEntity te, BlockState renderedState, PoseStack ms, public static void renderRotatingKineticBlock(KineticBlockEntity be, BlockState renderedState, PoseStack ms,
VertexConsumer buffer, int light) { VertexConsumer buffer, int light) {
SuperByteBuffer superByteBuffer = CachedBufferer.block(KINETIC_TILE, renderedState); SuperByteBuffer superByteBuffer = CachedBufferer.block(KINETIC_BLOCK, renderedState);
renderRotatingBuffer(te, superByteBuffer, ms, buffer, light); renderRotatingBuffer(be, superByteBuffer, ms, buffer, light);
} }
public static void renderRotatingBuffer(KineticTileEntity te, SuperByteBuffer superBuffer, PoseStack ms, public static void renderRotatingBuffer(KineticBlockEntity be, SuperByteBuffer superBuffer, PoseStack ms,
VertexConsumer buffer, int light) { VertexConsumer buffer, int light) {
standardKineticRotationTransform(superBuffer, te, light).renderInto(ms, buffer); standardKineticRotationTransform(superBuffer, be, light).renderInto(ms, buffer);
} }
public static float getAngleForTe(KineticTileEntity te, final BlockPos pos, Axis axis) { public static float getAngleForTe(KineticBlockEntity be, final BlockPos pos, Axis axis) {
float time = AnimationTickHolder.getRenderTime(te.getLevel()); float time = AnimationTickHolder.getRenderTime(be.getLevel());
float offset = getRotationOffsetForPosition(te, pos, axis); float offset = getRotationOffsetForPosition(be, pos, axis);
float angle = ((time * te.getSpeed() * 3f / 10 + offset) % 360) / 180 * (float) Math.PI; float angle = ((time * be.getSpeed() * 3f / 10 + offset) % 360) / 180 * (float) Math.PI;
return angle; return angle;
} }
public static SuperByteBuffer standardKineticRotationTransform(SuperByteBuffer buffer, KineticTileEntity te, public static SuperByteBuffer standardKineticRotationTransform(SuperByteBuffer buffer, KineticBlockEntity be,
int light) { int light) {
final BlockPos pos = te.getBlockPos(); final BlockPos pos = be.getBlockPos();
Axis axis = ((IRotate) te.getBlockState() Axis axis = ((IRotate) be.getBlockState()
.getBlock()).getRotationAxis(te.getBlockState()); .getBlock()).getRotationAxis(be.getBlockState());
return kineticRotationTransform(buffer, te, axis, getAngleForTe(te, pos, axis), light); return kineticRotationTransform(buffer, be, axis, getAngleForTe(be, pos, axis), light);
} }
public static SuperByteBuffer kineticRotationTransform(SuperByteBuffer buffer, KineticTileEntity te, Axis axis, public static SuperByteBuffer kineticRotationTransform(SuperByteBuffer buffer, KineticBlockEntity be, Axis axis,
float angle, int light) { float angle, int light) {
buffer.light(light); buffer.light(light);
buffer.rotateCentered(Direction.get(AxisDirection.POSITIVE, axis), angle); buffer.rotateCentered(Direction.get(AxisDirection.POSITIVE, axis), angle);
if (KineticDebugger.isActive()) { if (KineticDebugger.isActive()) {
rainbowMode = true; rainbowMode = true;
buffer.color(te.hasNetwork() ? Color.generateFromLong(te.network) : Color.WHITE); buffer.color(be.hasNetwork() ? Color.generateFromLong(be.network) : Color.WHITE);
} else { } else {
float overStressedEffect = te.effects.overStressedEffect; float overStressedEffect = be.effects.overStressedEffect;
if (overStressedEffect != 0) if (overStressedEffect != 0)
if (overStressedEffect > 0) if (overStressedEffect > 0)
buffer.color(Color.WHITE.mixWith(Color.RED, overStressedEffect)); buffer.color(Color.WHITE.mixWith(Color.RED, overStressedEffect));
@ -113,13 +113,13 @@ public class KineticTileEntityRenderer extends SafeTileEntityRenderer<KineticTil
return buffer; return buffer;
} }
public static float getRotationOffsetForPosition(KineticTileEntity te, final BlockPos pos, final Axis axis) { public static float getRotationOffsetForPosition(KineticBlockEntity be, final BlockPos pos, final Axis axis) {
float offset = ICogWheel.isLargeCog(te.getBlockState()) ? 11.25f : 0; float offset = ICogWheel.isLargeCog(be.getBlockState()) ? 11.25f : 0;
double d = (((axis == Axis.X) ? 0 : pos.getX()) + ((axis == Axis.Y) ? 0 : pos.getY()) double d = (((axis == Axis.X) ? 0 : pos.getX()) + ((axis == Axis.Y) ? 0 : pos.getY())
+ ((axis == Axis.Z) ? 0 : pos.getZ())) % 2; + ((axis == Axis.Z) ? 0 : pos.getZ())) % 2;
if (d == 0) if (d == 0)
offset = 22.5f; offset = 22.5f;
return offset + te.getRotationAngleOffset(axis); return offset + be.getRotationAngleOffset(axis);
} }
public static BlockState shaft(Axis axis) { public static BlockState shaft(Axis axis) {
@ -127,9 +127,9 @@ public class KineticTileEntityRenderer extends SafeTileEntityRenderer<KineticTil
.setValue(BlockStateProperties.AXIS, axis); .setValue(BlockStateProperties.AXIS, axis);
} }
public static Axis getRotationAxisOf(KineticTileEntity te) { public static Axis getRotationAxisOf(KineticBlockEntity be) {
return ((IRotate) te.getBlockState() return ((IRotate) be.getBlockState()
.getBlock()).getRotationAxis(te.getBlockState()); .getBlock()).getRotationAxis(be.getBlockState());
} }
} }

View file

@ -21,9 +21,9 @@ public class KineticEffectHandler {
int overStressedTime; int overStressedTime;
float overStressedEffect; float overStressedEffect;
int particleSpawnCountdown; int particleSpawnCountdown;
KineticTileEntity kte; KineticBlockEntity kte;
public KineticEffectHandler(KineticTileEntity kte) { public KineticEffectHandler(KineticBlockEntity kte) {
this.kte = kte; this.kte = kte;
} }

View file

@ -6,12 +6,12 @@ import com.simibubi.create.content.contraptions.base.flwdata.RotatingData;
import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.BlockState;
public class SingleRotatingInstance extends KineticTileInstance<KineticTileEntity> { public class SingleRotatingInstance extends KineticBlockEntityInstance<KineticBlockEntity> {
protected RotatingData rotatingModel; protected RotatingData rotatingModel;
public SingleRotatingInstance(MaterialManager modelManager, KineticTileEntity tile) { public SingleRotatingInstance(MaterialManager materialManager, KineticBlockEntity blockEntity) {
super(modelManager, tile); super(materialManager, blockEntity);
} }
@Override @Override

View file

@ -2,7 +2,7 @@ package com.simibubi.create.content.contraptions.base.flwdata;
import com.jozufozu.flywheel.core.materials.BasicData; import com.jozufozu.flywheel.core.materials.BasicData;
import com.mojang.math.Vector3f; import com.mojang.math.Vector3f;
import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.content.contraptions.base.KineticBlockEntity;
import com.simibubi.create.foundation.utility.Color; import com.simibubi.create.foundation.utility.Color;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
@ -38,9 +38,9 @@ public class KineticData extends BasicData {
return this; return this;
} }
public KineticData setColor(KineticTileEntity te) { public KineticData setColor(KineticBlockEntity blockEntity) {
if (te.hasNetwork()) { if (blockEntity.hasNetwork()) {
setColor(Color.generateFromLong(te.network)); setColor(Color.generateFromLong(blockEntity.network));
}else { }else {
setColor(0xFF, 0xFF, 0xFF); setColor(0xFF, 0xFF, 0xFF);
} }

View file

@ -15,7 +15,7 @@ import net.minecraft.world.phys.Vec3;
public class BellMovementBehaviour implements MovementBehaviour { public class BellMovementBehaviour implements MovementBehaviour {
@Override @Override
public boolean renderAsNormalTileEntity() { public boolean renderAsNormalBlockEntity() {
return true; return true;
} }

View file

@ -2,7 +2,7 @@ package com.simibubi.create.content.contraptions.components.actors;
import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicInteger;
import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.content.contraptions.base.KineticBlockEntity;
import com.simibubi.create.foundation.utility.BlockHelper; import com.simibubi.create.foundation.utility.BlockHelper;
import com.simibubi.create.foundation.utility.VecHelper; import com.simibubi.create.foundation.utility.VecHelper;
@ -18,7 +18,7 @@ import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.phys.Vec3; import net.minecraft.world.phys.Vec3;
public abstract class BlockBreakingKineticTileEntity extends KineticTileEntity { public abstract class BlockBreakingKineticBlockEntity extends KineticBlockEntity {
public static final AtomicInteger NEXT_BREAKER_ID = new AtomicInteger(); public static final AtomicInteger NEXT_BREAKER_ID = new AtomicInteger();
protected int ticksUntilNextProgress; protected int ticksUntilNextProgress;
@ -26,8 +26,8 @@ public abstract class BlockBreakingKineticTileEntity extends KineticTileEntity {
protected int breakerId = -NEXT_BREAKER_ID.incrementAndGet(); protected int breakerId = -NEXT_BREAKER_ID.incrementAndGet();
protected BlockPos breakingPos; protected BlockPos breakingPos;
public BlockBreakingKineticTileEntity(BlockEntityType<?> typeIn, BlockPos pos, BlockState state) { public BlockBreakingKineticBlockEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) {
super(typeIn, pos, state); super(type, pos, state);
} }
@Override @Override

View file

@ -28,7 +28,7 @@ public class BlockBreakingMovementBehaviour implements MovementBehaviour {
public void startMoving(MovementContext context) { public void startMoving(MovementContext context) {
if (context.world.isClientSide) if (context.world.isClientSide)
return; return;
context.data.putInt("BreakerId", -BlockBreakingKineticTileEntity.NEXT_BREAKER_ID.incrementAndGet()); context.data.putInt("BreakerId", -BlockBreakingKineticBlockEntity.NEXT_BREAKER_ID.incrementAndGet());
} }
@Override @Override
@ -220,7 +220,7 @@ public class BlockBreakingMovementBehaviour implements MovementBehaviour {
public boolean canBreak(Level world, BlockPos breakingPos, BlockState state) { public boolean canBreak(Level world, BlockPos breakingPos, BlockState state) {
float blockHardness = state.getDestroySpeed(world, breakingPos); float blockHardness = state.getDestroySpeed(world, breakingPos);
return BlockBreakingKineticTileEntity.isBreakable(state, blockHardness); return BlockBreakingKineticBlockEntity.isBreakable(state, blockHardness);
} }
protected void onBlockBroken(MovementContext context, BlockPos pos, BlockState brokenState) { protected void onBlockBroken(MovementContext context, BlockPos pos, BlockState brokenState) {

View file

@ -10,7 +10,7 @@ import net.minecraft.world.level.block.CampfireBlock;
public class CampfireMovementBehaviour implements MovementBehaviour { public class CampfireMovementBehaviour implements MovementBehaviour {
@Override @Override
public boolean renderAsNormalTileEntity() { public boolean renderAsNormalBlockEntity() {
return true; return true;
} }
@ -20,7 +20,7 @@ public class CampfireMovementBehaviour implements MovementBehaviour {
|| !context.state.getValue(CampfireBlock.LIT)) || !context.state.getValue(CampfireBlock.LIT))
return; return;
// Mostly copied from CampfireBlock and CampfireTileEntity // Mostly copied from CampfireBlock and CampfireBlockEntity
Random random = context.world.random; Random random = context.world.random;
if (random.nextFloat() < 0.11F) { if (random.nextFloat() < 0.11F) {
for (int i = 0; i < random.nextInt(2) + 2; ++i) { for (int i = 0; i < random.nextInt(2) + 2; ++i) {

View file

@ -2,10 +2,10 @@ package com.simibubi.create.content.contraptions.components.actors;
import javax.annotation.ParametersAreNonnullByDefault; import javax.annotation.ParametersAreNonnullByDefault;
import com.simibubi.create.AllBlockEntityTypes;
import com.simibubi.create.AllShapes; import com.simibubi.create.AllShapes;
import com.simibubi.create.AllTileEntities;
import com.simibubi.create.content.contraptions.base.DirectionalKineticBlock; import com.simibubi.create.content.contraptions.base.DirectionalKineticBlock;
import com.simibubi.create.foundation.block.ITE; import com.simibubi.create.foundation.block.IBE;
import net.minecraft.MethodsReturnNonnullByDefault; import net.minecraft.MethodsReturnNonnullByDefault;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
@ -36,7 +36,7 @@ import net.minecraft.world.phys.shapes.VoxelShape;
@ParametersAreNonnullByDefault @ParametersAreNonnullByDefault
@MethodsReturnNonnullByDefault @MethodsReturnNonnullByDefault
public class DrillBlock extends DirectionalKineticBlock implements ITE<DrillTileEntity>, SimpleWaterloggedBlock { public class DrillBlock extends DirectionalKineticBlock implements IBE<DrillBlockEntity>, SimpleWaterloggedBlock {
public static DamageSource damageSourceDrill = new DamageSource("create.mechanical_drill").bypassArmor(); public static DamageSource damageSourceDrill = new DamageSource("create.mechanical_drill").bypassArmor();
public DrillBlock(Properties properties) { public DrillBlock(Properties properties) {
@ -51,10 +51,10 @@ public class DrillBlock extends DirectionalKineticBlock implements ITE<DrillTile
if (!new AABB(pos).deflate(.1f) if (!new AABB(pos).deflate(.1f)
.intersects(entityIn.getBoundingBox())) .intersects(entityIn.getBoundingBox()))
return; return;
withTileEntityDo(worldIn, pos, te -> { withBlockEntityDo(worldIn, pos, be -> {
if (te.getSpeed() == 0) if (be.getSpeed() == 0)
return; return;
entityIn.hurt(damageSourceDrill, (float) getDamage(te.getSpeed())); entityIn.hurt(damageSourceDrill, (float) getDamage(be.getSpeed()));
}); });
} }
@ -66,7 +66,7 @@ public class DrillBlock extends DirectionalKineticBlock implements ITE<DrillTile
@Override @Override
public void neighborChanged(BlockState state, Level worldIn, BlockPos pos, Block blockIn, BlockPos fromPos, public void neighborChanged(BlockState state, Level worldIn, BlockPos pos, Block blockIn, BlockPos fromPos,
boolean isMoving) { boolean isMoving) {
withTileEntityDo(worldIn, pos, DrillTileEntity::destroyNextTick); withBlockEntityDo(worldIn, pos, DrillBlockEntity::destroyNextTick);
} }
@Override @Override
@ -125,12 +125,12 @@ public class DrillBlock extends DirectionalKineticBlock implements ITE<DrillTile
} }
@Override @Override
public Class<DrillTileEntity> getTileEntityClass() { public Class<DrillBlockEntity> getBlockEntityClass() {
return DrillTileEntity.class; return DrillBlockEntity.class;
} }
@Override @Override
public BlockEntityType<? extends DrillTileEntity> getTileEntityType() { public BlockEntityType<? extends DrillBlockEntity> getBlockEntityType() {
return AllTileEntities.DRILL.get(); return AllBlockEntityTypes.DRILL.get();
} }
} }

View file

@ -4,9 +4,9 @@ import net.minecraft.core.BlockPos;
import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.BlockState;
public class DrillTileEntity extends BlockBreakingKineticTileEntity { public class DrillBlockEntity extends BlockBreakingKineticBlockEntity {
public DrillTileEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) { public DrillBlockEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) {
super(type, pos, state); super(type, pos, state);
} }

View file

@ -3,7 +3,7 @@ package com.simibubi.create.content.contraptions.components.actors;
import com.jozufozu.flywheel.api.Instancer; import com.jozufozu.flywheel.api.Instancer;
import com.jozufozu.flywheel.api.MaterialManager; import com.jozufozu.flywheel.api.MaterialManager;
import com.simibubi.create.AllBlockPartials; import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.content.contraptions.base.KineticBlockEntity;
import com.simibubi.create.content.contraptions.base.SingleRotatingInstance; import com.simibubi.create.content.contraptions.base.SingleRotatingInstance;
import com.simibubi.create.content.contraptions.base.flwdata.RotatingData; import com.simibubi.create.content.contraptions.base.flwdata.RotatingData;
@ -13,8 +13,8 @@ import net.minecraft.world.level.block.state.properties.BlockStateProperties;
public class DrillInstance extends SingleRotatingInstance { public class DrillInstance extends SingleRotatingInstance {
public DrillInstance(MaterialManager modelManager, KineticTileEntity tile) { public DrillInstance(MaterialManager materialManager, KineticBlockEntity blockEntity) {
super(modelManager, tile); super(materialManager, blockEntity);
} }
@Override @Override

View file

@ -2,8 +2,8 @@ package com.simibubi.create.content.contraptions.components.actors;
import com.jozufozu.flywheel.core.virtual.VirtualRenderWorld; import com.jozufozu.flywheel.core.virtual.VirtualRenderWorld;
import com.simibubi.create.AllBlockPartials; import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.content.contraptions.base.KineticBlockEntity;
import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer; import com.simibubi.create.content.contraptions.base.KineticBlockEntityRenderer;
import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext; import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext;
import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionMatrices; import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionMatrices;
import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionRenderDispatcher; import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionRenderDispatcher;
@ -19,14 +19,14 @@ import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.BlockState;
public class DrillRenderer extends KineticTileEntityRenderer { public class DrillRenderer extends KineticBlockEntityRenderer {
public DrillRenderer(BlockEntityRendererProvider.Context context) { public DrillRenderer(BlockEntityRendererProvider.Context context) {
super(context); super(context);
} }
@Override @Override
protected SuperByteBuffer getRotatedModel(KineticTileEntity te, BlockState state) { protected SuperByteBuffer getRotatedModel(KineticBlockEntity be, BlockState state) {
return CachedBufferer.partialFacing(AllBlockPartials.DRILL_HEAD, state); return CachedBufferer.partialFacing(AllBlockPartials.DRILL_HEAD, state);
} }

View file

@ -1,24 +1,24 @@
package com.simibubi.create.content.contraptions.components.actors; package com.simibubi.create.content.contraptions.components.actors;
import com.simibubi.create.AllTileEntities; import com.simibubi.create.AllBlockEntityTypes;
import com.simibubi.create.foundation.block.ITE; import com.simibubi.create.foundation.block.IBE;
import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.entity.BlockEntityType;
public class HarvesterBlock extends AttachedActorBlock implements ITE<HarvesterTileEntity> { public class HarvesterBlock extends AttachedActorBlock implements IBE<HarvesterBlockEntity> {
public HarvesterBlock(Properties p_i48377_1_) { public HarvesterBlock(Properties p_i48377_1_) {
super(p_i48377_1_); super(p_i48377_1_);
} }
@Override @Override
public Class<HarvesterTileEntity> getTileEntityClass() { public Class<HarvesterBlockEntity> getBlockEntityClass() {
return HarvesterTileEntity.class; return HarvesterBlockEntity.class;
} }
@Override @Override
public BlockEntityType<? extends HarvesterTileEntity> getTileEntityType() { public BlockEntityType<? extends HarvesterBlockEntity> getBlockEntityType() {
return AllTileEntities.HARVESTER.get(); return AllBlockEntityTypes.HARVESTER.get();
} }
} }

View file

@ -1,18 +1,18 @@
package com.simibubi.create.content.contraptions.components.actors; package com.simibubi.create.content.contraptions.components.actors;
import com.simibubi.create.foundation.tileEntity.CachedRenderBBTileEntity; import com.simibubi.create.foundation.blockEntity.CachedRenderBBBlockEntity;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.AABB;
public class HarvesterTileEntity extends CachedRenderBBTileEntity { public class HarvesterBlockEntity extends CachedRenderBBBlockEntity {
// For simulations such as Ponder // For simulations such as Ponder
private float manuallyAnimatedSpeed; private float manuallyAnimatedSpeed;
public HarvesterTileEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) { public HarvesterBlockEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) {
super(type, pos, state); super(type, pos, state);
} }

View file

@ -8,9 +8,9 @@ import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext; import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext;
import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionMatrices; import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionMatrices;
import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionRenderDispatcher; import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionRenderDispatcher;
import com.simibubi.create.foundation.blockEntity.renderer.SafeBlockEntityRenderer;
import com.simibubi.create.foundation.render.CachedBufferer; import com.simibubi.create.foundation.render.CachedBufferer;
import com.simibubi.create.foundation.render.SuperByteBuffer; import com.simibubi.create.foundation.render.SuperByteBuffer;
import com.simibubi.create.foundation.tileEntity.renderer.SafeTileEntityRenderer;
import com.simibubi.create.foundation.utility.AngleHelper; import com.simibubi.create.foundation.utility.AngleHelper;
import com.simibubi.create.foundation.utility.AnimationTickHolder; import com.simibubi.create.foundation.utility.AnimationTickHolder;
import com.simibubi.create.foundation.utility.VecHelper; import com.simibubi.create.foundation.utility.VecHelper;
@ -24,18 +24,18 @@ import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.phys.Vec3; import net.minecraft.world.phys.Vec3;
public class HarvesterRenderer extends SafeTileEntityRenderer<HarvesterTileEntity> { public class HarvesterRenderer extends SafeBlockEntityRenderer<HarvesterBlockEntity> {
public HarvesterRenderer(BlockEntityRendererProvider.Context context) { public HarvesterRenderer(BlockEntityRendererProvider.Context context) {
} }
@Override @Override
protected void renderSafe(HarvesterTileEntity te, float partialTicks, PoseStack ms, MultiBufferSource buffer, protected void renderSafe(HarvesterBlockEntity be, float partialTicks, PoseStack ms, MultiBufferSource buffer,
int light, int overlay) { int light, int overlay) {
BlockState blockState = te.getBlockState(); BlockState blockState = be.getBlockState();
SuperByteBuffer superBuffer = CachedBufferer.partial(AllBlockPartials.HARVESTER_BLADE, blockState); SuperByteBuffer superBuffer = CachedBufferer.partial(AllBlockPartials.HARVESTER_BLADE, blockState);
transform(te.getLevel(), blockState.getValue(HarvesterBlock.FACING), superBuffer, transform(be.getLevel(), blockState.getValue(HarvesterBlock.FACING), superBuffer,
te.getAnimatedSpeed()); be.getAnimatedSpeed());
superBuffer.light(light) superBuffer.light(light)
.renderInto(ms, buffer.getBuffer(RenderType.cutoutMipped())); .renderInto(ms, buffer.getBuffer(RenderType.cutoutMipped()));
} }

View file

@ -6,12 +6,12 @@ import com.jozufozu.flywheel.api.instance.TickableInstance;
import com.jozufozu.flywheel.backend.instancing.blockentity.BlockEntityInstance; import com.jozufozu.flywheel.backend.instancing.blockentity.BlockEntityInstance;
import com.simibubi.create.foundation.utility.AnimationTickHolder; import com.simibubi.create.foundation.utility.AnimationTickHolder;
public class PSIInstance extends BlockEntityInstance<PortableStorageInterfaceTileEntity> implements DynamicInstance, TickableInstance { public class PSIInstance extends BlockEntityInstance<PortableStorageInterfaceBlockEntity> implements DynamicInstance, TickableInstance {
private final PIInstance instance; private final PIInstance instance;
public PSIInstance(MaterialManager materialManager, PortableStorageInterfaceTileEntity tile) { public PSIInstance(MaterialManager materialManager, PortableStorageInterfaceBlockEntity blockEntity) {
super(materialManager, tile); super(materialManager, blockEntity);
instance = new PIInstance(materialManager, blockState, getInstancePosition()); instance = new PIInstance(materialManager, blockState, getInstancePosition());
} }

View file

@ -12,11 +12,11 @@ import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.capability.IFluidHandler; import net.minecraftforge.fluids.capability.IFluidHandler;
import net.minecraftforge.fluids.capability.templates.FluidTank; import net.minecraftforge.fluids.capability.templates.FluidTank;
public class PortableFluidInterfaceTileEntity extends PortableStorageInterfaceTileEntity { public class PortableFluidInterfaceBlockEntity extends PortableStorageInterfaceBlockEntity {
protected LazyOptional<IFluidHandler> capability; protected LazyOptional<IFluidHandler> capability;
public PortableFluidInterfaceTileEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) { public PortableFluidInterfaceBlockEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) {
super(type, pos, state); super(type, pos, state);
capability = createEmptyHandler(); capability = createEmptyHandler();
} }

View file

@ -13,11 +13,11 @@ import net.minecraftforge.common.util.LazyOptional;
import net.minecraftforge.items.IItemHandlerModifiable; import net.minecraftforge.items.IItemHandlerModifiable;
import net.minecraftforge.items.ItemStackHandler; import net.minecraftforge.items.ItemStackHandler;
public class PortableItemInterfaceTileEntity extends PortableStorageInterfaceTileEntity { public class PortableItemInterfaceBlockEntity extends PortableStorageInterfaceBlockEntity {
protected LazyOptional<IItemHandlerModifiable> capability; protected LazyOptional<IItemHandlerModifiable> capability;
public PortableItemInterfaceTileEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) { public PortableItemInterfaceBlockEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) {
super(type, pos, state); super(type, pos, state);
capability = createEmptyHandler(); capability = createEmptyHandler();
} }

View file

@ -2,10 +2,10 @@ package com.simibubi.create.content.contraptions.components.actors;
import javax.annotation.ParametersAreNonnullByDefault; import javax.annotation.ParametersAreNonnullByDefault;
import com.simibubi.create.AllBlockEntityTypes;
import com.simibubi.create.AllShapes; import com.simibubi.create.AllShapes;
import com.simibubi.create.AllTileEntities;
import com.simibubi.create.foundation.advancement.AdvancementBehaviour; import com.simibubi.create.foundation.advancement.AdvancementBehaviour;
import com.simibubi.create.foundation.block.ITE; import com.simibubi.create.foundation.block.IBE;
import com.simibubi.create.foundation.block.WrenchableDirectionalBlock; import com.simibubi.create.foundation.block.WrenchableDirectionalBlock;
import net.minecraft.MethodsReturnNonnullByDefault; import net.minecraft.MethodsReturnNonnullByDefault;
@ -25,7 +25,7 @@ import net.minecraft.world.phys.shapes.VoxelShape;
@ParametersAreNonnullByDefault @ParametersAreNonnullByDefault
@MethodsReturnNonnullByDefault @MethodsReturnNonnullByDefault
public class PortableStorageInterfaceBlock extends WrenchableDirectionalBlock public class PortableStorageInterfaceBlock extends WrenchableDirectionalBlock
implements ITE<PortableStorageInterfaceTileEntity> { implements IBE<PortableStorageInterfaceBlockEntity> {
boolean fluids; boolean fluids;
@ -45,7 +45,7 @@ public class PortableStorageInterfaceBlock extends WrenchableDirectionalBlock
@Override @Override
public void neighborChanged(BlockState state, Level world, BlockPos pos, Block p_220069_4_, BlockPos p_220069_5_, public void neighborChanged(BlockState state, Level world, BlockPos pos, Block p_220069_4_, BlockPos p_220069_5_,
boolean p_220069_6_) { boolean p_220069_6_) {
withTileEntityDo(world, pos, PortableStorageInterfaceTileEntity::neighbourChanged); withBlockEntityDo(world, pos, PortableStorageInterfaceBlockEntity::neighbourChanged);
} }
@Override @Override
@ -75,19 +75,19 @@ public class PortableStorageInterfaceBlock extends WrenchableDirectionalBlock
@Override @Override
public int getAnalogOutputSignal(BlockState blockState, Level worldIn, BlockPos pos) { public int getAnalogOutputSignal(BlockState blockState, Level worldIn, BlockPos pos) {
return getTileEntityOptional(worldIn, pos).map(te -> te.isConnected() ? 15 : 0) return getBlockEntityOptional(worldIn, pos).map(be -> be.isConnected() ? 15 : 0)
.orElse(0); .orElse(0);
} }
@Override @Override
public Class<PortableStorageInterfaceTileEntity> getTileEntityClass() { public Class<PortableStorageInterfaceBlockEntity> getBlockEntityClass() {
return PortableStorageInterfaceTileEntity.class; return PortableStorageInterfaceBlockEntity.class;
} }
@Override @Override
public BlockEntityType<? extends PortableStorageInterfaceTileEntity> getTileEntityType() { public BlockEntityType<? extends PortableStorageInterfaceBlockEntity> getBlockEntityType() {
return fluids ? AllTileEntities.PORTABLE_FLUID_INTERFACE.get() return fluids ? AllBlockEntityTypes.PORTABLE_FLUID_INTERFACE.get()
: AllTileEntities.PORTABLE_STORAGE_INTERFACE.get(); : AllBlockEntityTypes.PORTABLE_STORAGE_INTERFACE.get();
} }
} }

View file

@ -5,9 +5,9 @@ import java.util.List;
import com.simibubi.create.content.contraptions.components.structureMovement.AbstractContraptionEntity; import com.simibubi.create.content.contraptions.components.structureMovement.AbstractContraptionEntity;
import com.simibubi.create.content.contraptions.components.structureMovement.Contraption; import com.simibubi.create.content.contraptions.components.structureMovement.Contraption;
import com.simibubi.create.foundation.advancement.AllAdvancements; import com.simibubi.create.foundation.advancement.AllAdvancements;
import com.simibubi.create.foundation.blockEntity.BlockEntityBehaviour;
import com.simibubi.create.foundation.blockEntity.SmartBlockEntity;
import com.simibubi.create.foundation.config.AllConfigs; import com.simibubi.create.foundation.config.AllConfigs;
import com.simibubi.create.foundation.tileEntity.SmartTileEntity;
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
import com.simibubi.create.foundation.utility.animation.LerpedFloat; import com.simibubi.create.foundation.utility.animation.LerpedFloat;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
@ -18,7 +18,7 @@ import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.AABB;
public abstract class PortableStorageInterfaceTileEntity extends SmartTileEntity { public abstract class PortableStorageInterfaceBlockEntity extends SmartBlockEntity {
public static final int ANIMATION = 4; public static final int ANIMATION = 4;
protected int transferTimer; protected int transferTimer;
@ -29,7 +29,7 @@ public abstract class PortableStorageInterfaceTileEntity extends SmartTileEntity
public int keepAlive = 0; public int keepAlive = 0;
public PortableStorageInterfaceTileEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) { public PortableStorageInterfaceBlockEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) {
super(type, pos, state); super(type, pos, state);
transferTimer = 0; transferTimer = 0;
connectionAnimation = LerpedFloat.linear() connectionAnimation = LerpedFloat.linear()
@ -195,7 +195,7 @@ public abstract class PortableStorageInterfaceTileEntity extends SmartTileEntity
} }
@Override @Override
public void addBehaviours(List<TileEntityBehaviour> behaviours) { public void addBehaviours(List<BlockEntityBehaviour> behaviours) {
registerAwardables(behaviours, AllAdvancements.PSI); registerAwardables(behaviours, AllAdvancements.PSI);
} }

View file

@ -98,7 +98,7 @@ public class PortableStorageInterfaceMovement implements MovementBehaviour {
if (!currentFacingIfValid.isPresent()) if (!currentFacingIfValid.isPresent())
return; return;
PortableStorageInterfaceTileEntity stationaryInterface = PortableStorageInterfaceBlockEntity stationaryInterface =
getStationaryInterfaceAt(context.world, pos, context.state, currentFacingIfValid.get()); getStationaryInterfaceAt(context.world, pos, context.state, currentFacingIfValid.get());
if (stationaryInterface == null) { if (stationaryInterface == null) {
reset(context); reset(context);
@ -108,7 +108,7 @@ public class PortableStorageInterfaceMovement implements MovementBehaviour {
if (stationaryInterface.connectedEntity == null) if (stationaryInterface.connectedEntity == null)
stationaryInterface.startTransferringTo(context.contraption, stationaryInterface.distance); stationaryInterface.startTransferringTo(context.contraption, stationaryInterface.distance);
boolean timerBelow = stationaryInterface.transferTimer <= PortableStorageInterfaceTileEntity.ANIMATION; boolean timerBelow = stationaryInterface.transferTimer <= PortableStorageInterfaceBlockEntity.ANIMATION;
stationaryInterface.keepAlive = 2; stationaryInterface.keepAlive = 2;
if (context.stall && timerBelow) { if (context.stall && timerBelow) {
context.stall = false; context.stall = false;
@ -123,7 +123,7 @@ public class PortableStorageInterfaceMovement implements MovementBehaviour {
return false; return false;
Direction currentFacing = currentFacingIfValid.get(); Direction currentFacing = currentFacingIfValid.get();
PortableStorageInterfaceTileEntity psi = PortableStorageInterfaceBlockEntity psi =
findStationaryInterface(context.world, pos, context.state, currentFacing); findStationaryInterface(context.world, pos, context.state, currentFacing);
if (psi == null) if (psi == null)
@ -165,10 +165,10 @@ public class PortableStorageInterfaceMovement implements MovementBehaviour {
getAnimation(context).chase(0, 0.25f, Chaser.LINEAR); getAnimation(context).chase(0, 0.25f, Chaser.LINEAR);
} }
private PortableStorageInterfaceTileEntity findStationaryInterface(Level world, BlockPos pos, BlockState state, private PortableStorageInterfaceBlockEntity findStationaryInterface(Level world, BlockPos pos, BlockState state,
Direction facing) { Direction facing) {
for (int i = 0; i < 2; i++) { for (int i = 0; i < 2; i++) {
PortableStorageInterfaceTileEntity interfaceAt = PortableStorageInterfaceBlockEntity interfaceAt =
getStationaryInterfaceAt(world, pos.relative(facing, i), state, facing); getStationaryInterfaceAt(world, pos.relative(facing, i), state, facing);
if (interfaceAt == null) if (interfaceAt == null)
continue; continue;
@ -177,10 +177,10 @@ public class PortableStorageInterfaceMovement implements MovementBehaviour {
return null; return null;
} }
private PortableStorageInterfaceTileEntity getStationaryInterfaceAt(Level world, BlockPos pos, BlockState state, private PortableStorageInterfaceBlockEntity getStationaryInterfaceAt(Level world, BlockPos pos, BlockState state,
Direction facing) { Direction facing) {
BlockEntity te = world.getBlockEntity(pos); BlockEntity blockEntity = world.getBlockEntity(pos);
if (!(te instanceof PortableStorageInterfaceTileEntity psi)) if (!(blockEntity instanceof PortableStorageInterfaceBlockEntity psi))
return null; return null;
BlockState blockState = world.getBlockState(pos); BlockState blockState = world.getBlockState(pos);
if (blockState.getBlock() != state.getBlock()) if (blockState.getBlock() != state.getBlock())

View file

@ -12,9 +12,9 @@ import com.simibubi.create.AllBlocks;
import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext; import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext;
import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionMatrices; import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionMatrices;
import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionRenderDispatcher; import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionRenderDispatcher;
import com.simibubi.create.foundation.blockEntity.renderer.SafeBlockEntityRenderer;
import com.simibubi.create.foundation.render.CachedBufferer; import com.simibubi.create.foundation.render.CachedBufferer;
import com.simibubi.create.foundation.render.SuperByteBuffer; import com.simibubi.create.foundation.render.SuperByteBuffer;
import com.simibubi.create.foundation.tileEntity.renderer.SafeTileEntityRenderer;
import com.simibubi.create.foundation.utility.AngleHelper; import com.simibubi.create.foundation.utility.AngleHelper;
import com.simibubi.create.foundation.utility.AnimationTickHolder; import com.simibubi.create.foundation.utility.AnimationTickHolder;
import com.simibubi.create.foundation.utility.animation.LerpedFloat; import com.simibubi.create.foundation.utility.animation.LerpedFloat;
@ -28,20 +28,20 @@ import net.minecraft.nbt.NbtUtils;
import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.BlockState;
public class PortableStorageInterfaceRenderer extends SafeTileEntityRenderer<PortableStorageInterfaceTileEntity> { public class PortableStorageInterfaceRenderer extends SafeBlockEntityRenderer<PortableStorageInterfaceBlockEntity> {
public PortableStorageInterfaceRenderer(BlockEntityRendererProvider.Context context) {} public PortableStorageInterfaceRenderer(BlockEntityRendererProvider.Context context) {}
@Override @Override
protected void renderSafe(PortableStorageInterfaceTileEntity te, float partialTicks, PoseStack ms, protected void renderSafe(PortableStorageInterfaceBlockEntity be, float partialTicks, PoseStack ms,
MultiBufferSource buffer, int light, int overlay) { MultiBufferSource buffer, int light, int overlay) {
if (Backend.canUseInstancing(te.getLevel())) if (Backend.canUseInstancing(be.getLevel()))
return; return;
BlockState blockState = te.getBlockState(); BlockState blockState = be.getBlockState();
float progress = te.getExtensionDistance(partialTicks); float progress = be.getExtensionDistance(partialTicks);
VertexConsumer vb = buffer.getBuffer(RenderType.solid()); VertexConsumer vb = buffer.getBuffer(RenderType.solid());
render(blockState, te.isConnected(), progress, null, sbb -> sbb.light(light) render(blockState, be.isConnected(), progress, null, sbb -> sbb.light(light)
.renderInto(ms, vb)); .renderInto(ms, vb));
} }
@ -86,14 +86,14 @@ public class PortableStorageInterfaceRenderer extends SafeTileEntityRenderer<Por
.unCentre(); .unCentre();
} }
static PortableStorageInterfaceTileEntity getTargetPSI(MovementContext context) { static PortableStorageInterfaceBlockEntity getTargetPSI(MovementContext context) {
String _workingPos_ = PortableStorageInterfaceMovement._workingPos_; String _workingPos_ = PortableStorageInterfaceMovement._workingPos_;
if (!context.data.contains(_workingPos_)) if (!context.data.contains(_workingPos_))
return null; return null;
BlockPos pos = NbtUtils.readBlockPos(context.data.getCompound(_workingPos_)); BlockPos pos = NbtUtils.readBlockPos(context.data.getCompound(_workingPos_));
BlockEntity tileEntity = context.world.getBlockEntity(pos); BlockEntity blockEntity = context.world.getBlockEntity(pos);
if (!(tileEntity instanceof PortableStorageInterfaceTileEntity psi)) if (!(blockEntity instanceof PortableStorageInterfaceBlockEntity psi))
return null; return null;
if (!psi.isTransferring()) if (!psi.isTransferring())

View file

@ -4,8 +4,8 @@ import java.util.Optional;
import com.jozufozu.flywheel.core.virtual.VirtualRenderWorld; import com.jozufozu.flywheel.core.virtual.VirtualRenderWorld;
import com.simibubi.create.content.contraptions.components.saw.SawBlock; import com.simibubi.create.content.contraptions.components.saw.SawBlock;
import com.simibubi.create.content.contraptions.components.saw.SawBlockEntity;
import com.simibubi.create.content.contraptions.components.saw.SawRenderer; import com.simibubi.create.content.contraptions.components.saw.SawRenderer;
import com.simibubi.create.content.contraptions.components.saw.SawTileEntity;
import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext; import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext;
import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionMatrices; import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionMatrices;
import com.simibubi.create.foundation.utility.AbstractBlockBreakQueue; import com.simibubi.create.foundation.utility.AbstractBlockBreakQueue;
@ -59,7 +59,7 @@ public class SawMovementBehaviour extends BlockBreakingMovementBehaviour {
@Override @Override
public boolean canBreak(Level world, BlockPos breakingPos, BlockState state) { public boolean canBreak(Level world, BlockPos breakingPos, BlockState state) {
return super.canBreak(world, breakingPos, state) && SawTileEntity.isSawable(state); return super.canBreak(world, breakingPos, state) && SawBlockEntity.isSawable(state);
} }
@Override @Override

View file

@ -1,10 +1,10 @@
package com.simibubi.create.content.contraptions.components.actors.controls; package com.simibubi.create.content.contraptions.components.actors.controls;
import com.simibubi.create.AllBlockEntityTypes;
import com.simibubi.create.AllShapes; import com.simibubi.create.AllShapes;
import com.simibubi.create.AllSoundEvents; import com.simibubi.create.AllSoundEvents;
import com.simibubi.create.AllTileEntities;
import com.simibubi.create.content.contraptions.components.structureMovement.interaction.controls.ControlsBlock; import com.simibubi.create.content.contraptions.components.structureMovement.interaction.controls.ControlsBlock;
import com.simibubi.create.foundation.block.ITE; import com.simibubi.create.foundation.block.IBE;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionHand;
@ -19,7 +19,7 @@ import net.minecraft.world.phys.BlockHitResult;
import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.CollisionContext;
import net.minecraft.world.phys.shapes.VoxelShape; import net.minecraft.world.phys.shapes.VoxelShape;
public class ContraptionControlsBlock extends ControlsBlock implements ITE<ContraptionControlsTileEntity> { public class ContraptionControlsBlock extends ControlsBlock implements IBE<ContraptionControlsBlockEntity> {
public ContraptionControlsBlock(Properties pProperties) { public ContraptionControlsBlock(Properties pProperties) {
super(pProperties); super(pProperties);
@ -28,12 +28,12 @@ public class ContraptionControlsBlock extends ControlsBlock implements ITE<Contr
@Override @Override
public InteractionResult use(BlockState pState, Level pLevel, BlockPos pPos, Player pPlayer, InteractionHand pHand, public InteractionResult use(BlockState pState, Level pLevel, BlockPos pPos, Player pPlayer, InteractionHand pHand,
BlockHitResult pHit) { BlockHitResult pHit) {
return onTileEntityUse(pLevel, pPos, cte -> { return onBlockEntityUse(pLevel, pPos, cte -> {
cte.pressButton(); cte.pressButton();
cte.disabled = !cte.disabled; cte.disabled = !cte.disabled;
cte.notifyUpdate(); cte.notifyUpdate();
if (!pLevel.isClientSide()) { if (!pLevel.isClientSide()) {
ContraptionControlsTileEntity.sendStatus(pPlayer, cte.filtering.getFilter(), !cte.disabled); ContraptionControlsBlockEntity.sendStatus(pPlayer, cte.filtering.getFilter(), !cte.disabled);
AllSoundEvents.CONTROLLER_CLICK.play(cte.getLevel(), null, cte.getBlockPos(), 1, AllSoundEvents.CONTROLLER_CLICK.play(cte.getLevel(), null, cte.getBlockPos(), 1,
cte.disabled ? 0.8f : 1.5f); cte.disabled ? 0.8f : 1.5f);
} }
@ -44,7 +44,7 @@ public class ContraptionControlsBlock extends ControlsBlock implements ITE<Contr
@Override @Override
public void neighborChanged(BlockState pState, Level pLevel, BlockPos pPos, Block pBlock, BlockPos pFromPos, public void neighborChanged(BlockState pState, Level pLevel, BlockPos pPos, Block pBlock, BlockPos pFromPos,
boolean pIsMoving) { boolean pIsMoving) {
withTileEntityDo(pLevel, pPos, ContraptionControlsTileEntity::updatePoweredState); withBlockEntityDo(pLevel, pPos, ContraptionControlsBlockEntity::updatePoweredState);
} }
@Override @Override
@ -53,13 +53,13 @@ public class ContraptionControlsBlock extends ControlsBlock implements ITE<Contr
} }
@Override @Override
public Class<ContraptionControlsTileEntity> getTileEntityClass() { public Class<ContraptionControlsBlockEntity> getBlockEntityClass() {
return ContraptionControlsTileEntity.class; return ContraptionControlsBlockEntity.class;
} }
@Override @Override
public BlockEntityType<? extends ContraptionControlsTileEntity> getTileEntityType() { public BlockEntityType<? extends ContraptionControlsBlockEntity> getBlockEntityType() {
return AllTileEntities.CONTRAPTION_CONTROLS.get(); return AllBlockEntityTypes.CONTRAPTION_CONTROLS.get();
} }
} }

View file

@ -5,10 +5,10 @@ import java.util.List;
import com.jozufozu.flywheel.util.transform.TransformStack; import com.jozufozu.flywheel.util.transform.TransformStack;
import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.PoseStack;
import com.simibubi.create.content.contraptions.components.structureMovement.interaction.controls.ControlsBlock; import com.simibubi.create.content.contraptions.components.structureMovement.interaction.controls.ControlsBlock;
import com.simibubi.create.foundation.tileEntity.SmartTileEntity; import com.simibubi.create.foundation.blockEntity.BlockEntityBehaviour;
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour; import com.simibubi.create.foundation.blockEntity.SmartBlockEntity;
import com.simibubi.create.foundation.tileEntity.behaviour.ValueBoxTransform; import com.simibubi.create.foundation.blockEntity.behaviour.ValueBoxTransform;
import com.simibubi.create.foundation.tileEntity.behaviour.filtering.FilteringBehaviour; import com.simibubi.create.foundation.blockEntity.behaviour.filtering.FilteringBehaviour;
import com.simibubi.create.foundation.utility.AngleHelper; import com.simibubi.create.foundation.utility.AngleHelper;
import com.simibubi.create.foundation.utility.DyeHelper; import com.simibubi.create.foundation.utility.DyeHelper;
import com.simibubi.create.foundation.utility.Lang; import com.simibubi.create.foundation.utility.Lang;
@ -28,7 +28,7 @@ import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.phys.Vec3; import net.minecraft.world.phys.Vec3;
public class ContraptionControlsTileEntity extends SmartTileEntity { public class ContraptionControlsBlockEntity extends SmartBlockEntity {
public FilteringBehaviour filtering; public FilteringBehaviour filtering;
public boolean disabled; public boolean disabled;
@ -37,7 +37,7 @@ public class ContraptionControlsTileEntity extends SmartTileEntity {
public LerpedFloat indicator; public LerpedFloat indicator;
public LerpedFloat button; public LerpedFloat button;
public ContraptionControlsTileEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) { public ContraptionControlsBlockEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) {
super(type, pos, state); super(type, pos, state);
indicator = LerpedFloat.angular() indicator = LerpedFloat.angular()
.startWithValue(0); .startWithValue(0);
@ -47,7 +47,7 @@ public class ContraptionControlsTileEntity extends SmartTileEntity {
} }
@Override @Override
public void addBehaviours(List<TileEntityBehaviour> behaviours) { public void addBehaviours(List<BlockEntityBehaviour> behaviours) {
behaviours.add(filtering = new FilteringBehaviour(this, new ControlsSlot()).moveText(new Vec3(-30, 20, 10))); behaviours.add(filtering = new FilteringBehaviour(this, new ControlsSlot()).moveText(new Vec3(-30, 20, 10)));
} }

View file

@ -29,15 +29,15 @@ public class ContraptionControlsMovement implements MovementBehaviour {
@Override @Override
public void startMoving(MovementContext context) { public void startMoving(MovementContext context) {
if (context.contraption instanceof ElevatorContraption && context.tileData != null) if (context.contraption instanceof ElevatorContraption && context.blockEntityData != null)
context.tileData.remove("Filter"); context.blockEntityData.remove("Filter");
} }
@Override @Override
public void stopMoving(MovementContext context) { public void stopMoving(MovementContext context) {
ItemStack filter = getFilter(context); ItemStack filter = getFilter(context);
if (filter != null) if (filter != null)
context.tileData.putBoolean("Disabled", context.contraption.isActorTypeDisabled(filter) context.blockEntityData.putBoolean("Disabled", context.contraption.isActorTypeDisabled(filter)
|| context.contraption.isActorTypeDisabled(ItemStack.EMPTY)); || context.contraption.isActorTypeDisabled(ItemStack.EMPTY));
} }
@ -48,14 +48,14 @@ public class ContraptionControlsMovement implements MovementBehaviour {
} }
public static ItemStack getFilter(MovementContext ctx) { public static ItemStack getFilter(MovementContext ctx) {
CompoundTag tileData = ctx.tileData; CompoundTag blockEntityData = ctx.blockEntityData;
if (tileData == null) if (blockEntityData == null)
return null; return null;
return ItemStack.of(tileData.getCompound("Filter")); return ItemStack.of(blockEntityData.getCompound("Filter"));
} }
public static boolean isDisabledInitially(MovementContext ctx) { public static boolean isDisabledInitially(MovementContext ctx) {
return ctx.tileData != null && ctx.tileData.getBoolean("Disabled"); return ctx.blockEntityData != null && ctx.blockEntityData.getBoolean("Disabled");
} }
@Override @Override
@ -65,15 +65,15 @@ public class ContraptionControlsMovement implements MovementBehaviour {
Contraption contraption = ctx.contraption; Contraption contraption = ctx.contraption;
if (!(contraption instanceof ElevatorContraption ec)) { if (!(contraption instanceof ElevatorContraption ec)) {
if (!(contraption.presentTileEntities.get(ctx.localPos)instanceof ContraptionControlsTileEntity cte)) if (!(contraption.presentBlockEntities.get(ctx.localPos) instanceof ContraptionControlsBlockEntity cbe))
return; return;
ItemStack filter = getFilter(ctx); ItemStack filter = getFilter(ctx);
int value = int value =
contraption.isActorTypeDisabled(filter) || contraption.isActorTypeDisabled(ItemStack.EMPTY) ? 4 * 45 contraption.isActorTypeDisabled(filter) || contraption.isActorTypeDisabled(ItemStack.EMPTY) ? 4 * 45
: 0; : 0;
cte.indicator.setValue(value); cbe.indicator.setValue(value);
cte.indicator.updateChaseTarget(value); cbe.indicator.updateChaseTarget(value);
cte.tickAnimations(); cbe.tickAnimations();
return; return;
} }
@ -83,15 +83,15 @@ public class ContraptionControlsMovement implements MovementBehaviour {
ElevatorFloorSelection efs = (ElevatorFloorSelection) ctx.temporaryData; ElevatorFloorSelection efs = (ElevatorFloorSelection) ctx.temporaryData;
tickFloorSelection(efs, ec); tickFloorSelection(efs, ec);
if (!(contraption.presentTileEntities.get(ctx.localPos)instanceof ContraptionControlsTileEntity cte)) if (!(contraption.presentBlockEntities.get(ctx.localPos) instanceof ContraptionControlsBlockEntity cbe))
return; return;
cte.tickAnimations(); cbe.tickAnimations();
int currentY = (int) Math.round(contraption.entity.getY() + ec.getContactYOffset()); int currentY = (int) Math.round(contraption.entity.getY() + ec.getContactYOffset());
boolean atTargetY = ec.clientYTarget == currentY; boolean atTargetY = ec.clientYTarget == currentY;
LerpedFloat indicator = cte.indicator; LerpedFloat indicator = cbe.indicator;
float currentIndicator = indicator.getChaseTarget(); float currentIndicator = indicator.getChaseTarget();
boolean below = atTargetY ? currentIndicator > 0 : ec.clientYTarget <= currentY; boolean below = atTargetY ? currentIndicator > 0 : ec.clientYTarget <= currentY;
@ -99,7 +99,7 @@ public class ContraptionControlsMovement implements MovementBehaviour {
int startingPoint = below ? 181 : -181; int startingPoint = below ? 181 : -181;
indicator.setValue(startingPoint); indicator.setValue(startingPoint);
indicator.updateChaseTarget(startingPoint); indicator.updateChaseTarget(startingPoint);
cte.tickAnimations(); cbe.tickAnimations();
return; return;
} }
@ -139,7 +139,7 @@ public class ContraptionControlsMovement implements MovementBehaviour {
} }
@Override @Override
public boolean renderAsNormalTileEntity() { public boolean renderAsNormalBlockEntity() {
return true; return true;
} }

View file

@ -41,7 +41,7 @@ public class ContraptionControlsMovingInteraction extends MovingInteractionBehav
if (contraption instanceof ElevatorContraption ec) if (contraption instanceof ElevatorContraption ec)
return elevatorInteraction(localPos, contraptionEntity, ec, ctx); return elevatorInteraction(localPos, contraptionEntity, ec, ctx);
if (contraptionEntity.level.isClientSide()) { if (contraptionEntity.level.isClientSide()) {
if (contraption.presentTileEntities.get(ctx.localPos)instanceof ContraptionControlsTileEntity cte) if (contraption.presentBlockEntities.get(ctx.localPos)instanceof ContraptionControlsBlockEntity cte)
cte.pressButton(); cte.pressButton();
return true; return true;
} }
@ -91,7 +91,7 @@ public class ContraptionControlsMovingInteraction extends MovingInteractionBehav
disabledActors.add(filter); disabledActors.add(filter);
contraption.setActorsActive(filter, !disable); contraption.setActorsActive(filter, !disable);
ContraptionControlsTileEntity.sendStatus(player, filter, !disable); ContraptionControlsBlockEntity.sendStatus(player, filter, !disable);
send(contraptionEntity, filter, disable); send(contraptionEntity, filter, disable);
AllSoundEvents.CONTROLLER_CLICK.play(player.level, null, AllSoundEvents.CONTROLLER_CLICK.play(player.level, null,
@ -119,7 +119,7 @@ public class ContraptionControlsMovingInteraction extends MovingInteractionBehav
return false; return false;
AllPackets.channel.sendToServer(new ElevatorTargetFloorPacket(contraptionEntity, efs.currentTargetY)); AllPackets.channel.sendToServer(new ElevatorTargetFloorPacket(contraptionEntity, efs.currentTargetY));
if (contraption.presentTileEntities.get(ctx.localPos)instanceof ContraptionControlsTileEntity cte) if (contraption.presentBlockEntities.get(ctx.localPos)instanceof ContraptionControlsBlockEntity cte)
cte.pressButton(); cte.pressButton();
return true; return true;
} }

View file

@ -12,8 +12,8 @@ import com.simibubi.create.content.contraptions.components.actors.controls.Contr
import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext; import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext;
import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionMatrices; import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionMatrices;
import com.simibubi.create.content.logistics.block.redstone.NixieTubeRenderer; import com.simibubi.create.content.logistics.block.redstone.NixieTubeRenderer;
import com.simibubi.create.foundation.blockEntity.renderer.SmartBlockEntityRenderer;
import com.simibubi.create.foundation.render.CachedBufferer; import com.simibubi.create.foundation.render.CachedBufferer;
import com.simibubi.create.foundation.tileEntity.renderer.SmartTileEntityRenderer;
import com.simibubi.create.foundation.utility.AngleHelper; import com.simibubi.create.foundation.utility.AngleHelper;
import com.simibubi.create.foundation.utility.AnimationTickHolder; import com.simibubi.create.foundation.utility.AnimationTickHolder;
import com.simibubi.create.foundation.utility.Color; import com.simibubi.create.foundation.utility.Color;
@ -33,7 +33,7 @@ import net.minecraft.world.item.DyeColor;
import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.phys.Vec3; import net.minecraft.world.phys.Vec3;
public class ContraptionControlsRenderer extends SmartTileEntityRenderer<ContraptionControlsTileEntity> { public class ContraptionControlsRenderer extends SmartBlockEntityRenderer<ContraptionControlsBlockEntity> {
private static Random r = new Random(); private static Random r = new Random();
@ -42,17 +42,17 @@ public class ContraptionControlsRenderer extends SmartTileEntityRenderer<Contrap
} }
@Override @Override
protected void renderSafe(ContraptionControlsTileEntity tileEntityIn, float pt, PoseStack ms, protected void renderSafe(ContraptionControlsBlockEntity blockEntity, float pt, PoseStack ms,
MultiBufferSource buffer, int light, int overlay) { MultiBufferSource buffer, int light, int overlay) {
BlockState blockState = tileEntityIn.getBlockState(); BlockState blockState = blockEntity.getBlockState();
Direction facing = blockState.getValue(ContraptionControlsBlock.FACING) Direction facing = blockState.getValue(ContraptionControlsBlock.FACING)
.getOpposite(); .getOpposite();
Vec3 buttonAxis = VecHelper.rotate(new Vec3(0, 1, -.325), AngleHelper.horizontalAngle(facing), Axis.Y) Vec3 buttonAxis = VecHelper.rotate(new Vec3(0, 1, -.325), AngleHelper.horizontalAngle(facing), Axis.Y)
.scale(-1 / 24f * tileEntityIn.button.getValue(pt)); .scale(-1 / 24f * blockEntity.button.getValue(pt));
ms.pushPose(); ms.pushPose();
ms.translate(buttonAxis.x, buttonAxis.y, buttonAxis.z); ms.translate(buttonAxis.x, buttonAxis.y, buttonAxis.z);
super.renderSafe(tileEntityIn, pt, ms, buffer, light, overlay); super.renderSafe(blockEntity, pt, ms, buffer, light, overlay);
VertexConsumer vc = buffer.getBuffer(RenderType.solid()); VertexConsumer vc = buffer.getBuffer(RenderType.solid());
CachedBufferer.partialFacing(AllBlockPartials.CONTRAPTION_CONTROLS_BUTTON, blockState, facing) CachedBufferer.partialFacing(AllBlockPartials.CONTRAPTION_CONTROLS_BUTTON, blockState, facing)
@ -61,7 +61,7 @@ public class ContraptionControlsRenderer extends SmartTileEntityRenderer<Contrap
ms.popPose(); ms.popPose();
int i = (((int) tileEntityIn.indicator.getValue(pt) / 45) % 8) + 8; int i = (((int) blockEntity.indicator.getValue(pt) / 45) % 8) + 8;
CachedBufferer.partialFacing(AllBlockPartials.CONTRAPTION_CONTROLS_INDICATOR.get(i % 8), blockState, facing) CachedBufferer.partialFacing(AllBlockPartials.CONTRAPTION_CONTROLS_INDICATOR.get(i % 8), blockState, facing)
.light(light) .light(light)
.renderInto(ms, vc); .renderInto(ms, vc);
@ -101,7 +101,7 @@ public class ContraptionControlsRenderer extends SmartTileEntityRenderer<Contrap
msr.rotate(Direction.WEST, AngleHelper.rad(67.5f)); msr.rotate(Direction.WEST, AngleHelper.rad(67.5f));
float buttondepth = -.25f; float buttondepth = -.25f;
if (ctx.contraption.presentTileEntities.get(ctx.localPos)instanceof ContraptionControlsTileEntity cte) if (ctx.contraption.presentBlockEntities.get(ctx.localPos)instanceof ContraptionControlsBlockEntity cte)
buttondepth += -1 / 24f * cte.button.getValue(AnimationTickHolder.getPartialTicks(renderWorld)); buttondepth += -1 / 24f * cte.button.getValue(AnimationTickHolder.getPartialTicks(renderWorld));
if (!text.isBlank() && playerDistance < 100) { if (!text.isBlank() && playerDistance < 100) {

View file

@ -79,7 +79,7 @@ public class DispenserMovementBehaviour extends DropperMovementBehaviour {
return; return;
} }
} catch (NullPointerException ignored) { } catch (NullPointerException ignored) {
itemStack = backup; // Something went wrong with the TE being null in ContraptionBlockSource, reset the stack itemStack = backup; // Something went wrong with the BE being null in ContraptionBlockSource, reset the stack
} }
setItemStackAt(location, DEFAULT_BEHAVIOUR.dispense(itemStack, context, pos), context); // the default: launch the item setItemStackAt(location, DEFAULT_BEHAVIOUR.dispense(itemStack, context, pos), context); // the default: launch the item

View file

@ -50,7 +50,7 @@ public class DropperMovementBehaviour implements MovementBehaviour {
private void updateTemporaryData(MovementContext context) { private void updateTemporaryData(MovementContext context) {
if (!(context.temporaryData instanceof NonNullList) && context.world != null) { if (!(context.temporaryData instanceof NonNullList) && context.world != null) {
NonNullList<ItemStack> stacks = NonNullList.withSize(getInvSize(), ItemStack.EMPTY); NonNullList<ItemStack> stacks = NonNullList.withSize(getInvSize(), ItemStack.EMPTY);
ContainerHelper.loadAllItems(context.tileData, stacks); ContainerHelper.loadAllItems(context.blockEntityData, stacks);
context.temporaryData = stacks; context.temporaryData = stacks;
} }
} }
@ -84,7 +84,7 @@ public class DropperMovementBehaviour implements MovementBehaviour {
NonNullList<ItemStack> stacks = getStacks(context); NonNullList<ItemStack> stacks = getStacks(context);
if (stacks == null) if (stacks == null)
return; return;
ContainerHelper.saveAllItems(context.tileData, stacks); ContainerHelper.saveAllItems(context.blockEntityData, stacks);
} }
@Override @Override

View file

@ -20,12 +20,12 @@ public abstract class MovedProjectileDispenserBehaviour extends MovedDefaultDisp
double x = pos.getX() + facing.x * .7 + .5; double x = pos.getX() + facing.x * .7 + .5;
double y = pos.getY() + facing.y * .7 + .5; double y = pos.getY() + facing.y * .7 + .5;
double z = pos.getZ() + facing.z * .7 + .5; double z = pos.getZ() + facing.z * .7 + .5;
Projectile ProjectileEntity = this.getProjectileEntity(context.world, x, y, z, itemStack.copy()); Projectile projectile = this.getProjectileEntity(context.world, x, y, z, itemStack.copy());
if (ProjectileEntity == null) if (projectile == null)
return itemStack; return itemStack;
Vec3 effectiveMovementVec = facing.scale(getProjectileVelocity()).add(context.motion); Vec3 effectiveMovementVec = facing.scale(getProjectileVelocity()).add(context.motion);
ProjectileEntity.shoot(effectiveMovementVec.x, effectiveMovementVec.y, effectiveMovementVec.z, (float) effectiveMovementVec.length(), this.getProjectileInaccuracy()); projectile.shoot(effectiveMovementVec.x, effectiveMovementVec.y, effectiveMovementVec.z, (float) effectiveMovementVec.length(), this.getProjectileInaccuracy());
context.world.addFreshEntity(ProjectileEntity); context.world.addFreshEntity(projectile);
itemStack.shrink(1); itemStack.shrink(1);
return itemStack; return itemStack;
} }

View file

@ -1,9 +1,9 @@
package com.simibubi.create.content.contraptions.components.clock; package com.simibubi.create.content.contraptions.components.clock;
import com.simibubi.create.AllBlockEntityTypes;
import com.simibubi.create.AllShapes; import com.simibubi.create.AllShapes;
import com.simibubi.create.AllTileEntities;
import com.simibubi.create.content.contraptions.base.HorizontalKineticBlock; import com.simibubi.create.content.contraptions.base.HorizontalKineticBlock;
import com.simibubi.create.foundation.block.ITE; import com.simibubi.create.foundation.block.IBE;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
@ -21,7 +21,7 @@ import net.minecraft.world.level.pathfinder.PathComputationType;
import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.CollisionContext;
import net.minecraft.world.phys.shapes.VoxelShape; import net.minecraft.world.phys.shapes.VoxelShape;
public class CuckooClockBlock extends HorizontalKineticBlock implements ITE<CuckooClockTileEntity> { public class CuckooClockBlock extends HorizontalKineticBlock implements IBE<CuckooClockBlockEntity> {
private boolean mysterious; private boolean mysterious;
@ -79,13 +79,13 @@ public class CuckooClockBlock extends HorizontalKineticBlock implements ITE<Cuck
} }
@Override @Override
public Class<CuckooClockTileEntity> getTileEntityClass() { public Class<CuckooClockBlockEntity> getBlockEntityClass() {
return CuckooClockTileEntity.class; return CuckooClockBlockEntity.class;
} }
@Override @Override
public BlockEntityType<? extends CuckooClockTileEntity> getTileEntityType() { public BlockEntityType<? extends CuckooClockBlockEntity> getBlockEntityType() {
return AllTileEntities.CUCKOO_CLOCK.get(); return AllBlockEntityTypes.CUCKOO_CLOCK.get();
} }
} }

View file

@ -2,9 +2,9 @@ package com.simibubi.create.content.contraptions.components.clock;
import java.util.List; import java.util.List;
import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.content.contraptions.base.KineticBlockEntity;
import com.simibubi.create.foundation.advancement.AllAdvancements; import com.simibubi.create.foundation.advancement.AllAdvancements;
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour; import com.simibubi.create.foundation.blockEntity.BlockEntityBehaviour;
import com.simibubi.create.foundation.utility.AnimationTickHolder; import com.simibubi.create.foundation.utility.AnimationTickHolder;
import com.simibubi.create.foundation.utility.NBTHelper; import com.simibubi.create.foundation.utility.NBTHelper;
import com.simibubi.create.foundation.utility.VecHelper; import com.simibubi.create.foundation.utility.VecHelper;
@ -24,7 +24,7 @@ import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.phys.Vec3; import net.minecraft.world.phys.Vec3;
public class CuckooClockTileEntity extends KineticTileEntity { public class CuckooClockBlockEntity extends KineticBlockEntity {
public static DamageSource CUCKOO_SURPRISE = new DamageSource("create.cuckoo_clock_explosion").setExplosion(); public static DamageSource CUCKOO_SURPRISE = new DamageSource("create.cuckoo_clock_explosion").setExplosion();
@ -38,13 +38,13 @@ public class CuckooClockTileEntity extends KineticTileEntity {
PIG, CREEPER, SURPRISE, NONE; PIG, CREEPER, SURPRISE, NONE;
} }
public CuckooClockTileEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) { public CuckooClockBlockEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) {
super(type, pos, state); super(type, pos, state);
animationType = Animation.NONE; animationType = Animation.NONE;
} }
@Override @Override
public void addBehaviours(List<TileEntityBehaviour> behaviours) { public void addBehaviours(List<BlockEntityBehaviour> behaviours) {
super.addBehaviours(behaviours); super.addBehaviours(behaviours);
registerAwardables(behaviours, AllAdvancements.CUCKOO_CLOCK); registerAwardables(behaviours, AllAdvancements.CUCKOO_CLOCK);
} }

View file

@ -4,9 +4,9 @@ import com.jozufozu.flywheel.core.PartialModel;
import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.blaze3d.vertex.VertexConsumer; import com.mojang.blaze3d.vertex.VertexConsumer;
import com.simibubi.create.AllBlockPartials; import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.content.contraptions.base.KineticBlockEntity;
import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer; import com.simibubi.create.content.contraptions.base.KineticBlockEntityRenderer;
import com.simibubi.create.content.contraptions.components.clock.CuckooClockTileEntity.Animation; import com.simibubi.create.content.contraptions.components.clock.CuckooClockBlockEntity.Animation;
import com.simibubi.create.foundation.render.CachedBufferer; import com.simibubi.create.foundation.render.CachedBufferer;
import com.simibubi.create.foundation.render.SuperByteBuffer; import com.simibubi.create.foundation.render.SuperByteBuffer;
import com.simibubi.create.foundation.utility.AngleHelper; import com.simibubi.create.foundation.utility.AngleHelper;
@ -18,21 +18,21 @@ import net.minecraft.core.Direction;
import net.minecraft.util.Mth; import net.minecraft.util.Mth;
import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.BlockState;
public class CuckooClockRenderer extends KineticTileEntityRenderer { public class CuckooClockRenderer extends KineticBlockEntityRenderer {
public CuckooClockRenderer(BlockEntityRendererProvider.Context context) { public CuckooClockRenderer(BlockEntityRendererProvider.Context context) {
super(context); super(context);
} }
@Override @Override
protected void renderSafe(KineticTileEntity te, float partialTicks, PoseStack ms, MultiBufferSource buffer, protected void renderSafe(KineticBlockEntity be, float partialTicks, PoseStack ms, MultiBufferSource buffer,
int light, int overlay) { int light, int overlay) {
super.renderSafe(te, partialTicks, ms, buffer, light, overlay); super.renderSafe(be, partialTicks, ms, buffer, light, overlay);
if (!(te instanceof CuckooClockTileEntity)) if (!(be instanceof CuckooClockBlockEntity))
return; return;
CuckooClockTileEntity clock = (CuckooClockTileEntity) te; CuckooClockBlockEntity clock = (CuckooClockBlockEntity) be;
BlockState blockState = te.getBlockState(); BlockState blockState = be.getBlockState();
Direction direction = blockState.getValue(CuckooClockBlock.HORIZONTAL_FACING); Direction direction = blockState.getValue(CuckooClockBlock.HORIZONTAL_FACING);
VertexConsumer vb = buffer.getBuffer(RenderType.solid()); VertexConsumer vb = buffer.getBuffer(RenderType.solid());
@ -90,7 +90,7 @@ public class CuckooClockRenderer extends KineticTileEntityRenderer {
} }
@Override @Override
protected SuperByteBuffer getRotatedModel(KineticTileEntity te, BlockState state) { protected SuperByteBuffer getRotatedModel(KineticBlockEntity be, BlockState state) {
return CachedBufferer.partialFacing(AllBlockPartials.SHAFT_HALF, state, state return CachedBufferer.partialFacing(AllBlockPartials.SHAFT_HALF, state, state
.getValue(CuckooClockBlock.HORIZONTAL_FACING) .getValue(CuckooClockBlock.HORIZONTAL_FACING)
.getOpposite()); .getOpposite());

View file

@ -53,8 +53,8 @@ public class ConnectedInputHandler {
} }
public static void toggleConnection(Level world, BlockPos pos, BlockPos pos2) { public static void toggleConnection(Level world, BlockPos pos, BlockPos pos2) {
MechanicalCrafterTileEntity crafter1 = CrafterHelper.getCrafter(world, pos); MechanicalCrafterBlockEntity crafter1 = CrafterHelper.getCrafter(world, pos);
MechanicalCrafterTileEntity crafter2 = CrafterHelper.getCrafter(world, pos2); MechanicalCrafterBlockEntity crafter2 = CrafterHelper.getCrafter(world, pos2);
if (crafter1 == null || crafter2 == null) if (crafter1 == null || crafter2 == null)
return; return;
@ -65,7 +65,7 @@ public class ConnectedInputHandler {
.offset(crafter2.input.data.get(0)); .offset(crafter2.input.data.get(0));
if (controllerPos1.equals(controllerPos2)) { if (controllerPos1.equals(controllerPos2)) {
MechanicalCrafterTileEntity controller = CrafterHelper.getCrafter(world, controllerPos1); MechanicalCrafterBlockEntity controller = CrafterHelper.getCrafter(world, controllerPos1);
Set<BlockPos> positions = controller.input.data.stream() Set<BlockPos> positions = controller.input.data.stream()
.map(controllerPos1::offset) .map(controllerPos1::offset)
@ -114,7 +114,7 @@ public class ConnectedInputHandler {
crafter2.connectivityChanged(); crafter2.connectivityChanged();
} }
public static void initAndAddAll(Level world, MechanicalCrafterTileEntity crafter, Collection<BlockPos> positions) { public static void initAndAddAll(Level world, MechanicalCrafterBlockEntity crafter, Collection<BlockPos> positions) {
crafter.input = new ConnectedInput(); crafter.input = new ConnectedInput();
positions.forEach(splitPos -> { positions.forEach(splitPos -> {
modifyAndUpdate(world, splitPos, input -> { modifyAndUpdate(world, splitPos, input -> {
@ -124,8 +124,8 @@ public class ConnectedInputHandler {
}); });
} }
public static void connectControllers(Level world, MechanicalCrafterTileEntity crafter1, public static void connectControllers(Level world, MechanicalCrafterBlockEntity crafter1,
MechanicalCrafterTileEntity crafter2) { MechanicalCrafterBlockEntity crafter2) {
crafter1.input.data.forEach(offset -> { crafter1.input.data.forEach(offset -> {
BlockPos connectedPos = crafter1.getBlockPos() BlockPos connectedPos = crafter1.getBlockPos()
@ -150,11 +150,11 @@ public class ConnectedInputHandler {
} }
private static void modifyAndUpdate(Level world, BlockPos pos, Consumer<ConnectedInput> callback) { private static void modifyAndUpdate(Level world, BlockPos pos, Consumer<ConnectedInput> callback) {
BlockEntity te = world.getBlockEntity(pos); BlockEntity blockEntity = world.getBlockEntity(pos);
if (!(te instanceof MechanicalCrafterTileEntity)) if (!(blockEntity instanceof MechanicalCrafterBlockEntity))
return; return;
MechanicalCrafterTileEntity crafter = (MechanicalCrafterTileEntity) te; MechanicalCrafterBlockEntity crafter = (MechanicalCrafterBlockEntity) blockEntity;
callback.accept(crafter.input); callback.accept(crafter.input);
crafter.setChanged(); crafter.setChanged();
crafter.connectivityChanged(); crafter.connectivityChanged();

View file

@ -6,15 +6,15 @@ import net.minecraft.world.level.block.entity.BlockEntity;
public class CrafterHelper { public class CrafterHelper {
public static MechanicalCrafterTileEntity getCrafter(BlockAndTintGetter reader, BlockPos pos) { public static MechanicalCrafterBlockEntity getCrafter(BlockAndTintGetter reader, BlockPos pos) {
BlockEntity te = reader.getBlockEntity(pos); BlockEntity blockEntity = reader.getBlockEntity(pos);
if (!(te instanceof MechanicalCrafterTileEntity)) if (!(blockEntity instanceof MechanicalCrafterBlockEntity))
return null; return null;
return (MechanicalCrafterTileEntity) te; return (MechanicalCrafterBlockEntity) blockEntity;
} }
public static ConnectedInputHandler.ConnectedInput getInput(BlockAndTintGetter reader, BlockPos pos) { public static ConnectedInputHandler.ConnectedInput getInput(BlockAndTintGetter reader, BlockPos pos) {
MechanicalCrafterTileEntity crafter = getCrafter(reader, pos); MechanicalCrafterBlockEntity crafter = getCrafter(reader, pos);
return crafter == null ? null : crafter.input; return crafter == null ? null : crafter.input;
} }

View file

@ -1,16 +1,16 @@
package com.simibubi.create.content.contraptions.components.crafter; package com.simibubi.create.content.contraptions.components.crafter;
import com.simibubi.create.AllBlockEntityTypes;
import com.simibubi.create.AllBlocks; import com.simibubi.create.AllBlocks;
import com.simibubi.create.AllItems; import com.simibubi.create.AllItems;
import com.simibubi.create.AllTileEntities;
import com.simibubi.create.content.contraptions.base.HorizontalKineticBlock; import com.simibubi.create.content.contraptions.base.HorizontalKineticBlock;
import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.content.contraptions.base.KineticBlockEntity;
import com.simibubi.create.content.contraptions.components.crafter.ConnectedInputHandler.ConnectedInput; 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.components.crafter.MechanicalCrafterBlockEntity.Phase;
import com.simibubi.create.content.contraptions.relays.elementary.ICogWheel; import com.simibubi.create.content.contraptions.relays.elementary.ICogWheel;
import com.simibubi.create.foundation.block.ITE; import com.simibubi.create.foundation.block.IBE;
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour; import com.simibubi.create.foundation.blockEntity.BlockEntityBehaviour;
import com.simibubi.create.foundation.tileEntity.behaviour.inventory.InvManipulationBehaviour; import com.simibubi.create.foundation.blockEntity.behaviour.inventory.InvManipulationBehaviour;
import com.simibubi.create.foundation.utility.AngleHelper; import com.simibubi.create.foundation.utility.AngleHelper;
import com.simibubi.create.foundation.utility.Iterate; import com.simibubi.create.foundation.utility.Iterate;
import com.simibubi.create.foundation.utility.Pointing; import com.simibubi.create.foundation.utility.Pointing;
@ -42,7 +42,7 @@ import net.minecraftforge.items.ItemHandlerHelper;
import net.minecraftforge.items.ItemStackHandler; import net.minecraftforge.items.ItemStackHandler;
public class MechanicalCrafterBlock extends HorizontalKineticBlock public class MechanicalCrafterBlock extends HorizontalKineticBlock
implements ITE<MechanicalCrafterTileEntity>, ICogWheel { implements IBE<MechanicalCrafterBlockEntity>, ICogWheel {
public static final EnumProperty<Pointing> POINTING = EnumProperty.create("pointing", Pointing.class); public static final EnumProperty<Pointing> POINTING = EnumProperty.create("pointing", Pointing.class);
@ -89,14 +89,14 @@ public class MechanicalCrafterBlock extends HorizontalKineticBlock
public void onRemove(BlockState state, Level worldIn, BlockPos pos, BlockState newState, boolean isMoving) { public void onRemove(BlockState state, Level worldIn, BlockPos pos, BlockState newState, boolean isMoving) {
if (state.getBlock() == newState.getBlock()) { if (state.getBlock() == newState.getBlock()) {
if (getTargetDirection(state) != getTargetDirection(newState)) { if (getTargetDirection(state) != getTargetDirection(newState)) {
MechanicalCrafterTileEntity crafter = CrafterHelper.getCrafter(worldIn, pos); MechanicalCrafterBlockEntity crafter = CrafterHelper.getCrafter(worldIn, pos);
if (crafter != null) if (crafter != null)
crafter.blockChanged(); crafter.blockChanged();
} }
} }
if (state.hasBlockEntity() && !state.is(newState.getBlock())) { if (state.hasBlockEntity() && !state.is(newState.getBlock())) {
MechanicalCrafterTileEntity crafter = CrafterHelper.getCrafter(worldIn, pos); MechanicalCrafterBlockEntity crafter = CrafterHelper.getCrafter(worldIn, pos);
if (crafter != null) { if (crafter != null) {
if (crafter.covered) if (crafter.covered)
Block.popResource(worldIn, pos, AllItems.CRAFTER_SLOT_COVER.asStack()); Block.popResource(worldIn, pos, AllItems.CRAFTER_SLOT_COVER.asStack());
@ -145,7 +145,7 @@ public class MechanicalCrafterBlock extends HorizontalKineticBlock
public InteractionResult onWrenched(BlockState state, UseOnContext context) { public InteractionResult onWrenched(BlockState state, UseOnContext context) {
if (context.getClickedFace() == state.getValue(HORIZONTAL_FACING)) { if (context.getClickedFace() == state.getValue(HORIZONTAL_FACING)) {
if (!context.getLevel().isClientSide) if (!context.getLevel().isClientSide)
KineticTileEntity.switchToBlockState(context.getLevel(), context.getClickedPos(), KineticBlockEntity.switchToBlockState(context.getLevel(), context.getClickedPos(),
state.cycle(POINTING)); state.cycle(POINTING));
return InteractionResult.SUCCESS; return InteractionResult.SUCCESS;
} }
@ -156,8 +156,8 @@ public class MechanicalCrafterBlock extends HorizontalKineticBlock
@Override @Override
public InteractionResult use(BlockState state, Level worldIn, BlockPos pos, Player player, InteractionHand handIn, public InteractionResult use(BlockState state, Level worldIn, BlockPos pos, Player player, InteractionHand handIn,
BlockHitResult hit) { BlockHitResult hit) {
BlockEntity te = worldIn.getBlockEntity(pos); BlockEntity blockEntity = worldIn.getBlockEntity(pos);
if (!(te instanceof MechanicalCrafterTileEntity crafter)) if (!(blockEntity instanceof MechanicalCrafterBlockEntity crafter))
return InteractionResult.PASS; return InteractionResult.PASS;
ItemStack heldItem = player.getItemInHand(handIn); ItemStack heldItem = player.getItemInHand(handIn);
@ -236,7 +236,7 @@ public class MechanicalCrafterBlock extends HorizontalKineticBlock
@Override @Override
public void neighborChanged(BlockState state, Level worldIn, BlockPos pos, Block blockIn, BlockPos fromPos, public void neighborChanged(BlockState state, Level worldIn, BlockPos pos, Block blockIn, BlockPos fromPos,
boolean isMoving) { boolean isMoving) {
InvManipulationBehaviour behaviour = TileEntityBehaviour.get(worldIn, pos, InvManipulationBehaviour.TYPE); InvManipulationBehaviour behaviour = BlockEntityBehaviour.get(worldIn, pos, InvManipulationBehaviour.TYPE);
if (behaviour != null) if (behaviour != null)
behaviour.onNeighborChanged(fromPos); behaviour.onNeighborChanged(fromPos);
} }
@ -279,13 +279,13 @@ public class MechanicalCrafterBlock extends HorizontalKineticBlock
} }
@Override @Override
public Class<MechanicalCrafterTileEntity> getTileEntityClass() { public Class<MechanicalCrafterBlockEntity> getBlockEntityClass() {
return MechanicalCrafterTileEntity.class; return MechanicalCrafterBlockEntity.class;
} }
@Override @Override
public BlockEntityType<? extends MechanicalCrafterTileEntity> getTileEntityType() { public BlockEntityType<? extends MechanicalCrafterBlockEntity> getBlockEntityType() {
return AllTileEntities.MECHANICAL_CRAFTER.get(); return AllBlockEntityTypes.MECHANICAL_CRAFTER.get();
} }
} }

View file

@ -12,15 +12,15 @@ import org.apache.commons.lang3.tuple.Pair;
import com.simibubi.create.AllBlocks; import com.simibubi.create.AllBlocks;
import com.simibubi.create.AllItems; import com.simibubi.create.AllItems;
import com.simibubi.create.AllSoundEvents; import com.simibubi.create.AllSoundEvents;
import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.content.contraptions.base.KineticBlockEntity;
import com.simibubi.create.content.contraptions.components.crafter.ConnectedInputHandler.ConnectedInput; import com.simibubi.create.content.contraptions.components.crafter.ConnectedInputHandler.ConnectedInput;
import com.simibubi.create.content.contraptions.components.crafter.RecipeGridHandler.GroupedItems; import com.simibubi.create.content.contraptions.components.crafter.RecipeGridHandler.GroupedItems;
import com.simibubi.create.foundation.advancement.AllAdvancements; import com.simibubi.create.foundation.advancement.AllAdvancements;
import com.simibubi.create.foundation.blockEntity.BlockEntityBehaviour;
import com.simibubi.create.foundation.blockEntity.behaviour.belt.DirectBeltInputBehaviour;
import com.simibubi.create.foundation.blockEntity.behaviour.edgeInteraction.EdgeInteractionBehaviour;
import com.simibubi.create.foundation.blockEntity.behaviour.inventory.InvManipulationBehaviour;
import com.simibubi.create.foundation.item.SmartInventory; import com.simibubi.create.foundation.item.SmartInventory;
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
import com.simibubi.create.foundation.tileEntity.behaviour.belt.DirectBeltInputBehaviour;
import com.simibubi.create.foundation.tileEntity.behaviour.edgeInteraction.EdgeInteractionBehaviour;
import com.simibubi.create.foundation.tileEntity.behaviour.inventory.InvManipulationBehaviour;
import com.simibubi.create.foundation.utility.BlockFace; import com.simibubi.create.foundation.utility.BlockFace;
import com.simibubi.create.foundation.utility.Pointing; import com.simibubi.create.foundation.utility.Pointing;
import com.simibubi.create.foundation.utility.VecHelper; import com.simibubi.create.foundation.utility.VecHelper;
@ -43,7 +43,7 @@ import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.common.util.LazyOptional;
import net.minecraftforge.items.IItemHandler; import net.minecraftforge.items.IItemHandler;
public class MechanicalCrafterTileEntity extends KineticTileEntity { public class MechanicalCrafterBlockEntity extends KineticBlockEntity {
enum Phase { enum Phase {
IDLE, ACCEPTING, ASSEMBLING, EXPORTING, WAITING, CRAFTING, INSERTING; IDLE, ACCEPTING, ASSEMBLING, EXPORTING, WAITING, CRAFTING, INSERTING;
@ -51,30 +51,30 @@ public class MechanicalCrafterTileEntity extends KineticTileEntity {
public static class Inventory extends SmartInventory { public static class Inventory extends SmartInventory {
private MechanicalCrafterTileEntity te; private MechanicalCrafterBlockEntity blockEntity;
public Inventory(MechanicalCrafterTileEntity te) { public Inventory(MechanicalCrafterBlockEntity blockEntity) {
super(1, te, 1, false); super(1, blockEntity, 1, false);
this.te = te; this.blockEntity = blockEntity;
forbidExtraction(); forbidExtraction();
whenContentsChanged(slot -> { whenContentsChanged(slot -> {
if (getItem(slot).isEmpty()) if (getItem(slot).isEmpty())
return; return;
if (te.phase == Phase.IDLE) if (blockEntity.phase == Phase.IDLE)
te.checkCompletedRecipe(false); blockEntity.checkCompletedRecipe(false);
}); });
} }
@Override @Override
public ItemStack insertItem(int slot, ItemStack stack, boolean simulate) { public ItemStack insertItem(int slot, ItemStack stack, boolean simulate) {
if (te.phase != Phase.IDLE) if (blockEntity.phase != Phase.IDLE)
return stack; return stack;
if (te.covered) if (blockEntity.covered)
return stack; return stack;
ItemStack insertItem = super.insertItem(slot, stack, simulate); ItemStack insertItem = super.insertItem(slot, stack, simulate);
if (insertItem.getCount() != stack.getCount() && !simulate) if (insertItem.getCount() != stack.getCount() && !simulate)
te.getLevel() blockEntity.getLevel()
.playSound(null, te.getBlockPos(), SoundEvents.ITEM_FRAME_ADD_ITEM, SoundSource.BLOCKS, .25f, .5f); .playSound(null, blockEntity.getBlockPos(), SoundEvents.ITEM_FRAME_ADD_ITEM, SoundSource.BLOCKS, .25f, .5f);
return insertItem; return insertItem;
} }
@ -97,7 +97,7 @@ public class MechanicalCrafterTileEntity extends KineticTileEntity {
private ItemStack scriptedResult = ItemStack.EMPTY; private ItemStack scriptedResult = ItemStack.EMPTY;
public MechanicalCrafterTileEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) { public MechanicalCrafterBlockEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) {
super(type, pos, state); super(type, pos, state);
setLazyTickRate(20); setLazyTickRate(20);
phase = Phase.IDLE; phase = Phase.IDLE;
@ -109,7 +109,7 @@ public class MechanicalCrafterTileEntity extends KineticTileEntity {
} }
@Override @Override
public void addBehaviours(List<TileEntityBehaviour> behaviours) { public void addBehaviours(List<BlockEntityBehaviour> behaviours) {
super.addBehaviours(behaviours); super.addBehaviours(behaviours);
inserting = new InvManipulationBehaviour(this, this::getTargetFace); inserting = new InvManipulationBehaviour(this, this::getTargetFace);
connectivity = new EdgeInteractionBehaviour(this, ConnectedInputHandler::toggleConnection) connectivity = new EdgeInteractionBehaviour(this, ConnectedInputHandler::toggleConnection)
@ -299,7 +299,7 @@ public class MechanicalCrafterTileEntity extends KineticTileEntity {
if (!runLogic) if (!runLogic)
return; return;
MechanicalCrafterTileEntity targetingCrafter = RecipeGridHandler.getTargetingCrafter(this); MechanicalCrafterBlockEntity targetingCrafter = RecipeGridHandler.getTargetingCrafter(this);
if (targetingCrafter == null) { if (targetingCrafter == null) {
ejectWholeGrid(); ejectWholeGrid();
return; return;
@ -387,7 +387,7 @@ public class MechanicalCrafterTileEntity extends KineticTileEntity {
protected DirectBeltInputBehaviour getTargetingBelt() { protected DirectBeltInputBehaviour getTargetingBelt() {
BlockPos targetPos = worldPosition.relative(getTargetDirection()); BlockPos targetPos = worldPosition.relative(getTargetDirection());
return TileEntityBehaviour.get(level, targetPos, DirectBeltInputBehaviour.TYPE); return BlockEntityBehaviour.get(level, targetPos, DirectBeltInputBehaviour.TYPE);
} }
public void tryInsert() { public void tryInsert() {
@ -425,10 +425,10 @@ public class MechanicalCrafterTileEntity extends KineticTileEntity {
} }
public void ejectWholeGrid() { public void ejectWholeGrid() {
List<MechanicalCrafterTileEntity> chain = RecipeGridHandler.getAllCraftersOfChain(this); List<MechanicalCrafterBlockEntity> chain = RecipeGridHandler.getAllCraftersOfChain(this);
if (chain == null) if (chain == null)
return; return;
chain.forEach(MechanicalCrafterTileEntity::eject); chain.forEach(MechanicalCrafterBlockEntity::eject);
} }
public void eject() { public void eject() {
@ -481,13 +481,13 @@ public class MechanicalCrafterTileEntity extends KineticTileEntity {
return; return;
if (level.isClientSide && !isVirtual()) if (level.isClientSide && !isVirtual())
return; return;
List<MechanicalCrafterTileEntity> chain = RecipeGridHandler.getAllCraftersOfChainIf(this, List<MechanicalCrafterBlockEntity> chain = RecipeGridHandler.getAllCraftersOfChainIf(this,
poweredStart ? MechanicalCrafterTileEntity::craftingItemPresent poweredStart ? MechanicalCrafterBlockEntity::craftingItemPresent
: MechanicalCrafterTileEntity::craftingItemOrCoverPresent, : MechanicalCrafterBlockEntity::craftingItemOrCoverPresent,
poweredStart); poweredStart);
if (chain == null) if (chain == null)
return; return;
chain.forEach(MechanicalCrafterTileEntity::begin); chain.forEach(MechanicalCrafterBlockEntity::begin);
} }
protected void begin() { protected void begin() {
@ -503,14 +503,14 @@ public class MechanicalCrafterTileEntity extends KineticTileEntity {
} }
protected void continueIfAllPrecedingFinished() { protected void continueIfAllPrecedingFinished() {
List<MechanicalCrafterTileEntity> preceding = RecipeGridHandler.getPrecedingCrafters(this); List<MechanicalCrafterBlockEntity> preceding = RecipeGridHandler.getPrecedingCrafters(this);
if (preceding == null) { if (preceding == null) {
ejectWholeGrid(); ejectWholeGrid();
return; return;
} }
for (MechanicalCrafterTileEntity mechanicalCrafterTileEntity : preceding) for (MechanicalCrafterBlockEntity blockEntity : preceding)
if (mechanicalCrafterTileEntity.phase != Phase.WAITING) if (blockEntity.phase != Phase.WAITING)
return; return;
phase = Phase.ASSEMBLING; phase = Phase.ASSEMBLING;

View file

@ -7,7 +7,7 @@ import com.jozufozu.flywheel.api.MaterialManager;
import com.jozufozu.flywheel.util.transform.TransformStack; import com.jozufozu.flywheel.util.transform.TransformStack;
import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.PoseStack;
import com.simibubi.create.AllBlockPartials; import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.content.contraptions.base.KineticBlockEntity;
import com.simibubi.create.content.contraptions.base.SingleRotatingInstance; import com.simibubi.create.content.contraptions.base.SingleRotatingInstance;
import com.simibubi.create.content.contraptions.base.flwdata.RotatingData; import com.simibubi.create.content.contraptions.base.flwdata.RotatingData;
@ -15,8 +15,8 @@ import net.minecraft.core.Direction;
public class MechanicalCrafterInstance extends SingleRotatingInstance { public class MechanicalCrafterInstance extends SingleRotatingInstance {
public MechanicalCrafterInstance(MaterialManager modelManager, KineticTileEntity tile) { public MechanicalCrafterInstance(MaterialManager materialManager, KineticBlockEntity blockEntity) {
super(modelManager, tile); super(materialManager, blockEntity);
} }
@Override @Override

View file

@ -1,7 +1,7 @@
package com.simibubi.create.content.contraptions.components.crafter; package com.simibubi.create.content.contraptions.components.crafter;
import static com.simibubi.create.content.contraptions.base.HorizontalKineticBlock.HORIZONTAL_FACING; import static com.simibubi.create.content.contraptions.base.HorizontalKineticBlock.HORIZONTAL_FACING;
import static com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer.standardKineticRotationTransform; import static com.simibubi.create.content.contraptions.base.KineticBlockEntityRenderer.standardKineticRotationTransform;
import com.jozufozu.flywheel.backend.Backend; import com.jozufozu.flywheel.backend.Backend;
import com.jozufozu.flywheel.core.PartialModel; import com.jozufozu.flywheel.core.PartialModel;
@ -11,11 +11,11 @@ import com.mojang.blaze3d.vertex.VertexConsumer;
import com.mojang.math.Vector3f; import com.mojang.math.Vector3f;
import com.simibubi.create.AllBlockPartials; import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.AllSpriteShifts; import com.simibubi.create.AllSpriteShifts;
import com.simibubi.create.content.contraptions.components.crafter.MechanicalCrafterTileEntity.Phase; import com.simibubi.create.content.contraptions.components.crafter.MechanicalCrafterBlockEntity.Phase;
import com.simibubi.create.content.contraptions.components.crafter.RecipeGridHandler.GroupedItems; import com.simibubi.create.content.contraptions.components.crafter.RecipeGridHandler.GroupedItems;
import com.simibubi.create.foundation.blockEntity.renderer.SafeBlockEntityRenderer;
import com.simibubi.create.foundation.render.CachedBufferer; import com.simibubi.create.foundation.render.CachedBufferer;
import com.simibubi.create.foundation.render.SuperByteBuffer; import com.simibubi.create.foundation.render.SuperByteBuffer;
import com.simibubi.create.foundation.tileEntity.renderer.SafeTileEntityRenderer;
import com.simibubi.create.foundation.utility.AngleHelper; import com.simibubi.create.foundation.utility.AngleHelper;
import com.simibubi.create.foundation.utility.AnimationTickHolder; import com.simibubi.create.foundation.utility.AnimationTickHolder;
import com.simibubi.create.foundation.utility.Pointing; import com.simibubi.create.foundation.utility.Pointing;
@ -32,25 +32,25 @@ import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.phys.Vec3; import net.minecraft.world.phys.Vec3;
public class MechanicalCrafterRenderer extends SafeTileEntityRenderer<MechanicalCrafterTileEntity> { public class MechanicalCrafterRenderer extends SafeBlockEntityRenderer<MechanicalCrafterBlockEntity> {
public MechanicalCrafterRenderer(BlockEntityRendererProvider.Context context) { public MechanicalCrafterRenderer(BlockEntityRendererProvider.Context context) {
} }
@Override @Override
protected void renderSafe(MechanicalCrafterTileEntity te, float partialTicks, PoseStack ms, protected void renderSafe(MechanicalCrafterBlockEntity be, float partialTicks, PoseStack ms,
MultiBufferSource buffer, int light, int overlay) { MultiBufferSource buffer, int light, int overlay) {
ms.pushPose(); ms.pushPose();
Direction facing = te.getBlockState() Direction facing = be.getBlockState()
.getValue(HORIZONTAL_FACING); .getValue(HORIZONTAL_FACING);
Vec3 vec = Vec3.atLowerCornerOf(facing.getNormal()) Vec3 vec = Vec3.atLowerCornerOf(facing.getNormal())
.scale(.58) .scale(.58)
.add(.5, .5, .5); .add(.5, .5, .5);
if (te.phase == Phase.EXPORTING) { if (be.phase == Phase.EXPORTING) {
Direction targetDirection = MechanicalCrafterBlock.getTargetDirection(te.getBlockState()); Direction targetDirection = MechanicalCrafterBlock.getTargetDirection(be.getBlockState());
float progress = float progress =
Mth.clamp((1000 - te.countDown + te.getCountDownSpeed() * partialTicks) / 1000f, 0, 1); Mth.clamp((1000 - be.countDown + be.getCountDownSpeed() * partialTicks) / 1000f, 0, 1);
vec = vec.add(Vec3.atLowerCornerOf(targetDirection.getNormal()) vec = vec.add(Vec3.atLowerCornerOf(targetDirection.getNormal())
.scale(progress * .75f)); .scale(progress * .75f));
} }
@ -59,16 +59,16 @@ public class MechanicalCrafterRenderer extends SafeTileEntityRenderer<Mechanical
ms.scale(1 / 2f, 1 / 2f, 1 / 2f); ms.scale(1 / 2f, 1 / 2f, 1 / 2f);
float yRot = AngleHelper.horizontalAngle(facing); float yRot = AngleHelper.horizontalAngle(facing);
ms.mulPose(Vector3f.YP.rotationDegrees(yRot)); ms.mulPose(Vector3f.YP.rotationDegrees(yRot));
renderItems(te, partialTicks, ms, buffer, light, overlay); renderItems(be, partialTicks, ms, buffer, light, overlay);
ms.popPose(); ms.popPose();
renderFast(te, partialTicks, ms, buffer, light); renderFast(be, partialTicks, ms, buffer, light);
} }
public void renderItems(MechanicalCrafterTileEntity te, float partialTicks, PoseStack ms, public void renderItems(MechanicalCrafterBlockEntity be, float partialTicks, PoseStack ms,
MultiBufferSource buffer, int light, int overlay) { MultiBufferSource buffer, int light, int overlay) {
if (te.phase == Phase.IDLE) { if (be.phase == Phase.IDLE) {
ItemStack stack = te.getInventory() ItemStack stack = be.getInventory()
.getItem(0); .getItem(0);
if (!stack.isEmpty()) { if (!stack.isEmpty()) {
ms.pushPose(); ms.pushPose();
@ -81,16 +81,16 @@ public class MechanicalCrafterRenderer extends SafeTileEntityRenderer<Mechanical
} }
} else { } else {
// render grouped items // render grouped items
GroupedItems items = te.groupedItems; GroupedItems items = be.groupedItems;
float distance = .5f; float distance = .5f;
ms.pushPose(); ms.pushPose();
if (te.phase == Phase.CRAFTING) { if (be.phase == Phase.CRAFTING) {
items = te.groupedItemsBeforeCraft; items = be.groupedItemsBeforeCraft;
items.calcStats(); items.calcStats();
float progress = float progress =
Mth.clamp((2000 - te.countDown + te.getCountDownSpeed() * partialTicks) / 1000f, 0, 1); Mth.clamp((2000 - be.countDown + be.getCountDownSpeed() * partialTicks) / 1000f, 0, 1);
float earlyProgress = Mth.clamp(progress * 2, 0, 1); float earlyProgress = Mth.clamp(progress * 2, 0, 1);
float lateProgress = Mth.clamp(progress * 2 - 1, 0, 1); float lateProgress = Mth.clamp(progress * 2 - 1, 0, 1);
@ -102,7 +102,7 @@ public class MechanicalCrafterRenderer extends SafeTileEntityRenderer<Mechanical
distance += (-4 * (progress - .5f) * (progress - .5f) + 1) * .25f; distance += (-4 * (progress - .5f) * (progress - .5f) + 1) * .25f;
} }
boolean onlyRenderFirst = te.phase == Phase.INSERTING || te.phase == Phase.CRAFTING && te.countDown < 1000; boolean onlyRenderFirst = be.phase == Phase.INSERTING || be.phase == Phase.CRAFTING && be.countDown < 1000;
final float spacing = distance; final float spacing = distance;
items.grid.forEach((pair, stack) -> { items.grid.forEach((pair, stack) -> {
if (onlyRenderFirst && (pair.getLeft() if (onlyRenderFirst && (pair.getLeft()
@ -117,8 +117,8 @@ public class MechanicalCrafterRenderer extends SafeTileEntityRenderer<Mechanical
ms.translate(x * spacing, y * spacing, 0); ms.translate(x * spacing, y * spacing, 0);
int offset = 0; int offset = 0;
if (te.phase == Phase.EXPORTING && te.getBlockState().hasProperty(MechanicalCrafterBlock.POINTING)) { if (be.phase == Phase.EXPORTING && be.getBlockState().hasProperty(MechanicalCrafterBlock.POINTING)) {
Pointing value = te.getBlockState().getValue(MechanicalCrafterBlock.POINTING); Pointing value = be.getBlockState().getValue(MechanicalCrafterBlock.POINTING);
offset = value == Pointing.UP ? -1 : value == Pointing.LEFT ? 2 : value == Pointing.RIGHT ? -2 : 1; offset = value == Pointing.UP ? -1 : value == Pointing.LEFT ? 2 : value == Pointing.RIGHT ? -2 : 1;
} }
@ -133,10 +133,10 @@ public class MechanicalCrafterRenderer extends SafeTileEntityRenderer<Mechanical
ms.popPose(); ms.popPose();
if (te.phase == Phase.CRAFTING) { if (be.phase == Phase.CRAFTING) {
items = te.groupedItems; items = be.groupedItems;
float progress = float progress =
Mth.clamp((1000 - te.countDown + te.getCountDownSpeed() * partialTicks) / 1000f, 0, 1); Mth.clamp((1000 - be.countDown + be.getCountDownSpeed() * partialTicks) / 1000f, 0, 1);
float earlyProgress = Mth.clamp(progress * 2, 0, 1); float earlyProgress = Mth.clamp(progress * 2, 0, 1);
float lateProgress = Mth.clamp(progress * 2 - 1, 0, 1); float lateProgress = Mth.clamp(progress * 2 - 1, 0, 1);
@ -164,14 +164,14 @@ public class MechanicalCrafterRenderer extends SafeTileEntityRenderer<Mechanical
} }
} }
public void renderFast(MechanicalCrafterTileEntity te, float partialTicks, PoseStack ms, MultiBufferSource buffer, public void renderFast(MechanicalCrafterBlockEntity be, float partialTicks, PoseStack ms, MultiBufferSource buffer,
int light) { int light) {
BlockState blockState = te.getBlockState(); BlockState blockState = be.getBlockState();
VertexConsumer vb = buffer.getBuffer(RenderType.solid()); VertexConsumer vb = buffer.getBuffer(RenderType.solid());
if (!Backend.canUseInstancing(te.getLevel())) { if (!Backend.canUseInstancing(be.getLevel())) {
SuperByteBuffer superBuffer = CachedBufferer.partial(AllBlockPartials.SHAFTLESS_COGWHEEL, blockState); SuperByteBuffer superBuffer = CachedBufferer.partial(AllBlockPartials.SHAFTLESS_COGWHEEL, blockState);
standardKineticRotationTransform(superBuffer, te, light); standardKineticRotationTransform(superBuffer, be, light);
superBuffer.rotateCentered(Direction.UP, (float) (blockState.getValue(HORIZONTAL_FACING) superBuffer.rotateCentered(Direction.UP, (float) (blockState.getValue(HORIZONTAL_FACING)
.getAxis() != Direction.Axis.X ? 0 : Math.PI / 2)); .getAxis() != Direction.Axis.X ? 0 : Math.PI / 2));
superBuffer.rotateCentered(Direction.EAST, (float) (Math.PI / 2)); superBuffer.rotateCentered(Direction.EAST, (float) (Math.PI / 2));
@ -179,21 +179,21 @@ public class MechanicalCrafterRenderer extends SafeTileEntityRenderer<Mechanical
} }
Direction targetDirection = MechanicalCrafterBlock.getTargetDirection(blockState); Direction targetDirection = MechanicalCrafterBlock.getTargetDirection(blockState);
BlockPos pos = te.getBlockPos(); BlockPos pos = be.getBlockPos();
if ((te.covered || te.phase != Phase.IDLE) && te.phase != Phase.CRAFTING && te.phase != Phase.INSERTING) { if ((be.covered || be.phase != Phase.IDLE) && be.phase != Phase.CRAFTING && be.phase != Phase.INSERTING) {
SuperByteBuffer lidBuffer = renderAndTransform(AllBlockPartials.MECHANICAL_CRAFTER_LID, blockState); SuperByteBuffer lidBuffer = renderAndTransform(AllBlockPartials.MECHANICAL_CRAFTER_LID, blockState);
lidBuffer.light(light) lidBuffer.light(light)
.renderInto(ms, vb); .renderInto(ms, vb);
} }
if (MechanicalCrafterBlock.isValidTarget(te.getLevel(), pos.relative(targetDirection), blockState)) { if (MechanicalCrafterBlock.isValidTarget(be.getLevel(), pos.relative(targetDirection), blockState)) {
SuperByteBuffer beltBuffer = renderAndTransform(AllBlockPartials.MECHANICAL_CRAFTER_BELT, blockState); SuperByteBuffer beltBuffer = renderAndTransform(AllBlockPartials.MECHANICAL_CRAFTER_BELT, blockState);
SuperByteBuffer beltFrameBuffer = SuperByteBuffer beltFrameBuffer =
renderAndTransform(AllBlockPartials.MECHANICAL_CRAFTER_BELT_FRAME, blockState); renderAndTransform(AllBlockPartials.MECHANICAL_CRAFTER_BELT_FRAME, blockState);
if (te.phase == Phase.EXPORTING) { if (be.phase == Phase.EXPORTING) {
int textureIndex = (int) ((te.getCountDownSpeed() / 128f * AnimationTickHolder.getTicks())); int textureIndex = (int) ((be.getCountDownSpeed() / 128f * AnimationTickHolder.getTicks()));
beltBuffer.shiftUVtoSheet(AllSpriteShifts.CRAFTER_THINGIES, (textureIndex % 4) / 4f, 0, 1); beltBuffer.shiftUVtoSheet(AllSpriteShifts.CRAFTER_THINGIES, (textureIndex % 4) / 4f, 0, 1);
} }

View file

@ -34,20 +34,20 @@ import net.minecraft.world.level.block.state.BlockState;
public class RecipeGridHandler { public class RecipeGridHandler {
public static List<MechanicalCrafterTileEntity> getAllCraftersOfChain(MechanicalCrafterTileEntity root) { public static List<MechanicalCrafterBlockEntity> getAllCraftersOfChain(MechanicalCrafterBlockEntity root) {
return getAllCraftersOfChainIf(root, Predicates.alwaysTrue()); return getAllCraftersOfChainIf(root, Predicates.alwaysTrue());
} }
public static List<MechanicalCrafterTileEntity> getAllCraftersOfChainIf(MechanicalCrafterTileEntity root, public static List<MechanicalCrafterBlockEntity> getAllCraftersOfChainIf(MechanicalCrafterBlockEntity root,
Predicate<MechanicalCrafterTileEntity> test) { Predicate<MechanicalCrafterBlockEntity> test) {
return getAllCraftersOfChainIf(root, test, false); return getAllCraftersOfChainIf(root, test, false);
} }
public static List<MechanicalCrafterTileEntity> getAllCraftersOfChainIf(MechanicalCrafterTileEntity root, public static List<MechanicalCrafterBlockEntity> getAllCraftersOfChainIf(MechanicalCrafterBlockEntity root,
Predicate<MechanicalCrafterTileEntity> test, boolean poweredStart) { Predicate<MechanicalCrafterBlockEntity> test, boolean poweredStart) {
List<MechanicalCrafterTileEntity> crafters = new ArrayList<>(); List<MechanicalCrafterBlockEntity> crafters = new ArrayList<>();
List<Pair<MechanicalCrafterTileEntity, MechanicalCrafterTileEntity>> frontier = new ArrayList<>(); List<Pair<MechanicalCrafterBlockEntity, MechanicalCrafterBlockEntity>> frontier = new ArrayList<>();
Set<MechanicalCrafterTileEntity> visited = new HashSet<>(); Set<MechanicalCrafterBlockEntity> visited = new HashSet<>();
frontier.add(Pair.of(root, null)); frontier.add(Pair.of(root, null));
boolean powered = false; boolean powered = false;
@ -55,9 +55,9 @@ public class RecipeGridHandler {
boolean allEmpty = true; boolean allEmpty = true;
while (!frontier.isEmpty()) { while (!frontier.isEmpty()) {
Pair<MechanicalCrafterTileEntity, MechanicalCrafterTileEntity> pair = frontier.remove(0); Pair<MechanicalCrafterBlockEntity, MechanicalCrafterBlockEntity> pair = frontier.remove(0);
MechanicalCrafterTileEntity current = pair.getKey(); MechanicalCrafterBlockEntity current = pair.getKey();
MechanicalCrafterTileEntity last = pair.getValue(); MechanicalCrafterBlockEntity last = pair.getValue();
if (visited.contains(current)) if (visited.contains(current))
return null; return null;
@ -72,10 +72,10 @@ public class RecipeGridHandler {
crafters.add(current); crafters.add(current);
visited.add(current); visited.add(current);
MechanicalCrafterTileEntity target = getTargetingCrafter(current); MechanicalCrafterBlockEntity target = getTargetingCrafter(current);
if (target != last && target != null) if (target != last && target != null)
frontier.add(Pair.of(target, current)); frontier.add(Pair.of(target, current));
for (MechanicalCrafterTileEntity preceding : getPrecedingCrafters(current)) for (MechanicalCrafterBlockEntity preceding : getPrecedingCrafters(current))
if (preceding != last) if (preceding != last)
frontier.add(Pair.of(preceding, current)); frontier.add(Pair.of(preceding, current));
} }
@ -83,29 +83,29 @@ public class RecipeGridHandler {
return empty && !powered || allEmpty ? null : crafters; return empty && !powered || allEmpty ? null : crafters;
} }
public static MechanicalCrafterTileEntity getTargetingCrafter(MechanicalCrafterTileEntity crafter) { public static MechanicalCrafterBlockEntity getTargetingCrafter(MechanicalCrafterBlockEntity crafter) {
BlockState state = crafter.getBlockState(); BlockState state = crafter.getBlockState();
if (!isCrafter(state)) if (!isCrafter(state))
return null; return null;
BlockPos targetPos = crafter.getBlockPos() BlockPos targetPos = crafter.getBlockPos()
.relative(MechanicalCrafterBlock.getTargetDirection(state)); .relative(MechanicalCrafterBlock.getTargetDirection(state));
MechanicalCrafterTileEntity targetTE = CrafterHelper.getCrafter(crafter.getLevel(), targetPos); MechanicalCrafterBlockEntity targetBE = CrafterHelper.getCrafter(crafter.getLevel(), targetPos);
if (targetTE == null) if (targetBE == null)
return null; return null;
BlockState targetState = targetTE.getBlockState(); BlockState targetState = targetBE.getBlockState();
if (!isCrafter(targetState)) if (!isCrafter(targetState))
return null; return null;
if (state.getValue(HORIZONTAL_FACING) != targetState.getValue(HORIZONTAL_FACING)) if (state.getValue(HORIZONTAL_FACING) != targetState.getValue(HORIZONTAL_FACING))
return null; return null;
return targetTE; return targetBE;
} }
public static List<MechanicalCrafterTileEntity> getPrecedingCrafters(MechanicalCrafterTileEntity crafter) { public static List<MechanicalCrafterBlockEntity> getPrecedingCrafters(MechanicalCrafterBlockEntity crafter) {
BlockPos pos = crafter.getBlockPos(); BlockPos pos = crafter.getBlockPos();
Level world = crafter.getLevel(); Level world = crafter.getLevel();
List<MechanicalCrafterTileEntity> crafters = new ArrayList<>(); List<MechanicalCrafterBlockEntity> crafters = new ArrayList<>();
BlockState blockState = crafter.getBlockState(); BlockState blockState = crafter.getBlockState();
if (!isCrafter(blockState)) if (!isCrafter(blockState))
return crafters; return crafters;
@ -126,11 +126,11 @@ public class RecipeGridHandler {
continue; continue;
if (blockFacing != neighbourState.getValue(HORIZONTAL_FACING)) if (blockFacing != neighbourState.getValue(HORIZONTAL_FACING))
continue; continue;
MechanicalCrafterTileEntity te = CrafterHelper.getCrafter(world, neighbourPos); MechanicalCrafterBlockEntity be = CrafterHelper.getCrafter(world, neighbourPos);
if (te == null) if (be == null)
continue; continue;
crafters.add(te); crafters.add(be);
} }
return crafters; return crafters;

View file

@ -1,12 +1,12 @@
package com.simibubi.create.content.contraptions.components.crank; package com.simibubi.create.content.contraptions.components.crank;
import com.jozufozu.flywheel.core.PartialModel; import com.jozufozu.flywheel.core.PartialModel;
import com.simibubi.create.AllBlockEntityTypes;
import com.simibubi.create.AllBlockPartials; import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.AllShapes; import com.simibubi.create.AllShapes;
import com.simibubi.create.AllTileEntities;
import com.simibubi.create.content.contraptions.base.DirectionalKineticBlock; import com.simibubi.create.content.contraptions.base.DirectionalKineticBlock;
import com.simibubi.create.foundation.advancement.AllAdvancements; import com.simibubi.create.foundation.advancement.AllAdvancements;
import com.simibubi.create.foundation.block.ITE; import com.simibubi.create.foundation.block.IBE;
import com.simibubi.create.foundation.block.ProperWaterloggedBlock; import com.simibubi.create.foundation.block.ProperWaterloggedBlock;
import com.simibubi.create.foundation.config.AllConfigs; import com.simibubi.create.foundation.config.AllConfigs;
import com.simibubi.create.foundation.utility.Couple; import com.simibubi.create.foundation.utility.Couple;
@ -36,7 +36,7 @@ import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.api.distmarker.OnlyIn;
public class HandCrankBlock extends DirectionalKineticBlock public class HandCrankBlock extends DirectionalKineticBlock
implements ITE<HandCrankTileEntity>, ProperWaterloggedBlock { implements IBE<HandCrankBlockEntity>, ProperWaterloggedBlock {
public HandCrankBlock(Properties properties) { public HandCrankBlock(Properties properties) {
super(properties); super(properties);
@ -73,7 +73,7 @@ public class HandCrankBlock extends DirectionalKineticBlock
if (player.isSpectator()) if (player.isSpectator())
return InteractionResult.PASS; return InteractionResult.PASS;
withTileEntityDo(worldIn, pos, te -> te.turn(player.isShiftKeyDown())); withBlockEntityDo(worldIn, pos, be -> be.turn(player.isShiftKeyDown()));
player.causeFoodExhaustion(getRotationSpeed() * AllConfigs.SERVER.kinetics.crankHungerMultiplier.getF()); player.causeFoodExhaustion(getRotationSpeed() * AllConfigs.SERVER.kinetics.crankHungerMultiplier.getF());
if (player.getFoodData() if (player.getFoodData()
@ -143,13 +143,13 @@ public class HandCrankBlock extends DirectionalKineticBlock
} }
@Override @Override
public Class<HandCrankTileEntity> getTileEntityClass() { public Class<HandCrankBlockEntity> getBlockEntityClass() {
return HandCrankTileEntity.class; return HandCrankBlockEntity.class;
} }
@Override @Override
public BlockEntityType<? extends HandCrankTileEntity> getTileEntityType() { public BlockEntityType<? extends HandCrankBlockEntity> getBlockEntityType() {
return AllTileEntities.HAND_CRANK.get(); return AllBlockEntityTypes.HAND_CRANK.get();
} }
@Override @Override

View file

@ -2,7 +2,7 @@ package com.simibubi.create.content.contraptions.components.crank;
import com.simibubi.create.AllBlocks; import com.simibubi.create.AllBlocks;
import com.simibubi.create.AllSoundEvents; import com.simibubi.create.AllSoundEvents;
import com.simibubi.create.content.contraptions.base.GeneratingKineticTileEntity; import com.simibubi.create.content.contraptions.base.GeneratingKineticBlockEntity;
import com.simibubi.create.foundation.utility.AnimationTickHolder; import com.simibubi.create.foundation.utility.AnimationTickHolder;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
@ -13,14 +13,14 @@ import net.minecraft.world.level.block.state.BlockState;
import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.api.distmarker.OnlyIn;
public class HandCrankTileEntity extends GeneratingKineticTileEntity { public class HandCrankBlockEntity extends GeneratingKineticBlockEntity {
public int inUse; public int inUse;
public boolean backwards; public boolean backwards;
public float independentAngle; public float independentAngle;
public float chasingVelocity; public float chasingVelocity;
public HandCrankTileEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) { public HandCrankBlockEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) {
super(type, pos, state); super(type, pos, state);
} }

View file

@ -14,13 +14,13 @@ import net.minecraft.world.level.block.state.properties.BlockStateProperties;
public class HandCrankInstance extends SingleRotatingInstance implements DynamicInstance { public class HandCrankInstance extends SingleRotatingInstance implements DynamicInstance {
private final HandCrankTileEntity tile; private final HandCrankBlockEntity blockEntity;
private ModelData crank; private ModelData crank;
private Direction facing; private Direction facing;
public HandCrankInstance(MaterialManager modelManager, HandCrankTileEntity tile) { public HandCrankInstance(MaterialManager modelManager, HandCrankBlockEntity blockEntity) {
super(modelManager, tile); super(modelManager, blockEntity);
this.tile = tile; this.blockEntity = blockEntity;
Block block = blockState.getBlock(); Block block = blockState.getBlock();
PartialModel renderedHandle = null; PartialModel renderedHandle = null;
@ -46,7 +46,7 @@ public class HandCrankInstance extends SingleRotatingInstance implements Dynamic
private void rotateCrank() { private void rotateCrank() {
Direction.Axis axis = facing.getAxis(); Direction.Axis axis = facing.getAxis();
float angle = (tile.independentAngle + AnimationTickHolder.getPartialTicks() * tile.chasingVelocity) / 360; float angle = (blockEntity.independentAngle + AnimationTickHolder.getPartialTicks() * blockEntity.chasingVelocity) / 360;
crank.loadIdentity() crank.loadIdentity()
.translate(getInstancePosition()) .translate(getInstancePosition())

View file

@ -5,8 +5,8 @@ import static net.minecraft.world.level.block.state.properties.BlockStatePropert
import com.jozufozu.flywheel.backend.Backend; import com.jozufozu.flywheel.backend.Backend;
import com.jozufozu.flywheel.core.PartialModel; import com.jozufozu.flywheel.core.PartialModel;
import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.PoseStack;
import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.content.contraptions.base.KineticBlockEntity;
import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer; import com.simibubi.create.content.contraptions.base.KineticBlockEntityRenderer;
import com.simibubi.create.foundation.render.CachedBufferer; import com.simibubi.create.foundation.render.CachedBufferer;
import com.simibubi.create.foundation.render.SuperByteBuffer; import com.simibubi.create.foundation.render.SuperByteBuffer;
@ -17,20 +17,20 @@ import net.minecraft.core.Direction;
import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.BlockState;
public class HandCrankRenderer extends KineticTileEntityRenderer { public class HandCrankRenderer extends KineticBlockEntityRenderer {
public HandCrankRenderer(BlockEntityRendererProvider.Context context) { public HandCrankRenderer(BlockEntityRendererProvider.Context context) {
super(context); super(context);
} }
@Override @Override
protected void renderSafe(KineticTileEntity te, float partialTicks, PoseStack ms, MultiBufferSource buffer, protected void renderSafe(KineticBlockEntity be, float partialTicks, PoseStack ms, MultiBufferSource buffer,
int light, int overlay) { int light, int overlay) {
super.renderSafe(te, partialTicks, ms, buffer, light, overlay); super.renderSafe(be, partialTicks, ms, buffer, light, overlay);
if (Backend.canUseInstancing(te.getLevel())) return; if (Backend.canUseInstancing(be.getLevel())) return;
BlockState state = te.getBlockState(); BlockState state = be.getBlockState();
Block block = state.getBlock(); Block block = state.getBlock();
PartialModel renderedHandle = null; PartialModel renderedHandle = null;
if (block instanceof HandCrankBlock) if (block instanceof HandCrankBlock)
@ -40,8 +40,8 @@ public class HandCrankRenderer extends KineticTileEntityRenderer {
Direction facing = state.getValue(FACING); Direction facing = state.getValue(FACING);
SuperByteBuffer handle = CachedBufferer.partialFacing(renderedHandle, state, facing.getOpposite()); SuperByteBuffer handle = CachedBufferer.partialFacing(renderedHandle, state, facing.getOpposite());
HandCrankTileEntity crank = (HandCrankTileEntity) te; HandCrankBlockEntity crank = (HandCrankBlockEntity) be;
kineticRotationTransform(handle, te, facing.getAxis(), kineticRotationTransform(handle, be, facing.getAxis(),
(crank.independentAngle + partialTicks * crank.chasingVelocity) / 360, light); (crank.independentAngle + partialTicks * crank.chasingVelocity) / 360, light);
handle.renderInto(ms, buffer.getBuffer(RenderType.solid())); handle.renderInto(ms, buffer.getBuffer(RenderType.solid()));
} }

View file

@ -2,11 +2,11 @@ package com.simibubi.create.content.contraptions.components.crusher;
import static com.simibubi.create.content.contraptions.components.crusher.CrushingWheelControllerBlock.VALID; import static com.simibubi.create.content.contraptions.components.crusher.CrushingWheelControllerBlock.VALID;
import com.simibubi.create.AllBlockEntityTypes;
import com.simibubi.create.AllBlocks; import com.simibubi.create.AllBlocks;
import com.simibubi.create.AllShapes; import com.simibubi.create.AllShapes;
import com.simibubi.create.AllTileEntities;
import com.simibubi.create.content.contraptions.base.RotatedPillarKineticBlock; import com.simibubi.create.content.contraptions.base.RotatedPillarKineticBlock;
import com.simibubi.create.foundation.block.ITE; import com.simibubi.create.foundation.block.IBE;
import com.simibubi.create.foundation.utility.Iterate; import com.simibubi.create.foundation.utility.Iterate;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
@ -24,7 +24,7 @@ import net.minecraft.world.phys.Vec3;
import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.CollisionContext;
import net.minecraft.world.phys.shapes.VoxelShape; import net.minecraft.world.phys.shapes.VoxelShape;
public class CrushingWheelBlock extends RotatedPillarKineticBlock implements ITE<CrushingWheelTileEntity> { public class CrushingWheelBlock extends RotatedPillarKineticBlock implements IBE<CrushingWheelBlockEntity> {
public CrushingWheelBlock(Properties properties) { public CrushingWheelBlock(Properties properties) {
super(properties); super(properties);
@ -80,14 +80,14 @@ public class CrushingWheelBlock extends RotatedPillarKineticBlock implements ITE
if (AllBlocks.CRUSHING_WHEEL.has(otherState)) { if (AllBlocks.CRUSHING_WHEEL.has(otherState)) {
controllerShouldExist = true; controllerShouldExist = true;
CrushingWheelTileEntity te = getTileEntity(world, pos); CrushingWheelBlockEntity be = getBlockEntity(world, pos);
CrushingWheelTileEntity otherTe = getTileEntity(world, otherWheelPos); CrushingWheelBlockEntity otherBE = getBlockEntity(world, otherWheelPos);
if (te != null && otherTe != null && (te.getSpeed() > 0) != (otherTe.getSpeed() > 0) if (be != null && otherBE != null && (be.getSpeed() > 0) != (otherBE.getSpeed() > 0)
&& te.getSpeed() != 0) { && be.getSpeed() != 0) {
Axis wheelAxis = state.getValue(AXIS); Axis wheelAxis = state.getValue(AXIS);
Axis sideAxis = side.getAxis(); Axis sideAxis = side.getAxis();
int controllerADO = Math.round(Math.signum(te.getSpeed())) * side.getAxisDirection() int controllerADO = Math.round(Math.signum(be.getSpeed())) * side.getAxisDirection()
.getStep(); .getStep();
Vec3 controllerDirVec = new Vec3(wheelAxis == Axis.X ? 1 : 0, wheelAxis == Axis.Y ? 1 : 0, Vec3 controllerDirVec = new Vec3(wheelAxis == Axis.X ? 1 : 0, wheelAxis == Axis.Y ? 1 : 0,
wheelAxis == Axis.Z ? 1 : 0).cross( wheelAxis == Axis.Z ? 1 : 0).cross(
@ -132,7 +132,7 @@ public class CrushingWheelBlock extends RotatedPillarKineticBlock implements ITE
if (entityIn.getY() < pos.getY() + 1.25f || !entityIn.isOnGround()) if (entityIn.getY() < pos.getY() + 1.25f || !entityIn.isOnGround())
return; return;
float speed = getTileEntityOptional(worldIn, pos).map(CrushingWheelTileEntity::getSpeed) float speed = getBlockEntityOptional(worldIn, pos).map(CrushingWheelBlockEntity::getSpeed)
.orElse(0f); .orElse(0f);
double x = 0; double x = 0;
@ -183,13 +183,13 @@ public class CrushingWheelBlock extends RotatedPillarKineticBlock implements ITE
} }
@Override @Override
public Class<CrushingWheelTileEntity> getTileEntityClass() { public Class<CrushingWheelBlockEntity> getBlockEntityClass() {
return CrushingWheelTileEntity.class; return CrushingWheelBlockEntity.class;
} }
@Override @Override
public BlockEntityType<? extends CrushingWheelTileEntity> getTileEntityType() { public BlockEntityType<? extends CrushingWheelBlockEntity> getBlockEntityType() {
return AllTileEntities.CRUSHING_WHEEL.get(); return AllBlockEntityTypes.CRUSHING_WHEEL.get();
} }
} }

View file

@ -2,9 +2,9 @@ package com.simibubi.create.content.contraptions.components.crusher;
import java.util.List; import java.util.List;
import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.content.contraptions.base.KineticBlockEntity;
import com.simibubi.create.foundation.advancement.AllAdvancements; import com.simibubi.create.foundation.advancement.AllAdvancements;
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour; import com.simibubi.create.foundation.blockEntity.BlockEntityBehaviour;
import com.simibubi.create.foundation.utility.Iterate; import com.simibubi.create.foundation.utility.Iterate;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
@ -21,18 +21,18 @@ import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod.EventBusSubscriber; import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
@EventBusSubscriber @EventBusSubscriber
public class CrushingWheelTileEntity extends KineticTileEntity { public class CrushingWheelBlockEntity extends KineticBlockEntity {
public static final DamageSource DAMAGE_SOURCE = new DamageSource("create.crush").bypassArmor() public static final DamageSource DAMAGE_SOURCE = new DamageSource("create.crush").bypassArmor()
.setScalesWithDifficulty(); .setScalesWithDifficulty();
public CrushingWheelTileEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) { public CrushingWheelBlockEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) {
super(type, pos, state); super(type, pos, state);
setLazyTickRate(20); setLazyTickRate(20);
} }
@Override @Override
public void addBehaviours(List<TileEntityBehaviour> behaviours) { public void addBehaviours(List<BlockEntityBehaviour> behaviours) {
super.addBehaviours(behaviours); super.addBehaviours(behaviours);
registerAwardables(behaviours, AllAdvancements.CRUSHING_WHEEL, AllAdvancements.CRUSHER_MAXED); registerAwardables(behaviours, AllAdvancements.CRUSHING_WHEEL, AllAdvancements.CRUSHER_MAXED);
} }
@ -69,7 +69,7 @@ public class CrushingWheelTileEntity extends KineticTileEntity {
@SubscribeEvent @SubscribeEvent
public static void handleCrushedMobDrops(LivingDropsEvent event) { public static void handleCrushedMobDrops(LivingDropsEvent event) {
if (event.getSource() != CrushingWheelTileEntity.DAMAGE_SOURCE) if (event.getSource() != CrushingWheelBlockEntity.DAMAGE_SOURCE)
return; return;
Vec3 outSpeed = Vec3.ZERO; Vec3 outSpeed = Vec3.ZERO;
for (ItemEntity outputItem : event.getDrops()) { for (ItemEntity outputItem : event.getDrops()) {

View file

@ -2,11 +2,11 @@ package com.simibubi.create.content.contraptions.components.crusher;
import java.util.Random; import java.util.Random;
import com.simibubi.create.AllBlockEntityTypes;
import com.simibubi.create.AllBlocks; import com.simibubi.create.AllBlocks;
import com.simibubi.create.AllShapes; import com.simibubi.create.AllShapes;
import com.simibubi.create.AllTileEntities;
import com.simibubi.create.foundation.advancement.AllAdvancements; import com.simibubi.create.foundation.advancement.AllAdvancements;
import com.simibubi.create.foundation.block.ITE; import com.simibubi.create.foundation.block.IBE;
import com.simibubi.create.foundation.item.ItemHelper; import com.simibubi.create.foundation.item.ItemHelper;
import com.simibubi.create.foundation.utility.Iterate; import com.simibubi.create.foundation.utility.Iterate;
@ -38,7 +38,7 @@ import net.minecraft.world.phys.shapes.EntityCollisionContext;
import net.minecraft.world.phys.shapes.Shapes; import net.minecraft.world.phys.shapes.Shapes;
import net.minecraft.world.phys.shapes.VoxelShape; import net.minecraft.world.phys.shapes.VoxelShape;
public class CrushingWheelControllerBlock extends DirectionalBlock implements ITE<CrushingWheelControllerTileEntity> { public class CrushingWheelControllerBlock extends DirectionalBlock implements IBE<CrushingWheelControllerBlockEntity> {
public CrushingWheelControllerBlock(Properties p_i48440_1_) { public CrushingWheelControllerBlock(Properties p_i48440_1_) {
super(p_i48440_1_); super(p_i48440_1_);
@ -72,8 +72,8 @@ public class CrushingWheelControllerBlock extends DirectionalBlock implements IT
checkEntityForProcessing(worldIn, pos, entityIn); checkEntityForProcessing(worldIn, pos, entityIn);
withTileEntityDo(worldIn, pos, te -> { withBlockEntityDo(worldIn, pos, be -> {
if (te.processingEntity == entityIn) if (be.processingEntity == entityIn)
entityIn.makeStuckInBlock(state, new Vec3(axis == Axis.X ? (double) 0.05F : 0.25D, entityIn.makeStuckInBlock(state, new Vec3(axis == Axis.X ? (double) 0.05F : 0.25D,
axis == Axis.Y ? (double) 0.05F : 0.25D, axis == Axis.Z ? (double) 0.05F : 0.25D)); axis == Axis.Y ? (double) 0.05F : 0.25D, axis == Axis.Z ? (double) 0.05F : 0.25D));
@ -81,10 +81,10 @@ public class CrushingWheelControllerBlock extends DirectionalBlock implements IT
} }
public void checkEntityForProcessing(Level worldIn, BlockPos pos, Entity entityIn) { public void checkEntityForProcessing(Level worldIn, BlockPos pos, Entity entityIn) {
CrushingWheelControllerTileEntity te = getTileEntity(worldIn, pos); CrushingWheelControllerBlockEntity be = getBlockEntity(worldIn, pos);
if (te == null) if (be == null)
return; return;
if (te.crushingspeed == 0) if (be.crushingspeed == 0)
return; return;
// if (entityIn instanceof ItemEntity) // if (entityIn instanceof ItemEntity)
// ((ItemEntity) entityIn).setPickUpDelay(10); // ((ItemEntity) entityIn).setPickUpDelay(10);
@ -93,7 +93,7 @@ public class CrushingWheelControllerBlock extends DirectionalBlock implements IT
if (pos.equals(NbtUtils.readBlockPos(data.getCompound("BypassCrushingWheel")))) if (pos.equals(NbtUtils.readBlockPos(data.getCompound("BypassCrushingWheel"))))
return; return;
} }
if (te.isOccupied()) if (be.isOccupied())
return; return;
boolean isPlayer = entityIn instanceof Player; boolean isPlayer = entityIn instanceof Player;
if (isPlayer && ((Player) entityIn).isCreative()) if (isPlayer && ((Player) entityIn).isCreative())
@ -101,7 +101,7 @@ public class CrushingWheelControllerBlock extends DirectionalBlock implements IT
if (isPlayer && entityIn.level.getDifficulty() == Difficulty.PEACEFUL) if (isPlayer && entityIn.level.getDifficulty() == Difficulty.PEACEFUL)
return; return;
te.startCrushing(entityIn); be.startCrushing(entityIn);
} }
@Override @Override
@ -130,11 +130,11 @@ public class CrushingWheelControllerBlock extends DirectionalBlock implements IT
} }
public void updateSpeed(BlockState state, LevelAccessor world, BlockPos pos) { public void updateSpeed(BlockState state, LevelAccessor world, BlockPos pos) {
withTileEntityDo(world, pos, te -> { withBlockEntityDo(world, pos, be -> {
if (!state.getValue(VALID)) { if (!state.getValue(VALID)) {
if (te.crushingspeed != 0) { if (be.crushingspeed != 0) {
te.crushingspeed = 0; be.crushingspeed = 0;
te.sendData(); be.sendData();
} }
return; return;
} }
@ -145,11 +145,11 @@ public class CrushingWheelControllerBlock extends DirectionalBlock implements IT
continue; continue;
if (neighbour.getValue(BlockStateProperties.AXIS) == d.getAxis()) if (neighbour.getValue(BlockStateProperties.AXIS) == d.getAxis())
continue; continue;
BlockEntity adjTe = world.getBlockEntity(pos.relative(d)); BlockEntity adjBE = world.getBlockEntity(pos.relative(d));
if (!(adjTe instanceof CrushingWheelTileEntity cwte)) if (!(adjBE instanceof CrushingWheelBlockEntity cwte))
continue; continue;
te.crushingspeed = Math.abs(cwte.getSpeed() / 50f); be.crushingspeed = Math.abs(cwte.getSpeed() / 50f);
te.sendData(); be.sendData();
cwte.award(AllAdvancements.CRUSHING_WHEEL); cwte.award(AllAdvancements.CRUSHING_WHEEL);
if (cwte.getSpeed() > 255) if (cwte.getSpeed() > 255)
@ -179,8 +179,8 @@ public class CrushingWheelControllerBlock extends DirectionalBlock implements IT
// than falling back through. // than falling back through.
return Shapes.empty(); return Shapes.empty();
CrushingWheelControllerTileEntity te = getTileEntity(worldIn, pos); CrushingWheelControllerBlockEntity be = getBlockEntity(worldIn, pos);
if (te != null && te.processingEntity == entity) if (be != null && be.processingEntity == entity)
return Shapes.empty(); return Shapes.empty();
return standardShape; return standardShape;
@ -191,18 +191,18 @@ public class CrushingWheelControllerBlock extends DirectionalBlock implements IT
if (!state.hasBlockEntity() || state.getBlock() == newState.getBlock()) if (!state.hasBlockEntity() || state.getBlock() == newState.getBlock())
return; return;
withTileEntityDo(worldIn, pos, te -> ItemHelper.dropContents(worldIn, pos, te.inventory)); withBlockEntityDo(worldIn, pos, be -> ItemHelper.dropContents(worldIn, pos, be.inventory));
worldIn.removeBlockEntity(pos); worldIn.removeBlockEntity(pos);
} }
@Override @Override
public Class<CrushingWheelControllerTileEntity> getTileEntityClass() { public Class<CrushingWheelControllerBlockEntity> getBlockEntityClass() {
return CrushingWheelControllerTileEntity.class; return CrushingWheelControllerBlockEntity.class;
} }
@Override @Override
public BlockEntityType<? extends CrushingWheelControllerTileEntity> getTileEntityType() { public BlockEntityType<? extends CrushingWheelControllerBlockEntity> getBlockEntityType() {
return AllTileEntities.CRUSHING_WHEEL_CONTROLLER.get(); return AllBlockEntityTypes.CRUSHING_WHEEL_CONTROLLER.get();
} }
@Override @Override

View file

@ -9,13 +9,13 @@ import java.util.UUID;
import com.simibubi.create.AllRecipeTypes; import com.simibubi.create.AllRecipeTypes;
import com.simibubi.create.content.contraptions.processing.ProcessingInventory; import com.simibubi.create.content.contraptions.processing.ProcessingInventory;
import com.simibubi.create.content.contraptions.processing.ProcessingRecipe; import com.simibubi.create.content.contraptions.processing.ProcessingRecipe;
import com.simibubi.create.foundation.blockEntity.BlockEntityBehaviour;
import com.simibubi.create.foundation.blockEntity.SmartBlockEntity;
import com.simibubi.create.foundation.blockEntity.behaviour.belt.DirectBeltInputBehaviour;
import com.simibubi.create.foundation.config.AllConfigs; import com.simibubi.create.foundation.config.AllConfigs;
import com.simibubi.create.foundation.item.ItemHelper; import com.simibubi.create.foundation.item.ItemHelper;
import com.simibubi.create.foundation.sound.SoundScapes; import com.simibubi.create.foundation.sound.SoundScapes;
import com.simibubi.create.foundation.sound.SoundScapes.AmbienceGroup; import com.simibubi.create.foundation.sound.SoundScapes.AmbienceGroup;
import com.simibubi.create.foundation.tileEntity.SmartTileEntity;
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
import com.simibubi.create.foundation.tileEntity.behaviour.belt.DirectBeltInputBehaviour;
import com.simibubi.create.foundation.utility.NBTHelper; import com.simibubi.create.foundation.utility.NBTHelper;
import com.simibubi.create.foundation.utility.VecHelper; import com.simibubi.create.foundation.utility.VecHelper;
@ -47,7 +47,7 @@ import net.minecraftforge.items.CapabilityItemHandler;
import net.minecraftforge.items.IItemHandlerModifiable; import net.minecraftforge.items.IItemHandlerModifiable;
import net.minecraftforge.items.wrapper.RecipeWrapper; import net.minecraftforge.items.wrapper.RecipeWrapper;
public class CrushingWheelControllerTileEntity extends SmartTileEntity { public class CrushingWheelControllerBlockEntity extends SmartBlockEntity {
public Entity processingEntity; public Entity processingEntity;
private UUID entityUUID; private UUID entityUUID;
@ -58,7 +58,7 @@ public class CrushingWheelControllerTileEntity extends SmartTileEntity {
private RecipeWrapper wrapper; private RecipeWrapper wrapper;
public float crushingspeed; public float crushingspeed;
public CrushingWheelControllerTileEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) { public CrushingWheelControllerBlockEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) {
super(type, pos, state); super(type, pos, state);
inventory = new ProcessingInventory(this::itemInserted) { inventory = new ProcessingInventory(this::itemInserted) {
@ -72,7 +72,7 @@ public class CrushingWheelControllerTileEntity extends SmartTileEntity {
} }
@Override @Override
public void addBehaviours(List<TileEntityBehaviour> behaviours) { public void addBehaviours(List<BlockEntityBehaviour> behaviours) {
behaviours.add(new DirectBeltInputBehaviour(this).onlyInsertWhen(this::supportsDirectBeltInput)); behaviours.add(new DirectBeltInputBehaviour(this).onlyInsertWhen(this::supportsDirectBeltInput));
} }
@ -148,7 +148,7 @@ public class CrushingWheelControllerTileEntity extends SmartTileEntity {
BlockPos nextPos = worldPosition.offset(facing.getAxis() == Axis.X ? 1f * offset : 0f, (-1f), BlockPos nextPos = worldPosition.offset(facing.getAxis() == Axis.X ? 1f * offset : 0f, (-1f),
facing.getAxis() == Axis.Z ? 1f * offset : 0f); facing.getAxis() == Axis.Z ? 1f * offset : 0f);
DirectBeltInputBehaviour behaviour = DirectBeltInputBehaviour behaviour =
TileEntityBehaviour.get(level, nextPos, DirectBeltInputBehaviour.TYPE); BlockEntityBehaviour.get(level, nextPos, DirectBeltInputBehaviour.TYPE);
if (behaviour != null) { if (behaviour != null) {
boolean changed = false; boolean changed = false;
if (!behaviour.canInsertFromSide(facing)) if (!behaviour.canInsertFromSide(facing))
@ -230,7 +230,7 @@ public class CrushingWheelControllerTileEntity extends SmartTileEntity {
processingEntity.setPos(entityOutPos.x, entityOutPos.y, entityOutPos.z); processingEntity.setPos(entityOutPos.x, entityOutPos.y, entityOutPos.z);
} }
} }
processingEntity.hurt(CrushingWheelTileEntity.DAMAGE_SOURCE, crusherDamage); processingEntity.hurt(CrushingWheelBlockEntity.DAMAGE_SOURCE, crusherDamage);
if (!processingEntity.isAlive()) { if (!processingEntity.isAlive()) {
processingEntity.setPos(entityOutPos.x, entityOutPos.y, entityOutPos.z); processingEntity.setPos(entityOutPos.x, entityOutPos.y, entityOutPos.z);
} }

View file

@ -8,8 +8,8 @@ import java.util.stream.Collectors;
import com.simibubi.create.AllBlocks; import com.simibubi.create.AllBlocks;
import com.simibubi.create.AllSoundEvents; import com.simibubi.create.AllSoundEvents;
import com.simibubi.create.Create; import com.simibubi.create.Create;
import com.simibubi.create.content.contraptions.components.deployer.DeployerTileEntity.Mode; import com.simibubi.create.content.contraptions.components.deployer.DeployerBlockEntity.Mode;
import com.simibubi.create.content.contraptions.components.deployer.DeployerTileEntity.State; import com.simibubi.create.content.contraptions.components.deployer.DeployerBlockEntity.State;
import com.simibubi.create.content.contraptions.processing.InWorldProcessing; import com.simibubi.create.content.contraptions.processing.InWorldProcessing;
import com.simibubi.create.content.contraptions.processing.ItemApplicationRecipe; import com.simibubi.create.content.contraptions.processing.ItemApplicationRecipe;
import com.simibubi.create.content.contraptions.relays.belt.BeltHelper; import com.simibubi.create.content.contraptions.relays.belt.BeltHelper;
@ -17,9 +17,9 @@ import com.simibubi.create.content.contraptions.relays.belt.transport.Transporte
import com.simibubi.create.content.curiosities.tools.SandPaperPolishingRecipe; import com.simibubi.create.content.curiosities.tools.SandPaperPolishingRecipe;
import com.simibubi.create.foundation.advancement.AllAdvancements; import com.simibubi.create.foundation.advancement.AllAdvancements;
import com.simibubi.create.foundation.advancement.CreateAdvancement; import com.simibubi.create.foundation.advancement.CreateAdvancement;
import com.simibubi.create.foundation.tileEntity.behaviour.belt.BeltProcessingBehaviour.ProcessingResult; import com.simibubi.create.foundation.blockEntity.behaviour.belt.BeltProcessingBehaviour.ProcessingResult;
import com.simibubi.create.foundation.tileEntity.behaviour.belt.TransportedItemStackHandlerBehaviour; import com.simibubi.create.foundation.blockEntity.behaviour.belt.TransportedItemStackHandlerBehaviour;
import com.simibubi.create.foundation.tileEntity.behaviour.belt.TransportedItemStackHandlerBehaviour.TransportedResult; import com.simibubi.create.foundation.blockEntity.behaviour.belt.TransportedItemStackHandlerBehaviour.TransportedResult;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
@ -35,66 +35,66 @@ import net.minecraftforge.items.ItemHandlerHelper;
public class BeltDeployerCallbacks { public class BeltDeployerCallbacks {
public static ProcessingResult onItemReceived(TransportedItemStack s, TransportedItemStackHandlerBehaviour i, public static ProcessingResult onItemReceived(TransportedItemStack s, TransportedItemStackHandlerBehaviour i,
DeployerTileEntity deployerTileEntity) { DeployerBlockEntity blockEntity) {
if (deployerTileEntity.getSpeed() == 0) if (blockEntity.getSpeed() == 0)
return ProcessingResult.PASS; return ProcessingResult.PASS;
if (deployerTileEntity.mode == Mode.PUNCH) if (blockEntity.mode == Mode.PUNCH)
return ProcessingResult.PASS; return ProcessingResult.PASS;
BlockState blockState = deployerTileEntity.getBlockState(); BlockState blockState = blockEntity.getBlockState();
if (!blockState.hasProperty(FACING) || blockState.getValue(FACING) != Direction.DOWN) if (!blockState.hasProperty(FACING) || blockState.getValue(FACING) != Direction.DOWN)
return ProcessingResult.PASS; return ProcessingResult.PASS;
if (deployerTileEntity.state != State.WAITING) if (blockEntity.state != State.WAITING)
return ProcessingResult.HOLD; return ProcessingResult.HOLD;
if (deployerTileEntity.redstoneLocked) if (blockEntity.redstoneLocked)
return ProcessingResult.PASS; return ProcessingResult.PASS;
DeployerFakePlayer player = deployerTileEntity.getPlayer(); DeployerFakePlayer player = blockEntity.getPlayer();
ItemStack held = player == null ? ItemStack.EMPTY : player.getMainHandItem(); ItemStack held = player == null ? ItemStack.EMPTY : player.getMainHandItem();
if (held.isEmpty()) if (held.isEmpty())
return ProcessingResult.HOLD; return ProcessingResult.HOLD;
if (deployerTileEntity.getRecipe(s.stack) == null) if (blockEntity.getRecipe(s.stack) == null)
return ProcessingResult.PASS; return ProcessingResult.PASS;
deployerTileEntity.start(); blockEntity.start();
return ProcessingResult.HOLD; return ProcessingResult.HOLD;
} }
public static ProcessingResult whenItemHeld(TransportedItemStack s, TransportedItemStackHandlerBehaviour i, public static ProcessingResult whenItemHeld(TransportedItemStack s, TransportedItemStackHandlerBehaviour i,
DeployerTileEntity deployerTileEntity) { DeployerBlockEntity blockEntity) {
if (deployerTileEntity.getSpeed() == 0) if (blockEntity.getSpeed() == 0)
return ProcessingResult.PASS; return ProcessingResult.PASS;
BlockState blockState = deployerTileEntity.getBlockState(); BlockState blockState = blockEntity.getBlockState();
if (!blockState.hasProperty(FACING) || blockState.getValue(FACING) != Direction.DOWN) if (!blockState.hasProperty(FACING) || blockState.getValue(FACING) != Direction.DOWN)
return ProcessingResult.PASS; return ProcessingResult.PASS;
DeployerFakePlayer player = deployerTileEntity.getPlayer(); DeployerFakePlayer player = blockEntity.getPlayer();
ItemStack held = player == null ? ItemStack.EMPTY : player.getMainHandItem(); ItemStack held = player == null ? ItemStack.EMPTY : player.getMainHandItem();
if (held.isEmpty()) if (held.isEmpty())
return ProcessingResult.HOLD; return ProcessingResult.HOLD;
Recipe<?> recipe = deployerTileEntity.getRecipe(s.stack); Recipe<?> recipe = blockEntity.getRecipe(s.stack);
if (recipe == null) if (recipe == null)
return ProcessingResult.PASS; return ProcessingResult.PASS;
if (deployerTileEntity.state == State.RETRACTING && deployerTileEntity.timer == 1000) { if (blockEntity.state == State.RETRACTING && blockEntity.timer == 1000) {
activate(s, i, deployerTileEntity, recipe); activate(s, i, blockEntity, recipe);
return ProcessingResult.HOLD; return ProcessingResult.HOLD;
} }
if (deployerTileEntity.state == State.WAITING) { if (blockEntity.state == State.WAITING) {
if (deployerTileEntity.redstoneLocked) if (blockEntity.redstoneLocked)
return ProcessingResult.PASS; return ProcessingResult.PASS;
deployerTileEntity.start(); blockEntity.start();
} }
return ProcessingResult.HOLD; return ProcessingResult.HOLD;
} }
public static void activate(TransportedItemStack transported, TransportedItemStackHandlerBehaviour handler, public static void activate(TransportedItemStack transported, TransportedItemStackHandlerBehaviour handler,
DeployerTileEntity deployerTileEntity, Recipe<?> recipe) { DeployerBlockEntity blockEntity, Recipe<?> recipe) {
List<TransportedItemStack> collect = List<TransportedItemStack> collect =
InWorldProcessing.applyRecipeOn(ItemHandlerHelper.copyStackWithSize(transported.stack, 1), recipe) InWorldProcessing.applyRecipeOn(ItemHandlerHelper.copyStackWithSize(transported.stack, 1), recipe)
@ -113,10 +113,10 @@ public class BeltDeployerCallbacks {
}) })
.collect(Collectors.toList()); .collect(Collectors.toList());
deployerTileEntity.award(AllAdvancements.DEPLOYER); blockEntity.award(AllAdvancements.DEPLOYER);
TransportedItemStack left = transported.copy(); TransportedItemStack left = transported.copy();
deployerTileEntity.player.spawnedItemEffects = transported.stack.copy(); blockEntity.player.spawnedItemEffects = transported.stack.copy();
left.stack.shrink(1); left.stack.shrink(1);
ItemStack resultItem = null; ItemStack resultItem = null;
@ -128,7 +128,7 @@ public class BeltDeployerCallbacks {
handler.handleProcessingOnItem(transported, TransportedResult.convertToAndLeaveHeld(collect, left)); handler.handleProcessingOnItem(transported, TransportedResult.convertToAndLeaveHeld(collect, left));
} }
ItemStack heldItem = deployerTileEntity.player.getMainHandItem(); ItemStack heldItem = blockEntity.player.getMainHandItem();
boolean unbreakable = heldItem.hasTag() && heldItem.getTag() boolean unbreakable = heldItem.hasTag() && heldItem.getTag()
.getBoolean("Unbreakable"); .getBoolean("Unbreakable");
boolean keepHeld = boolean keepHeld =
@ -136,27 +136,27 @@ public class BeltDeployerCallbacks {
if (!unbreakable && !keepHeld) { if (!unbreakable && !keepHeld) {
if (heldItem.isDamageableItem()) if (heldItem.isDamageableItem())
heldItem.hurtAndBreak(1, deployerTileEntity.player, heldItem.hurtAndBreak(1, blockEntity.player,
s -> s.broadcastBreakEvent(InteractionHand.MAIN_HAND)); s -> s.broadcastBreakEvent(InteractionHand.MAIN_HAND));
else else
heldItem.shrink(1); heldItem.shrink(1);
} }
if (resultItem != null && !resultItem.isEmpty()) if (resultItem != null && !resultItem.isEmpty())
awardAdvancements(deployerTileEntity, resultItem); awardAdvancements(blockEntity, resultItem);
BlockPos pos = deployerTileEntity.getBlockPos(); BlockPos pos = blockEntity.getBlockPos();
Level world = deployerTileEntity.getLevel(); Level world = blockEntity.getLevel();
if (heldItem.isEmpty()) if (heldItem.isEmpty())
world.playSound(null, pos, SoundEvents.ITEM_BREAK, SoundSource.BLOCKS, .25f, 1); world.playSound(null, pos, SoundEvents.ITEM_BREAK, SoundSource.BLOCKS, .25f, 1);
world.playSound(null, pos, SoundEvents.ITEM_PICKUP, SoundSource.BLOCKS, .25f, .75f); world.playSound(null, pos, SoundEvents.ITEM_PICKUP, SoundSource.BLOCKS, .25f, .75f);
if (recipe instanceof SandPaperPolishingRecipe) if (recipe instanceof SandPaperPolishingRecipe)
AllSoundEvents.SANDING_SHORT.playOnServer(world, pos, .35f, 1f); AllSoundEvents.SANDING_SHORT.playOnServer(world, pos, .35f, 1f);
deployerTileEntity.sendData(); blockEntity.sendData();
} }
private static void awardAdvancements(DeployerTileEntity deployerTileEntity, ItemStack created) { private static void awardAdvancements(DeployerBlockEntity blockEntity, ItemStack created) {
CreateAdvancement advancement = null; CreateAdvancement advancement = null;
if (AllBlocks.ANDESITE_CASING.isIn(created)) if (AllBlocks.ANDESITE_CASING.isIn(created))
@ -170,7 +170,7 @@ public class BeltDeployerCallbacks {
else else
return; return;
deployerTileEntity.award(advancement); blockEntity.award(advancement);
} }
} }

View file

@ -13,7 +13,7 @@ import com.jozufozu.flywheel.util.transform.TransformStack;
import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.PoseStack;
import com.simibubi.create.AllBlockPartials; import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.content.contraptions.base.IRotate; import com.simibubi.create.content.contraptions.base.IRotate;
import com.simibubi.create.content.contraptions.base.KineticTileInstance; import com.simibubi.create.content.contraptions.base.KineticBlockEntityInstance;
import com.simibubi.create.content.contraptions.base.flwdata.RotatingData; import com.simibubi.create.content.contraptions.base.flwdata.RotatingData;
import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext; import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext;
import com.simibubi.create.content.contraptions.components.structureMovement.render.ActorInstance; import com.simibubi.create.content.contraptions.components.structureMovement.render.ActorInstance;
@ -50,7 +50,7 @@ public class DeployerActorInstance extends ActorInstance {
.material(Materials.TRANSFORMED); .material(Materials.TRANSFORMED);
BlockState state = context.state; BlockState state = context.state;
DeployerTileEntity.Mode mode = NBTHelper.readEnum(context.tileData, "Mode", DeployerTileEntity.Mode.class); DeployerBlockEntity.Mode mode = NBTHelper.readEnum(context.blockEntityData, "Mode", DeployerBlockEntity.Mode.class);
PartialModel handPose = DeployerRenderer.getHandPose(mode); PartialModel handPose = DeployerRenderer.getHandPose(mode);
stationaryTimer = context.data.contains("StationaryTimer"); stationaryTimer = context.data.contains("StationaryTimer");
@ -67,7 +67,7 @@ public class DeployerActorInstance extends ActorInstance {
Direction.Axis axis = ((IRotate) state.getBlock()).getRotationAxis(state); Direction.Axis axis = ((IRotate) state.getBlock()).getRotationAxis(state);
shaft = materialManager.defaultSolid() shaft = materialManager.defaultSolid()
.material(AllMaterialSpecs.ROTATING) .material(AllMaterialSpecs.ROTATING)
.getModel(KineticTileInstance.shaft(axis)) .getModel(KineticBlockEntityInstance.shaft(axis))
.createInstance(); .createInstance();
int blockLight = localBlockLight(); int blockLight = localBlockLight();

View file

@ -2,12 +2,12 @@ package com.simibubi.create.content.contraptions.components.deployer;
import javax.annotation.ParametersAreNonnullByDefault; import javax.annotation.ParametersAreNonnullByDefault;
import com.simibubi.create.AllBlockEntityTypes;
import com.simibubi.create.AllItems; import com.simibubi.create.AllItems;
import com.simibubi.create.AllShapes; import com.simibubi.create.AllShapes;
import com.simibubi.create.AllTileEntities;
import com.simibubi.create.content.contraptions.base.DirectionalAxisKineticBlock; import com.simibubi.create.content.contraptions.base.DirectionalAxisKineticBlock;
import com.simibubi.create.content.contraptions.components.AssemblyOperatorUseContext; import com.simibubi.create.content.contraptions.components.AssemblyOperatorUseContext;
import com.simibubi.create.foundation.block.ITE; import com.simibubi.create.foundation.block.IBE;
import net.minecraft.MethodsReturnNonnullByDefault; import net.minecraft.MethodsReturnNonnullByDefault;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
@ -31,7 +31,7 @@ import net.minecraft.world.phys.shapes.VoxelShape;
@ParametersAreNonnullByDefault @ParametersAreNonnullByDefault
@MethodsReturnNonnullByDefault @MethodsReturnNonnullByDefault
public class DeployerBlock extends DirectionalAxisKineticBlock implements ITE<DeployerTileEntity> { public class DeployerBlock extends DirectionalAxisKineticBlock implements IBE<DeployerBlockEntity> {
public DeployerBlock(Properties properties) { public DeployerBlock(Properties properties) {
super(properties); super(properties);
@ -51,7 +51,7 @@ public class DeployerBlock extends DirectionalAxisKineticBlock implements ITE<De
public InteractionResult onWrenched(BlockState state, UseOnContext context) { public InteractionResult onWrenched(BlockState state, UseOnContext context) {
if (context.getClickedFace() == state.getValue(FACING)) { if (context.getClickedFace() == state.getValue(FACING)) {
if (!context.getLevel().isClientSide) if (!context.getLevel().isClientSide)
withTileEntityDo(context.getLevel(), context.getClickedPos(), DeployerTileEntity::changeMode); withBlockEntityDo(context.getLevel(), context.getClickedPos(), DeployerBlockEntity::changeMode);
return InteractionResult.SUCCESS; return InteractionResult.SUCCESS;
} }
return super.onWrenched(state, context); return super.onWrenched(state, context);
@ -60,7 +60,7 @@ public class DeployerBlock extends DirectionalAxisKineticBlock implements ITE<De
@Override @Override
public void onRemove(BlockState state, Level worldIn, BlockPos pos, BlockState newState, boolean isMoving) { public void onRemove(BlockState state, Level worldIn, BlockPos pos, BlockState newState, boolean isMoving) {
if (!isMoving && !state.is(newState.getBlock())) if (!isMoving && !state.is(newState.getBlock()))
withTileEntityDo(worldIn, pos, DeployerTileEntity::discardPlayer); withBlockEntityDo(worldIn, pos, DeployerBlockEntity::discardPlayer);
super.onRemove(state, worldIn, pos, newState, isMoving); super.onRemove(state, worldIn, pos, newState, isMoving);
} }
@ -77,40 +77,40 @@ public class DeployerBlock extends DirectionalAxisKineticBlock implements ITE<De
if (worldIn.isClientSide) if (worldIn.isClientSide)
return InteractionResult.SUCCESS; return InteractionResult.SUCCESS;
withTileEntityDo(worldIn, pos, te -> { withBlockEntityDo(worldIn, pos, be -> {
ItemStack heldByDeployer = te.player.getMainHandItem() ItemStack heldByDeployer = be.player.getMainHandItem()
.copy(); .copy();
if (heldByDeployer.isEmpty() && heldByPlayer.isEmpty()) if (heldByDeployer.isEmpty() && heldByPlayer.isEmpty())
return; return;
player.setItemInHand(handIn, heldByDeployer); player.setItemInHand(handIn, heldByDeployer);
te.player.setItemInHand(InteractionHand.MAIN_HAND, heldByPlayer); be.player.setItemInHand(InteractionHand.MAIN_HAND, heldByPlayer);
te.sendData(); be.sendData();
}); });
return InteractionResult.SUCCESS; return InteractionResult.SUCCESS;
} }
@Override @Override
public Class<DeployerTileEntity> getTileEntityClass() { public Class<DeployerBlockEntity> getBlockEntityClass() {
return DeployerTileEntity.class; return DeployerBlockEntity.class;
} }
@Override @Override
public BlockEntityType<? extends DeployerTileEntity> getTileEntityType() { public BlockEntityType<? extends DeployerBlockEntity> getBlockEntityType() {
return AllTileEntities.DEPLOYER.get(); return AllBlockEntityTypes.DEPLOYER.get();
} }
@Override @Override
public void onPlace(BlockState state, Level world, BlockPos pos, BlockState oldState, boolean isMoving) { public void onPlace(BlockState state, Level world, BlockPos pos, BlockState oldState, boolean isMoving) {
super.onPlace(state, world, pos, oldState, isMoving); super.onPlace(state, world, pos, oldState, isMoving);
withTileEntityDo(world, pos, DeployerTileEntity::redstoneUpdate); withBlockEntityDo(world, pos, DeployerBlockEntity::redstoneUpdate);
} }
@Override @Override
public void neighborChanged(BlockState state, Level world, BlockPos pos, Block p_220069_4_, BlockPos p_220069_5_, public void neighborChanged(BlockState state, Level world, BlockPos pos, Block p_220069_4_, BlockPos p_220069_5_,
boolean p_220069_6_) { boolean p_220069_6_) {
withTileEntityDo(world, pos, DeployerTileEntity::redstoneUpdate); withBlockEntityDo(world, pos, DeployerBlockEntity::redstoneUpdate);
} }
@Override @Override

View file

@ -13,16 +13,16 @@ import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.AllBlocks; import com.simibubi.create.AllBlocks;
import com.simibubi.create.AllRecipeTypes; import com.simibubi.create.AllRecipeTypes;
import com.simibubi.create.content.contraptions.base.IRotate.StressImpact; import com.simibubi.create.content.contraptions.base.IRotate.StressImpact;
import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.content.contraptions.base.KineticBlockEntity;
import com.simibubi.create.content.contraptions.itemAssembly.SequencedAssemblyRecipe; import com.simibubi.create.content.contraptions.itemAssembly.SequencedAssemblyRecipe;
import com.simibubi.create.content.curiosities.tools.SandPaperItem; import com.simibubi.create.content.curiosities.tools.SandPaperItem;
import com.simibubi.create.content.curiosities.tools.SandPaperPolishingRecipe.SandPaperInv; import com.simibubi.create.content.curiosities.tools.SandPaperPolishingRecipe.SandPaperInv;
import com.simibubi.create.foundation.advancement.AllAdvancements; import com.simibubi.create.foundation.advancement.AllAdvancements;
import com.simibubi.create.foundation.blockEntity.BlockEntityBehaviour;
import com.simibubi.create.foundation.blockEntity.behaviour.belt.BeltProcessingBehaviour;
import com.simibubi.create.foundation.blockEntity.behaviour.belt.TransportedItemStackHandlerBehaviour;
import com.simibubi.create.foundation.blockEntity.behaviour.filtering.FilteringBehaviour;
import com.simibubi.create.foundation.item.TooltipHelper; import com.simibubi.create.foundation.item.TooltipHelper;
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
import com.simibubi.create.foundation.tileEntity.behaviour.belt.BeltProcessingBehaviour;
import com.simibubi.create.foundation.tileEntity.behaviour.belt.TransportedItemStackHandlerBehaviour;
import com.simibubi.create.foundation.tileEntity.behaviour.filtering.FilteringBehaviour;
import com.simibubi.create.foundation.utility.Components; import com.simibubi.create.foundation.utility.Components;
import com.simibubi.create.foundation.utility.Lang; import com.simibubi.create.foundation.utility.Lang;
import com.simibubi.create.foundation.utility.NBTHelper; import com.simibubi.create.foundation.utility.NBTHelper;
@ -63,7 +63,7 @@ import net.minecraftforge.items.IItemHandlerModifiable;
import net.minecraftforge.items.ItemStackHandler; import net.minecraftforge.items.ItemStackHandler;
import net.minecraftforge.items.wrapper.RecipeWrapper; import net.minecraftforge.items.wrapper.RecipeWrapper;
public class DeployerTileEntity extends KineticTileEntity { public class DeployerBlockEntity extends KineticBlockEntity {
protected State state; protected State state;
protected Mode mode; protected Mode mode;
@ -90,7 +90,7 @@ public class DeployerTileEntity extends KineticTileEntity {
PUNCH, USE PUNCH, USE
} }
public DeployerTileEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) { public DeployerBlockEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) {
super(type, pos, state); super(type, pos, state);
this.state = State.WAITING; this.state = State.WAITING;
mode = Mode.USE; mode = Mode.USE;
@ -101,7 +101,7 @@ public class DeployerTileEntity extends KineticTileEntity {
} }
@Override @Override
public void addBehaviours(List<TileEntityBehaviour> behaviours) { public void addBehaviours(List<BlockEntityBehaviour> behaviours) {
super.addBehaviours(behaviours); super.addBehaviours(behaviours);
filtering = new FilteringBehaviour(this, new DeployerFilterSlot()); filtering = new FilteringBehaviour(this, new DeployerFilterSlot());
behaviours.add(filtering); behaviours.add(filtering);
@ -251,14 +251,14 @@ public class DeployerTileEntity extends KineticTileEntity {
public boolean startFistBump(Direction facing) { public boolean startFistBump(Direction facing) {
int i = 0; int i = 0;
DeployerTileEntity partner = null; DeployerBlockEntity partner = null;
for (i = 2; i < 5; i++) { for (i = 2; i < 5; i++) {
BlockPos otherDeployer = worldPosition.relative(facing, i); BlockPos otherDeployer = worldPosition.relative(facing, i);
if (!level.isLoaded(otherDeployer)) if (!level.isLoaded(otherDeployer))
return false; return false;
BlockEntity otherTile = level.getBlockEntity(otherDeployer); BlockEntity other = level.getBlockEntity(otherDeployer);
if (otherTile instanceof DeployerTileEntity dpe) { if (other instanceof DeployerBlockEntity dpe) {
partner = dpe; partner = dpe;
break; break;
} }
@ -274,12 +274,12 @@ public class DeployerTileEntity extends KineticTileEntity {
if (partner.getSpeed() == 0) if (partner.getSpeed() == 0)
return false; return false;
for (DeployerTileEntity te : Arrays.asList(this, partner)) { for (DeployerBlockEntity be : Arrays.asList(this, partner)) {
te.fistBump = true; be.fistBump = true;
te.reach = ((i - 2)) * .5f; be.reach = ((i - 2)) * .5f;
te.timer = 1000; be.timer = 1000;
te.state = State.EXPANDING; be.state = State.EXPANDING;
te.sendData(); be.sendData();
} }
return true; return true;
@ -287,33 +287,33 @@ public class DeployerTileEntity extends KineticTileEntity {
public void triggerFistBump() { public void triggerFistBump() {
int i = 0; int i = 0;
DeployerTileEntity deployerTile = null; DeployerBlockEntity deployerBlockEntity = null;
for (i = 2; i < 5; i++) { for (i = 2; i < 5; i++) {
BlockPos pos = worldPosition.relative(getBlockState().getValue(FACING), i); BlockPos pos = worldPosition.relative(getBlockState().getValue(FACING), i);
if (!level.isLoaded(pos)) if (!level.isLoaded(pos))
return; return;
if (level.getBlockEntity(pos) instanceof DeployerTileEntity dpe) { if (level.getBlockEntity(pos) instanceof DeployerBlockEntity dpe) {
deployerTile = dpe; deployerBlockEntity = dpe;
break; break;
} }
} }
if (deployerTile == null) if (deployerBlockEntity == null)
return; return;
if (!deployerTile.fistBump || deployerTile.state != State.EXPANDING) if (!deployerBlockEntity.fistBump || deployerBlockEntity.state != State.EXPANDING)
return; return;
if (deployerTile.timer > 0) if (deployerBlockEntity.timer > 0)
return; return;
fistBump = false; fistBump = false;
deployerTile.fistBump = false; deployerBlockEntity.fistBump = false;
deployerTile.state = State.RETRACTING; deployerBlockEntity.state = State.RETRACTING;
deployerTile.timer = 1000; deployerBlockEntity.timer = 1000;
deployerTile.sendData(); deployerBlockEntity.sendData();
award(AllAdvancements.FIST_BUMP); award(AllAdvancements.FIST_BUMP);
BlockPos soundLocation = new BlockPos(Vec3.atCenterOf(worldPosition) BlockPos soundLocation = new BlockPos(Vec3.atCenterOf(worldPosition)
.add(Vec3.atCenterOf(deployerTile.getBlockPos())) .add(Vec3.atCenterOf(deployerBlockEntity.getBlockPos()))
.scale(.5f)); .scale(.5f));
level.playSound(null, soundLocation, SoundEvents.PLAYER_ATTACK_NODAMAGE, SoundSource.BLOCKS, .75f, .75f); level.playSound(null, soundLocation, SoundEvents.PLAYER_ATTACK_NODAMAGE, SoundSource.BLOCKS, .75f, .75f);
} }
@ -327,7 +327,7 @@ public class DeployerTileEntity extends KineticTileEntity {
player.setYRot(direction.toYRot()); player.setYRot(direction.toYRot());
if (direction == Direction.DOWN if (direction == Direction.DOWN
&& TileEntityBehaviour.get(level, clickedPos, TransportedItemStackHandlerBehaviour.TYPE) != null) && BlockEntityBehaviour.get(level, clickedPos, TransportedItemStackHandlerBehaviour.TYPE) != null)
return; // Belt processing handled in BeltDeployerCallbacks return; // Belt processing handled in BeltDeployerCallbacks
DeployerHandler.activate(player, center, clickedPos, movementVector, mode); DeployerHandler.activate(player, center, clickedPos, movementVector, mode);

Some files were not shown because too many files have changed in this diff Show more