From 5a1984eae4920cbb072c72c229a68e9ab99018ec Mon Sep 17 00:00:00 2001 From: Alepod Date: Fri, 19 Feb 2021 16:42:25 +0200 Subject: [PATCH 01/24] Update ru_ru.json Minor typo fixed --- src/main/resources/assets/create/lang/ru_ru.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/assets/create/lang/ru_ru.json b/src/main/resources/assets/create/lang/ru_ru.json index 87369b59b..349a9dd93 100644 --- a/src/main/resources/assets/create/lang/ru_ru.json +++ b/src/main/resources/assets/create/lang/ru_ru.json @@ -1671,7 +1671,7 @@ "block.create.redstone_link.tooltip": "REDSTONE LINK", "block.create.redstone_link.tooltip.summary": "_Беспроводной_ _передатчик_ сигнала красного камня. Можно выбрать _частоты_ с помощью любого предмета. Диапазон сигнала ограничен, но достаточно далёк.", "block.create.redstone_link.tooltip.condition1": "Когда приведен в действие", - "block.create.redstone_link.tooltip.behaviour1": "Приняв сигнал той-же _частоты_ выдаёт сигнал красного камня или наоборот.", + "block.create.redstone_link.tooltip.behaviour1": "Приняв сигнал той же _частоты_ выдаёт сигнал красного камня или наоборот.", "block.create.redstone_link.tooltip.control1": "При ПКМ предметом", "block.create.redstone_link.tooltip.action1": "Устанавливает частоту для этого предмета. Всего _два_ разных предмета могут быть использованы в комбинации для определения частоты.", "block.create.redstone_link.tooltip.control2": "ПКМ крадясь", From 619045a505de1c7a050b4a92decf16fdafdb638c Mon Sep 17 00:00:00 2001 From: Alepod Date: Fri, 19 Feb 2021 16:44:49 +0200 Subject: [PATCH 02/24] Update ru_ru.json More mistakes fixed --- .../resources/assets/create/lang/ru_ru.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/main/resources/assets/create/lang/ru_ru.json b/src/main/resources/assets/create/lang/ru_ru.json index 87369b59b..52a2505db 100644 --- a/src/main/resources/assets/create/lang/ru_ru.json +++ b/src/main/resources/assets/create/lang/ru_ru.json @@ -773,7 +773,7 @@ "create.gui.terrainzapper.tool.overlay": "Наложение", "create.gui.terrainzapper.tool.flatten": "Выравнивание", - "create.terrainzapper.shiftRightClickToSet": "ПКМ крадясь, чтобы выбрать форму", + "create.terrainzapper.shiftRightClickToSet": "ПКМ крадучись, чтобы выбрать форму", "create.blockzapper.usingBlock": "С помощью: %1$s", "create.blockzapper.componentUpgrades": "Обновления компонентов:", @@ -1304,7 +1304,7 @@ "item.create.wand_of_symmetry.tooltip.action1": "_Создаёт_ или _Перемещает_ зеркало", "item.create.wand_of_symmetry.tooltip.control2": "ПКМ в воздух", "item.create.wand_of_symmetry.tooltip.action2": "_Убирает_ зеркало", - "item.create.wand_of_symmetry.tooltip.control3": "ПКМ крадясь", + "item.create.wand_of_symmetry.tooltip.control3": "ПКМ крадучись", "item.create.wand_of_symmetry.tooltip.action3": "Открывает _интерфейс_ _конфигурации_", "item.create.handheld_blockzapper.tooltip": "BLOCKZAPPER", @@ -1313,7 +1313,7 @@ "item.create.handheld_blockzapper.tooltip.action1": "Устанавливает выбранный блок как материал.", "item.create.handheld_blockzapper.tooltip.control2": "ПКМ на блок", "item.create.handheld_blockzapper.tooltip.action2": "_Размещает_ или _Замещает_ блок.", - "item.create.handheld_blockzapper.tooltip.control3": "ПКМ крадясь", + "item.create.handheld_blockzapper.tooltip.control3": "ПКМ крадучись", "item.create.handheld_blockzapper.tooltip.action3": "Открывает _интерфейс_ _конфигурации_", "item.create.handheld_worldshaper.tooltip": "HANDHELD WORLDSHAPER", @@ -1322,7 +1322,7 @@ "item.create.handheld_worldshaper.tooltip.action1": "Устанавливает блоки, помещенные инструментом, в целевой блок.", "item.create.handheld_worldshaper.tooltip.control2": "ПКМ на блок", "item.create.handheld_worldshaper.tooltip.action2": "Применяет выбранную _кисть_ и _инструмент_ в выбранном месте.", - "item.create.handheld_worldshaper.tooltip.control3": "ПКМ крадясь", + "item.create.handheld_worldshaper.tooltip.control3": "ПКМ крадучись", "item.create.handheld_worldshaper.tooltip.action3": "Открывает _интерфейс_ _конфигурации_", "item.create.tree_fertilizer.tooltip": "TREE FERTILIZER", @@ -1359,7 +1359,7 @@ "item.create.schematic.tooltip.summary": "Содержит структуру, которая будет позиционироваться и помещаться в мир. Расположите голограмму по своему усмотрению и используйте _схематичную пушку_ для ее построения.", "item.create.schematic.tooltip.condition1": "При удерживании", "item.create.schematic.tooltip.behaviour1": "Может быть позиционирован с помощью инструментов на экране.", - "item.create.schematic.tooltip.control1": "ПКМ крадясь", + "item.create.schematic.tooltip.control1": "ПКМ крадучись", "item.create.schematic.tooltip.action1": "Открывает _интерфейс_ для ввода _точных_ _координат_.", "item.create.schematic_and_quill.tooltip": "SCHEMATIC AND QUILL", @@ -1372,7 +1372,7 @@ "item.create.schematic_and_quill.tooltip.action1": "Выберите угловые точки / подтвердите сохранение.", "item.create.schematic_and_quill.tooltip.control2": "Удержание Ctrl", "item.create.schematic_and_quill.tooltip.action2": "Выберите точки в воздухе. Прокрутка для настройки расстояния.", - "item.create.schematic_and_quill.tooltip.control3": "ПКМ крадясь", + "item.create.schematic_and_quill.tooltip.control3": "ПКМ крадучись", "item.create.schematic_and_quill.tooltip.action3": "_Сбрасывает_ и _удаляет_ выделение.", "block.create.schematicannon.tooltip": "SCHEMATICANNON", @@ -1424,7 +1424,7 @@ "item.create.belt_connector.tooltip.summary": "Соединяет _2_ _Вала_ с помощью _механического_ _ремня_._ Соединённые валы будут иметь одинаковые _скорость_ и _направление_ _вращения._ Лента может служить как _конвейер_ для _транспортировки._", "item.create.belt_connector.tooltip.control1": "ПКМ по валу", "item.create.belt_connector.tooltip.action1": "Выбирает вал в качестве одного шкива конвейера. Оба выбранных вала должны быть _на_ _одной_ _линии_ _вертикально,_ _горизонтально_ либо _диагонально_ по направлению конвейера.", - "item.create.belt_connector.tooltip.control2": "ПКМ крадясь", + "item.create.belt_connector.tooltip.control2": "ПКМ крадучись", "item.create.belt_connector.tooltip.action2": "_Сбрасывает_ первый выбранный шкив для конвейера.", "item.create.goggles.tooltip": "GOGGLES", @@ -1438,7 +1438,7 @@ "item.create.wrench.tooltip.summary": "Полезный _инструмент_ для работы с _кинетическими_ штуковинами. Может использоваться для _поворота_, _демонтажа_ и _настройки_ компонентов.", "item.create.wrench.tooltip.control1": "ПКМ по кинетическому блоку", "item.create.wrench.tooltip.action1": "_Поворачивает_ _компонент_ с которым вы взаимодействуете _к_ _лицу_ или _от_ _лица_.", - "item.create.wrench.tooltip.control2": "ПКМ крадясь", + "item.create.wrench.tooltip.control2": "ПКМ крадучись", "item.create.wrench.tooltip.action2": "Разбирает кинетические компоненты и помещает их обратно в ваш инвентарь.", "block.create.creative_motor.tooltip": "CREATIVE MOTOR", @@ -1674,7 +1674,7 @@ "block.create.redstone_link.tooltip.behaviour1": "Приняв сигнал той-же _частоты_ выдаёт сигнал красного камня или наоборот.", "block.create.redstone_link.tooltip.control1": "При ПКМ предметом", "block.create.redstone_link.tooltip.action1": "Устанавливает частоту для этого предмета. Всего _два_ разных предмета могут быть использованы в комбинации для определения частоты.", - "block.create.redstone_link.tooltip.control2": "ПКМ крадясь", + "block.create.redstone_link.tooltip.control2": "ПКМ крадучись", "block.create.redstone_link.tooltip.action2": "Переключение между режимом _приемника_ и _передатчика_.", "block.create.nixie_tube.tooltip": "NIXIE TUBE", From ffc152ecf2d3fc41576802ef85c278b71c6c5d77 Mon Sep 17 00:00:00 2001 From: Franco Paladini <76663897+FrannDzs@users.noreply.github.com> Date: Fri, 19 Feb 2021 17:16:28 -0300 Subject: [PATCH 03/24] Update es_es.json (HOTFIX) -Translated unfinished strings -Some improvements and fixes --- .../resources/assets/create/lang/es_es.json | 61 +++++++++++-------- 1 file changed, 34 insertions(+), 27 deletions(-) diff --git a/src/main/resources/assets/create/lang/es_es.json b/src/main/resources/assets/create/lang/es_es.json index 787422bb8..989f4c08c 100644 --- a/src/main/resources/assets/create/lang/es_es.json +++ b/src/main/resources/assets/create/lang/es_es.json @@ -107,7 +107,7 @@ "block.create.dolomite_pillar": "Pilar de dolomita", "block.create.encased_chain_drive": "Cadena de transmisión revestida", "block.create.encased_fan": "Ventilador revestido", - "block.create.encased_fluid_pipe": "Tubería de fluidos de cobre revestida", + "block.create.encased_fluid_pipe": "Tubería de fluidos de cobre reforzada", "block.create.fancy_andesite_bricks": "Ladrillos de andesita elegantes", "block.create.fancy_andesite_bricks_slab": "Ladrillos de andesita elegantes", "block.create.fancy_andesite_bricks_stairs": "Escaleras de ladrillos de andesita elegantes", @@ -165,7 +165,7 @@ "block.create.gantry_shaft": "Eje de grúa", "block.create.gearbox": "Caja de transmisión", "block.create.gearshift": "Caja de cambios", - "block.create.glass_fluid_pipe": "Tubo de cristal para fluidos", + "block.create.glass_fluid_pipe": "Tubería de fluidos de cristal", "block.create.granite_bricks": "Ladrillos de granito", "block.create.granite_bricks_slab": "Losa de ladrillos de granito", "block.create.granite_bricks_stairs": "Escaleras de ladrillos de granito", @@ -349,7 +349,7 @@ "block.create.redstone_link": "Enlace de Redstone", "block.create.refined_radiance_casing": "Revestidor de radiante", "block.create.reinforced_rail": "Raíl reforzado", - "block.create.rope": "Soga", + "block.create.rope": "Cuerda", "block.create.rope_pulley": "Polea de cuerda", "block.create.rotation_speed_controller": "Controlador de velocidad de rotación", "block.create.sail_frame": "Marco de vela", @@ -506,7 +506,7 @@ "advancement.create.splitter_tunnel": "Divide y vencerás", "advancement.create.splitter_tunnel.desc": "Crear un divisor con un grupo de túneles de latón.", "advancement.create.chute": "Caída en picado", - "advancement.create.chute.desc": "Coloque un ducto, la contrapartida vertical de la correa.", + "advancement.create.chute.desc": "Coloque un ducto, la contrapartida vertical de la cinta.", "advancement.create.upward_chute": "Abducción aérea", "advancement.create.upward_chute.desc": "Observe cómo un objeto lanzado vuela hacia un paracaídas impulsado por un ventilador.", "advancement.create.belt_funnel": "Colgantes con forma de embudo", @@ -532,7 +532,7 @@ "advancement.create.aesthetics": "Boom, Estética!", "advancement.create.aesthetics.desc": "Colocar los soportes en un eje, tubo y rueda dentada.", "advancement.create.reinforced": "Boom, Reforzado!", - "advancement.create.reinforced.desc": "Utilizar bloques de revestimiento en un eje, un tubo y una correa.", + "advancement.create.reinforced.desc": "Utilizar bloques de revestimiento en un eje, un tubo y una cinta.", "advancement.create.water_wheel": "Aprovechar la hidráulica", "advancement.create.water_wheel.desc": "Coloca una Rueda hidráulica e intenta hacerla girar.", "advancement.create.chocolate_wheel": "Potencia de buen gusto", @@ -684,6 +684,7 @@ "create.recipe.mechanical_crafting": "Elaboración mecánica", "create.recipe.automatic_shaped": "Elaboración automatizada de productos con forma", "create.recipe.block_cutting": "Corte de bloques", + "create.recipe.wood_cutting": "Corte de maderas", "create.recipe.blockzapper_upgrade": "Blockzapper", "create.recipe.sandpaper_polishing": "Pulido con papel de lija", "create.recipe.mystery_conversion": "Conversión misteriosa", @@ -844,13 +845,19 @@ "create.gui.stockpile_switch.move_to_upper_at": "Pasar al carril superior en %1$s%%", "create.gui.sequenced_gearshift.title": "Cambio de marchas secuenciado", "create.gui.sequenced_gearshift.instruction": "Instrucción", + "create.gui.sequenced_gearshift.instruction.turn_angle.descriptive": "Giro por ángulo", "create.gui.sequenced_gearshift.instruction.turn_angle": "Giro", "create.gui.sequenced_gearshift.instruction.turn_angle.angle": "Ángulo", + "create.gui.sequenced_gearshift.instruction.turn_distance.descriptive": "Giro para mover el pistón/polea/grúa", "create.gui.sequenced_gearshift.instruction.turn_distance": "Pistón", "create.gui.sequenced_gearshift.instruction.turn_distance.distance": "Distancia", - "create.gui.sequenced_gearshift.instruction.wait": "Espera", - "create.gui.sequenced_gearshift.instruction.wait.duration": "Duración", + "create.gui.sequenced_gearshift.instruction.delay.descriptive": "Tiempo de retraso", + "create.gui.sequenced_gearshift.instruction.delay": "Retraso", + "create.gui.sequenced_gearshift.instruction.delay.duration": "Duración", + "create.gui.sequenced_gearshift.instruction.end.descriptive": "Fin", "create.gui.sequenced_gearshift.instruction.end": "Fin", + "create.gui.sequenced_gearshift.instruction.await.descriptive": "En espera de un Pulso de Redstone", + "create.gui.sequenced_gearshift.instruction.await": "En espera", "create.gui.sequenced_gearshift.speed": "Velocidad, Dirección", "create.gui.sequenced_gearshift.speed.forward": "Velocidad de entrada, hacia adelante", "create.gui.sequenced_gearshift.speed.forward_fast": "Doble velocidad, hacia adelante", @@ -1159,19 +1166,19 @@ "block.create.metal_bracket.tooltip.summary": "Decora tus _Ejes_, _Ruedas dentadas_ y _Ductos_ con un poco de refuerzo industrial robusto.", "block.create.andesite_casing.tooltip": "REVESTIDOR DE ANDESITA", - "block.create.andesite_casing.tooltip.summary": "Máquina de revestimiento simple con una variedad de usos. Seguro para la decoración. Puede utilizarse para _encastrar ejes_ y _correas._", + "block.create.andesite_casing.tooltip.summary": "Máquina de revestimiento simple con una variedad de usos. Seguro para la decoración. Puede utilizarse para _revestir ejes_ y _cintas._", "block.create.andesite_funnel.tooltip": "EMBUDO DE ANDESITA", "block.create.andesite_funnel.tooltip.summary": "Un componente de transferencia de elementos en general, que hace la transición de éstos entre los medios de transporte. Se puede controlar con una _señal de Redstone_.", "block.create.andesite_funnel.tooltip.condition1": "Comportamiento general", "block.create.andesite_funnel.tooltip.behaviour1": "La cara _abierta_ _recogerá los objetos molidos_ en el espacio del bloque que tiene delante y los _insertará_ en cualquier contenedor del lado opuesto del embudo", - "block.create.andesite_funnel.tooltip.condition2": "Cuando se montan en correas, depósitos y similares", + "block.create.andesite_funnel.tooltip.condition2": "Cuando se montan en cintas, depósitos y similares", "block.create.andesite_funnel.tooltip.behaviour2": "_Recoge_ o _Coloca_ los elementos en el componente montado, desde o hacia el inventario _detrás_ de sí mismo. Siempre que el embudo tenga una direccionalidad específica, puede invertirse utilizando una Llave.", "block.create.andesite_funnel.tooltip.condition3": "Cuando se encuentra verticalmente entre dos inventarios", "block.create.andesite_funnel.tooltip.behaviour3": "Transferirá los artículos hacia abajo, como una tolva sin búfer.", "block.create.andesite_tunnel.tooltip": "TÚNEL DE ANDESITA", - "block.create.andesite_tunnel.tooltip.summary": "¡Una cubierta protectora para sus _correas_!. El _Túnel de Andesita_ puede separar un elemento de una pila cuando se coloca otra correa o depósito al lado de la correa principal.", + "block.create.andesite_tunnel.tooltip.summary": "¡Una cubierta protectora para sus _cintas_!. El _Túnel de Andesita_ puede separar un elemento de una pila cuando se coloca otra cinta o depósito al lado de la cinta principal.", "block.create.andesite_tunnel.tooltip.control1": "Click derecho con la Llave Inglesa en el lateral", "block.create.andesite_tunnel.tooltip.action1": "_Ajusta las persianas de las ventanas_ si el túnel tiene una ventana en esa cara.", @@ -1179,15 +1186,15 @@ "block.create.brass_funnel.tooltip.summary": "Un componente de transferencia de elementos en general, que hace la transición de éstos entre los medios de transporte. Se puede controlar con una _señal de Redstone_. Viene con un práctico _filtro_.", "block.create.brass_funnel.tooltip.condition1": "Comportamiento General", "block.create.brass_funnel.tooltip.behaviour1": "La cara _abierta_ _recogerá los objetos molidos_ en el espacio del bloque que tiene delante y los _insertará_ en cualquier contenedor del lado opuesto del embudo.", - "block.create.brass_funnel.tooltip.condition2": "Cuando se montan en correas, depósitos y similares", + "block.create.brass_funnel.tooltip.condition2": "Cuando se montan en cintas, depósitos y similares", "block.create.brass_funnel.tooltip.behaviour2": "_Recoge_ o _Coloca_ los elementos en el componente montado, desde o hacia el inventario _detrás_ de sí mismo. Siempre que el embudo tenga una direccionalidad específica, puede invertirse utilizando una Llave Inglesa.", "block.create.brass_funnel.tooltip.condition3": "Cuando se encuentra verticalmente entre dos inventarios", "block.create.brass_funnel.tooltip.behaviour3": "Transfiere los artículos hacia abajo, como una tolva sin búfer.", "block.create.brass_tunnel.tooltip": "TÚNEL DE LATÓN", - "block.create.brass_tunnel.tooltip.summary": "Una cubierta protectora elegante para sus _correas_. Los _Túneles de latón_ también vienen con una serie de opciones de _Filtración_ y _División_ para sus artículos.", + "block.create.brass_tunnel.tooltip.summary": "Una cubierta protectora elegante para sus _cintas_. Los _Túneles de latón_ también vienen con una serie de opciones de _Filtración_ y _División_ para sus artículos.", "block.create.brass_tunnel.tooltip.condition1": "Cuando se colocan uno al lado del otro", - "block.create.brass_tunnel.tooltip.behaviour1": "Los túneles de latón se conectan entre sí y permiten redirigir el contenido de una correa a otra.", + "block.create.brass_tunnel.tooltip.behaviour1": "Los túneles de latón se conectan entre sí y permiten redirigir el contenido de una cinta a otra.", "block.create.brass_tunnel.tooltip.condition2": "Filtrado", "block.create.brass_tunnel.tooltip.behaviour2": "Los _Túneles de latón_ vienen con filtros tanto para la _Entrada_ como para la _Salida_. Si un _Elemento_ no está permitido desde la salida filtrada de un _Túnel_ será transferido a la salida de un _Túnel_ conectado.", "block.create.brass_tunnel.tooltip.condition3": "Dividiendo", @@ -1202,8 +1209,8 @@ "block.create.copper_casing.tooltip.condition1": "Cuando se utiliza en una tubería de fluidos", "block.create.copper_casing.tooltip.behaviour1": "_Reviste_ la _Tubería de fluidos_ con _Revestimiento de cobre_. Las tuberías de fluidos revestidas _bloquean sus conexiones_ en su lugar, dejando de reaccionar a los cambios en las tuberías vecinas.", - "block.create.encased_fluid_pipe.tooltip": "TUBO DE FLUIDOS REVESTIDO", - "block.create.encased_fluid_pipe.tooltip.summary": "Un tubo de fluidos revestido con cobre.", + "block.create.encased_fluid_pipe.tooltip": "TUBO DE FLUIDOS REFORZADO", + "block.create.encased_fluid_pipe.tooltip.summary": "Un tubo de fluidos reforzado con más cobre.", "block.create.copper_valve_handle.tooltip": "ASA DE VÁLVULA DE COBRE", "block.create.copper_valve_handle.tooltip.summary": "Una precisa _fuente_ de _fuerza de rotación_ que requiere la interacción de los jugadores. ¡Ten cuidado de no agotarte!", @@ -1218,12 +1225,12 @@ "block.create.chute.tooltip": "DUCTO", "block.create.chute.tooltip.summary": "_Recoge_ y _Transporta_ elementos en vertical o en diagonal. Puede tanto coger como colocar objetos en _contenedores de objetos_. También puede interactuar con los ductos desde el lateral utilizando _tolvas_ o _embudos montados_.", "block.create.chute.tooltip.condition1": "Cuando se alimenta con un ventilador", - "block.create.chute.tooltip.behaviour1": "Los ductos accionados por ventilador pueden transportar _elementos_ hacia arriba, y aspirar _elementos_ de los _depósitos_ y de las _correas_.", + "block.create.chute.tooltip.behaviour1": "Los ductos accionados por ventilador pueden transportar _elementos_ hacia arriba, y aspirar _elementos_ de los _depósitos_ y de las _cintas_.", "block.create.depot.tooltip": "DEPÓSITO", "block.create.depot.tooltip.summary": "Un lugar práctico para colocar sus _elementos_. Proporciona un punto de interacción para varias máquinas", "block.create.depot.tooltip.condition1": "Click derecho en el depósito", - "block.create.depot.tooltip.behaviour1": "Coloca o toma un _Elemento_ del _Depósito_. Los _Bloques_ y los _Artilugios_ que interactúan con una _Correa_ también funcionan en un _Depósito_.", + "block.create.depot.tooltip.behaviour1": "Coloca o toma un _Elemento_ del _Depósito_. Los _Bloques_ y los _Artilugios_ que interactúan con una _cinta_ también funcionan en un _Depósito_.", "item.create.blaze_cake.tooltip": "PASTEL DE BLAZE", "item.create.blaze_cake.tooltip.summary": "Un delicioso regalo para sus esforzados _Quemadores de blaze_. Los pone en marcha!.", @@ -1285,7 +1292,7 @@ "block.create.spout.tooltip.condition1": "Transferencia de fluidos", "block.create.spout.tooltip.behaviour1": "Cuando se coloca un _contenedor de fluidos_ como un _cubo_ o una _botella_ debajo, el caño intentará rellenarlo con su propio _fluido_ almacenado", "block.create.spout.tooltip.condition2": "Automatización de fluidos", - "block.create.spout.tooltip.behaviour2": "El caño colocado encima de una _correa_ o _depósito_ reaccionará automáticamente con un contenedor de fluidos_ que pase por debajo", + "block.create.spout.tooltip.behaviour2": "El caño colocado encima de una _cinta_ o _depósito_ reaccionará automáticamente con un contenedor de fluidos_ que pase por debajo", "block.create.item_drain.tooltip": "DRENADOR DE ELEMENTOS", "block.create.item_drain.tooltip.summary": "Un depósito rallado para vaciar tus _artículos fluidos._", @@ -1295,7 +1302,7 @@ "block.create.mechanical_arm.tooltip": "BRAZO MECÁNICO", "block.create.mechanical_arm.tooltip.summary": "Artilugio avanzado para reubicar _elementos_", "block.create.mechanical_arm.tooltip.condition1": "Transferencia de elementos", - "block.create.mechanical_arm.tooltip.behaviour1": "Puede tomar o colocar objetos en cualquier _inventario_ accesible_, como _Correas_, _Depósitos_, _Embudos_ y _Autoensambladores_", + "block.create.mechanical_arm.tooltip.behaviour1": "Puede tomar o colocar objetos en cualquier _inventario_ accesible_, como _Cintas_, _Depósitos_, _Embudos_ y _Autoensambladores_", "block.create.mechanical_arm.tooltip.control1": "Mientras está en la mano", "block.create.mechanical_arm.tooltip.action1": "Haz clic con el botón derecho en un _objeto accesible del inventario_ para establecerlo como _fuente_ para el _brazo mecánico_. Haz clic con el botón derecho del ratón dos veces para establecerlo como _destino_", "block.create.mechanical_arm.tooltip.control2": "Usa la rueda del ratón con la Llave Inglesa", @@ -1410,7 +1417,7 @@ "block.create.gearshift.tooltip.condition1": "Cuando se alimenta", "block.create.gearshift.tooltip.behaviour1": "_Invierte_ la rotación de salida", - "bloque.crear.embrague.información.sobre.herramientas": "EMBRAGUE", + "block.create.clutch.tooltip": "Embrague", "block.create.clutch.tooltip.summary": "Un control para conectar/desconectar la rotación de los ejes conectados", "block.create.clutch.tooltip.condition1": "Cuando se acciona", "block.create.clutch.tooltip.behaviour1": "_Detiene_ el transporte de la rotación al otro lado", @@ -1493,8 +1500,8 @@ "block.create.mechanical_press.tooltip.summary": "Un pistón de fuerza para comprimir los objetos que tiene debajo. Requiere una _fuerza de rotación_ constante", "block.create.mechanical_press.tooltip.condition1": "Cuando es impulsado por Redstone", "block.create.mechanical_press.tooltip.behaviour1": "Comienza a _comprimir_ los objetos que caen debajo", - "block.create.mechanical_press.tooltip.condition2": "Cuando está por encima de una correa", - "block.create.mechanical_press.tooltip.behaviour2": "Comprime _automáticamente_ los elementos de derivación en la correa", + "block.create.mechanical_press.tooltip.condition2": "Cuando está por encima de una cinta", + "block.create.mechanical_press.tooltip.behaviour2": "Comprime _automáticamente_ los elementos de derivación en la cinta", "block.create.mechanical_press.tooltip.condition3": "Cuando está por encima de la Cuenca", "block.create.mechanical_press.tooltip.behaviour3": "Comienza a _compactar artículos_ en la cuenca siempre que estén presentes todos los ingredientes necesarios", @@ -1519,13 +1526,13 @@ "block.create.mechanical_mixer.tooltip.behaviour1": "Comienza a mezclar los elementos en la cuenca siempre que estén presentes todos los ingredientes necesarios. Para evitar recetas no deseadas, utilice la ranura del filtro de la cuenca o reduzca la fuerza de rotación hasta que se hayan añadido todos los ingredientes deseados", "block.create.mechanical_crafter.tooltip": "AUTOENSAMBLADOR MECÁNICO", - "block.create.mechanical_crafter.tooltip.summary": "Un ensamblador cinético para _automatizar_ cualquier receta de _crafteo_ con forma. Coloca _múltiples en una cuadrícula_ correspondiente a tu receta, y _organiza sus correas_ para crear un _flujo_ que salga de la cuadrícula en uno de los Autoensambladores", + "block.create.mechanical_crafter.tooltip.summary": "Un ensamblador cinético para _automatizar_ cualquier receta de _crafteo_ con forma. Coloca _múltiples en una cuadrícula_ correspondiente a tu receta, y _organiza sus cintas_ para crear un _flujo_ que salga de la cuadrícula en uno de los Autoensambladores", "block.create.mechanical_crafter.tooltip.condition1": "Cuando es impulsado por la cinética", "block.create.mechanical_crafter.tooltip.behaviour1": "_Empieza el proceso de creación_ en cuanto _todos los crafters_ de la parrilla hayan recibido un objeto_", "block.create.mechanical_crafter.tooltip.condition2": "Con pulso de Redstone", "block.create.mechanical_crafter.tooltip.behaviour2": "_Fuerza_ el inicio del proceso de _creación_ con todos los _artículos_ dados actualmente en la parrilla", "block.create.mechanical_crafter.tooltip.control1": "Cuando se arranca por delante", - "block.create.mechanical_crafter.tooltip.action1": "_Circula la dirección_ hacia la que un autoensamblador individual _mueve sus objetos_. Para formar una cuadrícula de trabajo, _organiza las correas en un flujo_ que mueva todos los objetos hacia un autoensamblador final. El autoensamblador final debe _apuntar hacia fuera_ de la rejilla", + "block.create.mechanical_crafter.tooltip.action1": "_Circula la dirección_ hacia la que un autoensamblador individual _mueve sus objetos_. Para formar una cuadrícula de trabajo, _organiza las cintas en un flujo_ que mueva todos los objetos hacia un autoensamblador final. El autoensamblador final debe _apuntar hacia fuera_ de la rejilla", "block.create.mechanical_crafter.tooltip.control2": "Cuando se arranca hacia atrás", "block.create.mechanical_crafter.tooltip.action2": "Conecta_ el _inventario de entrada_ de los autoensambladores adyacentes. Usa esto para _combinar ranuras_ en la cuadrícula de trabajo y _guardar el la entrada de trabajo_", @@ -1630,7 +1637,7 @@ "block.create.secondary_linear_chassis.tooltip": "CHASIS LINEAL SECUNDARIO", "block.create.secondary_linear_chassis.tooltip.summary": "Un segundo tipo de _Chasis lineal_ que no se conecta al otro", - "bloque.crear.chasis_radial.tooltip": "CHASIS DE ROTACIÓN", + "block.create.radial_chassis.tooltip": "CHASIS RADIAL", "block.create.radial_chassis.tooltip.summary": "Bloque base configurable que conecta estructuras para el movimiento", "block.create.radial_chassis.tooltip.condition1": "Cuando se mueve", "block.create.radial_chassis.tooltip.behaviour1": "_Mueve_ todos los _Chasis_ adjuntos en una columna, y un cilindro de bloques a su alrededor. Los bloques que lo rodean sólo se mueven cuando están dentro del rango y están adheridos a un lado pegajoso (Ver [Ctrl]).", @@ -1716,7 +1723,7 @@ "block.create.deployer.tooltip.behaviour3": "El desplegador no se activará a menos que el elemento retenido _coincida_ con el _filtro._ Los elementos que no coincidan no podrán ser insertados; los elementos retenidos que coincidan con el filtro no podrán ser extraídos.", "block.create.brass_casing.tooltip": "REVESTIDOR DE LATÓN", - "block.create.brass_casing.tooltip.summary": "Resistente máquina revestidora con una gran variedad de usos. Segura para la decoración. Se puede utilizar para _revestir ejes_ y _correas._", + "block.create.brass_casing.tooltip.summary": "Resistente máquina revestidora con una gran variedad de usos. Segura para la decoración. Se puede utilizar para _revestir ejes_ y _cintas._", "block.create.pulse_repeater.tooltip": "REPETIDOR DE PULSOS DE REDSTONE", "block.create.pulse_repeater.tooltip.summary": "Un circuito sencillo para cortar las señales de Redstone que pasan a una longitud de _1 tick_", @@ -1792,6 +1799,6 @@ "create.tooltip.randomWipDescription7": "Este quizás no es para ti. ¿Qué tal ese?", "create.tooltip.randomWipDescription8": "Úsalo y arrepiéntete de tu decisión inmediatamente", - "_": "Gracias por traducir Create!" + "_": "Thank you for translating Create!" } From a32cbe15a30f770ef87b934248b0db6e66e6ba56 Mon Sep 17 00:00:00 2001 From: _0Steven <42909981+SuicidalSteve@users.noreply.github.com> Date: Sat, 20 Feb 2021 15:08:58 +0100 Subject: [PATCH 04/24] Consistently Crushing Entities - Fix known issue with omnidirectional crushing wheels inconsistently moving crushed mob drops to the output location. --- .../CrushingWheelControllerTileEntity.java | 22 +++++++++++++++---- .../crusher/CrushingWheelTileEntity.java | 10 +-------- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/crusher/CrushingWheelControllerTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/crusher/CrushingWheelControllerTileEntity.java index 2fb13c6c0..858e8f5ce 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/crusher/CrushingWheelControllerTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/crusher/CrushingWheelControllerTileEntity.java @@ -20,6 +20,7 @@ import com.simibubi.create.foundation.utility.VecHelper; import net.minecraft.block.BlockState; import net.minecraft.entity.Entity; +import net.minecraft.entity.LivingEntity; import net.minecraft.entity.item.ItemEntity; import net.minecraft.item.BlockItem; import net.minecraft.item.ItemStack; @@ -199,12 +200,25 @@ public class CrushingWheelControllerTileEntity extends SmartTileEntity { return; if (!(processingEntity instanceof ItemEntity)) { + Vec3d entityOutPos = outPos.add(facing.getAxis() == Axis.X ? .5f * offset : 0f + , facing.getAxis() == Axis.Y ? .5f * offset : 0f + , facing.getAxis() == Axis.Z ? .5f * offset : 0f); + int crusherDamage = AllConfigs.SERVER.kinetics.crushingDamage.get(); + + if (processingEntity instanceof LivingEntity) { + if ((((LivingEntity) processingEntity).getHealth() - crusherDamage <= 0) //Takes LivingEntity instances as exception, so it can move them before it would kill them. + && (((LivingEntity) processingEntity).hurtTime <= 0)) { //This way it can actually output the items to the right spot. + processingEntity.setPosition(entityOutPos.x + , entityOutPos.y + , entityOutPos.z); + } + } processingEntity.attackEntityFrom(CrushingWheelTileEntity.damageSource, - AllConfigs.SERVER.kinetics.crushingDamage.get()); + crusherDamage); if (!processingEntity.isAlive()) { - processingEntity.setPosition(outPos.x + (facing.getAxis() == Axis.X ? .75f * offset : 0f) //This is supposed to move the mobs to the output location - , outPos.y + (facing.getAxis() == Axis.Y ? .75f * offset : 0f) //So the item drops end up on the other end - , outPos.z + (facing.getAxis() == Axis.Z ? .75f * offset : 0f)); //This, however, does not currently work consistently for non-downwards crushers. + processingEntity.setPosition(entityOutPos.x + , entityOutPos.y + , entityOutPos.z); } return; } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/crusher/CrushingWheelTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/crusher/CrushingWheelTileEntity.java index 8d94992d5..63aced587 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/crusher/CrushingWheelTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/crusher/CrushingWheelTileEntity.java @@ -7,7 +7,6 @@ import net.minecraft.tileentity.TileEntityType; import net.minecraft.util.DamageSource; import net.minecraft.util.Direction; import net.minecraft.util.math.AxisAlignedBB; -import net.minecraftforge.event.entity.living.LivingDeathEvent; import net.minecraftforge.event.entity.living.LootingLevelEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod.EventBusSubscriber; @@ -50,14 +49,7 @@ public class CrushingWheelTileEntity extends KineticTileEntity { public static void crushingIsFortunate(LootingLevelEvent event) { if (event.getDamageSource() != damageSource) return; - event.setLootingLevel(2); - } - - @SubscribeEvent - public static void crushingTeleportsEntities(LivingDeathEvent event) { - if (event.getSource() != damageSource) - return; - event.getEntity().setPos(event.getEntity().getX(), Math.floor(event.getEntity().getY()) - .5f, event.getEntity().getZ()); + event.setLootingLevel(2); //This does not currently increase mob drops. It seems like this only works for damage done by an entity. } } From 41cb2ad9374f55d22dbccc491147ec21b268ed8b Mon Sep 17 00:00:00 2001 From: _0Steven <42909981+SuicidalSteve@users.noreply.github.com> Date: Sat, 20 Feb 2021 18:50:40 +0100 Subject: [PATCH 05/24] Stop explody crusher drops - Remove the velocity of item entities dropped by crushed mobs so they fall neatly onto belts rather than exploding everywhere. --- .../components/crusher/CrushingWheelTileEntity.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/crusher/CrushingWheelTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/crusher/CrushingWheelTileEntity.java index 63aced587..fb6117988 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/crusher/CrushingWheelTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/crusher/CrushingWheelTileEntity.java @@ -3,10 +3,13 @@ package com.simibubi.create.content.contraptions.components.crusher; import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.foundation.utility.Iterate; +import net.minecraft.entity.item.ItemEntity; import net.minecraft.tileentity.TileEntityType; import net.minecraft.util.DamageSource; import net.minecraft.util.Direction; import net.minecraft.util.math.AxisAlignedBB; +import net.minecraft.util.math.Vec3d; +import net.minecraftforge.event.entity.living.LivingDropsEvent; import net.minecraftforge.event.entity.living.LootingLevelEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod.EventBusSubscriber; @@ -52,4 +55,14 @@ public class CrushingWheelTileEntity extends KineticTileEntity { event.setLootingLevel(2); //This does not currently increase mob drops. It seems like this only works for damage done by an entity. } + @SubscribeEvent + public static void handleCrushedMobDrops(LivingDropsEvent event) { + if (event.getSource() != CrushingWheelTileEntity.damageSource) + return; + Vec3d outSpeed = Vec3d.ZERO; + for (ItemEntity outputItem : event.getDrops()) { + outputItem.setMotion(outSpeed); + } + } + } From b5f9cbc4b39a69f8abf3ef442c38f1b635aa1c2d Mon Sep 17 00:00:00 2001 From: JozsefA Date: Sat, 20 Feb 2021 15:22:07 -0800 Subject: [PATCH 06/24] improve compatibility layer. --- .../foundation/render/backend/Backend.java | 47 ++-------- .../render/backend/gl/GlBuffer.java | 8 +- .../render/backend/gl/GlVertexArray.java | 9 +- .../backend/gl/versioned/DrawInstanced.java | 54 ++++++++++++ .../backend/gl/versioned/GlFunctions.java | 85 +++++++++++++++++++ .../backend/gl/versioned/GlVersioned.java | 10 ++- .../backend/gl/versioned/InstancedArrays.java | 43 ++++++++++ .../gl/versioned/VertexArrayObject.java | 77 +++++++++++++++++ .../backend/instancing/InstancedModel.java | 7 +- 9 files changed, 289 insertions(+), 51 deletions(-) create mode 100644 src/main/java/com/simibubi/create/foundation/render/backend/gl/versioned/DrawInstanced.java create mode 100644 src/main/java/com/simibubi/create/foundation/render/backend/gl/versioned/GlFunctions.java create mode 100644 src/main/java/com/simibubi/create/foundation/render/backend/gl/versioned/InstancedArrays.java create mode 100644 src/main/java/com/simibubi/create/foundation/render/backend/gl/versioned/VertexArrayObject.java diff --git a/src/main/java/com/simibubi/create/foundation/render/backend/Backend.java b/src/main/java/com/simibubi/create/foundation/render/backend/Backend.java index 6a416b187..858d54572 100644 --- a/src/main/java/com/simibubi/create/foundation/render/backend/Backend.java +++ b/src/main/java/com/simibubi/create/foundation/render/backend/Backend.java @@ -11,6 +11,7 @@ import java.util.Map; import java.util.function.Consumer; import java.util.function.Predicate; +import com.simibubi.create.foundation.render.backend.gl.versioned.GlFunctions; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.lwjgl.opengl.GL; @@ -44,16 +45,12 @@ public class Backend { private static boolean enabled; public static GLCapabilities capabilities; - private static MapBuffer mapBuffer; + public static GlFunctions functions; public Backend() { throw new IllegalStateException(); } - public static void mapBuffer(int target, int offset, int length, Consumer upload) { - mapBuffer.mapBuffer(target, offset, length, upload); - } - /** * Register a shader program. TODO: replace with forge registry? */ @@ -71,47 +68,21 @@ public class Backend { return (P) programs.get(spec); } - /** - * Get the most compatible version of a specific OpenGL feature by iterating over enum constants in order. - * - * @param clazz The class of the versioning enum. - * @param The type of the versioning enum. - * @return The first defined enum variant to return true. - */ - public static & GlVersioned> V getLatest(Class clazz) { - return getLatest(clazz, capabilities); - } - - /** - * Get the most compatible version of a specific OpenGL feature by iterating over enum constants in order. - * - * @param clazz The class of the versioning enum. - * @param caps The current system's supported features. - * @param The type of the versioning enum. - * @return The first defined enum variant to return true. - */ - public static & GlVersioned> V getLatest(Class clazz, GLCapabilities caps) { - V[] constants = clazz.getEnumConstants(); - V last = constants[constants.length - 1]; - if (!last.supported(caps)) { - throw new IllegalStateException(""); - } - - return Arrays.stream(constants).filter(it -> it.supported(caps)).findFirst().orElse(last); + public static boolean available() { + return canUseVBOs(); } public static boolean canUseInstancing() { - return enabled && gl33(); + return enabled && + functions.vertexArrayObjectsSupported() && + functions.drawInstancedSupported() && + functions.instancedArraysSupported(); } public static boolean canUseVBOs() { return enabled && gl20(); } - public static boolean available() { - return enabled && gl20(); - } - public static boolean gl33() { return capabilities.OpenGL33; } @@ -136,7 +107,7 @@ public class Backend { private static void onResourceManagerReload(IResourceManager manager, Predicate predicate) { if (predicate.test(VanillaResourceType.SHADERS)) { capabilities = GL.createCapabilities(); - mapBuffer = getLatest(MapBuffer.class); + functions = new GlFunctions(capabilities); OptifineHandler.refresh(); refresh(); diff --git a/src/main/java/com/simibubi/create/foundation/render/backend/gl/GlBuffer.java b/src/main/java/com/simibubi/create/foundation/render/backend/gl/GlBuffer.java index 42a72736b..8420dab87 100644 --- a/src/main/java/com/simibubi/create/foundation/render/backend/gl/GlBuffer.java +++ b/src/main/java/com/simibubi/create/foundation/render/backend/gl/GlBuffer.java @@ -3,9 +3,9 @@ package com.simibubi.create.foundation.render.backend.gl; import java.nio.ByteBuffer; import java.util.function.Consumer; -import org.lwjgl.opengl.GL20; - import com.simibubi.create.foundation.render.backend.Backend; +import com.simibubi.create.foundation.render.backend.gl.versioned.GlFunctions; +import org.lwjgl.opengl.GL20; public class GlBuffer extends GlObject { @@ -35,11 +35,11 @@ public class GlBuffer extends GlObject { } public void map(int length, Consumer upload) { - Backend.mapBuffer(bufferType, 0, length, upload); + Backend.functions.mapBuffer(bufferType, 0, length, upload); } public void map(int offset, int length, Consumer upload) { - Backend.mapBuffer(bufferType, offset, length, upload); + Backend.functions.mapBuffer(bufferType, offset, length, upload); } protected void deleteInternal(int handle) { diff --git a/src/main/java/com/simibubi/create/foundation/render/backend/gl/GlVertexArray.java b/src/main/java/com/simibubi/create/foundation/render/backend/gl/GlVertexArray.java index 33ff7461b..cf6229f6e 100644 --- a/src/main/java/com/simibubi/create/foundation/render/backend/gl/GlVertexArray.java +++ b/src/main/java/com/simibubi/create/foundation/render/backend/gl/GlVertexArray.java @@ -2,19 +2,20 @@ package com.simibubi.create.foundation.render.backend.gl; import java.util.function.Consumer; +import com.simibubi.create.foundation.render.backend.Backend; import org.lwjgl.opengl.GL30; public class GlVertexArray extends GlObject { public GlVertexArray() { - setHandle(GL30.glGenVertexArrays()); + setHandle(Backend.functions.genVertexArrays()); } public void bind() { - GL30.glBindVertexArray(handle()); + Backend.functions.bindVertexArray(handle()); } public void unbind() { - GL30.glBindVertexArray(0); + Backend.functions.bindVertexArray(0); } public void with(Consumer action) { @@ -24,6 +25,6 @@ public class GlVertexArray extends GlObject { } protected void deleteInternal(int handle) { - GL30.glDeleteVertexArrays(handle); + Backend.functions.deleteVertexArrays(handle); } } diff --git a/src/main/java/com/simibubi/create/foundation/render/backend/gl/versioned/DrawInstanced.java b/src/main/java/com/simibubi/create/foundation/render/backend/gl/versioned/DrawInstanced.java new file mode 100644 index 000000000..4c206581d --- /dev/null +++ b/src/main/java/com/simibubi/create/foundation/render/backend/gl/versioned/DrawInstanced.java @@ -0,0 +1,54 @@ +package com.simibubi.create.foundation.render.backend.gl.versioned; + +import org.lwjgl.opengl.*; + +public enum DrawInstanced implements GlVersioned { + GL31_DRAW_INSTANCED { + @Override + public boolean supported(GLCapabilities caps) { + return caps.OpenGL31; + } + + @Override + public void drawArraysInstanced(int mode, int first, int count, int primcount) { + GL31.glDrawArraysInstanced(mode, first, count, primcount); + } + }, + ARB_DRAW_INSTANCED { + @Override + public boolean supported(GLCapabilities caps) { + return caps.GL_ARB_draw_instanced; + } + + @Override + public void drawArraysInstanced(int mode, int first, int count, int primcount) { + ARBDrawInstanced.glDrawArraysInstancedARB(mode, first, count, primcount); + } + }, + EXT_DRAW_INSTANCED { + @Override + public boolean supported(GLCapabilities caps) { + return caps.GL_EXT_draw_instanced; + } + + @Override + public void drawArraysInstanced(int mode, int first, int count, int primcount) { + EXTDrawInstanced.glDrawArraysInstancedEXT(mode, first, count, primcount); + } + }, + UNSUPPORTED { + @Override + public boolean supported(GLCapabilities caps) { + return true; + } + + @Override + public void drawArraysInstanced(int mode, int first, int count, int primcount) { + throw new UnsupportedOperationException(); + } + } + + ; + + public abstract void drawArraysInstanced(int mode, int first, int count, int primcount); +} diff --git a/src/main/java/com/simibubi/create/foundation/render/backend/gl/versioned/GlFunctions.java b/src/main/java/com/simibubi/create/foundation/render/backend/gl/versioned/GlFunctions.java new file mode 100644 index 000000000..1345661fc --- /dev/null +++ b/src/main/java/com/simibubi/create/foundation/render/backend/gl/versioned/GlFunctions.java @@ -0,0 +1,85 @@ +package com.simibubi.create.foundation.render.backend.gl.versioned; + +import org.lwjgl.opengl.GLCapabilities; + +import java.nio.ByteBuffer; +import java.util.Arrays; +import java.util.function.Consumer; + +/** + * An instance of this class stores information + * about what OpenGL features are available. + * + * Each field stores an enum variant that provides access to the + * most appropriate version of a feature for the current system. + */ +public class GlFunctions { + public final MapBuffer mapBuffer; + + public final VertexArrayObject vertexArrayObject; + public final InstancedArrays instancedArrays; + public final DrawInstanced drawInstanced; + + public GlFunctions(GLCapabilities caps) { + mapBuffer = getLatest(MapBuffer.class, caps); + + vertexArrayObject = getLatest(VertexArrayObject.class, caps); + instancedArrays = getLatest(InstancedArrays.class, caps); + drawInstanced = getLatest(DrawInstanced.class, caps); + } + + public void mapBuffer(int target, int offset, int length, Consumer upload) { + mapBuffer.mapBuffer(target, offset, length, upload); + } + + public void vertexAttribDivisor(int index, int divisor) { + instancedArrays.vertexAttribDivisor(index, divisor); + } + + public void drawArraysInstanced(int mode, int first, int count, int primcount) { + drawInstanced.drawArraysInstanced(mode, first, count, primcount); + } + + public int genVertexArrays() { + return vertexArrayObject.genVertexArrays(); + } + + public void deleteVertexArrays(int array) { + vertexArrayObject.deleteVertexArrays(array); + } + + public void bindVertexArray(int array) { + vertexArrayObject.bindVertexArray(array); + } + + public boolean vertexArrayObjectsSupported() { + return vertexArrayObject != VertexArrayObject.UNSUPPORTED; + } + + public boolean instancedArraysSupported() { + return instancedArrays != InstancedArrays.UNSUPPORTED; + } + + public boolean drawInstancedSupported() { + return drawInstanced != DrawInstanced.UNSUPPORTED; + } + + /** + * Get the most compatible version of a specific OpenGL feature by iterating over enum constants in order. + * + * @param clazz The class of the versioning enum. + * @param caps The current system's supported features. + * @param The type of the versioning enum. + * @return The first defined enum variant to return true. + */ + public static & GlVersioned> V getLatest(Class clazz, GLCapabilities caps) { + V[] constants = clazz.getEnumConstants(); + V last = constants[constants.length - 1]; + if (!last.supported(caps)) { + throw new IllegalStateException(""); + } + + return Arrays.stream(constants).filter(it -> it.supported(caps)).findFirst().get(); + } +} + diff --git a/src/main/java/com/simibubi/create/foundation/render/backend/gl/versioned/GlVersioned.java b/src/main/java/com/simibubi/create/foundation/render/backend/gl/versioned/GlVersioned.java index 53d929ea0..6f456c802 100644 --- a/src/main/java/com/simibubi/create/foundation/render/backend/gl/versioned/GlVersioned.java +++ b/src/main/java/com/simibubi/create/foundation/render/backend/gl/versioned/GlVersioned.java @@ -2,7 +2,15 @@ package com.simibubi.create.foundation.render.backend.gl.versioned; import org.lwjgl.opengl.GLCapabilities; - +/** + * This interface should be implemented by enums such that the + * last defined variant always returns true. + */ public interface GlVersioned { + /** + * Queries whether this variant is supported by the current system. + * @param caps The {@link GLCapabilities} reported by the current system. + * @return true if this variant is supported, or if this is the last defined variant. + */ boolean supported(GLCapabilities caps); } diff --git a/src/main/java/com/simibubi/create/foundation/render/backend/gl/versioned/InstancedArrays.java b/src/main/java/com/simibubi/create/foundation/render/backend/gl/versioned/InstancedArrays.java new file mode 100644 index 000000000..1c000a37d --- /dev/null +++ b/src/main/java/com/simibubi/create/foundation/render/backend/gl/versioned/InstancedArrays.java @@ -0,0 +1,43 @@ +package com.simibubi.create.foundation.render.backend.gl.versioned; + +import org.lwjgl.opengl.*; + +public enum InstancedArrays implements GlVersioned { + GL33_INSTANCED_ARRAYS { + @Override + public boolean supported(GLCapabilities caps) { + return caps.OpenGL33; + } + + @Override + public void vertexAttribDivisor(int index, int divisor) { + GL33.glVertexAttribDivisor(index, divisor); + } + }, + ARB_INSTANCED_ARRAYS { + @Override + public boolean supported(GLCapabilities caps) { + return caps.GL_ARB_instanced_arrays; + } + + @Override + public void vertexAttribDivisor(int index, int divisor) { + ARBInstancedArrays.glVertexAttribDivisorARB(index, divisor); + } + }, + UNSUPPORTED { + @Override + public boolean supported(GLCapabilities caps) { + return true; + } + + @Override + public void vertexAttribDivisor(int index, int divisor) { + throw new UnsupportedOperationException(); + } + } + + ; + + public abstract void vertexAttribDivisor(int index, int divisor); +} diff --git a/src/main/java/com/simibubi/create/foundation/render/backend/gl/versioned/VertexArrayObject.java b/src/main/java/com/simibubi/create/foundation/render/backend/gl/versioned/VertexArrayObject.java new file mode 100644 index 000000000..58b9f0fc8 --- /dev/null +++ b/src/main/java/com/simibubi/create/foundation/render/backend/gl/versioned/VertexArrayObject.java @@ -0,0 +1,77 @@ +package com.simibubi.create.foundation.render.backend.gl.versioned; + +import org.lwjgl.opengl.*; + +public enum VertexArrayObject implements GlVersioned { + GL30_VAO { + @Override + public boolean supported(GLCapabilities caps) { + return caps.OpenGL30; + } + + @Override + public int genVertexArrays() { + return GL30.glGenVertexArrays(); + } + + @Override + public void bindVertexArray(int array) { + GL30.glBindVertexArray(array); + } + + @Override + public void deleteVertexArrays(int array) { + GL30.glDeleteVertexArrays(array); + } + }, + ARB_VAO { + @Override + public boolean supported(GLCapabilities caps) { + return caps.GL_ARB_vertex_array_object; + } + + @Override + public int genVertexArrays() { + return ARBVertexArrayObject.glGenVertexArrays(); + } + + @Override + public void bindVertexArray(int array) { + ARBVertexArrayObject.glBindVertexArray(array); + } + + @Override + public void deleteVertexArrays(int array) { + ARBVertexArrayObject.glDeleteVertexArrays(array); + } + }, + UNSUPPORTED { + @Override + public boolean supported(GLCapabilities caps) { + return true; + } + + @Override + public int genVertexArrays() { + throw new UnsupportedOperationException(); + } + + @Override + public void bindVertexArray(int array) { + throw new UnsupportedOperationException(); + } + + @Override + public void deleteVertexArrays(int array) { + throw new UnsupportedOperationException(); + } + } + + ; + + public abstract int genVertexArrays(); + + public abstract void bindVertexArray(int array); + + public abstract void deleteVertexArrays(int array); +} diff --git a/src/main/java/com/simibubi/create/foundation/render/backend/instancing/InstancedModel.java b/src/main/java/com/simibubi/create/foundation/render/backend/instancing/InstancedModel.java index b18cffcc4..3b092c919 100644 --- a/src/main/java/com/simibubi/create/foundation/render/backend/instancing/InstancedModel.java +++ b/src/main/java/com/simibubi/create/foundation/render/backend/instancing/InstancedModel.java @@ -5,11 +5,10 @@ import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.function.Consumer; +import com.simibubi.create.foundation.render.backend.Backend; import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL15; import org.lwjgl.opengl.GL20; -import org.lwjgl.opengl.GL31; -import org.lwjgl.opengl.GL33; import com.simibubi.create.foundation.render.RenderMath; import com.simibubi.create.foundation.render.backend.BufferedModel; @@ -116,7 +115,7 @@ public abstract class InstancedModel extends BufferedMod protected void doRender() { vao.with(vao -> { renderSetup(); - GL31.glDrawArraysInstanced(GL11.GL_QUADS, 0, vertexCount, glInstanceCount); + Backend.functions.drawArraysInstanced(GL11.GL_QUADS, 0, vertexCount, glInstanceCount); }); } @@ -163,7 +162,7 @@ public abstract class InstancedModel extends BufferedMod instanceFormat.vertexAttribPointers(staticAttributes); for (int i = 0; i < instanceFormat.getShaderAttributeCount(); i++) { - GL33.glVertexAttribDivisor(i + staticAttributes, 1); + Backend.functions.vertexAttribDivisor(i + staticAttributes, 1); } }); From 38d406e85d36f463fab8ea8b4da7275ad8e940a9 Mon Sep 17 00:00:00 2001 From: Franco Paladini <76663897+FrannDzs@users.noreply.github.com> Date: Mon, 22 Feb 2021 03:07:02 -0300 Subject: [PATCH 07/24] Update es_es.json Updated --- src/main/resources/assets/create/lang/es_es.json | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/resources/assets/create/lang/es_es.json b/src/main/resources/assets/create/lang/es_es.json index 989f4c08c..564829459 100644 --- a/src/main/resources/assets/create/lang/es_es.json +++ b/src/main/resources/assets/create/lang/es_es.json @@ -829,6 +829,7 @@ "create.gui.assembly.exception.structureTooLarge": "Hay demasiados bloques incluídos en el artilugio.\nEl máximo configurado es: %1$s", "create.gui.assembly.exception.tooManyPistonPoles": "Hay demasiadas Pértigas de extensión conectadas a este Pistón.\nEl máximo configurado es: %1$s", "create.gui.assembly.exception.noPistonPoles": "Faltan pértigas de extensión para el Pistón", + "create.gui.assembly.exception.not_enough_sails": "La estructura adjunta no incluye suficientes bloques tipo vela: %1$s\nSe requiere un mínimo de %2$s", "create.gui.gauge.info_header": "Información sobre el medidor:", "create.gui.speedometer.title": "Velocidad de rotación", "create.gui.stressometer.title": "Estrés de la red", From d8beae6ee9a9a1b76b2e517ac56f717d2008b56f Mon Sep 17 00:00:00 2001 From: Franco Paladini <76663897+FrannDzs@users.noreply.github.com> Date: Mon, 22 Feb 2021 03:12:41 -0300 Subject: [PATCH 08/24] Update es_es.json --- src/main/resources/assets/create/lang/es_es.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/resources/assets/create/lang/es_es.json b/src/main/resources/assets/create/lang/es_es.json index 564829459..c8e41ac46 100644 --- a/src/main/resources/assets/create/lang/es_es.json +++ b/src/main/resources/assets/create/lang/es_es.json @@ -824,8 +824,8 @@ "create.gui.goggles.at_current_speed": "con la velocidad actual", "create.gui.goggles.pole_length": "Longitud del poste:", "create.gui.assembly.exception": "Este artilugio no se pudo montar:", - "create.gui.assembly.exception.unmovableBlock": "Bloque inamovible (%4$s) en [%1$s %2$s %3$s]", - "create.gui.assembly.exception.chunkNotLoaded": "El bloque en [%1$s %2$s %3$s] no estaba en un chunk cargado", + "create.gui.assembly.exception.unmovableBlock": "Bloque inamovible (%4$s) en [%1$s,%2$s,%3$s]", + "create.gui.assembly.exception.chunkNotLoaded": "El bloque en [%1$s,%2$s,%3$s] no estaba en un chunk cargado", "create.gui.assembly.exception.structureTooLarge": "Hay demasiados bloques incluídos en el artilugio.\nEl máximo configurado es: %1$s", "create.gui.assembly.exception.tooManyPistonPoles": "Hay demasiadas Pértigas de extensión conectadas a este Pistón.\nEl máximo configurado es: %1$s", "create.gui.assembly.exception.noPistonPoles": "Faltan pértigas de extensión para el Pistón", From bac4be17286e2eb03b154b8fafa713aa7101e911 Mon Sep 17 00:00:00 2001 From: JozsefA Date: Mon, 22 Feb 2021 11:25:38 -0800 Subject: [PATCH 09/24] Superglue no longer gums up spawn packets --- .../components/structureMovement/Contraption.java | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/Contraption.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/Contraption.java index 3e363d2d3..e783d6436 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/Contraption.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/Contraption.java @@ -712,16 +712,15 @@ public abstract class Contraption { } ListNBT superglueNBT = new ListNBT(); - for (Pair glueEntry : superglue) { - CompoundNBT c = new CompoundNBT(); - c.put("Pos", NBTUtil.writeBlockPos(glueEntry.getKey())); - c.putByte("Direction", (byte) glueEntry.getValue() - .getIndex()); - superglueNBT.add(c); - } - ListNBT storageNBT = new ListNBT(); if (!spawnPacket) { + for (Pair glueEntry : superglue) { + CompoundNBT c = new CompoundNBT(); + c.put("Pos", NBTUtil.writeBlockPos(glueEntry.getKey())); + c.putByte("Direction", (byte) glueEntry.getValue().getIndex()); + superglueNBT.add(c); + } + for (BlockPos pos : storage.keySet()) { CompoundNBT c = new CompoundNBT(); MountedStorage mountedStorage = storage.get(pos); From cad71e58431b30e9b41da31ea74d6803fae052a6 Mon Sep 17 00:00:00 2001 From: JozsefA Date: Tue, 23 Feb 2021 16:20:46 -0800 Subject: [PATCH 10/24] Even more compatibility. --- .../foundation/render/backend/Backend.java | 17 ++--- .../render/backend/gl/GlBuffer.java | 5 +- .../render/backend/gl/GlVertexArray.java | 9 +-- ...{GlFunctions.java => GlFeatureCompat.java} | 8 +- .../backend/gl/versioned/RGPixelFormat.java | 75 +++++++++++++++++++ .../backend/instancing/InstancedModel.java | 4 +- .../render/backend/light/LightVolume.java | 25 ++++--- 7 files changed, 110 insertions(+), 33 deletions(-) rename src/main/java/com/simibubi/create/foundation/render/backend/gl/versioned/{GlFunctions.java => GlFeatureCompat.java} (93%) create mode 100644 src/main/java/com/simibubi/create/foundation/render/backend/gl/versioned/RGPixelFormat.java diff --git a/src/main/java/com/simibubi/create/foundation/render/backend/Backend.java b/src/main/java/com/simibubi/create/foundation/render/backend/Backend.java index 858d54572..5f53ee500 100644 --- a/src/main/java/com/simibubi/create/foundation/render/backend/Backend.java +++ b/src/main/java/com/simibubi/create/foundation/render/backend/Backend.java @@ -3,15 +3,12 @@ package com.simibubi.create.foundation.render.backend; import java.io.BufferedInputStream; import java.io.IOException; import java.io.InputStream; -import java.nio.ByteBuffer; import java.nio.FloatBuffer; -import java.util.Arrays; import java.util.HashMap; import java.util.Map; -import java.util.function.Consumer; import java.util.function.Predicate; -import com.simibubi.create.foundation.render.backend.gl.versioned.GlFunctions; +import com.simibubi.create.foundation.render.backend.gl.versioned.GlFeatureCompat; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.lwjgl.opengl.GL; @@ -23,8 +20,6 @@ import com.simibubi.create.foundation.render.backend.gl.shader.GlProgram; import com.simibubi.create.foundation.render.backend.gl.shader.GlShader; import com.simibubi.create.foundation.render.backend.gl.shader.ProgramSpec; import com.simibubi.create.foundation.render.backend.gl.shader.ShaderType; -import com.simibubi.create.foundation.render.backend.gl.versioned.GlVersioned; -import com.simibubi.create.foundation.render.backend.gl.versioned.MapBuffer; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.texture.TextureUtil; @@ -45,7 +40,7 @@ public class Backend { private static boolean enabled; public static GLCapabilities capabilities; - public static GlFunctions functions; + public static GlFeatureCompat compat; public Backend() { throw new IllegalStateException(); @@ -74,9 +69,9 @@ public class Backend { public static boolean canUseInstancing() { return enabled && - functions.vertexArrayObjectsSupported() && - functions.drawInstancedSupported() && - functions.instancedArraysSupported(); + compat.vertexArrayObjectsSupported() && + compat.drawInstancedSupported() && + compat.instancedArraysSupported(); } public static boolean canUseVBOs() { @@ -107,7 +102,7 @@ public class Backend { private static void onResourceManagerReload(IResourceManager manager, Predicate predicate) { if (predicate.test(VanillaResourceType.SHADERS)) { capabilities = GL.createCapabilities(); - functions = new GlFunctions(capabilities); + compat = new GlFeatureCompat(capabilities); OptifineHandler.refresh(); refresh(); diff --git a/src/main/java/com/simibubi/create/foundation/render/backend/gl/GlBuffer.java b/src/main/java/com/simibubi/create/foundation/render/backend/gl/GlBuffer.java index 8420dab87..1dbd256e5 100644 --- a/src/main/java/com/simibubi/create/foundation/render/backend/gl/GlBuffer.java +++ b/src/main/java/com/simibubi/create/foundation/render/backend/gl/GlBuffer.java @@ -4,7 +4,6 @@ import java.nio.ByteBuffer; import java.util.function.Consumer; import com.simibubi.create.foundation.render.backend.Backend; -import com.simibubi.create.foundation.render.backend.gl.versioned.GlFunctions; import org.lwjgl.opengl.GL20; public class GlBuffer extends GlObject { @@ -35,11 +34,11 @@ public class GlBuffer extends GlObject { } public void map(int length, Consumer upload) { - Backend.functions.mapBuffer(bufferType, 0, length, upload); + Backend.compat.mapBuffer(bufferType, 0, length, upload); } public void map(int offset, int length, Consumer upload) { - Backend.functions.mapBuffer(bufferType, offset, length, upload); + Backend.compat.mapBuffer(bufferType, offset, length, upload); } protected void deleteInternal(int handle) { diff --git a/src/main/java/com/simibubi/create/foundation/render/backend/gl/GlVertexArray.java b/src/main/java/com/simibubi/create/foundation/render/backend/gl/GlVertexArray.java index cf6229f6e..e4854990e 100644 --- a/src/main/java/com/simibubi/create/foundation/render/backend/gl/GlVertexArray.java +++ b/src/main/java/com/simibubi/create/foundation/render/backend/gl/GlVertexArray.java @@ -3,19 +3,18 @@ package com.simibubi.create.foundation.render.backend.gl; import java.util.function.Consumer; import com.simibubi.create.foundation.render.backend.Backend; -import org.lwjgl.opengl.GL30; public class GlVertexArray extends GlObject { public GlVertexArray() { - setHandle(Backend.functions.genVertexArrays()); + setHandle(Backend.compat.genVertexArrays()); } public void bind() { - Backend.functions.bindVertexArray(handle()); + Backend.compat.bindVertexArray(handle()); } public void unbind() { - Backend.functions.bindVertexArray(0); + Backend.compat.bindVertexArray(0); } public void with(Consumer action) { @@ -25,6 +24,6 @@ public class GlVertexArray extends GlObject { } protected void deleteInternal(int handle) { - Backend.functions.deleteVertexArrays(handle); + Backend.compat.deleteVertexArrays(handle); } } diff --git a/src/main/java/com/simibubi/create/foundation/render/backend/gl/versioned/GlFunctions.java b/src/main/java/com/simibubi/create/foundation/render/backend/gl/versioned/GlFeatureCompat.java similarity index 93% rename from src/main/java/com/simibubi/create/foundation/render/backend/gl/versioned/GlFunctions.java rename to src/main/java/com/simibubi/create/foundation/render/backend/gl/versioned/GlFeatureCompat.java index 1345661fc..b2eba08e1 100644 --- a/src/main/java/com/simibubi/create/foundation/render/backend/gl/versioned/GlFunctions.java +++ b/src/main/java/com/simibubi/create/foundation/render/backend/gl/versioned/GlFeatureCompat.java @@ -13,19 +13,23 @@ import java.util.function.Consumer; * Each field stores an enum variant that provides access to the * most appropriate version of a feature for the current system. */ -public class GlFunctions { +public class GlFeatureCompat { public final MapBuffer mapBuffer; public final VertexArrayObject vertexArrayObject; public final InstancedArrays instancedArrays; public final DrawInstanced drawInstanced; - public GlFunctions(GLCapabilities caps) { + public final RGPixelFormat pixelFormat; + + public GlFeatureCompat(GLCapabilities caps) { mapBuffer = getLatest(MapBuffer.class, caps); vertexArrayObject = getLatest(VertexArrayObject.class, caps); instancedArrays = getLatest(InstancedArrays.class, caps); drawInstanced = getLatest(DrawInstanced.class, caps); + + pixelFormat = getLatest(RGPixelFormat.class, caps); } public void mapBuffer(int target, int offset, int length, Consumer upload) { diff --git a/src/main/java/com/simibubi/create/foundation/render/backend/gl/versioned/RGPixelFormat.java b/src/main/java/com/simibubi/create/foundation/render/backend/gl/versioned/RGPixelFormat.java new file mode 100644 index 000000000..9cf035535 --- /dev/null +++ b/src/main/java/com/simibubi/create/foundation/render/backend/gl/versioned/RGPixelFormat.java @@ -0,0 +1,75 @@ +package com.simibubi.create.foundation.render.backend.gl.versioned; + +import org.lwjgl.opengl.*; + +public enum RGPixelFormat implements GlVersioned { + GL30_RG { + @Override + public boolean supported(GLCapabilities caps) { + return caps.OpenGL30; + } + + @Override + public int internalFormat() { + return GL30.GL_RG8; + } + + @Override + public int format() { + return GL30.GL_RG; + } + + @Override + public int byteCount() { + return 2; + } + }, + GL11_RGB { + @Override + public boolean supported(GLCapabilities caps) { + return caps.OpenGL11; + } + + @Override + public int internalFormat() { + return GL11.GL_RGB8; + } + + @Override + public int format() { + return GL11.GL_RGB; + } + + @Override + public int byteCount() { + return 3; + } + }, + UNSUPPORTED { + @Override + public boolean supported(GLCapabilities caps) { + return true; + } + + @Override + public int internalFormat() { + throw new UnsupportedOperationException(); + } + + @Override + public int format() { + throw new UnsupportedOperationException(); + } + + @Override + public int byteCount() { + throw new UnsupportedOperationException(); + } + } + + ; + + public abstract int internalFormat(); + public abstract int format(); + public abstract int byteCount(); +} diff --git a/src/main/java/com/simibubi/create/foundation/render/backend/instancing/InstancedModel.java b/src/main/java/com/simibubi/create/foundation/render/backend/instancing/InstancedModel.java index 3b092c919..5903ae496 100644 --- a/src/main/java/com/simibubi/create/foundation/render/backend/instancing/InstancedModel.java +++ b/src/main/java/com/simibubi/create/foundation/render/backend/instancing/InstancedModel.java @@ -115,7 +115,7 @@ public abstract class InstancedModel extends BufferedMod protected void doRender() { vao.with(vao -> { renderSetup(); - Backend.functions.drawArraysInstanced(GL11.GL_QUADS, 0, vertexCount, glInstanceCount); + Backend.compat.drawArraysInstanced(GL11.GL_QUADS, 0, vertexCount, glInstanceCount); }); } @@ -162,7 +162,7 @@ public abstract class InstancedModel extends BufferedMod instanceFormat.vertexAttribPointers(staticAttributes); for (int i = 0; i < instanceFormat.getShaderAttributeCount(); i++) { - Backend.functions.vertexAttribDivisor(i + staticAttributes, 1); + Backend.compat.vertexAttribDivisor(i + staticAttributes, 1); } }); diff --git a/src/main/java/com/simibubi/create/foundation/render/backend/light/LightVolume.java b/src/main/java/com/simibubi/create/foundation/render/backend/light/LightVolume.java index 143964ba5..cada1ecad 100644 --- a/src/main/java/com/simibubi/create/foundation/render/backend/light/LightVolume.java +++ b/src/main/java/com/simibubi/create/foundation/render/backend/light/LightVolume.java @@ -2,11 +2,12 @@ package com.simibubi.create.foundation.render.backend.light; import java.nio.ByteBuffer; +import com.simibubi.create.foundation.render.backend.Backend; +import com.simibubi.create.foundation.render.backend.gl.versioned.RGPixelFormat; import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; import org.lwjgl.opengl.GL13; import org.lwjgl.opengl.GL20; -import org.lwjgl.opengl.GL40; import org.lwjgl.system.MemoryUtil; import com.simibubi.create.foundation.render.backend.RenderWork; @@ -28,11 +29,15 @@ public class LightVolume { private final GlTexture glTexture; + private final RGPixelFormat pixelFormat; + public LightVolume(GridAlignedBB sampleVolume) { setSampleVolume(sampleVolume); + pixelFormat = Backend.compat.pixelFormat; + this.glTexture = new GlTexture(GL20.GL_TEXTURE_3D); - this.lightData = MemoryUtil.memAlloc(this.textureVolume.volume() * 2); // TODO: reduce this to span only sampleVolume + this.lightData = MemoryUtil.memAlloc(this.textureVolume.volume() * pixelFormat.byteCount()); // allocate space for the texture GL20.glActiveTexture(GL20.GL_TEXTURE4); @@ -41,7 +46,7 @@ public class LightVolume { int sizeX = textureVolume.sizeX(); int sizeY = textureVolume.sizeY(); int sizeZ = textureVolume.sizeZ(); - GL12.glTexImage3D(GL12.GL_TEXTURE_3D, 0, GL40.GL_RG8, sizeX, sizeY, sizeZ, 0, GL40.GL_RG, GL40.GL_UNSIGNED_BYTE, 0); + GL12.glTexImage3D(GL12.GL_TEXTURE_3D, 0, pixelFormat.internalFormat(), sizeX, sizeY, sizeZ, 0, pixelFormat.format(), GL20.GL_UNSIGNED_BYTE, 0); glTexture.unbind(); GL20.glActiveTexture(GL20.GL_TEXTURE0); @@ -222,7 +227,7 @@ public class LightVolume { // just in case something goes wrong or we accidentally call this before this volume is properly disposed of. if (lightData == null || removed) return; - GL13.glActiveTexture(GL40.GL_TEXTURE4); + GL13.glActiveTexture(GL20.GL_TEXTURE4); glTexture.bind(); GL11.glTexParameteri(GL13.GL_TEXTURE_3D, GL13.GL_TEXTURE_MIN_FILTER, GL13.GL_LINEAR); GL11.glTexParameteri(GL13.GL_TEXTURE_3D, GL13.GL_TEXTURE_MAG_FILTER, GL13.GL_LINEAR); @@ -245,7 +250,7 @@ public class LightVolume { int sizeY = textureVolume.sizeY(); int sizeZ = textureVolume.sizeZ(); - GL12.glTexSubImage3D(GL12.GL_TEXTURE_3D, 0, 0, 0, 0, sizeX, sizeY, sizeZ, GL40.GL_RG, GL40.GL_UNSIGNED_BYTE, lightData); + GL12.glTexSubImage3D(GL12.GL_TEXTURE_3D, 0, 0, 0, 0, sizeX, sizeY, sizeZ, pixelFormat.format(), GL20.GL_UNSIGNED_BYTE, lightData); GL20.glPixelStorei(GL20.GL_UNPACK_ALIGNMENT, 4); // 4 is the default bufferDirty = false; @@ -269,7 +274,7 @@ public class LightVolume { byte b = (byte) ((block & 0xF) << 4); byte s = (byte) ((sky & 0xF) << 4); - int i = index(x, y, z); + int i = posToIndex(x, y, z); lightData.put(i, b); lightData.put(i + 1, s); } @@ -277,16 +282,16 @@ public class LightVolume { private void writeBlock(int x, int y, int z, int block) { byte b = (byte) ((block & 0xF) << 4); - lightData.put(index(x, y, z), b); + lightData.put(posToIndex(x, y, z), b); } private void writeSky(int x, int y, int z, int sky) { byte b = (byte) ((sky & 0xF) << 4); - lightData.put(index(x, y, z) + 1, b); + lightData.put(posToIndex(x, y, z) + 1, b); } - private int index(int x, int y, int z) { - return (x + textureVolume.sizeX() * (y + z * textureVolume.sizeY())) * 2; + private int posToIndex(int x, int y, int z) { + return (x + textureVolume.sizeX() * (y + z * textureVolume.sizeY())) * pixelFormat.byteCount(); } } From 2f12326203f8a1794c9f99c6ef2c7cf41f1633d2 Mon Sep 17 00:00:00 2001 From: zelophed Date: Wed, 24 Feb 2021 22:06:40 +0100 Subject: [PATCH 11/24] cloning glue --- .../foundation/command/AllCommands.java | 3 +- .../foundation/command/CloneCommand.java | 154 ++++++++++++++++++ 2 files changed, 156 insertions(+), 1 deletion(-) create mode 100644 src/main/java/com/simibubi/create/foundation/command/CloneCommand.java diff --git a/src/main/java/com/simibubi/create/foundation/command/AllCommands.java b/src/main/java/com/simibubi/create/foundation/command/AllCommands.java index 760fe23c3..2f9471abb 100644 --- a/src/main/java/com/simibubi/create/foundation/command/AllCommands.java +++ b/src/main/java/com/simibubi/create/foundation/command/AllCommands.java @@ -28,6 +28,7 @@ public class AllCommands { .then(FixLightingCommand.register()) .then(HighlightCommand.register()) .then(CouplingCommand.register()) + .then(CloneCommand.register()) //utility .then(util) @@ -47,10 +48,10 @@ public class AllCommands { private static LiteralCommandNode buildUtilityCommands() { return Commands.literal("util") - .then(FlySpeedCommand.register()) .then(ReplaceInCommandBlocksCommand.register()) .then(ClearBufferCacheCommand.register()) .then(ChunkUtilCommand.register()) + .then(FlySpeedCommand.register()) //.then(KillTPSCommand.register()) .build(); diff --git a/src/main/java/com/simibubi/create/foundation/command/CloneCommand.java b/src/main/java/com/simibubi/create/foundation/command/CloneCommand.java new file mode 100644 index 000000000..83bc8b4a8 --- /dev/null +++ b/src/main/java/com/simibubi/create/foundation/command/CloneCommand.java @@ -0,0 +1,154 @@ +package com.simibubi.create.foundation.command; + +import com.google.common.collect.Lists; +import com.mojang.brigadier.Command; +import com.mojang.brigadier.builder.ArgumentBuilder; +import com.mojang.brigadier.exceptions.CommandSyntaxException; +import com.mojang.brigadier.exceptions.Dynamic2CommandExceptionType; +import com.simibubi.create.content.contraptions.components.structureMovement.glue.SuperGlueEntity; +import com.simibubi.create.foundation.utility.Pair; +import net.minecraft.block.BlockState; +import net.minecraft.block.Blocks; +import net.minecraft.command.CommandSource; +import net.minecraft.command.Commands; +import net.minecraft.command.arguments.BlockPosArgument; +import net.minecraft.inventory.IClearable; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.CachedBlockInfo; +import net.minecraft.util.Direction; +import net.minecraft.util.math.AxisAlignedBB; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.MutableBoundingBox; +import net.minecraft.util.text.StringTextComponent; +import net.minecraft.util.text.TranslationTextComponent; +import net.minecraft.world.gen.feature.template.Template; +import net.minecraft.world.server.ServerWorld; + +import java.util.List; + +public class CloneCommand { + + private static final Dynamic2CommandExceptionType CLONE_TOO_BIG_EXCEPTION = new Dynamic2CommandExceptionType((arg1, arg2) -> new TranslationTextComponent("commands.clone.toobig", arg1, arg2)); + + public static ArgumentBuilder register() { + return Commands.literal("clone") + .requires(cs -> cs.hasPermissionLevel(2)) + .then(Commands.argument("begin", BlockPosArgument.blockPos()) + .then(Commands.argument("end", BlockPosArgument.blockPos()) + .then(Commands.argument("destination", BlockPosArgument.blockPos()) + .executes(ctx -> doClone(ctx.getSource(), BlockPosArgument.getLoadedBlockPos(ctx, "begin"), BlockPosArgument.getLoadedBlockPos(ctx, "end"), BlockPosArgument.getLoadedBlockPos(ctx, "destination"))) + ) + ) + ) + .executes(ctx -> { + ctx.getSource().sendFeedback(new StringTextComponent("Clones all blocks as well as super glue from the specified area to the target destination"), true); + + return Command.SINGLE_SUCCESS; + }); + + + } + + private static int doClone(CommandSource source, BlockPos begin, BlockPos end, BlockPos destination) throws CommandSyntaxException { + MutableBoundingBox sourceArea = new MutableBoundingBox(begin, end); + BlockPos destinationEnd = destination.add(sourceArea.getLength()); + MutableBoundingBox destinationArea = new MutableBoundingBox(destination, destinationEnd); + + int i = sourceArea.getXSize() * sourceArea.getYSize() * sourceArea.getZSize(); + if (i > 32768) + throw CLONE_TOO_BIG_EXCEPTION.create(32768, i); + + ServerWorld world = source.getWorld(); + + if (!world.isAreaLoaded(begin, end) || !world.isAreaLoaded(destination, destinationEnd)) + throw BlockPosArgument.POS_UNLOADED.create(); + + List blocks = Lists.newArrayList(); + List tileBlocks = Lists.newArrayList(); + BlockPos diffToTarget = new BlockPos(destinationArea.minX - sourceArea.minX, destinationArea.minY - sourceArea.minY, destinationArea.minZ - sourceArea.minZ); + + + //gather info + for (int z = sourceArea.minZ; z <= sourceArea.maxZ; ++z) { + for (int y = sourceArea.minY; y <= sourceArea.maxY; ++y) { + for (int x = sourceArea.minX; x <= sourceArea.maxX; ++x) { + BlockPos currentPos = new BlockPos(x, y, z); + BlockPos newPos = currentPos.add(diffToTarget); + CachedBlockInfo cached = new CachedBlockInfo(world, currentPos, false); + BlockState state = cached.getBlockState(); + TileEntity te = world.getTileEntity(currentPos); + if (te != null) { + CompoundNBT nbt = te.write(new CompoundNBT()); + tileBlocks.add(new Template.BlockInfo(newPos, state, nbt)); + } else { + blocks.add(new Template.BlockInfo(newPos, state, null)); + } + } + } + } + + List glue = world.getEntitiesWithinAABB(SuperGlueEntity.class, AxisAlignedBB.func_216363_a(sourceArea)); + List> newGlue = Lists.newArrayList(); + + for (SuperGlueEntity g : glue) { + BlockPos pos = g.getHangingPosition(); + Direction direction = g.getFacingDirection(); + newGlue.add(Pair.of(pos.add(diffToTarget), direction)); + } + + //paste + List allBlocks = Lists.newArrayList(); + allBlocks.addAll(blocks); + allBlocks.addAll(tileBlocks); + + List reverse = Lists.reverse(allBlocks); + + for (Template.BlockInfo info : reverse) { + TileEntity te = world.getTileEntity(info.pos); + IClearable.clearObj(te); + world.setBlockState(info.pos, Blocks.BARRIER.getDefaultState(), 2); + } + + int blockPastes = 0; + int gluePastes = 0; + + for (Template.BlockInfo info : allBlocks) { + if (world.setBlockState(info.pos, info.state, 2)) + blockPastes++; + } + + for (Template.BlockInfo info : tileBlocks) { + TileEntity te = world.getTileEntity(info.pos); + if (te != null && info.nbt != null) { + info.nbt.putInt("x", info.pos.getX()); + info.nbt.putInt("y", info.pos.getY()); + info.nbt.putInt("z", info.pos.getZ()); + te.read(info.nbt); + te.markDirty(); + } + + //idk why the state is set twice for a te, but its done like this in the original clone command + world.setBlockState(info.pos, info.state, 2); + } + + for (Template.BlockInfo info : reverse) { + world.notifyNeighbors(info.pos, info.state.getBlock()); + } + + for (Pair p : newGlue) { + SuperGlueEntity g = new SuperGlueEntity(world, p.getFirst(), p.getSecond()); + if (g.onValidSurface()){ + world.addEntity(g); + gluePastes++; + } + } + + world.getPendingBlockTicks().copyTicks(sourceArea, diffToTarget); + + source.sendFeedback(new StringTextComponent("Successfully cloned " + blockPastes + " Blocks and applied Glue " + gluePastes + " times"), true); + return blockPastes + gluePastes; + + } + +} From e62d89b21cd6504faf3868603a181816ed4d7328 Mon Sep 17 00:00:00 2001 From: JozsefA Date: Wed, 24 Feb 2021 16:52:49 -0800 Subject: [PATCH 12/24] Everything is lit, hopefully all the time now. --- build.gradle | 4 +- .../contraptions/base/KineticTileEntity.java | 10 ++--- .../structureMovement/Contraption.java | 2 +- .../render/ContraptionRenderDispatcher.java | 6 +++ .../mixin/NetworkLightUpdateMixin.java | 43 +++++++++++++++++++ .../foundation/mixin/RenderHooksMixin.java | 8 ++++ .../instancing/InstancedTileRenderer.java | 18 -------- .../render/backend/light/GridAlignedBB.java | 11 +++++ .../render/backend/light/LightVolume.java | 9 ++++ src/main/resources/create.mixins.json | 3 +- 10 files changed, 85 insertions(+), 29 deletions(-) create mode 100644 src/main/java/com/simibubi/create/foundation/mixin/NetworkLightUpdateMixin.java diff --git a/build.gradle b/build.gradle index 7477d5da9..0d4a0c6eb 100644 --- a/build.gradle +++ b/build.gradle @@ -39,7 +39,7 @@ minecraft { workingDirectory project.file('run') // property 'mixin.env.disableRefMap', 'true' arg '-mixin.config=create.mixins.json' -// jvmArgs '-XX:+UnlockCommercialFeatures' + jvmArgs '-XX:+UnlockCommercialFeatures' property 'forge.logging.console.level', 'info' property 'fml.earlyprogresswindow', 'false' mods { @@ -132,7 +132,7 @@ dependencies { //runtimeOnly fg.deobf("vazkii.arl:AutoRegLib:1.4-35.69") //runtimeOnly fg.deobf("vazkii.quark:Quark:r2.0-212.984") - annotationProcessor 'org.spongepowered:mixin:0.8:processor' + //annotationProcessor 'org.spongepowered:mixin:0.8:processor' } jar { diff --git a/src/main/java/com/simibubi/create/content/contraptions/base/KineticTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/base/KineticTileEntity.java index 088ce8618..d0ca45720 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/base/KineticTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/base/KineticTileEntity.java @@ -81,6 +81,9 @@ public abstract class KineticTileEntity extends SmartTileEntity } super.initialize(); + + if (world != null && world.isRemote) + DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> CreateClient.kineticRenderer.add(this)); } @Override @@ -534,13 +537,6 @@ public abstract class KineticTileEntity extends SmartTileEntity return block.hasIntegratedCogwheel(world, pos, state); } - @Override - public void onLoad() { - super.onLoad(); - if (world != null && world.isRemote) - DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> CreateClient.kineticRenderer.add(this)); - } - @Override public void onChunkUnloaded() { if (world != null && world.isRemote) diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/Contraption.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/Contraption.java index e783d6436..fb5c044d4 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/Contraption.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/Contraption.java @@ -901,7 +901,7 @@ public abstract class Contraption { world.getWorld() .removeTileEntity(add); int flags = BlockFlags.IS_MOVING | BlockFlags.NO_NEIGHBOR_DROPS | BlockFlags.UPDATE_NEIGHBORS - | BlockFlags.BLOCK_UPDATE; + | BlockFlags.BLOCK_UPDATE | BlockFlags.RERENDER_MAIN_THREAD; if (blockIn instanceof IWaterLoggable && oldState.has(BlockStateProperties.WATERLOGGED) && oldState.get(BlockStateProperties.WATERLOGGED) .booleanValue()) { diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/ContraptionRenderDispatcher.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/ContraptionRenderDispatcher.java index f26e5174b..b35305eed 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/ContraptionRenderDispatcher.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/ContraptionRenderDispatcher.java @@ -64,6 +64,12 @@ public class ContraptionRenderDispatcher { } } + public static void notifyLightPacket(ILightReader world, int chunkX, int chunkZ) { + for (RenderedContraption renderer : renderers.values()) { + renderer.getLighter().lightVolume.notifyLightPacket(world, chunkX, chunkZ); + } + } + public static void renderTick() { firstLayer = true; } diff --git a/src/main/java/com/simibubi/create/foundation/mixin/NetworkLightUpdateMixin.java b/src/main/java/com/simibubi/create/foundation/mixin/NetworkLightUpdateMixin.java new file mode 100644 index 000000000..a40c2c088 --- /dev/null +++ b/src/main/java/com/simibubi/create/foundation/mixin/NetworkLightUpdateMixin.java @@ -0,0 +1,43 @@ +package com.simibubi.create.foundation.mixin; + +import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionRenderDispatcher; +import com.simibubi.create.foundation.render.backend.RenderWork; +import com.simibubi.create.foundation.render.backend.light.ILightListener; +import net.minecraft.client.Minecraft; +import net.minecraft.client.network.play.ClientPlayNetHandler; +import net.minecraft.client.world.ClientWorld; +import net.minecraft.network.play.server.SUpdateLightPacket; +import net.minecraft.world.chunk.Chunk; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; + +@Mixin(ClientPlayNetHandler.class) +public class NetworkLightUpdateMixin { + + @Inject(at = @At("TAIL"), method = "handleUpdateLight") + private void onLightPacket(SUpdateLightPacket packet, CallbackInfo ci) { + RenderWork.enqueue(() -> { + ClientWorld world = Minecraft.getInstance().world; + + if (world == null) return; + + int chunkX = packet.getChunkX(); + int chunkZ = packet.getChunkZ(); + + Chunk chunk = world.getChunkProvider().getChunk(chunkX, chunkZ, false); + + if (chunk != null) { + chunk.getTileEntityMap() + .values() + .stream() + .filter(tile -> tile instanceof ILightListener) + .map(tile -> (ILightListener) tile) + .forEach(ILightListener::onChunkLightUpdate); + } + + ContraptionRenderDispatcher.notifyLightPacket(world, chunkX, chunkZ); + }); + } +} diff --git a/src/main/java/com/simibubi/create/foundation/mixin/RenderHooksMixin.java b/src/main/java/com/simibubi/create/foundation/mixin/RenderHooksMixin.java index 27f8173ce..eb02006e8 100644 --- a/src/main/java/com/simibubi/create/foundation/mixin/RenderHooksMixin.java +++ b/src/main/java/com/simibubi/create/foundation/mixin/RenderHooksMixin.java @@ -1,5 +1,11 @@ package com.simibubi.create.foundation.mixin; +import com.simibubi.create.foundation.render.backend.light.ILightListener; +import net.minecraft.client.Minecraft; +import net.minecraft.client.multiplayer.ClientChunkProvider; +import net.minecraft.util.math.SectionPos; +import net.minecraft.world.ILightReader; +import net.minecraft.world.chunk.Chunk; import org.lwjgl.opengl.GL20; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; @@ -21,6 +27,8 @@ import net.minecraft.client.world.ClientWorld; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; +import java.util.Map; + @OnlyIn(Dist.CLIENT) @Mixin(WorldRenderer.class) public class RenderHooksMixin { diff --git a/src/main/java/com/simibubi/create/foundation/render/backend/instancing/InstancedTileRenderer.java b/src/main/java/com/simibubi/create/foundation/render/backend/instancing/InstancedTileRenderer.java index 4f22c016f..9c3c1ced0 100644 --- a/src/main/java/com/simibubi/create/foundation/render/backend/instancing/InstancedTileRenderer.java +++ b/src/main/java/com/simibubi/create/foundation/render/backend/instancing/InstancedTileRenderer.java @@ -20,8 +20,6 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.math.BlockPos; public abstract class InstancedTileRenderer

{ - public static WorldAttached> addedLastTick = new WorldAttached<>(ConcurrentHashMap::new); - protected Map> instances = new HashMap<>(); protected Map, RenderMaterial> materials = new HashMap<>(); @@ -35,23 +33,8 @@ public abstract class InstancedTileRenderer

{ public abstract void registerMaterials(); public void tick() { - ClientWorld world = Minecraft.getInstance().world; - int ticks = AnimationTickHolder.getTicks(); - ConcurrentHashMap map = addedLastTick.get(world); - map - .entrySet() - .stream() - .filter(it -> ticks - it.getValue() > 10) - .map(Map.Entry::getKey) - .forEach(te -> { - map.remove(te); - - onLightUpdate(te); - }); - - // Clean up twice a second. This doesn't have to happen every tick, // but this does need to be run to ensure we don't miss anything. if (ticks % 10 == 0) { @@ -82,7 +65,6 @@ public abstract class InstancedTileRenderer

{ TileEntityInstance renderer = InstancedTileRenderRegistry.instance.create(this, tile); if (renderer != null) { - addedLastTick.get(tile.getWorld()).put(tile, AnimationTickHolder.getTicks()); instances.put(tile, renderer); } diff --git a/src/main/java/com/simibubi/create/foundation/render/backend/light/GridAlignedBB.java b/src/main/java/com/simibubi/create/foundation/render/backend/light/GridAlignedBB.java index 707efc0bd..e25fe1924 100644 --- a/src/main/java/com/simibubi/create/foundation/render/backend/light/GridAlignedBB.java +++ b/src/main/java/com/simibubi/create/foundation/render/backend/light/GridAlignedBB.java @@ -53,6 +53,17 @@ public class GridAlignedBB { pos.getWorldEndZ() + 1); } + public static GridAlignedBB fromChunk(int sectionX, int sectionZ) { + int startX = sectionX << 4; + int startZ = sectionZ << 4; + return new GridAlignedBB(startX, + 0, + startZ, + startX + 16, + 256, + startZ + 16); + } + public static AxisAlignedBB toAABB(GridAlignedBB bb) { return new AxisAlignedBB(bb.minX, bb.minY, bb.minZ, bb.maxX, bb.maxY, bb.maxZ); } diff --git a/src/main/java/com/simibubi/create/foundation/render/backend/light/LightVolume.java b/src/main/java/com/simibubi/create/foundation/render/backend/light/LightVolume.java index cada1ecad..5f9290974 100644 --- a/src/main/java/com/simibubi/create/foundation/render/backend/light/LightVolume.java +++ b/src/main/java/com/simibubi/create/foundation/render/backend/light/LightVolume.java @@ -133,6 +133,15 @@ public class LightVolume { else if (type == LightType.SKY) copySky(world, changedVolume); } + public void notifyLightPacket(ILightReader world, int chunkX, int chunkZ) { + GridAlignedBB changedVolume = GridAlignedBB.fromChunk(chunkX, chunkZ); + if (!changedVolume.intersects(sampleVolume)) + return; + changedVolume.intersectAssign(sampleVolume); // compute the region contained by us that has dirty lighting data. + + copyLight(world, changedVolume); + } + /** * Completely (re)populate this volume with block and sky lighting data. * This is expensive and should be avoided. diff --git a/src/main/resources/create.mixins.json b/src/main/resources/create.mixins.json index e9d682678..6956226de 100644 --- a/src/main/resources/create.mixins.json +++ b/src/main/resources/create.mixins.json @@ -9,7 +9,8 @@ "CancelTileEntityRenderMixin", "LightUpdateMixin", "RenderHooksMixin", - "FogColorTrackerMixin" + "FogColorTrackerMixin", + "NetworkLightUpdateMixin" ], "injectors": { "defaultRequire": 1 From 36e81857a338b62cb68e3cd3a9cdfe2d9064b304 Mon Sep 17 00:00:00 2001 From: JozsefA Date: Wed, 24 Feb 2021 16:57:26 -0800 Subject: [PATCH 13/24] Unmeddle the build script, but profiling is good. --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 0d4a0c6eb..0bd3d4bb2 100644 --- a/build.gradle +++ b/build.gradle @@ -132,7 +132,7 @@ dependencies { //runtimeOnly fg.deobf("vazkii.arl:AutoRegLib:1.4-35.69") //runtimeOnly fg.deobf("vazkii.quark:Quark:r2.0-212.984") - //annotationProcessor 'org.spongepowered:mixin:0.8:processor' + annotationProcessor 'org.spongepowered:mixin:0.8:processor' } jar { From 46bbdc70c9bb9f61e1ba822660c8e38f66c6d2aa Mon Sep 17 00:00:00 2001 From: zelophed Date: Thu, 25 Feb 2021 19:03:07 +0100 Subject: [PATCH 14/24] small command adjustments --- .../foundation/command/CloneCommand.java | 72 +++++++++++-------- .../foundation/command/CouplingCommand.java | 30 ++++++++ 2 files changed, 74 insertions(+), 28 deletions(-) diff --git a/src/main/java/com/simibubi/create/foundation/command/CloneCommand.java b/src/main/java/com/simibubi/create/foundation/command/CloneCommand.java index 83bc8b4a8..d5a07c8fc 100644 --- a/src/main/java/com/simibubi/create/foundation/command/CloneCommand.java +++ b/src/main/java/com/simibubi/create/foundation/command/CloneCommand.java @@ -37,7 +37,10 @@ public class CloneCommand { .then(Commands.argument("begin", BlockPosArgument.blockPos()) .then(Commands.argument("end", BlockPosArgument.blockPos()) .then(Commands.argument("destination", BlockPosArgument.blockPos()) - .executes(ctx -> doClone(ctx.getSource(), BlockPosArgument.getLoadedBlockPos(ctx, "begin"), BlockPosArgument.getLoadedBlockPos(ctx, "end"), BlockPosArgument.getLoadedBlockPos(ctx, "destination"))) + .then(Commands.literal("skipBlocks") + .executes(ctx -> doClone(ctx.getSource(), BlockPosArgument.getLoadedBlockPos(ctx, "begin"), BlockPosArgument.getLoadedBlockPos(ctx, "end"), BlockPosArgument.getLoadedBlockPos(ctx, "destination"), false)) + ) + .executes(ctx -> doClone(ctx.getSource(), BlockPosArgument.getLoadedBlockPos(ctx, "begin"), BlockPosArgument.getLoadedBlockPos(ctx, "end"), BlockPosArgument.getLoadedBlockPos(ctx, "destination"), true)) ) ) ) @@ -50,7 +53,7 @@ public class CloneCommand { } - private static int doClone(CommandSource source, BlockPos begin, BlockPos end, BlockPos destination) throws CommandSyntaxException { + private static int doClone(CommandSource source, BlockPos begin, BlockPos end, BlockPos destination, boolean cloneBlocks) throws CommandSyntaxException { MutableBoundingBox sourceArea = new MutableBoundingBox(begin, end); BlockPos destinationEnd = destination.add(sourceArea.getLength()); MutableBoundingBox destinationArea = new MutableBoundingBox(destination, destinationEnd); @@ -64,12 +67,47 @@ public class CloneCommand { if (!world.isAreaLoaded(begin, end) || !world.isAreaLoaded(destination, destinationEnd)) throw BlockPosArgument.POS_UNLOADED.create(); - List blocks = Lists.newArrayList(); - List tileBlocks = Lists.newArrayList(); BlockPos diffToTarget = new BlockPos(destinationArea.minX - sourceArea.minX, destinationArea.minY - sourceArea.minY, destinationArea.minZ - sourceArea.minZ); + int blockPastes = cloneBlocks ? cloneBlocks(sourceArea, world, diffToTarget) : 0; + int gluePastes = cloneGlue(sourceArea, world, diffToTarget); + + if (cloneBlocks) + source.sendFeedback(new StringTextComponent("Successfully cloned " + blockPastes + " Blocks"), true); + + source.sendFeedback(new StringTextComponent("Successfully applied glue " + gluePastes + " times"), true); + return blockPastes + gluePastes; + + } + + private static int cloneGlue(MutableBoundingBox sourceArea, ServerWorld world, BlockPos diffToTarget) { + int gluePastes = 0; + + List glue = world.getEntitiesWithinAABB(SuperGlueEntity.class, AxisAlignedBB.func_216363_a(sourceArea)); + List> newGlue = Lists.newArrayList(); + + for (SuperGlueEntity g : glue) { + BlockPos pos = g.getHangingPosition(); + Direction direction = g.getFacingDirection(); + newGlue.add(Pair.of(pos.add(diffToTarget), direction)); + } + + for (Pair p : newGlue) { + SuperGlueEntity g = new SuperGlueEntity(world, p.getFirst(), p.getSecond()); + if (g.onValidSurface()){ + world.addEntity(g); + gluePastes++; + } + } + return gluePastes; + } + + private static int cloneBlocks(MutableBoundingBox sourceArea, ServerWorld world, BlockPos diffToTarget) { + int blockPastes = 0; + + List blocks = Lists.newArrayList(); + List tileBlocks = Lists.newArrayList(); - //gather info for (int z = sourceArea.minZ; z <= sourceArea.maxZ; ++z) { for (int y = sourceArea.minY; y <= sourceArea.maxY; ++y) { for (int x = sourceArea.minX; x <= sourceArea.maxX; ++x) { @@ -88,16 +126,6 @@ public class CloneCommand { } } - List glue = world.getEntitiesWithinAABB(SuperGlueEntity.class, AxisAlignedBB.func_216363_a(sourceArea)); - List> newGlue = Lists.newArrayList(); - - for (SuperGlueEntity g : glue) { - BlockPos pos = g.getHangingPosition(); - Direction direction = g.getFacingDirection(); - newGlue.add(Pair.of(pos.add(diffToTarget), direction)); - } - - //paste List allBlocks = Lists.newArrayList(); allBlocks.addAll(blocks); allBlocks.addAll(tileBlocks); @@ -110,9 +138,6 @@ public class CloneCommand { world.setBlockState(info.pos, Blocks.BARRIER.getDefaultState(), 2); } - int blockPastes = 0; - int gluePastes = 0; - for (Template.BlockInfo info : allBlocks) { if (world.setBlockState(info.pos, info.state, 2)) blockPastes++; @@ -136,19 +161,10 @@ public class CloneCommand { world.notifyNeighbors(info.pos, info.state.getBlock()); } - for (Pair p : newGlue) { - SuperGlueEntity g = new SuperGlueEntity(world, p.getFirst(), p.getSecond()); - if (g.onValidSurface()){ - world.addEntity(g); - gluePastes++; - } - } world.getPendingBlockTicks().copyTicks(sourceArea, diffToTarget); - source.sendFeedback(new StringTextComponent("Successfully cloned " + blockPastes + " Blocks and applied Glue " + gluePastes + " times"), true); - return blockPastes + gluePastes; - + return blockPastes; } } diff --git a/src/main/java/com/simibubi/create/foundation/command/CouplingCommand.java b/src/main/java/com/simibubi/create/foundation/command/CouplingCommand.java index 8e4512956..62cb360f1 100644 --- a/src/main/java/com/simibubi/create/foundation/command/CouplingCommand.java +++ b/src/main/java/com/simibubi/create/foundation/command/CouplingCommand.java @@ -1,7 +1,9 @@ package com.simibubi.create.foundation.command; +import com.google.common.collect.Lists; import com.mojang.brigadier.Command; import com.mojang.brigadier.builder.ArgumentBuilder; +import com.mojang.brigadier.exceptions.DynamicCommandExceptionType; import com.mojang.brigadier.exceptions.SimpleCommandExceptionType; import com.simibubi.create.content.contraptions.components.structureMovement.train.CouplingHandler; import com.simibubi.create.content.contraptions.components.structureMovement.train.capability.CapabilityMinecartController; @@ -16,12 +18,15 @@ import net.minecraft.entity.player.PlayerEntity; import net.minecraft.util.text.StringTextComponent; import net.minecraftforge.common.util.LazyOptional; +import java.util.ArrayList; +import java.util.Collection; import java.util.UUID; public class CouplingCommand { public static final SimpleCommandExceptionType ONLY_MINECARTS_ALLOWED = new SimpleCommandExceptionType(new StringTextComponent("Only Minecarts can be coupled")); public static final SimpleCommandExceptionType SAME_DIMENSION = new SimpleCommandExceptionType(new StringTextComponent("Minecarts have to be in the same Dimension")); + public static final DynamicCommandExceptionType TWO_CARTS = new DynamicCommandExceptionType(a -> new StringTextComponent("Your selector targeted " + a + " entities. You can only couple 2 Minecarts at a time.")); public static ArgumentBuilder register() { @@ -50,6 +55,31 @@ public class CouplingCommand { }) ) ) + .then(Commands.argument("carts", EntityArgument.entities()) + .executes(ctx -> { + Collection entities = EntityArgument.getEntities(ctx, "carts"); + if (entities.size() != 2) + throw TWO_CARTS.create(entities.size()); + + ArrayList eList = Lists.newArrayList(entities); + Entity cart1 = eList.get(0); + if (!(cart1 instanceof AbstractMinecartEntity)) + throw ONLY_MINECARTS_ALLOWED.create(); + + Entity cart2 = eList.get(1); + if (!(cart2 instanceof AbstractMinecartEntity)) + throw ONLY_MINECARTS_ALLOWED.create(); + + if (!cart1.getEntityWorld().equals(cart2.getEntityWorld())) + throw SAME_DIMENSION.create(); + + Entity source = ctx.getSource().getEntity(); + + CouplingHandler.tryToCoupleCarts(source instanceof PlayerEntity ? (PlayerEntity) source : null, cart1.getEntityWorld(), cart1.getEntityId(), cart2.getEntityId()); + + return Command.SINGLE_SUCCESS; + }) + ) ) .then(Commands.literal("remove") .then(Commands.argument("cart1", EntityArgument.entity()) From 6dc4a18ed34e5f4c6a69318ee73634fb0e74ac8e Mon Sep 17 00:00:00 2001 From: JozsefA Date: Thu, 25 Feb 2021 17:16:22 -0800 Subject: [PATCH 15/24] Extra safety checks. --- .../instancing/InstancedTileRenderer.java | 38 ++++++++++++------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/src/main/java/com/simibubi/create/foundation/render/backend/instancing/InstancedTileRenderer.java b/src/main/java/com/simibubi/create/foundation/render/backend/instancing/InstancedTileRenderer.java index 9c3c1ced0..524d36a91 100644 --- a/src/main/java/com/simibubi/create/foundation/render/backend/instancing/InstancedTileRenderer.java +++ b/src/main/java/com/simibubi/create/foundation/render/backend/instancing/InstancedTileRenderer.java @@ -2,7 +2,6 @@ package com.simibubi.create.foundation.render.backend.instancing; import java.util.HashMap; import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; import javax.annotation.Nullable; @@ -10,14 +9,13 @@ import com.simibubi.create.foundation.render.backend.Backend; import com.simibubi.create.foundation.render.backend.gl.BasicProgram; import com.simibubi.create.foundation.render.backend.gl.shader.ShaderCallback; import com.simibubi.create.foundation.utility.AnimationTickHolder; -import com.simibubi.create.foundation.utility.WorldAttached; -import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.Matrix4f; import net.minecraft.client.renderer.RenderType; -import net.minecraft.client.world.ClientWorld; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.math.BlockPos; +import net.minecraft.world.IBlockReader; +import net.minecraft.world.World; public abstract class InstancedTileRenderer

{ protected Map> instances = new HashMap<>(); @@ -42,6 +40,17 @@ public abstract class InstancedTileRenderer

{ } } + public void render(RenderType layer, Matrix4f viewProjection, double camX, double camY, double camZ) { + render(layer, viewProjection, camX, camY, camZ, null); + } + + public void render(RenderType layer, Matrix4f viewProjection, double camX, double camY, double camZ, ShaderCallback

callback) { + for (RenderMaterial material : materials.values()) { + if (material.canRenderInLayer(layer)) + material.render(layer, viewProjection, camX, camY, camZ, callback); + } + } + @SuppressWarnings("unchecked") public > RenderMaterial getMaterial(MaterialType materialType) { return (RenderMaterial) materials.get(materialType); @@ -55,7 +64,7 @@ public abstract class InstancedTileRenderer

{ @SuppressWarnings("unchecked") @Nullable public TileEntityInstance getInstance(T tile, boolean create) { - if (!Backend.canUseInstancing()) return null; + if (!Backend.canUseInstancing() || isTileUnloaded(tile)) return null; TileEntityInstance instance = instances.get(tile); @@ -128,14 +137,17 @@ public abstract class InstancedTileRenderer

{ instances.clear(); } - public void render(RenderType layer, Matrix4f viewProjection, double camX, double camY, double camZ) { - render(layer, viewProjection, camX, camY, camZ, null); - } + public boolean isTileUnloaded(TileEntity tile) { + if (tile.isRemoved()) return true; - public void render(RenderType layer, Matrix4f viewProjection, double camX, double camY, double camZ, ShaderCallback

callback) { - for (RenderMaterial material : materials.values()) { - if (material.canRenderInLayer(layer)) - material.render(layer, viewProjection, camX, camY, camZ, callback); - } + World world = tile.getWorld(); + + if (world == null) return true; + + BlockPos pos = tile.getPos(); + + IBlockReader existingChunk = world.getExistingChunk(pos.getX() >> 4, pos.getZ() >> 4); + + return existingChunk == null; } } From 3a2771c5c0823fdd53cb972c638b7933a6c8a21d Mon Sep 17 00:00:00 2001 From: JozsefA Date: Sat, 27 Feb 2021 18:24:48 -0800 Subject: [PATCH 16/24] Fix issue restricting the maximum size of contraptions. --- .../structureMovement/Contraption.java | 8 +- .../foundation/utility/UniqueLinkedList.java | 89 +++++++++++++++++++ 2 files changed, 91 insertions(+), 6 deletions(-) create mode 100644 src/main/java/com/simibubi/create/foundation/utility/UniqueLinkedList.java diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/Contraption.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/Contraption.java index fb5c044d4..09fbc01f4 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/Contraption.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/Contraption.java @@ -21,6 +21,7 @@ import java.util.stream.Collectors; import javax.annotation.Nullable; +import com.simibubi.create.foundation.utility.*; import org.apache.commons.lang3.tuple.MutablePair; import org.apache.commons.lang3.tuple.Pair; @@ -53,11 +54,6 @@ import com.simibubi.create.content.logistics.block.redstone.RedstoneContactBlock import com.simibubi.create.foundation.config.AllConfigs; import com.simibubi.create.foundation.fluid.CombinedTankWrapper; import com.simibubi.create.foundation.render.backend.light.EmptyLighter; -import com.simibubi.create.foundation.utility.BlockFace; -import com.simibubi.create.foundation.utility.Iterate; -import com.simibubi.create.foundation.utility.NBTHelper; -import com.simibubi.create.foundation.utility.NBTProcessors; -import com.simibubi.create.foundation.utility.VecHelper; import com.simibubi.create.foundation.utility.worldWrappers.WrappedWorld; import net.minecraft.block.AbstractButtonBlock; @@ -178,7 +174,7 @@ public abstract class Contraption { public boolean searchMovedStructure(World world, BlockPos pos, @Nullable Direction forcedDirection) throws AssemblyException { initialPassengers.clear(); - Queue frontier = new LinkedList<>(); + Queue frontier = new UniqueLinkedList<>(); Set visited = new HashSet<>(); anchor = pos; diff --git a/src/main/java/com/simibubi/create/foundation/utility/UniqueLinkedList.java b/src/main/java/com/simibubi/create/foundation/utility/UniqueLinkedList.java new file mode 100644 index 000000000..d30c3badb --- /dev/null +++ b/src/main/java/com/simibubi/create/foundation/utility/UniqueLinkedList.java @@ -0,0 +1,89 @@ +package com.simibubi.create.foundation.utility; + +import java.util.Collection; +import java.util.HashSet; +import java.util.LinkedList; +import java.util.List; +import java.util.stream.Collectors; + +public class UniqueLinkedList extends LinkedList { + private final HashSet contained = new HashSet<>(); + + @Override + public boolean contains(Object o) { + return contained.contains(o); + } + + @Override + public E poll() { + E e = super.poll(); + contained.remove(e); + return e; + } + + @Override + public boolean add(E e) { + if (contained.add(e)) return super.add(e); + else return false; + } + + @Override + public void add(int index, E element) { + if (contained.add(element)) super.add(index, element); + } + + @Override + public void addFirst(E e) { + if (contained.add(e)) super.addFirst(e); + } + + @Override + public void addLast(E e) { + if (contained.add(e)) super.addLast(e); + } + + @Override + public boolean addAll(Collection c) { + List filtered = c.stream().filter(it -> !contained.contains(it)).collect(Collectors.toList()); + return super.addAll(filtered); + } + + @Override + public boolean addAll(int index, Collection c) { + List filtered = c.stream().filter(it -> !contained.contains(it)).collect(Collectors.toList()); + return super.addAll(index, filtered); + } + + @Override + public boolean remove(Object o) { + contained.remove(o); + return super.remove(o); + } + + @Override + public E remove(int index) { + E e = super.remove(index); + contained.remove(e); + return e; + } + + @Override + public E removeFirst() { + E e = super.removeFirst(); + contained.remove(e); + return e; + } + + @Override + public E removeLast() { + E e = super.removeLast(); + contained.remove(e); + return e; + } + + @Override + public void clear() { + super.clear(); + contained.clear(); + } +} From 884f19d518a682617e26bea15e9f1fc7e3462b27 Mon Sep 17 00:00:00 2001 From: JozsefA Date: Sat, 27 Feb 2021 18:29:35 -0800 Subject: [PATCH 17/24] Fix issue when rendering very large contraptions. --- .../create/foundation/render/backend/BufferedModel.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/simibubi/create/foundation/render/backend/BufferedModel.java b/src/main/java/com/simibubi/create/foundation/render/backend/BufferedModel.java index 79e4e4d2f..400d1d2cb 100644 --- a/src/main/java/com/simibubi/create/foundation/render/backend/BufferedModel.java +++ b/src/main/java/com/simibubi/create/foundation/render/backend/BufferedModel.java @@ -50,14 +50,14 @@ public abstract class BufferedModel extends TemplateBuffer { protected final GlBuffer createEBO() { GlBuffer ebo = new GlBuffer(GL15.GL_ELEMENT_ARRAY_BUFFER); - int indicesSize = vertexCount * GlPrimitiveType.USHORT.getSize(); + int indicesSize = vertexCount * GlPrimitiveType.UINT.getSize(); ebo.bind(); GL15.glBufferData(GL15.GL_ELEMENT_ARRAY_BUFFER, indicesSize, GL15.GL_STATIC_DRAW); ebo.map(indicesSize, indices -> { for (int i = 0; i < vertexCount; i++) { - indices.putShort((short) i); + indices.putInt(i); } }); @@ -91,7 +91,7 @@ public abstract class BufferedModel extends TemplateBuffer { ebo.bind(); setupAttributes(); - GL20.glDrawElements(GL20.GL_QUADS, vertexCount, GlPrimitiveType.USHORT.getGlConstant(), 0); + GL20.glDrawElements(GL20.GL_QUADS, vertexCount, GlPrimitiveType.UINT.getGlConstant(), 0); int numAttributes = getTotalShaderAttributeCount(); for (int i = 0; i <= numAttributes; i++) { From 55f1b538b571a1d6b776224b9a74bab17807d9ac Mon Sep 17 00:00:00 2001 From: JozsefA Date: Sat, 27 Feb 2021 21:35:45 -0800 Subject: [PATCH 18/24] Only contraptions use EBOs now. Tight light bounds for bearing contraptions. --- .../bearing/BearingLighter.java | 54 ++++++++++++------ .../render/ContraptionModel.java | 55 +++++++++++++++++++ .../render/backend/BufferedModel.java | 46 ++-------------- .../render/backend/gl/GlPrimitiveType.java | 24 ++++---- 4 files changed, 110 insertions(+), 69 deletions(-) diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/BearingLighter.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/BearingLighter.java index f2b3e5eec..ef4ab3bf4 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/BearingLighter.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/BearingLighter.java @@ -19,25 +19,13 @@ public class BearingLighter extends ContraptionLighter { Set blocks = contraption.getBlocks().keySet(); Direction orientation = contraption.facing; - - float maxDistanceSq = -1; - for (BlockPos pos : blocks) { - float x = pos.getX(); - float y = pos.getY(); - float z = pos.getZ(); - - float distSq = x * x + y * y + z * z; - - if (distSq > maxDistanceSq) maxDistanceSq = distSq; - } - - int radius = (int) (Math.ceil(Math.sqrt(maxDistanceSq))); - - GridAlignedBB betterBounds = GridAlignedBB.ofRadius(radius); - GridAlignedBB contraptionBounds = GridAlignedBB.fromAABB(contraption.bounds); - Direction.Axis axis = orientation.getAxis(); + int radius = (int) (Math.ceil(Math.sqrt(getRadius(blocks, axis)))); + + GridAlignedBB betterBounds = GridAlignedBB.ofRadius(radius); + + GridAlignedBB contraptionBounds = GridAlignedBB.fromAABB(contraption.bounds); if (axis == Direction.Axis.X) { betterBounds.maxX = contraptionBounds.maxX; betterBounds.minX = contraptionBounds.minX; @@ -52,4 +40,36 @@ public class BearingLighter extends ContraptionLighter { betterBounds.translate(contraption.anchor); return betterBounds; } + + private static float getRadius(Set blocks, Direction.Axis axis) { + switch (axis) { + case X: + return getMaxDistSqr(blocks, BlockPos::getY, BlockPos::getZ); + case Y: + return getMaxDistSqr(blocks, BlockPos::getX, BlockPos::getZ); + case Z: + return getMaxDistSqr(blocks, BlockPos::getX, BlockPos::getY); + } + + throw new IllegalStateException("Impossible axis"); + } + + private static float getMaxDistSqr(Set blocks, Coordinate one, Coordinate other) { + float maxDistSq = -1; + for (BlockPos pos : blocks) { + float a = one.get(pos); + float b = other.get(pos); + + float distSq = a * a + b * b; + + + if (distSq > maxDistSq) maxDistSq = distSq; + } + + return maxDistSq; + } + + private interface Coordinate { + float get(BlockPos from); + } } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/ContraptionModel.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/ContraptionModel.java index c5bb45e7b..27d097aeb 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/ContraptionModel.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/ContraptionModel.java @@ -3,20 +3,69 @@ package com.simibubi.create.content.contraptions.components.structureMovement.re import java.nio.ByteBuffer; import com.simibubi.create.foundation.render.backend.BufferedModel; +import com.simibubi.create.foundation.render.backend.gl.GlBuffer; +import com.simibubi.create.foundation.render.backend.gl.GlPrimitiveType; import com.simibubi.create.foundation.render.backend.gl.attrib.VertexFormat; import net.minecraft.client.renderer.BufferBuilder; import net.minecraft.client.renderer.LightTexture; +import org.lwjgl.opengl.GL15; +import org.lwjgl.opengl.GL20; public class ContraptionModel extends BufferedModel { public static final VertexFormat FORMAT = VertexFormat.builder() .addAttributes(ContraptionVertexAttributes.class) .build(); + protected GlPrimitiveType eboIndexType; + protected GlBuffer ebo; + public ContraptionModel(BufferBuilder buf) { super(buf); } + @Override + protected void init() { + super.init(); + + createEBO(); + } + + @Override + protected void doRender() { + modelVBO.bind(); + ebo.bind(); + + setupAttributes(); + GL20.glDrawElements(GL20.GL_QUADS, vertexCount, eboIndexType.getGlConstant(), 0); + + int numAttributes = getTotalShaderAttributeCount(); + for (int i = 0; i <= numAttributes; i++) { + GL20.glDisableVertexAttribArray(i); + } + + ebo.unbind(); + modelVBO.unbind(); + } + + protected final void createEBO() { + ebo = new GlBuffer(GL15.GL_ELEMENT_ARRAY_BUFFER); + eboIndexType = GlPrimitiveType.UINT; // TODO: choose this based on the number of vertices + + int indicesSize = vertexCount * eboIndexType.getSize(); + + ebo.bind(); + + GL15.glBufferData(GL15.GL_ELEMENT_ARRAY_BUFFER, indicesSize, GL15.GL_STATIC_DRAW); + ebo.map(indicesSize, indices -> { + for (int i = 0; i < vertexCount; i++) { + indices.putInt(i); + } + }); + + ebo.unbind(); + } + @Override protected void copyVertex(ByteBuffer to, int vertex) { to.putFloat(getX(template, vertex)); @@ -48,4 +97,10 @@ public class ContraptionModel extends BufferedModel { protected VertexFormat getModelFormat() { return FORMAT; } + + @Override + protected void deleteInternal() { + super.deleteInternal(); + ebo.delete(); + } } diff --git a/src/main/java/com/simibubi/create/foundation/render/backend/BufferedModel.java b/src/main/java/com/simibubi/create/foundation/render/backend/BufferedModel.java index 400d1d2cb..1050da53c 100644 --- a/src/main/java/com/simibubi/create/foundation/render/backend/BufferedModel.java +++ b/src/main/java/com/simibubi/create/foundation/render/backend/BufferedModel.java @@ -14,11 +14,10 @@ import net.minecraft.client.renderer.BufferBuilder; public abstract class BufferedModel extends TemplateBuffer { - protected GlBuffer ebo; protected GlBuffer modelVBO; protected boolean removed; - public BufferedModel(BufferBuilder buf) { + protected BufferedModel(BufferBuilder buf) { super(buf); if (vertexCount > 0) init(); } @@ -28,8 +27,6 @@ public abstract class BufferedModel extends TemplateBuffer { modelVBO = new GlBuffer(GL20.GL_ARRAY_BUFFER); modelVBO.with(vbo -> initModel()); - - ebo = createEBO(); } protected void initModel() { @@ -47,25 +44,6 @@ public abstract class BufferedModel extends TemplateBuffer { }); } - protected final GlBuffer createEBO() { - GlBuffer ebo = new GlBuffer(GL15.GL_ELEMENT_ARRAY_BUFFER); - - int indicesSize = vertexCount * GlPrimitiveType.UINT.getSize(); - - ebo.bind(); - - GL15.glBufferData(GL15.GL_ELEMENT_ARRAY_BUFFER, indicesSize, GL15.GL_STATIC_DRAW); - ebo.map(indicesSize, indices -> { - for (int i = 0; i < vertexCount; i++) { - indices.putInt(i); - } - }); - - ebo.unbind(); - - return ebo; - } - protected abstract void copyVertex(ByteBuffer to, int index); protected abstract VertexFormat getModelFormat(); @@ -75,7 +53,7 @@ public abstract class BufferedModel extends TemplateBuffer { } /** - * Renders this model, checking first if it should actually be rendered. + * Renders this model, checking first if there is anything to render. */ public final void render() { if (vertexCount == 0 || removed) return; @@ -84,23 +62,9 @@ public abstract class BufferedModel extends TemplateBuffer { } /** - * Override this. + * Set up any state and make the draw calls. */ - protected void doRender() { - modelVBO.bind(); - ebo.bind(); - - setupAttributes(); - GL20.glDrawElements(GL20.GL_QUADS, vertexCount, GlPrimitiveType.UINT.getGlConstant(), 0); - - int numAttributes = getTotalShaderAttributeCount(); - for (int i = 0; i <= numAttributes; i++) { - GL20.glDisableVertexAttribArray(i); - } - - ebo.unbind(); - modelVBO.unbind(); - } + protected abstract void doRender(); protected void setupAttributes() { int numAttributes = getTotalShaderAttributeCount(); @@ -111,7 +75,7 @@ public abstract class BufferedModel extends TemplateBuffer { getModelFormat().vertexAttribPointers(0); } - public void delete() { + public final void delete() { removed = true; if (vertexCount > 0) { RenderWork.enqueue(this::deleteInternal); diff --git a/src/main/java/com/simibubi/create/foundation/render/backend/gl/GlPrimitiveType.java b/src/main/java/com/simibubi/create/foundation/render/backend/gl/GlPrimitiveType.java index 5e069fabf..c82b02a00 100644 --- a/src/main/java/com/simibubi/create/foundation/render/backend/gl/GlPrimitiveType.java +++ b/src/main/java/com/simibubi/create/foundation/render/backend/gl/GlPrimitiveType.java @@ -2,25 +2,27 @@ package com.simibubi.create.foundation.render.backend.gl; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; +import org.lwjgl.opengl.GL11; +import org.lwjgl.opengl.GL20; @OnlyIn(Dist.CLIENT) public enum GlPrimitiveType { - FLOAT(4, "float", 5126), - UBYTE(1, "ubyte", 5121), - BYTE(1, "byte", 5120), - USHORT(2, "ushort", 5123), - SHORT(2, "short", 5122), - UINT(4, "uint", 5125), - INT(4, "int", 5124); + FLOAT(4, "float", GL11.GL_FLOAT), + UBYTE(1, "ubyte", GL11.GL_UNSIGNED_BYTE), + BYTE(1, "byte", GL11.GL_BYTE), + USHORT(2, "ushort", GL11.GL_UNSIGNED_SHORT), + SHORT(2, "short", GL11.GL_SHORT), + UINT(4, "uint", GL11.GL_UNSIGNED_INT), + INT(4, "int", GL11.GL_INT); private final int size; private final String displayName; private final int glConstant; - GlPrimitiveType(int p_i46095_3_, String p_i46095_4_, int p_i46095_5_) { - this.size = p_i46095_3_; - this.displayName = p_i46095_4_; - this.glConstant = p_i46095_5_; + GlPrimitiveType(int bytes, String name, int glEnum) { + this.size = bytes; + this.displayName = name; + this.glConstant = glEnum; } public int getSize() { From 1e28bc998afc656d86a82c984d33c84152768125 Mon Sep 17 00:00:00 2001 From: grimmauld Date: Mon, 1 Mar 2021 10:37:49 +0100 Subject: [PATCH 19/24] Make contraptions not take that stupid amount of cpu time when in water --- src/generated/resources/.cache/cache | 4 +- .../assets/create/blockstates/fluid_pipe.json | 154 +++++++++--------- .../create/blockstates/radial_chassis.json | 72 ++++---- .../com/simibubi/create/AllEntityTypes.java | 12 +- .../AbstractContraptionEntity.java | 21 +++ .../processing/ProcessingInventory.java | 2 + .../foundation/advancement/AllTriggers.java | 6 +- .../resources/META-INF/accesstransformer.cfg | 4 +- 8 files changed, 152 insertions(+), 123 deletions(-) diff --git a/src/generated/resources/.cache/cache b/src/generated/resources/.cache/cache index 463f09ef7..f0ea2779e 100644 --- a/src/generated/resources/.cache/cache +++ b/src/generated/resources/.cache/cache @@ -140,7 +140,7 @@ de8a40b7daf1497d5aecee47a43b3e0b1d030b00 assets/create/blockstates/fancy_scoria_ fc9ac0a7e7191b93516719455a17177fa6524ecc assets/create/blockstates/fancy_weathered_limestone_bricks_slab.json b2a7c321b1795f20e7433f81a55ce4683de081b8 assets/create/blockstates/fancy_weathered_limestone_bricks_stairs.json 6372fe02ba0065acb0758121c45a15a1a8fdc5de assets/create/blockstates/fancy_weathered_limestone_bricks_wall.json -48086bf71a824faf14841b698050cc8544b09a9b assets/create/blockstates/fluid_pipe.json +3d97226b5e8d8f70ed08e45e78db1faf78d5e28b assets/create/blockstates/fluid_pipe.json f0eaab18e16c4f3f65ebf3b55b08f0dc445720fe assets/create/blockstates/fluid_tank.json 5408d92ab02af86539ac42971d4033545970bb3a assets/create/blockstates/fluid_valve.json e9da1794b6ece7f9aa8bcb43d42c23a55446133b assets/create/blockstates/flywheel.json @@ -337,7 +337,7 @@ e8b0a401c10d1ba67ed71ba31bd5f9bc28571b65 assets/create/blockstates/powered_toggl d06cd9a1101b18d306a786320aab12018b1325d6 assets/create/blockstates/purple_sail.json 92957119abd5fbcca36a113b2a80255fd70fc303 assets/create/blockstates/purple_seat.json 61035f8afe75ff7bbd291da5d8690bcbebe679eb assets/create/blockstates/purple_valve_handle.json -4439fc83a8c7370ab44b211a3fd48abde20a4728 assets/create/blockstates/radial_chassis.json +8d7e653bfd9846e684a0d3725595714a19201017 assets/create/blockstates/radial_chassis.json 45877c4d90a7185c2f304edbd67379d800920439 assets/create/blockstates/red_sail.json da1b08387af7afa0855ee8d040f620c01f20660a assets/create/blockstates/red_seat.json 722fc77bbf387af8a4016e42cbf9501d2b968881 assets/create/blockstates/red_valve_handle.json diff --git a/src/generated/resources/assets/create/blockstates/fluid_pipe.json b/src/generated/resources/assets/create/blockstates/fluid_pipe.json index 80a25280c..a4cffcde7 100644 --- a/src/generated/resources/assets/create/blockstates/fluid_pipe.json +++ b/src/generated/resources/assets/create/blockstates/fluid_pipe.json @@ -61,9 +61,9 @@ { "when": { "down": "false", + "north": "true", "up": "true", - "south": "false", - "north": "true" + "south": "false" }, "apply": { "model": "create:block/fluid_pipe/lu_x" @@ -72,9 +72,9 @@ { "when": { "down": "false", + "north": "false", "up": "true", - "south": "true", - "north": "false" + "south": "true" }, "apply": { "model": "create:block/fluid_pipe/ru_x" @@ -83,9 +83,9 @@ { "when": { "down": "true", + "north": "true", "up": "false", - "south": "false", - "north": "true" + "south": "false" }, "apply": { "model": "create:block/fluid_pipe/ld_x" @@ -94,9 +94,9 @@ { "when": { "down": "true", + "north": "false", "up": "false", - "south": "true", - "north": "false" + "south": "true" }, "apply": { "model": "create:block/fluid_pipe/rd_x" @@ -105,9 +105,9 @@ { "when": { "down": "true", + "north": "false", "up": "true", - "south": "false", - "north": "false" + "south": "false" }, "apply": { "model": "create:block/fluid_pipe/ud_x" @@ -116,9 +116,9 @@ { "when": { "down": "false", + "north": "false", "up": "true", - "south": "false", - "north": "false" + "south": "false" }, "apply": { "model": "create:block/fluid_pipe/ud_x" @@ -127,9 +127,9 @@ { "when": { "down": "true", + "north": "false", "up": "false", - "south": "false", - "north": "false" + "south": "false" }, "apply": { "model": "create:block/fluid_pipe/ud_x" @@ -138,9 +138,9 @@ { "when": { "down": "false", + "north": "true", "up": "false", - "south": "true", - "north": "true" + "south": "true" }, "apply": { "model": "create:block/fluid_pipe/lr_x" @@ -149,9 +149,9 @@ { "when": { "down": "false", + "north": "true", "up": "false", - "south": "false", - "north": "true" + "south": "false" }, "apply": { "model": "create:block/fluid_pipe/lr_x" @@ -160,9 +160,9 @@ { "when": { "down": "false", + "north": "false", "up": "false", - "south": "true", - "north": "false" + "south": "true" }, "apply": { "model": "create:block/fluid_pipe/lr_x" @@ -171,9 +171,9 @@ { "when": { "down": "false", + "north": "false", "up": "false", - "south": "false", - "north": "false" + "south": "false" }, "apply": { "model": "create:block/fluid_pipe/none_x" @@ -181,10 +181,10 @@ }, { "when": { - "south": "true", "west": "true", + "east": "false", "north": "false", - "east": "false" + "south": "true" }, "apply": { "model": "create:block/fluid_pipe/lu_y" @@ -192,10 +192,10 @@ }, { "when": { - "south": "true", "west": "false", + "east": "true", "north": "false", - "east": "true" + "south": "true" }, "apply": { "model": "create:block/fluid_pipe/ru_y" @@ -203,10 +203,10 @@ }, { "when": { - "south": "false", "west": "true", + "east": "false", "north": "true", - "east": "false" + "south": "false" }, "apply": { "model": "create:block/fluid_pipe/ld_y" @@ -214,10 +214,10 @@ }, { "when": { - "south": "false", "west": "false", + "east": "true", "north": "true", - "east": "true" + "south": "false" }, "apply": { "model": "create:block/fluid_pipe/rd_y" @@ -225,10 +225,10 @@ }, { "when": { - "south": "true", "west": "false", + "east": "false", "north": "true", - "east": "false" + "south": "true" }, "apply": { "model": "create:block/fluid_pipe/ud_y" @@ -236,10 +236,10 @@ }, { "when": { - "south": "true", "west": "false", + "east": "false", "north": "false", - "east": "false" + "south": "true" }, "apply": { "model": "create:block/fluid_pipe/ud_y" @@ -247,10 +247,10 @@ }, { "when": { - "south": "false", "west": "false", + "east": "false", "north": "true", - "east": "false" + "south": "false" }, "apply": { "model": "create:block/fluid_pipe/ud_y" @@ -258,10 +258,10 @@ }, { "when": { - "south": "false", "west": "true", + "east": "true", "north": "false", - "east": "true" + "south": "false" }, "apply": { "model": "create:block/fluid_pipe/lr_y" @@ -269,10 +269,10 @@ }, { "when": { - "south": "false", "west": "true", + "east": "false", "north": "false", - "east": "false" + "south": "false" }, "apply": { "model": "create:block/fluid_pipe/lr_y" @@ -280,10 +280,10 @@ }, { "when": { - "south": "false", "west": "false", + "east": "true", "north": "false", - "east": "true" + "south": "false" }, "apply": { "model": "create:block/fluid_pipe/lr_y" @@ -291,10 +291,10 @@ }, { "when": { - "south": "false", "west": "false", + "east": "false", "north": "false", - "east": "false" + "south": "false" }, "apply": { "model": "create:block/fluid_pipe/none_y" @@ -302,10 +302,10 @@ }, { "when": { - "down": "false", - "up": "true", "west": "false", - "east": "true" + "down": "false", + "east": "true", + "up": "true" }, "apply": { "model": "create:block/fluid_pipe/lu_z" @@ -313,10 +313,10 @@ }, { "when": { - "down": "false", - "up": "true", "west": "true", - "east": "false" + "down": "false", + "east": "false", + "up": "true" }, "apply": { "model": "create:block/fluid_pipe/ru_z" @@ -324,10 +324,10 @@ }, { "when": { - "down": "true", - "up": "false", "west": "false", - "east": "true" + "down": "true", + "east": "true", + "up": "false" }, "apply": { "model": "create:block/fluid_pipe/ld_z" @@ -335,10 +335,10 @@ }, { "when": { - "down": "true", - "up": "false", "west": "true", - "east": "false" + "down": "true", + "east": "false", + "up": "false" }, "apply": { "model": "create:block/fluid_pipe/rd_z" @@ -346,10 +346,10 @@ }, { "when": { + "west": "false", "down": "true", - "up": "true", - "west": "false", - "east": "false" + "east": "false", + "up": "true" }, "apply": { "model": "create:block/fluid_pipe/ud_z" @@ -357,10 +357,10 @@ }, { "when": { + "west": "false", "down": "false", - "up": "true", - "west": "false", - "east": "false" + "east": "false", + "up": "true" }, "apply": { "model": "create:block/fluid_pipe/ud_z" @@ -368,10 +368,10 @@ }, { "when": { + "west": "false", "down": "true", - "up": "false", - "west": "false", - "east": "false" + "east": "false", + "up": "false" }, "apply": { "model": "create:block/fluid_pipe/ud_z" @@ -379,10 +379,10 @@ }, { "when": { - "down": "false", - "up": "false", "west": "true", - "east": "true" + "down": "false", + "east": "true", + "up": "false" }, "apply": { "model": "create:block/fluid_pipe/lr_z" @@ -390,10 +390,10 @@ }, { "when": { - "down": "false", - "up": "false", "west": "false", - "east": "true" + "down": "false", + "east": "true", + "up": "false" }, "apply": { "model": "create:block/fluid_pipe/lr_z" @@ -401,10 +401,10 @@ }, { "when": { - "down": "false", - "up": "false", "west": "true", - "east": "false" + "down": "false", + "east": "false", + "up": "false" }, "apply": { "model": "create:block/fluid_pipe/lr_z" @@ -412,10 +412,10 @@ }, { "when": { - "down": "false", - "up": "false", "west": "false", - "east": "false" + "down": "false", + "east": "false", + "up": "false" }, "apply": { "model": "create:block/fluid_pipe/none_z" diff --git a/src/generated/resources/assets/create/blockstates/radial_chassis.json b/src/generated/resources/assets/create/blockstates/radial_chassis.json index 2e2d16cf1..9d00ea8b1 100644 --- a/src/generated/resources/assets/create/blockstates/radial_chassis.json +++ b/src/generated/resources/assets/create/blockstates/radial_chassis.json @@ -29,8 +29,8 @@ }, { "when": { - "axis": "x", - "sticky_south": "true" + "sticky_south": "true", + "axis": "x" }, "apply": { "model": "create:block/radial_chassis_side_x_sticky", @@ -39,8 +39,8 @@ }, { "when": { - "axis": "y", - "sticky_south": "true" + "sticky_south": "true", + "axis": "y" }, "apply": { "model": "create:block/radial_chassis_side_y_sticky" @@ -48,8 +48,8 @@ }, { "when": { - "axis": "z", - "sticky_south": "true" + "sticky_south": "true", + "axis": "z" }, "apply": { "model": "create:block/radial_chassis_side_x_sticky", @@ -59,8 +59,8 @@ }, { "when": { - "axis": "x", - "sticky_south": "false" + "sticky_south": "false", + "axis": "x" }, "apply": { "model": "create:block/radial_chassis_side_x", @@ -69,8 +69,8 @@ }, { "when": { - "axis": "y", - "sticky_south": "false" + "sticky_south": "false", + "axis": "y" }, "apply": { "model": "create:block/radial_chassis_side_y" @@ -78,8 +78,8 @@ }, { "when": { - "axis": "z", - "sticky_south": "false" + "sticky_south": "false", + "axis": "z" }, "apply": { "model": "create:block/radial_chassis_side_x", @@ -89,8 +89,8 @@ }, { "when": { - "axis": "x", - "sticky_west": "true" + "sticky_west": "true", + "axis": "x" }, "apply": { "model": "create:block/radial_chassis_side_x_sticky", @@ -99,8 +99,8 @@ }, { "when": { - "axis": "y", - "sticky_west": "true" + "sticky_west": "true", + "axis": "y" }, "apply": { "model": "create:block/radial_chassis_side_y_sticky", @@ -109,8 +109,8 @@ }, { "when": { - "axis": "z", - "sticky_west": "true" + "sticky_west": "true", + "axis": "z" }, "apply": { "model": "create:block/radial_chassis_side_z_sticky", @@ -119,8 +119,8 @@ }, { "when": { - "axis": "x", - "sticky_west": "false" + "sticky_west": "false", + "axis": "x" }, "apply": { "model": "create:block/radial_chassis_side_x", @@ -129,8 +129,8 @@ }, { "when": { - "axis": "y", - "sticky_west": "false" + "sticky_west": "false", + "axis": "y" }, "apply": { "model": "create:block/radial_chassis_side_y", @@ -139,8 +139,8 @@ }, { "when": { - "axis": "z", - "sticky_west": "false" + "sticky_west": "false", + "axis": "z" }, "apply": { "model": "create:block/radial_chassis_side_z", @@ -207,8 +207,8 @@ }, { "when": { - "axis": "x", - "sticky_east": "true" + "sticky_east": "true", + "axis": "x" }, "apply": { "model": "create:block/radial_chassis_side_x_sticky", @@ -217,8 +217,8 @@ }, { "when": { - "axis": "y", - "sticky_east": "true" + "sticky_east": "true", + "axis": "y" }, "apply": { "model": "create:block/radial_chassis_side_y_sticky", @@ -227,8 +227,8 @@ }, { "when": { - "axis": "z", - "sticky_east": "true" + "sticky_east": "true", + "axis": "z" }, "apply": { "model": "create:block/radial_chassis_side_z_sticky" @@ -236,8 +236,8 @@ }, { "when": { - "axis": "x", - "sticky_east": "false" + "sticky_east": "false", + "axis": "x" }, "apply": { "model": "create:block/radial_chassis_side_x", @@ -246,8 +246,8 @@ }, { "when": { - "axis": "y", - "sticky_east": "false" + "sticky_east": "false", + "axis": "y" }, "apply": { "model": "create:block/radial_chassis_side_y", @@ -256,8 +256,8 @@ }, { "when": { - "axis": "z", - "sticky_east": "false" + "sticky_east": "false", + "axis": "z" }, "apply": { "model": "create:block/radial_chassis_side_z" diff --git a/src/main/java/com/simibubi/create/AllEntityTypes.java b/src/main/java/com/simibubi/create/AllEntityTypes.java index d811fba0e..c92797f23 100644 --- a/src/main/java/com/simibubi/create/AllEntityTypes.java +++ b/src/main/java/com/simibubi/create/AllEntityTypes.java @@ -31,9 +31,9 @@ public class AllEntityTypes { contraption("gantry_contraption", GantryContraptionEntity::new, 10, 40, false); public static final RegistryEntry> SUPER_GLUE = register("super_glue", - SuperGlueEntity::new, EntityClassification.MISC, 10, Integer.MAX_VALUE, false, SuperGlueEntity::build); + SuperGlueEntity::new, EntityClassification.MISC, 10, Integer.MAX_VALUE, false, true, SuperGlueEntity::build); public static final RegistryEntry> SEAT = - register("seat", SeatEntity::new, EntityClassification.MISC, 0, Integer.MAX_VALUE, false, SeatEntity::build); + register("seat", SeatEntity::new, EntityClassification.MISC, 0, Integer.MAX_VALUE, false, true, SeatEntity::build); // @@ -41,12 +41,12 @@ public class AllEntityTypes { private static RegistryEntry> contraption(String name, IFactory factory, int range, int updateFrequency, boolean sendVelocity) { - return register(name, factory, EntityClassification.MISC, range, updateFrequency, sendVelocity, + return register(name, factory, EntityClassification.MISC, range, updateFrequency, sendVelocity, true, AbstractContraptionEntity::build); } private static RegistryEntry> register(String name, IFactory factory, - EntityClassification group, int range, int updateFrequency, boolean sendVelocity, + EntityClassification group, int range, int updateFrequency, boolean sendVelocity, boolean immuneToFire, NonNullConsumer> propertyBuilder) { String id = Lang.asId(name); return Create.registrate() @@ -55,6 +55,10 @@ public class AllEntityTypes { .setUpdateInterval(updateFrequency) .setShouldReceiveVelocityUpdates(sendVelocity)) .properties(propertyBuilder) + .properties(b -> { + if (immuneToFire) + b.immuneToFire(); + }) .register(); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/AbstractContraptionEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/AbstractContraptionEntity.java index acd2b1625..5b8c56e0b 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/AbstractContraptionEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/AbstractContraptionEntity.java @@ -649,4 +649,25 @@ public abstract class AbstractContraptionEntity extends Entity implements IEntit } + @Override + public void updateAquatics() { + /* + Override this with an empty method to reduce enormous calculation time when contraptions are in water + WARNING: THIS HAS A BUNCH OF SIDE EFFECTS! + - Fluids will not try to change contraption movement direction + - this.inWater and this.isInWater() will return unreliable data + - entities riding a contraption will not cause water splashes (seats are their own entity so this should be fine) + - fall distance is not reset when the contraption is in water + - this.eyesInWater and this.canSwim() will always be false + - swimming state will never be updated + */ + extinguish(); + } + + @Override + public void setFire(int p_70015_1_) { + // Contraptions no longer catch fire + } + + } diff --git a/src/main/java/com/simibubi/create/content/contraptions/processing/ProcessingInventory.java b/src/main/java/com/simibubi/create/content/contraptions/processing/ProcessingInventory.java index 4e2a4d77f..45cb0927b 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/processing/ProcessingInventory.java +++ b/src/main/java/com/simibubi/create/content/contraptions/processing/ProcessingInventory.java @@ -55,6 +55,8 @@ public class ProcessingInventory extends ItemStackHandler { recipeDuration = nbt.getFloat("RecipeTime"); appliedRecipe = nbt.getBoolean("AppliedRecipe"); super.deserializeNBT(nbt); + if(isEmpty()) + appliedRecipe = false; } @Override diff --git a/src/main/java/com/simibubi/create/foundation/advancement/AllTriggers.java b/src/main/java/com/simibubi/create/foundation/advancement/AllTriggers.java index 4f16caa6e..88084d2a4 100644 --- a/src/main/java/com/simibubi/create/foundation/advancement/AllTriggers.java +++ b/src/main/java/com/simibubi/create/foundation/advancement/AllTriggers.java @@ -19,9 +19,9 @@ public class AllTriggers { private static final List> triggers = new LinkedList<>(); - public static final RegistryTrigger INFINITE_FLUID = add(new RegistryTrigger<>("infinite_fluid", ForgeRegistries.FLUIDS)); - public static final RegistryTrigger BRACKET_APPLY_TRIGGER = add(new RegistryTrigger<>("bracket_apply", ForgeRegistries.BLOCKS)); - public static final EnumTrigger FAN_PROCESSING = add(new EnumTrigger<>("fan_processing", InWorldProcessing.Type.class)); + public static final StringSerializableTrigger INFINITE_FLUID = add(new RegistryTrigger<>("infinite_fluid", ForgeRegistries.FLUIDS)); + public static final StringSerializableTrigger BRACKET_APPLY_TRIGGER = add(new RegistryTrigger<>("bracket_apply", ForgeRegistries.BLOCKS)); + public static final StringSerializableTrigger FAN_PROCESSING = add(new EnumTrigger<>("fan_processing", InWorldProcessing.Type.class)); public static final SimpleTrigger ROTATION = simple("rotation"), diff --git a/src/main/resources/META-INF/accesstransformer.cfg b/src/main/resources/META-INF/accesstransformer.cfg index d70fcdb5c..17a263235 100644 --- a/src/main/resources/META-INF/accesstransformer.cfg +++ b/src/main/resources/META-INF/accesstransformer.cfg @@ -44,4 +44,6 @@ public com.mojang.blaze3d.platform.GlStateManager$BooleanState field_179201_b #f public net.minecraft.client.renderer.GameRenderer func_215311_a(Lnet/minecraft/client/renderer/ActiveRenderInfo;FZ)D #getFOVModifier # IResizeCallback -public net.minecraft.util.palette.IResizeCallback \ No newline at end of file +public net.minecraft.util.palette.IResizeCallback + +public net.minecraft.entity.Entity func_205011_p()V # updateAquatics \ No newline at end of file From 5499fdbad0691d464140812addcb2d7f6d60b5bc Mon Sep 17 00:00:00 2001 From: JozsefA Date: Tue, 2 Mar 2021 15:54:31 -0800 Subject: [PATCH 20/24] The flappening. Tunnel and funnel flaps are now rendered with the new engine. --- .../com/simibubi/create/AllTileEntities.java | 5 + .../base/KineticRenderMaterials.java | 3 + .../render/ContraptionKineticRenderer.java | 2 + .../render/ContraptionRenderDispatcher.java | 15 +-- .../relays/belt/BeltTileEntity.java | 2 +- .../content/logistics/block/FlapData.java | 122 ++++++++++++++++++ .../logistics/block/FlapInstancedModel.java | 22 ++++ .../logistics/block/FlapVertexAttributes.java | 45 +++++++ .../belts/tunnel/BeltTunnelInstance.java | 106 +++++++++++++++ .../belts/tunnel/BeltTunnelRenderer.java | 5 + .../belts/tunnel/BeltTunnelTileEntity.java | 24 ++-- .../block/funnel/FunnelInstance.java | 93 +++++++++++++ .../block/funnel/FunnelRenderer.java | 3 +- .../block/funnel/FunnelTileEntity.java | 17 ++- .../foundation/mixin/RenderHooksMixin.java | 28 ++-- .../foundation/render/AllProgramSpecs.java | 18 +++ .../foundation/render/KineticRenderer.java | 2 + .../instancing/InstancedTileRenderer.java | 4 + .../instancing/TileEntityInstance.java | 7 +- .../resources/assets/create/shader/flap.vert | 104 +++++++++++++++ 20 files changed, 592 insertions(+), 35 deletions(-) create mode 100644 src/main/java/com/simibubi/create/content/logistics/block/FlapData.java create mode 100644 src/main/java/com/simibubi/create/content/logistics/block/FlapInstancedModel.java create mode 100644 src/main/java/com/simibubi/create/content/logistics/block/FlapVertexAttributes.java create mode 100644 src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BeltTunnelInstance.java create mode 100644 src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelInstance.java create mode 100644 src/main/resources/assets/create/shader/flap.vert diff --git a/src/main/java/com/simibubi/create/AllTileEntities.java b/src/main/java/com/simibubi/create/AllTileEntities.java index 1abb73271..7e24832ab 100644 --- a/src/main/java/com/simibubi/create/AllTileEntities.java +++ b/src/main/java/com/simibubi/create/AllTileEntities.java @@ -104,6 +104,7 @@ import com.simibubi.create.content.contraptions.relays.gearbox.GearboxInstance; import com.simibubi.create.content.contraptions.relays.gearbox.GearboxRenderer; import com.simibubi.create.content.contraptions.relays.gearbox.GearboxTileEntity; import com.simibubi.create.content.contraptions.relays.gearbox.GearshiftTileEntity; +import com.simibubi.create.content.logistics.block.belts.tunnel.BeltTunnelInstance; import com.simibubi.create.content.logistics.block.belts.tunnel.BeltTunnelRenderer; import com.simibubi.create.content.logistics.block.belts.tunnel.BeltTunnelTileEntity; import com.simibubi.create.content.logistics.block.belts.tunnel.BrassTunnelTileEntity; @@ -116,6 +117,7 @@ import com.simibubi.create.content.logistics.block.depot.DepotTileEntity; import com.simibubi.create.content.logistics.block.diodes.AdjustablePulseRepeaterTileEntity; import com.simibubi.create.content.logistics.block.diodes.AdjustableRepeaterRenderer; import com.simibubi.create.content.logistics.block.diodes.AdjustableRepeaterTileEntity; +import com.simibubi.create.content.logistics.block.funnel.FunnelInstance; import com.simibubi.create.content.logistics.block.funnel.FunnelRenderer; import com.simibubi.create.content.logistics.block.funnel.FunnelTileEntity; import com.simibubi.create.content.logistics.block.inventories.AdjustableCrateTileEntity; @@ -339,12 +341,14 @@ public class AllTileEntities { .tileEntity("andesite_tunnel", BeltTunnelTileEntity::new) .validBlocks(AllBlocks.ANDESITE_TUNNEL) .renderer(() -> BeltTunnelRenderer::new) + .onRegister(BeltTunnelInstance::register) .register(); public static final TileEntityEntry BRASS_TUNNEL = Create.registrate() .tileEntity("brass_tunnel", BrassTunnelTileEntity::new) .validBlocks(AllBlocks.BRASS_TUNNEL) .renderer(() -> BeltTunnelRenderer::new) + .onRegister(BeltTunnelInstance::register) .register(); public static final TileEntityEntry MECHANICAL_ARM = Create.registrate() @@ -591,6 +595,7 @@ public class AllTileEntities { .validBlocks(AllBlocks.BRASS_FUNNEL, AllBlocks.BRASS_BELT_FUNNEL, AllBlocks.ANDESITE_FUNNEL, AllBlocks.ANDESITE_BELT_FUNNEL) .renderer(() -> FunnelRenderer::new) + .onRegister(FunnelInstance::register) .register(); public static final TileEntityEntry CONTENT_OBSERVER = Create.registrate() diff --git a/src/main/java/com/simibubi/create/content/contraptions/base/KineticRenderMaterials.java b/src/main/java/com/simibubi/create/content/contraptions/base/KineticRenderMaterials.java index 49223a3cb..8d3d32d31 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/base/KineticRenderMaterials.java +++ b/src/main/java/com/simibubi/create/content/contraptions/base/KineticRenderMaterials.java @@ -2,6 +2,7 @@ package com.simibubi.create.content.contraptions.base; import com.simibubi.create.content.contraptions.components.actors.ContraptionActorData; import com.simibubi.create.content.contraptions.relays.belt.BeltData; +import com.simibubi.create.content.logistics.block.FlapData; import com.simibubi.create.foundation.render.backend.instancing.InstancedModel; import com.simibubi.create.foundation.render.backend.instancing.MaterialType; @@ -10,4 +11,6 @@ public class KineticRenderMaterials { public static final MaterialType> BELTS = new MaterialType<>(); public static final MaterialType> ACTORS = new MaterialType<>(); + + public static final MaterialType> FLAPS = new MaterialType<>(); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/ContraptionKineticRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/ContraptionKineticRenderer.java index 6733cd22a..f5fe4a9b9 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/ContraptionKineticRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/ContraptionKineticRenderer.java @@ -4,6 +4,7 @@ import com.simibubi.create.content.contraptions.base.KineticRenderMaterials; import com.simibubi.create.content.contraptions.base.RotatingInstancedModel; import com.simibubi.create.content.contraptions.components.actors.RotatingActorModel; import com.simibubi.create.content.contraptions.relays.belt.BeltInstancedModel; +import com.simibubi.create.content.logistics.block.FlapInstancedModel; import com.simibubi.create.foundation.render.AllProgramSpecs; import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer; import com.simibubi.create.foundation.render.backend.instancing.RenderMaterial; @@ -16,6 +17,7 @@ public class ContraptionKineticRenderer extends InstancedTileRenderer(this, AllProgramSpecs.CONTRAPTION_BELT, BeltInstancedModel::new)); materials.put(KineticRenderMaterials.ROTATING, new RenderMaterial<>(this, AllProgramSpecs.CONTRAPTION_ROTATING, RotatingInstancedModel::new)); + materials.put(KineticRenderMaterials.FLAPS, new RenderMaterial<>(this, AllProgramSpecs.CONTRAPTION_FLAPS, FlapInstancedModel::new)); materials.put(KineticRenderMaterials.ACTORS, new RenderMaterial<>(this, AllProgramSpecs.CONTRAPTION_ACTOR, RotatingActorModel::new)); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/ContraptionRenderDispatcher.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/ContraptionRenderDispatcher.java index b35305eed..346c3e244 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/ContraptionRenderDispatcher.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/ContraptionRenderDispatcher.java @@ -104,20 +104,17 @@ public class ContraptionRenderDispatcher { return contraption; } + public static void beginFrame(double camX, double camY, double camZ) { + for (RenderedContraption renderer : renderers.values()) { + renderer.beginFrame(camX, camY, camZ); + } + } + public static void renderLayer(RenderType layer, Matrix4f viewProjection, double camX, double camY, double camZ) { removeDeadContraptions(); if (renderers.isEmpty()) return; - if (firstLayer) { - - for (RenderedContraption renderer : renderers.values()) { - renderer.beginFrame(camX, camY, camZ); - } - - firstLayer = false; - } - layer.startDrawing(); GL11.glEnable(GL13.GL_TEXTURE_3D); GL13.glActiveTexture(GL40.GL_TEXTURE4); // the shaders expect light volumes to be in texture 4 diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltTileEntity.java index a55c23825..f26ebceed 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltTileEntity.java @@ -521,7 +521,7 @@ public class BeltTileEntity extends KineticTileEntity { @Override public boolean shouldRenderAsTE() { - return isController(); + return BeltBlock.canTransportObjects(getBlockState()); } private void updateLight() { diff --git a/src/main/java/com/simibubi/create/content/logistics/block/FlapData.java b/src/main/java/com/simibubi/create/content/logistics/block/FlapData.java new file mode 100644 index 000000000..a42d8af3b --- /dev/null +++ b/src/main/java/com/simibubi/create/content/logistics/block/FlapData.java @@ -0,0 +1,122 @@ +package com.simibubi.create.content.logistics.block; + +import com.simibubi.create.foundation.render.backend.gl.attrib.VertexFormat; +import com.simibubi.create.foundation.render.backend.instancing.InstanceData; +import com.simibubi.create.foundation.render.backend.instancing.InstancedModel; +import net.minecraft.client.renderer.Vector3f; +import net.minecraft.util.math.BlockPos; + +import java.nio.ByteBuffer; + +public class FlapData extends InstanceData { + + public static VertexFormat FORMAT = VertexFormat.builder() + .addAttributes(FlapVertexAttributes.class) + .build(); + + private float x; + private float y; + private float z; + private byte blockLight; + private byte skyLight; + + private float segmentOffsetX; + private float segmentOffsetY; + private float segmentOffsetZ; + + private float pivotX; + private float pivotY; + private float pivotZ; + + private float horizontalAngle; + private float intensity; + private float flapScale; + + private float flapness; + + public FlapData(InstancedModel owner) { + super(owner); + } + + public FlapData setPosition(BlockPos pos) { + return setPosition(pos.getX(), pos.getY(), pos.getZ()); + } + + public FlapData setPosition(Vector3f pos) { + return setPosition(pos.getX(), pos.getY(), pos.getZ()); + } + + public FlapData setPosition(int x, int y, int z) { + BlockPos origin = owner.renderer.getOriginCoordinate(); + + return setPosition((float) (x - origin.getX()), + (float) (y - origin.getY()), + (float) (z - origin.getZ())); + } + + public FlapData setPosition(float x, float y, float z) { + this.x = x; + this.y = y; + this.z = z; + return this; + } + + public FlapData setBlockLight(int blockLight) { + this.blockLight = (byte) ((blockLight & 0xF) << 4); + return this; + } + + public FlapData setSkyLight(int skyLight) { + this.skyLight = (byte) ((skyLight & 0xF) << 4); + return this; + } + + public FlapData setSegmentOffset(float x, float y, float z) { + this.segmentOffsetX = x; + this.segmentOffsetY = y; + this.segmentOffsetZ = z; + return this; + } + + public FlapData setIntensity(float intensity) { + this.intensity = intensity; + return this; + } + + public FlapData setHorizontalAngle(float horizontalAngle) { + this.horizontalAngle = horizontalAngle; + return this; + } + + public FlapData setFlapScale(float flapScale) { + this.flapScale = flapScale; + return this; + } + + public FlapData setFlapness(float flapness) { + this.flapness = flapness; + return this; + } + + public FlapData setPivotVoxelSpace(float x, float y, float z) { + pivotX = x / 16f; + pivotY = y / 16f; + pivotZ = z / 16f; + return this; + } + + @Override + public void write(ByteBuffer buf) { + putVec3(buf, x, y, z); + putVec2(buf, blockLight, skyLight); + + putVec3(buf, segmentOffsetX, segmentOffsetY, segmentOffsetZ); + putVec3(buf, pivotX, pivotY, pivotZ); + + put(buf, horizontalAngle); + put(buf, intensity); + put(buf, flapScale); + + put(buf, flapness); + } +} diff --git a/src/main/java/com/simibubi/create/content/logistics/block/FlapInstancedModel.java b/src/main/java/com/simibubi/create/content/logistics/block/FlapInstancedModel.java new file mode 100644 index 000000000..d9502bb4d --- /dev/null +++ b/src/main/java/com/simibubi/create/content/logistics/block/FlapInstancedModel.java @@ -0,0 +1,22 @@ +package com.simibubi.create.content.logistics.block; + +import com.simibubi.create.foundation.render.backend.gl.attrib.VertexFormat; +import com.simibubi.create.foundation.render.backend.instancing.InstancedModel; +import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer; +import net.minecraft.client.renderer.BufferBuilder; + +public class FlapInstancedModel extends InstancedModel { + public FlapInstancedModel(InstancedTileRenderer renderer, BufferBuilder buf) { + super(renderer, buf); + } + + @Override + protected FlapData newInstance() { + return new FlapData(this); + } + + @Override + protected VertexFormat getInstanceFormat() { + return FlapData.FORMAT; + } +} diff --git a/src/main/java/com/simibubi/create/content/logistics/block/FlapVertexAttributes.java b/src/main/java/com/simibubi/create/content/logistics/block/FlapVertexAttributes.java new file mode 100644 index 000000000..d32768a3f --- /dev/null +++ b/src/main/java/com/simibubi/create/content/logistics/block/FlapVertexAttributes.java @@ -0,0 +1,45 @@ +package com.simibubi.create.content.logistics.block; + +import com.simibubi.create.foundation.render.backend.gl.attrib.CommonAttributes; +import com.simibubi.create.foundation.render.backend.gl.attrib.IVertexAttrib; +import com.simibubi.create.foundation.render.backend.gl.attrib.VertexAttribSpec; + +public enum FlapVertexAttributes implements IVertexAttrib { + INSTANCE_POSITION("aInstancePos",CommonAttributes.VEC3), + LIGHT("aLight", CommonAttributes.LIGHT), + SEGMENT_OFFSET("aSegmentOffset", CommonAttributes.VEC3), + PIVOT("aPivot", CommonAttributes.VEC3), + HORIZONTAL_ANGLE("aHorizontalAngle", CommonAttributes.FLOAT), + INTENSITY("aIntensity", CommonAttributes.FLOAT), + FLAP_SCALE("aFlapScale", CommonAttributes.FLOAT), + FLAPNESS("aFlapness", CommonAttributes.FLOAT), + ; + + private final String name; + private final VertexAttribSpec spec; + + FlapVertexAttributes(String name, VertexAttribSpec spec) { + this.name = name; + this.spec = spec; + } + + @Override + public String attribName() { + return name; + } + + @Override + public VertexAttribSpec attribSpec() { + return spec; + } + + @Override + public int getDivisor() { + return 1; + } + + @Override + public int getBufferIndex() { + return 1; + } +} diff --git a/src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BeltTunnelInstance.java b/src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BeltTunnelInstance.java new file mode 100644 index 000000000..5b38ee07f --- /dev/null +++ b/src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BeltTunnelInstance.java @@ -0,0 +1,106 @@ +package com.simibubi.create.content.logistics.block.belts.tunnel; + +import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.content.contraptions.base.KineticRenderMaterials; +import com.simibubi.create.content.logistics.block.FlapData; +import com.simibubi.create.foundation.render.backend.instancing.*; +import com.simibubi.create.foundation.utility.AnimationTickHolder; +import net.minecraft.tileentity.TileEntityType; +import net.minecraft.util.Direction; +import net.minecraft.world.LightType; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.fml.DistExecutor; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.EnumMap; +import java.util.Map; + +public class BeltTunnelInstance extends TileEntityInstance { + public static void register(TileEntityType type) { + DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> + InstancedTileRenderRegistry.instance.register(type, BeltTunnelInstance::new)); + } + + private Map>> tunnelFlaps; + + public BeltTunnelInstance(InstancedTileRenderer modelManager, BeltTunnelTileEntity tile) { + super(modelManager, tile); + } + + @Override + protected void init() { + tunnelFlaps = new EnumMap<>(Direction.class); + + InstancedModel model = modelManager.getMaterial(KineticRenderMaterials.FLAPS) + .getModel(AllBlockPartials.BELT_TUNNEL_FLAP, lastState); + + int blockLight = world.getLightLevel(LightType.BLOCK, pos); + int skyLight = world.getLightLevel(LightType.SKY, pos); + + tile.flaps.forEach((direction, flapValue) -> { + + float flapness = flapValue.get(AnimationTickHolder.getPartialTicks()); + + float horizontalAngle = direction.getOpposite().getHorizontalAngle(); + + float flapScale = direction.getAxis() == Direction.Axis.X ? 1 : -1; + + ArrayList> flaps = new ArrayList<>(4); + + for (int segment = 0; segment <= 3; segment++) { + float intensity = segment == 3 ? 1.5f : segment + 1; + float segmentOffset = -3 / 16f * segment; + + flaps.add(model.setupInstance(flapData -> { + flapData.setPosition(pos) + .setSegmentOffset(segmentOffset, 0, 0) + .setBlockLight(blockLight) + .setSkyLight(skyLight) + .setHorizontalAngle(horizontalAngle) + .setFlapness(flapness) + .setFlapScale(flapScale) + .setPivotVoxelSpace(0, 10, 1) + .setIntensity(intensity); + })); + } + + tunnelFlaps.put(direction, flaps); + }); + } + + @Override + public void tick() { + tunnelFlaps.forEach((direction, keys) -> { + + float flapness = tile.flaps.get(direction).get(AnimationTickHolder.getPartialTicks()); + for (InstanceKey key : keys) { + key.modifyInstance(data -> data.setFlapness(flapness)); + } + }); + } + + @Override + protected void onUpdate() { } + + @Override + public void updateLight() { + int blockLight = world.getLightLevel(LightType.BLOCK, pos); + int skyLight = world.getLightLevel(LightType.SKY, pos); + + for (ArrayList> instanceKeys : tunnelFlaps.values()) { + for (InstanceKey it : instanceKeys) { + it.modifyInstance(data -> data.setBlockLight(blockLight) + .setSkyLight(skyLight)); + } + } + } + + @Override + public void remove() { + tunnelFlaps.values() + .stream() + .flatMap(Collection::stream) + .forEach(InstanceKey::delete); + } +} diff --git a/src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BeltTunnelRenderer.java b/src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BeltTunnelRenderer.java index 8751cf110..b605298bf 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BeltTunnelRenderer.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BeltTunnelRenderer.java @@ -4,6 +4,8 @@ import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.vertex.IVertexBuilder; import com.simibubi.create.AllBlockPartials; import com.simibubi.create.foundation.render.SuperByteBuffer; +import com.simibubi.create.foundation.render.backend.Backend; +import com.simibubi.create.foundation.render.backend.FastRenderDispatcher; import com.simibubi.create.foundation.tileEntity.renderer.SmartTileEntityRenderer; import com.simibubi.create.foundation.utility.AngleHelper; import com.simibubi.create.foundation.utility.Iterate; @@ -28,6 +30,9 @@ public class BeltTunnelRenderer extends SmartTileEntityRenderer flaps; + public Map flaps; public Set sides; protected LazyOptional cap = LazyOptional.empty(); @@ -43,7 +43,7 @@ public class BeltTunnelTileEntity extends SmartTileEntity { public BeltTunnelTileEntity(TileEntityType type) { super(type); - flaps = new HashMap<>(); + flaps = new EnumMap<>(Direction.class); sides = new HashSet<>(); flapsToSend = new LinkedList<>(); } @@ -174,7 +174,9 @@ public class BeltTunnelTileEntity extends SmartTileEntity { @Override public void initialize() { super.initialize(); -// updateTunnelConnections(); + updateTunnelConnections(); + if (world != null && world.isRemote) + DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> CreateClient.kineticRenderer.add(this)); } @Override @@ -212,4 +214,8 @@ public class BeltTunnelTileEntity extends SmartTileEntity { return this.cap.cast(); } + @Override + public void onChunkLightUpdate() { + CreateClient.kineticRenderer.onLightUpdate(this); + } } diff --git a/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelInstance.java b/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelInstance.java new file mode 100644 index 000000000..21d838502 --- /dev/null +++ b/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelInstance.java @@ -0,0 +1,93 @@ +package com.simibubi.create.content.logistics.block.funnel; + +import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.content.contraptions.base.KineticRenderMaterials; +import com.simibubi.create.content.logistics.block.FlapData; +import com.simibubi.create.foundation.render.backend.instancing.*; +import com.simibubi.create.foundation.utility.AnimationTickHolder; +import net.minecraft.tileentity.TileEntityType; +import net.minecraft.util.Direction; +import net.minecraft.world.LightType; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.fml.DistExecutor; + +import java.util.ArrayList; + +public class FunnelInstance extends TileEntityInstance { + public static void register(TileEntityType type) { + DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> + InstancedTileRenderRegistry.instance.register(type, FunnelInstance::new)); + } + + private ArrayList> flaps; + + public FunnelInstance(InstancedTileRenderer modelManager, FunnelTileEntity tile) { + super(modelManager, tile); + } + + @Override + protected void init() { + flaps = new ArrayList<>(4); + + if (!tile.hasFlap()) return; + + AllBlockPartials flapPartial = (lastState.getBlock() instanceof FunnelBlock ? AllBlockPartials.FUNNEL_FLAP + : AllBlockPartials.BELT_FUNNEL_FLAP); + InstancedModel model = modelManager.getMaterial(KineticRenderMaterials.FLAPS) + .getModel(flapPartial, lastState); + + int blockLight = world.getLightLevel(LightType.BLOCK, pos); + int skyLight = world.getLightLevel(LightType.SKY, pos); + + Direction direction = FunnelBlock.getFunnelFacing(lastState); + + float flapness = tile.flap.get(AnimationTickHolder.getPartialTicks()); + float horizontalAngle = direction.getOpposite().getHorizontalAngle(); + + for (int segment = 0; segment <= 3; segment++) { + float intensity = segment == 3 ? 1.5f : segment + 1; + float segmentOffset = -3 / 16f * segment; + + flaps.add(model.setupInstance(flapData -> flapData.setPosition(pos) + .setSegmentOffset(segmentOffset, 0, -tile.getFlapOffset()) + .setBlockLight(blockLight) + .setSkyLight(skyLight) + .setHorizontalAngle(horizontalAngle) + .setFlapness(flapness) + .setFlapScale(-1) + .setPivotVoxelSpace(0, 10, 9.5f) + .setIntensity(intensity))); + } + } + + @Override + public void tick() { + if (flaps == null) return; + + float flapness = tile.flap.get(AnimationTickHolder.getPartialTicks()); + + for (InstanceKey key : flaps) { + key.modifyInstance(data -> data.setFlapness(flapness)); + } + } + + @Override + public void updateLight() { + if (flaps == null) return; + + int blockLight = world.getLightLevel(LightType.BLOCK, pos); + int skyLight = world.getLightLevel(LightType.SKY, pos); + + for (InstanceKey it : flaps) { + it.modifyInstance(data -> data.setBlockLight(blockLight) + .setSkyLight(skyLight)); + } + } + + @Override + public void remove() { + if (flaps == null) return; + + flaps.forEach(InstanceKey::delete); + } +} diff --git a/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelRenderer.java b/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelRenderer.java index c8cb12583..0f2ea623a 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelRenderer.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelRenderer.java @@ -4,6 +4,7 @@ import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.vertex.IVertexBuilder; import com.simibubi.create.AllBlockPartials; import com.simibubi.create.foundation.render.SuperByteBuffer; +import com.simibubi.create.foundation.render.backend.FastRenderDispatcher; import com.simibubi.create.foundation.tileEntity.renderer.SmartTileEntityRenderer; import com.simibubi.create.foundation.utility.AngleHelper; import com.simibubi.create.foundation.utility.MatrixStacker; @@ -27,7 +28,7 @@ public class FunnelRenderer extends SmartTileEntityRenderer { int light, int overlay) { super.renderSafe(te, partialTicks, ms, buffer, light, overlay); - if (!te.hasFlap()) + if (!te.hasFlap() || FastRenderDispatcher.available(te.getWorld())) return; BlockState blockState = te.getBlockState(); diff --git a/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelTileEntity.java b/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelTileEntity.java index a25b196cb..c2d8f3893 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelTileEntity.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelTileEntity.java @@ -4,6 +4,7 @@ import java.lang.ref.WeakReference; import java.util.List; import com.simibubi.create.AllBlocks; +import com.simibubi.create.CreateClient; import com.simibubi.create.content.contraptions.components.saw.SawTileEntity; import com.simibubi.create.content.contraptions.goggles.IHaveHoveringInformation; import com.simibubi.create.content.contraptions.relays.belt.BeltHelper; @@ -14,6 +15,7 @@ import com.simibubi.create.content.logistics.block.funnel.BeltFunnelBlock.Shape; import com.simibubi.create.foundation.config.AllConfigs; import com.simibubi.create.foundation.gui.widgets.InterpolatedChasingValue; import com.simibubi.create.foundation.item.TooltipHelper; +import com.simibubi.create.foundation.render.backend.instancing.IInstanceRendered; import com.simibubi.create.foundation.tileEntity.SmartTileEntity; import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour; import com.simibubi.create.foundation.tileEntity.behaviour.belt.DirectBeltInputBehaviour; @@ -33,11 +35,13 @@ import net.minecraft.util.Direction; import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Vec3d; +import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.common.util.LazyOptional; +import net.minecraftforge.fml.DistExecutor; import net.minecraftforge.items.CapabilityItemHandler; import net.minecraftforge.items.IItemHandler; -public class FunnelTileEntity extends SmartTileEntity implements IHaveHoveringInformation { +public class FunnelTileEntity extends SmartTileEntity implements IHaveHoveringInformation, IInstanceRendered { private FilteringBehaviour filtering; private InvManipulationBehaviour invManipulation; @@ -381,4 +385,15 @@ public class FunnelTileEntity extends SmartTileEntity implements IHaveHoveringIn return true; } + @Override + public void initialize() { + super.initialize(); + if (world != null && world.isRemote) + DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> CreateClient.kineticRenderer.add(this)); + } + + @Override + public void onChunkLightUpdate() { + CreateClient.kineticRenderer.onLightUpdate(this); + } } diff --git a/src/main/java/com/simibubi/create/foundation/mixin/RenderHooksMixin.java b/src/main/java/com/simibubi/create/foundation/mixin/RenderHooksMixin.java index eb02006e8..d44d476b0 100644 --- a/src/main/java/com/simibubi/create/foundation/mixin/RenderHooksMixin.java +++ b/src/main/java/com/simibubi/create/foundation/mixin/RenderHooksMixin.java @@ -1,11 +1,7 @@ package com.simibubi.create.foundation.mixin; -import com.simibubi.create.foundation.render.backend.light.ILightListener; -import net.minecraft.client.Minecraft; -import net.minecraft.client.multiplayer.ClientChunkProvider; -import net.minecraft.util.math.SectionPos; -import net.minecraft.world.ILightReader; -import net.minecraft.world.chunk.Chunk; +import net.minecraft.client.renderer.*; +import net.minecraft.util.math.Vec3d; import org.lwjgl.opengl.GL20; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; @@ -20,15 +16,10 @@ import com.simibubi.create.foundation.render.backend.Backend; import com.simibubi.create.foundation.render.backend.FastRenderDispatcher; import com.simibubi.create.foundation.render.backend.OptifineHandler; -import net.minecraft.client.renderer.Matrix4f; -import net.minecraft.client.renderer.RenderType; -import net.minecraft.client.renderer.WorldRenderer; import net.minecraft.client.world.ClientWorld; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; -import java.util.Map; - @OnlyIn(Dist.CLIENT) @Mixin(WorldRenderer.class) public class RenderHooksMixin { @@ -40,7 +31,7 @@ public class RenderHooksMixin { * layer-correct custom rendering. RenderWorldLast is not refined enough for rendering world objects. * This should probably be a forge event. */ - @Inject(at = @At(value = "TAIL"), method = "renderLayer") + @Inject(at = @At("TAIL"), method = "renderLayer") private void renderLayer(RenderType type, MatrixStack stack, double camX, double camY, double camZ, CallbackInfo ci) { if (!Backend.available()) return; @@ -54,7 +45,18 @@ public class RenderHooksMixin { GL20.glUseProgram(0); } - @Inject(at = @At(value = "TAIL"), method = "loadRenderers") + @Inject(at = @At(value = "INVOKE", target = "updateChunks(J)V"), method = "render") + private void setupFrame(MatrixStack p_228426_1_, float p_228426_2_, long p_228426_3_, boolean p_228426_5_, ActiveRenderInfo info, GameRenderer p_228426_7_, LightTexture p_228426_8_, Matrix4f p_228426_9_, CallbackInfo ci) { + Vec3d cameraPos = info.getProjectedView(); + double camX = cameraPos.getX(); + double camY = cameraPos.getY(); + double camZ = cameraPos.getZ(); + + CreateClient.kineticRenderer.beginFrame(camX, camY, camZ); + ContraptionRenderDispatcher.beginFrame(camX, camY, camZ); + } + + @Inject(at = @At("TAIL"), method = "loadRenderers") private void refresh(CallbackInfo ci) { CreateClient.kineticRenderer.invalidate(); ContraptionRenderDispatcher.invalidateAll(); diff --git a/src/main/java/com/simibubi/create/foundation/render/AllProgramSpecs.java b/src/main/java/com/simibubi/create/foundation/render/AllProgramSpecs.java index b5d5e991a..d943724d0 100644 --- a/src/main/java/com/simibubi/create/foundation/render/AllProgramSpecs.java +++ b/src/main/java/com/simibubi/create/foundation/render/AllProgramSpecs.java @@ -9,6 +9,7 @@ import com.simibubi.create.content.contraptions.components.actors.ActorVertexAtt import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionProgram; import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionVertexAttributes; import com.simibubi.create.content.contraptions.relays.belt.BeltVertexAttributes; +import com.simibubi.create.content.logistics.block.FlapVertexAttributes; import com.simibubi.create.foundation.render.backend.gl.BasicProgram; import com.simibubi.create.foundation.render.backend.gl.attrib.ModelVertexAttributes; import com.simibubi.create.foundation.render.backend.gl.shader.ProgramSpec; @@ -33,6 +34,13 @@ public class AllProgramSpecs { .setFrag(Locations.INSTANCED) .createProgramSpec()); + public static final ProgramSpec FLAPS = register(ProgramSpec.builder("flap", BasicProgram::new) + .addAttributes(ModelVertexAttributes.class) + .addAttributes(FlapVertexAttributes.class) + .setVert(Locations.FLAP) + .setFrag(Locations.INSTANCED) + .createProgramSpec()); + public static final ProgramSpec CONTRAPTION_STRUCTURE = register(ProgramSpec.builder("contraption_structure", ContraptionProgram::new) .addAttributes(ContraptionVertexAttributes.class) .setVert(Locations.CONTRAPTION_STRUCTURE) @@ -57,6 +65,14 @@ public class AllProgramSpecs { .setDefines(ShaderConstants.define("CONTRAPTION")) .createProgramSpec()); + public static final ProgramSpec CONTRAPTION_FLAPS = register(ProgramSpec.builder("contraption_flap", ContraptionProgram::new) + .addAttributes(ModelVertexAttributes.class) + .addAttributes(FlapVertexAttributes.class) + .setVert(Locations.FLAP) + .setFrag(Locations.CONTRAPTION) + .setDefines(ShaderConstants.define("CONTRAPTION")) + .createProgramSpec()); + public static final ProgramSpec CONTRAPTION_ACTOR = register(ProgramSpec.builder("contraption_actor", ContraptionProgram::new) .addAttributes(ModelVertexAttributes.class) .addAttributes(ActorVertexAttributes.class) @@ -64,12 +80,14 @@ public class AllProgramSpecs { .setFrag(Locations.CONTRAPTION) .createProgramSpec()); + public static class Locations { public static final ResourceLocation INSTANCED = loc("instanced.frag"); public static final ResourceLocation CONTRAPTION = loc("contraption.frag"); public static final ResourceLocation ROTATING = loc("rotating.vert"); public static final ResourceLocation BELT = loc("belt.vert"); + public static final ResourceLocation FLAP = loc("flap.vert"); public static final ResourceLocation CONTRAPTION_STRUCTURE = loc("contraption_structure.vert"); public static final ResourceLocation CONTRAPTION_ACTOR = loc("contraption_actor.vert"); diff --git a/src/main/java/com/simibubi/create/foundation/render/KineticRenderer.java b/src/main/java/com/simibubi/create/foundation/render/KineticRenderer.java index 8517b7d03..68cb7367e 100644 --- a/src/main/java/com/simibubi/create/foundation/render/KineticRenderer.java +++ b/src/main/java/com/simibubi/create/foundation/render/KineticRenderer.java @@ -5,6 +5,7 @@ import java.util.ArrayList; import com.simibubi.create.content.contraptions.base.KineticRenderMaterials; import com.simibubi.create.content.contraptions.base.RotatingInstancedModel; import com.simibubi.create.content.contraptions.relays.belt.BeltInstancedModel; +import com.simibubi.create.content.logistics.block.FlapInstancedModel; import com.simibubi.create.foundation.render.backend.gl.BasicProgram; import com.simibubi.create.foundation.render.backend.gl.shader.ShaderCallback; import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer; @@ -26,6 +27,7 @@ public class KineticRenderer extends InstancedTileRenderer { public void registerMaterials() { materials.put(KineticRenderMaterials.BELTS, new RenderMaterial<>(this, AllProgramSpecs.BELT, BeltInstancedModel::new)); materials.put(KineticRenderMaterials.ROTATING, new RenderMaterial<>(this, AllProgramSpecs.ROTATING, RotatingInstancedModel::new)); + materials.put(KineticRenderMaterials.FLAPS, new RenderMaterial<>(this, AllProgramSpecs.FLAPS, FlapInstancedModel::new)); } @Override diff --git a/src/main/java/com/simibubi/create/foundation/render/backend/instancing/InstancedTileRenderer.java b/src/main/java/com/simibubi/create/foundation/render/backend/instancing/InstancedTileRenderer.java index 524d36a91..2f7c37288 100644 --- a/src/main/java/com/simibubi/create/foundation/render/backend/instancing/InstancedTileRenderer.java +++ b/src/main/java/com/simibubi/create/foundation/render/backend/instancing/InstancedTileRenderer.java @@ -40,6 +40,10 @@ public abstract class InstancedTileRenderer

{ } } + public void beginFrame(double cameraX, double cameraY, double cameraZ) { + instances.values().forEach(TileEntityInstance::tick); + } + public void render(RenderType layer, Matrix4f viewProjection, double camX, double camY, double camZ) { render(layer, viewProjection, camX, camY, camZ, null); } diff --git a/src/main/java/com/simibubi/create/foundation/render/backend/instancing/TileEntityInstance.java b/src/main/java/com/simibubi/create/foundation/render/backend/instancing/TileEntityInstance.java index ed4b1f162..fd77e7fd3 100644 --- a/src/main/java/com/simibubi/create/foundation/render/backend/instancing/TileEntityInstance.java +++ b/src/main/java/com/simibubi/create/foundation/render/backend/instancing/TileEntityInstance.java @@ -33,6 +33,11 @@ public abstract class TileEntityInstance { } } + /** + * Called every frame, this can be used to make more dynamic animations. + */ + public void tick() { } + /** * Acquire all {@link InstanceKey}s and initialize any data you may need to calculate the instance properties. */ @@ -42,7 +47,7 @@ public abstract class TileEntityInstance { * Update changed instance data using the {@link InstanceKey}s you got in {@link #init()}. * You don't have to update light data. That should be done in {@link #updateLight()} */ - protected abstract void onUpdate(); + protected void onUpdate() { } /** * Called when a light update occurs in the world. If your model needs it, update light here. diff --git a/src/main/resources/assets/create/shader/flap.vert b/src/main/resources/assets/create/shader/flap.vert new file mode 100644 index 000000000..bd982595d --- /dev/null +++ b/src/main/resources/assets/create/shader/flap.vert @@ -0,0 +1,104 @@ +#version 110 +#define PI 3.1415926538 + +attribute vec3 aPos; +attribute vec3 aNormal; +attribute vec2 aTexCoords; + +attribute vec3 aInstancePos; +attribute vec2 aLight; + +attribute vec3 aSegmentOffset; +attribute vec3 aPivot; +attribute float aHorizontalAngle; +attribute float aIntensity; +attribute float aFlapScale; + +attribute float aFlapness; + +// outputs +varying vec2 TexCoords; +varying vec4 Color; +varying float Diffuse; +varying vec2 Light; + +#if defined(CONTRAPTION) +varying vec3 BoxCoord; + +uniform vec3 uLightBoxSize; +uniform vec3 uLightBoxMin; +uniform mat4 uModel; +#endif + +uniform float uTime; +uniform mat4 uViewProjection; +uniform int uDebug; + +uniform vec3 uCameraPos; +varying float FragDistance; + +float diffuse(vec3 normal) { + float x = normal.x; + float y = normal.y; + float z = normal.z; + return min(x * x * .6 + y * y * ((3. + y) / 4.) + z * z * .8, 1.); +} + +mat4 rotate(vec3 axis, float angle) { + float s = sin(angle); + float c = cos(angle); + float oc = 1. - c; + + return mat4(oc * axis.x * axis.x + c, oc * axis.x * axis.y - axis.z * s, oc * axis.z * axis.x + axis.y * s, 0., + oc * axis.x * axis.y + axis.z * s, oc * axis.y * axis.y + c, oc * axis.y * axis.z - axis.x * s, 0., + oc * axis.z * axis.x - axis.y * s, oc * axis.y * axis.z + axis.x * s, oc * axis.z * axis.z + c, 0., + 0., 0., 0., 1.); +} + +float toRad(float degrees) { + return fract(degrees / 360.) * PI * 2.; +} + +float getFlapAngle() { + float absFlap = abs(aFlapness); + + float angle = sin((1. - absFlap) * PI * aIntensity) * 30. * aFlapness * aFlapScale; + + float halfAngle = angle * 0.5; + + float which = step(0., aFlapness); + float degrees = which * halfAngle + (1. - which) * angle; // branchless conditional multiply + + return -toRad(degrees); +} + +void main() { + float flapAngle = getFlapAngle(); + + mat4 orientation = rotate(vec3(0., 1., 0.), toRad(aHorizontalAngle)); + mat4 flapRotation = rotate(vec3(1., 0., 0.), flapAngle); + + vec4 worldPos = flapRotation * vec4(aPos - aPivot, 1.) + vec4(aPivot + aSegmentOffset, 0.); + worldPos = orientation * vec4(worldPos.xyz - .5, 1.) + vec4(aInstancePos + .5, 0.); + + #ifdef CONTRAPTION + worldPos = uModel * worldPos; + mat4 normalMat = uModel * orientation * flapRotation; + + BoxCoord = (worldPos.xyz - uLightBoxMin) / uLightBoxSize; + FragDistance = length(worldPos.xyz); + #else + mat4 normalMat = orientation * flapRotation; + + FragDistance = length(worldPos.xyz - uCameraPos); + #endif + + vec3 norm = normalize(normalMat * vec4(aNormal, 0.)).xyz; + + Diffuse = diffuse(norm); + TexCoords = aTexCoords; + Light = aLight; + gl_Position = uViewProjection * worldPos; + + Color = vec4(1.); +} From e87849decacbd2ba5cca6674d9fd459dd15a159a Mon Sep 17 00:00:00 2001 From: simibubi <31564874+simibubi@users.noreply.github.com> Date: Wed, 3 Mar 2021 02:30:21 +0100 Subject: [PATCH 21/24] Vector's food expansion - Added honeyed apples - Added sweet rolls - Added chocolate glazed berries - New goggles item model - Other texture tweaks --- src/generated/resources/.cache/cache | 39 +++-- .../assets/create/blockstates/fluid_pipe.json | 154 +++++++++--------- .../create/blockstates/radial_chassis.json | 96 +++++------ .../resources/assets/create/lang/en_ud.json | 3 + .../resources/assets/create/lang/en_us.json | 3 + .../assets/create/lang/unfinished/de_de.json | 5 +- .../assets/create/lang/unfinished/es_es.json | 5 +- .../assets/create/lang/unfinished/es_mx.json | 5 +- .../assets/create/lang/unfinished/fr_fr.json | 5 +- .../assets/create/lang/unfinished/it_it.json | 5 +- .../assets/create/lang/unfinished/ja_jp.json | 5 +- .../assets/create/lang/unfinished/ko_kr.json | 5 +- .../assets/create/lang/unfinished/nl_nl.json | 5 +- .../assets/create/lang/unfinished/pt_br.json | 5 +- .../assets/create/lang/unfinished/ru_ru.json | 5 +- .../assets/create/lang/unfinished/zh_cn.json | 5 +- .../assets/create/lang/unfinished/zh_tw.json | 5 +- .../models/item/chocolate_glazed_berries.json | 6 + .../assets/create/models/item/goggles.json | 6 + .../create/models/item/honeyed_apple.json | 6 + .../assets/create/models/item/sweet_roll.json | 6 + .../filling/chocolate_glazed_berries.json | 18 ++ .../create/recipes/filling/honeyed_apple.json | 17 ++ .../create/recipes/filling/sweet_roll.json | 17 ++ .../com/simibubi/create/AllBlockPartials.java | 2 + .../java/com/simibubi/create/AllItems.java | 21 ++- .../contraptions/goggles/GogglesModel.java | 24 +++ .../data/recipe/FillingRecipeGen.java | 12 ++ .../models/{item => block}/goggles.json | 25 +-- .../create/textures/item/builders_tea.png | Bin 280 -> 388 bytes .../item/chocolate_glazed_berries.png | Bin 0 -> 427 bytes .../create/textures/item/cinder_flour.png | Bin 389 -> 391 bytes .../assets/create/textures/item/goggles.png | Bin 361 -> 352 bytes .../create/textures/item/goggles_model.png | Bin 0 -> 361 bytes .../create/textures/item/honeyed_apple.png | Bin 0 -> 526 bytes .../create/textures/item/sweet_roll.png | Bin 0 -> 417 bytes 36 files changed, 349 insertions(+), 166 deletions(-) create mode 100644 src/generated/resources/assets/create/models/item/chocolate_glazed_berries.json create mode 100644 src/generated/resources/assets/create/models/item/goggles.json create mode 100644 src/generated/resources/assets/create/models/item/honeyed_apple.json create mode 100644 src/generated/resources/assets/create/models/item/sweet_roll.json create mode 100644 src/generated/resources/data/create/recipes/filling/chocolate_glazed_berries.json create mode 100644 src/generated/resources/data/create/recipes/filling/honeyed_apple.json create mode 100644 src/generated/resources/data/create/recipes/filling/sweet_roll.json create mode 100644 src/main/java/com/simibubi/create/content/contraptions/goggles/GogglesModel.java rename src/main/resources/assets/create/models/{item => block}/goggles.json (86%) create mode 100644 src/main/resources/assets/create/textures/item/chocolate_glazed_berries.png create mode 100644 src/main/resources/assets/create/textures/item/goggles_model.png create mode 100644 src/main/resources/assets/create/textures/item/honeyed_apple.png create mode 100644 src/main/resources/assets/create/textures/item/sweet_roll.png diff --git a/src/generated/resources/.cache/cache b/src/generated/resources/.cache/cache index f0ea2779e..c4027857d 100644 --- a/src/generated/resources/.cache/cache +++ b/src/generated/resources/.cache/cache @@ -140,7 +140,7 @@ de8a40b7daf1497d5aecee47a43b3e0b1d030b00 assets/create/blockstates/fancy_scoria_ fc9ac0a7e7191b93516719455a17177fa6524ecc assets/create/blockstates/fancy_weathered_limestone_bricks_slab.json b2a7c321b1795f20e7433f81a55ce4683de081b8 assets/create/blockstates/fancy_weathered_limestone_bricks_stairs.json 6372fe02ba0065acb0758121c45a15a1a8fdc5de assets/create/blockstates/fancy_weathered_limestone_bricks_wall.json -3d97226b5e8d8f70ed08e45e78db1faf78d5e28b assets/create/blockstates/fluid_pipe.json +48086bf71a824faf14841b698050cc8544b09a9b assets/create/blockstates/fluid_pipe.json f0eaab18e16c4f3f65ebf3b55b08f0dc445720fe assets/create/blockstates/fluid_tank.json 5408d92ab02af86539ac42971d4033545970bb3a assets/create/blockstates/fluid_valve.json e9da1794b6ece7f9aa8bcb43d42c23a55446133b assets/create/blockstates/flywheel.json @@ -337,7 +337,7 @@ e8b0a401c10d1ba67ed71ba31bd5f9bc28571b65 assets/create/blockstates/powered_toggl d06cd9a1101b18d306a786320aab12018b1325d6 assets/create/blockstates/purple_sail.json 92957119abd5fbcca36a113b2a80255fd70fc303 assets/create/blockstates/purple_seat.json 61035f8afe75ff7bbd291da5d8690bcbebe679eb assets/create/blockstates/purple_valve_handle.json -8d7e653bfd9846e684a0d3725595714a19201017 assets/create/blockstates/radial_chassis.json +4439fc83a8c7370ab44b211a3fd48abde20a4728 assets/create/blockstates/radial_chassis.json 45877c4d90a7185c2f304edbd67379d800920439 assets/create/blockstates/red_sail.json da1b08387af7afa0855ee8d040f620c01f20660a assets/create/blockstates/red_seat.json 722fc77bbf387af8a4016e42cbf9501d2b968881 assets/create/blockstates/red_valve_handle.json @@ -400,20 +400,20 @@ a3a11524cd3515fc01d905767b4b7ea782adaf03 assets/create/blockstates/yellow_seat.j 6801fa1f466f172700e573e5b8ee8ee5f9ca4583 assets/create/blockstates/yellow_valve_handle.json 7f39521b211441f5c3e06d60c5978cebe16cacfb assets/create/blockstates/zinc_block.json b7181bcd8182b2f17088e5aa881f374c9c65470c assets/create/blockstates/zinc_ore.json -e3f618c5b622d21880de858678d1802cbf65e615 assets/create/lang/en_ud.json -c562d23527d2f3ac9fa0be10c7fa1bc58f632abc assets/create/lang/en_us.json -8766f1728b3ba4542104e8f87c8b9d1f1741fdeb assets/create/lang/unfinished/de_de.json -3e1f0a8effb4b8541849d5b51576a7531219e914 assets/create/lang/unfinished/es_es.json -cee3455d04453c86d0709ccdc9d347f430edb08e assets/create/lang/unfinished/es_mx.json -1e9d2907c968ab5afb55d72fb934a7d7ed3407b5 assets/create/lang/unfinished/fr_fr.json -eefeacfbd97714d845b78f75cb003d2fb1e3c260 assets/create/lang/unfinished/it_it.json -677008605916984e2063dc6f5d8f7528f2b0b44a assets/create/lang/unfinished/ja_jp.json -397b88e9ad3500d78c08b27f6f11df8b094571fa assets/create/lang/unfinished/ko_kr.json -767605e14edabd5df33a2ef1afbdb84ddd804418 assets/create/lang/unfinished/nl_nl.json -8f0dcab1ffe40d31a1f5823e619648fb01127507 assets/create/lang/unfinished/pt_br.json -c4836701cc764a49529b923c8ab390f1b292e7c2 assets/create/lang/unfinished/ru_ru.json -a179807fb6a649bc9ce4214bbf5192931117bb3c assets/create/lang/unfinished/zh_cn.json -be64b2635e5599b43b4615e333a26d09cfa3baec assets/create/lang/unfinished/zh_tw.json +00e2b77dcc86224cd5a33aefaac01f20c90bcb40 assets/create/lang/en_ud.json +55638abca6ffa48e1059f2578ea6d76b8327f496 assets/create/lang/en_us.json +374dd193cb26eb590a4a66bf5c8e13f9743ddbdb assets/create/lang/unfinished/de_de.json +84b205e2a8c9539ab6da68aa8f7c91f1dbec0702 assets/create/lang/unfinished/es_es.json +3397c2fed7517a4c9b3b41ee081abb120ddf9b3b assets/create/lang/unfinished/es_mx.json +e61eb3ca3d279c438275fb50333b135560574e62 assets/create/lang/unfinished/fr_fr.json +eaa202ec1821372b5f26d724e7c58d710fda7f5b assets/create/lang/unfinished/it_it.json +d1627e59cf6cf5ac2382397a7db416e75072ac31 assets/create/lang/unfinished/ja_jp.json +39f4258b8d9d56c5d7e5761065081d69ab07d4d8 assets/create/lang/unfinished/ko_kr.json +402c16cffdd530dfde3e016691720145cc66c7a1 assets/create/lang/unfinished/nl_nl.json +73f22223f6d30068ac2bc3f9be02e43f7fe4cae0 assets/create/lang/unfinished/pt_br.json +015a444814ec9982c35d08a3705df3861ce2545e assets/create/lang/unfinished/ru_ru.json +38ed221082ce3ce7b4f6c93ec28b7e89a95cab06 assets/create/lang/unfinished/zh_cn.json +e51b6bd8cd9696858a417d3d9472a263e9268dd8 assets/create/lang/unfinished/zh_tw.json 846200eb548d3bfa2e77b41039de159b4b6cfb45 assets/create/models/block/acacia_window.json 1930fa3a3c98d53dd19e4ee7f55bc27fd47aa281 assets/create/models/block/acacia_window_pane_noside.json 1763ea2c9b981d187f5031ba608f3d5d3be3986a assets/create/models/block/acacia_window_pane_noside_alt.json @@ -1192,6 +1192,7 @@ afd697168c9786eb80e54eccdc6a23afa6c7fb0e assets/create/models/item/chiseled_gabb a47fbe5f2da79080d99ef0975bfa8da4d08f8be4 assets/create/models/item/chiseled_scoria.json 70232ce9b88119fb383717e2c1ad113f7aad6a99 assets/create/models/item/chiseled_weathered_limestone.json eabf1870127d78c920305228eb51ddf36c44d016 assets/create/models/item/chocolate_bucket.json +473c8fcc3c53a7680b2f1c6505517c79fd07153a assets/create/models/item/chocolate_glazed_berries.json fe67c3f380d17735a9436a4579a8be1a02b8e4a0 assets/create/models/item/chute.json d418205c83d3e57c830755ee8c09e2962353e493 assets/create/models/item/cinder_flour.json c1da21be9f1af4f7a2ef4ec9cd92195d65ada316 assets/create/models/item/clockwork_bearing.json @@ -1329,6 +1330,7 @@ b10f1b188f2bf380628377bd42af2b8f8ffe5611 assets/create/models/item/gantry_pinion b4bfd5041b62f3a0a955fa4872d178b590614f22 assets/create/models/item/gantry_shaft.json 6ab0d17f3d02678ed992e188ff09f6b2c00b5b03 assets/create/models/item/gearbox.json 2fe29893d74c176ea35aed73a169c13dd4ddb2a8 assets/create/models/item/gearshift.json +21c3dc6a734be582c149b9d1d7da209e178ed58a assets/create/models/item/goggles.json 52108a61865dab38133b9f916496ca680ae364ea assets/create/models/item/golden_sheet.json 46d813bcb6676078347383295bb7dbda1d9dd060 assets/create/models/item/granite_bricks.json 032a31c66d3de63595d478165d54b4f562e9831d assets/create/models/item/granite_bricks_slab.json @@ -1347,6 +1349,7 @@ ecb9f32f62d3fa43fb226ab85adc2eb229fdfb77 assets/create/models/item/green_valve_h cfab82a2cf7495d21778c1de9730a26afbdd523d assets/create/models/item/handheld_blockzapper.json dee43bf1a9c211a752fac2c07aeba123f7f0c914 assets/create/models/item/handheld_worldshaper.json 967695ab65edb8cb19e9759425f2d12d75406122 assets/create/models/item/honey_bucket.json +31809415a3119aeda37cff6f16d2cf47f71e097f assets/create/models/item/honeyed_apple.json e7ec65ad5be13cae5f7d60836b8df9e4a5baad56 assets/create/models/item/horizontal_framed_glass.json f0e3b2b8a553b6e61746c922c27302dabfff71b6 assets/create/models/item/horizontal_framed_glass_pane.json ff92f6a9dfb73a6ee1eaaed3279c89390ff04a80 assets/create/models/item/hose_pulley.json @@ -1545,6 +1548,7 @@ b305e81f1dc5272634745b6e822af40955a2ef28 assets/create/models/item/spruce_window bbb5773adc23128c70174bfc531af936e6e063e3 assets/create/models/item/stockpile_switch.json bab8f78c319b2a79ed55c5d2a94b521ddaa44996 assets/create/models/item/stressometer.json 29d571a061e3addf92ee51bfc55d96edc3a517a5 assets/create/models/item/super_glue.json +9be61d209d2219ca00d35de7cd57c2c87b297379 assets/create/models/item/sweet_roll.json b1d3d00ff05908feacad06a86800da96cc9bc65d assets/create/models/item/tiled_glass.json 8a2a81a8cbc52b6021e57107d79a32f73b82d8fe assets/create/models/item/tiled_glass_pane.json c081317f106a2b04700aafde12c57445844c20ab assets/create/models/item/tree_fertilizer.json @@ -3113,12 +3117,15 @@ d2ab9ce73636773165564506580f2ec13bd1fc50 data/create/recipes/fancy_weathered_lim 1d0e41ca98e48073c72adf4077610c96e592f9a5 data/create/recipes/fancy_weathered_limestone_bricks_wall_from_fancy_weathered_limestone_bricks_stonecutting.json 133e79f78a7f2c2f63ac7695d2be57d56e8955f4 data/create/recipes/filling/blaze_cake.json 642e96ce5dd2f31e7a33c6ef4060eecb0bf2aa86 data/create/recipes/filling/builders_tea.json +1367357fc36adc4b67467d90589ef91e657380a4 data/create/recipes/filling/chocolate_glazed_berries.json 5bec6c2068a3c1005810d18bd45ce916389b5423 data/create/recipes/filling/glowstone.json 5eb6227ccb6fa940b662d3ec029c3bd61fe61c8d data/create/recipes/filling/grass_block.json 244f27eadefefbc966ac384ac087c57d19484321 data/create/recipes/filling/gunpowder.json c8ca74a6cd071308a1750a2ad1153e79422598a0 data/create/recipes/filling/honey_bottle.json +d20703b67dd5e4c9b75718db02d575b1c7415c12 data/create/recipes/filling/honeyed_apple.json c83e77a9799b6ca34dd73aa76b56159f2103c48c data/create/recipes/filling/milk_bucket.json 08ce1420d1551ecfef5988977436c087123851a6 data/create/recipes/filling/redstone.json +fb8e4378cd2240644a4b5c0d06e27ad772ec7695 data/create/recipes/filling/sweet_roll.json 5b8bbde7f8b270ab75fac18d6858f2fadbc0efa3 data/create/recipes/framed_glass_from_glass_colorless_stonecutting.json d697de0c9b706ca4e18da7a2d769e7e5fe8d769d data/create/recipes/framed_glass_pane.json a0dae50faaa1b7142bb4309675e3084c68daa547 data/create/recipes/gabbro_bricks_from_gabbro_stonecutting.json diff --git a/src/generated/resources/assets/create/blockstates/fluid_pipe.json b/src/generated/resources/assets/create/blockstates/fluid_pipe.json index a4cffcde7..80a25280c 100644 --- a/src/generated/resources/assets/create/blockstates/fluid_pipe.json +++ b/src/generated/resources/assets/create/blockstates/fluid_pipe.json @@ -61,9 +61,9 @@ { "when": { "down": "false", - "north": "true", "up": "true", - "south": "false" + "south": "false", + "north": "true" }, "apply": { "model": "create:block/fluid_pipe/lu_x" @@ -72,9 +72,9 @@ { "when": { "down": "false", - "north": "false", "up": "true", - "south": "true" + "south": "true", + "north": "false" }, "apply": { "model": "create:block/fluid_pipe/ru_x" @@ -83,9 +83,9 @@ { "when": { "down": "true", - "north": "true", "up": "false", - "south": "false" + "south": "false", + "north": "true" }, "apply": { "model": "create:block/fluid_pipe/ld_x" @@ -94,9 +94,9 @@ { "when": { "down": "true", - "north": "false", "up": "false", - "south": "true" + "south": "true", + "north": "false" }, "apply": { "model": "create:block/fluid_pipe/rd_x" @@ -105,9 +105,9 @@ { "when": { "down": "true", - "north": "false", "up": "true", - "south": "false" + "south": "false", + "north": "false" }, "apply": { "model": "create:block/fluid_pipe/ud_x" @@ -116,9 +116,9 @@ { "when": { "down": "false", - "north": "false", "up": "true", - "south": "false" + "south": "false", + "north": "false" }, "apply": { "model": "create:block/fluid_pipe/ud_x" @@ -127,9 +127,9 @@ { "when": { "down": "true", - "north": "false", "up": "false", - "south": "false" + "south": "false", + "north": "false" }, "apply": { "model": "create:block/fluid_pipe/ud_x" @@ -138,9 +138,9 @@ { "when": { "down": "false", - "north": "true", "up": "false", - "south": "true" + "south": "true", + "north": "true" }, "apply": { "model": "create:block/fluid_pipe/lr_x" @@ -149,9 +149,9 @@ { "when": { "down": "false", - "north": "true", "up": "false", - "south": "false" + "south": "false", + "north": "true" }, "apply": { "model": "create:block/fluid_pipe/lr_x" @@ -160,9 +160,9 @@ { "when": { "down": "false", - "north": "false", "up": "false", - "south": "true" + "south": "true", + "north": "false" }, "apply": { "model": "create:block/fluid_pipe/lr_x" @@ -171,9 +171,9 @@ { "when": { "down": "false", - "north": "false", "up": "false", - "south": "false" + "south": "false", + "north": "false" }, "apply": { "model": "create:block/fluid_pipe/none_x" @@ -181,10 +181,10 @@ }, { "when": { + "south": "true", "west": "true", - "east": "false", "north": "false", - "south": "true" + "east": "false" }, "apply": { "model": "create:block/fluid_pipe/lu_y" @@ -192,10 +192,10 @@ }, { "when": { + "south": "true", "west": "false", - "east": "true", "north": "false", - "south": "true" + "east": "true" }, "apply": { "model": "create:block/fluid_pipe/ru_y" @@ -203,10 +203,10 @@ }, { "when": { + "south": "false", "west": "true", - "east": "false", "north": "true", - "south": "false" + "east": "false" }, "apply": { "model": "create:block/fluid_pipe/ld_y" @@ -214,10 +214,10 @@ }, { "when": { + "south": "false", "west": "false", - "east": "true", "north": "true", - "south": "false" + "east": "true" }, "apply": { "model": "create:block/fluid_pipe/rd_y" @@ -225,10 +225,10 @@ }, { "when": { + "south": "true", "west": "false", - "east": "false", "north": "true", - "south": "true" + "east": "false" }, "apply": { "model": "create:block/fluid_pipe/ud_y" @@ -236,10 +236,10 @@ }, { "when": { + "south": "true", "west": "false", - "east": "false", "north": "false", - "south": "true" + "east": "false" }, "apply": { "model": "create:block/fluid_pipe/ud_y" @@ -247,10 +247,10 @@ }, { "when": { + "south": "false", "west": "false", - "east": "false", "north": "true", - "south": "false" + "east": "false" }, "apply": { "model": "create:block/fluid_pipe/ud_y" @@ -258,10 +258,10 @@ }, { "when": { + "south": "false", "west": "true", - "east": "true", "north": "false", - "south": "false" + "east": "true" }, "apply": { "model": "create:block/fluid_pipe/lr_y" @@ -269,10 +269,10 @@ }, { "when": { + "south": "false", "west": "true", - "east": "false", "north": "false", - "south": "false" + "east": "false" }, "apply": { "model": "create:block/fluid_pipe/lr_y" @@ -280,10 +280,10 @@ }, { "when": { + "south": "false", "west": "false", - "east": "true", "north": "false", - "south": "false" + "east": "true" }, "apply": { "model": "create:block/fluid_pipe/lr_y" @@ -291,10 +291,10 @@ }, { "when": { + "south": "false", "west": "false", - "east": "false", "north": "false", - "south": "false" + "east": "false" }, "apply": { "model": "create:block/fluid_pipe/none_y" @@ -302,10 +302,10 @@ }, { "when": { - "west": "false", "down": "false", - "east": "true", - "up": "true" + "up": "true", + "west": "false", + "east": "true" }, "apply": { "model": "create:block/fluid_pipe/lu_z" @@ -313,10 +313,10 @@ }, { "when": { - "west": "true", "down": "false", - "east": "false", - "up": "true" + "up": "true", + "west": "true", + "east": "false" }, "apply": { "model": "create:block/fluid_pipe/ru_z" @@ -324,10 +324,10 @@ }, { "when": { - "west": "false", "down": "true", - "east": "true", - "up": "false" + "up": "false", + "west": "false", + "east": "true" }, "apply": { "model": "create:block/fluid_pipe/ld_z" @@ -335,10 +335,10 @@ }, { "when": { - "west": "true", "down": "true", - "east": "false", - "up": "false" + "up": "false", + "west": "true", + "east": "false" }, "apply": { "model": "create:block/fluid_pipe/rd_z" @@ -346,10 +346,10 @@ }, { "when": { - "west": "false", "down": "true", - "east": "false", - "up": "true" + "up": "true", + "west": "false", + "east": "false" }, "apply": { "model": "create:block/fluid_pipe/ud_z" @@ -357,10 +357,10 @@ }, { "when": { - "west": "false", "down": "false", - "east": "false", - "up": "true" + "up": "true", + "west": "false", + "east": "false" }, "apply": { "model": "create:block/fluid_pipe/ud_z" @@ -368,10 +368,10 @@ }, { "when": { - "west": "false", "down": "true", - "east": "false", - "up": "false" + "up": "false", + "west": "false", + "east": "false" }, "apply": { "model": "create:block/fluid_pipe/ud_z" @@ -379,10 +379,10 @@ }, { "when": { + "down": "false", + "up": "false", "west": "true", - "down": "false", - "east": "true", - "up": "false" + "east": "true" }, "apply": { "model": "create:block/fluid_pipe/lr_z" @@ -390,10 +390,10 @@ }, { "when": { + "down": "false", + "up": "false", "west": "false", - "down": "false", - "east": "true", - "up": "false" + "east": "true" }, "apply": { "model": "create:block/fluid_pipe/lr_z" @@ -401,10 +401,10 @@ }, { "when": { + "down": "false", + "up": "false", "west": "true", - "down": "false", - "east": "false", - "up": "false" + "east": "false" }, "apply": { "model": "create:block/fluid_pipe/lr_z" @@ -412,10 +412,10 @@ }, { "when": { - "west": "false", "down": "false", - "east": "false", - "up": "false" + "up": "false", + "west": "false", + "east": "false" }, "apply": { "model": "create:block/fluid_pipe/none_z" diff --git a/src/generated/resources/assets/create/blockstates/radial_chassis.json b/src/generated/resources/assets/create/blockstates/radial_chassis.json index 9d00ea8b1..8bd829ffc 100644 --- a/src/generated/resources/assets/create/blockstates/radial_chassis.json +++ b/src/generated/resources/assets/create/blockstates/radial_chassis.json @@ -29,8 +29,8 @@ }, { "when": { - "sticky_south": "true", - "axis": "x" + "axis": "x", + "sticky_south": "true" }, "apply": { "model": "create:block/radial_chassis_side_x_sticky", @@ -39,8 +39,8 @@ }, { "when": { - "sticky_south": "true", - "axis": "y" + "axis": "y", + "sticky_south": "true" }, "apply": { "model": "create:block/radial_chassis_side_y_sticky" @@ -48,8 +48,8 @@ }, { "when": { - "sticky_south": "true", - "axis": "z" + "axis": "z", + "sticky_south": "true" }, "apply": { "model": "create:block/radial_chassis_side_x_sticky", @@ -59,8 +59,8 @@ }, { "when": { - "sticky_south": "false", - "axis": "x" + "axis": "x", + "sticky_south": "false" }, "apply": { "model": "create:block/radial_chassis_side_x", @@ -69,8 +69,8 @@ }, { "when": { - "sticky_south": "false", - "axis": "y" + "axis": "y", + "sticky_south": "false" }, "apply": { "model": "create:block/radial_chassis_side_y" @@ -78,8 +78,8 @@ }, { "when": { - "sticky_south": "false", - "axis": "z" + "axis": "z", + "sticky_south": "false" }, "apply": { "model": "create:block/radial_chassis_side_x", @@ -89,8 +89,8 @@ }, { "when": { - "sticky_west": "true", - "axis": "x" + "axis": "x", + "sticky_west": "true" }, "apply": { "model": "create:block/radial_chassis_side_x_sticky", @@ -99,8 +99,8 @@ }, { "when": { - "sticky_west": "true", - "axis": "y" + "axis": "y", + "sticky_west": "true" }, "apply": { "model": "create:block/radial_chassis_side_y_sticky", @@ -109,8 +109,8 @@ }, { "when": { - "sticky_west": "true", - "axis": "z" + "axis": "z", + "sticky_west": "true" }, "apply": { "model": "create:block/radial_chassis_side_z_sticky", @@ -119,8 +119,8 @@ }, { "when": { - "sticky_west": "false", - "axis": "x" + "axis": "x", + "sticky_west": "false" }, "apply": { "model": "create:block/radial_chassis_side_x", @@ -129,8 +129,8 @@ }, { "when": { - "sticky_west": "false", - "axis": "y" + "axis": "y", + "sticky_west": "false" }, "apply": { "model": "create:block/radial_chassis_side_y", @@ -139,8 +139,8 @@ }, { "when": { - "sticky_west": "false", - "axis": "z" + "axis": "z", + "sticky_west": "false" }, "apply": { "model": "create:block/radial_chassis_side_z", @@ -149,8 +149,8 @@ }, { "when": { - "sticky_north": "true", - "axis": "x" + "axis": "x", + "sticky_north": "true" }, "apply": { "model": "create:block/radial_chassis_side_x_sticky" @@ -158,8 +158,8 @@ }, { "when": { - "sticky_north": "true", - "axis": "y" + "axis": "y", + "sticky_north": "true" }, "apply": { "model": "create:block/radial_chassis_side_y_sticky", @@ -168,8 +168,8 @@ }, { "when": { - "sticky_north": "true", - "axis": "z" + "axis": "z", + "sticky_north": "true" }, "apply": { "model": "create:block/radial_chassis_side_x_sticky", @@ -178,8 +178,8 @@ }, { "when": { - "sticky_north": "false", - "axis": "x" + "axis": "x", + "sticky_north": "false" }, "apply": { "model": "create:block/radial_chassis_side_x" @@ -187,8 +187,8 @@ }, { "when": { - "sticky_north": "false", - "axis": "y" + "axis": "y", + "sticky_north": "false" }, "apply": { "model": "create:block/radial_chassis_side_y", @@ -197,8 +197,8 @@ }, { "when": { - "sticky_north": "false", - "axis": "z" + "axis": "z", + "sticky_north": "false" }, "apply": { "model": "create:block/radial_chassis_side_x", @@ -207,8 +207,8 @@ }, { "when": { - "sticky_east": "true", - "axis": "x" + "axis": "x", + "sticky_east": "true" }, "apply": { "model": "create:block/radial_chassis_side_x_sticky", @@ -217,8 +217,8 @@ }, { "when": { - "sticky_east": "true", - "axis": "y" + "axis": "y", + "sticky_east": "true" }, "apply": { "model": "create:block/radial_chassis_side_y_sticky", @@ -227,8 +227,8 @@ }, { "when": { - "sticky_east": "true", - "axis": "z" + "axis": "z", + "sticky_east": "true" }, "apply": { "model": "create:block/radial_chassis_side_z_sticky" @@ -236,8 +236,8 @@ }, { "when": { - "sticky_east": "false", - "axis": "x" + "axis": "x", + "sticky_east": "false" }, "apply": { "model": "create:block/radial_chassis_side_x", @@ -246,8 +246,8 @@ }, { "when": { - "sticky_east": "false", - "axis": "y" + "axis": "y", + "sticky_east": "false" }, "apply": { "model": "create:block/radial_chassis_side_y", @@ -256,8 +256,8 @@ }, { "when": { - "sticky_east": "false", - "axis": "z" + "axis": "z", + "sticky_east": "false" }, "apply": { "model": "create:block/radial_chassis_side_z" diff --git a/src/generated/resources/assets/create/lang/en_ud.json b/src/generated/resources/assets/create/lang/en_ud.json index 65c0554be..b9de24d4a 100644 --- a/src/generated/resources/assets/create/lang/en_ud.json +++ b/src/generated/resources/assets/create/lang/en_ud.json @@ -422,6 +422,7 @@ "item.create.builders_tea": "\u0250\u01DD\u27D8 s,\u0279\u01DDp\u05DF\u0131n\u15FA", "item.create.chest_minecart_contraption": "uo\u0131\u0287d\u0250\u0279\u0287uo\u0186 \u0287\u0279\u0250\u0254\u01DDu\u0131W \u0287s\u01DD\u0265\u0186", "item.create.chocolate_bucket": "\u0287\u01DD\u029E\u0254n\u15FA \u01DD\u0287\u0250\u05DFo\u0254o\u0265\u0186", + "item.create.chocolate_glazed_berries": "s\u01DD\u0131\u0279\u0279\u01DD\u15FA p\u01DDz\u0250\u05DF\u2141 \u01DD\u0287\u0250\u05DFo\u0254o\u0265\u0186", "item.create.chromatic_compound": "punod\u026Fo\u0186 \u0254\u0131\u0287\u0250\u026Fo\u0279\u0265\u0186", "item.create.cinder_flour": "\u0279no\u05DF\u2132 \u0279\u01DDpu\u0131\u0186", "item.create.copper_ingot": "\u0287obuI \u0279\u01DDddo\u0186", @@ -455,6 +456,7 @@ "item.create.handheld_blockzapper": "\u0279\u01DDdd\u0250z\u029E\u0254o\u05DF\u15FA p\u05DF\u01DD\u0265pu\u0250H", "item.create.handheld_worldshaper": "\u0279\u01DDd\u0250\u0265sp\u05DF\u0279oM p\u05DF\u01DD\u0265pu\u0250H", "item.create.honey_bucket": "\u0287\u01DD\u029E\u0254n\u15FA \u028E\u01DDuoH", + "item.create.honeyed_apple": "\u01DD\u05DFdd\u2C6F p\u01DD\u028E\u01DDuoH", "item.create.integrated_circuit": "\u0287\u0131n\u0254\u0279\u0131\u0186 p\u01DD\u0287\u0250\u0279b\u01DD\u0287uI", "item.create.iron_sheet": "\u0287\u01DD\u01DD\u0265S uo\u0279I", "item.create.lapis_sheet": "\u0287\u01DD\u01DD\u0265S s\u0131d\u0250\uA780", @@ -471,6 +473,7 @@ "item.create.schematic_and_quill": "\u05DF\u05DF\u0131n\u1F49 pu\u2C6F \u0254\u0131\u0287\u0250\u026F\u01DD\u0265\u0254S", "item.create.shadow_steel": "\u05DF\u01DD\u01DD\u0287S \u028Dop\u0250\u0265S", "item.create.super_glue": "\u01DDn\u05DF\u2141 \u0279\u01DDdnS", + "item.create.sweet_roll": "\u05DF\u05DFo\u1D1A \u0287\u01DD\u01DD\u028DS", "item.create.tree_fertilizer": "\u0279\u01DDz\u0131\u05DF\u0131\u0287\u0279\u01DD\u2132 \u01DD\u01DD\u0279\u27D8", "item.create.vertical_gearbox": "xoq\u0279\u0250\u01DD\u2141 \u05DF\u0250\u0254\u0131\u0287\u0279\u01DD\u039B", "item.create.wand_of_symmetry": "\u028E\u0279\u0287\u01DD\u026F\u026F\u028ES \u025FO pu\u0250M", diff --git a/src/generated/resources/assets/create/lang/en_us.json b/src/generated/resources/assets/create/lang/en_us.json index 018ae8c5a..50fec28fc 100644 --- a/src/generated/resources/assets/create/lang/en_us.json +++ b/src/generated/resources/assets/create/lang/en_us.json @@ -428,6 +428,7 @@ "item.create.builders_tea": "Builder's Tea", "item.create.chest_minecart_contraption": "Chest Minecart Contraption", "item.create.chocolate_bucket": "Chocolate Bucket", + "item.create.chocolate_glazed_berries": "Chocolate Glazed Berries", "item.create.chromatic_compound": "Chromatic Compound", "item.create.cinder_flour": "Cinder Flour", "item.create.copper_ingot": "Copper Ingot", @@ -461,6 +462,7 @@ "item.create.handheld_blockzapper": "Handheld Blockzapper", "item.create.handheld_worldshaper": "Handheld Worldshaper", "item.create.honey_bucket": "Honey Bucket", + "item.create.honeyed_apple": "Honeyed Apple", "item.create.integrated_circuit": "Integrated Circuit", "item.create.iron_sheet": "Iron Sheet", "item.create.lapis_sheet": "Lapis Sheet", @@ -477,6 +479,7 @@ "item.create.schematic_and_quill": "Schematic And Quill", "item.create.shadow_steel": "Shadow Steel", "item.create.super_glue": "Super Glue", + "item.create.sweet_roll": "Sweet Roll", "item.create.tree_fertilizer": "Tree Fertilizer", "item.create.vertical_gearbox": "Vertical Gearbox", "item.create.wand_of_symmetry": "Wand Of Symmetry", diff --git a/src/generated/resources/assets/create/lang/unfinished/de_de.json b/src/generated/resources/assets/create/lang/unfinished/de_de.json index 7c7c5d275..97b496027 100644 --- a/src/generated/resources/assets/create/lang/unfinished/de_de.json +++ b/src/generated/resources/assets/create/lang/unfinished/de_de.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 970", + "_": "Missing Localizations: 973", "_": "->------------------------] Game Elements [------------------------<-", @@ -429,6 +429,7 @@ "item.create.builders_tea": "UNLOCALIZED: Builder's Tea", "item.create.chest_minecart_contraption": "UNLOCALIZED: Chest Minecart Contraption", "item.create.chocolate_bucket": "UNLOCALIZED: Chocolate Bucket", + "item.create.chocolate_glazed_berries": "UNLOCALIZED: Chocolate Glazed Berries", "item.create.chromatic_compound": "UNLOCALIZED: Chromatic Compound", "item.create.cinder_flour": "UNLOCALIZED: Cinder Flour", "item.create.copper_ingot": "UNLOCALIZED: Copper Ingot", @@ -462,6 +463,7 @@ "item.create.handheld_blockzapper": "Blockpistole", "item.create.handheld_worldshaper": "Geländeformer", "item.create.honey_bucket": "Honigeimer", + "item.create.honeyed_apple": "UNLOCALIZED: Honeyed Apple", "item.create.integrated_circuit": "UNLOCALIZED: Integrated Circuit", "item.create.iron_sheet": "Eisenblech", "item.create.lapis_sheet": "UNLOCALIZED: Lapis Sheet", @@ -478,6 +480,7 @@ "item.create.schematic_and_quill": "Bauplan und Feder", "item.create.shadow_steel": "UNLOCALIZED: Shadow Steel", "item.create.super_glue": "Superkleber", + "item.create.sweet_roll": "UNLOCALIZED: Sweet Roll", "item.create.tree_fertilizer": "Baumdünger", "item.create.vertical_gearbox": "UNLOCALIZED: Vertical Gearbox", "item.create.wand_of_symmetry": "Symmetriestab", diff --git a/src/generated/resources/assets/create/lang/unfinished/es_es.json b/src/generated/resources/assets/create/lang/unfinished/es_es.json index eda73db1d..c2b82e6a5 100644 --- a/src/generated/resources/assets/create/lang/unfinished/es_es.json +++ b/src/generated/resources/assets/create/lang/unfinished/es_es.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 12", + "_": "Missing Localizations: 15", "_": "->------------------------] Game Elements [------------------------<-", @@ -429,6 +429,7 @@ "item.create.builders_tea": "Té del Constructor", "item.create.chest_minecart_contraption": "Artilugio de vagoneta con cofre", "item.create.chocolate_bucket": "Cubo de chocolate", + "item.create.chocolate_glazed_berries": "UNLOCALIZED: Chocolate Glazed Berries", "item.create.chromatic_compound": "Compuesto cromático", "item.create.cinder_flour": "Harina de ceniza", "item.create.copper_ingot": "Lingote de cobre", @@ -462,6 +463,7 @@ "item.create.handheld_blockzapper": "Blockzapper", "item.create.handheld_worldshaper": "Worldshaper", "item.create.honey_bucket": "Cubo de miel", + "item.create.honeyed_apple": "UNLOCALIZED: Honeyed Apple", "item.create.integrated_circuit": "Chip de circuito integrado", "item.create.iron_sheet": "Lámina de hierro", "item.create.lapis_sheet": "Lámina de lapislázuli", @@ -478,6 +480,7 @@ "item.create.schematic_and_quill": "Esquema y Pluma", "item.create.shadow_steel": "Acero sombrío", "item.create.super_glue": "Super Pegamento", + "item.create.sweet_roll": "UNLOCALIZED: Sweet Roll", "item.create.tree_fertilizer": "Fertilizador de árboles", "item.create.vertical_gearbox": "Caja de transmisión vertical", "item.create.wand_of_symmetry": "Varita de simetría", diff --git a/src/generated/resources/assets/create/lang/unfinished/es_mx.json b/src/generated/resources/assets/create/lang/unfinished/es_mx.json index dcf01e843..6ba4f32e8 100644 --- a/src/generated/resources/assets/create/lang/unfinished/es_mx.json +++ b/src/generated/resources/assets/create/lang/unfinished/es_mx.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 900", + "_": "Missing Localizations: 903", "_": "->------------------------] Game Elements [------------------------<-", @@ -429,6 +429,7 @@ "item.create.builders_tea": "Té del Constructor", "item.create.chest_minecart_contraption": "Artefacto de Vagón con Cofre", "item.create.chocolate_bucket": "Cubeta de Chocolate", + "item.create.chocolate_glazed_berries": "UNLOCALIZED: Chocolate Glazed Berries", "item.create.chromatic_compound": "Compuesto Cromático", "item.create.cinder_flour": "Ceniza Molida", "item.create.copper_ingot": "Lingote de Cobre", @@ -462,6 +463,7 @@ "item.create.handheld_blockzapper": "Pistola de Manipulación de Bloques", "item.create.handheld_worldshaper": "Pistola de Manipulación de Mundo", "item.create.honey_bucket": "Cubeta de Miel", + "item.create.honeyed_apple": "UNLOCALIZED: Honeyed Apple", "item.create.integrated_circuit": "Circuito Integrado", "item.create.iron_sheet": "Lámina de Hierro", "item.create.lapis_sheet": "Lámina de Lapislázuli", @@ -478,6 +480,7 @@ "item.create.schematic_and_quill": "Esquema y Pluma", "item.create.shadow_steel": "Acero Sombrío", "item.create.super_glue": "Super Pegamento", + "item.create.sweet_roll": "UNLOCALIZED: Sweet Roll", "item.create.tree_fertilizer": "Fertilizador de Árboles", "item.create.vertical_gearbox": "Transmisión Vertical", "item.create.wand_of_symmetry": "Vara de la Simetria", diff --git a/src/generated/resources/assets/create/lang/unfinished/fr_fr.json b/src/generated/resources/assets/create/lang/unfinished/fr_fr.json index 4b55b1452..6ad32e75f 100644 --- a/src/generated/resources/assets/create/lang/unfinished/fr_fr.json +++ b/src/generated/resources/assets/create/lang/unfinished/fr_fr.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 682", + "_": "Missing Localizations: 685", "_": "->------------------------] Game Elements [------------------------<-", @@ -429,6 +429,7 @@ "item.create.builders_tea": "Thé du constructeur", "item.create.chest_minecart_contraption": "Engin de wagonnet avec coffre", "item.create.chocolate_bucket": "Seau de chocolat", + "item.create.chocolate_glazed_berries": "UNLOCALIZED: Chocolate Glazed Berries", "item.create.chromatic_compound": "Composé chromatique", "item.create.cinder_flour": "Farine de braise", "item.create.copper_ingot": "Lingot de cuivre", @@ -462,6 +463,7 @@ "item.create.handheld_blockzapper": "Blockzappeur portable", "item.create.handheld_worldshaper": "Térraformeur portable", "item.create.honey_bucket": "Seau de miel", + "item.create.honeyed_apple": "UNLOCALIZED: Honeyed Apple", "item.create.integrated_circuit": "Circuit intégré", "item.create.iron_sheet": "Plaque de Fer", "item.create.lapis_sheet": "Feuille de lapis", @@ -478,6 +480,7 @@ "item.create.schematic_and_quill": "Schéma et plume", "item.create.shadow_steel": "Acier sombre", "item.create.super_glue": "Colle extra-forte", + "item.create.sweet_roll": "UNLOCALIZED: Sweet Roll", "item.create.tree_fertilizer": "Engrais pour arbres", "item.create.vertical_gearbox": "Boîte de transfert verticale", "item.create.wand_of_symmetry": "Bâton de symétrie", diff --git a/src/generated/resources/assets/create/lang/unfinished/it_it.json b/src/generated/resources/assets/create/lang/unfinished/it_it.json index 26691dd55..d13863bd4 100644 --- a/src/generated/resources/assets/create/lang/unfinished/it_it.json +++ b/src/generated/resources/assets/create/lang/unfinished/it_it.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 17", + "_": "Missing Localizations: 20", "_": "->------------------------] Game Elements [------------------------<-", @@ -429,6 +429,7 @@ "item.create.builders_tea": "Tè del costruttore", "item.create.chest_minecart_contraption": "Contrazione per carrello da miniera con baule", "item.create.chocolate_bucket": "Secchio di cioccolata", + "item.create.chocolate_glazed_berries": "UNLOCALIZED: Chocolate Glazed Berries", "item.create.chromatic_compound": "Composto cromatico", "item.create.cinder_flour": "Cenere farinosa", "item.create.copper_ingot": "Lingotto di rame", @@ -462,6 +463,7 @@ "item.create.handheld_blockzapper": "Zapper di blocchi portatile", "item.create.handheld_worldshaper": "Plasmatore del mondo portatile", "item.create.honey_bucket": "Secchio di miele", + "item.create.honeyed_apple": "UNLOCALIZED: Honeyed Apple", "item.create.integrated_circuit": "Circuito integrato", "item.create.iron_sheet": "Lamiera di ferro", "item.create.lapis_sheet": "Lamiera di lapislazzuli", @@ -478,6 +480,7 @@ "item.create.schematic_and_quill": "Schematica e penna d'oca", "item.create.shadow_steel": "Acciaio oscuro", "item.create.super_glue": "Super colla", + "item.create.sweet_roll": "UNLOCALIZED: Sweet Roll", "item.create.tree_fertilizer": "Fertilizzante per alberi", "item.create.vertical_gearbox": "Riduttore verticale", "item.create.wand_of_symmetry": "Asta di simmetria", diff --git a/src/generated/resources/assets/create/lang/unfinished/ja_jp.json b/src/generated/resources/assets/create/lang/unfinished/ja_jp.json index 944c6577c..1a3e51cc8 100644 --- a/src/generated/resources/assets/create/lang/unfinished/ja_jp.json +++ b/src/generated/resources/assets/create/lang/unfinished/ja_jp.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 24", + "_": "Missing Localizations: 27", "_": "->------------------------] Game Elements [------------------------<-", @@ -429,6 +429,7 @@ "item.create.builders_tea": "建築家のお茶", "item.create.chest_minecart_contraption": "からくりチェストトロッコ", "item.create.chocolate_bucket": "チョコレート入りバケツ", + "item.create.chocolate_glazed_berries": "UNLOCALIZED: Chocolate Glazed Berries", "item.create.chromatic_compound": "色彩の化合物", "item.create.cinder_flour": "ネザーラックの粉", "item.create.copper_ingot": "銅インゴット", @@ -462,6 +463,7 @@ "item.create.handheld_blockzapper": "携帯ブロックザッパー", "item.create.handheld_worldshaper": "携帯ワールドシェーパー", "item.create.honey_bucket": "ハチミツ入りバケツ", + "item.create.honeyed_apple": "UNLOCALIZED: Honeyed Apple", "item.create.integrated_circuit": "集積回路", "item.create.iron_sheet": "鉄板", "item.create.lapis_sheet": "ラピスラズリ板", @@ -478,6 +480,7 @@ "item.create.schematic_and_quill": "概略図と羽根ペン", "item.create.shadow_steel": "シャドウスチール", "item.create.super_glue": "接着剤", + "item.create.sweet_roll": "UNLOCALIZED: Sweet Roll", "item.create.tree_fertilizer": "樹木の肥料", "item.create.vertical_gearbox": "垂直ギアボックス", "item.create.wand_of_symmetry": "対称の杖", diff --git a/src/generated/resources/assets/create/lang/unfinished/ko_kr.json b/src/generated/resources/assets/create/lang/unfinished/ko_kr.json index a85e949d8..141d5a8fc 100644 --- a/src/generated/resources/assets/create/lang/unfinished/ko_kr.json +++ b/src/generated/resources/assets/create/lang/unfinished/ko_kr.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 71", + "_": "Missing Localizations: 74", "_": "->------------------------] Game Elements [------------------------<-", @@ -429,6 +429,7 @@ "item.create.builders_tea": "건축가의 차", "item.create.chest_minecart_contraption": "상자가 실린 광산 수레 장치", "item.create.chocolate_bucket": "초콜릿 양동이", + "item.create.chocolate_glazed_berries": "UNLOCALIZED: Chocolate Glazed Berries", "item.create.chromatic_compound": "색채 혼합물", "item.create.cinder_flour": "잿가루", "item.create.copper_ingot": "구리 주괴", @@ -462,6 +463,7 @@ "item.create.handheld_blockzapper": "휴대용 블록발사기", "item.create.handheld_worldshaper": "휴대용 세계편집기", "item.create.honey_bucket": "꿀 양동이", + "item.create.honeyed_apple": "UNLOCALIZED: Honeyed Apple", "item.create.integrated_circuit": "집적 회로", "item.create.iron_sheet": "철 판", "item.create.lapis_sheet": "청금석 판", @@ -478,6 +480,7 @@ "item.create.schematic_and_quill": "청사진과 깃펜", "item.create.shadow_steel": "그림자 강철", "item.create.super_glue": "강력 접착제", + "item.create.sweet_roll": "UNLOCALIZED: Sweet Roll", "item.create.tree_fertilizer": "나무 비료", "item.create.vertical_gearbox": "수직 기어박스", "item.create.wand_of_symmetry": "대칭의 지팡이", diff --git a/src/generated/resources/assets/create/lang/unfinished/nl_nl.json b/src/generated/resources/assets/create/lang/unfinished/nl_nl.json index 81bdb6aec..3703e1c17 100644 --- a/src/generated/resources/assets/create/lang/unfinished/nl_nl.json +++ b/src/generated/resources/assets/create/lang/unfinished/nl_nl.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 1169", + "_": "Missing Localizations: 1172", "_": "->------------------------] Game Elements [------------------------<-", @@ -429,6 +429,7 @@ "item.create.builders_tea": "UNLOCALIZED: Builder's Tea", "item.create.chest_minecart_contraption": "UNLOCALIZED: Chest Minecart Contraption", "item.create.chocolate_bucket": "UNLOCALIZED: Chocolate Bucket", + "item.create.chocolate_glazed_berries": "UNLOCALIZED: Chocolate Glazed Berries", "item.create.chromatic_compound": "UNLOCALIZED: Chromatic Compound", "item.create.cinder_flour": "UNLOCALIZED: Cinder Flour", "item.create.copper_ingot": "Koperstaaf", @@ -462,6 +463,7 @@ "item.create.handheld_blockzapper": "Blokzapper", "item.create.handheld_worldshaper": "UNLOCALIZED: Handheld Worldshaper", "item.create.honey_bucket": "UNLOCALIZED: Honey Bucket", + "item.create.honeyed_apple": "UNLOCALIZED: Honeyed Apple", "item.create.integrated_circuit": "UNLOCALIZED: Integrated Circuit", "item.create.iron_sheet": "IJzeren Platen", "item.create.lapis_sheet": "UNLOCALIZED: Lapis Sheet", @@ -478,6 +480,7 @@ "item.create.schematic_and_quill": "Bouwtekening en Veer", "item.create.shadow_steel": "UNLOCALIZED: Shadow Steel", "item.create.super_glue": "UNLOCALIZED: Super Glue", + "item.create.sweet_roll": "UNLOCALIZED: Sweet Roll", "item.create.tree_fertilizer": "Boom mest", "item.create.vertical_gearbox": "UNLOCALIZED: Vertical Gearbox", "item.create.wand_of_symmetry": "Symmetrie Staf", diff --git a/src/generated/resources/assets/create/lang/unfinished/pt_br.json b/src/generated/resources/assets/create/lang/unfinished/pt_br.json index 05dab7dd4..4af028159 100644 --- a/src/generated/resources/assets/create/lang/unfinished/pt_br.json +++ b/src/generated/resources/assets/create/lang/unfinished/pt_br.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 1235", + "_": "Missing Localizations: 1238", "_": "->------------------------] Game Elements [------------------------<-", @@ -429,6 +429,7 @@ "item.create.builders_tea": "UNLOCALIZED: Builder's Tea", "item.create.chest_minecart_contraption": "UNLOCALIZED: Chest Minecart Contraption", "item.create.chocolate_bucket": "UNLOCALIZED: Chocolate Bucket", + "item.create.chocolate_glazed_berries": "UNLOCALIZED: Chocolate Glazed Berries", "item.create.chromatic_compound": "UNLOCALIZED: Chromatic Compound", "item.create.cinder_flour": "UNLOCALIZED: Cinder Flour", "item.create.copper_ingot": "UNLOCALIZED: Copper Ingot", @@ -462,6 +463,7 @@ "item.create.handheld_blockzapper": "Blockzapper Portátil", "item.create.handheld_worldshaper": "UNLOCALIZED: Handheld Worldshaper", "item.create.honey_bucket": "UNLOCALIZED: Honey Bucket", + "item.create.honeyed_apple": "UNLOCALIZED: Honeyed Apple", "item.create.integrated_circuit": "UNLOCALIZED: Integrated Circuit", "item.create.iron_sheet": "Placas de Ferro", "item.create.lapis_sheet": "UNLOCALIZED: Lapis Sheet", @@ -478,6 +480,7 @@ "item.create.schematic_and_quill": "Esquema e pena", "item.create.shadow_steel": "UNLOCALIZED: Shadow Steel", "item.create.super_glue": "UNLOCALIZED: Super Glue", + "item.create.sweet_roll": "UNLOCALIZED: Sweet Roll", "item.create.tree_fertilizer": "Fertilizante de Árvore", "item.create.vertical_gearbox": "UNLOCALIZED: Vertical Gearbox", "item.create.wand_of_symmetry": "Varinha de Simetria", diff --git a/src/generated/resources/assets/create/lang/unfinished/ru_ru.json b/src/generated/resources/assets/create/lang/unfinished/ru_ru.json index 11847d2f5..90d8c8487 100644 --- a/src/generated/resources/assets/create/lang/unfinished/ru_ru.json +++ b/src/generated/resources/assets/create/lang/unfinished/ru_ru.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 21", + "_": "Missing Localizations: 24", "_": "->------------------------] Game Elements [------------------------<-", @@ -429,6 +429,7 @@ "item.create.builders_tea": "Чай Строителя", "item.create.chest_minecart_contraption": "Сундуко-вагонеточная штуковина", "item.create.chocolate_bucket": "Ведро шоколада", + "item.create.chocolate_glazed_berries": "UNLOCALIZED: Chocolate Glazed Berries", "item.create.chromatic_compound": "Хроматический компаунд", "item.create.cinder_flour": "Незераковая пыль", "item.create.copper_ingot": "Медный слиток", @@ -462,6 +463,7 @@ "item.create.handheld_blockzapper": "Ручная блоковая пушка", "item.create.handheld_worldshaper": "Ручной редактор мира", "item.create.honey_bucket": "Ведро мёда", + "item.create.honeyed_apple": "UNLOCALIZED: Honeyed Apple", "item.create.integrated_circuit": "Интегральная схема", "item.create.iron_sheet": "Железный лист", "item.create.lapis_sheet": "Лазуритовый лист", @@ -478,6 +480,7 @@ "item.create.schematic_and_quill": "Схематика и перо", "item.create.shadow_steel": "Призрачная сталь", "item.create.super_glue": "Супер-клей", + "item.create.sweet_roll": "UNLOCALIZED: Sweet Roll", "item.create.tree_fertilizer": "Удобрение для деревьев", "item.create.vertical_gearbox": "Вертикальная коробка передач", "item.create.wand_of_symmetry": "Жезл симметрии", diff --git a/src/generated/resources/assets/create/lang/unfinished/zh_cn.json b/src/generated/resources/assets/create/lang/unfinished/zh_cn.json index f43795167..82f3fbf24 100644 --- a/src/generated/resources/assets/create/lang/unfinished/zh_cn.json +++ b/src/generated/resources/assets/create/lang/unfinished/zh_cn.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 19", + "_": "Missing Localizations: 22", "_": "->------------------------] Game Elements [------------------------<-", @@ -429,6 +429,7 @@ "item.create.builders_tea": "建造工茶饮", "item.create.chest_minecart_contraption": "装配过的动力矿车", "item.create.chocolate_bucket": "巧克力桶", + "item.create.chocolate_glazed_berries": "UNLOCALIZED: Chocolate Glazed Berries", "item.create.chromatic_compound": "异彩化合物", "item.create.cinder_flour": "下界面粉", "item.create.copper_ingot": "铜锭", @@ -462,6 +463,7 @@ "item.create.handheld_blockzapper": "手持式方块放置器", "item.create.handheld_worldshaper": "手持式环境塑形器", "item.create.honey_bucket": "蜂蜜桶", + "item.create.honeyed_apple": "UNLOCALIZED: Honeyed Apple", "item.create.integrated_circuit": "集成电路板", "item.create.iron_sheet": "铁板", "item.create.lapis_sheet": "青金石板", @@ -478,6 +480,7 @@ "item.create.schematic_and_quill": "蓝图与笔", "item.create.shadow_steel": "暗影钢", "item.create.super_glue": "强力胶", + "item.create.sweet_roll": "UNLOCALIZED: Sweet Roll", "item.create.tree_fertilizer": "树木肥料", "item.create.vertical_gearbox": "竖直十字齿轮箱", "item.create.wand_of_symmetry": "对称之杖", diff --git a/src/generated/resources/assets/create/lang/unfinished/zh_tw.json b/src/generated/resources/assets/create/lang/unfinished/zh_tw.json index 525b6b7e0..991403374 100644 --- a/src/generated/resources/assets/create/lang/unfinished/zh_tw.json +++ b/src/generated/resources/assets/create/lang/unfinished/zh_tw.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 24", + "_": "Missing Localizations: 27", "_": "->------------------------] Game Elements [------------------------<-", @@ -429,6 +429,7 @@ "item.create.builders_tea": "工人茶", "item.create.chest_minecart_contraption": "裝修過的機械礦車", "item.create.chocolate_bucket": "巧克力桶", + "item.create.chocolate_glazed_berries": "UNLOCALIZED: Chocolate Glazed Berries", "item.create.chromatic_compound": "異彩化合物", "item.create.cinder_flour": "地獄麵粉", "item.create.copper_ingot": "銅錠", @@ -462,6 +463,7 @@ "item.create.handheld_blockzapper": "方塊放置器", "item.create.handheld_worldshaper": "地形雕塑器", "item.create.honey_bucket": "蜂蜜桶", + "item.create.honeyed_apple": "UNLOCALIZED: Honeyed Apple", "item.create.integrated_circuit": "IC板", "item.create.iron_sheet": "鐵板", "item.create.lapis_sheet": "青金石板", @@ -478,6 +480,7 @@ "item.create.schematic_and_quill": "藍圖與筆", "item.create.shadow_steel": "暗影鋼", "item.create.super_glue": "強力膠", + "item.create.sweet_roll": "UNLOCALIZED: Sweet Roll", "item.create.tree_fertilizer": "樹木肥料", "item.create.vertical_gearbox": "豎直齒輪箱", "item.create.wand_of_symmetry": "對稱杖", diff --git a/src/generated/resources/assets/create/models/item/chocolate_glazed_berries.json b/src/generated/resources/assets/create/models/item/chocolate_glazed_berries.json new file mode 100644 index 000000000..d556cc478 --- /dev/null +++ b/src/generated/resources/assets/create/models/item/chocolate_glazed_berries.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "create:item/chocolate_glazed_berries" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/create/models/item/goggles.json b/src/generated/resources/assets/create/models/item/goggles.json new file mode 100644 index 000000000..0ae90a266 --- /dev/null +++ b/src/generated/resources/assets/create/models/item/goggles.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "create:item/goggles" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/create/models/item/honeyed_apple.json b/src/generated/resources/assets/create/models/item/honeyed_apple.json new file mode 100644 index 000000000..9940c5fab --- /dev/null +++ b/src/generated/resources/assets/create/models/item/honeyed_apple.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "create:item/honeyed_apple" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/create/models/item/sweet_roll.json b/src/generated/resources/assets/create/models/item/sweet_roll.json new file mode 100644 index 000000000..a7cb2e8f3 --- /dev/null +++ b/src/generated/resources/assets/create/models/item/sweet_roll.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "create:item/sweet_roll" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/create/recipes/filling/chocolate_glazed_berries.json b/src/generated/resources/data/create/recipes/filling/chocolate_glazed_berries.json new file mode 100644 index 000000000..0ce5553a5 --- /dev/null +++ b/src/generated/resources/data/create/recipes/filling/chocolate_glazed_berries.json @@ -0,0 +1,18 @@ +{ + "type": "create:filling", + "ingredients": [ + { + "item": "minecraft:sweet_berries" + }, + { + "fluid": "create:chocolate", + "nbt": {}, + "amount": 250 + } + ], + "results": [ + { + "item": "create:chocolate_glazed_berries" + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/create/recipes/filling/honeyed_apple.json b/src/generated/resources/data/create/recipes/filling/honeyed_apple.json new file mode 100644 index 000000000..93692da87 --- /dev/null +++ b/src/generated/resources/data/create/recipes/filling/honeyed_apple.json @@ -0,0 +1,17 @@ +{ + "type": "create:filling", + "ingredients": [ + { + "item": "minecraft:apple" + }, + { + "fluidTag": "forge:honey", + "amount": 250 + } + ], + "results": [ + { + "item": "create:honeyed_apple" + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/create/recipes/filling/sweet_roll.json b/src/generated/resources/data/create/recipes/filling/sweet_roll.json new file mode 100644 index 000000000..b80ab581b --- /dev/null +++ b/src/generated/resources/data/create/recipes/filling/sweet_roll.json @@ -0,0 +1,17 @@ +{ + "type": "create:filling", + "ingredients": [ + { + "item": "minecraft:bread" + }, + { + "fluidTag": "forge:milk", + "amount": 250 + } + ], + "results": [ + { + "item": "create:sweet_roll" + } + ] +} \ No newline at end of file diff --git a/src/main/java/com/simibubi/create/AllBlockPartials.java b/src/main/java/com/simibubi/create/AllBlockPartials.java index 52641d2a9..bd23757e2 100644 --- a/src/main/java/com/simibubi/create/AllBlockPartials.java +++ b/src/main/java/com/simibubi/create/AllBlockPartials.java @@ -117,6 +117,8 @@ public class AllBlockPartials { SPEED_CONTROLLER_BRACKET = get("rotation_speed_controller/bracket"), + GOGGLES = get("goggles"), + COUPLING_ATTACHMENT = getEntity("minecart_coupling/attachment"), COUPLING_RING = getEntity("minecart_coupling/ring"), COUPLING_CONNECTOR = getEntity("minecart_coupling/connector") diff --git a/src/main/java/com/simibubi/create/AllItems.java b/src/main/java/com/simibubi/create/AllItems.java index 292e50d91..698b61e36 100644 --- a/src/main/java/com/simibubi/create/AllItems.java +++ b/src/main/java/com/simibubi/create/AllItems.java @@ -16,6 +16,7 @@ import com.simibubi.create.content.contraptions.components.structureMovement.glu import com.simibubi.create.content.contraptions.components.structureMovement.mounted.MinecartContraptionItem; import com.simibubi.create.content.contraptions.components.structureMovement.train.MinecartCouplingItem; import com.simibubi.create.content.contraptions.goggles.GogglesItem; +import com.simibubi.create.content.contraptions.goggles.GogglesModel; import com.simibubi.create.content.contraptions.processing.burner.BlazeBurnerBlockItem; import com.simibubi.create.content.contraptions.relays.belt.item.BeltConnectorItem; import com.simibubi.create.content.contraptions.relays.gearbox.VerticalGearboxItem; @@ -117,6 +118,24 @@ public class AllItems { .lang("Bar of Chocolate") .register(); + public static final ItemEntry SWEET_ROLL = REGISTRATE.item("sweet_roll", Item::new) + .properties(p -> p.food(new Food.Builder().hunger(6) + .saturation(1.0F) + .build())) + .register(); + + public static final ItemEntry CHOCOLATE_BERRIES = REGISTRATE.item("chocolate_glazed_berries", Item::new) + .properties(p -> p.food(new Food.Builder().hunger(7) + .saturation(0.7F) + .build())) + .register(); + + public static final ItemEntry HONEYED_APPLE = REGISTRATE.item("honeyed_apple", Item::new) + .properties(p -> p.food(new Food.Builder().hunger(8) + .saturation(0.6F) + .build())) + .register(); + public static final ItemEntry BUILDERS_TEA = REGISTRATE.item("builders_tea", BuildersTeaItem::new) .tag(AllItemTags.UPRIGHT_ON_BELT.tag) .properties(p -> p.maxStackSize(16)) @@ -189,7 +208,7 @@ public class AllItems { public static final ItemEntry GOGGLES = REGISTRATE.item("goggles", GogglesItem::new) .properties(p -> p.maxStackSize(1)) - .model(AssetLookup.existingItemModel()) + .onRegister(CreateRegistrate.itemModel(() -> GogglesModel::new)) .lang("Engineer's Goggles") .register(); diff --git a/src/main/java/com/simibubi/create/content/contraptions/goggles/GogglesModel.java b/src/main/java/com/simibubi/create/content/contraptions/goggles/GogglesModel.java new file mode 100644 index 000000000..333f65bbd --- /dev/null +++ b/src/main/java/com/simibubi/create/content/contraptions/goggles/GogglesModel.java @@ -0,0 +1,24 @@ +package com.simibubi.create.content.contraptions.goggles; + +import com.mojang.blaze3d.matrix.MatrixStack; +import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.foundation.block.render.WrappedBakedModel; + +import net.minecraft.client.renderer.model.IBakedModel; +import net.minecraft.client.renderer.model.ItemCameraTransforms.TransformType; + +public class GogglesModel extends WrappedBakedModel { + + public GogglesModel(IBakedModel template) { + super(template); + } + + @Override + public IBakedModel handlePerspective(TransformType cameraTransformType, MatrixStack mat) { + if (cameraTransformType == TransformType.HEAD) + return AllBlockPartials.GOGGLES.get() + .handlePerspective(cameraTransformType, mat); + return super.handlePerspective(cameraTransformType, mat); + } + +} \ No newline at end of file diff --git a/src/main/java/com/simibubi/create/foundation/data/recipe/FillingRecipeGen.java b/src/main/java/com/simibubi/create/foundation/data/recipe/FillingRecipeGen.java index 1b4a7f3fa..48486180e 100644 --- a/src/main/java/com/simibubi/create/foundation/data/recipe/FillingRecipeGen.java +++ b/src/main/java/com/simibubi/create/foundation/data/recipe/FillingRecipeGen.java @@ -26,6 +26,18 @@ public class FillingRecipeGen extends ProcessingRecipeGen { BLAZE_CAKE = create("blaze_cake", b -> b.require(Fluids.LAVA, 250) .require(AllItems.BLAZE_CAKE_BASE.get()) .output(AllItems.BLAZE_CAKE.get())), + + HONEYED_APPLE = create("honeyed_apple", b -> b.require(AllTags.forgeFluidTag("honey"), 250) + .require(Items.APPLE) + .output(AllItems.HONEYED_APPLE.get())), + + SWEET_ROLL = create("sweet_roll", b -> b.require(AllTags.forgeFluidTag("milk"), 250) + .require(Items.BREAD) + .output(AllItems.SWEET_ROLL.get())), + + CHOCOLATE_BERRIES = create("chocolate_glazed_berries", b -> b.require(AllFluids.CHOCOLATE.get(), 250) + .require(Items.SWEET_BERRIES) + .output(AllItems.CHOCOLATE_BERRIES.get())), GRASS_BLOCK = create("grass_block", b -> b.require(Fluids.WATER, 500) .require(Items.DIRT) diff --git a/src/main/resources/assets/create/models/item/goggles.json b/src/main/resources/assets/create/models/block/goggles.json similarity index 86% rename from src/main/resources/assets/create/models/item/goggles.json rename to src/main/resources/assets/create/models/block/goggles.json index 5dbe10332..b91727c27 100644 --- a/src/main/resources/assets/create/models/item/goggles.json +++ b/src/main/resources/assets/create/models/block/goggles.json @@ -4,7 +4,7 @@ "textures": { "0": "create:block/brass_casing", "1": "block/black_stained_glass", - "2": "create:item/goggles", + "2": "create:item/goggles_model", "particle": "create:block/brass_casing" }, "elements": [ @@ -13,7 +13,7 @@ "from": [11, 7, 3], "to": [12, 8, 4], "faces": { - "north": {"uv": [11, 0, 12, 1], "texture": "#0"}, + "north": {"uv": [8, 1, 9, 2], "texture": "#0"}, "east": {"uv": [10, 0, 11, 1], "texture": "#0"}, "south": {"uv": [11, 8, 12, 9], "texture": "#0"}, "west": {"uv": [4, 0, 5, 1], "texture": "#0"}, @@ -26,7 +26,7 @@ "from": [4, 7, 3], "to": [5, 8, 4], "faces": { - "north": {"uv": [11, 0, 12, 1], "texture": "#0"}, + "north": {"uv": [14, 1, 15, 2], "texture": "#0"}, "east": {"uv": [10, 0, 11, 1], "texture": "#0"}, "south": {"uv": [11, 8, 12, 9], "texture": "#0"}, "west": {"uv": [4, 0, 5, 1], "texture": "#0"}, @@ -39,11 +39,11 @@ "from": [9, 8, 3], "to": [11, 9, 4], "faces": { - "north": {"uv": [7, 0, 9, 1], "texture": "#0"}, + "north": {"uv": [3, 1, 5, 2], "texture": "#0"}, "east": {"uv": [6, 0, 7, 1], "texture": "#0"}, "south": {"uv": [7, 0, 9, 1], "texture": "#0"}, "west": {"uv": [7, 0, 8, 1], "texture": "#0"}, - "up": {"uv": [7, 1, 9, 2], "texture": "#0"}, + "up": {"uv": [6, 1, 8, 2], "texture": "#0"}, "down": {"uv": [7, 0, 9, 1], "texture": "#0"} } }, @@ -52,7 +52,7 @@ "from": [7, 7, 3], "to": [9, 8, 4], "faces": { - "north": {"uv": [7, 0, 9, 1], "texture": "#0"}, + "north": {"uv": [7, 1, 9, 2], "texture": "#0"}, "east": {"uv": [6, 0, 7, 1], "texture": "#0"}, "south": {"uv": [7, 0, 9, 1], "texture": "#0"}, "west": {"uv": [7, 0, 8, 1], "texture": "#0"}, @@ -66,11 +66,11 @@ "to": [7, 9, 4], "rotation": {"angle": 0, "axis": "y", "origin": [4, 8, 8]}, "faces": { - "north": {"uv": [7, 0, 9, 1], "texture": "#0"}, + "north": {"uv": [10, 1, 12, 2], "texture": "#0"}, "east": {"uv": [6, 0, 7, 1], "texture": "#0"}, "south": {"uv": [7, 0, 9, 1], "texture": "#0"}, "west": {"uv": [7, 0, 8, 1], "texture": "#0"}, - "up": {"uv": [12, 1, 14, 2], "texture": "#0"}, + "up": {"uv": [10, 1, 12, 2], "texture": "#0"}, "down": {"uv": [7, 0, 9, 1], "texture": "#0"} } }, @@ -79,7 +79,7 @@ "from": [9, 6, 3], "to": [11, 7, 4], "faces": { - "north": {"uv": [7, 0, 9, 1], "texture": "#0"}, + "north": {"uv": [13, 14, 15, 15], "texture": "#0"}, "east": {"uv": [6, 0, 7, 1], "texture": "#0"}, "south": {"uv": [7, 0, 9, 1], "texture": "#0"}, "west": {"uv": [7, 0, 8, 1], "texture": "#0"}, @@ -93,7 +93,7 @@ "to": [7, 7, 4], "rotation": {"angle": 0, "axis": "y", "origin": [4, 8, 8]}, "faces": { - "north": {"uv": [7, 0, 9, 1], "texture": "#0"}, + "north": {"uv": [13, 14, 15, 15], "texture": "#0"}, "east": {"uv": [6, 0, 7, 1], "texture": "#0"}, "south": {"uv": [7, 0, 9, 1], "texture": "#0"}, "west": {"uv": [7, 0, 8, 1], "texture": "#0"}, @@ -103,8 +103,9 @@ }, { "name": "glass", - "from": [5, 7, 3.5], - "to": [11, 8, 3.5], + "from": [5, 7, 3.3], + "to": [11, 8, 3.3], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 7.8]}, "faces": { "north": {"uv": [1, 0, 7, 1], "texture": "#1"}, "east": {"uv": [11, 0, 11.2, 1], "texture": "#1"}, diff --git a/src/main/resources/assets/create/textures/item/builders_tea.png b/src/main/resources/assets/create/textures/item/builders_tea.png index 57428406785fc8401143f1fbfa17537a3d90d756..55870a490ae49ee016db6daf70625003f7e444f8 100644 GIT binary patch delta 372 zcmV-)0gL{a0)zvQ8Gi-<001BJ|6u?C00DDSM?wIu&K&6g00BNpL_t(IjpdQQO9EjS z$3GV>88~E0dZ30#4uO9`3Awd8v?Mh24@m26Nkbs6O%b@}6x0Y{122H8BuOzMA%MQA3VJ}Vt+re?f=iO)8tEgj5-Tq z`3Uc$FW&BKpSQ6}?i)+d8#^4TTZ;E$`3R%V0)U-V^!EgPV<{$g|EZwW?&*q|}67Y6Qrk0-lIhnTIg)pWqwzkc*xT So{Up978mMr=E2bJ8HnfdO^OXU{^IYE1-;PsdM_Nm#pW$qNUg(3MK^4&J7#FEXm%Pdsq*;hTNYc?TSFR^M@u ywmkHKV?p5OhF#|`O+3f^W8?GHZ1Ya-VfcB8GrC6g;bowO44$rjF6*2U7@Gi{I&3ch diff --git a/src/main/resources/assets/create/textures/item/chocolate_glazed_berries.png b/src/main/resources/assets/create/textures/item/chocolate_glazed_berries.png new file mode 100644 index 0000000000000000000000000000000000000000..29e0f3c161ea1967184c359eb490343ec95b850c GIT binary patch literal 427 zcmV;c0aX5pP)Px$Wl2OqR5*>zk}*pHVI0PPZ-^+A9;K0K2!Wt3H8{97xH|L=oNVdq1TFOq8d{YI zmmC_hL2rtVu8g}=?leeDcpK!7JLTqjrWfA#dH&D;d0zNyh_H)Bxgy>3b^kH+T_lWL zFUHAdl4wH*sK_vpjWFeWCJBIM|DYRMK-}*x;Yn9$`$Aqm#aucLD)8fnEwK+}$~7NWZ^KzHJZV2yDuIx6a&DGsWKvNzcd z1iJxHOQq#>KBqfzJZt_MUA%Q)1Oz{p=fF?a4UNtqvR30NIS}G1YN@ohrF2s+aSyMV?GxCu8P z-GZ|&#s##v00(v8KtX~76-_Zj0wIvW>!b?tZ(MptXK>GV4+s9Y29Be8<+6HolY11- znMVY`QL_3*&v#ENu8q*}<5QgMUlht-hwN&C`HaiClAvmTfW8c>@4VFQ`$n$7R zN!~PRO9{Xs3^9bDZdm{v(=^lQ>14*fuNgw9X_D|Un=uiBg0AE3_vZ%y&y@;a>-F^p zL)TUPR*T7EL0H|gIHoDfAfTY@yfhlrEsM8KhbWHEZ88lGVaWS0c{HDEL)TSpDf!&( xm@F2IHXCgj1nSiGYQ#$o97lQkeP*z~sUP)^gQFE$>zn`p002ovPDHLkV1ghdon-(3 delta 349 zcmV-j0iyng1BC;SF@HZvL_t(IjopwzYQjJmgeipT zTgxWr0D$L4<0|ALz!gHhG@FQ}gvA(iLast;fS=AL=lDv~@_+3Tqylh-P-&LIrWC6@ zhfOH}z+&twL^}_Y!9b0>U99pPv6L`5$LD^JhgJ)7&np*nLU1e!ETTxOB-kVgW>=0076LsGM+r9u`rg>4d0No@4HLSP}w@F$7^)8UVm!r-P5}w%)D?7obl z9z_6IBRX(5(O`J;?hA%Na0a^O!*}1K7;dX9_#fFIm?11M1u)I%8qp2ZR{DZs5hDWw z14DbH)&Hn$eTHRIFTy1%mmfnhs6Eo^Ka34iTeV*}{A2IZ9iD0m+`v$c` zh@sa;km1E+NDP!t_r{PraO6D$JPagcd7-unF{r7kLKR+Mz$f?O@n?hqmCKJYzIgok ze{ZB5gOvU|1~LW)28OKtdXy97;gt+vvgr3Z{SpF z{z*hZR5(v#{Qv(y13AD+S@6Fw7aIc;lur_H*OmUSr6|U*`tnOgl3d`fBlZ8=_wNjn zJRA(GEkr5J(p?VVkpMUwmz{SbQ zuAD2_%74PamZ0E;Mv UJ>mpbg8%>k07*qoM6N<$f&hw%>;M1& diff --git a/src/main/resources/assets/create/textures/item/goggles_model.png b/src/main/resources/assets/create/textures/item/goggles_model.png new file mode 100644 index 0000000000000000000000000000000000000000..bf6467f88cdeff586de4cb5b3c6c48676c39e188 GIT binary patch literal 361 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1quc!GE4Ejv*HQ$$$R;w`aCI;2HU0zk#?kv+xvu zp@QpE|E*uDacsk{Pu^~mVjiqh{`&v+_xC)LY-D&=>)EBVbPAdr2zCAOzh2Fa%}gwe zjZrSGEp_?42Gc_fizjQz-{`2_Znwz8Vg=W~=Z_vGJz%aXI{I_DM$rj|H%$(@7yr+R z(czh2XJBZs`Csw_maIn)o+U*TywLOOHE<}?IlvIPv4P1!??AhA$&r87TAUBc)XaQO zNU&_0d-dOL#>E0>9GO`TH%t^1>RVVP^nZT+&w~e!o;Px$$Vo&&R5*>bkWFh7Q51%so5Yz(Z1dqFQ>oNKMU)H_L2+L&T|{uxjeEBi6#NJN z0CB5(36vnpAW5Oic9CuZnZsI^XyqiPFtaHaj?Ihr zX`LkzC7xa-p0Fjr7of70^j+i+dLqB0qnaJ+e*-iT;o7}(2{w;jKE^JVaJ~xGZh88w zp;93!IUBJ5{ak$hqZ4yLWh*JyR>x!w6@X0Ptv5I+)3r?Ba;HARX)5FodLrOpz9o|@ z(6vmu=I+AZJN3~*&kynNC<=gGERo3-0*~hRtfAsG72ehQi-3#vSlQY z3j%&ABd(%xcogM+LZw{=7-1JnUJgo%xGY*seT}#X*oh}ui9~5@uFUn9{l1lO0X*?+%HE(C8t6Zr-*>{NM|&rJ Q;{X5v07*qoM6N<$g3HkA;Q#;t literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/create/textures/item/sweet_roll.png b/src/main/resources/assets/create/textures/item/sweet_roll.png new file mode 100644 index 0000000000000000000000000000000000000000..7fdf41754b913d90ae09e4260e034333b0b83bc1 GIT binary patch literal 417 zcmV;S0bc%zP)Px$TS-JgR5*>zlCf&SP!xtgZI@=u(i$X@vnWo2;N%c8b!eAP(#dy_w$D&^X`evE z!9|DSU>&4`Ah;-W2^u7Ia%=3C4%Rdpo!bK!?mhROpYQ*<@YfYPcG0d^{qXtv_WtPG z$l#~@=KEhxWbKPa2-@|kZ<$3DHOX{5#I|h!M1*XvfVW!E>koElPQwBs0zjwLz%q+u za|Hmr)q+l|!PQMELLA?2nq|XJ=^Bcf1VB-fc&i1|@sM7BfMpi(RtrRgX4&u~0su3| z1;8?kbXpA*HAza>*xH&oE-78xAqXstmT+d Date: Wed, 3 Mar 2021 02:34:57 +0100 Subject: [PATCH 22/24] Fixed honey bottles on belt/depots --- src/generated/resources/.cache/cache | 4 +- .../create/blockstates/radial_chassis.json | 72 +++++++++---------- .../create/tags/items/upright_on_belt.json | 3 +- .../java/com/simibubi/create/AllTags.java | 3 +- 4 files changed, 42 insertions(+), 40 deletions(-) diff --git a/src/generated/resources/.cache/cache b/src/generated/resources/.cache/cache index c4027857d..3f277f4a4 100644 --- a/src/generated/resources/.cache/cache +++ b/src/generated/resources/.cache/cache @@ -337,7 +337,7 @@ e8b0a401c10d1ba67ed71ba31bd5f9bc28571b65 assets/create/blockstates/powered_toggl d06cd9a1101b18d306a786320aab12018b1325d6 assets/create/blockstates/purple_sail.json 92957119abd5fbcca36a113b2a80255fd70fc303 assets/create/blockstates/purple_seat.json 61035f8afe75ff7bbd291da5d8690bcbebe679eb assets/create/blockstates/purple_valve_handle.json -4439fc83a8c7370ab44b211a3fd48abde20a4728 assets/create/blockstates/radial_chassis.json +6fa36883e76e9e403bb429c8f86b8c0d3bba0cff assets/create/blockstates/radial_chassis.json 45877c4d90a7185c2f304edbd67379d800920439 assets/create/blockstates/red_sail.json da1b08387af7afa0855ee8d040f620c01f20660a assets/create/blockstates/red_seat.json 722fc77bbf387af8a4016e42cbf9501d2b968881 assets/create/blockstates/red_valve_handle.json @@ -3547,7 +3547,7 @@ eac71740fb12bdb38b5dfaa2268613d7ba82b809 data/create/tags/blocks/windmill_sails. 081f5aa35602fc27af2ca01ea9f2fd5e7eb284dc data/create/tags/items/create_ingots.json 94c62bf22678ef55b2b8a5398a7960e5b00682dc data/create/tags/items/crushed_ores.json 6cdeeac1689f7b5bfd9bc40b462143d8eaf3ad0b data/create/tags/items/seats.json -43ae6f21db7b43984e163af11f4e6cc80459803a data/create/tags/items/upright_on_belt.json +c7efc23c08d5e3602c84ff43dac18f72b1cfced3 data/create/tags/items/upright_on_belt.json 50936b211d94167a35ec78c89954082a336b6269 data/create/tags/items/valve_handles.json 16bcb8fcbe9170c2c11f1ca8d99d8b36cd812bbd data/forge/tags/blocks/glass/colorless.json 81ced867d24ec814942909965dd4576eff1db685 data/forge/tags/blocks/glass_panes.json diff --git a/src/generated/resources/assets/create/blockstates/radial_chassis.json b/src/generated/resources/assets/create/blockstates/radial_chassis.json index 8bd829ffc..f97d8c8bc 100644 --- a/src/generated/resources/assets/create/blockstates/radial_chassis.json +++ b/src/generated/resources/assets/create/blockstates/radial_chassis.json @@ -89,8 +89,8 @@ }, { "when": { - "axis": "x", - "sticky_west": "true" + "sticky_west": "true", + "axis": "x" }, "apply": { "model": "create:block/radial_chassis_side_x_sticky", @@ -99,8 +99,8 @@ }, { "when": { - "axis": "y", - "sticky_west": "true" + "sticky_west": "true", + "axis": "y" }, "apply": { "model": "create:block/radial_chassis_side_y_sticky", @@ -109,8 +109,8 @@ }, { "when": { - "axis": "z", - "sticky_west": "true" + "sticky_west": "true", + "axis": "z" }, "apply": { "model": "create:block/radial_chassis_side_z_sticky", @@ -119,8 +119,8 @@ }, { "when": { - "axis": "x", - "sticky_west": "false" + "sticky_west": "false", + "axis": "x" }, "apply": { "model": "create:block/radial_chassis_side_x", @@ -129,8 +129,8 @@ }, { "when": { - "axis": "y", - "sticky_west": "false" + "sticky_west": "false", + "axis": "y" }, "apply": { "model": "create:block/radial_chassis_side_y", @@ -139,8 +139,8 @@ }, { "when": { - "axis": "z", - "sticky_west": "false" + "sticky_west": "false", + "axis": "z" }, "apply": { "model": "create:block/radial_chassis_side_z", @@ -149,8 +149,8 @@ }, { "when": { - "axis": "x", - "sticky_north": "true" + "sticky_north": "true", + "axis": "x" }, "apply": { "model": "create:block/radial_chassis_side_x_sticky" @@ -158,8 +158,8 @@ }, { "when": { - "axis": "y", - "sticky_north": "true" + "sticky_north": "true", + "axis": "y" }, "apply": { "model": "create:block/radial_chassis_side_y_sticky", @@ -168,8 +168,8 @@ }, { "when": { - "axis": "z", - "sticky_north": "true" + "sticky_north": "true", + "axis": "z" }, "apply": { "model": "create:block/radial_chassis_side_x_sticky", @@ -178,8 +178,8 @@ }, { "when": { - "axis": "x", - "sticky_north": "false" + "sticky_north": "false", + "axis": "x" }, "apply": { "model": "create:block/radial_chassis_side_x" @@ -187,8 +187,8 @@ }, { "when": { - "axis": "y", - "sticky_north": "false" + "sticky_north": "false", + "axis": "y" }, "apply": { "model": "create:block/radial_chassis_side_y", @@ -197,8 +197,8 @@ }, { "when": { - "axis": "z", - "sticky_north": "false" + "sticky_north": "false", + "axis": "z" }, "apply": { "model": "create:block/radial_chassis_side_x", @@ -207,8 +207,8 @@ }, { "when": { - "axis": "x", - "sticky_east": "true" + "sticky_east": "true", + "axis": "x" }, "apply": { "model": "create:block/radial_chassis_side_x_sticky", @@ -217,8 +217,8 @@ }, { "when": { - "axis": "y", - "sticky_east": "true" + "sticky_east": "true", + "axis": "y" }, "apply": { "model": "create:block/radial_chassis_side_y_sticky", @@ -227,8 +227,8 @@ }, { "when": { - "axis": "z", - "sticky_east": "true" + "sticky_east": "true", + "axis": "z" }, "apply": { "model": "create:block/radial_chassis_side_z_sticky" @@ -236,8 +236,8 @@ }, { "when": { - "axis": "x", - "sticky_east": "false" + "sticky_east": "false", + "axis": "x" }, "apply": { "model": "create:block/radial_chassis_side_x", @@ -246,8 +246,8 @@ }, { "when": { - "axis": "y", - "sticky_east": "false" + "sticky_east": "false", + "axis": "y" }, "apply": { "model": "create:block/radial_chassis_side_y", @@ -256,8 +256,8 @@ }, { "when": { - "axis": "z", - "sticky_east": "false" + "sticky_east": "false", + "axis": "z" }, "apply": { "model": "create:block/radial_chassis_side_z" diff --git a/src/generated/resources/data/create/tags/items/upright_on_belt.json b/src/generated/resources/data/create/tags/items/upright_on_belt.json index 83603f5b0..0aa3286d8 100644 --- a/src/generated/resources/data/create/tags/items/upright_on_belt.json +++ b/src/generated/resources/data/create/tags/items/upright_on_belt.json @@ -7,6 +7,7 @@ "minecraft:glass_bottle", "minecraft:potion", "minecraft:splash_potion", - "minecraft:lingering_potion" + "minecraft:lingering_potion", + "minecraft:honey_bottle" ] } \ No newline at end of file diff --git a/src/main/java/com/simibubi/create/AllTags.java b/src/main/java/com/simibubi/create/AllTags.java index 71bf7c9d2..f7ca2802d 100644 --- a/src/main/java/com/simibubi/create/AllTags.java +++ b/src/main/java/com/simibubi/create/AllTags.java @@ -176,7 +176,8 @@ public class AllTags { AllItemTags.CREATE_INGOTS.includeIn(AllItemTags.BEACON_PAYMENT); AllItemTags.CREATE_INGOTS.includeIn(AllItemTags.INGOTS); - AllItemTags.UPRIGHT_ON_BELT.add(Items.GLASS_BOTTLE, Items.POTION, Items.SPLASH_POTION, Items.LINGERING_POTION); + AllItemTags.UPRIGHT_ON_BELT.add(Items.GLASS_BOTTLE, Items.POTION, Items.SPLASH_POTION, Items.LINGERING_POTION, + Items.field_226638_pX_); AllBlockTags.WINDMILL_SAILS.includeAll(BlockTags.WOOL); From c1c6e5e04677387c06c27ccdad20a9dba4ccde71 Mon Sep 17 00:00:00 2001 From: simibubi <31564874+simibubi@users.noreply.github.com> Date: Wed, 3 Mar 2021 05:21:58 +0100 Subject: [PATCH 23/24] Controlled attachment - Added the Sticker, a redstone-driven block attachment component - Fixed lighting of TileEntities lowered by a pulley --- src/generated/resources/.cache/cache | 35 ++-- .../create/blockstates/radial_chassis.json | 72 ++++---- .../assets/create/blockstates/sticker.json | 108 ++++++++++++ .../resources/assets/create/lang/en_ud.json | 1 + .../resources/assets/create/lang/en_us.json | 1 + .../assets/create/lang/unfinished/de_de.json | 3 +- .../assets/create/lang/unfinished/es_es.json | 3 +- .../assets/create/lang/unfinished/es_mx.json | 3 +- .../assets/create/lang/unfinished/fr_fr.json | 3 +- .../assets/create/lang/unfinished/it_it.json | 3 +- .../assets/create/lang/unfinished/ja_jp.json | 3 +- .../assets/create/lang/unfinished/ko_kr.json | 3 +- .../assets/create/lang/unfinished/nl_nl.json | 3 +- .../assets/create/lang/unfinished/pt_br.json | 3 +- .../assets/create/lang/unfinished/ru_ru.json | 3 +- .../assets/create/lang/unfinished/zh_cn.json | 3 +- .../assets/create/lang/unfinished/zh_tw.json | 3 +- .../assets/create/models/item/sticker.json | 3 + .../crafting/kinetics/sticker.json | 32 ++++ .../create/loot_tables/blocks/sticker.json | 19 ++ .../recipes/crafting/kinetics/sticker.json | 24 +++ .../com/simibubi/create/AllBlockPartials.java | 2 + .../java/com/simibubi/create/AllBlocks.java | 10 ++ .../com/simibubi/create/AllTileEntities.java | 8 + .../category/animations/AnimatedKinetics.java | 2 +- .../category/animations/AnimatedMixer.java | 2 +- .../category/animations/AnimatedPress.java | 2 +- .../category/animations/AnimatedSpout.java | 2 +- .../base/KineticTileEntityRenderer.java | 2 +- .../components/actors/DrillRenderer.java | 2 +- .../components/actors/HarvesterRenderer.java | 2 +- .../components/deployer/DeployerRenderer.java | 4 +- .../components/fan/EncasedFanRenderer.java | 2 +- .../mixer/MechanicalMixerRenderer.java | 2 +- .../BlockMovementTraits.java | 7 + .../structureMovement/Contraption.java | 61 ++++--- .../ContraptionEntityRenderer.java | 2 +- .../chassis/StickerBlock.java | 162 ++++++++++++++++++ .../chassis/StickerRenderer.java | 48 ++++++ .../chassis/StickerTileEntity.java | 94 ++++++++++ .../gantry/GantryPinionRenderer.java | 2 +- .../processing/BasinRenderer.java | 2 +- .../burner/BlazeBurnerRenderer.java | 2 +- .../relays/belt/BeltRenderer.java | 2 +- .../relays/encased/SplitShaftRenderer.java | 2 +- .../relays/gearbox/GearboxRenderer.java | 2 +- .../wrench/WrenchItemRenderer.java | 2 +- .../curiosities/ChromaticCompoundColor.java | 2 +- .../curiosities/symmetry/SymmetryHandler.java | 2 +- .../client/SymmetryWandItemRenderer.java | 2 +- .../tools/DeforesterItemRenderer.java | 2 +- .../tools/ExtendoGripItemRenderer.java | 2 +- .../blockzapper/BlockzapperItemRenderer.java | 2 +- .../WorldshaperItemRenderer.java | 2 +- .../block/mechanicalArm/ArmRenderer.java | 2 +- .../data/recipe/StandardRecipeGen.java | 11 +- .../render/TileEntityRenderHelper.java | 1 + .../render/backend/gl/BasicProgram.java | 2 +- .../utility/AnimationTickHolder.java | 2 +- .../create/models/block/sticker/block.json | 71 ++++++++ .../models/block/sticker/block_powered.json | 6 + .../create/models/block/sticker/head.json | 41 +++++ .../create/models/block/sticker/item.json | 104 +++++++++++ .../models/block/sticker/sticker.bbmodel | 1 + .../assets/create/textures/block/sticker.png | Bin 0 -> 1509 bytes .../create/textures/block/sticker_side.png | Bin 0 -> 6761 bytes .../textures/block/sticker_side_powered.png | Bin 0 -> 6836 bytes 67 files changed, 902 insertions(+), 114 deletions(-) create mode 100644 src/generated/resources/assets/create/blockstates/sticker.json create mode 100644 src/generated/resources/assets/create/models/item/sticker.json create mode 100644 src/generated/resources/data/create/advancements/recipes/create.base/crafting/kinetics/sticker.json create mode 100644 src/generated/resources/data/create/loot_tables/blocks/sticker.json create mode 100644 src/generated/resources/data/create/recipes/crafting/kinetics/sticker.json create mode 100644 src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/chassis/StickerBlock.java create mode 100644 src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/chassis/StickerRenderer.java create mode 100644 src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/chassis/StickerTileEntity.java create mode 100644 src/main/resources/assets/create/models/block/sticker/block.json create mode 100644 src/main/resources/assets/create/models/block/sticker/block_powered.json create mode 100644 src/main/resources/assets/create/models/block/sticker/head.json create mode 100644 src/main/resources/assets/create/models/block/sticker/item.json create mode 100644 src/main/resources/assets/create/models/block/sticker/sticker.bbmodel create mode 100644 src/main/resources/assets/create/textures/block/sticker.png create mode 100644 src/main/resources/assets/create/textures/block/sticker_side.png create mode 100644 src/main/resources/assets/create/textures/block/sticker_side_powered.png diff --git a/src/generated/resources/.cache/cache b/src/generated/resources/.cache/cache index 3f277f4a4..5edcb82e1 100644 --- a/src/generated/resources/.cache/cache +++ b/src/generated/resources/.cache/cache @@ -337,7 +337,7 @@ e8b0a401c10d1ba67ed71ba31bd5f9bc28571b65 assets/create/blockstates/powered_toggl d06cd9a1101b18d306a786320aab12018b1325d6 assets/create/blockstates/purple_sail.json 92957119abd5fbcca36a113b2a80255fd70fc303 assets/create/blockstates/purple_seat.json 61035f8afe75ff7bbd291da5d8690bcbebe679eb assets/create/blockstates/purple_valve_handle.json -6fa36883e76e9e403bb429c8f86b8c0d3bba0cff assets/create/blockstates/radial_chassis.json +4439fc83a8c7370ab44b211a3fd48abde20a4728 assets/create/blockstates/radial_chassis.json 45877c4d90a7185c2f304edbd67379d800920439 assets/create/blockstates/red_sail.json da1b08387af7afa0855ee8d040f620c01f20660a assets/create/blockstates/red_seat.json 722fc77bbf387af8a4016e42cbf9501d2b968881 assets/create/blockstates/red_valve_handle.json @@ -371,6 +371,7 @@ e815bfd854c2653f10828bb11950f7fb991d7efc assets/create/blockstates/speedometer.j 1cb7cdbefa0ff199263782809287854b9d85074c assets/create/blockstates/spout.json d62b7908119fa4f51715a186d0882b388bb25cab assets/create/blockstates/spruce_window.json 8d7dfa60630a8b4bae4e8eca5c66e1cfa34dda1f assets/create/blockstates/spruce_window_pane.json +5d7385d28a23dcfc95a221d36d82337908582726 assets/create/blockstates/sticker.json 3d93eabbb327aecc526beae9c62283f1d43eb710 assets/create/blockstates/sticky_mechanical_piston.json f385988cb6fa9c48b5d59a6942ec50ed2b60c8bf assets/create/blockstates/stockpile_switch.json e815bfd854c2653f10828bb11950f7fb991d7efc assets/create/blockstates/stressometer.json @@ -400,20 +401,20 @@ a3a11524cd3515fc01d905767b4b7ea782adaf03 assets/create/blockstates/yellow_seat.j 6801fa1f466f172700e573e5b8ee8ee5f9ca4583 assets/create/blockstates/yellow_valve_handle.json 7f39521b211441f5c3e06d60c5978cebe16cacfb assets/create/blockstates/zinc_block.json b7181bcd8182b2f17088e5aa881f374c9c65470c assets/create/blockstates/zinc_ore.json -00e2b77dcc86224cd5a33aefaac01f20c90bcb40 assets/create/lang/en_ud.json -55638abca6ffa48e1059f2578ea6d76b8327f496 assets/create/lang/en_us.json -374dd193cb26eb590a4a66bf5c8e13f9743ddbdb assets/create/lang/unfinished/de_de.json -84b205e2a8c9539ab6da68aa8f7c91f1dbec0702 assets/create/lang/unfinished/es_es.json -3397c2fed7517a4c9b3b41ee081abb120ddf9b3b assets/create/lang/unfinished/es_mx.json -e61eb3ca3d279c438275fb50333b135560574e62 assets/create/lang/unfinished/fr_fr.json -eaa202ec1821372b5f26d724e7c58d710fda7f5b assets/create/lang/unfinished/it_it.json -d1627e59cf6cf5ac2382397a7db416e75072ac31 assets/create/lang/unfinished/ja_jp.json -39f4258b8d9d56c5d7e5761065081d69ab07d4d8 assets/create/lang/unfinished/ko_kr.json -402c16cffdd530dfde3e016691720145cc66c7a1 assets/create/lang/unfinished/nl_nl.json -73f22223f6d30068ac2bc3f9be02e43f7fe4cae0 assets/create/lang/unfinished/pt_br.json -015a444814ec9982c35d08a3705df3861ce2545e assets/create/lang/unfinished/ru_ru.json -38ed221082ce3ce7b4f6c93ec28b7e89a95cab06 assets/create/lang/unfinished/zh_cn.json -e51b6bd8cd9696858a417d3d9472a263e9268dd8 assets/create/lang/unfinished/zh_tw.json +369f9c6fce0aa11d70efa2e73a4ba2ff12e57e37 assets/create/lang/en_ud.json +10f9c238cdc8b68246c5663bc9745942d1014927 assets/create/lang/en_us.json +c46eabdb4476c18f539c95c24259a3fe1ee9cbff assets/create/lang/unfinished/de_de.json +551cd06b553080815a129d6b113473efde3fb5ac assets/create/lang/unfinished/es_es.json +1bac8afa8f92030077db8d921fd9dda30c0e8a5a assets/create/lang/unfinished/es_mx.json +d62993dd6f73224cbc17f04ea96022c4ac385dc4 assets/create/lang/unfinished/fr_fr.json +749274555f9b3edc9d7799a7147d724fd7993c66 assets/create/lang/unfinished/it_it.json +7e9723798c1459780b2814145eb6a0dc681a2281 assets/create/lang/unfinished/ja_jp.json +2d1da43b76d2184df5b183641241478e1c101218 assets/create/lang/unfinished/ko_kr.json +9cea3a5a2fe4e2c6d966f3c91b24e9d6595a9cc6 assets/create/lang/unfinished/nl_nl.json +e7299620ca48f296d678c87470358816f23d7578 assets/create/lang/unfinished/pt_br.json +6fd3ef5962b10f83e5df7dd0fbdb50cadee1a06b assets/create/lang/unfinished/ru_ru.json +b0688d7e4c593c0ed4fc87ea0b4e52205dcdeec8 assets/create/lang/unfinished/zh_cn.json +ff1c97c854da7b7bfe6be829c9bf6a787f6dfacd assets/create/lang/unfinished/zh_tw.json 846200eb548d3bfa2e77b41039de159b4b6cfb45 assets/create/models/block/acacia_window.json 1930fa3a3c98d53dd19e4ee7f55bc27fd47aa281 assets/create/models/block/acacia_window_pane_noside.json 1763ea2c9b981d187f5031ba608f3d5d3be3986a assets/create/models/block/acacia_window_pane_noside_alt.json @@ -1544,6 +1545,7 @@ d6fb0d38b1b5bcc199b52ac8889eaecd167f6725 assets/create/models/item/speedometer.j b9abe1331d49871838231f3a8e5d2973634e9325 assets/create/models/item/spout.json b305e81f1dc5272634745b6e822af40955a2ef28 assets/create/models/item/spruce_window.json 5f622bca8386b8dd077310647e39ac3abb80c6a1 assets/create/models/item/spruce_window_pane.json +bb546e5342c6d1a6b4040cf7ccdd2f10c6f79965 assets/create/models/item/sticker.json 891abc24593d53d282773eca5534065056d89b4c assets/create/models/item/sticky_mechanical_piston.json bbb5773adc23128c70174bfc531af936e6e063e3 assets/create/models/item/stockpile_switch.json bab8f78c319b2a79ed55c5d2a94b521ddaa44996 assets/create/models/item/stressometer.json @@ -1816,6 +1818,7 @@ cd8cefee21a1690f9158b8e8661a92d20ad0f535 data/create/advancements/recipes/create e8a5d924ccf30b6eae4b9ec0a8040e31f0eb165b data/create/advancements/recipes/create.base/crafting/kinetics/speedometer.json 90ff137eb1533695d9d17296ed180c0a88ddd891 data/create/advancements/recipes/create.base/crafting/kinetics/speedometerfrom_conversion.json 44867af16ec6d960268747effcd578ab55e3a366 data/create/advancements/recipes/create.base/crafting/kinetics/spout.json +8c7fd72b8b4d414a61859dd08857e8538d84f88b data/create/advancements/recipes/create.base/crafting/kinetics/sticker.json 3859abc8839e92b01461d3e9ef853a4934c3256b data/create/advancements/recipes/create.base/crafting/kinetics/sticky_mechanical_piston.json 9a4dad31370d9e71308afe5c3f9349b67f749635 data/create/advancements/recipes/create.base/crafting/kinetics/stressometerfrom_conversion.json f3fc3d4fee0712906f833aa17185f0bacb21922f data/create/advancements/recipes/create.base/crafting/kinetics/super_glue.json @@ -2665,6 +2668,7 @@ b127cb6920e6d7d9c8b2402cb186402a9a8dd3fc data/create/loot_tables/blocks/shaft.js f6c497d625de67ea9377e840208b1be539d13b73 data/create/loot_tables/blocks/spout.json a23a1e332c9ba84474e3c0588e8a0857afe346e0 data/create/loot_tables/blocks/spruce_window.json 3ee2350936ea82fef716bc58e4cd088a384616f0 data/create/loot_tables/blocks/spruce_window_pane.json +111a3bb893abb899652a923b10ca7dc5ea424e5f data/create/loot_tables/blocks/sticker.json 8d2970acd61b96844a4308d87e858b1612d5862e data/create/loot_tables/blocks/sticky_mechanical_piston.json ec2889e712702644092197a4b41a682fb953817d data/create/loot_tables/blocks/stockpile_switch.json 3479775008a256bc35f98b31655975f7d5c836b2 data/create/loot_tables/blocks/stressometer.json @@ -2876,6 +2880,7 @@ a17db27e61baa45f8a6ecb46a6d2a5a464704f8b data/create/recipes/crafting/kinetics/s b1a74f0b51fa37ca1ed814266b3d69b8b7e69fa3 data/create/recipes/crafting/kinetics/speedometer.json 8d632845deeb723e1a56083536ee5f9d60de2fcb data/create/recipes/crafting/kinetics/speedometerfrom_conversion.json eea9d4066cd2fafef40b50b79323dcc603fa6388 data/create/recipes/crafting/kinetics/spout.json +e532a5c405e48b415e3fcd4f7c6183ea335cb915 data/create/recipes/crafting/kinetics/sticker.json 3be40664acfd150d0617bc138dc2dd9d54a21b3a data/create/recipes/crafting/kinetics/sticky_mechanical_piston.json af5854ee2fa3be195ad9abcdeebe6ed7306b651c data/create/recipes/crafting/kinetics/stressometerfrom_conversion.json 21f885a674603367b67e1e993c175638cbda9ea3 data/create/recipes/crafting/kinetics/super_glue.json diff --git a/src/generated/resources/assets/create/blockstates/radial_chassis.json b/src/generated/resources/assets/create/blockstates/radial_chassis.json index f97d8c8bc..8bd829ffc 100644 --- a/src/generated/resources/assets/create/blockstates/radial_chassis.json +++ b/src/generated/resources/assets/create/blockstates/radial_chassis.json @@ -89,8 +89,8 @@ }, { "when": { - "sticky_west": "true", - "axis": "x" + "axis": "x", + "sticky_west": "true" }, "apply": { "model": "create:block/radial_chassis_side_x_sticky", @@ -99,8 +99,8 @@ }, { "when": { - "sticky_west": "true", - "axis": "y" + "axis": "y", + "sticky_west": "true" }, "apply": { "model": "create:block/radial_chassis_side_y_sticky", @@ -109,8 +109,8 @@ }, { "when": { - "sticky_west": "true", - "axis": "z" + "axis": "z", + "sticky_west": "true" }, "apply": { "model": "create:block/radial_chassis_side_z_sticky", @@ -119,8 +119,8 @@ }, { "when": { - "sticky_west": "false", - "axis": "x" + "axis": "x", + "sticky_west": "false" }, "apply": { "model": "create:block/radial_chassis_side_x", @@ -129,8 +129,8 @@ }, { "when": { - "sticky_west": "false", - "axis": "y" + "axis": "y", + "sticky_west": "false" }, "apply": { "model": "create:block/radial_chassis_side_y", @@ -139,8 +139,8 @@ }, { "when": { - "sticky_west": "false", - "axis": "z" + "axis": "z", + "sticky_west": "false" }, "apply": { "model": "create:block/radial_chassis_side_z", @@ -149,8 +149,8 @@ }, { "when": { - "sticky_north": "true", - "axis": "x" + "axis": "x", + "sticky_north": "true" }, "apply": { "model": "create:block/radial_chassis_side_x_sticky" @@ -158,8 +158,8 @@ }, { "when": { - "sticky_north": "true", - "axis": "y" + "axis": "y", + "sticky_north": "true" }, "apply": { "model": "create:block/radial_chassis_side_y_sticky", @@ -168,8 +168,8 @@ }, { "when": { - "sticky_north": "true", - "axis": "z" + "axis": "z", + "sticky_north": "true" }, "apply": { "model": "create:block/radial_chassis_side_x_sticky", @@ -178,8 +178,8 @@ }, { "when": { - "sticky_north": "false", - "axis": "x" + "axis": "x", + "sticky_north": "false" }, "apply": { "model": "create:block/radial_chassis_side_x" @@ -187,8 +187,8 @@ }, { "when": { - "sticky_north": "false", - "axis": "y" + "axis": "y", + "sticky_north": "false" }, "apply": { "model": "create:block/radial_chassis_side_y", @@ -197,8 +197,8 @@ }, { "when": { - "sticky_north": "false", - "axis": "z" + "axis": "z", + "sticky_north": "false" }, "apply": { "model": "create:block/radial_chassis_side_x", @@ -207,8 +207,8 @@ }, { "when": { - "sticky_east": "true", - "axis": "x" + "axis": "x", + "sticky_east": "true" }, "apply": { "model": "create:block/radial_chassis_side_x_sticky", @@ -217,8 +217,8 @@ }, { "when": { - "sticky_east": "true", - "axis": "y" + "axis": "y", + "sticky_east": "true" }, "apply": { "model": "create:block/radial_chassis_side_y_sticky", @@ -227,8 +227,8 @@ }, { "when": { - "sticky_east": "true", - "axis": "z" + "axis": "z", + "sticky_east": "true" }, "apply": { "model": "create:block/radial_chassis_side_z_sticky" @@ -236,8 +236,8 @@ }, { "when": { - "sticky_east": "false", - "axis": "x" + "axis": "x", + "sticky_east": "false" }, "apply": { "model": "create:block/radial_chassis_side_x", @@ -246,8 +246,8 @@ }, { "when": { - "sticky_east": "false", - "axis": "y" + "axis": "y", + "sticky_east": "false" }, "apply": { "model": "create:block/radial_chassis_side_y", @@ -256,8 +256,8 @@ }, { "when": { - "sticky_east": "false", - "axis": "z" + "axis": "z", + "sticky_east": "false" }, "apply": { "model": "create:block/radial_chassis_side_z" diff --git a/src/generated/resources/assets/create/blockstates/sticker.json b/src/generated/resources/assets/create/blockstates/sticker.json new file mode 100644 index 000000000..1949f8b4e --- /dev/null +++ b/src/generated/resources/assets/create/blockstates/sticker.json @@ -0,0 +1,108 @@ +{ + "variants": { + "extended=false,facing=down,powered=false": { + "model": "create:block/sticker/block", + "x": 180 + }, + "extended=true,facing=down,powered=false": { + "model": "create:block/sticker/block", + "x": 180 + }, + "extended=false,facing=up,powered=false": { + "model": "create:block/sticker/block" + }, + "extended=true,facing=up,powered=false": { + "model": "create:block/sticker/block" + }, + "extended=false,facing=north,powered=false": { + "model": "create:block/sticker/block", + "x": 90 + }, + "extended=true,facing=north,powered=false": { + "model": "create:block/sticker/block", + "x": 90 + }, + "extended=false,facing=south,powered=false": { + "model": "create:block/sticker/block", + "x": 90, + "y": 180 + }, + "extended=true,facing=south,powered=false": { + "model": "create:block/sticker/block", + "x": 90, + "y": 180 + }, + "extended=false,facing=west,powered=false": { + "model": "create:block/sticker/block", + "x": 90, + "y": 270 + }, + "extended=true,facing=west,powered=false": { + "model": "create:block/sticker/block", + "x": 90, + "y": 270 + }, + "extended=false,facing=east,powered=false": { + "model": "create:block/sticker/block", + "x": 90, + "y": 90 + }, + "extended=true,facing=east,powered=false": { + "model": "create:block/sticker/block", + "x": 90, + "y": 90 + }, + "extended=false,facing=down,powered=true": { + "model": "create:block/sticker/block_powered", + "x": 180 + }, + "extended=true,facing=down,powered=true": { + "model": "create:block/sticker/block_powered", + "x": 180 + }, + "extended=false,facing=up,powered=true": { + "model": "create:block/sticker/block_powered" + }, + "extended=true,facing=up,powered=true": { + "model": "create:block/sticker/block_powered" + }, + "extended=false,facing=north,powered=true": { + "model": "create:block/sticker/block_powered", + "x": 90 + }, + "extended=true,facing=north,powered=true": { + "model": "create:block/sticker/block_powered", + "x": 90 + }, + "extended=false,facing=south,powered=true": { + "model": "create:block/sticker/block_powered", + "x": 90, + "y": 180 + }, + "extended=true,facing=south,powered=true": { + "model": "create:block/sticker/block_powered", + "x": 90, + "y": 180 + }, + "extended=false,facing=west,powered=true": { + "model": "create:block/sticker/block_powered", + "x": 90, + "y": 270 + }, + "extended=true,facing=west,powered=true": { + "model": "create:block/sticker/block_powered", + "x": 90, + "y": 270 + }, + "extended=false,facing=east,powered=true": { + "model": "create:block/sticker/block_powered", + "x": 90, + "y": 90 + }, + "extended=true,facing=east,powered=true": { + "model": "create:block/sticker/block_powered", + "x": 90, + "y": 90 + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/create/lang/en_ud.json b/src/generated/resources/assets/create/lang/en_ud.json index b9de24d4a..992efe5b8 100644 --- a/src/generated/resources/assets/create/lang/en_ud.json +++ b/src/generated/resources/assets/create/lang/en_ud.json @@ -372,6 +372,7 @@ "block.create.spout": "\u0287nodS", "block.create.spruce_window": "\u028Dopu\u0131M \u01DD\u0254n\u0279dS", "block.create.spruce_window_pane": "\u01DDu\u0250\u0500 \u028Dopu\u0131M \u01DD\u0254n\u0279dS", + "block.create.sticker": "\u0279\u01DD\u029E\u0254\u0131\u0287S", "block.create.sticky_mechanical_piston": "uo\u0287s\u0131\u0500 \u05DF\u0250\u0254\u0131u\u0250\u0265\u0254\u01DDW \u028E\u029E\u0254\u0131\u0287S", "block.create.stockpile_switch": "\u0265\u0254\u0287\u0131\u028DS \u01DD\u05DF\u0131d\u029E\u0254o\u0287S", "block.create.stressometer": "\u0279\u01DD\u0287\u01DD\u026Foss\u01DD\u0279\u0287S", diff --git a/src/generated/resources/assets/create/lang/en_us.json b/src/generated/resources/assets/create/lang/en_us.json index 50fec28fc..eff9c55ae 100644 --- a/src/generated/resources/assets/create/lang/en_us.json +++ b/src/generated/resources/assets/create/lang/en_us.json @@ -375,6 +375,7 @@ "block.create.spout": "Spout", "block.create.spruce_window": "Spruce Window", "block.create.spruce_window_pane": "Spruce Window Pane", + "block.create.sticker": "Sticker", "block.create.sticky_mechanical_piston": "Sticky Mechanical Piston", "block.create.stockpile_switch": "Stockpile Switch", "block.create.stressometer": "Stressometer", diff --git a/src/generated/resources/assets/create/lang/unfinished/de_de.json b/src/generated/resources/assets/create/lang/unfinished/de_de.json index 97b496027..e119df01b 100644 --- a/src/generated/resources/assets/create/lang/unfinished/de_de.json +++ b/src/generated/resources/assets/create/lang/unfinished/de_de.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 973", + "_": "Missing Localizations: 974", "_": "->------------------------] Game Elements [------------------------<-", @@ -376,6 +376,7 @@ "block.create.spout": "UNLOCALIZED: Spout", "block.create.spruce_window": "UNLOCALIZED: Spruce Window", "block.create.spruce_window_pane": "UNLOCALIZED: Spruce Window Pane", + "block.create.sticker": "UNLOCALIZED: Sticker", "block.create.sticky_mechanical_piston": "Klebriger Mechanischer Kolben", "block.create.stockpile_switch": "Vorratssensor", "block.create.stressometer": "UNLOCALIZED: Stressometer", diff --git a/src/generated/resources/assets/create/lang/unfinished/es_es.json b/src/generated/resources/assets/create/lang/unfinished/es_es.json index c2b82e6a5..ef8b92ed9 100644 --- a/src/generated/resources/assets/create/lang/unfinished/es_es.json +++ b/src/generated/resources/assets/create/lang/unfinished/es_es.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 15", + "_": "Missing Localizations: 16", "_": "->------------------------] Game Elements [------------------------<-", @@ -376,6 +376,7 @@ "block.create.spout": "Surtidor", "block.create.spruce_window": "Ventana de abeto", "block.create.spruce_window_pane": "Panel de ventana de abeto", + "block.create.sticker": "UNLOCALIZED: Sticker", "block.create.sticky_mechanical_piston": "Pistón mecánico pegajoso", "block.create.stockpile_switch": "Interruptor de acopio", "block.create.stressometer": "Estresómetro", diff --git a/src/generated/resources/assets/create/lang/unfinished/es_mx.json b/src/generated/resources/assets/create/lang/unfinished/es_mx.json index 6ba4f32e8..9b0d9f25f 100644 --- a/src/generated/resources/assets/create/lang/unfinished/es_mx.json +++ b/src/generated/resources/assets/create/lang/unfinished/es_mx.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 903", + "_": "Missing Localizations: 904", "_": "->------------------------] Game Elements [------------------------<-", @@ -376,6 +376,7 @@ "block.create.spout": "Canaleta", "block.create.spruce_window": "Ventana de Abeto", "block.create.spruce_window_pane": "Panel de Ventana de Abeto", + "block.create.sticker": "UNLOCALIZED: Sticker", "block.create.sticky_mechanical_piston": "Pistón Mecánico Pegajoso", "block.create.stockpile_switch": "Interruptor de Pila", "block.create.stressometer": "Estresómetro", diff --git a/src/generated/resources/assets/create/lang/unfinished/fr_fr.json b/src/generated/resources/assets/create/lang/unfinished/fr_fr.json index 6ad32e75f..ec6b5cb05 100644 --- a/src/generated/resources/assets/create/lang/unfinished/fr_fr.json +++ b/src/generated/resources/assets/create/lang/unfinished/fr_fr.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 685", + "_": "Missing Localizations: 686", "_": "->------------------------] Game Elements [------------------------<-", @@ -376,6 +376,7 @@ "block.create.spout": "UNLOCALIZED: Spout", "block.create.spruce_window": "UNLOCALIZED: Spruce Window", "block.create.spruce_window_pane": "UNLOCALIZED: Spruce Window Pane", + "block.create.sticker": "UNLOCALIZED: Sticker", "block.create.sticky_mechanical_piston": "Piston mécanique collant", "block.create.stockpile_switch": "Détecteur de stockage", "block.create.stressometer": "Stressomètre", diff --git a/src/generated/resources/assets/create/lang/unfinished/it_it.json b/src/generated/resources/assets/create/lang/unfinished/it_it.json index d13863bd4..74e8c9f8c 100644 --- a/src/generated/resources/assets/create/lang/unfinished/it_it.json +++ b/src/generated/resources/assets/create/lang/unfinished/it_it.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 20", + "_": "Missing Localizations: 21", "_": "->------------------------] Game Elements [------------------------<-", @@ -376,6 +376,7 @@ "block.create.spout": "Spruzzo", "block.create.spruce_window": "Finestra di abete", "block.create.spruce_window_pane": "Pannello di finestra di abete", + "block.create.sticker": "UNLOCALIZED: Sticker", "block.create.sticky_mechanical_piston": "Pistone meccanico appiccicoso", "block.create.stockpile_switch": "Interruttore accumulatore", "block.create.stressometer": "Stressometro", diff --git a/src/generated/resources/assets/create/lang/unfinished/ja_jp.json b/src/generated/resources/assets/create/lang/unfinished/ja_jp.json index 1a3e51cc8..b877a56ef 100644 --- a/src/generated/resources/assets/create/lang/unfinished/ja_jp.json +++ b/src/generated/resources/assets/create/lang/unfinished/ja_jp.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 27", + "_": "Missing Localizations: 28", "_": "->------------------------] Game Elements [------------------------<-", @@ -376,6 +376,7 @@ "block.create.spout": "アイテム注液口", "block.create.spruce_window": "マツの窓", "block.create.spruce_window_pane": "マツの窓パネル", + "block.create.sticker": "UNLOCALIZED: Sticker", "block.create.sticky_mechanical_piston": "粘着メカニカルピストン", "block.create.stockpile_switch": "在庫スイッチ", "block.create.stressometer": "応力メーター", diff --git a/src/generated/resources/assets/create/lang/unfinished/ko_kr.json b/src/generated/resources/assets/create/lang/unfinished/ko_kr.json index 141d5a8fc..f6dbbfaba 100644 --- a/src/generated/resources/assets/create/lang/unfinished/ko_kr.json +++ b/src/generated/resources/assets/create/lang/unfinished/ko_kr.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 74", + "_": "Missing Localizations: 75", "_": "->------------------------] Game Elements [------------------------<-", @@ -376,6 +376,7 @@ "block.create.spout": "수도꼭지", "block.create.spruce_window": "가문비나무 유리창", "block.create.spruce_window_pane": "가문비나무 유리판", + "block.create.sticker": "UNLOCALIZED: Sticker", "block.create.sticky_mechanical_piston": "끈끈이 기계식 피스톤", "block.create.stockpile_switch": "수량 스위치", "block.create.stressometer": "피로도 계측기", diff --git a/src/generated/resources/assets/create/lang/unfinished/nl_nl.json b/src/generated/resources/assets/create/lang/unfinished/nl_nl.json index 3703e1c17..1fd9f8c71 100644 --- a/src/generated/resources/assets/create/lang/unfinished/nl_nl.json +++ b/src/generated/resources/assets/create/lang/unfinished/nl_nl.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 1172", + "_": "Missing Localizations: 1173", "_": "->------------------------] Game Elements [------------------------<-", @@ -376,6 +376,7 @@ "block.create.spout": "UNLOCALIZED: Spout", "block.create.spruce_window": "UNLOCALIZED: Spruce Window", "block.create.spruce_window_pane": "UNLOCALIZED: Spruce Window Pane", + "block.create.sticker": "UNLOCALIZED: Sticker", "block.create.sticky_mechanical_piston": "Mechanische Zuiger", "block.create.stockpile_switch": "Voorraad Schakelaar", "block.create.stressometer": "Stressmeter", diff --git a/src/generated/resources/assets/create/lang/unfinished/pt_br.json b/src/generated/resources/assets/create/lang/unfinished/pt_br.json index 4af028159..0536a2b6c 100644 --- a/src/generated/resources/assets/create/lang/unfinished/pt_br.json +++ b/src/generated/resources/assets/create/lang/unfinished/pt_br.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 1238", + "_": "Missing Localizations: 1239", "_": "->------------------------] Game Elements [------------------------<-", @@ -376,6 +376,7 @@ "block.create.spout": "UNLOCALIZED: Spout", "block.create.spruce_window": "UNLOCALIZED: Spruce Window", "block.create.spruce_window_pane": "UNLOCALIZED: Spruce Window Pane", + "block.create.sticker": "UNLOCALIZED: Sticker", "block.create.sticky_mechanical_piston": "Pistão Mecânico Grudento", "block.create.stockpile_switch": "Disjuntor de Armazenamento", "block.create.stressometer": "UNLOCALIZED: Stressometer", diff --git a/src/generated/resources/assets/create/lang/unfinished/ru_ru.json b/src/generated/resources/assets/create/lang/unfinished/ru_ru.json index 90d8c8487..fc9de42f9 100644 --- a/src/generated/resources/assets/create/lang/unfinished/ru_ru.json +++ b/src/generated/resources/assets/create/lang/unfinished/ru_ru.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 24", + "_": "Missing Localizations: 25", "_": "->------------------------] Game Elements [------------------------<-", @@ -376,6 +376,7 @@ "block.create.spout": "Дозатор", "block.create.spruce_window": "Еловое окно", "block.create.spruce_window_pane": "Панель из елового окна", + "block.create.sticker": "UNLOCALIZED: Sticker", "block.create.sticky_mechanical_piston": "Липкий механический поршень", "block.create.stockpile_switch": "Настраиваемый компаратор", "block.create.stressometer": "Динамометр", diff --git a/src/generated/resources/assets/create/lang/unfinished/zh_cn.json b/src/generated/resources/assets/create/lang/unfinished/zh_cn.json index 82f3fbf24..18a87a456 100644 --- a/src/generated/resources/assets/create/lang/unfinished/zh_cn.json +++ b/src/generated/resources/assets/create/lang/unfinished/zh_cn.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 22", + "_": "Missing Localizations: 23", "_": "->------------------------] Game Elements [------------------------<-", @@ -376,6 +376,7 @@ "block.create.spout": "注液器", "block.create.spruce_window": "云杉窗户", "block.create.spruce_window_pane": "云杉窗户板", + "block.create.sticker": "UNLOCALIZED: Sticker", "block.create.sticky_mechanical_piston": "黏性动力活塞", "block.create.stockpile_switch": "存量转换器", "block.create.stressometer": "应力表", diff --git a/src/generated/resources/assets/create/lang/unfinished/zh_tw.json b/src/generated/resources/assets/create/lang/unfinished/zh_tw.json index 991403374..d811d8311 100644 --- a/src/generated/resources/assets/create/lang/unfinished/zh_tw.json +++ b/src/generated/resources/assets/create/lang/unfinished/zh_tw.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 27", + "_": "Missing Localizations: 28", "_": "->------------------------] Game Elements [------------------------<-", @@ -376,6 +376,7 @@ "block.create.spout": "液體灌注器", "block.create.spruce_window": "雲杉木窗戶", "block.create.spruce_window_pane": "雲杉木窗戶片", + "block.create.sticker": "UNLOCALIZED: Sticker", "block.create.sticky_mechanical_piston": "黏性機械活塞", "block.create.stockpile_switch": "存量檢測器", "block.create.stressometer": "動能錶", diff --git a/src/generated/resources/assets/create/models/item/sticker.json b/src/generated/resources/assets/create/models/item/sticker.json new file mode 100644 index 000000000..b1367cf86 --- /dev/null +++ b/src/generated/resources/assets/create/models/item/sticker.json @@ -0,0 +1,3 @@ +{ + "parent": "create:block/sticker/item" +} \ No newline at end of file diff --git a/src/generated/resources/data/create/advancements/recipes/create.base/crafting/kinetics/sticker.json b/src/generated/resources/data/create/advancements/recipes/create.base/crafting/kinetics/sticker.json new file mode 100644 index 000000000..65c58bb33 --- /dev/null +++ b/src/generated/resources/data/create/advancements/recipes/create.base/crafting/kinetics/sticker.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "create:crafting/kinetics/sticker" + ] + }, + "criteria": { + "has_item": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "create:andesite_alloy" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "create:crafting/kinetics/sticker" + } + } + }, + "requirements": [ + [ + "has_item", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/create/loot_tables/blocks/sticker.json b/src/generated/resources/data/create/loot_tables/blocks/sticker.json new file mode 100644 index 000000000..92ccdbe64 --- /dev/null +++ b/src/generated/resources/data/create/loot_tables/blocks/sticker.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "create:sticker" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/create/recipes/crafting/kinetics/sticker.json b/src/generated/resources/data/create/recipes/crafting/kinetics/sticker.json new file mode 100644 index 000000000..71db9df8a --- /dev/null +++ b/src/generated/resources/data/create/recipes/crafting/kinetics/sticker.json @@ -0,0 +1,24 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "ISI", + "CRC" + ], + "key": { + "I": { + "item": "create:andesite_alloy" + }, + "C": { + "tag": "forge:cobblestone" + }, + "R": { + "tag": "forge:dusts/redstone" + }, + "S": { + "tag": "forge:slimeballs" + } + }, + "result": { + "item": "create:sticker" + } +} \ No newline at end of file diff --git a/src/main/java/com/simibubi/create/AllBlockPartials.java b/src/main/java/com/simibubi/create/AllBlockPartials.java index bd23757e2..727ecf78f 100644 --- a/src/main/java/com/simibubi/create/AllBlockPartials.java +++ b/src/main/java/com/simibubi/create/AllBlockPartials.java @@ -93,6 +93,8 @@ public class AllBlockPartials { SYMMETRY_PLANE = get("symmetry_effect/plane"), SYMMETRY_CROSSPLANE = get("symmetry_effect/crossplane"), SYMMETRY_TRIPLEPLANE = get("symmetry_effect/tripleplane"), + + STICKER_HEAD = get("sticker/head"), PORTABLE_STORAGE_INTERFACE_MIDDLE = get("portable_storage_interface/block_middle"), PORTABLE_STORAGE_INTERFACE_MIDDLE_POWERED = get("portable_storage_interface/block_middle_powered"), diff --git a/src/main/java/com/simibubi/create/AllBlocks.java b/src/main/java/com/simibubi/create/AllBlocks.java index aea45c42e..ac22dda0c 100644 --- a/src/main/java/com/simibubi/create/AllBlocks.java +++ b/src/main/java/com/simibubi/create/AllBlocks.java @@ -54,6 +54,7 @@ import com.simibubi.create.content.contraptions.components.structureMovement.bea import com.simibubi.create.content.contraptions.components.structureMovement.chassis.LinearChassisBlock; import com.simibubi.create.content.contraptions.components.structureMovement.chassis.LinearChassisBlock.ChassisCTBehaviour; import com.simibubi.create.content.contraptions.components.structureMovement.chassis.RadialChassisBlock; +import com.simibubi.create.content.contraptions.components.structureMovement.chassis.StickerBlock; import com.simibubi.create.content.contraptions.components.structureMovement.gantry.GantryPinionBlock; import com.simibubi.create.content.contraptions.components.structureMovement.mounted.CartAssemblerBlock; import com.simibubi.create.content.contraptions.components.structureMovement.mounted.CartAssemblerBlock.MinecartAnchorBlock; @@ -846,6 +847,15 @@ public class AllBlocks { .build() .register(); + public static final BlockEntry STICKER = REGISTRATE.block("sticker", StickerBlock::new) + .initialProperties(SharedProperties::stone) + .properties(Block.Properties::nonOpaque) + .addLayer(() -> RenderType::getCutoutMipped) + .blockstate((c, p) -> p.directionalBlock(c.get(), AssetLookup.forPowered(c, p))) + .item() + .transform(customItemModel()) + .register(); + public static final BlockEntry MECHANICAL_DRILL = REGISTRATE.block("mechanical_drill", DrillBlock::new) .initialProperties(SharedProperties::stone) .blockstate(BlockStateGen.directionalBlockProvider(true)) diff --git a/src/main/java/com/simibubi/create/AllTileEntities.java b/src/main/java/com/simibubi/create/AllTileEntities.java index 7e24832ab..5b0c1e96b 100644 --- a/src/main/java/com/simibubi/create/AllTileEntities.java +++ b/src/main/java/com/simibubi/create/AllTileEntities.java @@ -51,6 +51,8 @@ import com.simibubi.create.content.contraptions.components.structureMovement.bea import com.simibubi.create.content.contraptions.components.structureMovement.bearing.MechanicalBearingTileEntity; import com.simibubi.create.content.contraptions.components.structureMovement.bearing.WindmillBearingTileEntity; import com.simibubi.create.content.contraptions.components.structureMovement.chassis.ChassisTileEntity; +import com.simibubi.create.content.contraptions.components.structureMovement.chassis.StickerRenderer; +import com.simibubi.create.content.contraptions.components.structureMovement.chassis.StickerTileEntity; import com.simibubi.create.content.contraptions.components.structureMovement.gantry.GantryPinionRenderer; import com.simibubi.create.content.contraptions.components.structureMovement.gantry.GantryPinionTileEntity; import com.simibubi.create.content.contraptions.components.structureMovement.mounted.CartAssemblerTileEntity; @@ -398,6 +400,12 @@ public class AllTileEntities { .validBlocks(AllBlocks.RADIAL_CHASSIS, AllBlocks.LINEAR_CHASSIS, AllBlocks.SECONDARY_LINEAR_CHASSIS) // .renderer(() -> renderer) .register(); + + public static final TileEntityEntry STICKER = Create.registrate() + .tileEntity("sticker", StickerTileEntity::new) + .validBlocks(AllBlocks.STICKER) + .renderer(() -> StickerRenderer::new) + .register(); public static final TileEntityEntry DRILL = Create.registrate() .tileEntity("drill", DrillTileEntity::new) diff --git a/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedKinetics.java b/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedKinetics.java index 2ff8f46ad..ef9e662ce 100644 --- a/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedKinetics.java +++ b/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedKinetics.java @@ -12,7 +12,7 @@ import net.minecraft.util.Direction.Axis; public abstract class AnimatedKinetics implements IDrawable { public static float getCurrentAngle() { - return ((AnimationTickHolder.getRenderTick()) * 4f) % 360; + return ((AnimationTickHolder.getRenderTime()) * 4f) % 360; } protected BlockState shaft(Axis axis) { diff --git a/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedMixer.java b/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedMixer.java index a45e77ecd..2d3f78e12 100644 --- a/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedMixer.java +++ b/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedMixer.java @@ -29,7 +29,7 @@ public class AnimatedMixer extends AnimatedKinetics { .scale(scale) .render(); - float animation = ((MathHelper.sin(AnimationTickHolder.getRenderTick() / 32f) + 1) / 5) + .5f; + float animation = ((MathHelper.sin(AnimationTickHolder.getRenderTime() / 32f) + 1) / 5) + .5f; GuiGameElement.of(AllBlockPartials.MECHANICAL_MIXER_POLE) .atLocal(0, animation, 0) diff --git a/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedPress.java b/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedPress.java index 849e95121..7cbf31cab 100644 --- a/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedPress.java +++ b/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedPress.java @@ -48,7 +48,7 @@ public class AnimatedPress extends AnimatedKinetics { } private float getAnimatedHeadOffset() { - float cycle = (AnimationTickHolder.getRenderTick()) % 30; + float cycle = (AnimationTickHolder.getRenderTime()) % 30; if (cycle < 10) { float progress = cycle / 10; return -(progress * progress * progress); diff --git a/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedSpout.java b/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedSpout.java index d39255552..25db4f26a 100644 --- a/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedSpout.java +++ b/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedSpout.java @@ -37,7 +37,7 @@ public class AnimatedSpout extends AnimatedKinetics { .scale(scale) .render(); - float cycle = AnimationTickHolder.getRenderTick() % 30; + float cycle = AnimationTickHolder.getRenderTime() % 30; float squeeze = cycle < 20 ? MathHelper.sin((float) (cycle / 20f * Math.PI)) : 0; squeeze *= 20; diff --git a/src/main/java/com/simibubi/create/content/contraptions/base/KineticTileEntityRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/base/KineticTileEntityRenderer.java index cc27ee7f8..f3814c3e3 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/base/KineticTileEntityRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/base/KineticTileEntityRenderer.java @@ -58,7 +58,7 @@ public class KineticTileEntityRenderer extends SafeTileEntityRenderer ms.translate(0, isBlockItem ? 9 / 16f : 11 / 16f, 0); ms.scale(scale, scale, scale); transform = TransformType.GROUND; - ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(AnimationTickHolder.getRenderTick())); + ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(AnimationTickHolder.getRenderTime())); } else { float scale = punching ? .75f : isBlockItem ? .75f - 1 / 64f : .5f; @@ -176,7 +176,7 @@ public class DeployerRenderer extends SafeTileEntityRenderer double factor; if (context.contraption.stalled || context.position == null || context.data.contains("StationaryTimer")) { - factor = MathHelper.sin(AnimationTickHolder.getRenderTick() * .5f) * .25f + .25f; + factor = MathHelper.sin(AnimationTickHolder.getRenderTime() * .5f) * .25f + .25f; } else { Vec3d center = VecHelper.getCenterOf(new BlockPos(context.position)); double distance = context.position.distanceTo(center); diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/fan/EncasedFanRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/components/fan/EncasedFanRenderer.java index 5bf8b87d2..6421411d3 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/fan/EncasedFanRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/fan/EncasedFanRenderer.java @@ -41,7 +41,7 @@ public class EncasedFanRenderer extends KineticTileEntityRenderer { SuperByteBuffer fanInner = AllBlockPartials.ENCASED_FAN_INNER.renderOnDirectionalSouth(te.getBlockState(), direction.getOpposite()); - float time = AnimationTickHolder.getRenderTick(); + float time = AnimationTickHolder.getRenderTime(); float speed = te.getSpeed() * 5; if (speed > 0) speed = MathHelper.clamp(speed, 80, 64 * 20); diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/mixer/MechanicalMixerRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/components/mixer/MechanicalMixerRenderer.java index 4220afa17..134b7b788 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/mixer/MechanicalMixerRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/mixer/MechanicalMixerRenderer.java @@ -45,7 +45,7 @@ public class MechanicalMixerRenderer extends KineticTileEntityRenderer { int packedLightmapCoords = WorldRenderer.getLightmapCoordinates(te.getWorld(), blockState, pos); float renderedHeadOffset = mixer.getRenderedHeadOffset(partialTicks); float speed = mixer.getRenderedHeadRotationSpeed(partialTicks); - float time = AnimationTickHolder.getRenderTick(); + float time = AnimationTickHolder.getRenderTime(); float angle = (float) (((time * speed * 6 / 10f) % 360) / 180 * (float) Math.PI); SuperByteBuffer poleRender = AllBlockPartials.MECHANICAL_MIXER_POLE.renderOn(blockState); diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/BlockMovementTraits.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/BlockMovementTraits.java index aaaef728b..c3566bad9 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/BlockMovementTraits.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/BlockMovementTraits.java @@ -14,6 +14,7 @@ import com.simibubi.create.content.contraptions.components.structureMovement.bea import com.simibubi.create.content.contraptions.components.structureMovement.bearing.MechanicalBearingTileEntity; import com.simibubi.create.content.contraptions.components.structureMovement.bearing.SailBlock; import com.simibubi.create.content.contraptions.components.structureMovement.chassis.AbstractChassisBlock; +import com.simibubi.create.content.contraptions.components.structureMovement.chassis.StickerBlock; import com.simibubi.create.content.contraptions.components.structureMovement.mounted.CartAssemblerBlock; import com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonBlock; import com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonBlock.PistonState; @@ -198,6 +199,10 @@ public class BlockMovementTraits { .getAxis(); if (state.getBlock() instanceof FluidTankBlock) return FluidTankConnectivityHandler.isConnected(world, pos, pos.offset(direction)); + if (AllBlocks.STICKER.has(state) && state.get(StickerBlock.EXTENDED)) { + return direction == state.get(StickerBlock.FACING) + && !notSupportive(world.getBlockState(pos.offset(direction)), direction.getOpposite()); + } return false; } @@ -231,6 +236,8 @@ public class BlockMovementTraits { if (AllBlocks.MECHANICAL_PISTON_HEAD.has(state)) return facing.getAxis() != state.get(BlockStateProperties.FACING) .getAxis(); + if (AllBlocks.STICKER.has(state) && !state.get(StickerBlock.EXTENDED)) + return facing == state.get(StickerBlock.FACING); return isBrittle(state); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/Contraption.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/Contraption.java index 09fbc01f4..44fb1523c 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/Contraption.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/Contraption.java @@ -8,7 +8,6 @@ import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; -import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Objects; @@ -21,7 +20,6 @@ import java.util.stream.Collectors; import javax.annotation.Nullable; -import com.simibubi.create.foundation.utility.*; import org.apache.commons.lang3.tuple.MutablePair; import org.apache.commons.lang3.tuple.Pair; @@ -35,6 +33,7 @@ import com.simibubi.create.content.contraptions.components.structureMovement.bea import com.simibubi.create.content.contraptions.components.structureMovement.bearing.StabilizedContraption; import com.simibubi.create.content.contraptions.components.structureMovement.chassis.AbstractChassisBlock; import com.simibubi.create.content.contraptions.components.structureMovement.chassis.ChassisTileEntity; +import com.simibubi.create.content.contraptions.components.structureMovement.chassis.StickerBlock; import com.simibubi.create.content.contraptions.components.structureMovement.gantry.GantryPinionBlock; import com.simibubi.create.content.contraptions.components.structureMovement.glue.SuperGlueEntity; import com.simibubi.create.content.contraptions.components.structureMovement.glue.SuperGlueHandler; @@ -54,6 +53,12 @@ import com.simibubi.create.content.logistics.block.redstone.RedstoneContactBlock import com.simibubi.create.foundation.config.AllConfigs; import com.simibubi.create.foundation.fluid.CombinedTankWrapper; import com.simibubi.create.foundation.render.backend.light.EmptyLighter; +import com.simibubi.create.foundation.utility.BlockFace; +import com.simibubi.create.foundation.utility.Iterate; +import com.simibubi.create.foundation.utility.NBTHelper; +import com.simibubi.create.foundation.utility.NBTProcessors; +import com.simibubi.create.foundation.utility.UniqueLinkedList; +import com.simibubi.create.foundation.utility.VecHelper; import com.simibubi.create.foundation.utility.worldWrappers.WrappedWorld; import net.minecraft.block.AbstractButtonBlock; @@ -172,7 +177,8 @@ public abstract class Contraption { return contraption; } - public boolean searchMovedStructure(World world, BlockPos pos, @Nullable Direction forcedDirection) throws AssemblyException { + public boolean searchMovedStructure(World world, BlockPos pos, @Nullable Direction forcedDirection) + throws AssemblyException { initialPassengers.clear(); Queue frontier = new UniqueLinkedList<>(); Set visited = new HashSet<>(); @@ -293,6 +299,14 @@ public abstract class Contraption { if (AllBlocks.GANTRY_SHAFT.has(state)) moveGantryShaft(world, pos, frontier, visited, state); + if (AllBlocks.STICKER.has(state) && state.get(StickerBlock.EXTENDED)) { + Direction offset = state.get(StickerBlock.FACING); + BlockPos attached = pos.offset(offset); + if (!visited.contains(attached) + && !BlockMovementTraits.notSupportive(world.getBlockState(attached), offset.getOpposite())) + frontier.add(attached); + } + // Bearings potentially create stabilized sub-contraptions if (AllBlocks.MECHANICAL_BEARING.has(state)) moveBearing(pos, frontier, visited, state); @@ -348,7 +362,8 @@ public abstract class Contraption { boolean brittle = BlockMovementTraits.isBrittle(blockState); boolean canStick = !brittle && state.canStickTo(blockState) && blockState.canStickTo(state); if (canStick) { - if (state.getPushReaction() == PushReaction.PUSH_ONLY || blockState.getPushReaction() == PushReaction.PUSH_ONLY) { + if (state.getPushReaction() == PushReaction.PUSH_ONLY + || blockState.getPushReaction() == PushReaction.PUSH_ONLY) { canStick = false; } if (BlockMovementTraits.notSupportive(state, offset)) { @@ -359,7 +374,8 @@ public abstract class Contraption { } } - if (!wasVisited && (canStick || blockAttachedTowardsFace || faceHasGlue || (offset == forcedDirection && !BlockMovementTraits.notSupportive(state, forcedDirection)))) + if (!wasVisited && (canStick || blockAttachedTowardsFace || faceHasGlue + || (offset == forcedDirection && !BlockMovementTraits.notSupportive(state, forcedDirection)))) frontier.add(offsetPos); if (faceHasGlue) addGlue(superglue.get(offset)); @@ -499,7 +515,8 @@ public abstract class Contraption { } } - private boolean moveMechanicalPiston(World world, BlockPos pos, Queue frontier, Set visited, BlockState state) throws AssemblyException { + private boolean moveMechanicalPiston(World world, BlockPos pos, Queue frontier, Set visited, + BlockState state) throws AssemblyException { Direction direction = state.get(MechanicalPistonBlock.FACING); PistonState pistonState = state.get(MechanicalPistonBlock.STATE); if (pistonState == PistonState.MOVING) @@ -621,8 +638,9 @@ public abstract class Contraption { specialRenderedTileEntities.clear(); INBT blocks = nbt.get("Blocks"); - //used to differentiate between the 'old' and the paletted serialization - boolean usePalettedDeserialization = blocks != null && blocks.getId() == 10 && ((CompoundNBT) blocks).contains("Palette"); + // used to differentiate between the 'old' and the paletted serialization + boolean usePalettedDeserialization = + blocks != null && blocks.getId() == 10 && ((CompoundNBT) blocks).contains("Palette"); readBlocksCompound(blocks, world, usePalettedDeserialization); actors.clear(); @@ -713,7 +731,8 @@ public abstract class Contraption { for (Pair glueEntry : superglue) { CompoundNBT c = new CompoundNBT(); c.put("Pos", NBTUtil.writeBlockPos(glueEntry.getKey())); - c.putByte("Direction", (byte) glueEntry.getValue().getIndex()); + c.putByte("Direction", (byte) glueEntry.getValue() + .getIndex()); superglueNBT.add(c); } @@ -773,7 +792,9 @@ public abstract class Contraption { private CompoundNBT writeBlocksCompound() { CompoundNBT compound = new CompoundNBT(); - PaletteHashMap palette = new PaletteHashMap<>(GameData.getBlockStateIDMap(), 16, (i, s) -> {throw new IllegalStateException("Palette Map index exceeded maximum");}, NBTUtil::readBlockState, NBTUtil::writeBlockState); + PaletteHashMap palette = new PaletteHashMap<>(GameData.getBlockStateIDMap(), 16, (i, s) -> { + throw new IllegalStateException("Palette Map index exceeded maximum"); + }, NBTUtil::readBlockState, NBTUtil::writeBlockState); ListNBT blockList = new ListNBT(); for (BlockInfo block : this.blocks.values()) { @@ -799,7 +820,9 @@ public abstract class Contraption { ListNBT blockList; if (usePalettedDeserialization) { CompoundNBT c = ((CompoundNBT) compound); - palette = new PaletteHashMap<>(GameData.getBlockStateIDMap(), 16, (i, s) -> {throw new IllegalStateException("Palette Map index exceeded maximum");}, NBTUtil::readBlockState, NBTUtil::writeBlockState); + palette = new PaletteHashMap<>(GameData.getBlockStateIDMap(), 16, (i, s) -> { + throw new IllegalStateException("Palette Map index exceeded maximum"); + }, NBTUtil::readBlockState, NBTUtil::writeBlockState); palette.read(c.getList("Palette", 10)); blockList = c.getList("BlockList", 10); @@ -857,19 +880,15 @@ public abstract class Contraption { } private static BlockInfo readBlockInfo(CompoundNBT blockListEntry, PaletteHashMap palette) { - return new BlockInfo( - BlockPos.fromLong(blockListEntry.getLong("Pos")), - Objects.requireNonNull(palette.get(blockListEntry.getInt("State"))), - blockListEntry.contains("Data") ? blockListEntry.getCompound("Data") : null - ); + return new BlockInfo(BlockPos.fromLong(blockListEntry.getLong("Pos")), + Objects.requireNonNull(palette.get(blockListEntry.getInt("State"))), + blockListEntry.contains("Data") ? blockListEntry.getCompound("Data") : null); } private static BlockInfo legacyReadBlockInfo(CompoundNBT blockListEntry) { - return new BlockInfo( - NBTUtil.readBlockPos(blockListEntry.getCompound("Pos")), - NBTUtil.readBlockState(blockListEntry.getCompound("Block")), - blockListEntry.contains("Data") ? blockListEntry.getCompound("Data") : null - ); + return new BlockInfo(NBTUtil.readBlockPos(blockListEntry.getCompound("Pos")), + NBTUtil.readBlockState(blockListEntry.getCompound("Block")), + blockListEntry.contains("Data") ? blockListEntry.getCompound("Data") : null); } public void removeBlocksFromWorld(World world, BlockPos offset) { diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/ContraptionEntityRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/ContraptionEntityRenderer.java index b66008c4e..f3d1f4b44 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/ContraptionEntityRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/ContraptionEntityRenderer.java @@ -39,7 +39,7 @@ public class ContraptionEntityRenderer exte super.render(entity, yaw, partialTicks, ms, buffers, overlay); // Keep a copy of the transforms in order to determine correct lighting - MatrixStack msLocal = translateTo(entity, AnimationTickHolder.getRenderTick()); + MatrixStack msLocal = translateTo(entity, AnimationTickHolder.getPartialTicks()); MatrixStack[] matrixStacks = new MatrixStack[] { ms, msLocal }; ms.push(); diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/chassis/StickerBlock.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/chassis/StickerBlock.java new file mode 100644 index 000000000..74a3959a0 --- /dev/null +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/chassis/StickerBlock.java @@ -0,0 +1,162 @@ +package com.simibubi.create.content.contraptions.components.structureMovement.chassis; + +import com.simibubi.create.AllBlocks; +import com.simibubi.create.AllTileEntities; +import com.simibubi.create.foundation.block.ITE; +import com.simibubi.create.foundation.block.ProperDirectionalBlock; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.block.Blocks; +import net.minecraft.entity.Entity; +import net.minecraft.entity.LivingEntity; +import net.minecraft.item.BlockItemUseContext; +import net.minecraft.particles.BlockParticleData; +import net.minecraft.particles.ParticleTypes; +import net.minecraft.state.BooleanProperty; +import net.minecraft.state.StateContainer.Builder; +import net.minecraft.state.properties.BlockStateProperties; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.Direction; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Vec3d; +import net.minecraft.world.IBlockReader; +import net.minecraft.world.IWorldReader; +import net.minecraft.world.World; +import net.minecraft.world.server.ServerWorld; + +public class StickerBlock extends ProperDirectionalBlock implements ITE { + + public static final BooleanProperty POWERED = BlockStateProperties.POWERED; + public static final BooleanProperty EXTENDED = BlockStateProperties.EXTENDED; + + public StickerBlock(Properties p_i48415_1_) { + super(p_i48415_1_); + setDefaultState(getDefaultState().with(POWERED, false) + .with(EXTENDED, false)); + } + + @Override + public BlockState getStateForPlacement(BlockItemUseContext context) { + Direction nearestLookingDirection = context.getNearestLookingDirection(); + boolean shouldPower = context.getWorld() + .isBlockPowered(context.getPos()); + Direction facing = context.getPlayer() != null && context.getPlayer() + .isSneaking() ? nearestLookingDirection : nearestLookingDirection.getOpposite(); + + return getDefaultState().with(FACING, facing) + .with(POWERED, shouldPower); + } + + @Override + protected void fillStateContainer(Builder builder) { + super.fillStateContainer(builder.add(POWERED, EXTENDED)); + } + + @Override + public void neighborChanged(BlockState state, World worldIn, BlockPos pos, Block blockIn, BlockPos fromPos, + boolean isMoving) { + if (worldIn.isRemote) + return; + + boolean previouslyPowered = state.get(POWERED); + if (previouslyPowered != worldIn.isBlockPowered(pos)) { + state = state.cycle(POWERED); + if (state.get(POWERED)) + state = state.cycle(EXTENDED); + worldIn.setBlockState(pos, state, 2); + } + } + + @Override + public boolean hasTileEntity(BlockState state) { + return true; + } + + @Override + public boolean shouldCheckWeakPower(BlockState state, IWorldReader world, BlockPos pos, Direction side) { + return false; + } + + @Override + public TileEntity createTileEntity(BlockState state, IBlockReader world) { + return AllTileEntities.STICKER.create(); + } + + @Override + public Class getTileEntityClass() { + return StickerTileEntity.class; + } + + // Slime block stuff + + private boolean isUprightSticker(IBlockReader world, BlockPos pos) { + BlockState blockState = world.getBlockState(pos); + return AllBlocks.STICKER.has(blockState) && blockState.get(FACING) == Direction.UP; + } + + @Override + public void onFallenUpon(World p_180658_1_, BlockPos p_180658_2_, Entity p_180658_3_, float p_180658_4_) { + if (!isUprightSticker(p_180658_1_, p_180658_2_) || p_180658_3_.bypassesLandingEffects()) { + super.onFallenUpon(p_180658_1_, p_180658_2_, p_180658_3_, p_180658_4_); + } else { + p_180658_3_.handleFallDamage(p_180658_4_, 0.0F); + } + } + + @Override + public void onLanded(IBlockReader p_176216_1_, Entity p_176216_2_) { + if (!isUprightSticker(p_176216_1_, p_176216_2_.getPosition() + .down()) || p_176216_2_.bypassesLandingEffects()) { + super.onLanded(p_176216_1_, p_176216_2_); + } else { + this.func_226946_a_(p_176216_2_); + } + } + + private void func_226946_a_(Entity p_226946_1_) { + Vec3d vec3d = p_226946_1_.getMotion(); + if (vec3d.y < 0.0D) { + double d0 = p_226946_1_ instanceof LivingEntity ? 1.0D : 0.8D; + p_226946_1_.setMotion(vec3d.x, -vec3d.y * d0, vec3d.z); + } + } + + @Override + public void onEntityWalk(World p_176199_1_, BlockPos p_176199_2_, Entity p_176199_3_) { + double d0 = Math.abs(p_176199_3_.getMotion().y); + if (d0 < 0.1D && !p_176199_3_.bypassesSteppingEffects() && isUprightSticker(p_176199_1_, p_176199_2_)) { + double d1 = 0.4D + d0 * 0.2D; + p_176199_3_.setMotion(p_176199_3_.getMotion() + .mul(d1, 1.0D, d1)); + } + super.onEntityWalk(p_176199_1_, p_176199_2_, p_176199_3_); + } + + @Override + public boolean addLandingEffects(BlockState state1, ServerWorld worldserver, BlockPos pos, BlockState state2, + LivingEntity entity, int numberOfParticles) { + if (isUprightSticker(worldserver, pos)) { + worldserver.spawnParticle(new BlockParticleData(ParticleTypes.BLOCK, Blocks.SLIME_BLOCK.getDefaultState()), + entity.getX(), entity.getY(), entity.getZ(), numberOfParticles, 0.0D, 0.0D, 0.0D, (double) 0.15F); + return true; + } + return super.addLandingEffects(state1, worldserver, pos, state2, entity, numberOfParticles); + } + + @Override + public boolean addRunningEffects(BlockState state, World world, BlockPos pos, Entity entity) { + if (state.get(FACING) == Direction.UP) { + Vec3d vec3d = entity.getMotion(); + world.addParticle( + new BlockParticleData(ParticleTypes.BLOCK, Blocks.SLIME_BLOCK.getDefaultState()).setPos(pos), + entity.getX() + ((double) world.rand.nextFloat() - 0.5D) * (double) entity.getWidth(), + entity.getY() + 0.1D, + entity.getZ() + ((double) world.rand.nextFloat() - 0.5D) * (double) entity.getWidth(), vec3d.x * -4.0D, + 1.5D, vec3d.z * -4.0D); + return true; + } + return super.addRunningEffects(state, world, pos, entity); + } + +} diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/chassis/StickerRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/chassis/StickerRenderer.java new file mode 100644 index 000000000..8e6ef665c --- /dev/null +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/chassis/StickerRenderer.java @@ -0,0 +1,48 @@ +package com.simibubi.create.content.contraptions.components.structureMovement.chassis; + +import com.mojang.blaze3d.matrix.MatrixStack; +import com.simibubi.create.AllBlockPartials; +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.AnimationTickHolder; +import com.simibubi.create.foundation.utility.MatrixStacker; + +import net.minecraft.block.BlockState; +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.IRenderTypeBuffer; +import net.minecraft.client.renderer.RenderType; +import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; +import net.minecraft.util.Direction; + +public class StickerRenderer extends SafeTileEntityRenderer { + + public StickerRenderer(TileEntityRendererDispatcher dispatcher) { + super(dispatcher); + } + + @Override + protected void renderSafe(StickerTileEntity te, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffer, + int light, int overlay) { + BlockState state = te.getBlockState(); + SuperByteBuffer head = AllBlockPartials.STICKER_HEAD.renderOn(state); + float offset = te.piston.getValue(AnimationTickHolder.getPartialTicks()); + + if (te.getWorld() != Minecraft.getInstance().world) + offset = state.get(StickerBlock.EXTENDED) ? 1 : 0; + + Direction facing = state.get(StickerBlock.FACING); + ms.push(); + MatrixStacker.of(ms) + .nudge(te.hashCode()) + .centre() + .rotateY(AngleHelper.horizontalAngle(facing)) + .rotateX(AngleHelper.verticalAngle(facing) + 90) + .unCentre(); + ms.translate(0, (offset * offset) * 4 / 16f, 0); + head.light(light) + .renderInto(ms, buffer.getBuffer(RenderType.getSolid())); + ms.pop(); + } + +} diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/chassis/StickerTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/chassis/StickerTileEntity.java new file mode 100644 index 000000000..b79977b04 --- /dev/null +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/chassis/StickerTileEntity.java @@ -0,0 +1,94 @@ +package com.simibubi.create.content.contraptions.components.structureMovement.chassis; + +import java.util.List; + +import com.simibubi.create.AllBlocks; +import com.simibubi.create.AllSoundEvents; +import com.simibubi.create.content.contraptions.components.structureMovement.glue.SuperGlueEntity; +import com.simibubi.create.content.contraptions.components.structureMovement.glue.SuperGlueItem; +import com.simibubi.create.foundation.tileEntity.SmartTileEntity; +import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour; +import com.simibubi.create.foundation.utility.LerpedFloat; +import com.simibubi.create.foundation.utility.LerpedFloat.Chaser; + +import net.minecraft.block.BlockState; +import net.minecraft.client.Minecraft; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.tileentity.TileEntityType; +import net.minecraft.util.Direction; +import net.minecraft.util.SoundCategory; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import net.minecraftforge.fml.DistExecutor; + +public class StickerTileEntity extends SmartTileEntity { + + LerpedFloat piston; + boolean update; + + public StickerTileEntity(TileEntityType tileEntityTypeIn) { + super(tileEntityTypeIn); + piston = LerpedFloat.linear(); + update = false; + } + + @Override + public void addBehaviours(List behaviours) {} + + @Override + public void initialize() { + super.initialize(); + if (!world.isRemote) + return; + piston.startWithValue(isBlockStateExtended() ? 1 : 0); + } + + public boolean isBlockStateExtended() { + BlockState blockState = getBlockState(); + boolean extended = AllBlocks.STICKER.has(blockState) && blockState.get(StickerBlock.EXTENDED); + return extended; + } + + @Override + public void tick() { + super.tick(); + if (!world.isRemote) + return; + piston.tickChaser(); + + if (isAttachedToBlock() && piston.getValue(0) != piston.getValue() && piston.getValue() == 1) { + SuperGlueItem.spawnParticles(world, pos, getBlockState().get(StickerBlock.FACING), true); + DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> playSound(true)); + } + + if (!update) + return; + update = false; + int target = isBlockStateExtended() ? 1 : 0; + if (isAttachedToBlock() && target == 0 && piston.getChaseTarget() == 1) + DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> playSound(false)); + piston.chase(target, .4f, Chaser.LINEAR); + } + + public boolean isAttachedToBlock() { + BlockState blockState = getBlockState(); + if (!AllBlocks.STICKER.has(blockState)) + return false; + Direction direction = blockState.get(StickerBlock.FACING); + return SuperGlueEntity.isValidFace(world, pos.offset(direction), direction.getOpposite()); + } + + @Override + protected void read(CompoundNBT compound, boolean clientPacket) { + super.read(compound, clientPacket); + if (clientPacket) + update = true; + } + + @OnlyIn(Dist.CLIENT) + public void playSound(boolean attach) { + world.playSound(Minecraft.getInstance().player, pos, AllSoundEvents.SLIME_ADDED.get(), SoundCategory.BLOCKS, + 0.35F, attach ? 0.75F : 0.2f); + } + +} diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/gantry/GantryPinionRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/gantry/GantryPinionRenderer.java index 7772d70de..df2d3b49b 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/gantry/GantryPinionRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/gantry/GantryPinionRenderer.java @@ -72,7 +72,7 @@ public class GantryPinionRenderer extends KineticTileEntityRenderer { } public static float getAngleForTe(KineticTileEntity te, final BlockPos pos, Axis axis) { - float time = AnimationTickHolder.getRenderTick(); + float time = AnimationTickHolder.getRenderTime(); float offset = getRotationOffsetForPosition(te, pos, axis); return ((time * te.getSpeed() * 3f / 20 + offset) % 360) / 180 * (float) Math.PI; } diff --git a/src/main/java/com/simibubi/create/content/contraptions/processing/BasinRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/processing/BasinRenderer.java index e05fb6ee0..618816da2 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/processing/BasinRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/processing/BasinRenderer.java @@ -72,7 +72,7 @@ public class BasinRenderer extends SmartTileEntityRenderer { if (fluidLevel > 0) { ms.translate(0, - (MathHelper.sin(AnimationTickHolder.getRenderTick() / 12f + anglePartition * itemCount) + 1.5f) * 1 + (MathHelper.sin(AnimationTickHolder.getRenderTime() / 12f + anglePartition * itemCount) + 1.5f) * 1 / 32f, 0); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/processing/burner/BlazeBurnerRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/processing/burner/BlazeBurnerRenderer.java index a2b7abd5c..458035ec9 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/processing/burner/BlazeBurnerRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/processing/burner/BlazeBurnerRenderer.java @@ -27,7 +27,7 @@ public class BlazeBurnerRenderer extends SafeTileEntityRenderer { MatrixStacker msr = MatrixStacker.of(ms); IVertexBuilder vb = buffer.getBuffer(RenderType.getSolid()); - float renderTick = AnimationTickHolder.getRenderTick(); + float renderTick = AnimationTickHolder.getRenderTime(); ms.push(); msr.centre(); diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/encased/SplitShaftRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/relays/encased/SplitShaftRenderer.java index 8aca8cccd..1d4531a36 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/encased/SplitShaftRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/encased/SplitShaftRenderer.java @@ -32,7 +32,7 @@ public class SplitShaftRenderer extends KineticTileEntityRenderer { Block block = te.getBlockState().getBlock(); final Axis boxAxis = ((IRotate) block).getRotationAxis(te.getBlockState()); final BlockPos pos = te.getPos(); - float time = AnimationTickHolder.getRenderTick(); + float time = AnimationTickHolder.getRenderTime(); for (Direction direction : Iterate.directions) { Axis axis = direction.getAxis(); diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/gearbox/GearboxRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/relays/gearbox/GearboxRenderer.java index bd74bcdf8..601aedc49 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/gearbox/GearboxRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/gearbox/GearboxRenderer.java @@ -30,7 +30,7 @@ public class GearboxRenderer extends KineticTileEntityRenderer { final Axis boxAxis = te.getBlockState().get(BlockStateProperties.AXIS); final BlockPos pos = te.getPos(); - float time = AnimationTickHolder.getRenderTick(); + float time = AnimationTickHolder.getRenderTime(); for (Direction direction : Iterate.directions) { final Axis axis = direction.getAxis(); diff --git a/src/main/java/com/simibubi/create/content/contraptions/wrench/WrenchItemRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/wrench/WrenchItemRenderer.java index fc0828078..03cc04bdf 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/wrench/WrenchItemRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/wrench/WrenchItemRenderer.java @@ -16,7 +16,7 @@ public class WrenchItemRenderer extends CustomRenderedItemModelRenderer b.key('B', ItemTags.PLANKS) .key('S', I.cog()) @@ -669,6 +669,15 @@ public class StandardRecipeGen extends CreateRecipeProvider { LINEAR_CHASSIS_CYCLE = conversionCycle(ImmutableList.of(AllBlocks.LINEAR_CHASSIS, AllBlocks.SECONDARY_LINEAR_CHASSIS)), + STICKER = create(AllBlocks.STICKER).returns(1) + .unlockedBy(I::andesite) + .viaShaped(b -> b.key('I', I.andesite()) + .key('C', Tags.Items.COBBLESTONE) + .key('R', I.redstone()) + .key('S', Tags.Items.SLIMEBALLS) + .patternLine("ISI") + .patternLine("CRC")), + MINECART = create(() -> Items.MINECART).withSuffix("_from_contraption_cart") .unlockedBy(AllBlocks.CART_ASSEMBLER::get) .viaShapeless(b -> b.addIngredient(AllItems.MINECART_CONTRAPTION.get())), diff --git a/src/main/java/com/simibubi/create/foundation/render/TileEntityRenderHelper.java b/src/main/java/com/simibubi/create/foundation/render/TileEntityRenderHelper.java index 0af8bcff9..0b6e7ff62 100644 --- a/src/main/java/com/simibubi/create/foundation/render/TileEntityRenderHelper.java +++ b/src/main/java/com/simibubi/create/foundation/render/TileEntityRenderHelper.java @@ -7,6 +7,7 @@ import com.simibubi.create.Create; import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionRenderDispatcher; import com.simibubi.create.foundation.config.AllConfigs; import com.simibubi.create.foundation.utility.AnimationTickHolder; +import com.simibubi.create.foundation.utility.Debug; import com.simibubi.create.foundation.utility.MatrixStacker; import com.simibubi.create.foundation.utility.worldWrappers.PlacementSimulationWorld; diff --git a/src/main/java/com/simibubi/create/foundation/render/backend/gl/BasicProgram.java b/src/main/java/com/simibubi/create/foundation/render/backend/gl/BasicProgram.java index 8d6f71711..2201626c1 100644 --- a/src/main/java/com/simibubi/create/foundation/render/backend/gl/BasicProgram.java +++ b/src/main/java/com/simibubi/create/foundation/render/backend/gl/BasicProgram.java @@ -43,7 +43,7 @@ public class BasicProgram extends GlProgram { super.bind(); GL20.glUniform1i(uDebug, debugMode); - GL20.glUniform1f(uTime, AnimationTickHolder.getRenderTick()); + GL20.glUniform1f(uTime, AnimationTickHolder.getRenderTime()); uploadMatrixUniform(uViewProjection, viewProjection); GL20.glUniform3f(uCameraPos, (float) camX, (float) camY, (float) camZ); diff --git a/src/main/java/com/simibubi/create/foundation/utility/AnimationTickHolder.java b/src/main/java/com/simibubi/create/foundation/utility/AnimationTickHolder.java index 4b8f410c5..b86ac025a 100644 --- a/src/main/java/com/simibubi/create/foundation/utility/AnimationTickHolder.java +++ b/src/main/java/com/simibubi/create/foundation/utility/AnimationTickHolder.java @@ -16,7 +16,7 @@ public class AnimationTickHolder { } } - public static float getRenderTick() { + public static float getRenderTime() { return getTicks() + getPartialTicks(); } diff --git a/src/main/resources/assets/create/models/block/sticker/block.json b/src/main/resources/assets/create/models/block/sticker/block.json new file mode 100644 index 000000000..1ece065f4 --- /dev/null +++ b/src/main/resources/assets/create/models/block/sticker/block.json @@ -0,0 +1,71 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "0": "block/piston_bottom", + "1": "block/piston_inner", + "3": "create:block/sticker", + "4": "create:block/sticker_side", + "particle": "block/piston_bottom" + }, + "elements": [ + { + "from": [0, 0, 0], + "to": [16, 8, 16], + "faces": { + "north": {"uv": [0, 8, 16, 16], "texture": "#4"}, + "east": {"uv": [0, 8, 16, 16], "texture": "#4"}, + "south": {"uv": [0, 8, 16, 16], "texture": "#4"}, + "west": {"uv": [0, 8, 16, 16], "texture": "#4"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#0"} + } + }, + { + "from": [0, 8, 0], + "to": [16, 16, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 16, 8], "texture": "#4"}, + "east": {"uv": [0, 0, 16, 8], "texture": "#4"}, + "south": {"uv": [0, 0, 16, 8], "texture": "#4"}, + "west": {"uv": [0, 0, 16, 8], "texture": "#4"}, + "up": {"uv": [0, 0, 8, 8], "texture": "#3"} + } + }, + { + "from": [0, 8, -0.95], + "to": [16, 16, 0.05], + "faces": { + "south": {"uv": [0, 0, 16, 8], "texture": "#4"} + } + }, + { + "from": [0, 8, 15.95], + "to": [16, 16, 16.95], + "faces": { + "north": {"uv": [0, 0, 16, 8], "texture": "#4"} + } + }, + { + "from": [15.95, 8, 0], + "to": [16.95, 16, 16], + "faces": { + "west": {"uv": [0, 0, 16, 8], "texture": "#4"} + } + }, + { + "from": [-0.95, 8, 0], + "to": [0.05, 16, 16], + "faces": { + "east": {"uv": [16, 0, 0, 8], "texture": "#4"} + } + } + ], + "groups": [ + { + "name": "Piston Block", + "origin": [8, 8, 8], + "children": [0, 1, 2, 3, 4, 5] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/sticker/block_powered.json b/src/main/resources/assets/create/models/block/sticker/block_powered.json new file mode 100644 index 000000000..ee3244b46 --- /dev/null +++ b/src/main/resources/assets/create/models/block/sticker/block_powered.json @@ -0,0 +1,6 @@ +{ + "parent": "create:block/sticker/block", + "textures": { + "4": "create:block/sticker_side_powered" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/sticker/head.json b/src/main/resources/assets/create/models/block/sticker/head.json new file mode 100644 index 000000000..b2b808c18 --- /dev/null +++ b/src/main/resources/assets/create/models/block/sticker/head.json @@ -0,0 +1,41 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "2": "block/piston_side", + "3": "create:block/sticker", + "particle": "block/piston_bottom" + }, + "elements": [ + { + "from": [1, 8, 1], + "to": [15, 13, 15], + "rotation": {"angle": 0, "axis": "y", "origin": [9, 16, 9]}, + "faces": { + "north": {"uv": [8.5, 0, 15.5, 2.5], "texture": "#3"}, + "east": {"uv": [8.5, 0, 15.5, 2.5], "texture": "#3"}, + "south": {"uv": [8.5, 0, 15.5, 2.5], "texture": "#3"}, + "west": {"uv": [8.5, 0, 15.5, 2.5], "texture": "#3"}, + "up": {"uv": [8.5, 8.5, 15.5, 15.5], "texture": "#3"}, + "down": {"uv": [0.5, 8.5, 7.5, 15.5], "texture": "#3"} + } + }, + { + "from": [6, 3, 6], + "to": [10, 8, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [14, 11, 14]}, + "faces": { + "north": {"uv": [0, 0, 5, 4], "rotation": 90, "texture": "#2"}, + "east": {"uv": [0, 0, 5, 4], "rotation": 90, "texture": "#2"}, + "south": {"uv": [0, 0, 5, 4], "rotation": 90, "texture": "#2"}, + "west": {"uv": [0, 0, 5, 4], "rotation": 90, "texture": "#2"} + } + } + ], + "groups": [ + { + "name": "Piston Head", + "origin": [14, 28, 14], + "children": [0, 1] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/sticker/item.json b/src/main/resources/assets/create/models/block/sticker/item.json new file mode 100644 index 000000000..c8c48ec47 --- /dev/null +++ b/src/main/resources/assets/create/models/block/sticker/item.json @@ -0,0 +1,104 @@ +{ + "credit": "Made with Blockbench", + "parent": "block/block", + "textures": { + "0": "block/piston_bottom", + "1": "block/piston_inner", + "2": "block/piston_side", + "3": "create:block/sticker", + "4": "create:block/sticker_side", + "particle": "block/piston_bottom" + }, + "elements": [ + { + "from": [0, 0, 0], + "to": [16, 8, 16], + "faces": { + "north": {"uv": [0, 8, 16, 16], "texture": "#4"}, + "east": {"uv": [0, 8, 16, 16], "texture": "#4"}, + "south": {"uv": [0, 8, 16, 16], "texture": "#4"}, + "west": {"uv": [0, 8, 16, 16], "texture": "#4"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#0"} + } + }, + { + "from": [0, 8, 0], + "to": [16, 16, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 16, 8]}, + "faces": { + "north": {"uv": [0, 0, 16, 8], "texture": "#4"}, + "east": {"uv": [0, 0, 16, 8], "texture": "#4"}, + "south": {"uv": [0, 0, 16, 8], "texture": "#4"}, + "west": {"uv": [0, 0, 16, 8], "texture": "#4"}, + "up": {"uv": [0, 0, 8, 8], "texture": "#3"} + } + }, + { + "from": [0, 8, -0.95], + "to": [16, 16, 0.05], + "faces": { + "south": {"uv": [0, 0, 16, 8], "texture": "#4"} + } + }, + { + "from": [0, 8, 15.95], + "to": [16, 16, 16.95], + "faces": { + "north": {"uv": [0, 0, 16, 8], "texture": "#4"} + } + }, + { + "from": [16, 8, 0.05], + "to": [17, 16, 16.05], + "rotation": {"angle": 0, "axis": "y", "origin": [9, 8, 8]}, + "faces": { + "west": {"uv": [0, 0, 16, 8], "texture": "#4"} + } + }, + { + "from": [-1, 8, -0.05], + "to": [0, 16, 15.95], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 8, 8]}, + "faces": { + "east": {"uv": [0, 0, 16, 8], "texture": "#4"} + } + }, + { + "from": [1, 9, 1], + "to": [15, 14, 15], + "rotation": {"angle": 0, "axis": "y", "origin": [9, 17, 9]}, + "faces": { + "north": {"uv": [8.5, 0, 15.5, 2.5], "texture": "#3"}, + "east": {"uv": [8.5, 0, 15.5, 2.5], "texture": "#3"}, + "south": {"uv": [8.5, 0, 15.5, 2.5], "texture": "#3"}, + "west": {"uv": [8.5, 0, 15.5, 2.5], "texture": "#3"}, + "up": {"uv": [8.5, 8.5, 15.5, 15.5], "texture": "#3"}, + "down": {"uv": [0.5, 8.5, 7.5, 15.5], "texture": "#3"} + } + }, + { + "from": [6, 4, 6], + "to": [10, 9, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [14, 12, 14]}, + "faces": { + "north": {"uv": [0, 0, 5, 4], "rotation": 90, "texture": "#2"}, + "east": {"uv": [0, 0, 5, 4], "rotation": 90, "texture": "#2"}, + "south": {"uv": [0, 0, 5, 4], "rotation": 90, "texture": "#2"}, + "west": {"uv": [0, 0, 5, 4], "rotation": 90, "texture": "#2"} + } + } + ], + "groups": [ + { + "name": "Piston Block", + "origin": [8, 8, 8], + "children": [0, 1, 2, 3, 4, 5] + }, + { + "name": "Piston Head", + "origin": [14, 28, 14], + "children": [6, 7] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/sticker/sticker.bbmodel b/src/main/resources/assets/create/models/block/sticker/sticker.bbmodel new file mode 100644 index 000000000..0a341360e --- /dev/null +++ b/src/main/resources/assets/create/models/block/sticker/sticker.bbmodel @@ -0,0 +1 @@ +{"meta":{"format_version":"3.6","creation_time":1614729493,"model_format":"java_block","box_uv":false},"name":"","parent":"","ambientocclusion":true,"front_gui_light":false,"visible_box":[1,1,0],"resolution":{"width":16,"height":16},"elements":[{"name":"cube","from":[0,0,0],"to":[16,8,16],"autouv":0,"color":6,"locked":false,"origin":[8,8,8],"faces":{"north":{"uv":[0,8,16,16],"texture":4},"east":{"uv":[0,8,16,16],"texture":4},"south":{"uv":[0,8,16,16],"texture":4},"west":{"uv":[0,8,16,16],"texture":4},"up":{"uv":[0,0,16,16],"texture":1},"down":{"uv":[0,0,16,16],"texture":0}},"uuid":"9189c687-ec3f-0483-bb94-8eb1610bb0f7"},{"name":"cube","from":[0,8,0],"to":[16,16,16],"autouv":0,"color":6,"locked":false,"origin":[8,16,8],"faces":{"north":{"uv":[0,0,16,8],"texture":4},"east":{"uv":[0,0,16,8],"texture":4},"south":{"uv":[0,0,16,8],"texture":4},"west":{"uv":[0,0,16,8],"texture":4},"up":{"uv":[0,0,8,8],"texture":3},"down":{"uv":[0,0,0,0],"texture":null}},"uuid":"c915a8a9-e0c7-0d13-5267-953429b366f5"},{"name":"cube","from":[1,12,1],"to":[15,17,15],"autouv":0,"color":1,"locked":false,"origin":[9,20,9],"faces":{"north":{"uv":[8.5,0,15.5,2.5],"texture":3},"east":{"uv":[8.5,0,15.5,2.5],"texture":3},"south":{"uv":[8.5,0,15.5,2.5],"texture":3},"west":{"uv":[8.5,0,15.5,2.5],"texture":3},"up":{"uv":[8.5,8.5,15.5,15.5],"texture":3},"down":{"uv":[0.5,8.5,7.5,15.5],"texture":3}},"uuid":"838bfc74-3754-755e-97b9-dc8f49cb4cc4"},{"name":"cube","from":[6,7,6],"to":[10,12,10],"autouv":0,"color":6,"locked":false,"origin":[14,15,14],"faces":{"north":{"uv":[0,0,5,4],"rotation":90,"texture":2},"east":{"uv":[0,0,5,4],"rotation":90,"texture":2},"south":{"uv":[0,0,5,4],"rotation":90,"texture":2},"west":{"uv":[0,0,5,4],"rotation":90,"texture":2},"up":{"uv":[0,0,4,4],"texture":null},"down":{"uv":[0,0,4,4],"texture":null}},"uuid":"e380ceaa-57a4-7e47-45d8-238ff048b7cd"}],"outliner":[{"name":"Piston Block","origin":[8,8,8],"uuid":"d35280bd-4aab-971b-e553-24b5af733d45","export":true,"isOpen":false,"locked":false,"visibility":true,"autouv":0,"children":["9189c687-ec3f-0483-bb94-8eb1610bb0f7","c915a8a9-e0c7-0d13-5267-953429b366f5"]},{"name":"Piston Head","origin":[14,28,14],"uuid":"6c824c11-53c5-d20a-8857-1867915ba892","export":true,"isOpen":true,"locked":false,"visibility":true,"autouv":0,"children":["838bfc74-3754-755e-97b9-dc8f49cb4cc4","e380ceaa-57a4-7e47-45d8-238ff048b7cd"]}],"textures":[{"path":"F:\\Create\\Attacher\\Sticker Textures\\piston_bottom.png","name":"piston_bottom.png","folder":"Sticker Textures","namespace":"","id":"0","particle":true,"visible":true,"mode":"bitmap","saved":true,"uuid":"fd815e7a-cd5f-a1d8-9ed5-64cee6940ea0","source":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABZUlEQVQ4T4VTsYqDQBRcm1RGqyMgyRVBAlbCGdsjET/Y0s6QxibcBwSrMwjhKo2Vjce8u9HVC9xrdnk7Ozvz3lsjjuNe/UZd17Lruk7WxWKhbNvm8Z8VeAME9nKp3vZ7ATRNIysOv+535e52wx75l9VKSC3LUlmWKSMMwz6KIkmQoLheZa+Dy7IUQuY3m81IEASBsPJVXASAAVUg1dUAUxTFj4LX9XoAAwTw++Gg2rYVS7w8V/l5uynD9/3e3W4n0ngJr0A2Vs/zBFNV1aB0QoCX8YJpmhMQlDCgiLUAaZ7nYxdI8KwLjuOInXkhJwSsuN7CZzm9kGIBc3A8HtXH5SJe2SrOBfIMXSUKWz8eIwFAJOGg6HMxby2wAwHmAAWceySR3krd4mDBdV1RCfmQjk6cT6eJJU4gcbCTpunYBRzQ91w6lbAetJMkyTiJ+txDMsda/xMo3NPPBBC+ML4v4r8vrGO+ARsXKQWAtEm4AAAAAElFTkSuQmCC"},{"path":"F:\\Create\\Attacher\\Sticker Textures\\piston_inner.png","name":"piston_inner.png","folder":"Sticker Textures","namespace":"","id":"1","particle":false,"visible":true,"mode":"bitmap","saved":true,"uuid":"b94d7326-7db9-4e58-dfb6-169b5ecac9fd","source":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABs0lEQVQ4T4VTsWoCQRR81wiCelW00QhyCFZK1MImqFj4E8HfEC0sRPE3JD9gaaeksZFgLYdgFCGmOhUUG8O85D3vYkK22b13s7PzZmeNSqVyoe/hOI4sdTZN86bmxhsgMINBesjluL7b7XgG2cf7O1nJpK5Rv4tECKShUIhGoxEZ+Xz+Ui6XuSAEstkNXq1WTCgksVjsSpDNZplVNgIkioTUns89akBu2/aXgvtoVPuEZIAfi0U6HA4kJ6PuVgnM23pNRjqdvliJBPeGAWmBQIDC4TD5/X4lXi6XvN5sNqpUCQqFws3mXq/ncb9er9NisVBFOHAymRDfgmVZ7AEGpD3VatRqtfjb5/Px3Gw2aTgceoxUAlyjOA4jq9UqdTodVXA6najdbtNzv+8xkluAglKpRK/TKW+AWZlMhrrdrqeFRqNBs9mMjURWoNTZ768EQIMESlKpFMXjcSU4Ho+03W75VmQAqwTIAZh/hkUSJydCnTul2gJMxEDSECBc48t4zGokfZJAwYEMpupb+Ct97jiLT6ghL4PB4JpENxCS3bGWfzDu18eE08/ns975f08YeMF8ApBNGgW9XdHyAAAAAElFTkSuQmCC"},{"path":"F:\\Create\\Attacher\\Sticker Textures\\piston_side.png","name":"piston_side.png","folder":"Sticker Textures","namespace":"","id":"2","particle":false,"visible":true,"mode":"bitmap","saved":true,"uuid":"db3f52e8-b2d3-9368-ac4d-62cc93c62134","source":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAB0ElEQVQ4T4VSwWoaURQ9A8WmzTg2NNFENIIdEl0UIcZFFw2R+An5gf6BX+GfuHfpJijtQkiiELqx0iyMIlHTwowGEglMOc/c8U0J5G7evHvvnHvOeddot9tet9tFbHYGxgfrvToZxv43SE3Ps/bL+4JMJgOjWq16/X4fn0MXuJ062N6K+ADuzimk5icBvDM3cP7XRiqVglGpVLzJZILc5rXeg821N/i5KIC1k0Tfr909PKnvq7tPiEajMMrlssfE4/AHPlrrAZC5daDuptvBH/c+UHub+LqUWSqVFADDcRx1LhYLdYZCIUQiK0kBhOd+I5fLeXY6rWpbsRiSySRc18XvXk/dp+OxOrPZrOoZjUZqEPM3wyF8AHtvD5ZlwTTNQNPR8bE/eD6fYzAY+KCtVmspIRIOQwA4XeRwCvPxeBz6z8I2AECaolcovpQjYEACGRSLRXQuL33NnHBweKiYMC+hs6RHzmy2lEAAaZap9IOhG0qDJQjsA+TzeWWgGCQaKYl5ASED3R/1CmRg27Yq0DRS50t8bzYDkgRU+ghWr9dXr6Dr/p+6MBE/ZF9qtRqMQqHg7SYSappOWZzW5chySV+j0VgCsInry9VlvLa+es8/A5wUOjLC82gAAAAASUVORK5CYII="},{"path":"F:\\Create\\Attacher\\Sticker Textures\\sticker.png","name":"sticker.png","folder":"Sticker Textures","namespace":"","id":"3","particle":false,"visible":true,"mode":"bitmap","saved":true,"uuid":"d37f6ff6-f6ff-f4aa-4402-5bccef23d620","source":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAADh0lEQVRYR+1XPUxTURQ+TQu8wiu00ECJCkaJxhgwymRAY4IDYTNGBxiMJG4OEBclcTJBFwODmwmGAQYd3AiLiTEqgwECLtVUtETTgi0t5UEf8sgz3ymneW35Tetgwlneve/de853v3v+nu35wBNzYnaWhl6M2ugA0n2707zY1ER3eu/bOl+2mYpaQh7Vty8NMS1MurZOozff2GxQdFDjYkX2Tk5Omg8/PCBfg4NBKKpCuqbzMhir9fpI14kUhSgUCVM4YNCjlsfU3NxsO9CpdzreyMiIGQwG6b36lty+TV4WD9vZiN/vp5HocMb7Vu0K1dfXU1dXV2EA9Pf3m4uLi3TO+428ioMBOFUPLbjaCMAaiz/xPKnFKKIbNBM5SdXV1dTX11cYAD09PSaMqompNEnRxCodu3CdACz7fcnRS7xucHCwMAD25Xk7LCqIDxwCOGTgkIH/m4FCFKO8GChEOc4LQD6bC7GXU7FUs/aGGOtMbqyRs6iUphKneX7GOZ2qcEWl/BwPeNLVDPO8GhIoQDUrT0ywcl9lyojTrXLZhKDMiiTjGg+/Gue4mmHcPdZhSiMi61R7BQ+1zWXCGE8RNCtoVIY6xlLVcPzZLfPjlJ+utpzlNWvJVFORNrrFiMznfszTieN11H53mPffe9dtoguKL0XJ2NgkR5Gd1NIyMowMNemJdExPLw+lALweuGGGfkVYKejfTXANofgSucsUutb7Kg2AT7uaoJWVGNX66tMqcFKwEwoH+R2+5QAAA1Ba665kAAADwTVAhPbaI172AzCAsRWAKIVBiDSo6APJodD3wBeSxnVHBqAUMv15ns431mUQAVDyXdiyXoG3ooZ+/p4jpbgsYx8DIOKmVARrI8sLlL4CaxQIAzAWX03tAt0Y4wkGsqNAfECcCy239RqsiPQ/q+SurOKueV8AQD/ACAN7AbDeNQyLD1hBbHsFOKHVB4Ru2SgMYC5gsp0ww4iSSTuAwQecxa5cBrKjQJwwvLTGeUGcUa5guyiQMMz2AWFBwME5c3wAAKwM7BWG20bB1omzo0B0ye+Yy+Uhb1U5O2XaB6xhyGGXlXhESanTzklqtzCEkyEZqWXlnBfwxDuIJKkcJ0QqRrqFw4Fua7rFxlOOmRxSdkzFhp76D1QVIkMntaSGtPUFzgWY45mTirPDENasxai1JkDRxAqD2C4K8i5Gu935v/72F6SUUT/55o1qAAAAAElFTkSuQmCC"},{"path":"F:\\Create\\Attacher\\Sticker Textures\\sticker_side.png","name":"sticker_side.png","folder":"Sticker Textures","namespace":"","id":"4","particle":false,"visible":true,"mode":"bitmap","saved":true,"uuid":"b6008321-379a-f043-b8b9-8285c50d2ce8","source":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACGElEQVQ4T5WSS2gTYRSFz2wCgUxSayeToqMRxyqEPDQmqEVtJAgKAdfuFFxLcdOFIqKLbkRcC3YhuHXXneKDGghJGwYC2o5IOjHNODU2j1VARu4t/zStQfSufube8537GOn+3G3Xsh08X3gp4T/i5o3rrqYqkF69WHA3N220fji49+jxP0Ee3r3jRvYrmJhQIRHpZ28L++QxEPHB/NO/Qp49mXeLhgGh4Q6qtSrelpZx9LCGs4kEbs3OjYSIcb/ULcxkTyEVS0Ei4uLSe56+3e4xZFQnwpnE4+My11+dvgBp7xIvXjrvEuTIgUlvJzTz128bIPG7Nx+4O2+Jo64wDKHiveI/AIa5xu0L+vHYCTeiKjwOBTm3bAefa5/YnQxojIR+bOeMDXsDi68/smAwGODalRleEp2YckvlmveXTJ+O4aA6ufuMva0BdF2HpmnodruoVCo4pIVZtG59R6FQ4Hez2eScPObj00vJZNJVFAXpdBrBYBCBQICLOp0OTNNkkRD3+31YlgXHttHp9eA4DqR8Pu+GZBn61BQDyH37pG12oiB4NBr1xPRNUVUUi8UdAH0IhUIsIPdSqYTLxgqMXxJaJ1PIZrPsTEaUp/d6o7ENyOVyWC6XmUoJPl29jshKFWuQED53BpFweFeX5uoqj+EBSCQg1Inowu/3Ix6PM5QWLIJqGZDJZFxxOp/Px3kxilc99CDwcM1vBi4whPcwgQ8AAAAASUVORK5CYII="},{"path":"F:\\Create\\Attacher\\Sticker Textures\\sticker_side_powered.png","name":"sticker_side_powered.png","folder":"Sticker Textures","namespace":"","id":"5","particle":false,"visible":true,"mode":"bitmap","saved":true,"uuid":"1c9b6770-8e6d-ef0b-3c7b-a3e4be8da6a6","source":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACNElEQVQ4T5WSTWgTYRCG3zU0EM2P/Vk2NQaRNo00mLQmESVoG81FTzl7U+hZxEsPFhE99CIiHgv2IHj11ptilTQQQlujQZO2iEmadtk0Nj8ohMavzJTd1hpEv9O338z7zDszK92fvC2Kqobnsy8l/Me5dfOGcCsypFcvZkWlomJzS8PUo8f/BHl4765w9sro61MgEel7YxvdtuMg4oPpp3+FzDyZFslMBrqGHSxnl/E2tYiBU25c9PsxcWeyI0Rvd+1bEePnz2HENwKJiHOJd9x9tdpgSCcnemUS9/TYOP965DKkw0Mcu3JJEOS0q9+YCfX8dX0DJJ5/857dGUPstIWDEEo+LP4DkFldYfs63es7I5yKzO3QocqbqoZc9gtXpwLUhn/Qs7/GkrqBudcLLGi1WohfG+ch0Yoplkhnjb8kEvLhpNL/+xrbWz9xwuuF2+1GvV7H51QKAy55z8G6hqvxON/L5TLHTL0WXr0UCASELMsIBoOw2+2wWq2cVKvVUM7lWKSLm80misUiNFVFrdGApmmQYrGYcNhsGBwaYgBVp9NWVSSWlvgeGR1Ft8djiOlNVhQkk8l9AD04HA4WSJUK5tNpLHz4hKwkMOE/i7FQCCvVKhcid+SiUCrtAaLRKBbTaaZSwLqzg3yhgJnMR6wd+YVn4QtwyTKcw8OGy9V8ntswAFRZh5AT3cUxiwUhnw/bXV08YP1QLgPC4bDQV2c2mzmut3K03ebvHyaTIST7B3N2AQhkNoSNVX+GAAAAAElFTkSuQmCC"}]} \ No newline at end of file diff --git a/src/main/resources/assets/create/textures/block/sticker.png b/src/main/resources/assets/create/textures/block/sticker.png new file mode 100644 index 0000000000000000000000000000000000000000..75429c8afeec9968fb691653b77e393f2c02fe03 GIT binary patch literal 1509 zcmVEX>4Tx04R}tkv&MmKpe$iQ$>-AgBe5|GSuQ=K~%(1s#pXIrLEAagUO{|(4-+r zad8w}3l4rPRvlcNb#-tR1i=pwH#a9m7b)?7NufoI2gm(*ckglc4iFj@rdeGRfTr7K zDjt)vxmBs>6+s9PF@}iDEF+O#%)obi-6O!)yC~1{KlkV8SMwGF0uu2YGfbO!gLr1s zHaPDSi>xH8#OK80CS8#Dk?V@bZ=8!R3p`UaGpTuEkyt8ru+qV-WNO6I#9>v_DPPEX zta9GstW|2Pbx;1nP+nh2bDic0;#figNk~voLm3s=h|;Q)Vj)HQF(3c1>rawPAy*lU z91EyIgY5dj|KNAGR$*$=OA5t+?ia`T7zKKEfo9!tzK)BVfh)c3uQq_$Ptxmc zEqnwFYy%h9ZB5w&E_Z;TCqp)6R|?V;3I*W(jJ_!c4Bi5LYhG`yeVjf38R}~J1~@nb zB1Otx_jz}3XK(+WY4!I5jmC1ab>4+|00006VoOIv0Gj}h0Ekwf`q2OY010qNS#tmY zE+YT{E+YYWr9XB6000McNlirueSad^gZEa<4bO1wgWnpw> zWFU8GbZ8()Nlj2!fese{00X^AL_t(o!|j*BYa2%t#(%O_(yX+OB_k9Gw-v38OK5A8 z-a>jPvyt2H~ zj-^%A!)nJ`%Oy=3NDBTg%g)ZcH}k&ly*C@X_x*Q+&D~w@KiG)z9JqaJd2nN4fiJ%L zI=1}NCj()m$Qi|dwbpShq3jkq=h%+&K z6(V@I_I>Wm-UZ;f9bbg?_4R>in*3(`LblikplQYV=H|ClDizinKSstsazCbAF0-<- z64PGB229h$wrxK9D@DE=nAD9Nl}ZKEH2E@_K|jjjxej&dvs1U#+Ly8c+YSsqJ~-y_ zaIDd)^5%zg*tX5@tp?B-j<-p@F{{>G;u4p*#H+{cTg!u2u{OlSjfI65G8DGs|2<*= zYinx*+qPMna{%yq9rQ$+t=78$T+_FM4wpy+@Nhpzp-^CTbu|X?UoIqC*v+oAHhHuK z#p%F_o;9$CZL^e@K`%$*HC^VlDtq>#G8j4^y@(j`DFEF5F-Cj}w|}g@0O)wZ<)M@fBO=u4$xd_dq{`Bq!w;dsq4VZZ1HactOT_Wh65kKLOJpPh z!Vu&ro^8PEbtq1!>3Ds-UgyHFh2wf6jh;2e=1EuL_xhZiIFyQI<=k;Caz>GwWd?^T zmLu!5QKKPhhjm2*fY)?`#WQ*Jp3R7{Qvvh_9pyBjuLzn@RGo*4fY)^KhDNQU4%a_; zOHImVgxb_-Bt~Jxr)YK?7Yossk&_$oDMgD0@TYej+qZcq;V3!)nr*2z5Jp2!q}lTq zX|@UxA8!8`k<2KChYn?weq^^D5#+?PQYH+4_K+rw0wj(p5! zgyLH1q1Rzvt5VYQVraJObxWSUaq<{YRDBVO>#ikzhwf zD7)>m4asN}LIH|oM%9SOwS3fQsP@v#KhttP3-G1VKv)|XsS}|#+*nKfDMiw-IaH;d zNUKtO9%((Uiqv>M2|%JJC-Hm19Jk%V$Xr2o+vv$j5|e4PL|n~P8+f>%V=;fk!INrG zWQKI?`9Zmz*LKGI{c6rcLYyP0hQbfRFARYYV5F|%o<0qn`VusObft=v22dyz*s+6> z?DaZ9+9lE|)!x7QHjUPaicr{$MwRbisq#81N-3X)BkCE_@mk<-_;kcS%!$$n00000 LNkvXXu0mjfMw-B5 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/create/textures/block/sticker_side.png b/src/main/resources/assets/create/textures/block/sticker_side.png new file mode 100644 index 0000000000000000000000000000000000000000..4e82caf62d6708a64e5eac1c4f455c00e3d2d8a3 GIT binary patch literal 6761 zcmeHKX;f3$vJQx%1SQQNlS2$n2q7T^GIT&OL5UD%5oFA8LIQ*nl0X6?iUX}8B7=&6 zGlK$(LaQx!5fDWiP#PSNNkmXY2GK??V(UE#sQ9k0?{lqp|CzN;l3n|&uWHw>s(tou z7pJwe)eO{NFxYImJZSUbda%Of`&a$nbt>9cZZ8v8yisP~xo{osSQC)*gM-pDX;BD2sfM zOpqBo=qTGI3KUS@d#g716P>7$q(6g+BTWb5c4zMAQM_d*(uSAOWwkNI2J?e%*jK0C zaI6V&nKg5j!6=O$a3^M@e&AGq?@I3n2XCjvmF~RYpt0FE=NC#$%Rq4pNF9v6_D6Kf zZJU;!jQGchotwC^cAR&w?$wS|1rJ&N*})A0Qo_ATS`)|)hnGm|uKS47uMZ4gUOpbR zw#{~#AM!}P#Fhqlpv;MboYQV6odo4@omKd@=BM?(74LZPPLxP#SfxDNq_5vL<^Ze@ z{ws?23=Xf4dYX04W$U2HiDg=Q|7f^><$g%dwYG)v(F@I~+1GnaI=fErD)j0Smqo`R z`dae>Js7%8J-rV@5GH{QP6Sm`?2D_89EZ!7IIk!tA9qraEpOP3hT9J?9dPkAMBGqsXc~S{lKK!^m1a z_?S#f8=qF_#XcMHpf&Im!>Mf-_W4yqJ~3+erq9sT(aN>Qwy9`^3M+p>u<2qJ?o&>nq`058;cKy7T24N&lA<1S!HuW+sAi!Nt%~i&x(B1{(^$?c!QAO zd&nGahTz=T+>N1UsKI`vFD{i0ZtA^|mvFJZ@8=NbXR&t;1P^4IOVl*BT!`lmCCxH; zQ9b8Qg`T1E(^xFb_D!dwDlT4CtnYg2{19@5>9m~r-5v&e<7}ID3Gx!kGOrX}HP-sD zix7*;n-TF*RUGUx8aSAG8B=)wf_~cV=Dn*ekK|8(qWascYnu6Hv1!CL1JuhL(?^o> zB*xoXpTGL9Yjm{#k%fWZD7-1Ti5j`s&sAMkB{+!Kl=a~Fa=RjyWll^<;fI-fir{KV zNdGq`v;7L^%sF#Oppuh4T_bLR$ z*ZsjHNB=s+Ynpm=>4gH~K9#G>?sB}{vi+#{KqmxbzE>(5xCMh_v}+Qz{q1Y_ z&s|)31tFC1q?q!5^hQ5(xD5X?n~z zo=Q72a+u4C?WUO=qBWUcT)e%#Eh{VW>{z;e%{D=v;oG|-=H1aYjj1V5;3KadFL~bR z^g?sv6N{9~y6u(y#Vx%3Ng92%j6>pe?Zww0Wm|J8*(L+@4!>lFWKU;}>UAaN^E*Mwzb>cUJ#!};K!IeKUmUgCiw+lInCUc-@<%Iu3V7TuSjGwGxYd1@;s$^DLU- zJpqH332gUJp*CaWT*8%rjFZ32Y*mX0 z706E3=45O8>#OG72ynMc-m_hwHV=2NE6~=X+BM%x1)g)ZA%FYroPdVxMfC7+ZD07D zSX0mWzF83wLLHS#4FrL(%ud&Mcnkf6-Cot2zhu&(@X&%_ zp>T0Q_4DedOa1o$Gx_D78Zaxt3{G*!TbzkvC3~%iJl|MZ$O*1)s%EZlG7h*ET`214 zDqJ627~%Y(%Edo`EQ`u{l4I_8APHA z%IaF`=#ckfIFi|*z>LWOS%8^LAcRr_2BWN$ z37PB=K!RieLHsal)KJ+q6q3)eMs2WUU>QOxz~kFTivag%Cl7XX2%E$~t+Y|2$jA_Z z0FW?|GC^pVm@KnKDR{}yf4LZgLMkAV5Nnhd!v#qNMF0|ShBw2a?PUB&9Lh!wNfB|l zWH;KHNeXCWjp9ipLNW#;l}gQ|7G|I*2xCqnkuX>s28TmK2(&mVOv03*!^B2%iU|%H zAZCl8eCC5;NI55y1x84$Q7C90IY}jpN@x;iOLX5c?79$XRr6HEsMSijOO%1UJ^sa?*1H@p2hz;09 z0$~!PsYZpN5#p&fBgBAQr0_eG!^J>ODJ)ObSxaZQeAbbNF^De^Dm3KisYnj{Gfo&G z3RPe@YzzRu5;T#?g(#RD08O-H;m}Mh0I&%-0*S!FPoZ!Y@u5m!hEDZLPQ`(! zh&W3QmQ6HA<4HK^%iI!&W|3GVG(cjpnK+gOfn-TiP|5d!Z0ka|M&Zn`UnDM}ObHhh z383=ghjBou_{)?BUjVpEnDVfhTbbhtI3mdkZ-uqAu(bRF@&rU;D9z=p=2$ZvPBFt_ zlh;6;Oeo#>0%j0^5rzdRCgdAKhL!_`mMO0eh*=?rRzs$W0Hy>Kd4OQ3HA?O+QckHT zDkNpHT*!_fTcM}`0~~q9P1f9MW)Ma(q+tFI{BKO|JWv|;f8+TA{mf!3l1M>Oh_lF< z6%4Q?f6wzR@Mk7BsN0DpqA2=*Sk(W(Q6>`B9?}IxQB&-@1K|^+iIx<~SA+_QRI~vy zlRXiBF*6e2D7FBKqof0D+1pI{*hfj!u4Gd_%85|?D~HTm)e&r zHxLHB_er4(bq0yn4_(G*upHLXV7p=AFwwchO)nwIETO%(7zQ&ll0QnaoRyJ~P*p-_ z*s1nRQ`R-tD=7S}6%y%7?7SpYP$0iW!6x6G5}(F6wTv zeB>37I=+uuK~o#kUvt)W&l24Y_nINumTemj&h0LL>SB6j@5b%guPtbO5pm)e8u_f7 z>6QMU=a@LaUrTSFJMC(ECA(?Go#CHGN|BOUGgGV%dxLX_V1S zUw!sL3)d$FAN`ai>s25tUCC(E=Do2c+X3(NTzbL% zs!M{w41JhQ>3X%D%CH`he(NRI)Nr@plwJ+}D9wZpR!mHm<5DUJV#VsyCG2)rh2;E&6*Ij;{tgVMs@quvBgB za*pP1#Nf-9@Q93DKTkw@Z+u)Xzc;?p2bpRQU8{{oP{bjAPx literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/create/textures/block/sticker_side_powered.png b/src/main/resources/assets/create/textures/block/sticker_side_powered.png new file mode 100644 index 0000000000000000000000000000000000000000..04a2c1e23225b0efc07e02860a6d939e7590d6b1 GIT binary patch literal 6836 zcmeHLc|6o@*B?uEMUf?CP?l;|W6VsJEF%*WBDA1celvzKGiHVvZrZdVg-Q$VR(GW# zNvY5xrM-|lTZ@#Gr7Sf_d44lgdY|6=dHa0c=f8YDGv+$i_k7Q}&UMbYuHP@&cgZ4c z4Py-m1fosybYBYo*O7hHRKRc3{!t19qM{QY5G-6u5kYx;E`!Aepu#vF00qP>1_UB* zDhP_q?6;me^1$Y!T7X~q_G`9OF0%UBOPl8Ip~JM;E{?ic!0g@oHc6VoM!VlS4C0W(}wk0T=(L_J035o@3~$lfd});<~fW~9Ts%n)ZAX# z^oK#sWXW}l12K^9O>J8AAXjen1t&M7z2}Y4#*47!zWaN9EL+*_8TE!ZM3uWqqogX* zS6ywPvDBUPjDD%T{Z`Ghgf(X*u$?waAJk~2P6N>^P5a)nq}lbO%6#dFN9P->Pc_^g z%*bYI2iyL6=HX8-7YuExe;V0QaqsHlOq`^#o0yw-ce+Y@M#0eDI*X%8IHmh-GkUcN zZxr7Iwz=?rP(|p7^E1=+@uq*8)wZ^4oEKXgBUJ=#Tm7IL zhws}MF0;KZoc4LxsLB`_&fKpweXlUotT=DcO2&JK7H+S8MGN^-55!Zq{T#$iMJs&K zjZBN~eU7?)hF5$P`Pj;R0cOQn^L&d9+ZIkF7C{gIt_OCBV9IV!v}R-wQTqp4WP+m z5VhHmwsL2^k$Z5t$ zA02IM-_JdCJ&SPkZ}J{aS?8rKv;Md!i3)tS{1d(Bfux3!X65J6`WzA2@$t*XgMLf8 zo@;G8tz#%nQc&Bk$|R(#O=(B3I#TrRihkDm+R6O6+BdEo#88{x@TExUZu>c{roA@~ z+&$s)CRGwr2e$gu3HVlL;FefDj$_vHeQ~Z4_{M)^XPUfot?!dNUJSB zy^?(Cxq-O=VOs&$!4N_demcusjb|-iB!HS0$`6h(;iua1| zox%uDtKfDuozvZwIX$4ew?Oe|raOGLn(WB1KiEVpJ#c!TzfUsQap0O z3#0Z=qJtL7{7_$6QPy3b!n)9v$MeqT2H3pa!RT;Zkk^+|>L@hFo~7;5;U7AzRroBI6sb9XlTRH1~v!30)?b6~z)$C5odxQ~{zBi7h z2i=UyYC=^Dj>I32Cyk!7;^U^16j;O7F@mt%^$g;_h$$@cdrV=#G04Y$c3$cX>}SkaCj3 zMB;P$PHhdG)u6XPv5E>8qYLYQ$DOP0G_7b%!WV|HnQB@d`WI@ zUk@YDOip5kqvy4SCfCFKi5V$LM(!r)M=w^p1XTIu2Pbf#2ub5h}&4*nS16LHjx;JL9ywO1wdh^o3O%Cb6}u$%D` z{?iwdWf77XpD&fZp1a`>Po|eykkK|1 z&Eu{~UBg#LpNmQZDG{|^8rRqL7*r1#PKu9R&v+7jX~)cCaf-?Z*3YZxK80P^=u_Jn z1xrxYVk;Rujv_ZI!A0v1S-D|>AdOl*jY-cxZ@Xlps`XScF*1}}keK5HF?t&@q=LgK zn-gz`O5;RaCU^8t)(5Fl+6{j39UHD41TrOu1zrw<$=(DSHwsRnbEyDa9K{1O0|Iey z7V{{yNI(ds0!$Xi(fnQ6WpgNt?r0ulM@Eu)Za_H8GoBCl$1e$>#YfWcbaQ7X4F@p+ zB!~ip6sS0g%@Gj9j^=V+0{B}dMwmn85MiXFc`(@*>c-^*Pz)RcN5Y6=RxH}wNdxM@ zr!xpk-95%Bz>%YQxKPL=AP^#v2rjaPbNNgJ3XjJlkZ1%N4FeG{K^#X&5yLnF3mL^2 zhdUsk@xgRvaXC;KCxyz55jvWigY(dFa#^wy#h`H9fNU(M7YOMH5;(ws>j41>G!lt} zA<-~29x+iLoF$XLX>$bQQ3T_O5L0*v6dZ|&iuyrAASA|qxA#*GK>&D1Lo5XZ+!#I$ zAjSe5p~Xa_Ja&v=qRkiqAQQ>`X44r6&?&j)i8_l&WZ!Q(vM@4PQ9QYZ3_TG^r+vfm zV)$%1hE78OY#<7BL;y0Qe!vS^jPD!t!+K;h|KFP=&$jT`y!7k!JSKskr^eq zJDSV$sQ^|K;4h@e!iK`4F!pF19*e}<7^&85i|S-=W`FT=+r}mmlfF z_n}4rG~qw<{0#h!X(`z41VVls=|3#$f8ZR(64n#cVFF;k9WS=8a@J208AV6Za40MuhG9^VFboEdg;D5O z6pUiaz}aE3wsttMJ^x@>z-0(U6h7d>1akn~XRx^B`wX=n&p(?V@uF}*mRv|Q3Wl@= z`(OatmVm(%&`9&K-G(|KWF7YFY8_-fh)gC-jE94)M-fP}MD&m0@z^YY|6`oK=FR_t zo1j0QqyI^LB5X|CjmwJzt2kWfBjWs{`JVvC7`$0DfFt1klj{>9V_}(a5P?3A$-n~+ zJTDR74$Sc^krmQ^@ozi{{)-ks>fc6wDZanM^*da@6oFp?|IV)8;rgWr{1W(gcKyGF zOXK?^H^2e!eIoFIx`i1O4L*#kP`wtpLy{rU5Po6WADy5?o#(k+0D-_QWFG}_o^vcH zR27oQMAcVHiUugX!^Q*eL6MP=7%X(-M#-L{Amg`nsE8#Dhsv(@LF*?QKp=`iBzKnp z+@0Ovo0u7Xkm|L2svbVd+2f92t+3tYF-d9a>^DoRGGAEZ%4~28&f|jFr<1%g?z@)7 zOl>ilq&rWU)!`TYaCIB2c8^zoT8d%Vmdrtyl})7%V({g5*uDd~S$`FYM_Z3nuFbiX z9Bri0fjgXG{Y2qv+l7M(L+#zp$@A~tyQ!K>2nkWx1p=1m@9xc?<*JbTIQ89^xy9ur z)}`7>mett(h7@Rv8-YgENPU$@9J1;g=_+Z#YSkKnuTiHQN!Dd=+HeKeQ2pAU#PmL= zoix2x3^y2$4cv}k6kNof7Gx3~8fpT2Ygvr}d_J2(6OjLz)apzy^q zN0U^O?PW{Au|~34<7`EfKVPnRSteFpcp{L2L(R@!_pb8dq{Ym;E4kN_%|JgdplIo| zjJA?kxB?sw7k?3^htFPo2&y(ocrG?peNx$+D`$c?_AGq=aa)=x)1j-=LQli5Ah6NP zGOo{abocYB7uOpMA&u;;3i{MPj%l8Hdv(p6s8c2%|In&x8~nVcg=2qqh4!)Ldo``P zc}=X;Ri_@`dflI6Zya!vX>#;3r7mVBdD+U(#f|eJJ^ca+Rrh3Ym3Q9p$DMosN}i(( zY2^(LPg9t?d$E_hjb6jzyupE2^U6}_8iwbZPp1$oD=Gr!>d!ah5ppjptI$wR@46tX z)z^ROo4PK9n0YRwriY(#=e4?2T31t3Q_0#Nn|sjau&QGCevgOmm>S`t3tNfiyPBI; zylmG#Sk>11w{Xd^X%KQ9 literal 0 HcmV?d00001 From b1dc36d3582f9232b30e86aca8473e933a6a0b77 Mon Sep 17 00:00:00 2001 From: JozsefA Date: Tue, 2 Mar 2021 23:12:43 -0800 Subject: [PATCH 24/24] Trying to tick everything is slow. - Keep track of tickable instances separately. --- .../block/belts/tunnel/BeltTunnelInstance.java | 2 +- .../logistics/block/funnel/FunnelInstance.java | 2 +- .../render/backend/instancing/ITickableInstance.java | 8 ++++++++ .../backend/instancing/InstancedTileRenderer.java | 11 ++++++++--- .../render/backend/instancing/TileEntityInstance.java | 5 ----- 5 files changed, 18 insertions(+), 10 deletions(-) create mode 100644 src/main/java/com/simibubi/create/foundation/render/backend/instancing/ITickableInstance.java diff --git a/src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BeltTunnelInstance.java b/src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BeltTunnelInstance.java index 5b38ee07f..654bea79b 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BeltTunnelInstance.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BeltTunnelInstance.java @@ -16,7 +16,7 @@ import java.util.Collection; import java.util.EnumMap; import java.util.Map; -public class BeltTunnelInstance extends TileEntityInstance { +public class BeltTunnelInstance extends TileEntityInstance implements ITickableInstance { public static void register(TileEntityType type) { DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> InstancedTileRenderRegistry.instance.register(type, BeltTunnelInstance::new)); diff --git a/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelInstance.java b/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelInstance.java index 21d838502..b91a5b37f 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelInstance.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelInstance.java @@ -13,7 +13,7 @@ import net.minecraftforge.fml.DistExecutor; import java.util.ArrayList; -public class FunnelInstance extends TileEntityInstance { +public class FunnelInstance extends TileEntityInstance implements ITickableInstance { public static void register(TileEntityType type) { DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> InstancedTileRenderRegistry.instance.register(type, FunnelInstance::new)); diff --git a/src/main/java/com/simibubi/create/foundation/render/backend/instancing/ITickableInstance.java b/src/main/java/com/simibubi/create/foundation/render/backend/instancing/ITickableInstance.java new file mode 100644 index 000000000..4d79545a4 --- /dev/null +++ b/src/main/java/com/simibubi/create/foundation/render/backend/instancing/ITickableInstance.java @@ -0,0 +1,8 @@ +package com.simibubi.create.foundation.render.backend.instancing; + +public interface ITickableInstance { + /** + * Called every frame, this can be used to make more dynamic animations. + */ + void tick(); +} diff --git a/src/main/java/com/simibubi/create/foundation/render/backend/instancing/InstancedTileRenderer.java b/src/main/java/com/simibubi/create/foundation/render/backend/instancing/InstancedTileRenderer.java index 2f7c37288..325a3c3a5 100644 --- a/src/main/java/com/simibubi/create/foundation/render/backend/instancing/InstancedTileRenderer.java +++ b/src/main/java/com/simibubi/create/foundation/render/backend/instancing/InstancedTileRenderer.java @@ -1,7 +1,6 @@ package com.simibubi.create.foundation.render.backend.instancing; -import java.util.HashMap; -import java.util.Map; +import java.util.*; import javax.annotation.Nullable; @@ -20,6 +19,8 @@ import net.minecraft.world.World; public abstract class InstancedTileRenderer

{ protected Map> instances = new HashMap<>(); + protected Map tickableInstances = new HashMap<>(); + protected Map, RenderMaterial> materials = new HashMap<>(); protected InstancedTileRenderer() { @@ -41,7 +42,7 @@ public abstract class InstancedTileRenderer

{ } public void beginFrame(double cameraX, double cameraY, double cameraZ) { - instances.values().forEach(TileEntityInstance::tick); + tickableInstances.values().forEach(ITickableInstance::tick); } public void render(RenderType layer, Matrix4f viewProjection, double camX, double camY, double camZ) { @@ -79,6 +80,9 @@ public abstract class InstancedTileRenderer

{ if (renderer != null) { instances.put(tile, renderer); + + if (renderer instanceof ITickableInstance) + tickableInstances.put(tile, (ITickableInstance) renderer); } return renderer; @@ -126,6 +130,7 @@ public abstract class InstancedTileRenderer

{ if (instance != null) { instance.remove(); instances.remove(tile); + tickableInstances.remove(tile); } } } diff --git a/src/main/java/com/simibubi/create/foundation/render/backend/instancing/TileEntityInstance.java b/src/main/java/com/simibubi/create/foundation/render/backend/instancing/TileEntityInstance.java index fd77e7fd3..8683832da 100644 --- a/src/main/java/com/simibubi/create/foundation/render/backend/instancing/TileEntityInstance.java +++ b/src/main/java/com/simibubi/create/foundation/render/backend/instancing/TileEntityInstance.java @@ -33,11 +33,6 @@ public abstract class TileEntityInstance { } } - /** - * Called every frame, this can be used to make more dynamic animations. - */ - public void tick() { } - /** * Acquire all {@link InstanceKey}s and initialize any data you may need to calculate the instance properties. */