diff --git a/src/generated/resources/.cache/cache b/src/generated/resources/.cache/cache index 7546069c8..e9a21c11e 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 -4c3e0500f9382d2e426e823fe876f57f4d7ee3b4 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 -bdd56f32ce0a148b6e466a55ab2777f69fc08cfc 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 @@ -401,18 +401,18 @@ a3a11524cd3515fc01d905767b4b7ea782adaf03 assets/create/blockstates/yellow_seat.j 7f39521b211441f5c3e06d60c5978cebe16cacfb assets/create/blockstates/zinc_block.json b7181bcd8182b2f17088e5aa881f374c9c65470c assets/create/blockstates/zinc_ore.json e3f618c5b622d21880de858678d1802cbf65e615 assets/create/lang/en_ud.json -acc852d80378b426d7ee6cb59c169e06b6d63b25 assets/create/lang/en_us.json -30ce93c56557cea2f384a47b549fb893700523a5 assets/create/lang/unfinished/de_de.json -77b8310f3cbed36fa0d2ee29e65ac6aee0c2adc2 assets/create/lang/unfinished/es_mx.json -8db9f9147dcef8c8182c548a524f96f578c116ec assets/create/lang/unfinished/fr_fr.json -89f7029d73733938ee9f900fc36d52ab7fc97563 assets/create/lang/unfinished/it_it.json -b1935e7f8d79d1112e1685adb42daedb976ac6d7 assets/create/lang/unfinished/ja_jp.json -23aaf879d07a24775aeba3b98c355c992b24f28b assets/create/lang/unfinished/ko_kr.json -7372533759001f094dbcad787f01f3de7422d8c0 assets/create/lang/unfinished/nl_nl.json -0d1e5d79ef196a06b273962d5ac8f2013f91209c assets/create/lang/unfinished/pt_br.json -54da7badbd4fb043f73f6e9a4dfc52bd9e7f515c assets/create/lang/unfinished/ru_ru.json -45ca54406acac857752c67a45729da953d11f94a assets/create/lang/unfinished/zh_cn.json -4093ea8612465858aa57581b36f8f60aa23ac203 assets/create/lang/unfinished/zh_tw.json +04b4c59db79887cdddd128cd4cb59320c715a76a assets/create/lang/en_us.json +92840d43a7a5056ba1ddf043fe2a4b2b54533192 assets/create/lang/unfinished/de_de.json +fcded5cc7ba38ce1f13bbcf481c52da384d4335e assets/create/lang/unfinished/es_mx.json +d926a35cff961a017a174e5bad8976b8bfa246f0 assets/create/lang/unfinished/fr_fr.json +bcf5cf92717d5d8b5b4b56dc759cc5dcd3b05ae7 assets/create/lang/unfinished/it_it.json +dddcd6a8d3842035b07172dae1b61064b210dd3b assets/create/lang/unfinished/ja_jp.json +6fc6f612108b1c4498ea90e83f1ed0a7bce198d5 assets/create/lang/unfinished/ko_kr.json +f6d7256dca3a9979ce85333a72ad787657c954ff assets/create/lang/unfinished/nl_nl.json +48adee636f2a0ff06c97b738c9552dcdd48dd72c assets/create/lang/unfinished/pt_br.json +a82ef75492ff34c22f5e480fefe826aceefa956e assets/create/lang/unfinished/ru_ru.json +25b9387af4a75d4264ff001562cc4b14fccd49e6 assets/create/lang/unfinished/zh_cn.json +21e291e10cc5194b61d82c8a271cff2682ec0aee assets/create/lang/unfinished/zh_tw.json 846200eb548d3bfa2e77b41039de159b4b6cfb45 assets/create/models/block/acacia_window.json 1930fa3a3c98d53dd19e4ee7f55bc27fd47aa281 assets/create/models/block/acacia_window_pane_noside.json 1763ea2c9b981d187f5031ba608f3d5d3be3986a assets/create/models/block/acacia_window_pane_noside_alt.json diff --git a/src/generated/resources/assets/create/blockstates/fluid_pipe.json b/src/generated/resources/assets/create/blockstates/fluid_pipe.json index 581373307..80a25280c 100644 --- a/src/generated/resources/assets/create/blockstates/fluid_pipe.json +++ b/src/generated/resources/assets/create/blockstates/fluid_pipe.json @@ -60,9 +60,9 @@ }, { "when": { - "south": "false", - "up": "true", "down": "false", + "up": "true", + "south": "false", "north": "true" }, "apply": { @@ -71,9 +71,9 @@ }, { "when": { - "south": "true", - "up": "true", "down": "false", + "up": "true", + "south": "true", "north": "false" }, "apply": { @@ -82,9 +82,9 @@ }, { "when": { - "south": "false", - "up": "false", "down": "true", + "up": "false", + "south": "false", "north": "true" }, "apply": { @@ -93,9 +93,9 @@ }, { "when": { - "south": "true", - "up": "false", "down": "true", + "up": "false", + "south": "true", "north": "false" }, "apply": { @@ -104,9 +104,9 @@ }, { "when": { - "south": "false", - "up": "true", "down": "true", + "up": "true", + "south": "false", "north": "false" }, "apply": { @@ -115,20 +115,9 @@ }, { "when": { - "south": "false", - "up": "true", "down": "false", - "north": "false" - }, - "apply": { - "model": "create:block/fluid_pipe/ud_x" - } - }, - { - "when": { + "up": "true", "south": "false", - "up": "false", - "down": "true", "north": "false" }, "apply": { @@ -137,9 +126,20 @@ }, { "when": { + "down": "true", + "up": "false", + "south": "false", + "north": "false" + }, + "apply": { + "model": "create:block/fluid_pipe/ud_x" + } + }, + { + "when": { + "down": "false", + "up": "false", "south": "true", - "up": "false", - "down": "false", "north": "true" }, "apply": { @@ -148,9 +148,9 @@ }, { "when": { - "south": "false", - "up": "false", "down": "false", + "up": "false", + "south": "false", "north": "true" }, "apply": { @@ -159,9 +159,9 @@ }, { "when": { - "south": "true", - "up": "false", "down": "false", + "up": "false", + "south": "true", "north": "false" }, "apply": { @@ -170,9 +170,9 @@ }, { "when": { - "south": "false", - "up": "false", "down": "false", + "up": "false", + "south": "false", "north": "false" }, "apply": { @@ -302,8 +302,8 @@ }, { "when": { - "up": "true", "down": "false", + "up": "true", "west": "false", "east": "true" }, @@ -313,8 +313,8 @@ }, { "when": { - "up": "true", "down": "false", + "up": "true", "west": "true", "east": "false" }, @@ -324,8 +324,8 @@ }, { "when": { - "up": "false", "down": "true", + "up": "false", "west": "false", "east": "true" }, @@ -335,8 +335,8 @@ }, { "when": { - "up": "false", "down": "true", + "up": "false", "west": "true", "east": "false" }, @@ -346,19 +346,8 @@ }, { "when": { - "up": "true", "down": "true", - "west": "false", - "east": "false" - }, - "apply": { - "model": "create:block/fluid_pipe/ud_z" - } - }, - { - "when": { "up": "true", - "down": "false", "west": "false", "east": "false" }, @@ -368,8 +357,19 @@ }, { "when": { - "up": "false", + "down": "false", + "up": "true", + "west": "false", + "east": "false" + }, + "apply": { + "model": "create:block/fluid_pipe/ud_z" + } + }, + { + "when": { "down": "true", + "up": "false", "west": "false", "east": "false" }, @@ -379,8 +379,8 @@ }, { "when": { - "up": "false", "down": "false", + "up": "false", "west": "true", "east": "true" }, @@ -390,8 +390,8 @@ }, { "when": { - "up": "false", "down": "false", + "up": "false", "west": "false", "east": "true" }, @@ -401,8 +401,8 @@ }, { "when": { - "up": "false", "down": "false", + "up": "false", "west": "true", "east": "false" }, @@ -412,8 +412,8 @@ }, { "when": { - "up": "false", "down": "false", + "up": "false", "west": "false", "east": "false" }, diff --git a/src/generated/resources/assets/create/blockstates/radial_chassis.json b/src/generated/resources/assets/create/blockstates/radial_chassis.json index 1aa3d3728..f97d8c8bc 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": { - "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/assets/create/lang/unfinished/de_de.json b/src/generated/resources/assets/create/lang/unfinished/de_de.json index e43663915..2970a187a 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: 1095", + "_": "Missing Localizations: 1101", "_": "->------------------------] Game Elements [------------------------<-", 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 5982b8d60..09e681eb2 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: 886", + "_": "Missing Localizations: 892", "_": "->------------------------] Game Elements [------------------------<-", @@ -823,6 +823,12 @@ "create.gui.goggles.kinetic_stats": "UNLOCALIZED: Kinetic Stats:", "create.gui.goggles.at_current_speed": "UNLOCALIZED: at current speed", "create.gui.goggles.pole_length": "UNLOCALIZED: Pole Length:", + "create.gui.assembly.exception": "UNLOCALIZED: This Contraption was unable to assemble:", + "create.gui.assembly.exception.unmovableBlock": "UNLOCALIZED: Unmovable Block (%4$s) at [%1$s %2$s %3$s]", + "create.gui.assembly.exception.chunkNotLoaded": "UNLOCALIZED: The Block at [%1$s %2$s %3$s] was not in a loaded chunk", + "create.gui.assembly.exception.structureTooLarge": "UNLOCALIZED: There are too many Blocks included in the contraption.\nThe configured maximum is: %1$s", + "create.gui.assembly.exception.tooManyPistonPoles": "UNLOCALIZED: There are too many extension Poles attached to this Piston.\nThe configured maximum is: %1$s", + "create.gui.assembly.exception.noPistonPoles": "UNLOCALIZED: The Piston is missing some extension Poles", "create.gui.gauge.info_header": "UNLOCALIZED: Gauge Information:", "create.gui.speedometer.title": "UNLOCALIZED: Rotation Speed", "create.gui.stressometer.title": "UNLOCALIZED: Network Stress", 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 f9524d01b..e422d3ee7 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: 666", + "_": "Missing Localizations: 672", "_": "->------------------------] Game Elements [------------------------<-", @@ -823,6 +823,12 @@ "create.gui.goggles.kinetic_stats": "Statistiques cinétiques:", "create.gui.goggles.at_current_speed": "À la vitesse actuelle", "create.gui.goggles.pole_length": "Longueur de la barre", + "create.gui.assembly.exception": "UNLOCALIZED: This Contraption was unable to assemble:", + "create.gui.assembly.exception.unmovableBlock": "UNLOCALIZED: Unmovable Block (%4$s) at [%1$s %2$s %3$s]", + "create.gui.assembly.exception.chunkNotLoaded": "UNLOCALIZED: The Block at [%1$s %2$s %3$s] was not in a loaded chunk", + "create.gui.assembly.exception.structureTooLarge": "UNLOCALIZED: There are too many Blocks included in the contraption.\nThe configured maximum is: %1$s", + "create.gui.assembly.exception.tooManyPistonPoles": "UNLOCALIZED: There are too many extension Poles attached to this Piston.\nThe configured maximum is: %1$s", + "create.gui.assembly.exception.noPistonPoles": "UNLOCALIZED: The Piston is missing some extension Poles", "create.gui.gauge.info_header": "Informations sur la jauge:", "create.gui.speedometer.title": "Vitesse de rotation", "create.gui.stressometer.title": "Stress du réseau", 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 d8b4ba2dd..e80fd7fa6 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: 3", + "_": "Missing Localizations: 7", "_": "->------------------------] Game Elements [------------------------<-", @@ -162,8 +162,8 @@ "block.create.gabbro_cobblestone_stairs": "Scalini di pietrisco di gabbro", "block.create.gabbro_cobblestone_wall": "Muretto di pietrisco di gabbro", "block.create.gabbro_pillar": "Pilastro di gabbro", - "block.create.gantry_pinion": "UNLOCALIZED: Gantry Pinion", - "block.create.gantry_shaft": "UNLOCALIZED: Gantry Shaft", + "block.create.gantry_pinion": "Pignone a portale", + "block.create.gantry_shaft": "Albero a portale", "block.create.gearbox": "Riduttore", "block.create.gearshift": "Cambio", "block.create.glass_fluid_pipe": "Tubo per fluidi con vetrata", @@ -823,6 +823,12 @@ "create.gui.goggles.kinetic_stats": "Statistiche cinetiche:", "create.gui.goggles.at_current_speed": "Alla velocità attuale", "create.gui.goggles.pole_length": "Lunghezza palo:", + "create.gui.assembly.exception": "UNLOCALIZED: This Contraption was unable to assemble:", + "create.gui.assembly.exception.unmovableBlock": "UNLOCALIZED: Unmovable Block (%4$s) at [%1$s %2$s %3$s]", + "create.gui.assembly.exception.chunkNotLoaded": "UNLOCALIZED: The Block at [%1$s %2$s %3$s] was not in a loaded chunk", + "create.gui.assembly.exception.structureTooLarge": "UNLOCALIZED: There are too many Blocks included in the contraption.\nThe configured maximum is: %1$s", + "create.gui.assembly.exception.tooManyPistonPoles": "UNLOCALIZED: There are too many extension Poles attached to this Piston.\nThe configured maximum is: %1$s", + "create.gui.assembly.exception.noPistonPoles": "UNLOCALIZED: The Piston is missing some extension Poles", "create.gui.gauge.info_header": "Informazioni sul calibro:", "create.gui.speedometer.title": "Velocità di rotazione", "create.gui.stressometer.title": "Stress della rete", @@ -1367,7 +1373,7 @@ "item.create.schematic_and_quill.tooltip.condition1": "Passo 1", "item.create.schematic_and_quill.tooltip.behaviour1": "Seleziona due punti d'angolo usando il clic destro.", "item.create.schematic_and_quill.tooltip.condition2": "Passo 2", - "item.create.schematic_and_quill.tooltip.behaviour2": "Premi _Ctrl_ e _scorri_ sui volti per regolare le dimensioni. Clic destro di nuovo per salvare.", + "item.create.schematic_and_quill.tooltip.behaviour2": "Premi _Ctrl_ e _scorri_ sulle facciate per regolare le dimensioni. Clic destro di nuovo per salvare.", "item.create.schematic_and_quill.tooltip.control1": "Clic-Destro", "item.create.schematic_and_quill.tooltip.action1": "Seleziona un punto d'angolo / conferma il salvataggio.", "item.create.schematic_and_quill.tooltip.control2": "Ctrl premuto", 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 51e3ebb30..5416539af 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: 12", + "_": "Missing Localizations: 14", "_": "->------------------------] Game Elements [------------------------<-", @@ -149,8 +149,8 @@ "block.create.fluid_tank": "液体タンク", "block.create.fluid_valve": "液体バルブ", "block.create.flywheel": "勢車", - "block.create.framed_glass": "大きなガラス窓", - "block.create.framed_glass_pane": "大きなガラス窓板", + "block.create.framed_glass": "ガラス窓", + "block.create.framed_glass_pane": "ガラス窓板", "block.create.furnace_engine": "かまどエンジン", "block.create.gabbro": "斑れい岩", "block.create.gabbro_bricks": "斑れい岩レンガ", @@ -162,8 +162,8 @@ "block.create.gabbro_cobblestone_stairs": "斑れい岩の丸石の階段", "block.create.gabbro_cobblestone_wall": "斑れい岩の丸石の壁", "block.create.gabbro_pillar": "斑れい岩の柱", - "block.create.gantry_pinion": "UNLOCALIZED: Gantry Pinion", - "block.create.gantry_shaft": "UNLOCALIZED: Gantry Shaft", + "block.create.gantry_pinion": "ガントリーピニオン", + "block.create.gantry_shaft": "ガントリーシャフト", "block.create.gearbox": "ギアボックス", "block.create.gearshift": "ギアシフト", "block.create.glass_fluid_pipe": "ガラスの液体パイプ", @@ -372,13 +372,13 @@ "block.create.shaft": "シャフト", "block.create.smart_chute": "スマートシュート", "block.create.smart_fluid_pipe": "スマート液体パイプ", - "block.create.speedometer": "スピードメーター", + "block.create.speedometer": "速度メーター", "block.create.spout": "アイテム注液口", "block.create.spruce_window": "マツの窓", "block.create.spruce_window_pane": "マツの窓パネル", "block.create.sticky_mechanical_piston": "粘着メカニカルピストン", "block.create.stockpile_switch": "在庫スイッチ", - "block.create.stressometer": "ストレスメーター", + "block.create.stressometer": "応力メーター", "block.create.tiled_glass": "タイルガラス", "block.create.tiled_glass_pane": "タイルガラス板", "block.create.turntable": "ターンテーブル", @@ -407,7 +407,7 @@ "block.create.zinc_ore": "亜鉛鉱石", "entity.create.contraption": "からくり", - "entity.create.gantry_contraption": "UNLOCALIZED: Gantry Contraption", + "entity.create.gantry_contraption": "ガントリーからくり", "entity.create.seat": "シート", "entity.create.stationary_contraption": "付設からくり", "entity.create.super_glue": "接着剤", @@ -527,9 +527,9 @@ "advancement.create.goggles": "応力をこの目で", "advancement.create.goggles.desc": "機械からより多くの情報を手に入れるために、エンジニアのゴーグルを作る", "advancement.create.speedometer": "正確な速度は?", - "advancement.create.speedometer.desc": "動作中のスピードメーターをゴーグルで見て、正確な値を読み取る", + "advancement.create.speedometer.desc": "動作中の速度メーターをゴーグルで見て、正確な値を読み取る", "advancement.create.stressometer": "正確な応力は?", - "advancement.create.stressometer.desc": "動作中のストレスメーターをゴーグルを通して見て、正確な値を読み取る", + "advancement.create.stressometer.desc": "動作中の応力メーターをゴーグルを通して見て、正確な値を読み取る", "advancement.create.aesthetics": "装飾ブーム!", "advancement.create.aesthetics.desc": "シャフト、パイプ、歯車に腕木や腕金を取り付ける", "advancement.create.reinforced": "補強ブーム!", @@ -591,7 +591,7 @@ "advancement.create.pipe_spill": "漏れてる!", "advancement.create.pipe_spill.desc": "パイプの端を露出させて液体が吹き出しているところを見る", "advancement.create.hose_pulley": "工業排水", - "advancement.create.hose_pulley.desc": "ホースプーリーを下げて、液体の排出や吸引を見る", + "advancement.create.hose_pulley.desc": "ホースプーリーを下げて、液体の放出や吸引を見る", "advancement.create.infinite_water": "海の水ぜんぶ抜く大作戦", "advancement.create.infinite_water.desc": "無限と言えるほどの大量の水を吸引する", "advancement.create.infinite_lava": "星の核ぜんぶ抜く大作戦", @@ -602,7 +602,7 @@ "advancement.create.crafter.desc": "メカニカルクラフターを設置して、回転力を与える", "advancement.create.clockwork_bearing": "時計仕掛け", "advancement.create.clockwork_bearing.desc": "時計仕掛けのベアリングの上に構造物を組み立てる", - "advancement.create.nixie_tube": "派手な看板", + "advancement.create.nixie_tube": "イカした看板", "advancement.create.nixie_tube.desc": "ニキシー管を手に入れて、設置する", "advancement.create.deployer": "突く、置く、殴る!", "advancement.create.deployer.desc": "自分の手と全く同じ動きをするデプロイヤーを設置して、稼働させる", @@ -610,7 +610,7 @@ "advancement.create.speed_controller.desc": "究極の伝動機、回転速度コントローラーを設置する", "advancement.create.flywheel": "工場の心臓部", "advancement.create.flywheel.desc": "かまどエンジンを勢車に繋ぐ", - "advancement.create.overstress_flywheel": "高レベル応力", + "advancement.create.overstress_flywheel": "ハイレベル応力", "advancement.create.overstress_flywheel.desc": "かまどエンジンに超過応力をかける", "advancement.create.integrated_circuit": "複素数の計算", "advancement.create.integrated_circuit.desc": "集積回路を組み立てる", @@ -680,7 +680,7 @@ "create.recipe.automatic_shapeless": "自動不定形クラフト", "create.recipe.automatic_brewing": "自動醸造", "create.recipe.packing": "圧縮", - "create.recipe.automatic_packing": "自動包装", + "create.recipe.automatic_packing": "自動圧縮クラフト", "create.recipe.sawing": "製材", "create.recipe.mechanical_crafting": "メカニカルクラフト", "create.recipe.automatic_shaped": "自動定形クラフト", @@ -823,6 +823,12 @@ "create.gui.goggles.kinetic_stats": "動力の統計:", "create.gui.goggles.at_current_speed": "現在の速度", "create.gui.goggles.pole_length": "ポールの長さ:", + "create.gui.assembly.exception": "UNLOCALIZED: This Contraption was unable to assemble:", + "create.gui.assembly.exception.unmovableBlock": "UNLOCALIZED: Unmovable Block (%4$s) at [%1$s %2$s %3$s]", + "create.gui.assembly.exception.chunkNotLoaded": "UNLOCALIZED: The Block at [%1$s %2$s %3$s] was not in a loaded chunk", + "create.gui.assembly.exception.structureTooLarge": "UNLOCALIZED: There are too many Blocks included in the contraption.\nThe configured maximum is: %1$s", + "create.gui.assembly.exception.tooManyPistonPoles": "UNLOCALIZED: There are too many extension Poles attached to this Piston.\nThe configured maximum is: %1$s", + "create.gui.assembly.exception.noPistonPoles": "UNLOCALIZED: The Piston is missing some extension Poles", "create.gui.gauge.info_header": "計器の情報:", "create.gui.speedometer.title": "回転速度", "create.gui.stressometer.title": "ネットワークの応力", @@ -830,7 +836,7 @@ "create.gui.stressometer.overstressed": "超過応力", "create.gui.stressometer.no_rotation": "回転なし", "create.gui.contraptions.not_fast_enough": "この %1$s は_十分な_回転を_していない_ようです。", - "create.gui.contraptions.network_overstressed": "この仕掛けは_超過応力_のようです。さらに原動機を追加するか、_応力_の影響が大きい機械のスピードを_下げて_ください。", + "create.gui.contraptions.network_overstressed": "この仕掛けは_超過応力_のようです。さらに原動機を追加するか、_応力_の影響が大きい機械の速度を_下げて_ください。", "create.gui.adjustable_crate.title": "可変クレート", "create.gui.adjustable_crate.storageSpace": "収納スペース", "create.gui.stockpile_switch.title": "在庫スイッチ", @@ -961,9 +967,9 @@ "create.materialChecklist.blocksNotLoaded": "*免責事項*\n\n素材チェックリストは関連するチャンクがロードされていないため、不正確な場合があります。", "create.gui.filter.deny_list": "ブラックリスト", - "create.gui.filter.deny_list.description": "上記のいずれにも一致しない場合、アイテムは通り抜けます。 空のブラックリストはすべてを受け入れます。", + "create.gui.filter.deny_list.description": "上記のいずれにも一致しない場合、アイテムは通り抜けます。空のブラックリストはすべてを受け入れます。", "create.gui.filter.allow_list": "ホワイトリスト", - "create.gui.filter.allow_list.description": "上記のいずれかに一致した場合、アイテムは通り抜けます。 空のホワイトリストはすべてを拒否します。", + "create.gui.filter.allow_list.description": "上記のいずれかに一致した場合、アイテムは通り抜けます。空のホワイトリストはすべてを拒否します。", "create.gui.filter.respect_data": "データを重視", "create.gui.filter.respect_data.description": "アイテムは、耐久性、エンチャント、その他の属性も一致する場合にのみ一致します。", "create.gui.filter.ignore_data": "データを無視", @@ -1030,7 +1036,7 @@ "create.gui.attribute_filter.selected_attributes": "選択された属性:", "create.gui.attribute_filter.add_attribute": "属性をリストに追加する", "create.gui.attribute_filter.add_inverted_attribute": "反属性をリストに追加する", - "create.gui.attribute_filter.allow_list_disjunctive": "ホワイトリスト(どれか)", + "create.gui.attribute_filter.allow_list_disjunctive": "ホワイトリスト(いずれか)", "create.gui.attribute_filter.allow_list_disjunctive.description": "選択した属性のいずれかを持っている場合、アイテムは通り抜けます。", "create.gui.attribute_filter.allow_list_conjunctive": "ホワイトリスト(全て)", "create.gui.attribute_filter.allow_list_conjunctive.description": "選択した属性をすべてを持っている場合、アイテムは通り抜けます。", @@ -1046,12 +1052,12 @@ "create.tooltip.speedRequirement.none": "無し", "create.tooltip.speedRequirement.medium": "中速", "create.tooltip.speedRequirement.high": "高速", - "create.tooltip.stressImpact": "応力への影響: %1$s", + "create.tooltip.stressImpact": "応力の影響: %1$s", "create.tooltip.stressImpact.low": "低", "create.tooltip.stressImpact.medium": "中", "create.tooltip.stressImpact.high": "高", "create.tooltip.stressImpact.overstressed": "超過応力", - "create.tooltip.capacityProvided": "応力許容量: %1$s", + "create.tooltip.capacityProvided": "応力の容量: %1$s", "create.tooltip.capacityProvided.low": "小", "create.tooltip.capacityProvided.medium": "中", "create.tooltip.capacityProvided.high": "大", @@ -1119,7 +1125,7 @@ "create.command.killTPSCommand.argument.tickTime": "tickTime", "create.subtitle.schematicannon_launch_block": "概略図砲が発射する", - "create.subtitle.schematicannon_finish": "概略図砲が完了する", + "create.subtitle.schematicannon_finish": "概略図砲が作業を終える", "create.subtitle.slime_added": "スライムがぐしゃっとつぶれる", "create.subtitle.mechanical_press_activation": "メカニカルプレスが作動する", "create.subtitle.mechanical_press_item_break": "金属がガチャンと鳴る", @@ -1180,11 +1186,11 @@ "block.create.brass_funnel.tooltip.behaviour3": "下向きホッパーのように、_アイテム_を_下方向_に_移動_させます。", "block.create.brass_tunnel.tooltip": "真鍮トンネル", - "block.create.brass_tunnel.tooltip.summary": "派手な_メカニカルベルト_の保護カバー!_真鍮トンネル_にはアイテムの_フィルター機能_や、_分割機能_の設定項目も多数用意されています。", + "block.create.brass_tunnel.tooltip.summary": "オシャレな_メカニカルベルト_の保護カバー!_真鍮トンネル_にはアイテムの_フィルター機能_や、_分割機能_の設定項目も多数用意されています。", "block.create.brass_tunnel.tooltip.condition1": "並べて設置したとき", "block.create.brass_tunnel.tooltip.behaviour1": "_真鍮トンネル_は相互に接続し、ある_メカニカルベルト_のアイテムを別の_メカニカルベルト_に送ったりできるようにします。", "block.create.brass_tunnel.tooltip.condition2": "フィルター機能", - "block.create.brass_tunnel.tooltip.behaviour2": "_真鍮トンネル_は_搬入_と_搬出_、両方のフィルターを搭載しています。 _トンネル_のフィルター付き出力から_アイテム_が出てくることが許可されていない場合、並べて設置された_トンネル_の出力に送られます。", + "block.create.brass_tunnel.tooltip.behaviour2": "_真鍮トンネル_は_搬入_と_搬出_、両方のフィルターを搭載しています。_トンネル_のフィルター付き出力から_アイテム_が出てくることが許可されていない場合、並べて設置された_トンネル_の出力に送られます。", "block.create.brass_tunnel.tooltip.condition3": "分割機能", "block.create.brass_tunnel.tooltip.behaviour3": "_真鍮トンネル_は、_アイテム_が接続された_メカニカルベルト_に分類して並べる方法を変更するように設定できます。", "block.create.brass_tunnel.tooltip.control1": "側面をレンチで右クリックしたとき。", @@ -1238,14 +1244,14 @@ "block.create.hose_pulley.tooltip": "ホースプーリー", "block.create.hose_pulley.tooltip.summary": "ワールドの大量の_液体_を_吸引_したり、_放出_したりするのに使います。", "block.create.hose_pulley.tooltip.condition1": "回転したとき", - "block.create.hose_pulley.tooltip.behaviour1": "ホースを_上げ下げ_して、どの程度の_高さ_まで_吸引_や_排出_を行うか決めます。", + "block.create.hose_pulley.tooltip.behaviour1": "ホースを_上げ下げ_して、どの程度の_高さ_まで_吸引_や_放出_を行うか決めます。", "block.create.hose_pulley.tooltip.condition2": "プーリーから液体が吸い込まれたとき", "block.create.hose_pulley.tooltip.behaviour2": "ホースの端がおろされた本体から_液体_ブロックを_吸引_し始めます。非常に_大量_の液体は_無限_と_みなされます_。", "block.create.hose_pulley.tooltip.condition3": "液体がプーリーに押しこまれたとき", "block.create.hose_pulley.tooltip.behaviour3": "ホースの端の_高さ_まで、_液体_の_放出_を始めます。", "block.create.fluid_tank.tooltip": "液体タンク", - "block.create.fluid_tank.tooltip.summary": "あなたのお気に入りの_液体_をすべて_貯蔵_します。縦横に並べて大きさを調整できます。", + "block.create.fluid_tank.tooltip.summary": "あなたのお気に入りのあらゆる_液体_を_貯蔵_できます。縦横に並べて大きさを調整できます。", "block.create.fluid_tank.tooltip.condition1": "レンチで右クリックしたとき", "block.create.fluid_tank.tooltip.behaviour1": "窓の設定を変更します。", @@ -1284,7 +1290,7 @@ "block.create.item_drain.tooltip": "アイテム排液口", "block.create.item_drain.tooltip.summary": "_液体アイテム_を空にする格子付きデポ。", - "block.create.item_drain.tooltip.condition1": "液体排液 ", + "block.create.item_drain.tooltip.condition1": "液体排液", "block.create.item_drain.tooltip.behaviour1": "_バケツ_や_ボトル_などの_液体入り容器_を横から搬入すると、アイテム排液口はその_液体入り容器_に空にしようとします。その後、アイテムは反対側に排出されます。", "block.create.mechanical_arm.tooltip": "メカニカルアーム", @@ -1310,7 +1316,7 @@ "item.create.handheld_blockzapper.tooltip": "携帯ブロックザッパー", "item.create.handheld_blockzapper.tooltip.summary": "離れた場所にブロックを設置または交換する新しいガジェット。", "item.create.handheld_blockzapper.tooltip.control1": "ブロックを左クリックしたとき", - "item.create.handheld_blockzapper.tooltip.action1": "UNLOCALIZED: Sets blocks placed by the tool to the targeted block.", + "item.create.handheld_blockzapper.tooltip.action1": "ターゲットのブロックをこのツールに設定します。", "item.create.handheld_blockzapper.tooltip.control2": "ブロックを右クリックしたとき", "item.create.handheld_blockzapper.tooltip.action2": "ターゲットブロックを_配置_または_置換_します。", "item.create.handheld_blockzapper.tooltip.control3": "スニークしながら右クリックしたとき。", @@ -1356,7 +1362,7 @@ "item.create.empty_schematic.tooltip.summary": "レシピの材料、および_概略図テーブル_での書き込みに使用されます。", "item.create.schematic.tooltip": "概略図", - "item.create.schematic.tooltip.summary": "ワールドに設置できる構造物を保持します。 ホログラムを必要に応じて配置し、_概略図砲_を使用して建築します。", + "item.create.schematic.tooltip.summary": "ワールドに設置できる構造物を保持します。ホログラムを必要に応じて配置し、_概略図砲_を使用して建築します。", "item.create.schematic.tooltip.condition1": "持ったとき", "item.create.schematic.tooltip.behaviour1": "画面上のツールを使用して配置できます。", "item.create.schematic.tooltip.control1": "スニークしながら右クリックしたとき", @@ -1367,11 +1373,11 @@ "item.create.schematic_and_quill.tooltip.condition1": "ステップ1", "item.create.schematic_and_quill.tooltip.behaviour1": "右クリックして2つのコーナーポイントを選択します。", "item.create.schematic_and_quill.tooltip.condition2": "ステップ2", - "item.create.schematic_and_quill.tooltip.behaviour2": "_Ctrlキーを押しながらスクロール_して、サイズを調整します。 もう一度右クリックして保存します。", + "item.create.schematic_and_quill.tooltip.behaviour2": "_Ctrlキーを押しながらスクロール_して、サイズを調整します。もう一度右クリックして保存します。", "item.create.schematic_and_quill.tooltip.control1": "右クリックしたとき", "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.action2": "_空中_でポイントを選択します。_スクロール_して距離を調整します。", "item.create.schematic_and_quill.tooltip.control3": "スニークしながら右クリックしたとき", "item.create.schematic_and_quill.tooltip.action3": "選択を_リセット_して削除します。", @@ -1391,11 +1397,11 @@ "block.create.cogwheel.tooltip": "歯車", "block.create.cogwheel.tooltip.summary": "_回転_を直線で、または隣接する_歯車_に_伝達_します。", - "block.create.large_cogwheel.tooltip": "大型歯車", + "block.create.large_cogwheel.tooltip": "大きな歯車", "block.create.large_cogwheel.tooltip.summary": "小さな歯車に接続したときに_回転速度_を_変更_できる歯車の大型バージョン。", "block.create.encased_shaft.tooltip": "ケース入りシャフト", - "block.create.encased_shaft.tooltip.summary": "_回転_を直線で_伝達_します。 壁を通過する回転の伝達に適しています。", + "block.create.encased_shaft.tooltip.summary": "_回転_を直線で_伝達_します。壁を通過する回転の伝達に適しています。", "block.create.gearbox.tooltip": "ギアボックス", "block.create.gearbox.tooltip.summary": "接続された_4方向_の_回転_方向を逆にして_伝達_します。", @@ -1421,9 +1427,9 @@ "block.create.adjustable_chain_gearshift.tooltip.behaviour1": "レッドストーン信号を受けて_いない_ときは、隣接するチェーンドライブと_同じ速度_で回転を伝達します。_レッドストーン信号強度が最大_のときは隣接するチェーンドライブは_その2倍_の速度で伝達します。その間にあるものは1-2倍の速度で伝達されます。", "item.create.belt_connector.tooltip": "メカニカルベルト", - "item.create.belt_connector.tooltip.summary": "2本以上の_シャフト_を_メカニカルベルト_で接続します。接続されたシャフトは全く同じ速度と方向で回転します。 メカニカルベルトは_アイテム_と_エンティティ_を_運搬_するベルトコンベアとして使えます。", + "item.create.belt_connector.tooltip.summary": "2本以上の_シャフト_を_メカニカルベルト_で接続します。接続されたシャフトは全く同じ速度と方向で回転します。メカニカルベルトは_アイテム_と_エンティティ_を_運搬_するベルトコンベアとして使えます。", "item.create.belt_connector.tooltip.control1": "シャフトを右クリックしたとき", - "item.create.belt_connector.tooltip.action1": "ベルトの片端のシャフトを選択します。 選択する2つのシャフトは_ベルトの方向_に向かって_縦_、_横_、または_斜め_に_並べる_必要があります。", + "item.create.belt_connector.tooltip.action1": "ベルトの片端のシャフトを選択します。選択する2つのシャフトは_ベルトの方向_に向かって_縦_、_横_、または_斜め_に_並べる_必要があります。", "item.create.belt_connector.tooltip.control2": "スニークしながら右クリックしたとき", "item.create.belt_connector.tooltip.action2": "ベルトの最初に選択した位置を_リセット_します。", @@ -1435,7 +1441,7 @@ "item.create.goggles.tooltip.behaviour2": "計器が接続されているネットワークの_速度_または_応力_に関する詳細情報を表示します。", "item.create.wrench.tooltip": "レンチ", - "item.create.wrench.tooltip.summary": "動的からくりに取り組むための便利なツール。 コンポーネントの_回転_、_解体_、_設定_に使用できます。", + "item.create.wrench.tooltip.summary": "動的からくりに取り組むための便利なツール。コンポーネントの_回転_、_解体_、_設定_に使用できます。", "item.create.wrench.tooltip.control1": "機械を右クリックしたとき", "item.create.wrench.tooltip.action1": "操作した面に向かって、または面から離れるように機械を_回転_させます。", "item.create.wrench.tooltip.control2": "スニークしながら右クリックしたとき", @@ -1450,7 +1456,7 @@ "block.create.encased_fan.tooltip": "ケース入りファン", "block.create.encased_fan.tooltip.summary": "_回転力_を_気流_に変換し往復させます。色んな使い方があります。", "block.create.encased_fan.tooltip.condition1": "レッドストーン信号を受けたとき", - "block.create.encased_fan.tooltip.behaviour1": "真下の_熱源_から_回転力_を供給します。 ファンは下向きにする必要があります。", + "block.create.encased_fan.tooltip.behaviour1": "真下の_熱源_から_回転力_を供給します。ファンは下向きにする必要があります。", "block.create.encased_fan.tooltip.condition2": "回転したとき", "block.create.encased_fan.tooltip.behaviour2": "回転速度に応じてエンティティを_押し_たり、_吸い戻し_たりします。", "block.create.encased_fan.tooltip.condition3": "特別なブロックを吹き抜けるとき", @@ -1462,18 +1468,18 @@ "block.create.hand_crank.tooltip": "ハンドクランク", "block.create.hand_crank.tooltip.summary": "プレイヤーの相互作用を必要とする_シンプル_な_原動機_。", "block.create.hand_crank.tooltip.condition1": "使っているとき", - "block.create.hand_crank.tooltip.behaviour1": "接続したに_回転力_を供給します。 _スニークで回転を逆_にできます。", + "block.create.hand_crank.tooltip.behaviour1": "接続したに_回転力_を供給します。_スニークで回転を逆_にできます。", "block.create.cuckoo_clock.tooltip": "鳩時計", "block.create.cuckoo_clock.tooltip.summary": "空間を_彩り_、_時間を刻む_素晴らしい細工。", "block.create.cuckoo_clock.tooltip.condition1": "回転したとき", - "block.create.cuckoo_clock.tooltip.behaviour1": "_現在の時刻_を表示し、1日に2回曲を再生します。 、_正午_と夕暮れにプレイヤーが_眠れるようになるとすぐ_に_アクティブ_になります。", + "block.create.cuckoo_clock.tooltip.behaviour1": "_現在の時刻_を表示し、1日に2回曲を再生します。、_正午_と夕暮れにプレイヤーが_眠れるようになるとすぐ_に_アクティブ_になります。", "block.create.turntable.tooltip": "ターンテーブル", "block.create.turntable.tooltip.summary": "_回転力_を洗練された乗り物酔いに変えます。", "block.create.millstone.tooltip": "石臼", - "block.create.millstone.tooltip.summary": "搬入された_材料_の_研削_に適した機械。 隣接する歯車によって、または下部のシャフトに接続することによって、回転力を供給できます。 完成品は機械から搬出する必要があります。", + "block.create.millstone.tooltip.summary": "搬入された_材料_の_研削_に適した機械。隣接する歯車によって、または下部のシャフトに接続することによって、回転力を供給できます。完成品は機械から搬出する必要があります。", "block.create.millstone.tooltip.condition1": "回転したとき", "block.create.millstone.tooltip.behaviour1": "ブロックの側面または上面から搬入されたアイテムを_粉砕_を開始します。", "block.create.millstone.tooltip.condition2": "右クリックしたとき", @@ -1482,10 +1488,10 @@ "block.create.crushing_wheel.tooltip": "破砕ホイール", "block.create.crushing_wheel.tooltip.summary": "何かを_破砕_する大きな回転させられるホイール。", "block.create.crushing_wheel.tooltip.condition1": "他の破砕ホイールに取り付けたとき", - "block.create.crushing_wheel.tooltip.behaviour1": "様々な物を処理する破砕機を形成します。 ホイールの歯は、_同じ速度_で_反対方向_に回る必要があります。", + "block.create.crushing_wheel.tooltip.behaviour1": "様々な物を処理する破砕機を形成します。ホイールの歯は、_同じ速度_で_反対方向_に回る必要があります。", "block.create.mechanical_press.tooltip": "メカニカルプレス", - "block.create.mechanical_press.tooltip.summary": "その下のアイテムを圧縮する強力なピストン。 一定の_回転力_が必要です。", + "block.create.mechanical_press.tooltip.summary": "その下のアイテムを圧縮する強力なピストン。一定の_回転力_が必要です。", "block.create.mechanical_press.tooltip.condition1": "レッドストーン信号を受けたとき", "block.create.mechanical_press.tooltip.behaviour1": "その下にドロップされたアイテムの圧縮を_開始_します。", "block.create.mechanical_press.tooltip.condition2": "メカニカルベルトの上にあるとき", @@ -1520,9 +1526,9 @@ "block.create.mechanical_crafter.tooltip.condition2": "レッドストーンパルスがオンの時", "block.create.mechanical_crafter.tooltip.behaviour2": "現在与えられているすべての_アイテム_を使って、_強制的_に_クラフト_を開始します。", "block.create.mechanical_crafter.tooltip.control1": "正面をレンチで使ったとき", - "block.create.mechanical_crafter.tooltip.action1": "_個々のクラフターが_アイテムを移動_させる_方向_を循環させます。 クラフトグリッドを形成するには、すべてのアイテムを最後のクラフターに向かって_移動させる流れ_を作るように_ベルト_を設置する必要があります。最後のクラフターはグリッドから_離れる_方向を指す必要があります。", + "block.create.mechanical_crafter.tooltip.action1": "_個々のクラフターが_アイテムを移動_させる_方向_を循環させます。クラフトグリッドを形成するには、すべてのアイテムを最後のクラフターに向かって_移動させる流れ_を作るように_ベルト_を設置する必要があります。最後のクラフターはグリッドから_離れる_方向を指す必要があります。", "block.create.mechanical_crafter.tooltip.control2": "背面をレンチで使ったとき", - "block.create.mechanical_crafter.tooltip.action2": "隣接するクラフターの_搬入インベントリ_を_接続_します。 これを使用してクラフトグリッドの_スロットを_結合_し、_搬入作業_を_簡略化_できます。", + "block.create.mechanical_crafter.tooltip.action2": "隣接するクラフターの_搬入インベントリ_を_接続_します。これを使用してクラフトグリッドの_スロットを_結合_し、_搬入作業_を_簡略化_できます。", "block.create.furnace_engine.tooltip": "かまどエンジン", "block.create.furnace_engine.tooltip.summary": "_稼動しているかまど_で動く強力な_原動機_。", @@ -1549,14 +1555,14 @@ "block.create.portable_fluid_interface.tooltip.behaviour2": "アクティブな接続を即座に_切断_します。", "block.create.rotation_speed_controller.tooltip": "回転速度コントローラー", - "block.create.rotation_speed_controller.tooltip.summary": "回転を任意の速度にスピードアップまたはスローダウンさせることができる_設定_可能な_伝達機_。", + "block.create.rotation_speed_controller.tooltip.summary": "回転を任意の速度に上げたり下げたりさせることができる_設定_可能な_伝達機_。", "block.create.rotation_speed_controller.tooltip.condition1": "大きな歯車を取り付けたとき", "block.create.rotation_speed_controller.tooltip.behaviour1": "入ってくる回転力を歯車に伝達して、目標とする_速度_に_合わせ_ようとします。_歯車_はコントローラの_上_に_取り付ける_必要があります。", "block.create.mechanical_piston.tooltip": "メカニカルピストン", "block.create.mechanical_piston.tooltip.summary": "ピストンのさらに進化したバージョン。回転力を利用して前にある構造物を正確に移動させます。後部にあるピストン延長ポールは、このの稼働範囲を決めます。延長ポールがないと、ピストンは動きません。_シャーシ_や_スライムボール_、_接着剤_を使用して、1列以上のブロックを移動させることができます。", "block.create.mechanical_piston.tooltip.condition1": "回転したとき", - "block.create.mechanical_piston.tooltip.behaviour1": "取り付けられた構造物の移動を開始します。 速度と方向は、入力される回転速度と相関します。", + "block.create.mechanical_piston.tooltip.behaviour1": "取り付けられた構造物の移動を開始します。速度と方向は、入力される回転速度と相関します。", "block.create.piston_extension_pole.tooltip": "ピストン延長ポール", "block.create.piston_extension_pole.tooltip.summary": "メカニカルピストンの範囲を拡張します。", @@ -1584,7 +1590,7 @@ "block.create.clockwork_bearing.tooltip": "時計仕掛けのベアリング", "block.create.clockwork_bearing.tooltip.summary": "現在の_ゲーム内時間_に応じて最大2つの_時計の針_を回転させる、_メカニカルベアリング_の進化版。", "block.create.clockwork_bearing.tooltip.condition1": "回転したとき", - "block.create.clockwork_bearing.tooltip.behaviour1": "現在の時間に向かって取り付けた構造物の回転を開始します。 2番目の構造物が存在する場合、それは分針として機能します。", + "block.create.clockwork_bearing.tooltip.behaviour1": "現在の時間に向かって取り付けた構造物の回転を開始します。2番目の構造物が存在する場合、それは分針として機能します。", "block.create.sequenced_gearshift.tooltip": "シーケンスギアシフト", "block.create.sequenced_gearshift.tooltip.summary": "_プログラミング_できる_便利_な伝達機械。最大_5つ_の_連続_した_命令_に従って_回転処理_を変更することができます。高速になると精度が悪くなる可能性があります。", @@ -1611,7 +1617,7 @@ "block.create.rope_pulley.tooltip": "ローププーリー", "block.create.rope_pulley.tooltip.summary": "_取り付けられたブロック_や_構造物_を_垂直_方向に移動させます。_シャーシ_、_スライムボール_、_接着剤_を使用して、1つ以上のブロックを移動させることもできます。", "block.create.rope_pulley.tooltip.condition1": "回転したとき", - "block.create.rope_pulley.tooltip.behaviour1": "取り付けた構造物の移動を開始します。 速度と方向は、回転速度に相関します。", + "block.create.rope_pulley.tooltip.behaviour1": "取り付けた構造物の移動を開始します。速度と方向は、回転速度に相関します。", "block.create.linear_chassis.tooltip": "線形シャーシ", "block.create.linear_chassis.tooltip.summary": "移動用の構造物を接続する設定可能な土台ブロック。", @@ -1630,19 +1636,19 @@ "block.create.radial_chassis.tooltip.condition1": "動かしたとき", "block.create.radial_chassis.tooltip.behaviour1": "柱状に_接続_したすべての_シャーシ_と、周囲のブロックを_移動_させます。周囲のブロックは、範囲内にあり、かつ粘着面に面している場合にのみ_引っ張られ_ます([Ctrl]を参照)。", "block.create.radial_chassis.tooltip.condition2": "レンチを持ったとき", - "block.create.radial_chassis.tooltip.behaviour2": "このシャーシブロックの有効_範囲_を設定します。 Ctrlキーを押したままにすると、接続されているすべてのシャーシブロックの範囲も同時に変更できます。", + "block.create.radial_chassis.tooltip.behaviour2": "このシャーシブロックの有効_範囲_を設定します。Ctrlキーを押したままにすると、接続されているすべてのシャーシブロックの範囲も同時に変更できます。", "block.create.radial_chassis.tooltip.control1": "スライムボールで右クリックしたとき", - "block.create.radial_chassis.tooltip.action1": "クリックした面を_粘着面_にします。 シャーシが移動すると、粘着面に接続されているすべての指定のブロックも一緒に移動します。", + "block.create.radial_chassis.tooltip.action1": "クリックした面を_粘着面_にします。シャーシが移動すると、粘着面に接続されているすべての指定のブロックも一緒に移動します。", "block.create.mechanical_drill.tooltip": "メカニカルドリル", - "block.create.mechanical_drill.tooltip.summary": "_ブロックを壊す_のに適した作業機。 _メカニカルピストン_や_ベアリング_等で移動できます。", + "block.create.mechanical_drill.tooltip.summary": "_ブロックを壊す_のに適した作業機。_メカニカルピストン_や_ベアリング_等で移動できます。", "block.create.mechanical_drill.tooltip.condition1": "回転したとき", - "block.create.mechanical_drill.tooltip.behaviour1": "_固定式_のブロック破壊機として機能します。 また、有効範囲の_エンティティを傷つけます_。", + "block.create.mechanical_drill.tooltip.behaviour1": "_固定式_のブロック破壊機として機能します。また、有効範囲の_エンティティを傷つけます_。", "block.create.mechanical_drill.tooltip.condition2": "動かしたとき", "block.create.mechanical_drill.tooltip.behaviour2": "ドリルが衝突するブロックを壊します。", "block.create.mechanical_harvester.tooltip": "メカニカルハーベスター", - "block.create.mechanical_harvester.tooltip.summary": "中規模の作物の自動化に適した機械式植物カッター。 _メカニカルピストン_や_ベアリング_等で移動できます。", + "block.create.mechanical_harvester.tooltip.summary": "中規模の作物の自動化に適した機械式植物カッター。_メカニカルピストン_や_ベアリング_等で移動できます。", "block.create.mechanical_harvester.tooltip.condition1": "動かしたとき", "block.create.mechanical_harvester.tooltip.behaviour1": "ブレードが衝突する_すべての成熟した作物を収穫_し、それらを初期の成長状態にリセットします。", @@ -1652,9 +1658,9 @@ "block.create.mechanical_plough.tooltip.behaviour1": "松明や雪など、当たり判定がないブロックを壊します。エンティティを傷付けることはありません。また、クワを使うように土を耕します。", "block.create.mechanical_saw.tooltip": "メカニカルノコギリ", - "block.create.mechanical_saw.tooltip.summary": "_木_を効率的に_切り倒したり_、_ブロック_を_加工_したりするのに適しています。 _メカニカルピストン_や_ベアリング_等で移動できます。", + "block.create.mechanical_saw.tooltip.summary": "_木_を効率的に_切り倒したり_、_ブロック_を_加工_したりするのに適しています。_メカニカルピストン_や_ベアリング_等で移動できます。", "block.create.mechanical_saw.tooltip.condition1": "上向きのとき", - "block.create.mechanical_saw.tooltip.behaviour1": "そこにドロップまたは搬入されたアイテムに_製材_および石工レシピを適用します。 複数の出力が可能な場合、フィルターが割り当てられていない限り、出力が循環します。", + "block.create.mechanical_saw.tooltip.behaviour1": "そこにドロップまたは搬入されたアイテムに_製材_および石工レシピを適用します。複数の出力が可能な場合、フィルターが割り当てられていない限り、出力が循環します。", "block.create.mechanical_saw.tooltip.condition2": "横向きの場合", "block.create.mechanical_saw.tooltip.behaviour2": "その前の_原木_を_切り倒す_。その原木が木を支えていた場合、_木_は_崩壊_します。", "block.create.mechanical_saw.tooltip.condition3": "動かしたとき", @@ -1669,30 +1675,30 @@ "block.create.content_observer.tooltip.summary": "設定された_フィルター_に一致する_コンテナ_や_メカニカルベルト_内の_アイテム_を検出します。観察している_インベントリ_、_ベルト_、または_シュート_に一致するアイテムが含まれている場合、このは_レッドストーン信号_を発します。観察された_ファンネル_が一致するアイテムを_輸送_すると、このコンポーネントは_レッドストーンパルス_を発します。", "block.create.redstone_link.tooltip": "レッドストーンリンク", - "block.create.redstone_link.tooltip.summary": "_ワイヤレスレッドストーン_接続の終点。 任意のアイテムを使用して_周波数_を割り当てることができます。 通信距離は限られていますが、かなり離れても通信することができます。", + "block.create.redstone_link.tooltip.summary": "_ワイヤレスレッドストーン_接続の終点。任意のアイテムを使用して_周波数_を割り当てることができます。通信距離は限られていますが、かなり離れても通信することができます。", "block.create.redstone_link.tooltip.condition1": "信号を受信したとき", "block.create.redstone_link.tooltip.behaviour1": "同じ周波数のリンクから信号を受信すると、レッドストーン信号を出力します。", "block.create.redstone_link.tooltip.control1": "アイテムで右クリックしたとき", - "block.create.redstone_link.tooltip.action1": "_周波数_をそのアイテムに設定します。 周波数を定義するために、_合計2つの異なるアイテム_を組み合わせて使えます。", + "block.create.redstone_link.tooltip.action1": "_周波数_をそのアイテムに設定します。周波数を定義するために、_合計2つの異なるアイテム_を組み合わせて使えます。", "block.create.redstone_link.tooltip.control2": "スニークしながら右クリックしたとき", "block.create.redstone_link.tooltip.action2": "_受信_モードと_送信_モードを切り替えます。", "block.create.nixie_tube.tooltip": "ニキシー管", - "block.create.nixie_tube.tooltip.summary": "派手にレッドストーン強度と文字を表示します。", + "block.create.nixie_tube.tooltip.summary": "オシャレにレッドストーン強度と文字を表示します。", "block.create.nixie_tube.tooltip.condition1": "レッドストーン信号を受けたとき", "block.create.nixie_tube.tooltip.behaviour1": "現在のレッドストーンの_信号強度_を表示します。", "block.create.nixie_tube.tooltip.condition2": "名札を使ったとき", "block.create.nixie_tube.tooltip.behaviour2": "_名札_の_内容_を複数のニキシー管を並べて表示します。", "block.create.redstone_contact.tooltip": "レッドストーンコンタクト", - "block.create.redstone_contact.tooltip.summary": "レッドストーン信号をペアで出力します。 _メカニカルピストン_や_ベアリング_等で移動できます。", + "block.create.redstone_contact.tooltip.summary": "レッドストーン信号をペアで出力します。_メカニカルピストン_や_ベアリング_等で移動できます。", "block.create.redstone_contact.tooltip.condition1": "他のコンタクトと向かい合ったとき", "block.create.redstone_contact.tooltip.behaviour1": "レッドストーン信号を出力します。", "block.create.redstone_contact.tooltip.condition2": "動かしたとき", "block.create.redstone_contact.tooltip.behaviour2": "通過するすべての固定したレッドストーンコンタクトに反応します。", "block.create.adjustable_crate.tooltip": "可変クレート", - "block.create.adjustable_crate.tooltip.summary": "この_収納ブロック_は、容量を手動で制御できます。任意のアイテムを_16スタック_まで収納できます。 _レッドストーンコンパレーター_に対応しています。", + "block.create.adjustable_crate.tooltip.summary": "この_収納ブロック_は、容量を手動で制御できます。任意のアイテムを_16スタック_まで収納できます。_レッドストーンコンパレーター_に対応しています。", "block.create.adjustable_crate.tooltip.control1": "右クリックしたとき", "block.create.adjustable_crate.tooltip.action1": "_インターフェース_を開きます。", @@ -1702,7 +1708,7 @@ "block.create.creative_crate.tooltip.behaviour1": "このクレートから何かを_搬出_すると、指定されたアイテムが_無限_に_搬出_されます。このクレートに_搬入_されたアイテムは_消滅_します。", "block.create.deployer.tooltip": "デプロイヤー", - "block.create.deployer.tooltip.summary": "_殴る_、_使う_、_起動する_。この機械は、_プレイヤー_をできるだけ_真似_しようとします。_アイテムを自分のインベントリに入れたり_、_預けたり_できます。 持っているアイテムはブロックから直接搬入・搬出する必要があります。", + "block.create.deployer.tooltip.summary": "_殴る_、_使う_、_起動する_。この機械は、_プレイヤー_をできるだけ_真似_しようとします。_アイテムを自分のインベントリに入れたり_、_預けたり_できます。持っているアイテムはブロックから直接搬入・搬出する必要があります。", "block.create.deployer.tooltip.condition1": "回転したとき", "block.create.deployer.tooltip.behaviour1": "腕を機械の2m先まで伸ばし、アイテムを_発動_する。", "block.create.deployer.tooltip.condition2": "レンチで右クリックしたとき", @@ -1711,7 +1717,7 @@ "block.create.deployer.tooltip.behaviour3": "合わないアイテムは搬入できません。逆に合うアイテムは搬出できません。", "block.create.brass_casing.tooltip": "真ちゅうのケーシング", - "block.create.brass_casing.tooltip.summary": "さまざまな用途に使用できる頑丈な機械ケーシング。 装飾にも安心してお使いいただけます。", + "block.create.brass_casing.tooltip.summary": "さまざまな用途に使用できる頑丈な機械ケーシング。装飾にも安心してお使いいただけます。", "block.create.pulse_repeater.tooltip": "パルスリピーター", "block.create.pulse_repeater.tooltip.summary": "通過するレッドストーン信号を_1ティック_の長さにカットする簡単な回路。", @@ -1729,22 +1735,22 @@ "block.create.powered_toggle_latch.tooltip.summary": "レッドストーンパルスによって切替できるレバー。", "block.create.powered_latch.tooltip": "パワードラッチ", - "block.create.powered_latch.tooltip.summary": "_レッドストーン信号_で制御できるレバー。 _背面のレッドストーン信号_でオンになり、_側面からのレッドストーン信号_でリセットされます。", + "block.create.powered_latch.tooltip.summary": "_レッドストーン信号_で制御できるレバー。_背面のレッドストーン信号_でオンになり、_側面からのレッドストーン信号_でリセットされます。", "block.create.controller_rail.tooltip": "コントローラーレール", "block.create.controller_rail.tooltip.summary": "トロッコの_移動速度_を_細かく制御_できる一方通行の_パワード_レール", "block.create.controller_rail.tooltip.condition1": "レッドストーン信号を受けたとき", "block.create.controller_rail.tooltip.behaviour1": "通過する_トロッコ_を_信号の強度_に対応した速度に_加速_または_減速_します。また、隣接するコントローラレールにレッドストーン信号を伝達します。強度の異なる2つのコントローラレールにレッドストーン信号を供給すると、それらの間のレールはその信号の変化を補間します。", - "block.create.speedometer.tooltip": "スピードメーター", - "block.create.speedometer.tooltip.summary": "接続された機械の_回転速度_を測定して表示します。 _レッドストーンコンパレーター_に対応しています。", + "block.create.speedometer.tooltip": "速度メーター", + "block.create.speedometer.tooltip.summary": "接続された機械の_回転速度_を測定して表示します。_レッドストーンコンパレーター_に対応しています。", "block.create.speedometer.tooltip.condition1": "回転したとき", - "block.create.speedometer.tooltip.behaviour1": "速度レベルに対応する色を表示します。 _緑_は低速、_青_は中速、_紫_は高速を示します。 一部の機械は、稼働に十分なレベルの速度を必要とします。", + "block.create.speedometer.tooltip.behaviour1": "速度レベルに対応する色を表示します。_緑_は低速、_青_は中速、_紫_は高速を示します。一部の機械は、稼働に十分なレベルの速度を必要とします。", - "block.create.stressometer.tooltip": "ストレスメーター", - "block.create.stressometer.tooltip.summary": "接続された動力ネットワーク全体の応力を測定して表示します。 _レッドストーンコンパレーター_に対応しています。", + "block.create.stressometer.tooltip": "速度メーター", + "block.create.stressometer.tooltip.summary": "接続された動力ネットワーク全体の応力を測定して表示します。_レッドストーンコンパレーター_に対応しています。", "block.create.stressometer.tooltip.condition1": "回転したとき", - "block.create.stressometer.tooltip.behaviour1": "応力レベルに対応する色を表示します。 _過度に応力がかかった(超過応力)ネットワーク_の機械は全て停止します。応力は動力ネットワークに_原動機_を追加することで緩和することができます。", + "block.create.stressometer.tooltip.behaviour1": "応力レベルに対応する色を表示します。_過度に応力がかかった(超過応力)ネットワーク_の機械は全て停止します。応力は動力ネットワークに_原動機_を追加することで緩和することができます。", "item.create.sand_paper.tooltip": "紙やすり", "item.create.sand_paper.tooltip.summary": "_素材_を_磨く_のに使える荒い紙。デプロイヤーに自動的で磨かせることもできます。", @@ -1762,7 +1768,7 @@ "item.create.builders_tea.tooltip.summary": "_やる気_がみなぎる、一日の始まりに最適な飲み物。", "item.create.refined_radiance.tooltip": "洗練された輝き", - "item.create.refined_radiance.tooltip.summary": "_吸収した光_から鍛造した色彩素材。", + "item.create.refined_radiance.tooltip.summary": "_吸収した輝き_から鍛造した色彩素材。", "item.create.shadow_steel.tooltip": "シャドウスチール", "item.create.shadow_steel.tooltip.summary": "_奈落の虚無_から鍛造した色彩素材。", @@ -1773,7 +1779,7 @@ "item.create.minecart_coupling.tooltip.behaviour1": "2台のトロッコを連結します。それらは移動中に一定の距離を保とうします。", "item.create.crafter_slot_cover.tooltip": "スロットカバー", - "item.create.crafter_slot_cover.tooltip.summary": "取り付けた_メカニカルクラフター_をレシピの空のスロットとして示します。 クラフターは必ずしも正方形である必要はありません。 これは、_同じアイテムが離れた場所にある_レシピに便利です。", + "item.create.crafter_slot_cover.tooltip.summary": "取り付けた_メカニカルクラフター_をレシピの空のスロットとして示します。クラフターは必ずしも正方形である必要はありません。これは、_同じアイテムが離れた場所にある_レシピに便利です。", "create.tooltip.wip": "WIP", "create.tooltip.workInProgress": "作業中です!", @@ -1781,10 +1787,10 @@ "create.tooltip.randomWipDescription1": "赤ちゃんパンダは、このアイテムを使用するたびに死にます。そう、いつでもね。", "create.tooltip.randomWipDescription2": "自己責任。", "create.tooltip.randomWipDescription3": "これはあなたが探しているアイテムではありません。*人差し指を振って*ちっちっちっ、解散!", - "create.tooltip.randomWipDescription4": "このアイテムは10秒で自爆します。 10、9、8 ...", + "create.tooltip.randomWipDescription4": "このアイテムは10秒で自爆します。10、9、8 ...", "create.tooltip.randomWipDescription5": "私を信じて、それは無駄だ。", "create.tooltip.randomWipDescription6": "このアイテムを使用することにより、お客様はここに免責事項に同意し、その条件に同意するものとします。", - "create.tooltip.randomWipDescription7": "これは君に向いていないかもしれない。 あれはどう??", + "create.tooltip.randomWipDescription7": "これは君に向いていないかもしれない。あれはどう??", "create.tooltip.randomWipDescription8": "それを使ったことをすぐ後悔する。", "_": "Thank you for translating Create!" 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 f9779a768..3738a1056 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: 55", + "_": "Missing Localizations: 61", "_": "->------------------------] Game Elements [------------------------<-", @@ -823,6 +823,12 @@ "create.gui.goggles.kinetic_stats": "가동 상태:", "create.gui.goggles.at_current_speed": "현재 에너지량", "create.gui.goggles.pole_length": "UNLOCALIZED: Pole Length:", + "create.gui.assembly.exception": "UNLOCALIZED: This Contraption was unable to assemble:", + "create.gui.assembly.exception.unmovableBlock": "UNLOCALIZED: Unmovable Block (%4$s) at [%1$s %2$s %3$s]", + "create.gui.assembly.exception.chunkNotLoaded": "UNLOCALIZED: The Block at [%1$s %2$s %3$s] was not in a loaded chunk", + "create.gui.assembly.exception.structureTooLarge": "UNLOCALIZED: There are too many Blocks included in the contraption.\nThe configured maximum is: %1$s", + "create.gui.assembly.exception.tooManyPistonPoles": "UNLOCALIZED: There are too many extension Poles attached to this Piston.\nThe configured maximum is: %1$s", + "create.gui.assembly.exception.noPistonPoles": "UNLOCALIZED: The Piston is missing some extension Poles", "create.gui.gauge.info_header": "게이지 정보:", "create.gui.speedometer.title": "회전 속도", "create.gui.stressometer.title": "네트워크 부하", 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 cbd42c8a8..f2d5bc807 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: 1155", + "_": "Missing Localizations: 1161", "_": "->------------------------] Game Elements [------------------------<-", @@ -823,6 +823,12 @@ "create.gui.goggles.kinetic_stats": "UNLOCALIZED: Kinetic Stats:", "create.gui.goggles.at_current_speed": "UNLOCALIZED: at current speed", "create.gui.goggles.pole_length": "UNLOCALIZED: Pole Length:", + "create.gui.assembly.exception": "UNLOCALIZED: This Contraption was unable to assemble:", + "create.gui.assembly.exception.unmovableBlock": "UNLOCALIZED: Unmovable Block (%4$s) at [%1$s %2$s %3$s]", + "create.gui.assembly.exception.chunkNotLoaded": "UNLOCALIZED: The Block at [%1$s %2$s %3$s] was not in a loaded chunk", + "create.gui.assembly.exception.structureTooLarge": "UNLOCALIZED: There are too many Blocks included in the contraption.\nThe configured maximum is: %1$s", + "create.gui.assembly.exception.tooManyPistonPoles": "UNLOCALIZED: There are too many extension Poles attached to this Piston.\nThe configured maximum is: %1$s", + "create.gui.assembly.exception.noPistonPoles": "UNLOCALIZED: The Piston is missing some extension Poles", "create.gui.gauge.info_header": "UNLOCALIZED: Gauge Information:", "create.gui.speedometer.title": "UNLOCALIZED: Rotation Speed", "create.gui.stressometer.title": "UNLOCALIZED: Network Stress", 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 a967dbbe6..4a686f966 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: 1221", + "_": "Missing Localizations: 1227", "_": "->------------------------] Game Elements [------------------------<-", @@ -823,6 +823,12 @@ "create.gui.goggles.kinetic_stats": "UNLOCALIZED: Kinetic Stats:", "create.gui.goggles.at_current_speed": "UNLOCALIZED: at current speed", "create.gui.goggles.pole_length": "UNLOCALIZED: Pole Length:", + "create.gui.assembly.exception": "UNLOCALIZED: This Contraption was unable to assemble:", + "create.gui.assembly.exception.unmovableBlock": "UNLOCALIZED: Unmovable Block (%4$s) at [%1$s %2$s %3$s]", + "create.gui.assembly.exception.chunkNotLoaded": "UNLOCALIZED: The Block at [%1$s %2$s %3$s] was not in a loaded chunk", + "create.gui.assembly.exception.structureTooLarge": "UNLOCALIZED: There are too many Blocks included in the contraption.\nThe configured maximum is: %1$s", + "create.gui.assembly.exception.tooManyPistonPoles": "UNLOCALIZED: There are too many extension Poles attached to this Piston.\nThe configured maximum is: %1$s", + "create.gui.assembly.exception.noPistonPoles": "UNLOCALIZED: The Piston is missing some extension Poles", "create.gui.gauge.info_header": "UNLOCALIZED: Gauge Information:", "create.gui.speedometer.title": "UNLOCALIZED: Rotation Speed", "create.gui.stressometer.title": "UNLOCALIZED: Network Stress", 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 01743b81b..4ccc0e1ab 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: 5", + "_": "Missing Localizations: 11", "_": "->------------------------] Game Elements [------------------------<-", @@ -823,6 +823,12 @@ "create.gui.goggles.kinetic_stats": "Кинетическая статистика:", "create.gui.goggles.at_current_speed": "На текущей скорости", "create.gui.goggles.pole_length": "Длина поршня", + "create.gui.assembly.exception": "UNLOCALIZED: This Contraption was unable to assemble:", + "create.gui.assembly.exception.unmovableBlock": "UNLOCALIZED: Unmovable Block (%4$s) at [%1$s %2$s %3$s]", + "create.gui.assembly.exception.chunkNotLoaded": "UNLOCALIZED: The Block at [%1$s %2$s %3$s] was not in a loaded chunk", + "create.gui.assembly.exception.structureTooLarge": "UNLOCALIZED: There are too many Blocks included in the contraption.\nThe configured maximum is: %1$s", + "create.gui.assembly.exception.tooManyPistonPoles": "UNLOCALIZED: There are too many extension Poles attached to this Piston.\nThe configured maximum is: %1$s", + "create.gui.assembly.exception.noPistonPoles": "UNLOCALIZED: The Piston is missing some extension Poles", "create.gui.gauge.info_header": "Калибровочная информация:", "create.gui.speedometer.title": "Скорость вращения", "create.gui.stressometer.title": "Сетевой момент", diff --git a/src/generated/resources/assets/create/lang/unfinished/zh_cn.json b/src/generated/resources/assets/create/lang/unfinished/zh_cn.json index 625bf7385..873427b8f 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: 3", + "_": "Missing Localizations: 9", "_": "->------------------------] Game Elements [------------------------<-", @@ -823,6 +823,12 @@ "create.gui.goggles.kinetic_stats": "动力学状态:", "create.gui.goggles.at_current_speed": "当前速度应力值", "create.gui.goggles.pole_length": "活塞杆长度:", + "create.gui.assembly.exception": "UNLOCALIZED: This Contraption was unable to assemble:", + "create.gui.assembly.exception.unmovableBlock": "UNLOCALIZED: Unmovable Block (%4$s) at [%1$s %2$s %3$s]", + "create.gui.assembly.exception.chunkNotLoaded": "UNLOCALIZED: The Block at [%1$s %2$s %3$s] was not in a loaded chunk", + "create.gui.assembly.exception.structureTooLarge": "UNLOCALIZED: There are too many Blocks included in the contraption.\nThe configured maximum is: %1$s", + "create.gui.assembly.exception.tooManyPistonPoles": "UNLOCALIZED: There are too many extension Poles attached to this Piston.\nThe configured maximum is: %1$s", + "create.gui.assembly.exception.noPistonPoles": "UNLOCALIZED: The Piston is missing some extension Poles", "create.gui.gauge.info_header": "仪表信息:", "create.gui.speedometer.title": "旋转速度", "create.gui.stressometer.title": "网络应力", diff --git a/src/generated/resources/assets/create/lang/unfinished/zh_tw.json b/src/generated/resources/assets/create/lang/unfinished/zh_tw.json index 8fa416308..4a9a17215 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: 8", + "_": "Missing Localizations: 14", "_": "->------------------------] Game Elements [------------------------<-", @@ -823,6 +823,12 @@ "create.gui.goggles.kinetic_stats": "機械學狀態:", "create.gui.goggles.at_current_speed": "現在速度動能值", "create.gui.goggles.pole_length": "UNLOCALIZED: Pole Length:", + "create.gui.assembly.exception": "UNLOCALIZED: This Contraption was unable to assemble:", + "create.gui.assembly.exception.unmovableBlock": "UNLOCALIZED: Unmovable Block (%4$s) at [%1$s %2$s %3$s]", + "create.gui.assembly.exception.chunkNotLoaded": "UNLOCALIZED: The Block at [%1$s %2$s %3$s] was not in a loaded chunk", + "create.gui.assembly.exception.structureTooLarge": "UNLOCALIZED: There are too many Blocks included in the contraption.\nThe configured maximum is: %1$s", + "create.gui.assembly.exception.tooManyPistonPoles": "UNLOCALIZED: There are too many extension Poles attached to this Piston.\nThe configured maximum is: %1$s", + "create.gui.assembly.exception.noPistonPoles": "UNLOCALIZED: The Piston is missing some extension Poles", "create.gui.gauge.info_header": "儀表訊息:", "create.gui.speedometer.title": "旋轉速度", "create.gui.stressometer.title": "網路動能", diff --git a/src/main/java/com/simibubi/create/AllBlockPartials.java b/src/main/java/com/simibubi/create/AllBlockPartials.java index fb029ea0d..52641d2a9 100644 --- a/src/main/java/com/simibubi/create/AllBlockPartials.java +++ b/src/main/java/com/simibubi/create/AllBlockPartials.java @@ -1,25 +1,7 @@ package com.simibubi.create; -import com.mojang.blaze3d.matrix.MatrixStack; -import com.simibubi.create.content.contraptions.base.KineticRenderMaterials; -import com.simibubi.create.content.contraptions.base.RotatingData; -import com.simibubi.create.content.contraptions.fluids.FluidTransportBehaviour.AttachmentTypes; -import com.simibubi.create.content.contraptions.processing.burner.BlazeBurnerBlock.HeatLevel; -import com.simibubi.create.content.contraptions.relays.belt.BeltData; -import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer; -import com.simibubi.create.foundation.render.SuperByteBuffer; -import com.simibubi.create.foundation.render.backend.instancing.*; -import com.simibubi.create.foundation.utility.AngleHelper; -import com.simibubi.create.foundation.utility.Iterate; -import com.simibubi.create.foundation.utility.Lang; -import com.simibubi.create.foundation.utility.MatrixStacker; -import net.minecraft.block.BlockState; -import net.minecraft.client.renderer.model.IBakedModel; -import net.minecraft.util.Direction; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.client.event.ModelBakeEvent; -import net.minecraftforge.client.event.ModelRegistryEvent; -import net.minecraftforge.client.model.ModelLoader; +import static net.minecraft.state.properties.BlockStateProperties.FACING; +import static net.minecraft.state.properties.BlockStateProperties.HORIZONTAL_FACING; import java.util.ArrayList; import java.util.HashMap; @@ -27,8 +9,27 @@ import java.util.List; import java.util.Map; import java.util.function.Supplier; -import static net.minecraft.state.properties.BlockStateProperties.FACING; -import static net.minecraft.state.properties.BlockStateProperties.HORIZONTAL_FACING; +import com.mojang.blaze3d.matrix.MatrixStack; +import com.simibubi.create.content.contraptions.base.KineticRenderMaterials; +import com.simibubi.create.content.contraptions.base.RotatingData; +import com.simibubi.create.content.contraptions.fluids.FluidTransportBehaviour.AttachmentTypes; +import com.simibubi.create.content.contraptions.processing.burner.BlazeBurnerBlock.HeatLevel; +import com.simibubi.create.content.contraptions.relays.belt.BeltData; +import com.simibubi.create.foundation.render.SuperByteBuffer; +import com.simibubi.create.foundation.render.backend.instancing.InstancedModel; +import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer; +import com.simibubi.create.foundation.utility.AngleHelper; +import com.simibubi.create.foundation.utility.Iterate; +import com.simibubi.create.foundation.utility.Lang; +import com.simibubi.create.foundation.utility.MatrixStacker; + +import net.minecraft.block.BlockState; +import net.minecraft.client.renderer.model.IBakedModel; +import net.minecraft.util.Direction; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.client.event.ModelBakeEvent; +import net.minecraftforge.client.event.ModelRegistryEvent; +import net.minecraftforge.client.model.ModelLoader; public class AllBlockPartials { diff --git a/src/main/java/com/simibubi/create/AllColorHandlers.java b/src/main/java/com/simibubi/create/AllColorHandlers.java index f6c0fe245..9aa7ce8cc 100644 --- a/src/main/java/com/simibubi/create/AllColorHandlers.java +++ b/src/main/java/com/simibubi/create/AllColorHandlers.java @@ -1,7 +1,11 @@ package com.simibubi.create; +import java.util.HashMap; +import java.util.Map; + import com.simibubi.create.foundation.block.IBlockVertexColor; import com.simibubi.create.foundation.block.render.ColoredVertexModel; + import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.block.RedstoneWireBlock; @@ -18,9 +22,6 @@ import net.minecraft.world.GrassColors; import net.minecraft.world.ILightReader; import net.minecraft.world.biome.BiomeColors; -import java.util.HashMap; -import java.util.Map; - public class AllColorHandlers { private final Map coloredVertexBlocks = new HashMap<>(); diff --git a/src/main/java/com/simibubi/create/AllEntityTypes.java b/src/main/java/com/simibubi/create/AllEntityTypes.java index ba2097ff8..d811fba0e 100644 --- a/src/main/java/com/simibubi/create/AllEntityTypes.java +++ b/src/main/java/com/simibubi/create/AllEntityTypes.java @@ -1,7 +1,11 @@ package com.simibubi.create; import com.simibubi.create.content.contraptions.components.actors.SeatEntity; -import com.simibubi.create.content.contraptions.components.structureMovement.*; +import com.simibubi.create.content.contraptions.components.structureMovement.AbstractContraptionEntity; +import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionEntityRenderer; +import com.simibubi.create.content.contraptions.components.structureMovement.ControlledContraptionEntity; +import com.simibubi.create.content.contraptions.components.structureMovement.OrientedContraptionEntity; +import com.simibubi.create.content.contraptions.components.structureMovement.OrientedContraptionEntityRenderer; import com.simibubi.create.content.contraptions.components.structureMovement.gantry.GantryContraptionEntity; import com.simibubi.create.content.contraptions.components.structureMovement.glue.SuperGlueEntity; import com.simibubi.create.content.contraptions.components.structureMovement.glue.SuperGlueRenderer; diff --git a/src/main/java/com/simibubi/create/AllItems.java b/src/main/java/com/simibubi/create/AllItems.java index 85d8cd1f9..292e50d91 100644 --- a/src/main/java/com/simibubi/create/AllItems.java +++ b/src/main/java/com/simibubi/create/AllItems.java @@ -284,6 +284,7 @@ public class AllItems { .register(); } + @SuppressWarnings("unused") private static ItemEntry hiddenIngredient(String name) { return REGISTRATE.item(name, HiddenIngredientItem::new) .register(); diff --git a/src/main/java/com/simibubi/create/AllTileEntities.java b/src/main/java/com/simibubi/create/AllTileEntities.java index 231836c8e..1abb73271 100644 --- a/src/main/java/com/simibubi/create/AllTileEntities.java +++ b/src/main/java/com/simibubi/create/AllTileEntities.java @@ -1,7 +1,19 @@ package com.simibubi.create; -import com.simibubi.create.content.contraptions.base.*; -import com.simibubi.create.content.contraptions.components.actors.*; +import com.simibubi.create.content.contraptions.base.BackHalfShaftInstance; +import com.simibubi.create.content.contraptions.base.HalfShaftInstance; +import com.simibubi.create.content.contraptions.base.HorizontalHalfShaftInstance; +import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer; +import com.simibubi.create.content.contraptions.base.ShaftlessCogInstance; +import com.simibubi.create.content.contraptions.base.SingleRotatingInstance; +import com.simibubi.create.content.contraptions.components.actors.DrillInstance; +import com.simibubi.create.content.contraptions.components.actors.DrillRenderer; +import com.simibubi.create.content.contraptions.components.actors.DrillTileEntity; +import com.simibubi.create.content.contraptions.components.actors.HarvesterRenderer; +import com.simibubi.create.content.contraptions.components.actors.HarvesterTileEntity; +import com.simibubi.create.content.contraptions.components.actors.PortableFluidInterfaceTileEntity; +import com.simibubi.create.content.contraptions.components.actors.PortableItemInterfaceTileEntity; +import com.simibubi.create.content.contraptions.components.actors.PortableStorageInterfaceRenderer; import com.simibubi.create.content.contraptions.components.clock.CuckooClockRenderer; import com.simibubi.create.content.contraptions.components.clock.CuckooClockTileEntity; import com.simibubi.create.content.contraptions.components.crafter.MechanicalCrafterInstance; @@ -51,8 +63,18 @@ import com.simibubi.create.content.contraptions.components.waterwheel.WaterWheel import com.simibubi.create.content.contraptions.fluids.PumpCogInstance; import com.simibubi.create.content.contraptions.fluids.PumpRenderer; import com.simibubi.create.content.contraptions.fluids.PumpTileEntity; -import com.simibubi.create.content.contraptions.fluids.actors.*; -import com.simibubi.create.content.contraptions.fluids.pipes.*; +import com.simibubi.create.content.contraptions.fluids.actors.HosePulleyRenderer; +import com.simibubi.create.content.contraptions.fluids.actors.HosePulleyTileEntity; +import com.simibubi.create.content.contraptions.fluids.actors.ItemDrainRenderer; +import com.simibubi.create.content.contraptions.fluids.actors.ItemDrainTileEntity; +import com.simibubi.create.content.contraptions.fluids.actors.SpoutRenderer; +import com.simibubi.create.content.contraptions.fluids.actors.SpoutTileEntity; +import com.simibubi.create.content.contraptions.fluids.pipes.FluidPipeTileEntity; +import com.simibubi.create.content.contraptions.fluids.pipes.FluidValveRenderer; +import com.simibubi.create.content.contraptions.fluids.pipes.FluidValveTileEntity; +import com.simibubi.create.content.contraptions.fluids.pipes.SmartFluidPipeTileEntity; +import com.simibubi.create.content.contraptions.fluids.pipes.StraightPipeTileEntity; +import com.simibubi.create.content.contraptions.fluids.pipes.TransparentStraightPipeRenderer; import com.simibubi.create.content.contraptions.fluids.tank.CreativeFluidTankTileEntity; import com.simibubi.create.content.contraptions.fluids.tank.FluidTankRenderer; import com.simibubi.create.content.contraptions.fluids.tank.FluidTankTileEntity; @@ -68,7 +90,13 @@ import com.simibubi.create.content.contraptions.relays.belt.BeltInstance; import com.simibubi.create.content.contraptions.relays.belt.BeltRenderer; import com.simibubi.create.content.contraptions.relays.belt.BeltTileEntity; import com.simibubi.create.content.contraptions.relays.elementary.SimpleKineticTileEntity; -import com.simibubi.create.content.contraptions.relays.encased.*; +import com.simibubi.create.content.contraptions.relays.encased.AdjustablePulleyTileEntity; +import com.simibubi.create.content.contraptions.relays.encased.ClutchTileEntity; +import com.simibubi.create.content.contraptions.relays.encased.EncasedShaftRenderer; +import com.simibubi.create.content.contraptions.relays.encased.EncasedShaftTileEntity; +import com.simibubi.create.content.contraptions.relays.encased.ShaftInstance; +import com.simibubi.create.content.contraptions.relays.encased.SplitShaftInstance; +import com.simibubi.create.content.contraptions.relays.encased.SplitShaftRenderer; import com.simibubi.create.content.contraptions.relays.gauge.GaugeRenderer; import com.simibubi.create.content.contraptions.relays.gauge.SpeedGaugeTileEntity; import com.simibubi.create.content.contraptions.relays.gauge.StressGaugeTileEntity; @@ -95,7 +123,13 @@ import com.simibubi.create.content.logistics.block.inventories.CreativeCrateTile import com.simibubi.create.content.logistics.block.mechanicalArm.ArmInstance; import com.simibubi.create.content.logistics.block.mechanicalArm.ArmRenderer; import com.simibubi.create.content.logistics.block.mechanicalArm.ArmTileEntity; -import com.simibubi.create.content.logistics.block.redstone.*; +import com.simibubi.create.content.logistics.block.redstone.AnalogLeverRenderer; +import com.simibubi.create.content.logistics.block.redstone.AnalogLeverTileEntity; +import com.simibubi.create.content.logistics.block.redstone.ContentObserverTileEntity; +import com.simibubi.create.content.logistics.block.redstone.NixieTubeRenderer; +import com.simibubi.create.content.logistics.block.redstone.NixieTubeTileEntity; +import com.simibubi.create.content.logistics.block.redstone.RedstoneLinkTileEntity; +import com.simibubi.create.content.logistics.block.redstone.StockpileSwitchTileEntity; import com.simibubi.create.content.schematics.block.SchematicTableTileEntity; import com.simibubi.create.content.schematics.block.SchematicannonRenderer; import com.simibubi.create.content.schematics.block.SchematicannonTileEntity; diff --git a/src/main/java/com/simibubi/create/Create.java b/src/main/java/com/simibubi/create/Create.java index af28f62f3..4a13fc88d 100644 --- a/src/main/java/com/simibubi/create/Create.java +++ b/src/main/java/com/simibubi/create/Create.java @@ -95,7 +95,7 @@ public class Create { AllConfigs.register(); random = new Random(); - DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> CreateClient.addClientListeners(modEventBus)); + DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> CreateClient.addClientListeners(modEventBus)); } public static void init(final FMLCommonSetupEvent event) { diff --git a/src/main/java/com/simibubi/create/CreateClient.java b/src/main/java/com/simibubi/create/CreateClient.java index 5ddaa41fd..e698cfe85 100644 --- a/src/main/java/com/simibubi/create/CreateClient.java +++ b/src/main/java/com/simibubi/create/CreateClient.java @@ -6,6 +6,7 @@ import java.util.Map; import java.util.function.Function; import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer; +import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionRenderDispatcher; import com.simibubi.create.content.contraptions.relays.encased.CasingConnectivity; import com.simibubi.create.content.schematics.ClientSchematicLoader; import com.simibubi.create.content.schematics.client.SchematicAndQuillHandler; @@ -16,10 +17,9 @@ import com.simibubi.create.foundation.block.render.SpriteShifter; import com.simibubi.create.foundation.item.CustomItemModels; import com.simibubi.create.foundation.item.CustomRenderedItems; import com.simibubi.create.foundation.render.KineticRenderer; -import com.simibubi.create.foundation.render.backend.OptifineHandler; import com.simibubi.create.foundation.render.SuperByteBufferCache; -import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionRenderDispatcher; import com.simibubi.create.foundation.render.backend.Backend; +import com.simibubi.create.foundation.render.backend.OptifineHandler; import com.simibubi.create.foundation.utility.ghost.GhostBlocks; import com.simibubi.create.foundation.utility.outliner.Outliner; 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 003cf9333..2ff8f46ad 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 @@ -3,6 +3,7 @@ package com.simibubi.create.compat.jei.category.animations; import com.simibubi.create.AllBlockPartials; import com.simibubi.create.AllBlocks; import com.simibubi.create.foundation.utility.AnimationTickHolder; + import mezz.jei.api.gui.drawable.IDrawable; import net.minecraft.block.BlockState; import net.minecraft.state.properties.BlockStateProperties; 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 7b2d99c6e..849e95121 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 @@ -5,6 +5,7 @@ import com.simibubi.create.AllBlockPartials; import com.simibubi.create.AllBlocks; import com.simibubi.create.foundation.gui.GuiGameElement; import com.simibubi.create.foundation.utility.AnimationTickHolder; + import net.minecraft.util.Direction.Axis; public class AnimatedPress extends AnimatedKinetics { 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 52eed284e..d39255552 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 @@ -1,5 +1,7 @@ package com.simibubi.create.compat.jei.category.animations; +import java.util.List; + import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.systems.RenderSystem; import com.simibubi.create.AllBlockPartials; @@ -7,14 +9,13 @@ import com.simibubi.create.AllBlocks; import com.simibubi.create.foundation.fluid.FluidRenderer; import com.simibubi.create.foundation.gui.GuiGameElement; import com.simibubi.create.foundation.utility.AnimationTickHolder; + import net.minecraft.client.renderer.IRenderTypeBuffer; import net.minecraft.client.renderer.IRenderTypeBuffer.Impl; import net.minecraft.client.renderer.Tessellator; import net.minecraft.util.math.MathHelper; import net.minecraftforge.fluids.FluidStack; -import java.util.List; - public class AnimatedSpout extends AnimatedKinetics { private List fluids; diff --git a/src/main/java/com/simibubi/create/content/contraptions/KineticNetwork.java b/src/main/java/com/simibubi/create/content/contraptions/KineticNetwork.java index 60ca8abb3..bbbe8e585 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/KineticNetwork.java +++ b/src/main/java/com/simibubi/create/content/contraptions/KineticNetwork.java @@ -1,13 +1,13 @@ package com.simibubi.create.content.contraptions; -import com.simibubi.create.content.contraptions.base.KineticTileEntity; -import com.simibubi.create.content.contraptions.components.flywheel.FlywheelTileEntity; -import com.simibubi.create.foundation.advancement.AllTriggers; - import java.util.HashMap; import java.util.Iterator; import java.util.Map; +import com.simibubi.create.content.contraptions.base.KineticTileEntity; +import com.simibubi.create.content.contraptions.components.flywheel.FlywheelTileEntity; +import com.simibubi.create.foundation.advancement.AllTriggers; + public class KineticNetwork { public Long id; diff --git a/src/main/java/com/simibubi/create/content/contraptions/base/BackHalfShaftInstance.java b/src/main/java/com/simibubi/create/content/contraptions/base/BackHalfShaftInstance.java index 4a1875d28..0d566b45f 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/base/BackHalfShaftInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/base/BackHalfShaftInstance.java @@ -1,7 +1,8 @@ package com.simibubi.create.content.contraptions.base; -import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer; import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderRegistry; +import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer; + import net.minecraft.state.properties.BlockStateProperties; import net.minecraft.tileentity.TileEntityType; import net.minecraft.util.Direction; @@ -10,7 +11,7 @@ import net.minecraftforge.fml.DistExecutor; public class BackHalfShaftInstance extends HalfShaftInstance { public static void register(TileEntityType type) { - DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> + DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> InstancedTileRenderRegistry.instance.register(type, BackHalfShaftInstance::new)); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/base/HalfShaftInstance.java b/src/main/java/com/simibubi/create/content/contraptions/base/HalfShaftInstance.java index 0547b25fc..6e70b9780 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/base/HalfShaftInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/base/HalfShaftInstance.java @@ -1,9 +1,10 @@ package com.simibubi.create.content.contraptions.base; import com.simibubi.create.AllBlockPartials; -import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer; import com.simibubi.create.foundation.render.backend.instancing.InstancedModel; import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderRegistry; +import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer; + import net.minecraft.state.properties.BlockStateProperties; import net.minecraft.tileentity.TileEntityType; import net.minecraft.util.Direction; @@ -12,7 +13,7 @@ import net.minecraftforge.fml.DistExecutor; public class HalfShaftInstance extends SingleRotatingInstance { public static void register(TileEntityType type) { - DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> + DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> InstancedTileRenderRegistry.instance.register(type, HalfShaftInstance::new)); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/base/HorizontalHalfShaftInstance.java b/src/main/java/com/simibubi/create/content/contraptions/base/HorizontalHalfShaftInstance.java index a42524118..958305113 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/base/HorizontalHalfShaftInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/base/HorizontalHalfShaftInstance.java @@ -1,7 +1,8 @@ package com.simibubi.create.content.contraptions.base; -import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer; import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderRegistry; +import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer; + import net.minecraft.state.properties.BlockStateProperties; import net.minecraft.tileentity.TileEntityType; import net.minecraft.util.Direction; @@ -10,7 +11,7 @@ import net.minecraftforge.fml.DistExecutor; public class HorizontalHalfShaftInstance extends HalfShaftInstance { public static void register(TileEntityType type) { - DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> + DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> InstancedTileRenderRegistry.instance.register(type, HorizontalHalfShaftInstance::new)); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/base/KineticData.java b/src/main/java/com/simibubi/create/content/contraptions/base/KineticData.java index a5f2889ba..84d8a878a 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/base/KineticData.java +++ b/src/main/java/com/simibubi/create/content/contraptions/base/KineticData.java @@ -1,13 +1,14 @@ package com.simibubi.create.content.contraptions.base; +import java.nio.ByteBuffer; + import com.simibubi.create.foundation.render.backend.instancing.InstanceData; import com.simibubi.create.foundation.render.backend.instancing.InstancedModel; import com.simibubi.create.foundation.utility.ColorHelper; + import net.minecraft.client.renderer.Vector3f; import net.minecraft.util.math.BlockPos; -import java.nio.ByteBuffer; - public class KineticData> extends InstanceData { private float x; private float y; 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 77a14eabb..49223a3cb 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 @@ -1,9 +1,9 @@ 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.foundation.render.backend.instancing.InstancedModel; import com.simibubi.create.foundation.render.backend.instancing.MaterialType; -import com.simibubi.create.content.contraptions.components.actors.ContraptionActorData; public class KineticRenderMaterials { public static final MaterialType> ROTATING = new MaterialType<>(); 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 afc9304f8..f99113046 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 @@ -43,12 +43,6 @@ import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.fml.DistExecutor; -import javax.annotation.Nullable; -import java.util.List; - -import static net.minecraft.util.text.TextFormatting.GOLD; -import static net.minecraft.util.text.TextFormatting.GRAY; - public abstract class KineticTileEntity extends SmartTileEntity implements ITickableTileEntity, IHaveGoggleInformation, IHaveHoveringInformation, IInstanceRendered { @@ -548,13 +542,13 @@ public abstract class KineticTileEntity extends SmartTileEntity public void onLoad() { super.onLoad(); if (world != null && world.isRemote) - DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> CreateClient.kineticRenderer.add(this)); + DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> CreateClient.kineticRenderer.add(this)); } @Override public void onChunkUnloaded() { if (world != null && world.isRemote) - DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> CreateClient.kineticRenderer.remove(this)); + DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> CreateClient.kineticRenderer.remove(this)); } @Override diff --git a/src/main/java/com/simibubi/create/content/contraptions/base/KineticTileEntityRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/base/KineticTileEntityRenderer.java index 836d63c66..cc27ee7f8 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/base/KineticTileEntityRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/base/KineticTileEntityRenderer.java @@ -6,12 +6,12 @@ import com.simibubi.create.AllBlocks; import com.simibubi.create.CreateClient; import com.simibubi.create.content.contraptions.KineticDebugger; import com.simibubi.create.content.contraptions.relays.elementary.CogWheelBlock; +import com.simibubi.create.foundation.render.Compartment; +import com.simibubi.create.foundation.render.SuperByteBuffer; import com.simibubi.create.foundation.render.backend.FastRenderDispatcher; import com.simibubi.create.foundation.tileEntity.renderer.SafeTileEntityRenderer; import com.simibubi.create.foundation.utility.AnimationTickHolder; import com.simibubi.create.foundation.utility.ColorHelper; -import com.simibubi.create.foundation.render.SuperByteBuffer; -import com.simibubi.create.foundation.render.Compartment; import net.minecraft.block.BlockState; import net.minecraft.client.renderer.IRenderTypeBuffer; diff --git a/src/main/java/com/simibubi/create/content/contraptions/base/KineticTileInstance.java b/src/main/java/com/simibubi/create/content/contraptions/base/KineticTileInstance.java index f94f5b959..69f53613c 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/base/KineticTileInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/base/KineticTileInstance.java @@ -1,16 +1,20 @@ package com.simibubi.create.content.contraptions.base; +import java.util.function.Consumer; + import com.simibubi.create.AllBlocks; import com.simibubi.create.content.contraptions.relays.elementary.CogWheelBlock; import com.simibubi.create.content.contraptions.relays.elementary.ShaftBlock; +import com.simibubi.create.foundation.render.backend.instancing.InstanceKey; +import com.simibubi.create.foundation.render.backend.instancing.InstancedModel; import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer; -import com.simibubi.create.foundation.render.backend.instancing.*; +import com.simibubi.create.foundation.render.backend.instancing.RenderMaterial; +import com.simibubi.create.foundation.render.backend.instancing.TileEntityInstance; + import net.minecraft.block.BlockState; import net.minecraft.util.Direction; import net.minecraft.world.LightType; -import java.util.function.Consumer; - public abstract class KineticTileInstance extends TileEntityInstance { public KineticTileInstance(InstancedTileRenderer modelManager, T tile) { diff --git a/src/main/java/com/simibubi/create/content/contraptions/base/RotatedPillarKineticBlock.java b/src/main/java/com/simibubi/create/content/contraptions/base/RotatedPillarKineticBlock.java index f76ff0319..75c45893c 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/base/RotatedPillarKineticBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/base/RotatedPillarKineticBlock.java @@ -1,6 +1,7 @@ package com.simibubi.create.content.contraptions.base; import com.simibubi.create.foundation.utility.Iterate; + import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.item.BlockItemUseContext; diff --git a/src/main/java/com/simibubi/create/content/contraptions/base/RotatingData.java b/src/main/java/com/simibubi/create/content/contraptions/base/RotatingData.java index 75fca6a53..dcc5ca5f7 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/base/RotatingData.java +++ b/src/main/java/com/simibubi/create/content/contraptions/base/RotatingData.java @@ -1,12 +1,13 @@ package com.simibubi.create.content.contraptions.base; +import java.nio.ByteBuffer; + import com.simibubi.create.foundation.render.backend.gl.attrib.VertexFormat; import com.simibubi.create.foundation.render.backend.instancing.InstancedModel; + import net.minecraft.client.renderer.Vector3f; import net.minecraft.util.Direction; -import java.nio.ByteBuffer; - public class RotatingData extends KineticData { public static VertexFormat FORMAT = VertexFormat.builder() .addAttributes(KineticVertexAttributes.class) diff --git a/src/main/java/com/simibubi/create/content/contraptions/base/RotatingInstancedModel.java b/src/main/java/com/simibubi/create/content/contraptions/base/RotatingInstancedModel.java index 0b9a2e998..6f439ca42 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/base/RotatingInstancedModel.java +++ b/src/main/java/com/simibubi/create/content/contraptions/base/RotatingInstancedModel.java @@ -3,6 +3,7 @@ package com.simibubi.create.content.contraptions.base; 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 RotatingInstancedModel extends InstancedModel { diff --git a/src/main/java/com/simibubi/create/content/contraptions/base/ShaftlessCogInstance.java b/src/main/java/com/simibubi/create/content/contraptions/base/ShaftlessCogInstance.java index a64b049bd..ff96d5856 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/base/ShaftlessCogInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/base/ShaftlessCogInstance.java @@ -1,16 +1,17 @@ package com.simibubi.create.content.contraptions.base; import com.simibubi.create.AllBlockPartials; -import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer; import com.simibubi.create.foundation.render.backend.instancing.InstancedModel; import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderRegistry; +import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer; + import net.minecraft.tileentity.TileEntityType; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.fml.DistExecutor; public class ShaftlessCogInstance extends SingleRotatingInstance { public static void register(TileEntityType type) { - DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> + DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> InstancedTileRenderRegistry.instance.register(type, ShaftlessCogInstance::new)); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/base/SingleRotatingInstance.java b/src/main/java/com/simibubi/create/content/contraptions/base/SingleRotatingInstance.java index 3a717e5a7..9008e2f44 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/base/SingleRotatingInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/base/SingleRotatingInstance.java @@ -1,20 +1,21 @@ package com.simibubi.create.content.contraptions.base; -import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer; +import static com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer.KINETIC_TILE; + import com.simibubi.create.foundation.render.backend.instancing.InstanceKey; import com.simibubi.create.foundation.render.backend.instancing.InstancedModel; import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderRegistry; +import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer; + import net.minecraft.block.BlockState; import net.minecraft.tileentity.TileEntityType; import net.minecraft.util.Direction; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.fml.DistExecutor; -import static com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer.KINETIC_TILE; - public class SingleRotatingInstance extends KineticTileInstance { public static void register(TileEntityType type) { - DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> + DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> InstancedTileRenderRegistry.instance.register(type, SingleRotatingInstance::new)); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/actors/ContraptionActorData.java b/src/main/java/com/simibubi/create/content/contraptions/components/actors/ContraptionActorData.java index d7eb78b24..56853e9d1 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/actors/ContraptionActorData.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/actors/ContraptionActorData.java @@ -1,13 +1,14 @@ package com.simibubi.create.content.contraptions.components.actors; +import java.nio.ByteBuffer; + 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 ContraptionActorData extends InstanceData { public static VertexFormat FORMAT = VertexFormat.builder() .addAttributes(ActorVertexAttributes.class) diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/actors/DrillInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/actors/DrillInstance.java index 16fd9b7d4..6ff6d7832 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/actors/DrillInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/actors/DrillInstance.java @@ -6,8 +6,12 @@ import com.simibubi.create.content.contraptions.base.RotatingData; import com.simibubi.create.content.contraptions.base.SingleRotatingInstance; import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext; import com.simibubi.create.content.contraptions.components.structureMovement.render.RenderedContraption; -import com.simibubi.create.foundation.render.backend.instancing.*; +import com.simibubi.create.foundation.render.backend.instancing.InstancedModel; +import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderRegistry; +import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer; +import com.simibubi.create.foundation.render.backend.instancing.RenderMaterial; import com.simibubi.create.foundation.utility.AngleHelper; + import net.minecraft.block.BlockState; import net.minecraft.tileentity.TileEntityType; import net.minecraft.util.Direction; @@ -17,7 +21,7 @@ import net.minecraftforge.fml.DistExecutor; public class DrillInstance extends SingleRotatingInstance { public static void register(TileEntityType type) { - DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> + DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> InstancedTileRenderRegistry.instance.register(type, DrillInstance::new)); } public DrillInstance(InstancedTileRenderer modelManager, KineticTileEntity tile) { diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/actors/DrillMovementBehaviour.java b/src/main/java/com/simibubi/create/content/contraptions/components/actors/DrillMovementBehaviour.java index a600cf9da..965d6c3c0 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/actors/DrillMovementBehaviour.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/actors/DrillMovementBehaviour.java @@ -2,8 +2,8 @@ package com.simibubi.create.content.contraptions.components.actors; import com.mojang.blaze3d.matrix.MatrixStack; import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext; -import com.simibubi.create.foundation.render.backend.FastRenderDispatcher; import com.simibubi.create.content.contraptions.components.structureMovement.render.RenderedContraption; +import com.simibubi.create.foundation.render.backend.FastRenderDispatcher; import com.simibubi.create.foundation.utility.VecHelper; import net.minecraft.block.BlockState; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/actors/DrillRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/components/actors/DrillRenderer.java index 57e858cde..8a73c8ec7 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/actors/DrillRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/actors/DrillRenderer.java @@ -7,10 +7,10 @@ import com.simibubi.create.AllBlockPartials; import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer; import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext; +import com.simibubi.create.foundation.render.SuperByteBuffer; import com.simibubi.create.foundation.utility.AngleHelper; import com.simibubi.create.foundation.utility.AnimationTickHolder; import com.simibubi.create.foundation.utility.MatrixStacker; -import com.simibubi.create.foundation.render.SuperByteBuffer; import com.simibubi.create.foundation.utility.VecHelper; import net.minecraft.block.BlockState; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/actors/HarvesterMovementBehaviour.java b/src/main/java/com/simibubi/create/content/contraptions/components/actors/HarvesterMovementBehaviour.java index c2d2b7880..ea53b2b2c 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/actors/HarvesterMovementBehaviour.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/actors/HarvesterMovementBehaviour.java @@ -2,13 +2,13 @@ package com.simibubi.create.content.contraptions.components.actors; import static net.minecraft.block.HorizontalBlock.HORIZONTAL_FACING; -import com.simibubi.create.foundation.render.backend.FastRenderDispatcher; -import com.simibubi.create.content.contraptions.components.structureMovement.render.RenderedContraption; import org.apache.commons.lang3.mutable.MutableBoolean; import com.mojang.blaze3d.matrix.MatrixStack; import com.simibubi.create.content.contraptions.components.structureMovement.MovementBehaviour; import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext; +import com.simibubi.create.content.contraptions.components.structureMovement.render.RenderedContraption; +import com.simibubi.create.foundation.render.backend.FastRenderDispatcher; import com.simibubi.create.foundation.utility.BlockHelper; import com.simibubi.create.foundation.utility.VecHelper; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/actors/HarvesterRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/components/actors/HarvesterRenderer.java index 7456140d0..f271549d9 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/actors/HarvesterRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/actors/HarvesterRenderer.java @@ -7,12 +7,12 @@ import com.simibubi.create.AllBlockPartials; import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext; import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionRenderDispatcher; import com.simibubi.create.content.contraptions.components.structureMovement.render.RenderedContraption; +import com.simibubi.create.foundation.render.SuperByteBuffer; import com.simibubi.create.foundation.render.backend.instancing.InstancedModel; import com.simibubi.create.foundation.render.backend.instancing.RenderMaterial; 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.render.SuperByteBuffer; import com.simibubi.create.foundation.utility.VecHelper; import net.minecraft.block.BlockState; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/actors/PortableStorageInterfaceRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/components/actors/PortableStorageInterfaceRenderer.java index 4f3ac91e8..a67d0da54 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/actors/PortableStorageInterfaceRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/actors/PortableStorageInterfaceRenderer.java @@ -1,5 +1,7 @@ package com.simibubi.create.content.contraptions.components.actors; +import java.util.function.Consumer; + import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.vertex.IVertexBuilder; import com.simibubi.create.AllBlockPartials; @@ -11,6 +13,7 @@ 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.renderer.IRenderTypeBuffer; import net.minecraft.client.renderer.RenderType; @@ -20,8 +23,6 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.Direction; import net.minecraft.util.math.BlockPos; -import java.util.function.Consumer; - public class PortableStorageInterfaceRenderer extends SafeTileEntityRenderer { public PortableStorageInterfaceRenderer(TileEntityRendererDispatcher dispatcher) { diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/actors/RotatingActorModel.java b/src/main/java/com/simibubi/create/content/contraptions/components/actors/RotatingActorModel.java index 0efe011b0..8715c6f99 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/actors/RotatingActorModel.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/actors/RotatingActorModel.java @@ -3,6 +3,7 @@ package com.simibubi.create.content.contraptions.components.actors; 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 RotatingActorModel extends InstancedModel { diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/clock/CuckooClockRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/components/clock/CuckooClockRenderer.java index 6f7c8c427..cdbd0e92e 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/clock/CuckooClockRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/clock/CuckooClockRenderer.java @@ -6,8 +6,8 @@ import com.simibubi.create.AllBlockPartials; import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer; import com.simibubi.create.content.contraptions.components.clock.CuckooClockTileEntity.Animation; -import com.simibubi.create.foundation.utility.AngleHelper; import com.simibubi.create.foundation.render.SuperByteBuffer; +import com.simibubi.create.foundation.utility.AngleHelper; import net.minecraft.block.BlockState; import net.minecraft.client.renderer.IRenderTypeBuffer; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/clock/CuckooClockTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/clock/CuckooClockTileEntity.java index bc2d77826..791d82e8e 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/clock/CuckooClockTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/clock/CuckooClockTileEntity.java @@ -1,5 +1,9 @@ package com.simibubi.create.content.contraptions.components.clock; +import static com.simibubi.create.foundation.utility.AngleHelper.deg; +import static com.simibubi.create.foundation.utility.AngleHelper.getShortestAngleDiff; +import static com.simibubi.create.foundation.utility.AngleHelper.rad; + import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.foundation.advancement.AllTriggers; import com.simibubi.create.foundation.gui.widgets.InterpolatedChasingValue; @@ -7,6 +11,7 @@ import com.simibubi.create.foundation.gui.widgets.InterpolatedValue; import com.simibubi.create.foundation.utility.AnimationTickHolder; import com.simibubi.create.foundation.utility.NBTHelper; import com.simibubi.create.foundation.utility.VecHelper; + import net.minecraft.nbt.CompoundNBT; import net.minecraft.particles.ParticleTypes; import net.minecraft.tileentity.TileEntityType; @@ -17,8 +22,6 @@ import net.minecraft.util.SoundEvents; import net.minecraft.util.math.Vec3d; import net.minecraft.world.Explosion; -import static com.simibubi.create.foundation.utility.AngleHelper.*; - public class CuckooClockTileEntity extends KineticTileEntity { public static DamageSource CUCKOO_SURPRISE = new DamageSource("create.cuckoo_clock_explosion").setExplosion(); diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/crafter/MechanicalCrafterInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/crafter/MechanicalCrafterInstance.java index 74c889e01..5313cdbef 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/crafter/MechanicalCrafterInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/crafter/MechanicalCrafterInstance.java @@ -1,25 +1,25 @@ package com.simibubi.create.content.contraptions.components.crafter; +import java.util.function.Supplier; + import com.mojang.blaze3d.matrix.MatrixStack; import com.simibubi.create.AllBlockPartials; import com.simibubi.create.content.contraptions.base.KineticTileEntity; +import com.simibubi.create.content.contraptions.base.RotatingData; import com.simibubi.create.content.contraptions.base.SingleRotatingInstance; -import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer; import com.simibubi.create.foundation.render.backend.instancing.InstancedModel; import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderRegistry; -import com.simibubi.create.content.contraptions.base.RotatingData; -import com.simibubi.create.foundation.utility.AngleHelper; +import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer; import com.simibubi.create.foundation.utility.MatrixStacker; + import net.minecraft.tileentity.TileEntityType; import net.minecraft.util.Direction; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.fml.DistExecutor; -import java.util.function.Supplier; - public class MechanicalCrafterInstance extends SingleRotatingInstance { public static void register(TileEntityType type) { - DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> + DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> InstancedTileRenderRegistry.instance.register(type, MechanicalCrafterInstance::new)); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/crafter/MechanicalCrafterRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/components/crafter/MechanicalCrafterRenderer.java index d94e5c35c..a40e7d3aa 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/crafter/MechanicalCrafterRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/crafter/MechanicalCrafterRenderer.java @@ -1,17 +1,21 @@ package com.simibubi.create.content.contraptions.components.crafter; +import static com.simibubi.create.content.contraptions.base.HorizontalKineticBlock.HORIZONTAL_FACING; +import static com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer.standardKineticRotationTransform; + import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.vertex.IVertexBuilder; import com.simibubi.create.AllBlockPartials; import com.simibubi.create.AllSpriteShifts; import com.simibubi.create.content.contraptions.components.crafter.MechanicalCrafterTileEntity.Phase; import com.simibubi.create.content.contraptions.components.crafter.RecipeGridHandler.GroupedItems; -import com.simibubi.create.foundation.render.backend.FastRenderDispatcher; import com.simibubi.create.foundation.render.SuperByteBuffer; +import com.simibubi.create.foundation.render.backend.FastRenderDispatcher; 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; @@ -26,9 +30,6 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.Vec3d; -import static com.simibubi.create.content.contraptions.base.HorizontalKineticBlock.HORIZONTAL_FACING; -import static com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer.standardKineticRotationTransform; - public class MechanicalCrafterRenderer extends SafeTileEntityRenderer { public MechanicalCrafterRenderer(TileEntityRendererDispatcher dispatcher) { diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/crafter/MechanicalCrafterTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/crafter/MechanicalCrafterTileEntity.java index 67dee0db5..64dc60b2d 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/crafter/MechanicalCrafterTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/crafter/MechanicalCrafterTileEntity.java @@ -1,5 +1,14 @@ package com.simibubi.create.content.contraptions.components.crafter; +import static com.simibubi.create.content.contraptions.base.HorizontalKineticBlock.HORIZONTAL_FACING; + +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Map.Entry; + +import org.apache.commons.lang3.tuple.Pair; + import com.simibubi.create.AllBlocks; import com.simibubi.create.AllItems; import com.simibubi.create.content.contraptions.base.KineticTileEntity; @@ -13,6 +22,7 @@ import com.simibubi.create.foundation.tileEntity.behaviour.inventory.InvManipula import com.simibubi.create.foundation.utility.BlockFace; import com.simibubi.create.foundation.utility.Pointing; import com.simibubi.create.foundation.utility.VecHelper; + import net.minecraft.block.BlockState; import net.minecraft.entity.item.ItemEntity; import net.minecraft.item.ItemStack; @@ -29,14 +39,6 @@ import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.items.CapabilityItemHandler; import net.minecraftforge.items.IItemHandler; -import org.apache.commons.lang3.tuple.Pair; - -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; -import java.util.Map.Entry; - -import static com.simibubi.create.content.contraptions.base.HorizontalKineticBlock.HORIZONTAL_FACING; public class MechanicalCrafterTileEntity extends KineticTileEntity { diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/crank/HandCrankTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/crank/HandCrankTileEntity.java index 2a7b0a1d1..c4acc3aa6 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/crank/HandCrankTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/crank/HandCrankTileEntity.java @@ -2,6 +2,7 @@ package com.simibubi.create.content.contraptions.components.crank; import com.simibubi.create.AllBlocks; import com.simibubi.create.content.contraptions.base.GeneratingKineticTileEntity; + import net.minecraft.block.Block; import net.minecraft.nbt.CompoundNBT; import net.minecraft.tileentity.TileEntityType; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerRenderer.java index 6f94068af..ee30d715c 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerRenderer.java @@ -12,13 +12,13 @@ import com.simibubi.create.content.contraptions.components.deployer.DeployerTile import com.simibubi.create.content.contraptions.components.deployer.DeployerTileEntity.State; import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext; import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionRenderDispatcher; +import com.simibubi.create.foundation.render.SuperByteBuffer; import com.simibubi.create.foundation.render.backend.FastRenderDispatcher; import com.simibubi.create.foundation.tileEntity.behaviour.filtering.FilteringRenderer; 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.NBTHelper; -import com.simibubi.create.foundation.render.SuperByteBuffer; import com.simibubi.create.foundation.utility.VecHelper; import net.minecraft.block.BlockState; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerTileEntity.java index b31a3a607..4af470f72 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerTileEntity.java @@ -1,5 +1,10 @@ package com.simibubi.create.content.contraptions.components.deployer; +import static com.simibubi.create.content.contraptions.base.DirectionalKineticBlock.FACING; + +import java.util.ArrayList; +import java.util.List; + import com.simibubi.create.AllBlockPartials; import com.simibubi.create.AllBlocks; import com.simibubi.create.content.contraptions.base.KineticTileEntity; @@ -10,6 +15,7 @@ import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour; import com.simibubi.create.foundation.tileEntity.behaviour.filtering.FilteringBehaviour; import com.simibubi.create.foundation.utility.NBTHelper; import com.simibubi.create.foundation.utility.VecHelper; + import net.minecraft.entity.player.ServerPlayerEntity; import net.minecraft.item.ItemStack; import net.minecraft.nbt.CompoundNBT; @@ -18,20 +24,20 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntityType; import net.minecraft.util.Direction; import net.minecraft.util.Hand; -import net.minecraft.util.math.*; +import net.minecraft.util.math.AxisAlignedBB; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.BlockRayTraceResult; +import net.minecraft.util.math.MathHelper; +import net.minecraft.util.math.RayTraceContext; import net.minecraft.util.math.RayTraceContext.BlockMode; import net.minecraft.util.math.RayTraceContext.FluidMode; +import net.minecraft.util.math.Vec3d; import net.minecraft.world.server.ServerWorld; import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.common.util.Constants.NBT; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.items.IItemHandlerModifiable; -import java.util.ArrayList; -import java.util.List; - -import static com.simibubi.create.content.contraptions.base.DirectionalKineticBlock.FACING; - public class DeployerTileEntity extends KineticTileEntity { protected State state; 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 870aebca3..5bf8b87d2 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 @@ -7,9 +7,9 @@ import com.mojang.blaze3d.vertex.IVertexBuilder; import com.simibubi.create.AllBlockPartials; import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer; +import com.simibubi.create.foundation.render.SuperByteBuffer; import com.simibubi.create.foundation.render.backend.FastRenderDispatcher; import com.simibubi.create.foundation.utility.AnimationTickHolder; -import com.simibubi.create.foundation.render.SuperByteBuffer; import net.minecraft.client.renderer.IRenderTypeBuffer; import net.minecraft.client.renderer.RenderType; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/fan/FanInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/fan/FanInstance.java index 88a702f56..c2fbf6d56 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/fan/FanInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/fan/FanInstance.java @@ -1,13 +1,16 @@ package com.simibubi.create.content.contraptions.components.fan; +import static net.minecraft.state.properties.BlockStateProperties.FACING; + import com.simibubi.create.AllBlockPartials; import com.simibubi.create.content.contraptions.base.IRotate; import com.simibubi.create.content.contraptions.base.KineticTileInstance; -import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer; +import com.simibubi.create.content.contraptions.base.RotatingData; import com.simibubi.create.foundation.render.backend.instancing.InstanceKey; import com.simibubi.create.foundation.render.backend.instancing.InstancedModel; import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderRegistry; -import com.simibubi.create.content.contraptions.base.RotatingData; +import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer; + import net.minecraft.tileentity.TileEntityType; import net.minecraft.util.Direction; import net.minecraft.util.math.BlockPos; @@ -16,11 +19,9 @@ import net.minecraft.world.LightType; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.fml.DistExecutor; -import static net.minecraft.state.properties.BlockStateProperties.FACING; - public class FanInstance extends KineticTileInstance { public static void register(TileEntityType type) { - DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> + DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> InstancedTileRenderRegistry.instance.register(type, FanInstance::new)); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/fan/NozzleBlock.java b/src/main/java/com/simibubi/create/content/contraptions/components/fan/NozzleBlock.java index 2c0a842ce..8cffa1023 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/fan/NozzleBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/fan/NozzleBlock.java @@ -1,8 +1,11 @@ package com.simibubi.create.content.contraptions.components.fan; +import javax.annotation.ParametersAreNonnullByDefault; + import com.simibubi.create.AllShapes; import com.simibubi.create.AllTileEntities; import com.simibubi.create.foundation.block.ProperDirectionalBlock; + import mcp.MethodsReturnNonnullByDefault; import net.minecraft.block.Block; import net.minecraft.block.BlockState; @@ -18,8 +21,6 @@ import net.minecraft.world.IBlockReader; import net.minecraft.world.IWorldReader; import net.minecraft.world.World; -import javax.annotation.ParametersAreNonnullByDefault; - @MethodsReturnNonnullByDefault @ParametersAreNonnullByDefault public class NozzleBlock extends ProperDirectionalBlock { diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/flywheel/FlyWheelInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/flywheel/FlyWheelInstance.java index f1f9cda0d..f49c7dbef 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/flywheel/FlyWheelInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/flywheel/FlyWheelInstance.java @@ -1,10 +1,16 @@ package com.simibubi.create.content.contraptions.components.flywheel; +import java.util.function.Consumer; + import com.simibubi.create.AllBlockPartials; import com.simibubi.create.content.contraptions.base.IRotate; import com.simibubi.create.content.contraptions.base.KineticTileInstance; import com.simibubi.create.content.contraptions.base.RotatingData; -import com.simibubi.create.foundation.render.backend.instancing.*; +import com.simibubi.create.foundation.render.backend.instancing.InstanceKey; +import com.simibubi.create.foundation.render.backend.instancing.InstancedModel; +import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderRegistry; +import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer; + import net.minecraft.block.BlockState; import net.minecraft.state.properties.BlockStateProperties; import net.minecraft.tileentity.TileEntityType; @@ -13,11 +19,9 @@ import net.minecraft.util.Rotation; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.fml.DistExecutor; -import java.util.function.Consumer; - public class FlyWheelInstance extends KineticTileInstance { public static void register(TileEntityType type) { - DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> + DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> InstancedTileRenderRegistry.instance.register(type, FlyWheelInstance::new)); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/flywheel/FlywheelRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/components/flywheel/FlywheelRenderer.java index 76453c14e..be3d3e108 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/flywheel/FlywheelRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/flywheel/FlywheelRenderer.java @@ -8,8 +8,8 @@ import com.simibubi.create.AllBlockPartials; import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer; import com.simibubi.create.content.contraptions.components.flywheel.FlywheelBlock.ConnectionState; -import com.simibubi.create.foundation.utility.AngleHelper; import com.simibubi.create.foundation.render.SuperByteBuffer; +import com.simibubi.create.foundation.utility.AngleHelper; import net.minecraft.block.BlockState; import net.minecraft.client.renderer.IRenderTypeBuffer; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/flywheel/FlywheelTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/flywheel/FlywheelTileEntity.java index 830081dfb..67f4952b7 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/flywheel/FlywheelTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/flywheel/FlywheelTileEntity.java @@ -2,6 +2,7 @@ package com.simibubi.create.content.contraptions.components.flywheel; import com.simibubi.create.content.contraptions.base.GeneratingKineticTileEntity; import com.simibubi.create.foundation.gui.widgets.InterpolatedChasingValue; + import net.minecraft.nbt.CompoundNBT; import net.minecraft.tileentity.TileEntityType; import net.minecraft.util.math.AxisAlignedBB; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/millstone/MillStoneCogInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/millstone/MillStoneCogInstance.java index bcaddb716..329cc5e7b 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/millstone/MillStoneCogInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/millstone/MillStoneCogInstance.java @@ -2,18 +2,19 @@ package com.simibubi.create.content.contraptions.components.millstone; import com.simibubi.create.AllBlockPartials; import com.simibubi.create.content.contraptions.base.KineticTileEntity; +import com.simibubi.create.content.contraptions.base.RotatingData; import com.simibubi.create.content.contraptions.base.SingleRotatingInstance; -import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer; import com.simibubi.create.foundation.render.backend.instancing.InstancedModel; import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderRegistry; -import com.simibubi.create.content.contraptions.base.RotatingData; +import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer; + import net.minecraft.tileentity.TileEntityType; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.fml.DistExecutor; public class MillStoneCogInstance extends SingleRotatingInstance { public static void register(TileEntityType type) { - DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> + DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> InstancedTileRenderRegistry.instance.register(type, MillStoneCogInstance::new)); } public MillStoneCogInstance(InstancedTileRenderer modelManager, KineticTileEntity tile) { 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 4d4477d9f..4220afa17 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 @@ -5,9 +5,9 @@ import com.mojang.blaze3d.vertex.IVertexBuilder; import com.simibubi.create.AllBlockPartials; import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer; +import com.simibubi.create.foundation.render.SuperByteBuffer; import com.simibubi.create.foundation.render.backend.FastRenderDispatcher; import com.simibubi.create.foundation.utility.AnimationTickHolder; -import com.simibubi.create.foundation.render.SuperByteBuffer; import net.minecraft.block.BlockState; import net.minecraft.client.renderer.IRenderTypeBuffer; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawInstance.java index 0a04d43bb..62060db98 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawInstance.java @@ -1,23 +1,24 @@ package com.simibubi.create.content.contraptions.components.saw; +import static net.minecraft.state.properties.BlockStateProperties.FACING; + import com.simibubi.create.AllBlockPartials; import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer; +import com.simibubi.create.content.contraptions.base.RotatingData; import com.simibubi.create.content.contraptions.base.SingleRotatingInstance; -import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer; import com.simibubi.create.foundation.render.backend.instancing.InstancedModel; import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderRegistry; -import com.simibubi.create.content.contraptions.base.RotatingData; +import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer; + import net.minecraft.tileentity.TileEntityType; import net.minecraft.util.Rotation; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.fml.DistExecutor; -import static net.minecraft.state.properties.BlockStateProperties.FACING; - public class SawInstance extends SingleRotatingInstance { public static void register(TileEntityType type) { - DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> + DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> InstancedTileRenderRegistry.instance.register(type, SawInstance::new)); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawRenderer.java index fb9d56fc3..d68105100 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawRenderer.java @@ -9,12 +9,12 @@ import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer; import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext; import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionRenderDispatcher; +import com.simibubi.create.foundation.render.SuperByteBuffer; import com.simibubi.create.foundation.render.backend.FastRenderDispatcher; import com.simibubi.create.foundation.tileEntity.behaviour.filtering.FilteringRenderer; import com.simibubi.create.foundation.tileEntity.renderer.SafeTileEntityRenderer; import com.simibubi.create.foundation.utility.AngleHelper; import com.simibubi.create.foundation.utility.MatrixStacker; -import com.simibubi.create.foundation.render.SuperByteBuffer; import com.simibubi.create.foundation.utility.VecHelper; import net.minecraft.block.BlockState; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawTileEntity.java index 2cf10642d..870572900 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawTileEntity.java @@ -1,5 +1,11 @@ package com.simibubi.create.content.contraptions.components.saw; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Random; +import java.util.stream.Collectors; + import com.google.common.base.Predicate; import com.simibubi.create.AllRecipeTypes; import com.simibubi.create.content.contraptions.components.actors.BlockBreakingKineticTileEntity; @@ -15,7 +21,16 @@ import com.simibubi.create.foundation.utility.TreeCutter.Tree; import com.simibubi.create.foundation.utility.VecHelper; import com.simibubi.create.foundation.utility.recipe.RecipeConditions; import com.simibubi.create.foundation.utility.recipe.RecipeFinder; -import net.minecraft.block.*; + +import net.minecraft.block.BambooBlock; +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.block.CactusBlock; +import net.minecraft.block.ChorusPlantBlock; +import net.minecraft.block.KelpBlock; +import net.minecraft.block.KelpTopBlock; +import net.minecraft.block.StemGrownBlock; +import net.minecraft.block.SugarCaneBlock; import net.minecraft.entity.item.ItemEntity; import net.minecraft.item.BlockItem; import net.minecraft.item.ItemStack; @@ -38,12 +53,6 @@ import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.items.CapabilityItemHandler; import net.minecraftforge.items.IItemHandler; -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; -import java.util.Random; -import java.util.stream.Collectors; - public class SawTileEntity extends BlockBreakingKineticTileEntity { private static final Object cuttingRecipesKey = new Object(); 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 f3c3d8a99..26130afe4 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 @@ -7,10 +7,10 @@ import java.util.Map; import java.util.Map.Entry; import java.util.UUID; -import com.mojang.blaze3d.matrix.MatrixStack; import org.apache.commons.lang3.mutable.MutableInt; import org.apache.commons.lang3.tuple.MutablePair; +import com.mojang.blaze3d.matrix.MatrixStack; import com.simibubi.create.AllMovementBehaviours; import com.simibubi.create.content.contraptions.components.actors.SeatEntity; import com.simibubi.create.content.contraptions.components.structureMovement.glue.SuperGlueEntity; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/AssemblyException.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/AssemblyException.java index 0db500c6d..d4f38a469 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/AssemblyException.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/AssemblyException.java @@ -1,6 +1,7 @@ package com.simibubi.create.content.contraptions.components.structureMovement; import com.simibubi.create.foundation.config.AllConfigs; + import net.minecraft.block.BlockState; import net.minecraft.nbt.CompoundNBT; import net.minecraft.util.math.BlockPos; @@ -8,6 +9,8 @@ import net.minecraft.util.text.ITextComponent; import net.minecraft.util.text.TranslationTextComponent; public class AssemblyException extends Exception { + + private static final long serialVersionUID = 1L; public final ITextComponent component; private BlockPos position = null; 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 1de138917..3e363d2d3 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 @@ -1,5 +1,29 @@ package com.simibubi.create.content.contraptions.components.structureMovement; +import static com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonBlock.isExtensionPole; +import static com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonBlock.isPistonHead; + +import java.util.ArrayList; +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; +import java.util.Optional; +import java.util.Queue; +import java.util.Set; +import java.util.UUID; +import java.util.function.BiConsumer; +import java.util.stream.Collectors; + +import javax.annotation.Nullable; + +import org.apache.commons.lang3.tuple.MutablePair; +import org.apache.commons.lang3.tuple.Pair; + import com.simibubi.create.AllBlocks; import com.simibubi.create.AllMovementBehaviours; import com.simibubi.create.content.contraptions.base.IRotate; @@ -29,9 +53,21 @@ 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.*; +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.*; + +import net.minecraft.block.AbstractButtonBlock; +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.block.Blocks; +import net.minecraft.block.ChestBlock; +import net.minecraft.block.DoorBlock; +import net.minecraft.block.IWaterLoggable; +import net.minecraft.block.PressurePlateBlock; import net.minecraft.block.material.PushReaction; import net.minecraft.entity.Entity; import net.minecraft.fluid.Fluids; @@ -69,16 +105,6 @@ import net.minecraftforge.fluids.capability.templates.FluidTank; import net.minecraftforge.items.IItemHandlerModifiable; import net.minecraftforge.items.wrapper.CombinedInvWrapper; import net.minecraftforge.registries.GameData; -import org.apache.commons.lang3.tuple.MutablePair; -import org.apache.commons.lang3.tuple.Pair; - -import javax.annotation.Nullable; -import java.util.*; -import java.util.function.BiConsumer; -import java.util.stream.Collectors; - -import static com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonBlock.isExtensionPole; -import static com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonBlock.isPistonHead; public abstract class Contraption { @@ -478,7 +504,6 @@ public abstract class Contraption { } private boolean moveMechanicalPiston(World world, BlockPos pos, Queue frontier, Set visited, BlockState state) throws AssemblyException { - int limit = AllConfigs.SERVER.kinetics.maxPistonPoles.get(); Direction direction = state.get(MechanicalPistonBlock.FACING); PistonState pistonState = state.get(MechanicalPistonBlock.STATE); if (pistonState == PistonState.MOVING) @@ -978,7 +1003,6 @@ public abstract class Contraption { if (!shouldUpdateAfterMovement(block)) continue; BlockPos targetPos = transform.apply(block.pos); - BlockState state = world.getBlockState(targetPos); world.markAndNotifyBlock(targetPos, null, block.state, block.state, BlockFlags.IS_MOVING | BlockFlags.DEFAULT); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/ContraptionCollider.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/ContraptionCollider.java index 4f8e5f812..f9922623a 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/ContraptionCollider.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/ContraptionCollider.java @@ -311,7 +311,7 @@ public class ContraptionCollider { if (!entity.world.isRemote) return PlayerType.SERVER; MutableBoolean isClient = new MutableBoolean(false); - DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> isClient.setValue(isClientPlayerEntity(entity))); + DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> isClient.setValue(isClientPlayerEntity(entity))); return isClient.booleanValue() ? PlayerType.CLIENT : PlayerType.REMOTE; } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/ContraptionDisassemblyPacket.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/ContraptionDisassemblyPacket.java index 20baaaa45..50b27b6ff 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/ContraptionDisassemblyPacket.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/ContraptionDisassemblyPacket.java @@ -33,7 +33,7 @@ public class ContraptionDisassemblyPacket extends SimplePacketBase { @Override public void handle(Supplier context) { context.get() - .enqueueWork(() -> DistExecutor.runWhenOn(Dist.CLIENT, + .enqueueWork(() -> DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> AbstractContraptionEntity.handleDisassemblyPacket(this))); context.get() .setPacketHandled(true); 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 850d92446..b66008c4e 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 @@ -3,6 +3,7 @@ package com.simibubi.create.content.contraptions.components.structureMovement; import com.mojang.blaze3d.matrix.MatrixStack; import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionRenderDispatcher; import com.simibubi.create.foundation.utility.AnimationTickHolder; + import net.minecraft.client.renderer.IRenderTypeBuffer; import net.minecraft.client.renderer.culling.ClippingHelperImpl; import net.minecraft.client.renderer.entity.EntityRenderer; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/ContraptionHandler.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/ContraptionHandler.java index 30f6a6a9d..21664ce2e 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/ContraptionHandler.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/ContraptionHandler.java @@ -7,7 +7,6 @@ import java.util.Iterator; import java.util.List; import java.util.Map; -import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionRenderDispatcher; import com.simibubi.create.foundation.utility.VecHelper; import com.simibubi.create.foundation.utility.WorldAttached; @@ -18,9 +17,7 @@ import net.minecraft.entity.LivingEntity; import net.minecraft.nbt.CompoundNBT; import net.minecraft.util.math.Vec3d; import net.minecraft.world.World; -import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.common.util.Constants.NBT; -import net.minecraftforge.fml.DistExecutor; public class ContraptionHandler { diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/ContraptionStallPacket.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/ContraptionStallPacket.java index 1909dd3ca..9c9aac76f 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/ContraptionStallPacket.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/ContraptionStallPacket.java @@ -42,7 +42,7 @@ public class ContraptionStallPacket extends SimplePacketBase { @Override public void handle(Supplier context) { context.get().enqueueWork( - () -> DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> AbstractContraptionEntity.handleStallPacket(this))); + () -> DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> AbstractContraptionEntity.handleStallPacket(this))); context.get().setPacketHandled(true); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/IDisplayAssemblyExceptions.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/IDisplayAssemblyExceptions.java index 33abfc9fb..1a34952ef 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/IDisplayAssemblyExceptions.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/IDisplayAssemblyExceptions.java @@ -1,12 +1,13 @@ package com.simibubi.create.content.contraptions.components.structureMovement; -import com.simibubi.create.content.contraptions.goggles.IHaveGoggleInformation; -import com.simibubi.create.foundation.utility.Lang; -import net.minecraft.util.text.TextFormatting; - import java.util.Arrays; import java.util.List; +import com.simibubi.create.content.contraptions.goggles.IHaveGoggleInformation; +import com.simibubi.create.foundation.utility.Lang; + +import net.minecraft.util.text.TextFormatting; + public interface IDisplayAssemblyExceptions { default boolean addExceptionToTooltip(List tooltip) { diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/MovementBehaviour.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/MovementBehaviour.java index 72ede2acb..062a1601a 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/MovementBehaviour.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/MovementBehaviour.java @@ -1,8 +1,8 @@ package com.simibubi.create.content.contraptions.components.structureMovement; import com.mojang.blaze3d.matrix.MatrixStack; - import com.simibubi.create.content.contraptions.components.structureMovement.render.RenderedContraption; + import net.minecraft.client.renderer.IRenderTypeBuffer; import net.minecraft.entity.item.ItemEntity; import net.minecraft.item.ItemStack; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/OrientedContraptionEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/OrientedContraptionEntity.java index 8b6df8b9b..6d241061a 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/OrientedContraptionEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/OrientedContraptionEntity.java @@ -15,7 +15,11 @@ import com.simibubi.create.content.contraptions.components.structureMovement.mou import com.simibubi.create.content.contraptions.components.structureMovement.train.capability.CapabilityMinecartController; import com.simibubi.create.content.contraptions.components.structureMovement.train.capability.MinecartController; import com.simibubi.create.foundation.item.ItemHelper; -import com.simibubi.create.foundation.utility.*; +import com.simibubi.create.foundation.utility.AngleHelper; +import com.simibubi.create.foundation.utility.Couple; +import com.simibubi.create.foundation.utility.MatrixStacker; +import com.simibubi.create.foundation.utility.NBTHelper; +import com.simibubi.create.foundation.utility.VecHelper; import net.minecraft.block.BlockState; import net.minecraft.entity.Entity; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/BearingContraption.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/BearingContraption.java index 82fef4ed0..7b1fc465f 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/BearingContraption.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/BearingContraption.java @@ -1,14 +1,12 @@ package com.simibubi.create.content.contraptions.components.structureMovement.bearing; -import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionLighter; -import net.minecraftforge.api.distmarker.Dist; -import net.minecraftforge.api.distmarker.OnlyIn; import org.apache.commons.lang3.tuple.Pair; import com.simibubi.create.AllTags.AllBlockTags; -import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionType; import com.simibubi.create.content.contraptions.components.structureMovement.AssemblyException; import com.simibubi.create.content.contraptions.components.structureMovement.Contraption; +import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionLighter; +import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionType; import net.minecraft.nbt.CompoundNBT; import net.minecraft.tileentity.TileEntity; @@ -16,6 +14,8 @@ import net.minecraft.util.Direction; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraft.world.gen.feature.template.Template.BlockInfo; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; public class BearingContraption extends Contraption { 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 6584cb2d2..f2b3e5eec 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 @@ -1,12 +1,13 @@ package com.simibubi.create.content.contraptions.components.structureMovement.bearing; +import java.util.Set; + import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionLighter; import com.simibubi.create.foundation.render.backend.light.GridAlignedBB; + import net.minecraft.util.Direction; import net.minecraft.util.math.BlockPos; -import java.util.Set; - public class BearingLighter extends ContraptionLighter { public BearingLighter(BearingContraption contraption) { diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/BearingRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/BearingRenderer.java index b1c071ea3..f94d29e89 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/BearingRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/BearingRenderer.java @@ -4,8 +4,8 @@ import com.mojang.blaze3d.matrix.MatrixStack; import com.simibubi.create.AllBlockPartials; import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer; -import com.simibubi.create.foundation.utility.AngleHelper; import com.simibubi.create.foundation.render.SuperByteBuffer; +import com.simibubi.create.foundation.utility.AngleHelper; import net.minecraft.client.renderer.IRenderTypeBuffer; import net.minecraft.client.renderer.RenderType; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/ClockworkBearingTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/ClockworkBearingTileEntity.java index aa4693786..49cba252a 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/ClockworkBearingTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/ClockworkBearingTileEntity.java @@ -1,5 +1,9 @@ package com.simibubi.create.content.contraptions.components.structureMovement.bearing; +import java.util.List; + +import org.apache.commons.lang3.tuple.Pair; + import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.content.contraptions.components.structureMovement.AbstractContraptionEntity; import com.simibubi.create.content.contraptions.components.structureMovement.AssemblyException; @@ -14,6 +18,7 @@ import com.simibubi.create.foundation.tileEntity.behaviour.scrollvalue.ScrollOpt import com.simibubi.create.foundation.utility.AngleHelper; import com.simibubi.create.foundation.utility.Lang; import com.simibubi.create.foundation.utility.ServerSpeedProvider; + import net.minecraft.block.BlockState; import net.minecraft.nbt.CompoundNBT; import net.minecraft.state.properties.BlockStateProperties; @@ -22,9 +27,6 @@ import net.minecraft.util.Direction; import net.minecraft.util.Direction.Axis; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.MathHelper; -import org.apache.commons.lang3.tuple.Pair; - -import java.util.List; public class ClockworkBearingTileEntity extends KineticTileEntity implements IBearingTileEntity, IDisplayAssemblyExceptions { diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/ClockworkContraption.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/ClockworkContraption.java index a105ad0d2..1dea812eb 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/ClockworkContraption.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/ClockworkContraption.java @@ -1,25 +1,21 @@ package com.simibubi.create.content.contraptions.components.structureMovement.bearing; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -import org.apache.commons.lang3.tuple.Pair; - -import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionType; -import com.simibubi.create.content.contraptions.components.structureMovement.AssemblyException; -import com.simibubi.create.content.contraptions.components.structureMovement.Contraption; -import com.simibubi.create.foundation.utility.NBTHelper; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.util.Direction; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import org.apache.commons.lang3.tuple.Pair; - import java.util.HashSet; import java.util.Queue; import java.util.Set; +import org.apache.commons.lang3.tuple.Pair; + +import com.simibubi.create.content.contraptions.components.structureMovement.AssemblyException; +import com.simibubi.create.content.contraptions.components.structureMovement.Contraption; +import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionType; +import com.simibubi.create.foundation.utility.NBTHelper; + +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.util.Direction; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; + public class ClockworkContraption extends Contraption { protected Direction facing; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/MechanicalBearingTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/MechanicalBearingTileEntity.java index b313cf931..42460217a 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/MechanicalBearingTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/MechanicalBearingTileEntity.java @@ -1,5 +1,9 @@ package com.simibubi.create.content.contraptions.components.structureMovement.bearing; +import static net.minecraft.state.properties.BlockStateProperties.FACING; + +import java.util.List; + import com.simibubi.create.content.contraptions.base.GeneratingKineticTileEntity; import com.simibubi.create.content.contraptions.components.structureMovement.AbstractContraptionEntity; import com.simibubi.create.content.contraptions.components.structureMovement.AssemblyException; @@ -12,6 +16,7 @@ import com.simibubi.create.foundation.tileEntity.behaviour.scrollvalue.ScrollOpt import com.simibubi.create.foundation.utility.AngleHelper; import com.simibubi.create.foundation.utility.Lang; import com.simibubi.create.foundation.utility.ServerSpeedProvider; + import net.minecraft.block.BlockState; import net.minecraft.nbt.CompoundNBT; import net.minecraft.state.properties.BlockStateProperties; @@ -20,10 +25,6 @@ import net.minecraft.util.Direction; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.MathHelper; -import java.util.List; - -import static net.minecraft.state.properties.BlockStateProperties.FACING; - public class MechanicalBearingTileEntity extends GeneratingKineticTileEntity implements IBearingTileEntity, IDisplayAssemblyExceptions { protected ScrollOptionBehaviour movementMode; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/SailBlock.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/SailBlock.java index 2111ebeff..7acf1e590 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/SailBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/SailBlock.java @@ -1,5 +1,13 @@ package com.simibubi.create.content.contraptions.components.structureMovement.bearing; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.function.Predicate; + +import javax.annotation.Nullable; + import com.simibubi.create.AllBlocks; import com.simibubi.create.AllShapes; import com.simibubi.create.foundation.block.ProperDirectionalBlock; @@ -8,13 +16,18 @@ import com.simibubi.create.foundation.utility.Iterate; import com.simibubi.create.foundation.utility.placement.IPlacementHelper; import com.simibubi.create.foundation.utility.placement.PlacementHelpers; import com.simibubi.create.foundation.utility.placement.PlacementOffset; + import mcp.MethodsReturnNonnullByDefault; import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.entity.Entity; import net.minecraft.entity.LivingEntity; import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.item.*; +import net.minecraft.item.BlockItem; +import net.minecraft.item.BlockItemUseContext; +import net.minecraft.item.DyeColor; +import net.minecraft.item.ItemStack; +import net.minecraft.item.ShearsItem; import net.minecraft.util.ActionResultType; import net.minecraft.util.Direction; import net.minecraft.util.Hand; @@ -27,13 +40,6 @@ import net.minecraft.util.math.shapes.VoxelShape; import net.minecraft.world.IBlockReader; import net.minecraft.world.World; -import javax.annotation.Nullable; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Set; -import java.util.function.Predicate; - public class SailBlock extends ProperDirectionalBlock { public static SailBlock frame(Properties properties) { diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/StabilizedBearingMovementBehaviour.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/StabilizedBearingMovementBehaviour.java index 6a8243f90..b2a517625 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/StabilizedBearingMovementBehaviour.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/StabilizedBearingMovementBehaviour.java @@ -2,11 +2,16 @@ package com.simibubi.create.content.contraptions.components.structureMovement.be import com.mojang.blaze3d.matrix.MatrixStack; import com.simibubi.create.AllBlockPartials; -import com.simibubi.create.content.contraptions.components.structureMovement.*; +import com.simibubi.create.content.contraptions.components.structureMovement.AbstractContraptionEntity; +import com.simibubi.create.content.contraptions.components.structureMovement.ControlledContraptionEntity; +import com.simibubi.create.content.contraptions.components.structureMovement.MovementBehaviour; +import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext; +import com.simibubi.create.content.contraptions.components.structureMovement.OrientedContraptionEntity; import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionRenderDispatcher; import com.simibubi.create.foundation.render.SuperByteBuffer; import com.simibubi.create.foundation.utility.AngleHelper; import com.simibubi.create.foundation.utility.AnimationTickHolder; + import net.minecraft.client.renderer.IRenderTypeBuffer; import net.minecraft.client.renderer.RenderType; import net.minecraft.state.properties.BlockStateProperties; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/StabilizedContraption.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/StabilizedContraption.java index 7ad42fd21..4eec742bc 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/StabilizedContraption.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/StabilizedContraption.java @@ -1,13 +1,13 @@ package com.simibubi.create.content.contraptions.components.structureMovement.bearing; -import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionType; import com.simibubi.create.content.contraptions.components.structureMovement.AssemblyException; import com.simibubi.create.content.contraptions.components.structureMovement.Contraption; -import com.simibubi.create.content.contraptions.components.structureMovement.NonStationaryLighter; import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionLighter; +import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionType; +import com.simibubi.create.content.contraptions.components.structureMovement.NonStationaryLighter; + import net.minecraft.nbt.CompoundNBT; import net.minecraft.util.Direction; -import net.minecraft.util.Direction.Axis; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/chassis/AbstractChassisBlock.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/chassis/AbstractChassisBlock.java index b9cae7e36..68b053ab6 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/chassis/AbstractChassisBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/chassis/AbstractChassisBlock.java @@ -89,7 +89,6 @@ public abstract class AbstractChassisBlock extends RotatedPillarBlock implements return ActionResultType.SUCCESS; } - @SuppressWarnings("deprecation") @Override public BlockState rotate(BlockState state, Rotation rotation) { if (rotation == Rotation.NONE) diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/chassis/ChassisTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/chassis/ChassisTileEntity.java index fcb4f1c1b..1f8396922 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/chassis/ChassisTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/chassis/ChassisTileEntity.java @@ -49,7 +49,7 @@ public class ChassisTileEntity extends SmartTileEntity { range.between(1, max); range .withClientCallback( - i -> DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> ChassisRangeDisplay.display(this))); + i -> DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> ChassisRangeDisplay.display(this))); range.value = max / 2; behaviours.add(range); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/gantry/GantryContraption.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/gantry/GantryContraption.java index 0db060fb7..0db74075e 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/gantry/GantryContraption.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/gantry/GantryContraption.java @@ -1,7 +1,12 @@ package com.simibubi.create.content.contraptions.components.structureMovement.gantry; import com.simibubi.create.AllBlocks; -import com.simibubi.create.content.contraptions.components.structureMovement.*; +import com.simibubi.create.content.contraptions.components.structureMovement.AssemblyException; +import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionLighter; +import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionType; +import com.simibubi.create.content.contraptions.components.structureMovement.NonStationaryLighter; +import com.simibubi.create.content.contraptions.components.structureMovement.TranslatingContraption; + import net.minecraft.nbt.CompoundNBT; import net.minecraft.util.Direction; import net.minecraft.util.math.BlockPos; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/gantry/GantryContraptionUpdatePacket.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/gantry/GantryContraptionUpdatePacket.java index 1e0637497..54463c051 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/gantry/GantryContraptionUpdatePacket.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/gantry/GantryContraptionUpdatePacket.java @@ -38,7 +38,7 @@ public class GantryContraptionUpdatePacket extends SimplePacketBase { public void handle(Supplier context) { context.get() .enqueueWork( - () -> DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> GantryContraptionEntity.handlePacket(this))); + () -> DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> GantryContraptionEntity.handlePacket(this))); context.get() .setPacketHandled(true); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/gantry/GantryPinionTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/gantry/GantryPinionTileEntity.java index 15c4d6a86..582b7d749 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/gantry/GantryPinionTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/gantry/GantryPinionTileEntity.java @@ -1,5 +1,7 @@ package com.simibubi.create.content.contraptions.components.structureMovement.gantry; +import static net.minecraft.state.properties.BlockStateProperties.FACING; + import com.simibubi.create.AllBlocks; import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.content.contraptions.components.structureMovement.AssemblyException; @@ -7,6 +9,7 @@ import com.simibubi.create.content.contraptions.components.structureMovement.Con import com.simibubi.create.content.contraptions.components.structureMovement.IDisplayAssemblyExceptions; import com.simibubi.create.content.contraptions.relays.advanced.GantryShaftBlock; import com.simibubi.create.content.contraptions.relays.advanced.GantryShaftTileEntity; + import net.minecraft.block.BlockState; import net.minecraft.nbt.CompoundNBT; import net.minecraft.tileentity.TileEntity; @@ -15,8 +18,6 @@ import net.minecraft.util.Direction; import net.minecraft.util.Direction.Axis; import net.minecraft.util.math.BlockPos; -import static net.minecraft.state.properties.BlockStateProperties.FACING; - public class GantryPinionTileEntity extends KineticTileEntity implements IDisplayAssemblyExceptions { boolean assembleNextTick; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/glue/GlueEffectPacket.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/glue/GlueEffectPacket.java index d2d6c6917..8d454a134 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/glue/GlueEffectPacket.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/glue/GlueEffectPacket.java @@ -39,7 +39,7 @@ public class GlueEffectPacket extends SimplePacketBase { @OnlyIn(Dist.CLIENT) public void handle(Supplier context) { - context.get().enqueueWork(() -> DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> { + context.get().enqueueWork(() -> DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> { Minecraft mc = Minecraft.getInstance(); if (!mc.player.getPosition().withinDistance(pos, 100)) return; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/glue/SuperGlueEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/glue/SuperGlueEntity.java index 46db36d90..547aeb02c 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/glue/SuperGlueEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/glue/SuperGlueEntity.java @@ -1,5 +1,9 @@ package com.simibubi.create.content.contraptions.components.structureMovement.glue; +import javax.annotation.Nullable; + +import org.apache.commons.lang3.Validate; + import com.simibubi.create.AllEntityTypes; import com.simibubi.create.AllItems; import com.simibubi.create.AllSoundEvents; @@ -10,11 +14,16 @@ import com.simibubi.create.content.schematics.ItemRequirement.ItemUseType; import com.simibubi.create.foundation.networking.AllPackets; import com.simibubi.create.foundation.utility.AnimationTickHolder; import com.simibubi.create.foundation.utility.BlockFace; + import net.minecraft.block.BlockState; import net.minecraft.client.Minecraft; import net.minecraft.client.entity.player.ClientPlayerEntity; import net.minecraft.client.world.ClientWorld; -import net.minecraft.entity.*; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntitySize; +import net.minecraft.entity.EntityType; +import net.minecraft.entity.MoverType; +import net.minecraft.entity.Pose; import net.minecraft.entity.effect.LightningBoltEntity; import net.minecraft.entity.item.ItemEntity; import net.minecraft.entity.player.PlayerEntity; @@ -22,10 +31,21 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.CompoundNBT; import net.minecraft.network.IPacket; import net.minecraft.network.PacketBuffer; -import net.minecraft.util.*; +import net.minecraft.util.ActionResultType; +import net.minecraft.util.DamageSource; +import net.minecraft.util.Direction; import net.minecraft.util.Direction.Axis; -import net.minecraft.util.math.*; +import net.minecraft.util.Hand; +import net.minecraft.util.Mirror; +import net.minecraft.util.Rotation; +import net.minecraft.util.SoundEvents; +import net.minecraft.util.math.AxisAlignedBB; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.BlockRayTraceResult; +import net.minecraft.util.math.MathHelper; +import net.minecraft.util.math.RayTraceResult; import net.minecraft.util.math.RayTraceResult.Type; +import net.minecraft.util.math.Vec3d; import net.minecraft.world.World; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; @@ -33,9 +53,6 @@ import net.minecraftforge.fml.DistExecutor; import net.minecraftforge.fml.common.registry.IEntityAdditionalSpawnData; import net.minecraftforge.fml.network.NetworkHooks; import net.minecraftforge.fml.network.PacketDistributor; -import org.apache.commons.lang3.Validate; - -import javax.annotation.Nullable; public class SuperGlueEntity extends Entity implements IEntityAdditionalSpawnData, ISpecialEntityItemRequirement { @@ -234,7 +251,7 @@ public class SuperGlueEntity extends Entity implements IEntityAdditionalSpawnDat @Override public boolean processInitialInteract(PlayerEntity player, Hand hand) { - DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> { + DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> { triggerPlaceBlock(player, hand); }); return true; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/glue/SuperGlueHandler.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/glue/SuperGlueHandler.java index c9862ba88..425f0b567 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/glue/SuperGlueHandler.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/glue/SuperGlueHandler.java @@ -1,9 +1,14 @@ package com.simibubi.create.content.contraptions.components.structureMovement.glue; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + import com.simibubi.create.AllItems; import com.simibubi.create.foundation.networking.AllPackets; import com.simibubi.create.foundation.utility.placement.IPlacementHelper; import com.simibubi.create.foundation.utility.worldWrappers.RayTraceWorld; + import net.minecraft.block.Blocks; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityType; @@ -11,8 +16,12 @@ import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemStack; import net.minecraft.nbt.CompoundNBT; import net.minecraft.util.Direction; -import net.minecraft.util.math.*; +import net.minecraft.util.math.AxisAlignedBB; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.BlockRayTraceResult; +import net.minecraft.util.math.RayTraceContext; import net.minecraft.util.math.RayTraceResult.Type; +import net.minecraft.util.math.Vec3d; import net.minecraft.world.IWorld; import net.minecraft.world.World; import net.minecraftforge.event.world.BlockEvent.EntityPlaceEvent; @@ -20,10 +29,6 @@ import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod.EventBusSubscriber; import net.minecraftforge.fml.network.PacketDistributor; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - @EventBusSubscriber public class SuperGlueHandler { diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/mounted/CartAssembleRailType.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/mounted/CartAssembleRailType.java index e256f03ac..c82c00e85 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/mounted/CartAssembleRailType.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/mounted/CartAssembleRailType.java @@ -1,19 +1,19 @@ package com.simibubi.create.content.contraptions.components.structureMovement.mounted; +import java.util.function.Predicate; +import java.util.function.Supplier; + import com.simibubi.create.AllBlocks; import com.simibubi.create.content.contraptions.components.tracks.ControllerRailBlock; import com.simibubi.create.foundation.utility.Lang; - import com.tterrag.registrate.util.entry.BlockEntry; + import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; import net.minecraft.item.Item; import net.minecraft.util.IStringSerializable; -import java.util.function.Predicate; -import java.util.function.Supplier; - public enum CartAssembleRailType implements IStringSerializable { REGULAR(Blocks.RAIL), diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/mounted/CartAssemblerBlock.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/mounted/CartAssemblerBlock.java index 8a50eb7cf..f6f67fe4f 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/mounted/CartAssemblerBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/mounted/CartAssemblerBlock.java @@ -1,5 +1,13 @@ package com.simibubi.create.content.contraptions.components.structureMovement.mounted; +import java.util.ArrayList; +import java.util.List; +import java.util.Optional; +import java.util.UUID; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + import com.simibubi.create.AllBlocks; import com.simibubi.create.AllShapes; import com.simibubi.create.AllTileEntities; @@ -18,6 +26,7 @@ import com.simibubi.create.foundation.block.ITE; import com.simibubi.create.foundation.utility.Couple; import com.simibubi.create.foundation.utility.Iterate; import com.simibubi.create.foundation.utility.VecHelper; + import net.minecraft.block.AbstractRailBlock; import net.minecraft.block.Block; import net.minecraft.block.BlockState; @@ -38,9 +47,18 @@ import net.minecraft.state.StateContainer.Builder; import net.minecraft.state.properties.BlockStateProperties; import net.minecraft.state.properties.RailShape; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.*; +import net.minecraft.util.ActionResultType; +import net.minecraft.util.Direction; import net.minecraft.util.Direction.Axis; -import net.minecraft.util.math.*; +import net.minecraft.util.Hand; +import net.minecraft.util.Rotation; +import net.minecraft.util.SoundCategory; +import net.minecraft.util.SoundEvents; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.BlockRayTraceResult; +import net.minecraft.util.math.MathHelper; +import net.minecraft.util.math.Vec3d; +import net.minecraft.util.math.Vec3i; import net.minecraft.util.math.shapes.ISelectionContext; import net.minecraft.util.math.shapes.VoxelShape; import net.minecraft.util.math.shapes.VoxelShapes; @@ -52,13 +70,6 @@ import net.minecraft.world.storage.loot.LootContext; import net.minecraft.world.storage.loot.LootParameters; import net.minecraftforge.common.util.LazyOptional; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; -import java.util.ArrayList; -import java.util.List; -import java.util.Optional; -import java.util.UUID; - public class CartAssemblerBlock extends AbstractRailBlock implements ITE, IWrenchable, ISpecialBlockItemRequirement { diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/mounted/CartAssemblerTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/mounted/CartAssemblerTileEntity.java index f94f0bdc7..10964f6db 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/mounted/CartAssemblerTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/mounted/CartAssemblerTileEntity.java @@ -1,5 +1,7 @@ package com.simibubi.create.content.contraptions.components.structureMovement.mounted; +import java.util.List; + import com.simibubi.create.content.contraptions.components.structureMovement.AssemblyException; import com.simibubi.create.content.contraptions.components.structureMovement.IDisplayAssemblyExceptions; import com.simibubi.create.foundation.gui.AllIcons; @@ -11,14 +13,13 @@ import com.simibubi.create.foundation.tileEntity.behaviour.scrollvalue.INamedIco import com.simibubi.create.foundation.tileEntity.behaviour.scrollvalue.ScrollOptionBehaviour; import com.simibubi.create.foundation.utility.Lang; import com.simibubi.create.foundation.utility.VecHelper; + import net.minecraft.nbt.CompoundNBT; import net.minecraft.state.properties.RailShape; import net.minecraft.tileentity.TileEntityType; import net.minecraft.util.Direction.Axis; import net.minecraft.util.math.Vec3d; -import java.util.List; - public class CartAssemblerTileEntity extends SmartTileEntity implements IDisplayAssemblyExceptions { private static final int assemblyCooldown = 8; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/mounted/MountedContraption.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/mounted/MountedContraption.java index f929c847a..a11a0b471 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/mounted/MountedContraption.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/mounted/MountedContraption.java @@ -7,12 +7,12 @@ import java.util.Queue; import org.apache.commons.lang3.tuple.Pair; import com.simibubi.create.AllBlocks; -import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionType; import com.simibubi.create.content.contraptions.components.structureMovement.AssemblyException; import com.simibubi.create.content.contraptions.components.structureMovement.Contraption; +import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionLighter; +import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionType; import com.simibubi.create.content.contraptions.components.structureMovement.NonStationaryLighter; import com.simibubi.create.content.contraptions.components.structureMovement.mounted.CartAssemblerTileEntity.CartMovementMode; -import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionLighter; import com.simibubi.create.foundation.utility.Iterate; import com.simibubi.create.foundation.utility.NBTHelper; import com.simibubi.create.foundation.utility.VecHelper; @@ -35,11 +35,6 @@ import net.minecraft.world.gen.feature.template.Template.BlockInfo; import net.minecraftforge.items.IItemHandlerModifiable; import net.minecraftforge.items.wrapper.CombinedInvWrapper; import net.minecraftforge.items.wrapper.InvWrapper; -import org.apache.commons.lang3.tuple.Pair; - -import java.util.List; - -import static com.simibubi.create.content.contraptions.components.structureMovement.mounted.CartAssemblerBlock.RAIL_SHAPE; public class MountedContraption extends Contraption { diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/piston/LinearActuatorTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/piston/LinearActuatorTileEntity.java index ce3cb1470..c958b6a92 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/piston/LinearActuatorTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/piston/LinearActuatorTileEntity.java @@ -1,20 +1,25 @@ package com.simibubi.create.content.contraptions.components.structureMovement.piston; +import java.util.List; + import com.simibubi.create.content.contraptions.base.KineticTileEntity; -import com.simibubi.create.content.contraptions.components.structureMovement.*; +import com.simibubi.create.content.contraptions.components.structureMovement.AbstractContraptionEntity; +import com.simibubi.create.content.contraptions.components.structureMovement.AssemblyException; +import com.simibubi.create.content.contraptions.components.structureMovement.ControlledContraptionEntity; +import com.simibubi.create.content.contraptions.components.structureMovement.IControlContraption; +import com.simibubi.create.content.contraptions.components.structureMovement.IDisplayAssemblyExceptions; import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour; import com.simibubi.create.foundation.tileEntity.behaviour.ValueBoxTransform; import com.simibubi.create.foundation.tileEntity.behaviour.scrollvalue.ScrollOptionBehaviour; import com.simibubi.create.foundation.utility.Lang; import com.simibubi.create.foundation.utility.ServerSpeedProvider; + import net.minecraft.nbt.CompoundNBT; import net.minecraft.tileentity.TileEntityType; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.Vec3d; -import java.util.List; - public abstract class LinearActuatorTileEntity extends KineticTileEntity implements IControlContraption, IDisplayAssemblyExceptions { public float offset; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/piston/PistonContraption.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/piston/PistonContraption.java index 2af438fd7..7c1ba23b0 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/piston/PistonContraption.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/piston/PistonContraption.java @@ -1,13 +1,28 @@ package com.simibubi.create.content.contraptions.components.structureMovement.piston; +import static com.simibubi.create.AllBlocks.MECHANICAL_PISTON_HEAD; +import static com.simibubi.create.AllBlocks.PISTON_EXTENSION_POLE; +import static com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonBlock.isExtensionPole; +import static com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonBlock.isPiston; +import static com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonBlock.isPistonHead; +import static com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonBlock.isStickyPiston; +import static net.minecraft.state.properties.BlockStateProperties.FACING; + +import java.util.ArrayList; +import java.util.List; +import java.util.Queue; + +import org.apache.commons.lang3.tuple.Pair; + import com.simibubi.create.content.contraptions.components.structureMovement.AssemblyException; import com.simibubi.create.content.contraptions.components.structureMovement.BlockMovementTraits; +import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionLighter; import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionType; import com.simibubi.create.content.contraptions.components.structureMovement.TranslatingContraption; -import com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonBlock.*; +import com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonBlock.PistonState; import com.simibubi.create.foundation.config.AllConfigs; -import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionLighter; import com.simibubi.create.foundation.utility.VecHelper; + import net.minecraft.block.BlockState; import net.minecraft.block.CarpetBlock; import net.minecraft.block.material.PushReaction; @@ -23,16 +38,6 @@ import net.minecraft.world.World; import net.minecraft.world.gen.feature.template.Template.BlockInfo; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; -import org.apache.commons.lang3.tuple.Pair; - -import java.util.ArrayList; -import java.util.List; -import java.util.Queue; - -import static com.simibubi.create.AllBlocks.MECHANICAL_PISTON_HEAD; -import static com.simibubi.create.AllBlocks.PISTON_EXTENSION_POLE; -import static com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonBlock.*; -import static net.minecraft.state.properties.BlockStateProperties.FACING; public class PistonContraption extends TranslatingContraption { diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/piston/PistonExtensionPoleBlock.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/piston/PistonExtensionPoleBlock.java index b0cb526f2..e8519c0e3 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/piston/PistonExtensionPoleBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/piston/PistonExtensionPoleBlock.java @@ -1,13 +1,20 @@ package com.simibubi.create.content.contraptions.components.structureMovement.piston; +import static com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonBlock.isExtensionPole; +import static com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonBlock.isPiston; +import static com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonBlock.isPistonHead; + +import java.util.function.Predicate; + import com.simibubi.create.AllBlocks; import com.simibubi.create.AllShapes; -import com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonBlock.*; +import com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonBlock.PistonState; import com.simibubi.create.content.contraptions.wrench.IWrenchable; import com.simibubi.create.foundation.block.ProperDirectionalBlock; import com.simibubi.create.foundation.utility.placement.IPlacementHelper; import com.simibubi.create.foundation.utility.placement.PlacementHelpers; import com.simibubi.create.foundation.utility.placement.util.PoleHelper; + import mcp.MethodsReturnNonnullByDefault; import net.minecraft.block.Block; import net.minecraft.block.BlockState; @@ -34,10 +41,6 @@ import net.minecraft.world.IBlockReader; import net.minecraft.world.IWorld; import net.minecraft.world.World; -import java.util.function.Predicate; - -import static com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonBlock.*; - public class PistonExtensionPoleBlock extends ProperDirectionalBlock implements IWrenchable, IWaterLoggable { private static final int placementHelperId = PlacementHelpers.register(PlacementHelper.get()); diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/piston/PistonLighter.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/piston/PistonLighter.java index 94d4e25d1..1c8ffa5ed 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/piston/PistonLighter.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/piston/PistonLighter.java @@ -2,6 +2,7 @@ package com.simibubi.create.content.contraptions.components.structureMovement.pi import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionLighter; import com.simibubi.create.foundation.render.backend.light.GridAlignedBB; + import net.minecraft.util.math.Vec3i; public class PistonLighter extends ContraptionLighter { diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/AbstractPulleyRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/AbstractPulleyRenderer.java index 3e1b87452..17d3ca9ce 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/AbstractPulleyRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/AbstractPulleyRenderer.java @@ -6,8 +6,8 @@ import com.simibubi.create.AllBlockPartials; import com.simibubi.create.content.contraptions.base.IRotate; import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer; -import com.simibubi.create.foundation.utility.AngleHelper; import com.simibubi.create.foundation.render.SuperByteBuffer; +import com.simibubi.create.foundation.utility.AngleHelper; import net.minecraft.block.BlockState; import net.minecraft.client.renderer.IRenderTypeBuffer; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/PulleyContraption.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/PulleyContraption.java index 5f8487c6e..bb81e319e 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/PulleyContraption.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/PulleyContraption.java @@ -1,10 +1,10 @@ package com.simibubi.create.content.contraptions.components.structureMovement.pulley; import com.simibubi.create.content.contraptions.components.structureMovement.AssemblyException; +import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionLighter; import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionType; import com.simibubi.create.content.contraptions.components.structureMovement.TranslatingContraption; -import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionLighter; import net.minecraft.nbt.CompoundNBT; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/PulleyLighter.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/PulleyLighter.java index 1541eb941..4714a30e3 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/PulleyLighter.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/PulleyLighter.java @@ -3,6 +3,7 @@ package com.simibubi.create.content.contraptions.components.structureMovement.pu import com.simibubi.create.AllBlocks; import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionLighter; import com.simibubi.create.foundation.render.backend.light.GridAlignedBB; + import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/PulleyTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/PulleyTileEntity.java index 1f0eef324..5fde955e9 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/PulleyTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/PulleyTileEntity.java @@ -9,6 +9,7 @@ import com.simibubi.create.content.contraptions.components.structureMovement.pis import com.simibubi.create.foundation.config.AllConfigs; import com.simibubi.create.foundation.tileEntity.behaviour.CenteredSideValueBoxTransform; import com.simibubi.create.foundation.tileEntity.behaviour.ValueBoxTransform; + import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; import net.minecraft.block.IWaterLoggable; 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 d670c354f..6733cd22a 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 @@ -1,12 +1,13 @@ package com.simibubi.create.content.contraptions.components.structureMovement.render; -import com.simibubi.create.foundation.render.AllProgramSpecs; -import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer; -import com.simibubi.create.content.contraptions.relays.belt.BeltInstancedModel; import com.simibubi.create.content.contraptions.base.KineticRenderMaterials; -import com.simibubi.create.foundation.render.backend.instancing.RenderMaterial; 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.foundation.render.AllProgramSpecs; +import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer; +import com.simibubi.create.foundation.render.backend.instancing.RenderMaterial; + import net.minecraft.util.math.BlockPos; public class ContraptionKineticRenderer extends InstancedTileRenderer { 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 a332474a4..c5bb45e7b 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 @@ -1,12 +1,13 @@ package com.simibubi.create.content.contraptions.components.structureMovement.render; +import java.nio.ByteBuffer; + import com.simibubi.create.foundation.render.backend.BufferedModel; import com.simibubi.create.foundation.render.backend.gl.attrib.VertexFormat; + import net.minecraft.client.renderer.BufferBuilder; import net.minecraft.client.renderer.LightTexture; -import java.nio.ByteBuffer; - public class ContraptionModel extends BufferedModel { public static final VertexFormat FORMAT = VertexFormat.builder() .addAttributes(ContraptionVertexAttributes.class) diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/ContraptionProgram.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/ContraptionProgram.java index ce2aede88..7f0950ca0 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/ContraptionProgram.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/ContraptionProgram.java @@ -1,11 +1,12 @@ package com.simibubi.create.content.contraptions.components.structureMovement.render; +import org.lwjgl.opengl.GL20; + import com.simibubi.create.foundation.render.backend.gl.BasicProgram; -import com.simibubi.create.foundation.render.backend.light.GridAlignedBB; + import net.minecraft.client.renderer.Matrix4f; import net.minecraft.util.ResourceLocation; import net.minecraft.util.math.AxisAlignedBB; -import org.lwjgl.opengl.GL20; public class ContraptionProgram extends BasicProgram { protected final int uLightBoxSize; 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 5c3d4f8af..f26e5174b 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 @@ -1,27 +1,47 @@ package com.simibubi.create.content.contraptions.components.structureMovement.render; +import java.util.List; +import java.util.Random; + +import org.apache.commons.lang3.tuple.Pair; +import org.lwjgl.opengl.GL11; +import org.lwjgl.opengl.GL13; +import org.lwjgl.opengl.GL40; + import com.mojang.blaze3d.matrix.MatrixStack; import com.simibubi.create.AllMovementBehaviours; import com.simibubi.create.CreateClient; -import com.simibubi.create.content.contraptions.components.structureMovement.*; -import com.simibubi.create.foundation.render.*; -import com.simibubi.create.foundation.render.backend.FastRenderDispatcher; +import com.simibubi.create.content.contraptions.components.structureMovement.AbstractContraptionEntity; +import com.simibubi.create.content.contraptions.components.structureMovement.Contraption; +import com.simibubi.create.content.contraptions.components.structureMovement.MovementBehaviour; +import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext; +import com.simibubi.create.foundation.render.AllProgramSpecs; +import com.simibubi.create.foundation.render.Compartment; +import com.simibubi.create.foundation.render.SuperByteBuffer; +import com.simibubi.create.foundation.render.SuperByteBufferCache; +import com.simibubi.create.foundation.render.TileEntityRenderHelper; import com.simibubi.create.foundation.render.backend.Backend; -import com.simibubi.create.foundation.utility.AnimationTickHolder; +import com.simibubi.create.foundation.render.backend.FastRenderDispatcher; import com.simibubi.create.foundation.utility.MatrixStacker; import com.simibubi.create.foundation.utility.worldWrappers.PlacementSimulationWorld; + import it.unimi.dsi.fastutil.ints.Int2ObjectMap; import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap; import net.minecraft.block.BlockRenderType; import net.minecraft.block.BlockState; import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.*; -import net.minecraft.client.renderer.entity.EntityRenderer; -import net.minecraft.client.renderer.entity.EntityRendererManager; +import net.minecraft.client.renderer.BlockModelRenderer; +import net.minecraft.client.renderer.BlockRendererDispatcher; +import net.minecraft.client.renderer.BufferBuilder; +import net.minecraft.client.renderer.IRenderTypeBuffer; +import net.minecraft.client.renderer.LightTexture; +import net.minecraft.client.renderer.Matrix4f; +import net.minecraft.client.renderer.RenderType; +import net.minecraft.client.renderer.RenderTypeLookup; +import net.minecraft.client.renderer.WorldRenderer; import net.minecraft.client.renderer.model.IBakedModel; import net.minecraft.client.renderer.texture.OverlayTexture; import net.minecraft.client.renderer.vertex.DefaultVertexFormats; -import net.minecraft.client.world.ClientWorld; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.SectionPos; import net.minecraft.world.ILightReader; @@ -30,14 +50,6 @@ import net.minecraft.world.World; import net.minecraft.world.gen.feature.template.Template; import net.minecraftforge.client.ForgeHooksClient; import net.minecraftforge.client.model.data.EmptyModelData; -import net.minecraftforge.event.TickEvent; -import org.apache.commons.lang3.tuple.Pair; -import org.lwjgl.opengl.GL11; -import org.lwjgl.opengl.GL13; -import org.lwjgl.opengl.GL40; - -import java.lang.ref.WeakReference; -import java.util.*; public class ContraptionRenderDispatcher { public static final Int2ObjectMap renderers = new Int2ObjectOpenHashMap<>(); diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/ContraptionRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/ContraptionRenderer.java index 70b823e70..cf2bd4059 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/ContraptionRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/ContraptionRenderer.java @@ -1,44 +1,5 @@ package com.simibubi.create.content.contraptions.components.structureMovement.render; -import java.util.List; -import java.util.Random; - -import com.simibubi.create.content.contraptions.components.structureMovement.Contraption; -import com.simibubi.create.content.contraptions.components.structureMovement.MovementBehaviour; -import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext; -import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionRenderDispatcher; -import com.simibubi.create.foundation.render.*; -import com.simibubi.create.foundation.render.backend.Backend; -import com.simibubi.create.foundation.render.backend.FastRenderDispatcher; -import org.apache.commons.lang3.tuple.Pair; -import org.lwjgl.opengl.GL11; - -import com.mojang.blaze3d.matrix.MatrixStack; -import com.simibubi.create.AllMovementBehaviours; -import com.simibubi.create.CreateClient; -import com.simibubi.create.foundation.utility.MatrixStacker; -import com.simibubi.create.foundation.utility.worldWrappers.PlacementSimulationWorld; - -import net.minecraft.block.BlockRenderType; -import net.minecraft.block.BlockState; -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.BlockModelRenderer; -import net.minecraft.client.renderer.BlockRendererDispatcher; -import net.minecraft.client.renderer.BufferBuilder; -import net.minecraft.client.renderer.IRenderTypeBuffer; -import net.minecraft.client.renderer.Matrix4f; -import net.minecraft.client.renderer.RenderType; -import net.minecraft.client.renderer.RenderTypeLookup; -import net.minecraft.client.renderer.model.IBakedModel; -import net.minecraft.client.renderer.texture.OverlayTexture; -import net.minecraft.client.renderer.vertex.DefaultVertexFormats; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.LightType; -import net.minecraft.world.World; -import net.minecraft.world.gen.feature.template.Template.BlockInfo; -import net.minecraftforge.client.ForgeHooksClient; -import net.minecraftforge.client.model.data.EmptyModelData; - public class ContraptionRenderer { diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/RenderedContraption.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/RenderedContraption.java index 32fed725d..c86f70336 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/RenderedContraption.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/RenderedContraption.java @@ -1,21 +1,39 @@ package com.simibubi.create.content.contraptions.components.structureMovement.render; +import java.util.Collection; +import java.util.HashMap; +import java.util.List; +import java.util.Random; + +import org.apache.commons.lang3.tuple.MutablePair; +import org.lwjgl.opengl.GL11; + import com.mojang.blaze3d.matrix.MatrixStack; import com.simibubi.create.AllMovementBehaviours; import com.simibubi.create.content.contraptions.base.KineticRenderMaterials; -import com.simibubi.create.content.contraptions.components.structureMovement.*; -import com.simibubi.create.foundation.render.backend.Backend; -import com.simibubi.create.foundation.render.backend.instancing.*; import com.simibubi.create.content.contraptions.components.actors.ContraptionActorData; +import com.simibubi.create.content.contraptions.components.structureMovement.AbstractContraptionEntity; +import com.simibubi.create.content.contraptions.components.structureMovement.Contraption; +import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionLighter; +import com.simibubi.create.content.contraptions.components.structureMovement.MovementBehaviour; +import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext; +import com.simibubi.create.foundation.render.backend.Backend; +import com.simibubi.create.foundation.render.backend.instancing.IInstanceRendered; +import com.simibubi.create.foundation.render.backend.instancing.InstancedModel; +import com.simibubi.create.foundation.render.backend.instancing.RenderMaterial; import com.simibubi.create.foundation.render.backend.light.GridAlignedBB; import com.simibubi.create.foundation.utility.AnimationTickHolder; import com.simibubi.create.foundation.utility.worldWrappers.PlacementSimulationWorld; + import net.minecraft.block.BlockRenderType; import net.minecraft.block.BlockState; import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.*; -import net.minecraft.client.renderer.entity.EntityRenderer; -import net.minecraft.client.renderer.entity.EntityRendererManager; +import net.minecraft.client.renderer.BlockModelRenderer; +import net.minecraft.client.renderer.BlockRendererDispatcher; +import net.minecraft.client.renderer.BufferBuilder; +import net.minecraft.client.renderer.Matrix4f; +import net.minecraft.client.renderer.RenderType; +import net.minecraft.client.renderer.RenderTypeLookup; import net.minecraft.client.renderer.model.IBakedModel; import net.minecraft.client.renderer.texture.OverlayTexture; import net.minecraft.client.renderer.vertex.DefaultVertexFormats; @@ -28,13 +46,6 @@ import net.minecraft.world.gen.feature.template.Template; import net.minecraft.world.lighting.WorldLightManager; import net.minecraftforge.client.ForgeHooksClient; import net.minecraftforge.client.model.data.EmptyModelData; -import org.apache.commons.lang3.tuple.MutablePair; -import org.lwjgl.opengl.GL11; - -import java.util.Collection; -import java.util.HashMap; -import java.util.List; -import java.util.Random; public class RenderedContraption { private final HashMap renderLayers = new HashMap<>(); diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/train/CouplingRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/train/CouplingRenderer.java index 34a52daa3..6ffbf59d2 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/train/CouplingRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/train/CouplingRenderer.java @@ -1,5 +1,7 @@ package com.simibubi.create.content.contraptions.components.structureMovement.train; +import static net.minecraft.util.math.MathHelper.lerp; + import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.vertex.IVertexBuilder; import com.simibubi.create.AllBlockPartials; @@ -7,7 +9,12 @@ import com.simibubi.create.CreateClient; import com.simibubi.create.content.contraptions.KineticDebugger; import com.simibubi.create.content.contraptions.components.structureMovement.train.capability.MinecartController; import com.simibubi.create.foundation.render.SuperByteBuffer; -import com.simibubi.create.foundation.utility.*; +import com.simibubi.create.foundation.utility.AnimationTickHolder; +import com.simibubi.create.foundation.utility.ColorHelper; +import com.simibubi.create.foundation.utility.Couple; +import com.simibubi.create.foundation.utility.MatrixStacker; +import com.simibubi.create.foundation.utility.VecHelper; + import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; import net.minecraft.client.Minecraft; @@ -22,8 +29,6 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.Vec3d; -import static net.minecraft.util.math.MathHelper.lerp; - public class CouplingRenderer { public static void renderAll(MatrixStack ms, IRenderTypeBuffer buffer) { diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/train/MinecartCouplingItem.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/train/MinecartCouplingItem.java index 5fa47e5bc..d421c8fb1 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/train/MinecartCouplingItem.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/train/MinecartCouplingItem.java @@ -66,7 +66,7 @@ public class MinecartCouplingItem extends Item { return true; } if (world != null && world.isRemote) - DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> cartClicked(player, minecart)); + DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> cartClicked(player, minecart)); return true; } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/train/capability/MinecartControllerUpdatePacket.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/train/capability/MinecartControllerUpdatePacket.java index 5b399ffcc..58008e2c8 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/train/capability/MinecartControllerUpdatePacket.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/train/capability/MinecartControllerUpdatePacket.java @@ -39,7 +39,7 @@ public class MinecartControllerUpdatePacket extends SimplePacketBase { @Override public void handle(Supplier context) { context.get() - .enqueueWork(() -> DistExecutor.runWhenOn(Dist.CLIENT, () -> this::handleCL)); + .enqueueWork(() -> DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> this::handleCL)); context.get() .setPacketHandled(true); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/turntable/TurntableHandler.java b/src/main/java/com/simibubi/create/content/contraptions/components/turntable/TurntableHandler.java index d335edaf3..a6ccc5707 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/turntable/TurntableHandler.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/turntable/TurntableHandler.java @@ -3,6 +3,7 @@ package com.simibubi.create.content.contraptions.components.turntable; import com.simibubi.create.AllBlocks; import com.simibubi.create.foundation.utility.AnimationTickHolder; import com.simibubi.create.foundation.utility.VecHelper; + import net.minecraft.client.Minecraft; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.math.BlockPos; diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidPropagator.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidPropagator.java index b193246c1..f82785446 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidPropagator.java +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidPropagator.java @@ -182,7 +182,7 @@ public class FluidPropagator { // @Deprecated // public static OutlineParams showBlockFace(BlockFace face) { // MutableObject params = new MutableObject<>(new OutlineParams()); -// DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> { +// DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> { // Vec3d directionVec = new Vec3d(face.getFace() // .getDirectionVec()); // Vec3d scaleVec = directionVec.scale(-.25f * face.getFace() diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/PipeConnection.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/PipeConnection.java index 7ce0b8729..efded06cf 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/fluids/PipeConnection.java +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/PipeConnection.java @@ -358,11 +358,11 @@ public class PipeConnection { public static final Random r = new Random(); public void spawnSplashOnRim(World world, BlockPos pos, FluidStack fluid) { - DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> spawnSplashOnRimInner(world, pos, fluid)); + DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> spawnSplashOnRimInner(world, pos, fluid)); } public void spawnParticles(World world, BlockPos pos, FluidStack fluid) { - DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> spawnParticlesInner(world, pos, fluid)); + DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> spawnParticlesInner(world, pos, fluid)); } @OnlyIn(Dist.CLIENT) diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/PumpCogInstance.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/PumpCogInstance.java index a8e7f6c61..99b4bebec 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/fluids/PumpCogInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/PumpCogInstance.java @@ -2,18 +2,19 @@ package com.simibubi.create.content.contraptions.fluids; import com.simibubi.create.AllBlockPartials; import com.simibubi.create.content.contraptions.base.KineticTileEntity; +import com.simibubi.create.content.contraptions.base.RotatingData; import com.simibubi.create.content.contraptions.base.SingleRotatingInstance; -import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer; import com.simibubi.create.foundation.render.backend.instancing.InstancedModel; import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderRegistry; -import com.simibubi.create.content.contraptions.base.RotatingData; +import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer; + import net.minecraft.tileentity.TileEntityType; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.fml.DistExecutor; public class PumpCogInstance extends SingleRotatingInstance { public static void register(TileEntityType type) { - DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> + DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> InstancedTileRenderRegistry.instance.register(type, PumpCogInstance::new)); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/PumpRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/PumpRenderer.java index b14b30539..f091caf04 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/fluids/PumpRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/PumpRenderer.java @@ -4,9 +4,9 @@ import com.mojang.blaze3d.matrix.MatrixStack; import com.simibubi.create.AllBlockPartials; import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer; +import com.simibubi.create.foundation.render.SuperByteBuffer; import com.simibubi.create.foundation.utility.AngleHelper; import com.simibubi.create.foundation.utility.MatrixStacker; -import com.simibubi.create.foundation.render.SuperByteBuffer; import net.minecraft.block.BlockState; import net.minecraft.client.renderer.IRenderTypeBuffer; diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/PumpTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/PumpTileEntity.java index ff0bad252..821d5f4ca 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/fluids/PumpTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/PumpTileEntity.java @@ -1,10 +1,28 @@ package com.simibubi.create.content.contraptions.fluids; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.IdentityHashMap; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import javax.annotation.Nullable; + +import org.apache.commons.lang3.mutable.MutableBoolean; + import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.foundation.tileEntity.SmartTileEntity; import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour; -import com.simibubi.create.foundation.utility.*; +import com.simibubi.create.foundation.utility.BlockFace; +import com.simibubi.create.foundation.utility.Couple; +import com.simibubi.create.foundation.utility.Iterate; +import com.simibubi.create.foundation.utility.LerpedFloat; import com.simibubi.create.foundation.utility.LerpedFloat.Chaser; +import com.simibubi.create.foundation.utility.Pair; + import net.minecraft.block.BlockState; import net.minecraft.nbt.CompoundNBT; import net.minecraft.tileentity.TileEntity; @@ -16,11 +34,6 @@ import net.minecraft.world.IWorld; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.fluids.capability.CapabilityFluidHandler; import net.minecraftforge.fluids.capability.IFluidHandler; -import org.apache.commons.lang3.mutable.MutableBoolean; - -import javax.annotation.Nullable; -import java.util.*; -import java.util.Map.Entry; public class PumpTileEntity extends KineticTileEntity { diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/actors/FluidSplashPacket.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/actors/FluidSplashPacket.java index 1489e52b7..f5c397c0f 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/fluids/actors/FluidSplashPacket.java +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/actors/FluidSplashPacket.java @@ -36,7 +36,7 @@ public class FluidSplashPacket extends SimplePacketBase { public void handle(Supplier ctx) { ctx.get() - .enqueueWork(() -> DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> { + .enqueueWork(() -> DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> { if (Minecraft.getInstance().player.getPositionVector() .distanceTo(new Vec3d(pos)) > 100) return; diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/actors/HosePulleyTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/actors/HosePulleyTileEntity.java index 698f36e3f..5745d4c1d 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/fluids/actors/HosePulleyTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/actors/HosePulleyTileEntity.java @@ -1,11 +1,14 @@ package com.simibubi.create.content.contraptions.fluids.actors; +import java.util.List; + import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.foundation.fluid.SmartFluidTank; import com.simibubi.create.foundation.item.TooltipHelper; import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour; import com.simibubi.create.foundation.utility.LerpedFloat; import com.simibubi.create.foundation.utility.ServerSpeedProvider; + import net.minecraft.nbt.CompoundNBT; import net.minecraft.tileentity.TileEntityType; import net.minecraft.util.Direction; @@ -17,8 +20,6 @@ import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.capability.IFluidHandler; -import java.util.List; - public class HosePulleyTileEntity extends KineticTileEntity { LerpedFloat offset; diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/BracketBlock.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/BracketBlock.java index 5ced0d5f9..0192ece07 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/BracketBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/BracketBlock.java @@ -5,8 +5,8 @@ import java.util.Optional; import com.simibubi.create.content.contraptions.base.DirectionalAxisKineticBlock; import com.simibubi.create.content.contraptions.base.RotatedPillarKineticBlock; import com.simibubi.create.content.contraptions.fluids.FluidPropagator; -import com.simibubi.create.content.contraptions.relays.elementary.CogWheelBlock; import com.simibubi.create.content.contraptions.relays.elementary.AbstractShaftBlock; +import com.simibubi.create.content.contraptions.relays.elementary.CogWheelBlock; import com.simibubi.create.foundation.block.ProperDirectionalBlock; import com.simibubi.create.foundation.utility.Lang; diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/FluidValveRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/FluidValveRenderer.java index bf16148fd..729d37d7d 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/FluidValveRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/FluidValveRenderer.java @@ -4,9 +4,9 @@ import com.mojang.blaze3d.matrix.MatrixStack; import com.simibubi.create.AllBlockPartials; import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer; +import com.simibubi.create.foundation.render.SuperByteBuffer; import com.simibubi.create.foundation.utility.AngleHelper; import com.simibubi.create.foundation.utility.MatrixStacker; -import com.simibubi.create.foundation.render.SuperByteBuffer; import net.minecraft.block.BlockState; import net.minecraft.client.renderer.IRenderTypeBuffer; diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/GlassFluidPipeBlock.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/GlassFluidPipeBlock.java index 2b1d40780..d6100573c 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/GlassFluidPipeBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/GlassFluidPipeBlock.java @@ -1,5 +1,7 @@ package com.simibubi.create.content.contraptions.fluids.pipes; +import javax.annotation.ParametersAreNonnullByDefault; + import com.simibubi.create.AllBlocks; import com.simibubi.create.AllTileEntities; import com.simibubi.create.content.schematics.ISpecialBlockItemRequirement; @@ -22,8 +24,6 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.world.IBlockReader; import net.minecraft.world.World; -import javax.annotation.ParametersAreNonnullByDefault; - @MethodsReturnNonnullByDefault @ParametersAreNonnullByDefault diff --git a/src/main/java/com/simibubi/create/content/contraptions/goggles/GoggleOverlayRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/goggles/GoggleOverlayRenderer.java index c61452bb8..81ef886ab 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/goggles/GoggleOverlayRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/goggles/GoggleOverlayRenderer.java @@ -1,5 +1,11 @@ package com.simibubi.create.content.contraptions.goggles; +import static com.simibubi.create.content.contraptions.goggles.IHaveGoggleInformation.spacing; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + import com.mojang.blaze3d.systems.RenderSystem; import com.simibubi.create.AllBlocks; import com.simibubi.create.AllItems; @@ -14,6 +20,7 @@ import com.simibubi.create.foundation.utility.Iterate; import com.simibubi.create.foundation.utility.Lang; import com.simibubi.create.foundation.utility.outliner.Outline; import com.simibubi.create.foundation.utility.outliner.Outliner.OutlineEntry; + import net.minecraft.block.BlockState; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.screen.Screen; @@ -32,12 +39,6 @@ import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod.EventBusSubscriber; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -import static com.simibubi.create.content.contraptions.goggles.IHaveGoggleInformation.spacing; - @EventBusSubscriber(value = Dist.CLIENT) public class GoggleOverlayRenderer { diff --git a/src/main/java/com/simibubi/create/content/contraptions/particle/RotationIndicatorParticle.java b/src/main/java/com/simibubi/create/content/contraptions/particle/RotationIndicatorParticle.java index f161e74bc..dd314bfe6 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/particle/RotationIndicatorParticle.java +++ b/src/main/java/com/simibubi/create/content/contraptions/particle/RotationIndicatorParticle.java @@ -5,6 +5,7 @@ import com.simibubi.create.content.contraptions.goggles.GogglesItem; import com.simibubi.create.foundation.utility.AnimationTickHolder; import com.simibubi.create.foundation.utility.ColorHelper; import com.simibubi.create.foundation.utility.VecHelper; + import net.minecraft.client.Minecraft; import net.minecraft.client.entity.player.ClientPlayerEntity; import net.minecraft.client.particle.IAnimatedSprite; diff --git a/src/main/java/com/simibubi/create/content/contraptions/processing/BasinOperatingTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/processing/BasinOperatingTileEntity.java index 7c711358f..d948c5af9 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/processing/BasinOperatingTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/processing/BasinOperatingTileEntity.java @@ -1,20 +1,21 @@ package com.simibubi.create.content.contraptions.processing; +import java.util.List; +import java.util.Optional; +import java.util.stream.Collectors; + import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.foundation.advancement.AllTriggers; import com.simibubi.create.foundation.advancement.ITriggerable; import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour; import com.simibubi.create.foundation.tileEntity.behaviour.simple.DeferralBehaviour; import com.simibubi.create.foundation.utility.recipe.RecipeFinder; + import net.minecraft.inventory.IInventory; import net.minecraft.item.crafting.IRecipe; import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntityType; -import java.util.List; -import java.util.Optional; -import java.util.stream.Collectors; - public abstract class BasinOperatingTileEntity extends KineticTileEntity { public DeferralBehaviour basinChecker; diff --git a/src/main/java/com/simibubi/create/content/contraptions/processing/BasinTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/processing/BasinTileEntity.java index 1eb9dd801..60117276f 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/processing/BasinTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/processing/BasinTileEntity.java @@ -1,5 +1,14 @@ package com.simibubi.create.content.contraptions.processing; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Iterator; +import java.util.List; +import java.util.Optional; +import java.util.Random; + +import javax.annotation.Nonnull; + import com.simibubi.create.AllParticleTypes; import com.simibubi.create.AllTags; import com.simibubi.create.content.contraptions.components.mixer.MechanicalMixerTileEntity; @@ -16,8 +25,15 @@ import com.simibubi.create.foundation.tileEntity.behaviour.belt.DirectBeltInputB import com.simibubi.create.foundation.tileEntity.behaviour.filtering.FilteringBehaviour; import com.simibubi.create.foundation.tileEntity.behaviour.fluid.SmartFluidTankBehaviour; import com.simibubi.create.foundation.tileEntity.behaviour.fluid.SmartFluidTankBehaviour.TankSegment; -import com.simibubi.create.foundation.utility.*; +import com.simibubi.create.foundation.utility.AnimationTickHolder; +import com.simibubi.create.foundation.utility.Couple; +import com.simibubi.create.foundation.utility.IntAttached; +import com.simibubi.create.foundation.utility.Iterate; +import com.simibubi.create.foundation.utility.LerpedFloat; import com.simibubi.create.foundation.utility.LerpedFloat.Chaser; +import com.simibubi.create.foundation.utility.NBTHelper; +import com.simibubi.create.foundation.utility.VecHelper; + import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.item.ItemStack; @@ -47,9 +63,6 @@ import net.minecraftforge.items.IItemHandlerModifiable; import net.minecraftforge.items.ItemHandlerHelper; import net.minecraftforge.items.wrapper.CombinedInvWrapper; -import javax.annotation.Nonnull; -import java.util.*; - public class BasinTileEntity extends SmartTileEntity { private boolean areFluidsMoving; 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 e4110a16b..a2b7abd5c 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 @@ -3,10 +3,10 @@ package com.simibubi.create.content.contraptions.processing.burner; import com.mojang.blaze3d.matrix.MatrixStack; import com.simibubi.create.AllBlockPartials; import com.simibubi.create.content.contraptions.processing.burner.BlazeBurnerBlock.HeatLevel; +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.render.SuperByteBuffer; import net.minecraft.client.renderer.IRenderTypeBuffer; import net.minecraft.client.renderer.RenderType; diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/advanced/GantryShaftBlock.java b/src/main/java/com/simibubi/create/content/contraptions/relays/advanced/GantryShaftBlock.java index dab2b86b6..db9ae172b 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/advanced/GantryShaftBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/advanced/GantryShaftBlock.java @@ -1,5 +1,9 @@ package com.simibubi.create.content.contraptions.relays.advanced; +import java.util.ArrayList; +import java.util.List; +import java.util.function.Predicate; + import com.simibubi.create.AllBlocks; import com.simibubi.create.AllShapes; import com.simibubi.create.AllTileEntities; @@ -11,6 +15,7 @@ import com.simibubi.create.foundation.utility.placement.IPlacementHelper; import com.simibubi.create.foundation.utility.placement.PlacementHelpers; import com.simibubi.create.foundation.utility.placement.PlacementOffset; import com.simibubi.create.foundation.utility.placement.util.PoleHelper; + import net.minecraft.block.Block; import net.minecraft.block.BlockRenderType; import net.minecraft.block.BlockState; @@ -39,10 +44,6 @@ import net.minecraft.world.IWorld; import net.minecraft.world.IWorldReader; import net.minecraft.world.World; -import java.util.ArrayList; -import java.util.List; -import java.util.function.Predicate; - public class GantryShaftBlock extends DirectionalKineticBlock { public static final IProperty PART = EnumProperty.create("part", Part.class); diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/advanced/SpeedControllerBlock.java b/src/main/java/com/simibubi/create/content/contraptions/relays/advanced/SpeedControllerBlock.java index caac99749..1d39ccbd5 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/advanced/SpeedControllerBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/advanced/SpeedControllerBlock.java @@ -1,5 +1,7 @@ package com.simibubi.create.content.contraptions.relays.advanced; +import java.util.function.Predicate; + import com.simibubi.create.AllBlocks; import com.simibubi.create.AllShapes; import com.simibubi.create.AllTileEntities; @@ -10,6 +12,7 @@ import com.simibubi.create.foundation.block.ITE; import com.simibubi.create.foundation.utility.placement.IPlacementHelper; import com.simibubi.create.foundation.utility.placement.PlacementHelpers; import com.simibubi.create.foundation.utility.placement.PlacementOffset; + import mcp.MethodsReturnNonnullByDefault; import net.minecraft.block.Block; import net.minecraft.block.BlockState; @@ -28,8 +31,6 @@ import net.minecraft.util.math.shapes.VoxelShape; import net.minecraft.world.IBlockReader; import net.minecraft.world.World; -import java.util.function.Predicate; - public class SpeedControllerBlock extends HorizontalAxisKineticBlock implements ITE { private static final int placementHelperId = PlacementHelpers.register(new PlacementHelper()); diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/advanced/SpeedControllerRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/relays/advanced/SpeedControllerRenderer.java index dd20003ff..f4e324071 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/advanced/SpeedControllerRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/advanced/SpeedControllerRenderer.java @@ -5,9 +5,9 @@ import com.mojang.blaze3d.vertex.IVertexBuilder; import com.simibubi.create.AllBlockPartials; import com.simibubi.create.CreateClient; import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer; +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.render.SuperByteBuffer; import net.minecraft.block.BlockState; import net.minecraft.client.renderer.IRenderTypeBuffer; diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/advanced/sequencer/SequencedGearshiftBlock.java b/src/main/java/com/simibubi/create/content/contraptions/relays/advanced/sequencer/SequencedGearshiftBlock.java index 2974f2a3a..a769d0ed4 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/advanced/sequencer/SequencedGearshiftBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/advanced/sequencer/SequencedGearshiftBlock.java @@ -93,7 +93,7 @@ public class SequencedGearshiftBlock extends HorizontalAxisKineticBlock implemen return ActionResultType.PASS; } - DistExecutor.runWhenOn(Dist.CLIENT, + DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> withTileEntityDo(worldIn, pos, te -> this.displayScreen(te, player))); return ActionResultType.SUCCESS; } diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltData.java b/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltData.java index cbd2ee461..9f6db3daf 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltData.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltData.java @@ -1,13 +1,14 @@ package com.simibubi.create.content.contraptions.relays.belt; +import java.nio.ByteBuffer; + +import com.simibubi.create.content.contraptions.base.KineticData; +import com.simibubi.create.content.contraptions.base.KineticVertexAttributes; import com.simibubi.create.foundation.block.render.SpriteShiftEntry; import com.simibubi.create.foundation.render.backend.gl.attrib.VertexFormat; -import com.simibubi.create.content.contraptions.base.KineticVertexAttributes; -import com.simibubi.create.content.contraptions.base.KineticData; import com.simibubi.create.foundation.render.backend.instancing.InstancedModel; -import net.minecraft.client.renderer.texture.TextureAtlasSprite; -import java.nio.ByteBuffer; +import net.minecraft.client.renderer.texture.TextureAtlasSprite; public class BeltData extends KineticData { public static VertexFormat FORMAT = VertexFormat.builder() diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltInstance.java b/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltInstance.java index 13c7d9f32..7b8c7997a 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltInstance.java @@ -1,15 +1,22 @@ package com.simibubi.create.content.contraptions.relays.belt; +import java.util.ArrayList; +import java.util.function.Consumer; +import java.util.function.Supplier; + import com.mojang.blaze3d.matrix.MatrixStack; import com.simibubi.create.AllBlockPartials; import com.simibubi.create.AllBlocks; import com.simibubi.create.content.contraptions.base.KineticTileInstance; import com.simibubi.create.content.contraptions.base.RotatingData; import com.simibubi.create.foundation.block.render.SpriteShiftEntry; +import com.simibubi.create.foundation.render.backend.instancing.InstanceKey; +import com.simibubi.create.foundation.render.backend.instancing.InstancedModel; +import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderRegistry; import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer; -import com.simibubi.create.foundation.render.backend.instancing.*; import com.simibubi.create.foundation.utility.Iterate; import com.simibubi.create.foundation.utility.MatrixStacker; + import net.minecraft.item.DyeColor; import net.minecraft.tileentity.TileEntityType; import net.minecraft.util.Direction; @@ -18,13 +25,9 @@ import net.minecraft.world.LightType; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.fml.DistExecutor; -import java.util.ArrayList; -import java.util.function.Consumer; -import java.util.function.Supplier; - public class BeltInstance extends KineticTileInstance { public static void register(TileEntityType type) { - DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> + DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> InstancedTileRenderRegistry.instance.register(type, BeltInstance::new)); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltInstancedModel.java b/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltInstancedModel.java index cb8c64082..86e7e26ef 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltInstancedModel.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltInstancedModel.java @@ -3,6 +3,7 @@ package com.simibubi.create.content.contraptions.relays.belt; 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 BeltInstancedModel extends InstancedModel { diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltRenderer.java index 6717aa316..e123a5e41 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltRenderer.java @@ -1,6 +1,5 @@ package com.simibubi.create.content.contraptions.relays.belt; -import java.util.Optional; import java.util.Random; import com.mojang.blaze3d.matrix.MatrixStack; @@ -20,6 +19,7 @@ import com.simibubi.create.foundation.utility.AngleHelper; import com.simibubi.create.foundation.utility.AnimationTickHolder; import com.simibubi.create.foundation.utility.Iterate; import com.simibubi.create.foundation.utility.MatrixStacker; + import net.minecraft.block.BlockState; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.IRenderTypeBuffer; diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltSlope.java b/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltSlope.java index ab6cf32a8..56086092a 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltSlope.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltSlope.java @@ -1,6 +1,7 @@ package com.simibubi.create.content.contraptions.relays.belt; import com.simibubi.create.foundation.utility.Lang; + import net.minecraft.util.IStringSerializable; public enum BeltSlope implements IStringSerializable { 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 8bce6836d..a55c23825 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 @@ -15,7 +15,8 @@ import java.util.function.Function; import com.simibubi.create.AllBlocks; import com.simibubi.create.content.contraptions.base.IRotate; import com.simibubi.create.content.contraptions.base.KineticTileEntity; -import com.simibubi.create.content.contraptions.relays.belt.transport.*; +import com.simibubi.create.content.contraptions.relays.belt.transport.BeltInventory; +import com.simibubi.create.content.contraptions.relays.belt.transport.BeltMovementHandler; import com.simibubi.create.content.contraptions.relays.belt.transport.BeltMovementHandler.TransportedEntityInfo; import com.simibubi.create.content.contraptions.relays.belt.transport.BeltTunnelInteractionHandler; import com.simibubi.create.content.contraptions.relays.belt.transport.ItemHandlerBeltSegment; @@ -263,7 +264,7 @@ public class BeltTileEntity extends KineticTileEntity { belt.color = Optional.ofNullable(colorIn); belt.markDirty(); belt.sendData(); - DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> FastRenderDispatcher.enqueueUpdate(belt)); + DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> FastRenderDispatcher.enqueueUpdate(belt)); } } diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/belt/transport/BeltInventory.java b/src/main/java/com/simibubi/create/content/contraptions/relays/belt/transport/BeltInventory.java index 1284afba9..fed661dd6 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/belt/transport/BeltInventory.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/belt/transport/BeltInventory.java @@ -286,9 +286,7 @@ public class BeltInventory { } private Ending resolveEnding() { - int lastOffset = beltMovementPositive ? belt.beltLength - 1 : 0; World world = belt.getWorld(); - BlockPos lastPosition = BeltHelper.getPositionForOffset(belt, lastOffset); BlockPos nextPosition = BeltHelper.getPositionForOffset(belt, beltMovementPositive ? belt.beltLength : -1); // if (AllBlocks.BRASS_BELT_FUNNEL.has(world.getBlockState(lastPosition.up()))) diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/elementary/CogwheelBlockItem.java b/src/main/java/com/simibubi/create/content/contraptions/relays/elementary/CogwheelBlockItem.java index 968f729ab..ba6b819b8 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/elementary/CogwheelBlockItem.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/elementary/CogwheelBlockItem.java @@ -1,5 +1,10 @@ package com.simibubi.create.content.contraptions.relays.elementary; +import static com.simibubi.create.content.contraptions.base.RotatedPillarKineticBlock.AXIS; + +import java.util.List; +import java.util.function.Predicate; + import com.simibubi.create.AllBlocks; import com.simibubi.create.AllShapes; import com.simibubi.create.content.contraptions.base.DirectionalKineticBlock; @@ -10,6 +15,7 @@ import com.simibubi.create.foundation.utility.Iterate; import com.simibubi.create.foundation.utility.placement.IPlacementHelper; import com.simibubi.create.foundation.utility.placement.PlacementHelpers; import com.simibubi.create.foundation.utility.placement.PlacementOffset; + import mcp.MethodsReturnNonnullByDefault; import net.minecraft.block.BlockState; import net.minecraft.entity.player.PlayerEntity; @@ -25,11 +31,6 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockRayTraceResult; import net.minecraft.world.World; -import java.util.List; -import java.util.function.Predicate; - -import static com.simibubi.create.content.contraptions.base.RotatedPillarKineticBlock.AXIS; - public class CogwheelBlockItem extends BlockItem { boolean large; diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/elementary/ShaftBlock.java b/src/main/java/com/simibubi/create/content/contraptions/relays/elementary/ShaftBlock.java index d68c293f0..3b0bb2e8d 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/elementary/ShaftBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/elementary/ShaftBlock.java @@ -1,5 +1,7 @@ package com.simibubi.create.content.contraptions.relays.elementary; +import java.util.function.Predicate; + import com.simibubi.create.AllBlocks; import com.simibubi.create.AllShapes; import com.simibubi.create.content.contraptions.base.KineticTileEntity; @@ -8,6 +10,7 @@ import com.simibubi.create.foundation.advancement.AllTriggers; import com.simibubi.create.foundation.utility.placement.IPlacementHelper; import com.simibubi.create.foundation.utility.placement.PlacementHelpers; import com.simibubi.create.foundation.utility.placement.util.PoleHelper; + import mcp.MethodsReturnNonnullByDefault; import net.minecraft.block.BlockState; import net.minecraft.entity.player.PlayerEntity; @@ -23,8 +26,6 @@ import net.minecraft.util.math.shapes.VoxelShape; import net.minecraft.world.IBlockReader; import net.minecraft.world.World; -import java.util.function.Predicate; - public class ShaftBlock extends AbstractShaftBlock { private static final int placementHelperId = PlacementHelpers.register(new PlacementHelper()); diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/encased/ShaftInstance.java b/src/main/java/com/simibubi/create/content/contraptions/relays/encased/ShaftInstance.java index bebfb5763..3dd04f582 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/encased/ShaftInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/encased/ShaftInstance.java @@ -2,8 +2,9 @@ package com.simibubi.create.content.contraptions.relays.encased; import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.content.contraptions.base.SingleRotatingInstance; -import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer; import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderRegistry; +import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer; + import net.minecraft.block.BlockState; import net.minecraft.tileentity.TileEntityType; import net.minecraftforge.api.distmarker.Dist; @@ -12,7 +13,7 @@ import net.minecraftforge.fml.DistExecutor; public class ShaftInstance extends SingleRotatingInstance { public static void register(TileEntityType type) { - DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> + DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> InstancedTileRenderRegistry.instance.register(type, ShaftInstance::new)); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/encased/SplitShaftInstance.java b/src/main/java/com/simibubi/create/content/contraptions/relays/encased/SplitShaftInstance.java index 860d267ba..1ac7476bb 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/encased/SplitShaftInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/encased/SplitShaftInstance.java @@ -1,25 +1,26 @@ package com.simibubi.create.content.contraptions.relays.encased; +import java.util.ArrayList; + import com.simibubi.create.AllBlockPartials; import com.simibubi.create.content.contraptions.base.IRotate; import com.simibubi.create.content.contraptions.base.KineticTileInstance; -import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer; +import com.simibubi.create.content.contraptions.base.RotatingData; import com.simibubi.create.foundation.render.backend.instancing.InstanceKey; import com.simibubi.create.foundation.render.backend.instancing.InstancedModel; import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderRegistry; -import com.simibubi.create.content.contraptions.base.RotatingData; +import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer; import com.simibubi.create.foundation.utility.Iterate; + import net.minecraft.block.Block; import net.minecraft.tileentity.TileEntityType; import net.minecraft.util.Direction; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.fml.DistExecutor; -import java.util.ArrayList; - public class SplitShaftInstance extends KineticTileInstance { public static void register(TileEntityType type) { - DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> + DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> InstancedTileRenderRegistry.instance.register(type, SplitShaftInstance::new)); } 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 2620aa018..8aca8cccd 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 @@ -5,10 +5,10 @@ import com.simibubi.create.AllBlockPartials; import com.simibubi.create.content.contraptions.base.IRotate; import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer; +import com.simibubi.create.foundation.render.SuperByteBuffer; import com.simibubi.create.foundation.render.backend.FastRenderDispatcher; import com.simibubi.create.foundation.utility.AnimationTickHolder; import com.simibubi.create.foundation.utility.Iterate; -import com.simibubi.create.foundation.render.SuperByteBuffer; import net.minecraft.block.Block; import net.minecraft.client.renderer.IRenderTypeBuffer; diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/gauge/GaugeRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/relays/gauge/GaugeRenderer.java index c8d81bfe9..3085dae58 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/gauge/GaugeRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/gauge/GaugeRenderer.java @@ -6,8 +6,8 @@ import com.simibubi.create.AllBlockPartials; import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer; import com.simibubi.create.content.contraptions.relays.gauge.GaugeBlock.Type; -import com.simibubi.create.foundation.utility.Iterate; import com.simibubi.create.foundation.render.SuperByteBuffer; +import com.simibubi.create.foundation.utility.Iterate; import net.minecraft.block.BlockState; import net.minecraft.client.renderer.IRenderTypeBuffer; diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/gauge/GaugeTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/relays/gauge/GaugeTileEntity.java index ac4e4664a..1cdec6749 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/gauge/GaugeTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/gauge/GaugeTileEntity.java @@ -1,13 +1,14 @@ package com.simibubi.create.content.contraptions.relays.gauge; +import java.util.List; + import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.content.contraptions.goggles.IHaveGoggleInformation; import com.simibubi.create.foundation.utility.Lang; + import net.minecraft.nbt.CompoundNBT; import net.minecraft.tileentity.TileEntityType; -import java.util.List; - public class GaugeTileEntity extends KineticTileEntity implements IHaveGoggleInformation { public float dialTarget; diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/gearbox/GearboxInstance.java b/src/main/java/com/simibubi/create/content/contraptions/relays/gearbox/GearboxInstance.java index 36e2a7b79..1d597f8ec 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/gearbox/GearboxInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/gearbox/GearboxInstance.java @@ -1,13 +1,17 @@ package com.simibubi.create.content.contraptions.relays.gearbox; +import java.util.EnumMap; +import java.util.Map; + import com.simibubi.create.AllBlockPartials; import com.simibubi.create.content.contraptions.base.KineticTileInstance; -import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer; +import com.simibubi.create.content.contraptions.base.RotatingData; import com.simibubi.create.foundation.render.backend.instancing.InstanceKey; import com.simibubi.create.foundation.render.backend.instancing.InstancedModel; import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderRegistry; -import com.simibubi.create.content.contraptions.base.RotatingData; +import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer; import com.simibubi.create.foundation.utility.Iterate; + import net.minecraft.state.properties.BlockStateProperties; import net.minecraft.tileentity.TileEntityType; import net.minecraft.util.Direction; @@ -16,12 +20,9 @@ import net.minecraft.world.LightType; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.fml.DistExecutor; -import java.util.EnumMap; -import java.util.Map; - public class GearboxInstance extends KineticTileInstance { public static void register(TileEntityType type) { - DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> + DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> InstancedTileRenderRegistry.instance.register(type, GearboxInstance::new)); } 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 c0f3599c9..bd74bcdf8 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 @@ -4,10 +4,10 @@ import com.mojang.blaze3d.matrix.MatrixStack; import com.simibubi.create.AllBlockPartials; import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer; +import com.simibubi.create.foundation.render.SuperByteBuffer; import com.simibubi.create.foundation.render.backend.FastRenderDispatcher; import com.simibubi.create.foundation.utility.AnimationTickHolder; import com.simibubi.create.foundation.utility.Iterate; -import com.simibubi.create.foundation.render.SuperByteBuffer; import net.minecraft.client.renderer.IRenderTypeBuffer; import net.minecraft.client.renderer.RenderType; diff --git a/src/main/java/com/simibubi/create/content/curiosities/ChromaticCompoundColor.java b/src/main/java/com/simibubi/create/content/curiosities/ChromaticCompoundColor.java index 60ba0545c..9fbb2dfe3 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/ChromaticCompoundColor.java +++ b/src/main/java/com/simibubi/create/content/curiosities/ChromaticCompoundColor.java @@ -2,6 +2,7 @@ package com.simibubi.create.content.curiosities; import com.simibubi.create.foundation.utility.AnimationTickHolder; import com.simibubi.create.foundation.utility.ColorHelper; + import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.color.IItemColor; import net.minecraft.item.ItemStack; diff --git a/src/main/java/com/simibubi/create/content/curiosities/symmetry/SymmetryEffectPacket.java b/src/main/java/com/simibubi/create/content/curiosities/symmetry/SymmetryEffectPacket.java index 55b3c1138..df9ed6783 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/symmetry/SymmetryEffectPacket.java +++ b/src/main/java/com/simibubi/create/content/curiosities/symmetry/SymmetryEffectPacket.java @@ -42,7 +42,7 @@ public class SymmetryEffectPacket extends SimplePacketBase { } public void handle(Supplier ctx) { - ctx.get().enqueueWork(() -> DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> { + ctx.get().enqueueWork(() -> DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> { if (Minecraft.getInstance().player.getPositionVector().distanceTo(new Vec3d(mirror)) > 100) return; for (BlockPos to : positions) diff --git a/src/main/java/com/simibubi/create/content/curiosities/symmetry/SymmetryWandItem.java b/src/main/java/com/simibubi/create/content/curiosities/symmetry/SymmetryWandItem.java index da65a069d..6118eb8b9 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/symmetry/SymmetryWandItem.java +++ b/src/main/java/com/simibubi/create/content/curiosities/symmetry/SymmetryWandItem.java @@ -66,7 +66,7 @@ public class SymmetryWandItem extends Item { // Shift -> open GUI if (player.isSneaking()) { if (player.world.isRemote) { - DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> { + DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> { openWandGUI(wand, context.getHand()); }); player.getCooldownTracker() @@ -135,7 +135,7 @@ public class SymmetryWandItem extends Item { // Shift -> Open GUI if (playerIn.isSneaking()) { if (worldIn.isRemote) { - DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> { + DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> { openWandGUI(playerIn.getHeldItem(handIn), handIn); }); playerIn.getCooldownTracker() diff --git a/src/main/java/com/simibubi/create/content/curiosities/tools/ExtendoGripItem.java b/src/main/java/com/simibubi/create/content/curiosities/tools/ExtendoGripItem.java index dd9f57c99..4d01867c5 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/tools/ExtendoGripItem.java +++ b/src/main/java/com/simibubi/create/content/curiosities/tools/ExtendoGripItem.java @@ -1,11 +1,14 @@ package com.simibubi.create.content.curiosities.tools; +import java.util.UUID; + import com.google.common.collect.HashMultimap; import com.google.common.collect.Multimap; import com.simibubi.create.AllItems; import com.simibubi.create.foundation.advancement.AllTriggers; import com.simibubi.create.foundation.networking.AllPackets; import com.simibubi.create.foundation.utility.AnimationTickHolder; + import net.minecraft.client.Minecraft; import net.minecraft.client.entity.player.ClientPlayerEntity; import net.minecraft.entity.Entity; @@ -33,8 +36,6 @@ import net.minecraftforge.event.entity.player.PlayerInteractEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod.EventBusSubscriber; -import java.util.UUID; - @EventBusSubscriber public class ExtendoGripItem extends Item { diff --git a/src/main/java/com/simibubi/create/content/curiosities/tools/ExtendoGripItemRenderer.java b/src/main/java/com/simibubi/create/content/curiosities/tools/ExtendoGripItemRenderer.java index d37daa176..b665e4ae8 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/tools/ExtendoGripItemRenderer.java +++ b/src/main/java/com/simibubi/create/content/curiosities/tools/ExtendoGripItemRenderer.java @@ -6,6 +6,7 @@ import com.simibubi.create.foundation.block.render.CustomRenderedItemModelRender import com.simibubi.create.foundation.item.PartialItemModelRenderer; import com.simibubi.create.foundation.utility.AnimationTickHolder; import com.simibubi.create.foundation.utility.MatrixStacker; + import net.minecraft.client.renderer.IRenderTypeBuffer; import net.minecraft.client.renderer.model.ItemCameraTransforms.TransformType; import net.minecraft.item.ItemStack; diff --git a/src/main/java/com/simibubi/create/content/curiosities/tools/ExtendoGripRenderHandler.java b/src/main/java/com/simibubi/create/content/curiosities/tools/ExtendoGripRenderHandler.java index e671b05cb..1943ebf4d 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/tools/ExtendoGripRenderHandler.java +++ b/src/main/java/com/simibubi/create/content/curiosities/tools/ExtendoGripRenderHandler.java @@ -5,6 +5,7 @@ import com.simibubi.create.AllBlockPartials; import com.simibubi.create.AllItems; import com.simibubi.create.foundation.utility.AnimationTickHolder; import com.simibubi.create.foundation.utility.MatrixStacker; + import net.minecraft.client.Minecraft; import net.minecraft.client.entity.player.AbstractClientPlayerEntity; import net.minecraft.client.entity.player.ClientPlayerEntity; diff --git a/src/main/java/com/simibubi/create/content/curiosities/tools/SandPaperItemRenderer.java b/src/main/java/com/simibubi/create/content/curiosities/tools/SandPaperItemRenderer.java index 5be2fb467..303e4dc5b 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/tools/SandPaperItemRenderer.java +++ b/src/main/java/com/simibubi/create/content/curiosities/tools/SandPaperItemRenderer.java @@ -4,6 +4,7 @@ import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.systems.RenderSystem; import com.simibubi.create.foundation.block.render.CustomRenderedItemModel; import com.simibubi.create.foundation.utility.AnimationTickHolder; + import net.minecraft.client.Minecraft; import net.minecraft.client.entity.player.ClientPlayerEntity; import net.minecraft.client.renderer.IRenderTypeBuffer; diff --git a/src/main/java/com/simibubi/create/content/curiosities/zapper/ZapperBeamPacket.java b/src/main/java/com/simibubi/create/content/curiosities/zapper/ZapperBeamPacket.java index 3fc30e373..f3d63fb7d 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/zapper/ZapperBeamPacket.java +++ b/src/main/java/com/simibubi/create/content/curiosities/zapper/ZapperBeamPacket.java @@ -48,7 +48,7 @@ public class ZapperBeamPacket extends SimplePacketBase { } public void handle(Supplier context) { - context.get().enqueueWork(() -> DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> { + context.get().enqueueWork(() -> DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> { if (Minecraft.getInstance().player.getPositionVector().distanceTo(start) > 100) return; ZapperRenderHandler.addBeam(new LaserBeam(start, target).followPlayer(self, hand == Hand.MAIN_HAND)); diff --git a/src/main/java/com/simibubi/create/content/curiosities/zapper/ZapperItem.java b/src/main/java/com/simibubi/create/content/curiosities/zapper/ZapperItem.java index 44303bf94..2c01c419a 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/zapper/ZapperItem.java +++ b/src/main/java/com/simibubi/create/content/curiosities/zapper/ZapperItem.java @@ -93,7 +93,7 @@ public abstract class ZapperItem extends Item { if (context.getPlayer() != null && context.getPlayer() .isSneaking()) { if (context.getWorld().isRemote) { - DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> { + DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> { openHandgunGUI(context.getItem(), context.getHand() == Hand.OFF_HAND); }); applyCooldown(context.getPlayer(), context.getItem(), false); @@ -111,7 +111,7 @@ public abstract class ZapperItem extends Item { // Shift -> Open GUI if (player.isSneaking()) { if (world.isRemote) { - DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> { + DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> { openHandgunGUI(item, hand == Hand.OFF_HAND); }); applyCooldown(player, item, false); diff --git a/src/main/java/com/simibubi/create/content/curiosities/zapper/ZapperRenderHandler.java b/src/main/java/com/simibubi/create/content/curiosities/zapper/ZapperRenderHandler.java index 2c8d579ce..05ce12201 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/zapper/ZapperRenderHandler.java +++ b/src/main/java/com/simibubi/create/content/curiosities/zapper/ZapperRenderHandler.java @@ -1,9 +1,15 @@ package com.simibubi.create.content.curiosities.zapper; +import java.util.LinkedList; +import java.util.List; +import java.util.Random; +import java.util.function.Supplier; + import com.mojang.blaze3d.matrix.MatrixStack; import com.simibubi.create.AllSoundEvents; import com.simibubi.create.CreateClient; import com.simibubi.create.foundation.utility.AnimationTickHolder; + import net.minecraft.client.Minecraft; import net.minecraft.client.entity.player.AbstractClientPlayerEntity; import net.minecraft.client.entity.player.ClientPlayerEntity; @@ -25,11 +31,6 @@ import net.minecraftforge.client.event.RenderHandEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod.EventBusSubscriber; -import java.util.LinkedList; -import java.util.List; -import java.util.Random; -import java.util.function.Supplier; - @EventBusSubscriber(value = Dist.CLIENT) public class ZapperRenderHandler { diff --git a/src/main/java/com/simibubi/create/content/curiosities/zapper/blockzapper/BlockzapperItemRenderer.java b/src/main/java/com/simibubi/create/content/curiosities/zapper/blockzapper/BlockzapperItemRenderer.java index 6d8eaf1e7..6d3c512b1 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/zapper/blockzapper/BlockzapperItemRenderer.java +++ b/src/main/java/com/simibubi/create/content/curiosities/zapper/blockzapper/BlockzapperItemRenderer.java @@ -1,11 +1,20 @@ package com.simibubi.create.content.curiosities.zapper.blockzapper; +import static com.simibubi.create.content.curiosities.zapper.blockzapper.BlockzapperItem.Components.Accelerator; +import static com.simibubi.create.content.curiosities.zapper.blockzapper.BlockzapperItem.Components.Amplifier; +import static com.simibubi.create.content.curiosities.zapper.blockzapper.BlockzapperItem.Components.Body; +import static com.simibubi.create.content.curiosities.zapper.blockzapper.BlockzapperItem.Components.Retriever; +import static com.simibubi.create.content.curiosities.zapper.blockzapper.BlockzapperItem.Components.Scope; +import static java.lang.Math.max; +import static net.minecraft.util.math.MathHelper.clamp; + import com.mojang.blaze3d.matrix.MatrixStack; import com.simibubi.create.content.curiosities.zapper.ZapperItemRenderer; import com.simibubi.create.content.curiosities.zapper.blockzapper.BlockzapperItem.ComponentTier; import com.simibubi.create.content.curiosities.zapper.blockzapper.BlockzapperItem.Components; import com.simibubi.create.foundation.item.PartialItemModelRenderer; import com.simibubi.create.foundation.utility.AnimationTickHolder; + import net.minecraft.client.Minecraft; import net.minecraft.client.entity.player.ClientPlayerEntity; import net.minecraft.client.renderer.IRenderTypeBuffer; @@ -16,10 +25,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.HandSide; import net.minecraft.util.math.MathHelper; -import static com.simibubi.create.content.curiosities.zapper.blockzapper.BlockzapperItem.Components.*; -import static java.lang.Math.max; -import static net.minecraft.util.math.MathHelper.clamp; - public class BlockzapperItemRenderer extends ZapperItemRenderer { @Override diff --git a/src/main/java/com/simibubi/create/content/curiosities/zapper/terrainzapper/WorldshaperItemRenderer.java b/src/main/java/com/simibubi/create/content/curiosities/zapper/terrainzapper/WorldshaperItemRenderer.java index 20735765b..9c6ffb04d 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/zapper/terrainzapper/WorldshaperItemRenderer.java +++ b/src/main/java/com/simibubi/create/content/curiosities/zapper/terrainzapper/WorldshaperItemRenderer.java @@ -1,9 +1,13 @@ package com.simibubi.create.content.curiosities.zapper.terrainzapper; +import static java.lang.Math.max; +import static net.minecraft.util.math.MathHelper.clamp; + import com.mojang.blaze3d.matrix.MatrixStack; import com.simibubi.create.content.curiosities.zapper.ZapperItemRenderer; import com.simibubi.create.foundation.item.PartialItemModelRenderer; import com.simibubi.create.foundation.utility.AnimationTickHolder; + import net.minecraft.client.Minecraft; import net.minecraft.client.entity.player.ClientPlayerEntity; import net.minecraft.client.renderer.IRenderTypeBuffer; @@ -13,9 +17,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.HandSide; import net.minecraft.util.math.MathHelper; -import static java.lang.Math.max; -import static net.minecraft.util.math.MathHelper.clamp; - public class WorldshaperItemRenderer extends ZapperItemRenderer { @Override 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 3eaacfa51..8751cf110 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 @@ -3,11 +3,11 @@ package com.simibubi.create.content.logistics.block.belts.tunnel; 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.tileEntity.renderer.SmartTileEntityRenderer; import com.simibubi.create.foundation.utility.AngleHelper; import com.simibubi.create.foundation.utility.Iterate; import com.simibubi.create.foundation.utility.MatrixStacker; -import com.simibubi.create.foundation.render.SuperByteBuffer; import com.simibubi.create.foundation.utility.VecHelper; import net.minecraft.client.renderer.IRenderTypeBuffer; diff --git a/src/main/java/com/simibubi/create/content/logistics/block/diodes/AdjustableRepeaterRenderer.java b/src/main/java/com/simibubi/create/content/logistics/block/diodes/AdjustableRepeaterRenderer.java index 17053fed5..84e7bb3fd 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/diodes/AdjustableRepeaterRenderer.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/diodes/AdjustableRepeaterRenderer.java @@ -1,9 +1,9 @@ package com.simibubi.create.content.logistics.block.diodes; import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.foundation.render.SuperByteBuffer; import com.simibubi.create.foundation.tileEntity.renderer.ColoredOverlayTileEntityRenderer; import com.simibubi.create.foundation.utility.ColorHelper; -import com.simibubi.create.foundation.render.SuperByteBuffer; import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; 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 1ee5a257d..c8cb12583 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 @@ -3,10 +3,10 @@ package com.simibubi.create.content.logistics.block.funnel; 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.tileEntity.renderer.SmartTileEntityRenderer; import com.simibubi.create.foundation.utility.AngleHelper; import com.simibubi.create.foundation.utility.MatrixStacker; -import com.simibubi.create.foundation.render.SuperByteBuffer; import com.simibubi.create.foundation.utility.VecHelper; import net.minecraft.block.BlockState; diff --git a/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmInstance.java b/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmInstance.java index 53a8853d5..c4600dcf2 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmInstance.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmInstance.java @@ -2,18 +2,19 @@ package com.simibubi.create.content.logistics.block.mechanicalArm; import com.simibubi.create.AllBlockPartials; import com.simibubi.create.content.contraptions.base.KineticTileEntity; +import com.simibubi.create.content.contraptions.base.RotatingData; import com.simibubi.create.content.contraptions.base.SingleRotatingInstance; -import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer; import com.simibubi.create.foundation.render.backend.instancing.InstancedModel; import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderRegistry; -import com.simibubi.create.content.contraptions.base.RotatingData; +import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer; + import net.minecraft.tileentity.TileEntityType; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.fml.DistExecutor; public class ArmInstance extends SingleRotatingInstance { public static void register(TileEntityType type) { - DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> + DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> InstancedTileRenderRegistry.instance.register(type, ArmInstance::new)); } diff --git a/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmItem.java b/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmItem.java index eff83fadb..c032ed3dc 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmItem.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmItem.java @@ -33,7 +33,7 @@ public class ArmItem extends BlockItem { protected boolean onBlockPlaced(BlockPos pos, World world, PlayerEntity p_195943_3_, ItemStack p_195943_4_, BlockState p_195943_5_) { if (world.isRemote) - DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> ArmInteractionPointHandler.flushSettings(pos)); + DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> ArmInteractionPointHandler.flushSettings(pos)); return super.onBlockPlaced(pos, world, p_195943_3_, p_195943_4_, p_195943_5_); } diff --git a/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmRenderer.java b/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmRenderer.java index 6d005cebc..8e9a47e8c 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmRenderer.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmRenderer.java @@ -11,6 +11,7 @@ import com.simibubi.create.foundation.utility.AnimationTickHolder; import com.simibubi.create.foundation.utility.ColorHelper; import com.simibubi.create.foundation.utility.Iterate; import com.simibubi.create.foundation.utility.MatrixStacker; + import net.minecraft.block.BlockState; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.IRenderTypeBuffer; diff --git a/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmTileEntity.java b/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmTileEntity.java index ad46d9652..f7f6fb803 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmTileEntity.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmTileEntity.java @@ -1,5 +1,10 @@ package com.simibubi.create.content.logistics.block.mechanicalArm; +import java.util.ArrayList; +import java.util.List; + +import javax.annotation.Nullable; + import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.content.logistics.block.mechanicalArm.ArmInteractionPoint.Jukebox; import com.simibubi.create.content.logistics.block.mechanicalArm.ArmInteractionPoint.Mode; @@ -16,6 +21,7 @@ import com.simibubi.create.foundation.utility.AngleHelper; import com.simibubi.create.foundation.utility.Lang; import com.simibubi.create.foundation.utility.NBTHelper; import com.simibubi.create.foundation.utility.VecHelper; + import net.minecraft.block.BlockState; import net.minecraft.block.JukeboxBlock; import net.minecraft.item.ItemStack; @@ -31,10 +37,6 @@ import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.common.util.Constants.NBT; -import javax.annotation.Nullable; -import java.util.ArrayList; -import java.util.List; - public class ArmTileEntity extends KineticTileEntity { // Server diff --git a/src/main/java/com/simibubi/create/content/logistics/block/redstone/AnalogLeverRenderer.java b/src/main/java/com/simibubi/create/content/logistics/block/redstone/AnalogLeverRenderer.java index 72a11a15a..7ed7acc93 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/redstone/AnalogLeverRenderer.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/redstone/AnalogLeverRenderer.java @@ -3,10 +3,10 @@ package com.simibubi.create.content.logistics.block.redstone; 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.tileEntity.renderer.SafeTileEntityRenderer; import com.simibubi.create.foundation.utility.AngleHelper; import com.simibubi.create.foundation.utility.ColorHelper; -import com.simibubi.create.foundation.render.SuperByteBuffer; import net.minecraft.block.BlockState; import net.minecraft.client.renderer.IRenderTypeBuffer; diff --git a/src/main/java/com/simibubi/create/content/logistics/block/redstone/RedstoneContactBlock.java b/src/main/java/com/simibubi/create/content/logistics/block/redstone/RedstoneContactBlock.java index a467c4cd4..8db988bfa 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/redstone/RedstoneContactBlock.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/redstone/RedstoneContactBlock.java @@ -1,7 +1,13 @@ package com.simibubi.create.content.logistics.block.redstone; +import java.util.Random; + +import javax.annotation.Nullable; +import javax.annotation.ParametersAreNonnullByDefault; + import com.simibubi.create.AllBlocks; import com.simibubi.create.foundation.block.ProperDirectionalBlock; + import mcp.MethodsReturnNonnullByDefault; import net.minecraft.block.Block; import net.minecraft.block.BlockState; @@ -16,10 +22,6 @@ import net.minecraft.world.IWorld; import net.minecraft.world.World; import net.minecraft.world.server.ServerWorld; -import javax.annotation.Nullable; -import javax.annotation.ParametersAreNonnullByDefault; -import java.util.Random; - @ParametersAreNonnullByDefault @MethodsReturnNonnullByDefault public class RedstoneContactBlock extends ProperDirectionalBlock { diff --git a/src/main/java/com/simibubi/create/content/logistics/block/redstone/RedstoneLinkBlock.java b/src/main/java/com/simibubi/create/content/logistics/block/redstone/RedstoneLinkBlock.java index 3fb18767d..97c224c18 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/redstone/RedstoneLinkBlock.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/redstone/RedstoneLinkBlock.java @@ -5,6 +5,7 @@ import com.simibubi.create.AllTileEntities; import com.simibubi.create.foundation.block.ITE; import com.simibubi.create.foundation.block.ProperDirectionalBlock; import com.simibubi.create.foundation.utility.Iterate; + import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.entity.player.PlayerEntity; diff --git a/src/main/java/com/simibubi/create/content/logistics/block/redstone/StockpileSwitchBlock.java b/src/main/java/com/simibubi/create/content/logistics/block/redstone/StockpileSwitchBlock.java index 8f8ec7db3..6055c1aac 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/redstone/StockpileSwitchBlock.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/redstone/StockpileSwitchBlock.java @@ -100,7 +100,7 @@ public class StockpileSwitchBlock extends HorizontalBlock implements ITE () -> withTileEntityDo(worldIn, pos, te -> this.displayScreen(te, player))); return ActionResultType.SUCCESS; } diff --git a/src/main/java/com/simibubi/create/content/logistics/item/filter/attribute/astralsorcery/AstralSorceryAmuletAttribute.java b/src/main/java/com/simibubi/create/content/logistics/item/filter/attribute/astralsorcery/AstralSorceryAmuletAttribute.java index f3f244d59..85b40b8d2 100644 --- a/src/main/java/com/simibubi/create/content/logistics/item/filter/attribute/astralsorcery/AstralSorceryAmuletAttribute.java +++ b/src/main/java/com/simibubi/create/content/logistics/item/filter/attribute/astralsorcery/AstralSorceryAmuletAttribute.java @@ -52,7 +52,6 @@ public class AstralSorceryAmuletAttribute implements ItemAttribute { @Override public Object[] getTranslationParameters() { - ResourceLocation traitResource = new ResourceLocation(enchName); String something = ""; Enchantment enchant = ForgeRegistries.ENCHANTMENTS.getValue(ResourceLocation.tryCreate(enchName)); diff --git a/src/main/java/com/simibubi/create/content/palettes/PaletteBlockPartial.java b/src/main/java/com/simibubi/create/content/palettes/PaletteBlockPartial.java index 8aa9546ca..7f2a837da 100644 --- a/src/main/java/com/simibubi/create/content/palettes/PaletteBlockPartial.java +++ b/src/main/java/com/simibubi/create/content/palettes/PaletteBlockPartial.java @@ -10,6 +10,7 @@ import com.tterrag.registrate.builders.ItemBuilder; import com.tterrag.registrate.providers.DataGenContext; import com.tterrag.registrate.providers.RegistrateBlockstateProvider; import com.tterrag.registrate.providers.RegistrateRecipeProvider; +import com.tterrag.registrate.providers.loot.RegistrateBlockLootTables; import com.tterrag.registrate.util.DataIngredient; import com.tterrag.registrate.util.nullness.NonnullType; @@ -185,7 +186,7 @@ public abstract class PaletteBlockPartial { protected BlockBuilder transformBlock( BlockBuilder builder, String variantName, PaletteBlockPatterns pattern) { - builder.loot((lt, block) -> lt.registerLootTable(block, lt.droppingSlab(block))); + builder.loot((lt, block) -> lt.registerLootTable(block, RegistrateBlockLootTables.droppingSlab(block))); return super.transformBlock(builder, variantName, pattern); } diff --git a/src/main/java/com/simibubi/create/content/schematics/SchematicProcessor.java b/src/main/java/com/simibubi/create/content/schematics/SchematicProcessor.java index 985338d5d..e9d13b67c 100644 --- a/src/main/java/com/simibubi/create/content/schematics/SchematicProcessor.java +++ b/src/main/java/com/simibubi/create/content/schematics/SchematicProcessor.java @@ -1,5 +1,9 @@ package com.simibubi.create.content.schematics; +import java.util.Optional; + +import javax.annotation.Nullable; + import com.mojang.datafixers.Dynamic; import com.mojang.datafixers.types.DynamicOps; import com.simibubi.create.foundation.utility.NBTProcessors; @@ -16,9 +20,6 @@ import net.minecraft.world.gen.feature.template.PlacementSettings; import net.minecraft.world.gen.feature.template.StructureProcessor; import net.minecraft.world.gen.feature.template.Template; -import javax.annotation.Nullable; -import java.util.Optional; - public class SchematicProcessor extends StructureProcessor { public static final SchematicProcessor INSTANCE = new SchematicProcessor(); diff --git a/src/main/java/com/simibubi/create/content/schematics/block/SchematicannonRenderer.java b/src/main/java/com/simibubi/create/content/schematics/block/SchematicannonRenderer.java index 0fe84ba4a..bf90d3f84 100644 --- a/src/main/java/com/simibubi/create/content/schematics/block/SchematicannonRenderer.java +++ b/src/main/java/com/simibubi/create/content/schematics/block/SchematicannonRenderer.java @@ -7,8 +7,8 @@ import com.mojang.blaze3d.vertex.IVertexBuilder; import com.simibubi.create.AllBlockPartials; import com.simibubi.create.content.schematics.block.LaunchedItem.ForBlockState; import com.simibubi.create.content.schematics.block.LaunchedItem.ForEntity; -import com.simibubi.create.foundation.tileEntity.renderer.SafeTileEntityRenderer; import com.simibubi.create.foundation.render.SuperByteBuffer; +import com.simibubi.create.foundation.tileEntity.renderer.SafeTileEntityRenderer; import net.minecraft.block.BlockState; import net.minecraft.client.Minecraft; diff --git a/src/main/java/com/simibubi/create/content/schematics/client/SchematicAndQuillHandler.java b/src/main/java/com/simibubi/create/content/schematics/client/SchematicAndQuillHandler.java index 6965c9b97..d85b1a27b 100644 --- a/src/main/java/com/simibubi/create/content/schematics/client/SchematicAndQuillHandler.java +++ b/src/main/java/com/simibubi/create/content/schematics/client/SchematicAndQuillHandler.java @@ -1,13 +1,31 @@ package com.simibubi.create.content.schematics.client; -import com.simibubi.create.*; +import java.io.IOException; +import java.io.OutputStream; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.nio.file.StandardOpenOption; + +import org.apache.commons.io.IOUtils; + +import com.simibubi.create.AllItems; +import com.simibubi.create.AllKeys; +import com.simibubi.create.AllSpecialTextures; +import com.simibubi.create.Create; +import com.simibubi.create.CreateClient; import com.simibubi.create.content.schematics.ClientSchematicLoader; import com.simibubi.create.content.schematics.packet.InstantSchematicPacket; import com.simibubi.create.foundation.gui.ScreenOpener; import com.simibubi.create.foundation.networking.AllPackets; -import com.simibubi.create.foundation.utility.*; +import com.simibubi.create.foundation.utility.AnimationTickHolder; +import com.simibubi.create.foundation.utility.FilesHelper; +import com.simibubi.create.foundation.utility.Lang; +import com.simibubi.create.foundation.utility.RaycastHelper; import com.simibubi.create.foundation.utility.RaycastHelper.PredicateTraceResult; +import com.simibubi.create.foundation.utility.VecHelper; import com.simibubi.create.foundation.utility.outliner.Outliner; + import net.minecraft.block.Blocks; import net.minecraft.client.Minecraft; import net.minecraft.client.entity.player.ClientPlayerEntity; @@ -18,17 +36,15 @@ import net.minecraft.nbt.CompressedStreamTools; import net.minecraft.util.Direction; import net.minecraft.util.Direction.AxisDirection; import net.minecraft.util.Hand; -import net.minecraft.util.math.*; +import net.minecraft.util.math.AxisAlignedBB; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.BlockRayTraceResult; +import net.minecraft.util.math.MathHelper; +import net.minecraft.util.math.MutableBoundingBox; import net.minecraft.util.math.RayTraceResult.Type; +import net.minecraft.util.math.Vec3d; +import net.minecraft.util.math.Vec3i; import net.minecraft.world.gen.feature.template.Template; -import org.apache.commons.io.IOUtils; - -import java.io.IOException; -import java.io.OutputStream; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.nio.file.StandardOpenOption; public class SchematicAndQuillHandler { diff --git a/src/main/java/com/simibubi/create/content/schematics/client/SchematicHandler.java b/src/main/java/com/simibubi/create/content/schematics/client/SchematicHandler.java index 26505e742..74c6b9eac 100644 --- a/src/main/java/com/simibubi/create/content/schematics/client/SchematicHandler.java +++ b/src/main/java/com/simibubi/create/content/schematics/client/SchematicHandler.java @@ -1,5 +1,8 @@ package com.simibubi.create.content.schematics.client; +import java.util.List; +import java.util.Vector; + import com.google.common.collect.ImmutableList; import com.mojang.blaze3d.matrix.MatrixStack; import com.simibubi.create.AllBlocks; @@ -16,6 +19,7 @@ import com.simibubi.create.foundation.networking.AllPackets; import com.simibubi.create.foundation.renderState.SuperRenderTypeBuffer; import com.simibubi.create.foundation.utility.AnimationTickHolder; import com.simibubi.create.foundation.utility.outliner.AABBOutline; + import net.minecraft.client.Minecraft; import net.minecraft.client.entity.player.ClientPlayerEntity; import net.minecraft.client.renderer.IRenderTypeBuffer; @@ -32,9 +36,6 @@ import net.minecraft.world.World; import net.minecraft.world.gen.feature.template.PlacementSettings; import net.minecraft.world.gen.feature.template.Template; -import java.util.List; -import java.util.Vector; - public class SchematicHandler { private String displayedSchematic; diff --git a/src/main/java/com/simibubi/create/content/schematics/client/SchematicRenderer.java b/src/main/java/com/simibubi/create/content/schematics/client/SchematicRenderer.java index 2f9159897..c7c346182 100644 --- a/src/main/java/com/simibubi/create/content/schematics/client/SchematicRenderer.java +++ b/src/main/java/com/simibubi/create/content/schematics/client/SchematicRenderer.java @@ -11,10 +11,10 @@ import org.lwjgl.opengl.GL11; import com.mojang.blaze3d.matrix.MatrixStack; import com.simibubi.create.content.schematics.SchematicWorld; -import com.simibubi.create.foundation.renderState.SuperRenderTypeBuffer; -import com.simibubi.create.foundation.utility.MatrixStacker; import com.simibubi.create.foundation.render.SuperByteBuffer; import com.simibubi.create.foundation.render.TileEntityRenderHelper; +import com.simibubi.create.foundation.renderState.SuperRenderTypeBuffer; +import com.simibubi.create.foundation.utility.MatrixStacker; import net.minecraft.block.BlockState; import net.minecraft.client.Minecraft; diff --git a/src/main/java/com/simibubi/create/content/schematics/client/SchematicTransformation.java b/src/main/java/com/simibubi/create/content/schematics/client/SchematicTransformation.java index 9fad2795a..9e1cb9485 100644 --- a/src/main/java/com/simibubi/create/content/schematics/client/SchematicTransformation.java +++ b/src/main/java/com/simibubi/create/content/schematics/client/SchematicTransformation.java @@ -1,11 +1,14 @@ package com.simibubi.create.content.schematics.client; +import static java.lang.Math.abs; + import com.mojang.blaze3d.matrix.MatrixStack; import com.simibubi.create.foundation.gui.widgets.InterpolatedChasingAngle; import com.simibubi.create.foundation.gui.widgets.InterpolatedChasingValue; import com.simibubi.create.foundation.utility.AnimationTickHolder; import com.simibubi.create.foundation.utility.MatrixStacker; import com.simibubi.create.foundation.utility.VecHelper; + import net.minecraft.util.Direction.Axis; import net.minecraft.util.Mirror; import net.minecraft.util.Rotation; @@ -14,8 +17,6 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Vec3d; import net.minecraft.world.gen.feature.template.PlacementSettings; -import static java.lang.Math.abs; - public class SchematicTransformation { private InterpolatedChasingValue x, y, z, scaleFrontBack, scaleLeftRight; diff --git a/src/main/java/com/simibubi/create/content/schematics/client/tools/DeployTool.java b/src/main/java/com/simibubi/create/content/schematics/client/tools/DeployTool.java index 97624af02..ea5de6a18 100644 --- a/src/main/java/com/simibubi/create/content/schematics/client/tools/DeployTool.java +++ b/src/main/java/com/simibubi/create/content/schematics/client/tools/DeployTool.java @@ -7,6 +7,7 @@ import com.simibubi.create.foundation.renderState.SuperRenderTypeBuffer; import com.simibubi.create.foundation.utility.AnimationTickHolder; import com.simibubi.create.foundation.utility.MatrixStacker; import com.simibubi.create.foundation.utility.outliner.AABBOutline; + import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTUtil; import net.minecraft.util.math.AxisAlignedBB; diff --git a/src/main/java/com/simibubi/create/content/schematics/client/tools/SchematicToolBase.java b/src/main/java/com/simibubi/create/content/schematics/client/tools/SchematicToolBase.java index 9c795cc9c..6a7863831 100644 --- a/src/main/java/com/simibubi/create/content/schematics/client/tools/SchematicToolBase.java +++ b/src/main/java/com/simibubi/create/content/schematics/client/tools/SchematicToolBase.java @@ -1,5 +1,8 @@ package com.simibubi.create.content.schematics.client.tools; +import java.util.Arrays; +import java.util.List; + import com.mojang.blaze3d.matrix.MatrixStack; import com.simibubi.create.AllKeys; import com.simibubi.create.AllSpecialTextures; @@ -12,6 +15,7 @@ import com.simibubi.create.foundation.utility.RaycastHelper; import com.simibubi.create.foundation.utility.RaycastHelper.PredicateTraceResult; import com.simibubi.create.foundation.utility.VecHelper; import com.simibubi.create.foundation.utility.outliner.AABBOutline; + import net.minecraft.client.Minecraft; import net.minecraft.client.entity.player.ClientPlayerEntity; import net.minecraft.client.renderer.IRenderTypeBuffer; @@ -22,9 +26,6 @@ import net.minecraft.util.math.BlockRayTraceResult; import net.minecraft.util.math.RayTraceResult.Type; import net.minecraft.util.math.Vec3d; -import java.util.Arrays; -import java.util.List; - public abstract class SchematicToolBase implements ISchematicTool { protected SchematicHandler schematicHandler; diff --git a/src/main/java/com/simibubi/create/content/schematics/item/SchematicItem.java b/src/main/java/com/simibubi/create/content/schematics/item/SchematicItem.java index d689372ec..ddc676657 100644 --- a/src/main/java/com/simibubi/create/content/schematics/item/SchematicItem.java +++ b/src/main/java/com/simibubi/create/content/schematics/item/SchematicItem.java @@ -165,7 +165,7 @@ public class SchematicItem extends Item { if (!player.getHeldItem(hand) .hasTag()) return false; - DistExecutor.runWhenOn(Dist.CLIENT, () -> this::displayBlueprintScreen); + DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> this::displayBlueprintScreen); return true; } diff --git a/src/main/java/com/simibubi/create/events/ClientEvents.java b/src/main/java/com/simibubi/create/events/ClientEvents.java index fdc1fbd34..1407b4d1e 100644 --- a/src/main/java/com/simibubi/create/events/ClientEvents.java +++ b/src/main/java/com/simibubi/create/events/ClientEvents.java @@ -1,5 +1,8 @@ package com.simibubi.create.events; +import java.util.ArrayList; +import java.util.List; + import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.systems.RenderSystem; import com.simibubi.create.AllFluids; @@ -8,6 +11,7 @@ import com.simibubi.create.CreateClient; import com.simibubi.create.content.contraptions.KineticDebugger; import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionHandler; import com.simibubi.create.content.contraptions.components.structureMovement.chassis.ChassisRangeDisplay; +import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionRenderDispatcher; import com.simibubi.create.content.contraptions.components.structureMovement.train.CouplingHandlerClient; import com.simibubi.create.content.contraptions.components.structureMovement.train.CouplingPhysics; import com.simibubi.create.content.contraptions.components.structureMovement.train.CouplingRenderer; @@ -27,7 +31,6 @@ import com.simibubi.create.foundation.networking.AllPackets; import com.simibubi.create.foundation.networking.LeftClickPacket; import com.simibubi.create.foundation.render.backend.FastRenderDispatcher; import com.simibubi.create.foundation.render.backend.RenderWork; -import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionRenderDispatcher; import com.simibubi.create.foundation.renderState.SuperRenderTypeBuffer; import com.simibubi.create.foundation.tileEntity.behaviour.edgeInteraction.EdgeInteractionRenderer; import com.simibubi.create.foundation.tileEntity.behaviour.filtering.FilteringRenderer; @@ -36,6 +39,7 @@ import com.simibubi.create.foundation.tileEntity.behaviour.scrollvalue.ScrollVal import com.simibubi.create.foundation.utility.AnimationTickHolder; import com.simibubi.create.foundation.utility.ServerSpeedProvider; import com.simibubi.create.foundation.utility.placement.PlacementHelpers; + import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.ActiveRenderInfo; import net.minecraft.client.renderer.IRenderTypeBuffer; @@ -62,9 +66,6 @@ import net.minecraftforge.event.world.WorldEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod.EventBusSubscriber; -import java.util.ArrayList; -import java.util.List; - @EventBusSubscriber(value = Dist.CLIENT) public class ClientEvents { diff --git a/src/main/java/com/simibubi/create/foundation/block/ProperDirectionalBlock.java b/src/main/java/com/simibubi/create/foundation/block/ProperDirectionalBlock.java index e84a1b9e5..db0217340 100644 --- a/src/main/java/com/simibubi/create/foundation/block/ProperDirectionalBlock.java +++ b/src/main/java/com/simibubi/create/foundation/block/ProperDirectionalBlock.java @@ -2,6 +2,7 @@ package com.simibubi.create.foundation.block; import com.simibubi.create.content.contraptions.wrench.IWrenchable; import com.simibubi.create.foundation.utility.DirectionHelper; + import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.block.DirectionalBlock; 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 d61be2834..657535b79 100644 --- a/src/main/java/com/simibubi/create/foundation/command/AllCommands.java +++ b/src/main/java/com/simibubi/create/foundation/command/AllCommands.java @@ -1,15 +1,16 @@ package com.simibubi.create.foundation.command; +import java.util.Collections; +import java.util.function.Predicate; + import com.mojang.brigadier.CommandDispatcher; import com.mojang.brigadier.tree.CommandNode; import com.mojang.brigadier.tree.LiteralCommandNode; + import net.minecraft.command.CommandSource; import net.minecraft.command.Commands; import net.minecraft.entity.player.PlayerEntity; -import java.util.Collections; -import java.util.function.Predicate; - public class AllCommands { public static Predicate sourceIsPlayer = (cs) -> cs.getEntity() instanceof PlayerEntity; diff --git a/src/main/java/com/simibubi/create/foundation/command/ClearBufferCacheCommand.java b/src/main/java/com/simibubi/create/foundation/command/ClearBufferCacheCommand.java index 7d9a6cb74..d3c5a8962 100644 --- a/src/main/java/com/simibubi/create/foundation/command/ClearBufferCacheCommand.java +++ b/src/main/java/com/simibubi/create/foundation/command/ClearBufferCacheCommand.java @@ -14,7 +14,7 @@ public class ClearBufferCacheCommand { static ArgumentBuilder register() { return Commands.literal("clearRenderBuffers").requires(cs -> cs.hasPermissionLevel(0)).executes(ctx -> { - DistExecutor.runWhenOn(Dist.CLIENT, () -> ClearBufferCacheCommand::execute); + DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> ClearBufferCacheCommand::execute); ctx.getSource().sendFeedback(new StringTextComponent("Cleared rendering buffers."), true); return 1; }); diff --git a/src/main/java/com/simibubi/create/foundation/command/ConfigureConfigPacket.java b/src/main/java/com/simibubi/create/foundation/command/ConfigureConfigPacket.java index b6fa8ca1a..a8d174725 100644 --- a/src/main/java/com/simibubi/create/foundation/command/ConfigureConfigPacket.java +++ b/src/main/java/com/simibubi/create/foundation/command/ConfigureConfigPacket.java @@ -3,13 +3,13 @@ package com.simibubi.create.foundation.command; import java.util.function.Consumer; import java.util.function.Supplier; -import com.simibubi.create.foundation.render.backend.FastRenderDispatcher; import org.apache.logging.log4j.LogManager; import com.simibubi.create.content.contraptions.goggles.GoggleConfigScreen; import com.simibubi.create.foundation.config.AllConfigs; import com.simibubi.create.foundation.gui.ScreenOpener; import com.simibubi.create.foundation.networking.SimplePacketBase; +import com.simibubi.create.foundation.render.backend.FastRenderDispatcher; import net.minecraft.client.Minecraft; import net.minecraft.network.PacketBuffer; @@ -43,7 +43,7 @@ public class ConfigureConfigPacket extends SimplePacketBase { @Override public void handle(Supplier ctx) { ctx.get() - .enqueueWork(() -> DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> { + .enqueueWork(() -> DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> { try { Actions.valueOf(option) .performAction(value); diff --git a/src/main/java/com/simibubi/create/foundation/command/HighlightCommand.java b/src/main/java/com/simibubi/create/foundation/command/HighlightCommand.java index 16a0e1528..f017c1b19 100644 --- a/src/main/java/com/simibubi/create/foundation/command/HighlightCommand.java +++ b/src/main/java/com/simibubi/create/foundation/command/HighlightCommand.java @@ -1,10 +1,13 @@ package com.simibubi.create.foundation.command; +import java.util.Collection; + import com.mojang.brigadier.Command; import com.mojang.brigadier.builder.ArgumentBuilder; import com.simibubi.create.content.contraptions.components.structureMovement.AssemblyException; import com.simibubi.create.content.contraptions.components.structureMovement.IDisplayAssemblyExceptions; import com.simibubi.create.foundation.networking.AllPackets; + import net.minecraft.command.CommandSource; import net.minecraft.command.Commands; import net.minecraft.command.arguments.BlockPosArgument; @@ -12,13 +15,15 @@ import net.minecraft.command.arguments.EntityArgument; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.ServerPlayerEntity; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.*; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.BlockRayTraceResult; +import net.minecraft.util.math.RayTraceContext; +import net.minecraft.util.math.RayTraceResult; +import net.minecraft.util.math.Vec3d; import net.minecraft.util.text.StringTextComponent; import net.minecraft.world.World; import net.minecraftforge.fml.network.PacketDistributor; -import java.util.Collection; - public class HighlightCommand { public static ArgumentBuilder register() { diff --git a/src/main/java/com/simibubi/create/foundation/command/HighlightPacket.java b/src/main/java/com/simibubi/create/foundation/command/HighlightPacket.java index 7b4b10a4c..fe7cf6f0f 100644 --- a/src/main/java/com/simibubi/create/foundation/command/HighlightPacket.java +++ b/src/main/java/com/simibubi/create/foundation/command/HighlightPacket.java @@ -1,8 +1,11 @@ package com.simibubi.create.foundation.command; +import java.util.function.Supplier; + import com.simibubi.create.AllSpecialTextures; import com.simibubi.create.CreateClient; import com.simibubi.create.foundation.networking.SimplePacketBase; + import net.minecraft.client.Minecraft; import net.minecraft.network.PacketBuffer; import net.minecraft.util.math.BlockPos; @@ -12,8 +15,6 @@ import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.fml.DistExecutor; import net.minecraftforge.fml.network.NetworkEvent; -import java.util.function.Supplier; - public class HighlightPacket extends SimplePacketBase { private final BlockPos pos; @@ -33,7 +34,7 @@ public class HighlightPacket extends SimplePacketBase { @Override public void handle(Supplier ctx) { - ctx.get().enqueueWork(() -> DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> { + ctx.get().enqueueWork(() -> DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> { performHighlight(pos); })); diff --git a/src/main/java/com/simibubi/create/foundation/command/OverlayConfigCommand.java b/src/main/java/com/simibubi/create/foundation/command/OverlayConfigCommand.java index 9497a7de6..850b910e5 100644 --- a/src/main/java/com/simibubi/create/foundation/command/OverlayConfigCommand.java +++ b/src/main/java/com/simibubi/create/foundation/command/OverlayConfigCommand.java @@ -18,9 +18,9 @@ public class OverlayConfigCommand { .requires(cs -> cs.hasPermissionLevel(0)) .then(Commands.literal("reset") .executes(ctx -> { - DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> ConfigureConfigPacket.Actions.overlayReset.performAction("")); + DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> ConfigureConfigPacket.Actions.overlayReset.performAction("")); - DistExecutor.runWhenOn(Dist.DEDICATED_SERVER, () -> () -> + DistExecutor.unsafeRunWhenOn(Dist.DEDICATED_SERVER, () -> () -> AllPackets.channel.send( PacketDistributor.PLAYER.with(() -> (ServerPlayerEntity) ctx.getSource().getEntity()), new ConfigureConfigPacket(ConfigureConfigPacket.Actions.overlayReset.name(), ""))); @@ -31,9 +31,9 @@ public class OverlayConfigCommand { }) ) .executes(ctx -> { - DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> ConfigureConfigPacket.Actions.overlayScreen.performAction("")); + DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> ConfigureConfigPacket.Actions.overlayScreen.performAction("")); - DistExecutor.runWhenOn(Dist.DEDICATED_SERVER, () -> () -> + DistExecutor.unsafeRunWhenOn(Dist.DEDICATED_SERVER, () -> () -> AllPackets.channel.send( PacketDistributor.PLAYER.with(() -> (ServerPlayerEntity) ctx.getSource().getEntity()), new ConfigureConfigPacket(ConfigureConfigPacket.Actions.overlayScreen.name(), ""))); diff --git a/src/main/java/com/simibubi/create/foundation/command/ToggleDebugCommand.java b/src/main/java/com/simibubi/create/foundation/command/ToggleDebugCommand.java index a6adfb9f7..918d3dc7c 100644 --- a/src/main/java/com/simibubi/create/foundation/command/ToggleDebugCommand.java +++ b/src/main/java/com/simibubi/create/foundation/command/ToggleDebugCommand.java @@ -4,6 +4,7 @@ import com.mojang.brigadier.Command; import com.mojang.brigadier.arguments.BoolArgumentType; import com.mojang.brigadier.builder.ArgumentBuilder; import com.simibubi.create.foundation.networking.AllPackets; + import net.minecraft.command.CommandSource; import net.minecraft.command.Commands; import net.minecraft.entity.player.ServerPlayerEntity; @@ -20,10 +21,10 @@ public class ToggleDebugCommand { .then(Commands.argument("value", BoolArgumentType.bool()) .executes(ctx -> { boolean value = BoolArgumentType.getBool(ctx, "value"); - //DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> AllConfigs.CLIENT.rainbowDebug.set(value)); - DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> ConfigureConfigPacket.Actions.rainbowDebug.performAction(String.valueOf(value))); + //DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> AllConfigs.CLIENT.rainbowDebug.set(value)); + DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> ConfigureConfigPacket.Actions.rainbowDebug.performAction(String.valueOf(value))); - DistExecutor.runWhenOn(Dist.DEDICATED_SERVER, () -> () -> + DistExecutor.unsafeRunWhenOn(Dist.DEDICATED_SERVER, () -> () -> AllPackets.channel.send( PacketDistributor.PLAYER.with(() -> (ServerPlayerEntity) ctx.getSource().getEntity()), new ConfigureConfigPacket(ConfigureConfigPacket.Actions.rainbowDebug.name(), String.valueOf(value)))); diff --git a/src/main/java/com/simibubi/create/foundation/command/ToggleExperimentalRenderingCommand.java b/src/main/java/com/simibubi/create/foundation/command/ToggleExperimentalRenderingCommand.java index 82f5442df..25970ac7a 100644 --- a/src/main/java/com/simibubi/create/foundation/command/ToggleExperimentalRenderingCommand.java +++ b/src/main/java/com/simibubi/create/foundation/command/ToggleExperimentalRenderingCommand.java @@ -3,6 +3,7 @@ package com.simibubi.create.foundation.command; import com.mojang.brigadier.arguments.BoolArgumentType; import com.mojang.brigadier.builder.ArgumentBuilder; import com.simibubi.create.foundation.networking.AllPackets; + import net.minecraft.command.CommandSource; import net.minecraft.command.Commands; import net.minecraft.entity.player.ServerPlayerEntity; @@ -19,10 +20,10 @@ public class ToggleExperimentalRenderingCommand { .then(Commands.argument("value", BoolArgumentType.bool()) .executes(ctx -> { boolean value = BoolArgumentType.getBool(ctx, "value"); - //DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> AllConfigs.CLIENT.rainbowDebug.set(value)); - DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> ConfigureConfigPacket.Actions.experimentalRendering.performAction(String.valueOf(value))); + //DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> AllConfigs.CLIENT.rainbowDebug.set(value)); + DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> ConfigureConfigPacket.Actions.experimentalRendering.performAction(String.valueOf(value))); - DistExecutor.runWhenOn(Dist.DEDICATED_SERVER, () -> () -> + DistExecutor.unsafeRunWhenOn(Dist.DEDICATED_SERVER, () -> () -> AllPackets.channel.send( PacketDistributor.PLAYER.with(() -> (ServerPlayerEntity) ctx.getSource().getEntity()), new ConfigureConfigPacket(ConfigureConfigPacket.Actions.experimentalRendering.name(), String.valueOf(value)))); diff --git a/src/main/java/com/simibubi/create/foundation/config/CClient.java b/src/main/java/com/simibubi/create/foundation/config/CClient.java index b243f0e9f..fbd8c1d7a 100644 --- a/src/main/java/com/simibubi/create/foundation/config/CClient.java +++ b/src/main/java/com/simibubi/create/foundation/config/CClient.java @@ -1,7 +1,5 @@ package com.simibubi.create.foundation.config; -import com.simibubi.create.foundation.render.backend.Backend; - public class CClient extends ConfigBase { public ConfigGroup client = group(0, "client", diff --git a/src/main/java/com/simibubi/create/foundation/data/CreateRegistrate.java b/src/main/java/com/simibubi/create/foundation/data/CreateRegistrate.java index f278611be..e3e37f4f4 100644 --- a/src/main/java/com/simibubi/create/foundation/data/CreateRegistrate.java +++ b/src/main/java/com/simibubi/create/foundation/data/CreateRegistrate.java @@ -192,7 +192,7 @@ public class CreateRegistrate extends AbstractRegistrate { } protected static void onClient(Supplier toRun) { - DistExecutor.runWhenOn(Dist.CLIENT, toRun); + DistExecutor.unsafeRunWhenOn(Dist.CLIENT, toRun); } @OnlyIn(Dist.CLIENT) diff --git a/src/main/java/com/simibubi/create/foundation/data/recipe/WashingRecipeGen.java b/src/main/java/com/simibubi/create/foundation/data/recipe/WashingRecipeGen.java index 562de30bc..b76d491cf 100644 --- a/src/main/java/com/simibubi/create/foundation/data/recipe/WashingRecipeGen.java +++ b/src/main/java/com/simibubi/create/foundation/data/recipe/WashingRecipeGen.java @@ -1,11 +1,11 @@ package com.simibubi.create.foundation.data.recipe; import static com.simibubi.create.foundation.data.recipe.Mods.IE; +import static com.simibubi.create.foundation.data.recipe.Mods.INF; import static com.simibubi.create.foundation.data.recipe.Mods.MEK; import static com.simibubi.create.foundation.data.recipe.Mods.MW; import static com.simibubi.create.foundation.data.recipe.Mods.SM; import static com.simibubi.create.foundation.data.recipe.Mods.TH; -import static com.simibubi.create.foundation.data.recipe.Mods.INF; import java.util.function.Supplier; diff --git a/src/main/java/com/simibubi/create/foundation/gui/AllGuiTextures.java b/src/main/java/com/simibubi/create/foundation/gui/AllGuiTextures.java index c66f911bb..99fb3c017 100644 --- a/src/main/java/com/simibubi/create/foundation/gui/AllGuiTextures.java +++ b/src/main/java/com/simibubi/create/foundation/gui/AllGuiTextures.java @@ -1,6 +1,7 @@ package com.simibubi.create.foundation.gui; import com.simibubi.create.Create; + import net.minecraft.client.Minecraft; import net.minecraft.client.gui.AbstractGui; import net.minecraft.client.gui.screen.Screen; diff --git a/src/main/java/com/simibubi/create/foundation/gui/ScreenOpener.java b/src/main/java/com/simibubi/create/foundation/gui/ScreenOpener.java index 2f0a39636..bef5042de 100644 --- a/src/main/java/com/simibubi/create/foundation/gui/ScreenOpener.java +++ b/src/main/java/com/simibubi/create/foundation/gui/ScreenOpener.java @@ -12,7 +12,7 @@ public class ScreenOpener { private static Screen openedGuiNextTick; public static void tick() { - DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> { + DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> { if (openedGuiNextTick != null) { Minecraft.getInstance().displayGuiScreen(openedGuiNextTick); openedGuiNextTick = null; @@ -21,7 +21,7 @@ public class ScreenOpener { } public static void open(Screen gui) { - DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> { + DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> { openedGuiNextTick = gui; }); } diff --git a/src/main/java/com/simibubi/create/foundation/mixin/CancelTileEntityRenderMixin.java b/src/main/java/com/simibubi/create/foundation/mixin/CancelTileEntityRenderMixin.java index ba76ddb6d..fe8dfd965 100644 --- a/src/main/java/com/simibubi/create/foundation/mixin/CancelTileEntityRenderMixin.java +++ b/src/main/java/com/simibubi/create/foundation/mixin/CancelTileEntityRenderMixin.java @@ -1,17 +1,19 @@ package com.simibubi.create.foundation.mixin; -import com.simibubi.create.foundation.render.backend.FastRenderDispatcher; -import com.simibubi.create.foundation.render.backend.instancing.IInstanceRendered; -import net.minecraft.client.renderer.chunk.ChunkRenderDispatcher; -import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.api.distmarker.Dist; -import net.minecraftforge.api.distmarker.OnlyIn; +import java.util.List; + 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.CallbackInfoReturnable; -import java.util.List; +import com.simibubi.create.foundation.render.backend.FastRenderDispatcher; +import com.simibubi.create.foundation.render.backend.instancing.IInstanceRendered; + +import net.minecraft.client.renderer.chunk.ChunkRenderDispatcher; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; @OnlyIn(Dist.CLIENT) @Mixin(ChunkRenderDispatcher.CompiledChunk.class) diff --git a/src/main/java/com/simibubi/create/foundation/mixin/FogColorTrackerMixin.java b/src/main/java/com/simibubi/create/foundation/mixin/FogColorTrackerMixin.java index 599cd50c7..2fe7e98cf 100644 --- a/src/main/java/com/simibubi/create/foundation/mixin/FogColorTrackerMixin.java +++ b/src/main/java/com/simibubi/create/foundation/mixin/FogColorTrackerMixin.java @@ -1,13 +1,14 @@ package com.simibubi.create.foundation.mixin; -import com.mojang.blaze3d.platform.GlStateManager; -import com.simibubi.create.foundation.render.backend.gl.GlFog; import org.lwjgl.opengl.GL11; 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; +import com.mojang.blaze3d.platform.GlStateManager; +import com.simibubi.create.foundation.render.backend.gl.GlFog; + @Mixin(GlStateManager.class) public class FogColorTrackerMixin { diff --git a/src/main/java/com/simibubi/create/foundation/mixin/LightUpdateMixin.java b/src/main/java/com/simibubi/create/foundation/mixin/LightUpdateMixin.java index efc086daa..e2b97b148 100644 --- a/src/main/java/com/simibubi/create/foundation/mixin/LightUpdateMixin.java +++ b/src/main/java/com/simibubi/create/foundation/mixin/LightUpdateMixin.java @@ -1,7 +1,15 @@ package com.simibubi.create.foundation.mixin; +import java.util.Map; + +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; + import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionRenderDispatcher; import com.simibubi.create.foundation.render.backend.light.ILightListener; + import net.minecraft.client.multiplayer.ClientChunkProvider; import net.minecraft.util.math.SectionPos; import net.minecraft.world.ILightReader; @@ -10,12 +18,6 @@ import net.minecraft.world.chunk.AbstractChunkProvider; import net.minecraft.world.chunk.Chunk; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; -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; - -import java.util.Map; @OnlyIn(Dist.CLIENT) @Mixin(ClientChunkProvider.class) diff --git a/src/main/java/com/simibubi/create/foundation/mixin/OnRemoveTileMixin.java b/src/main/java/com/simibubi/create/foundation/mixin/OnRemoveTileMixin.java index 1e9e13139..355f9426a 100644 --- a/src/main/java/com/simibubi/create/foundation/mixin/OnRemoveTileMixin.java +++ b/src/main/java/com/simibubi/create/foundation/mixin/OnRemoveTileMixin.java @@ -1,11 +1,5 @@ package com.simibubi.create.foundation.mixin; -import com.simibubi.create.CreateClient; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import net.minecraftforge.api.distmarker.Dist; -import net.minecraftforge.api.distmarker.OnlyIn; import org.spongepowered.asm.mixin.Final; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; @@ -14,6 +8,14 @@ import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import org.spongepowered.asm.mixin.injection.callback.LocalCapture; +import com.simibubi.create.CreateClient; + +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; + @OnlyIn(Dist.CLIENT) @Mixin(World.class) public class OnRemoveTileMixin { 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 c3fecc726..27f8173ce 100644 --- a/src/main/java/com/simibubi/create/foundation/mixin/RenderHooksMixin.java +++ b/src/main/java/com/simibubi/create/foundation/mixin/RenderHooksMixin.java @@ -1,28 +1,25 @@ package com.simibubi.create.foundation.mixin; -import com.mojang.blaze3d.matrix.MatrixStack; -import com.mojang.blaze3d.platform.GlStateManager; -import com.simibubi.create.CreateClient; -import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionRenderDispatcher; -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.minecraft.tileentity.TileEntity; -import net.minecraftforge.api.distmarker.Dist; -import net.minecraftforge.api.distmarker.OnlyIn; import org.lwjgl.opengl.GL20; -import org.spongepowered.asm.mixin.Final; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -import java.util.Set; +import com.mojang.blaze3d.matrix.MatrixStack; +import com.simibubi.create.CreateClient; +import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionRenderDispatcher; +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; @OnlyIn(Dist.CLIENT) @Mixin(WorldRenderer.class) diff --git a/src/main/java/com/simibubi/create/foundation/mixin/ShaderCloseMixin.java b/src/main/java/com/simibubi/create/foundation/mixin/ShaderCloseMixin.java index c82406e20..ed2ada21e 100644 --- a/src/main/java/com/simibubi/create/foundation/mixin/ShaderCloseMixin.java +++ b/src/main/java/com/simibubi/create/foundation/mixin/ShaderCloseMixin.java @@ -1,16 +1,18 @@ package com.simibubi.create.foundation.mixin; -import com.simibubi.create.foundation.render.backend.OptifineHandler; -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.screen.Screen; -import net.minecraft.client.gui.screen.VideoSettingsScreen; +import javax.annotation.Nullable; + import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -import javax.annotation.Nullable; +import com.simibubi.create.foundation.render.backend.OptifineHandler; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.screen.Screen; +import net.minecraft.client.gui.screen.VideoSettingsScreen; @Mixin(Minecraft.class) public class ShaderCloseMixin { diff --git a/src/main/java/com/simibubi/create/foundation/networking/AllPackets.java b/src/main/java/com/simibubi/create/foundation/networking/AllPackets.java index 2cabdfb0a..0f5fca06b 100644 --- a/src/main/java/com/simibubi/create/foundation/networking/AllPackets.java +++ b/src/main/java/com/simibubi/create/foundation/networking/AllPackets.java @@ -1,11 +1,22 @@ package com.simibubi.create.foundation.networking; +import static net.minecraftforge.fml.network.NetworkDirection.PLAY_TO_CLIENT; +import static net.minecraftforge.fml.network.NetworkDirection.PLAY_TO_SERVER; + +import java.util.function.BiConsumer; +import java.util.function.Function; +import java.util.function.Supplier; + import com.simibubi.create.Create; import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionDisassemblyPacket; import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionStallPacket; import com.simibubi.create.content.contraptions.components.structureMovement.gantry.GantryContraptionUpdatePacket; import com.simibubi.create.content.contraptions.components.structureMovement.glue.GlueEffectPacket; -import com.simibubi.create.content.contraptions.components.structureMovement.sync.*; +import com.simibubi.create.content.contraptions.components.structureMovement.sync.ClientMotionPacket; +import com.simibubi.create.content.contraptions.components.structureMovement.sync.ContraptionFluidPacket; +import com.simibubi.create.content.contraptions.components.structureMovement.sync.ContraptionInteractionPacket; +import com.simibubi.create.content.contraptions.components.structureMovement.sync.ContraptionSeatMappingPacket; +import com.simibubi.create.content.contraptions.components.structureMovement.sync.LimbSwingUpdatePacket; import com.simibubi.create.content.contraptions.components.structureMovement.train.CouplingCreationPacket; import com.simibubi.create.content.contraptions.components.structureMovement.train.capability.MinecartControllerUpdatePacket; import com.simibubi.create.content.contraptions.fluids.actors.FluidSplashPacket; @@ -17,12 +28,17 @@ import com.simibubi.create.content.logistics.block.mechanicalArm.ArmPlacementPac import com.simibubi.create.content.logistics.item.filter.FilterScreenPacket; import com.simibubi.create.content.logistics.packet.ConfigureFlexcratePacket; import com.simibubi.create.content.logistics.packet.ConfigureStockswitchPacket; -import com.simibubi.create.content.schematics.packet.*; +import com.simibubi.create.content.schematics.packet.ConfigureSchematicannonPacket; +import com.simibubi.create.content.schematics.packet.InstantSchematicPacket; +import com.simibubi.create.content.schematics.packet.SchematicPlacePacket; +import com.simibubi.create.content.schematics.packet.SchematicSyncPacket; +import com.simibubi.create.content.schematics.packet.SchematicUploadPacket; import com.simibubi.create.foundation.command.ConfigureConfigPacket; import com.simibubi.create.foundation.command.HighlightPacket; import com.simibubi.create.foundation.tileEntity.behaviour.filtering.FilteringCountUpdatePacket; import com.simibubi.create.foundation.tileEntity.behaviour.scrollvalue.ScrollValueUpdatePacket; import com.simibubi.create.foundation.utility.ServerSpeedProvider; + import net.minecraft.network.PacketBuffer; import net.minecraft.util.ResourceLocation; import net.minecraft.util.math.BlockPos; @@ -34,13 +50,6 @@ import net.minecraftforge.fml.network.PacketDistributor; import net.minecraftforge.fml.network.PacketDistributor.TargetPoint; import net.minecraftforge.fml.network.simple.SimpleChannel; -import java.util.function.BiConsumer; -import java.util.function.Function; -import java.util.function.Supplier; - -import static net.minecraftforge.fml.network.NetworkDirection.PLAY_TO_CLIENT; -import static net.minecraftforge.fml.network.NetworkDirection.PLAY_TO_SERVER; - public enum AllPackets { // Client to Server 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 f447a156f..b5d5e991a 100644 --- a/src/main/java/com/simibubi/create/foundation/render/AllProgramSpecs.java +++ b/src/main/java/com/simibubi/create/foundation/render/AllProgramSpecs.java @@ -1,19 +1,20 @@ package com.simibubi.create.foundation.render; +import static com.simibubi.create.foundation.render.backend.Backend.register; + import com.simibubi.create.Create; import com.simibubi.create.content.contraptions.base.KineticVertexAttributes; import com.simibubi.create.content.contraptions.base.RotatingVertexAttributes; import com.simibubi.create.content.contraptions.components.actors.ActorVertexAttributes; +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.contraptions.components.structureMovement.render.ContraptionProgram; 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; import com.simibubi.create.foundation.render.backend.gl.shader.ShaderConstants; -import net.minecraft.util.ResourceLocation; -import static com.simibubi.create.foundation.render.backend.Backend.register; +import net.minecraft.util.ResourceLocation; public class AllProgramSpecs { public static final ProgramSpec ROTATING = register(ProgramSpec.builder("rotating", BasicProgram::new) diff --git a/src/main/java/com/simibubi/create/foundation/render/Compartment.java b/src/main/java/com/simibubi/create/foundation/render/Compartment.java index 646eb7191..4d929dc3f 100644 --- a/src/main/java/com/simibubi/create/foundation/render/Compartment.java +++ b/src/main/java/com/simibubi/create/foundation/render/Compartment.java @@ -1,9 +1,11 @@ package com.simibubi.create.foundation.render; +import org.apache.commons.lang3.tuple.Pair; + import com.simibubi.create.AllBlockPartials; + import net.minecraft.block.BlockState; import net.minecraft.util.Direction; -import org.apache.commons.lang3.tuple.Pair; public class Compartment { public static final Compartment GENERIC_TILE = new Compartment<>(); 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 40e9de47a..58e1746f2 100644 --- a/src/main/java/com/simibubi/create/foundation/render/KineticRenderer.java +++ b/src/main/java/com/simibubi/create/foundation/render/KineticRenderer.java @@ -1,21 +1,22 @@ package com.simibubi.create.foundation.render; +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.foundation.render.backend.gl.BasicProgram; import com.simibubi.create.foundation.render.backend.gl.shader.ShaderCallback; -import com.simibubi.create.foundation.render.backend.instancing.*; +import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer; +import com.simibubi.create.foundation.render.backend.instancing.RenderMaterial; + 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.entity.Entity; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.math.BlockPos; -import java.util.ArrayList; - public class KineticRenderer extends InstancedTileRenderer { public static int MAX_ORIGIN_DISTANCE = 1000; diff --git a/src/main/java/com/simibubi/create/foundation/render/SuperByteBuffer.java b/src/main/java/com/simibubi/create/foundation/render/SuperByteBuffer.java index 90d7b54db..62c3f935f 100644 --- a/src/main/java/com/simibubi/create/foundation/render/SuperByteBuffer.java +++ b/src/main/java/com/simibubi/create/foundation/render/SuperByteBuffer.java @@ -1,13 +1,21 @@ package com.simibubi.create.foundation.render; +import java.nio.Buffer; +import java.nio.ByteBuffer; + import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.vertex.IVertexBuilder; import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionRenderDispatcher; import com.simibubi.create.foundation.block.render.SpriteShiftEntry; + import it.unimi.dsi.fastutil.longs.Long2DoubleMap; import it.unimi.dsi.fastutil.longs.Long2DoubleOpenHashMap; import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.*; +import net.minecraft.client.renderer.BufferBuilder; +import net.minecraft.client.renderer.Matrix3f; +import net.minecraft.client.renderer.Matrix4f; +import net.minecraft.client.renderer.Vector3f; +import net.minecraft.client.renderer.Vector4f; import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.util.Direction; import net.minecraft.util.math.BlockPos; @@ -15,9 +23,6 @@ import net.minecraft.world.LightType; import net.minecraft.world.World; import net.minecraftforge.client.model.pipeline.LightUtil; -import java.nio.Buffer; -import java.nio.ByteBuffer; - public class SuperByteBuffer extends TemplateBuffer { public interface IVertexLighter { @@ -39,7 +44,6 @@ public class SuperByteBuffer extends TemplateBuffer { // Vertex Coloring private boolean shouldColor; private int r, g, b, a; - private float sheetSize; public SuperByteBuffer(BufferBuilder buf) { super(buf); @@ -241,18 +245,9 @@ public class SuperByteBuffer extends TemplateBuffer { private static int getLight(World world, Vector4f lightPos) { BlockPos.Mutable pos = new BlockPos.Mutable(); double sky = 0, block = 0; - float offset = 1 / 8f; -// for (float zOffset = offset; zOffset >= -offset; zOffset -= 2 * offset) { -// for (float yOffset = offset; yOffset >= -offset; yOffset -= 2 * offset) { -// for (float xOffset = offset; xOffset >= -offset; xOffset -= 2 * offset) { -// pos.setPos(lightPos.getX() + xOffset, lightPos.getY() + yOffset, lightPos.getZ() + zOffset); pos.setPos(lightPos.getX() + 0, lightPos.getY() + 0, lightPos.getZ() + 0); sky += skyLightCache.computeIfAbsent(pos.toLong(), $ -> world.getLightLevel(LightType.SKY, pos)); block += blockLightCache.computeIfAbsent(pos.toLong(), $ -> world.getLightLevel(LightType.BLOCK, pos)); -// } -// } -// } - return ((int) sky) << 20 | ((int) block) << 4; } diff --git a/src/main/java/com/simibubi/create/foundation/render/SuperByteBufferCache.java b/src/main/java/com/simibubi/create/foundation/render/SuperByteBufferCache.java index ab9e0fafa..ef25a5e2d 100644 --- a/src/main/java/com/simibubi/create/foundation/render/SuperByteBufferCache.java +++ b/src/main/java/com/simibubi/create/foundation/render/SuperByteBufferCache.java @@ -1,11 +1,11 @@ package com.simibubi.create.foundation.render; -import java.util.*; +import java.util.HashMap; +import java.util.Map; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; import java.util.function.Supplier; -import com.simibubi.create.foundation.utility.VirtualEmptyModelData; import org.apache.commons.lang3.tuple.Pair; import org.lwjgl.opengl.GL11; @@ -13,6 +13,7 @@ import com.google.common.cache.Cache; import com.google.common.cache.CacheBuilder; import com.mojang.blaze3d.matrix.MatrixStack; import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.foundation.utility.VirtualEmptyModelData; import net.minecraft.block.BlockState; import net.minecraft.client.Minecraft; diff --git a/src/main/java/com/simibubi/create/foundation/render/TemplateBuffer.java b/src/main/java/com/simibubi/create/foundation/render/TemplateBuffer.java index d16702d08..16afba34e 100644 --- a/src/main/java/com/simibubi/create/foundation/render/TemplateBuffer.java +++ b/src/main/java/com/simibubi/create/foundation/render/TemplateBuffer.java @@ -1,12 +1,13 @@ package com.simibubi.create.foundation.render; -import com.mojang.datafixers.util.Pair; -import net.minecraft.client.renderer.BufferBuilder; - import java.nio.Buffer; import java.nio.ByteBuffer; import java.nio.ByteOrder; +import com.mojang.datafixers.util.Pair; + +import net.minecraft.client.renderer.BufferBuilder; + public class TemplateBuffer { protected ByteBuffer template; protected int formatSize; 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 45f4667d6..0af8bcff9 100644 --- a/src/main/java/com/simibubi/create/foundation/render/TileEntityRenderHelper.java +++ b/src/main/java/com/simibubi/create/foundation/render/TileEntityRenderHelper.java @@ -1,5 +1,7 @@ package com.simibubi.create.foundation.render; +import java.util.Iterator; + import com.mojang.blaze3d.matrix.MatrixStack; import com.simibubi.create.Create; import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionRenderDispatcher; @@ -7,7 +9,10 @@ import com.simibubi.create.foundation.config.AllConfigs; import com.simibubi.create.foundation.utility.AnimationTickHolder; import com.simibubi.create.foundation.utility.MatrixStacker; import com.simibubi.create.foundation.utility.worldWrappers.PlacementSimulationWorld; -import net.minecraft.client.renderer.*; + +import net.minecraft.client.renderer.IRenderTypeBuffer; +import net.minecraft.client.renderer.Matrix4f; +import net.minecraft.client.renderer.Vector4f; import net.minecraft.client.renderer.texture.OverlayTexture; import net.minecraft.client.renderer.tileentity.TileEntityRenderer; import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; @@ -15,8 +20,6 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import java.util.Iterator; - public class TileEntityRenderHelper { public static void renderTileEntities(World world, Iterable customRenderTEs, MatrixStack ms, 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 5218b3a98..6a416b187 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 @@ -1,26 +1,5 @@ package com.simibubi.create.foundation.render.backend; -import com.simibubi.create.foundation.config.AllConfigs; -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; -import net.minecraft.resources.IReloadableResourceManager; -import net.minecraft.resources.IResourceManager; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.resource.IResourceType; -import net.minecraftforge.resource.ISelectiveResourceReloadListener; -import net.minecraftforge.resource.VanillaResourceType; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; -import org.lwjgl.opengl.GL; -import org.lwjgl.opengl.GLCapabilities; -import org.lwjgl.system.MemoryUtil; - import java.io.BufferedInputStream; import java.io.IOException; import java.io.InputStream; @@ -32,6 +11,29 @@ import java.util.Map; import java.util.function.Consumer; import java.util.function.Predicate; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.lwjgl.opengl.GL; +import org.lwjgl.opengl.GLCapabilities; +import org.lwjgl.system.MemoryUtil; + +import com.simibubi.create.foundation.config.AllConfigs; +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; +import net.minecraft.resources.IReloadableResourceManager; +import net.minecraft.resources.IResourceManager; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.resource.IResourceType; +import net.minecraftforge.resource.ISelectiveResourceReloadListener; +import net.minecraftforge.resource.VanillaResourceType; + public class Backend { public static final Logger log = LogManager.getLogger(Backend.class); public static final FloatBuffer MATRIX_BUFFER = MemoryUtil.memAllocFloat(16); 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 d209fd857..79e4e4d2f 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 @@ -1,14 +1,16 @@ package com.simibubi.create.foundation.render.backend; -import com.simibubi.create.foundation.render.TemplateBuffer; -import com.simibubi.create.foundation.render.backend.gl.GlPrimitiveType; -import com.simibubi.create.foundation.render.backend.gl.attrib.VertexFormat; -import com.simibubi.create.foundation.render.backend.gl.GlBuffer; -import net.minecraft.client.renderer.BufferBuilder; +import java.nio.ByteBuffer; + import org.lwjgl.opengl.GL15; import org.lwjgl.opengl.GL20; -import java.nio.ByteBuffer; +import com.simibubi.create.foundation.render.TemplateBuffer; +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; public abstract class BufferedModel extends TemplateBuffer { diff --git a/src/main/java/com/simibubi/create/foundation/render/backend/FastRenderDispatcher.java b/src/main/java/com/simibubi/create/foundation/render/backend/FastRenderDispatcher.java index 4e7955e85..17f504ab8 100644 --- a/src/main/java/com/simibubi/create/foundation/render/backend/FastRenderDispatcher.java +++ b/src/main/java/com/simibubi/create/foundation/render/backend/FastRenderDispatcher.java @@ -1,5 +1,9 @@ package com.simibubi.create.foundation.render.backend; +import java.util.concurrent.ConcurrentHashMap; + +import org.lwjgl.opengl.GL11; + import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.systems.RenderSystem; import com.simibubi.create.CreateClient; @@ -7,6 +11,7 @@ import com.simibubi.create.content.contraptions.KineticDebugger; import com.simibubi.create.content.schematics.SchematicWorld; import com.simibubi.create.foundation.utility.AnimationTickHolder; import com.simibubi.create.foundation.utility.WorldAttached; + import net.minecraft.client.Minecraft; import net.minecraft.client.entity.player.ClientPlayerEntity; import net.minecraft.client.renderer.GameRenderer; @@ -18,13 +23,6 @@ import net.minecraft.potion.Effects; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.math.MathHelper; import net.minecraft.world.World; -import org.lwjgl.opengl.GL11; - -import javax.annotation.Nullable; -import java.util.ArrayList; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import java.util.function.Consumer; public class FastRenderDispatcher { diff --git a/src/main/java/com/simibubi/create/foundation/render/backend/OptifineHandler.java b/src/main/java/com/simibubi/create/foundation/render/backend/OptifineHandler.java index 8e35a2016..49b967e7b 100644 --- a/src/main/java/com/simibubi/create/foundation/render/backend/OptifineHandler.java +++ b/src/main/java/com/simibubi/create/foundation/render/backend/OptifineHandler.java @@ -1,10 +1,13 @@ package com.simibubi.create.foundation.render.backend; -import net.minecraft.client.Minecraft; - -import java.io.*; +import java.io.BufferedReader; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileReader; import java.util.Optional; +import net.minecraft.client.Minecraft; + public class OptifineHandler { public static final String OPTIFINE_ROOT_PACKAGE = "net.optifine"; public static final String SHADER_PACKAGE = "net.optifine.shaders"; 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 260921c56..8d6f71711 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 @@ -1,11 +1,13 @@ package com.simibubi.create.foundation.render.backend.gl; +import org.lwjgl.opengl.GL20; + import com.simibubi.create.foundation.render.backend.Backend; import com.simibubi.create.foundation.render.backend.gl.shader.GlProgram; import com.simibubi.create.foundation.utility.AnimationTickHolder; + import net.minecraft.client.renderer.Matrix4f; import net.minecraft.util.ResourceLocation; -import org.lwjgl.opengl.GL20; public class BasicProgram extends GlProgram { protected final int uTime; 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 c94c38828..42a72736b 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 @@ -1,11 +1,12 @@ package com.simibubi.create.foundation.render.backend.gl; -import com.simibubi.create.foundation.render.backend.Backend; -import org.lwjgl.opengl.GL20; - import java.nio.ByteBuffer; import java.util.function.Consumer; +import org.lwjgl.opengl.GL20; + +import com.simibubi.create.foundation.render.backend.Backend; + public class GlBuffer extends GlObject { protected final int bufferType; diff --git a/src/main/java/com/simibubi/create/foundation/render/backend/gl/GlFog.java b/src/main/java/com/simibubi/create/foundation/render/backend/gl/GlFog.java index 220abfd1b..de7958b8c 100644 --- a/src/main/java/com/simibubi/create/foundation/render/backend/gl/GlFog.java +++ b/src/main/java/com/simibubi/create/foundation/render/backend/gl/GlFog.java @@ -1,8 +1,6 @@ package com.simibubi.create.foundation.render.backend.gl; import com.mojang.blaze3d.platform.GlStateManager; -import org.lwjgl.opengl.GL15; -import org.lwjgl.opengl.GL20; public class GlFog { public static float[] FOG_COLOR = new float[] {0, 0, 0, 0}; 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 2d024c6d2..33ff7461b 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 @@ -1,9 +1,9 @@ package com.simibubi.create.foundation.render.backend.gl; -import org.lwjgl.opengl.GL30; - import java.util.function.Consumer; +import org.lwjgl.opengl.GL30; + public class GlVertexArray extends GlObject { public GlVertexArray() { setHandle(GL30.glGenVertexArrays()); diff --git a/src/main/java/com/simibubi/create/foundation/render/backend/gl/attrib/VertexAttribSpec.java b/src/main/java/com/simibubi/create/foundation/render/backend/gl/attrib/VertexAttribSpec.java index 709508c90..1af7dc3a6 100644 --- a/src/main/java/com/simibubi/create/foundation/render/backend/gl/attrib/VertexAttribSpec.java +++ b/src/main/java/com/simibubi/create/foundation/render/backend/gl/attrib/VertexAttribSpec.java @@ -1,8 +1,9 @@ package com.simibubi.create.foundation.render.backend.gl.attrib; -import com.simibubi.create.foundation.render.backend.gl.GlPrimitiveType; import org.lwjgl.opengl.GL20; +import com.simibubi.create.foundation.render.backend.gl.GlPrimitiveType; + public class VertexAttribSpec { private final GlPrimitiveType type; diff --git a/src/main/java/com/simibubi/create/foundation/render/backend/gl/shader/GlProgram.java b/src/main/java/com/simibubi/create/foundation/render/backend/gl/shader/GlProgram.java index 790bb4c5a..c911eea5f 100644 --- a/src/main/java/com/simibubi/create/foundation/render/backend/gl/shader/GlProgram.java +++ b/src/main/java/com/simibubi/create/foundation/render/backend/gl/shader/GlProgram.java @@ -1,10 +1,12 @@ package com.simibubi.create.foundation.render.backend.gl.shader; +import org.lwjgl.opengl.GL20; + +import com.simibubi.create.foundation.render.backend.Backend; import com.simibubi.create.foundation.render.backend.gl.GlObject; import com.simibubi.create.foundation.render.backend.gl.attrib.IVertexAttrib; -import com.simibubi.create.foundation.render.backend.Backend; + import net.minecraft.util.ResourceLocation; -import org.lwjgl.opengl.GL20; public abstract class GlProgram extends GlObject { diff --git a/src/main/java/com/simibubi/create/foundation/render/backend/gl/shader/GlShader.java b/src/main/java/com/simibubi/create/foundation/render/backend/gl/shader/GlShader.java index fa0fa48f2..8ef265920 100644 --- a/src/main/java/com/simibubi/create/foundation/render/backend/gl/shader/GlShader.java +++ b/src/main/java/com/simibubi/create/foundation/render/backend/gl/shader/GlShader.java @@ -1,10 +1,12 @@ package com.simibubi.create.foundation.render.backend.gl.shader; -import com.simibubi.create.foundation.render.backend.gl.GlObject; -import com.simibubi.create.foundation.render.backend.Backend; -import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL20; +import com.simibubi.create.foundation.render.backend.Backend; +import com.simibubi.create.foundation.render.backend.gl.GlObject; + +import net.minecraft.util.ResourceLocation; + public class GlShader extends GlObject { public final ResourceLocation name; diff --git a/src/main/java/com/simibubi/create/foundation/render/backend/gl/shader/ProgramSpec.java b/src/main/java/com/simibubi/create/foundation/render/backend/gl/shader/ProgramSpec.java index 3e98a70df..7c2a2ca93 100644 --- a/src/main/java/com/simibubi/create/foundation/render/backend/gl/shader/ProgramSpec.java +++ b/src/main/java/com/simibubi/create/foundation/render/backend/gl/shader/ProgramSpec.java @@ -1,12 +1,13 @@ package com.simibubi.create.foundation.render.backend.gl.shader; -import com.simibubi.create.Create; -import com.simibubi.create.foundation.render.backend.gl.attrib.IVertexAttrib; -import net.minecraft.util.ResourceLocation; - import java.util.ArrayList; import java.util.Arrays; +import com.simibubi.create.Create; +import com.simibubi.create.foundation.render.backend.gl.attrib.IVertexAttrib; + +import net.minecraft.util.ResourceLocation; + public class ProgramSpec

{ public final ResourceLocation name; diff --git a/src/main/java/com/simibubi/create/foundation/render/backend/gl/shader/ShaderUniforms.java b/src/main/java/com/simibubi/create/foundation/render/backend/gl/shader/ShaderUniforms.java deleted file mode 100644 index 8a85d1c24..000000000 --- a/src/main/java/com/simibubi/create/foundation/render/backend/gl/shader/ShaderUniforms.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.simibubi.create.foundation.render.backend.gl.shader; - -import java.util.HashMap; -import java.util.Map; - -public class ShaderUniforms { - private final Map uniforms; - - public ShaderUniforms() { - this.uniforms = new HashMap<>(); - } -} diff --git a/src/main/java/com/simibubi/create/foundation/render/backend/gl/versioned/MapBuffer.java b/src/main/java/com/simibubi/create/foundation/render/backend/gl/versioned/MapBuffer.java index f1249223a..e5e03d4b3 100644 --- a/src/main/java/com/simibubi/create/foundation/render/backend/gl/versioned/MapBuffer.java +++ b/src/main/java/com/simibubi/create/foundation/render/backend/gl/versioned/MapBuffer.java @@ -1,10 +1,13 @@ package com.simibubi.create.foundation.render.backend.gl.versioned; -import org.lwjgl.opengl.*; - import java.nio.ByteBuffer; import java.util.function.Consumer; +import org.lwjgl.opengl.ARBMapBufferRange; +import org.lwjgl.opengl.GL15; +import org.lwjgl.opengl.GL30; +import org.lwjgl.opengl.GLCapabilities; + public enum MapBuffer implements GlVersioned { GL30_RANGE { 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 c82c6bd38..b18cffcc4 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 @@ -1,19 +1,25 @@ package com.simibubi.create.foundation.render.backend.instancing; -import com.simibubi.create.foundation.render.backend.BufferedModel; -import com.simibubi.create.foundation.render.RenderMath; -import com.simibubi.create.foundation.render.backend.gl.GlVertexArray; -import com.simibubi.create.foundation.render.backend.gl.GlBuffer; -import com.simibubi.create.foundation.render.backend.gl.attrib.VertexFormat; -import com.simibubi.create.foundation.render.backend.gl.attrib.ModelVertexAttributes; -import net.minecraft.client.renderer.BufferBuilder; -import org.lwjgl.opengl.*; - import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.function.Consumer; +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; +import com.simibubi.create.foundation.render.backend.gl.GlBuffer; +import com.simibubi.create.foundation.render.backend.gl.GlVertexArray; +import com.simibubi.create.foundation.render.backend.gl.attrib.ModelVertexAttributes; +import com.simibubi.create.foundation.render.backend.gl.attrib.VertexFormat; + +import net.minecraft.client.renderer.BufferBuilder; + public abstract class InstancedModel extends BufferedModel { public static final VertexFormat FORMAT = VertexFormat.builder().addAttributes(ModelVertexAttributes.class).build(); diff --git a/src/main/java/com/simibubi/create/foundation/render/backend/instancing/InstancedTileRenderRegistry.java b/src/main/java/com/simibubi/create/foundation/render/backend/instancing/InstancedTileRenderRegistry.java index fd731a8e2..26bdd4f96 100644 --- a/src/main/java/com/simibubi/create/foundation/render/backend/instancing/InstancedTileRenderRegistry.java +++ b/src/main/java/com/simibubi/create/foundation/render/backend/instancing/InstancedTileRenderRegistry.java @@ -1,11 +1,13 @@ package com.simibubi.create.foundation.render.backend.instancing; -import com.google.common.collect.Maps; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.tileentity.TileEntityType; +import java.util.Map; import javax.annotation.Nullable; -import java.util.Map; + +import com.google.common.collect.Maps; + +import net.minecraft.tileentity.TileEntity; +import net.minecraft.tileentity.TileEntityType; public class InstancedTileRenderRegistry { public static final InstancedTileRenderRegistry instance = new InstancedTileRenderRegistry(); 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 ab30eaa36..055e5dac7 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,12 +1,17 @@ package com.simibubi.create.foundation.render.backend.instancing; -import com.simibubi.create.CreateClient; -import com.simibubi.create.foundation.render.backend.FastRenderDispatcher; -import com.simibubi.create.foundation.render.backend.gl.BasicProgram; +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; + +import javax.annotation.Nullable; + 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; @@ -14,11 +19,6 @@ import net.minecraft.client.world.ClientWorld; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.math.BlockPos; -import javax.annotation.Nullable; -import java.util.HashMap; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; - public abstract class InstancedTileRenderer

{ public static WorldAttached> addedLastTick = new WorldAttached<>(ConcurrentHashMap::new); diff --git a/src/main/java/com/simibubi/create/foundation/render/backend/instancing/RenderMaterial.java b/src/main/java/com/simibubi/create/foundation/render/backend/instancing/RenderMaterial.java index 1234f3900..bfdd3fd4e 100644 --- a/src/main/java/com/simibubi/create/foundation/render/backend/instancing/RenderMaterial.java +++ b/src/main/java/com/simibubi/create/foundation/render/backend/instancing/RenderMaterial.java @@ -1,26 +1,6 @@ package com.simibubi.create.foundation.render.backend.instancing; -import com.google.common.cache.Cache; -import com.google.common.cache.CacheBuilder; -import com.mojang.blaze3d.matrix.MatrixStack; -import com.simibubi.create.AllBlockPartials; -import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer; -import com.simibubi.create.foundation.render.Compartment; -import com.simibubi.create.foundation.render.backend.FastRenderDispatcher; -import com.simibubi.create.foundation.render.SuperByteBufferCache; -import com.simibubi.create.foundation.render.backend.gl.BasicProgram; -import com.simibubi.create.foundation.render.backend.Backend; -import com.simibubi.create.foundation.render.backend.gl.shader.ProgramSpec; -import com.simibubi.create.foundation.render.backend.gl.shader.ShaderCallback; -import net.minecraft.block.BlockState; -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.BlockRendererDispatcher; -import net.minecraft.client.renderer.BufferBuilder; -import net.minecraft.client.renderer.Matrix4f; -import net.minecraft.client.renderer.RenderType; -import net.minecraft.client.renderer.model.IBakedModel; -import net.minecraft.util.Direction; -import org.apache.commons.lang3.tuple.Pair; +import static com.simibubi.create.foundation.render.Compartment.PARTIAL; import java.util.HashMap; import java.util.Map; @@ -29,7 +9,29 @@ import java.util.function.Consumer; import java.util.function.Predicate; import java.util.function.Supplier; -import static com.simibubi.create.foundation.render.Compartment.PARTIAL; +import org.apache.commons.lang3.tuple.Pair; + +import com.google.common.cache.Cache; +import com.google.common.cache.CacheBuilder; +import com.mojang.blaze3d.matrix.MatrixStack; +import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer; +import com.simibubi.create.foundation.render.Compartment; +import com.simibubi.create.foundation.render.SuperByteBufferCache; +import com.simibubi.create.foundation.render.backend.Backend; +import com.simibubi.create.foundation.render.backend.FastRenderDispatcher; +import com.simibubi.create.foundation.render.backend.gl.BasicProgram; +import com.simibubi.create.foundation.render.backend.gl.shader.ProgramSpec; +import com.simibubi.create.foundation.render.backend.gl.shader.ShaderCallback; + +import net.minecraft.block.BlockState; +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.BlockRendererDispatcher; +import net.minecraft.client.renderer.BufferBuilder; +import net.minecraft.client.renderer.Matrix4f; +import net.minecraft.client.renderer.RenderType; +import net.minecraft.client.renderer.model.IBakedModel; +import net.minecraft.util.Direction; public class RenderMaterial

> { 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 e9bf8b6ee..707efc0bd 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 @@ -1,13 +1,14 @@ package com.simibubi.create.foundation.render.backend.light; +import static com.simibubi.create.foundation.render.RenderMath.isPowerOf2; + import com.simibubi.create.foundation.render.RenderMath; + import net.minecraft.util.Direction; import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.SectionPos; import net.minecraft.util.math.Vec3i; -import static com.simibubi.create.foundation.render.RenderMath.isPowerOf2; - public class GridAlignedBB { public int minX; public int minY; 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 97f12c48f..143964ba5 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 @@ -1,15 +1,21 @@ package com.simibubi.create.foundation.render.backend.light; +import java.nio.ByteBuffer; + +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; import com.simibubi.create.foundation.render.backend.gl.GlTexture; + import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.SectionPos; import net.minecraft.world.ILightReader; import net.minecraft.world.LightType; -import org.lwjgl.opengl.*; -import org.lwjgl.system.MemoryUtil; - -import java.nio.ByteBuffer; public class LightVolume { diff --git a/src/main/java/com/simibubi/create/foundation/render/backend/light/LightVolumeDebugger.java b/src/main/java/com/simibubi/create/foundation/render/backend/light/LightVolumeDebugger.java index 63395a69a..811987c5d 100644 --- a/src/main/java/com/simibubi/create/foundation/render/backend/light/LightVolumeDebugger.java +++ b/src/main/java/com/simibubi/create/foundation/render/backend/light/LightVolumeDebugger.java @@ -1,13 +1,13 @@ package com.simibubi.create.foundation.render.backend.light; +import java.util.ArrayList; + import com.mojang.blaze3d.matrix.MatrixStack; import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionRenderDispatcher; import com.simibubi.create.foundation.renderState.SuperRenderTypeBuffer; import com.simibubi.create.foundation.utility.Pair; import com.simibubi.create.foundation.utility.outliner.AABBOutline; -import java.util.ArrayList; - public class LightVolumeDebugger { public static void render(MatrixStack ms, SuperRenderTypeBuffer buffer) { ContraptionRenderDispatcher.renderers.values() diff --git a/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/linked/LinkBehaviour.java b/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/linked/LinkBehaviour.java index 6246d20ea..f735c21af 100644 --- a/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/linked/LinkBehaviour.java +++ b/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/linked/LinkBehaviour.java @@ -3,6 +3,7 @@ package com.simibubi.create.foundation.tileEntity.behaviour.linked; import java.util.function.Function; import java.util.function.IntConsumer; import java.util.function.IntSupplier; + import org.apache.commons.lang3.tuple.Pair; import com.simibubi.create.Create; diff --git a/src/main/java/com/simibubi/create/foundation/tileEntity/renderer/SafeTileEntityRenderer.java b/src/main/java/com/simibubi/create/foundation/tileEntity/renderer/SafeTileEntityRenderer.java index bc4c0de82..6c02f67f9 100644 --- a/src/main/java/com/simibubi/create/foundation/tileEntity/renderer/SafeTileEntityRenderer.java +++ b/src/main/java/com/simibubi/create/foundation/tileEntity/renderer/SafeTileEntityRenderer.java @@ -7,7 +7,6 @@ import net.minecraft.client.renderer.IRenderTypeBuffer; import net.minecraft.client.renderer.tileentity.TileEntityRenderer; import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.client.model.pipeline.LightUtil; public abstract class SafeTileEntityRenderer extends TileEntityRenderer { diff --git a/src/main/java/com/simibubi/create/foundation/utility/Iterate.java b/src/main/java/com/simibubi/create/foundation/utility/Iterate.java index 693231353..1be8add22 100644 --- a/src/main/java/com/simibubi/create/foundation/utility/Iterate.java +++ b/src/main/java/com/simibubi/create/foundation/utility/Iterate.java @@ -1,13 +1,13 @@ package com.simibubi.create.foundation.utility; -import net.minecraft.util.Direction; -import net.minecraft.util.Direction.Axis; -import net.minecraft.util.math.BlockPos; - import java.util.Arrays; import java.util.EnumSet; import java.util.List; +import net.minecraft.util.Direction; +import net.minecraft.util.Direction.Axis; +import net.minecraft.util.math.BlockPos; + public class Iterate { public static final boolean[] trueAndFalse = {true, false}; diff --git a/src/main/java/com/simibubi/create/foundation/utility/VecHelper.java b/src/main/java/com/simibubi/create/foundation/utility/VecHelper.java index 502e176a7..1e620ec07 100644 --- a/src/main/java/com/simibubi/create/foundation/utility/VecHelper.java +++ b/src/main/java/com/simibubi/create/foundation/utility/VecHelper.java @@ -1,5 +1,9 @@ package com.simibubi.create.foundation.utility; +import java.util.Random; + +import javax.annotation.Nullable; + import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.ActiveRenderInfo; import net.minecraft.client.renderer.Quaternion; @@ -15,9 +19,6 @@ import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.Vec3d; import net.minecraft.util.math.Vec3i; -import javax.annotation.Nullable; -import java.util.Random; - public class VecHelper { public static final Vec3d CENTER_OF_ORIGIN = new Vec3d(.5, .5, .5); diff --git a/src/main/java/com/simibubi/create/foundation/utility/ghost/GhostBlockParams.java b/src/main/java/com/simibubi/create/foundation/utility/ghost/GhostBlockParams.java index 5723d19b1..b83e7f13d 100644 --- a/src/main/java/com/simibubi/create/foundation/utility/ghost/GhostBlockParams.java +++ b/src/main/java/com/simibubi/create/foundation/utility/ghost/GhostBlockParams.java @@ -1,11 +1,11 @@ package com.simibubi.create.foundation.utility.ghost; +import java.util.function.Supplier; + import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.util.math.BlockPos; -import java.util.function.Supplier; - public class GhostBlockParams { protected final BlockState state; diff --git a/src/main/java/com/simibubi/create/foundation/utility/ghost/GhostBlockRenderer.java b/src/main/java/com/simibubi/create/foundation/utility/ghost/GhostBlockRenderer.java index 5f18c34d7..361f524bb 100644 --- a/src/main/java/com/simibubi/create/foundation/utility/ghost/GhostBlockRenderer.java +++ b/src/main/java/com/simibubi/create/foundation/utility/ghost/GhostBlockRenderer.java @@ -1,12 +1,28 @@ package com.simibubi.create.foundation.utility.ghost; +import java.nio.Buffer; +import java.nio.ByteBuffer; +import java.nio.IntBuffer; +import java.util.List; +import java.util.Random; + +import javax.annotation.Nullable; + +import org.lwjgl.system.MemoryStack; + import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.vertex.IVertexBuilder; import com.simibubi.create.foundation.renderState.SuperRenderTypeBuffer; import com.simibubi.create.foundation.utility.VirtualEmptyModelData; + import net.minecraft.block.BlockState; import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.*; +import net.minecraft.client.renderer.BlockRendererDispatcher; +import net.minecraft.client.renderer.Matrix4f; +import net.minecraft.client.renderer.RenderType; +import net.minecraft.client.renderer.RenderTypeLookup; +import net.minecraft.client.renderer.Vector3f; +import net.minecraft.client.renderer.Vector4f; import net.minecraft.client.renderer.model.BakedQuad; import net.minecraft.client.renderer.model.IBakedModel; import net.minecraft.client.renderer.texture.OverlayTexture; @@ -15,14 +31,6 @@ import net.minecraft.util.Direction; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.Vec3i; -import org.lwjgl.system.MemoryStack; - -import javax.annotation.Nullable; -import java.nio.Buffer; -import java.nio.ByteBuffer; -import java.nio.IntBuffer; -import java.util.List; -import java.util.Random; public abstract class GhostBlockRenderer { @@ -134,7 +142,6 @@ public abstract class GhostBlockRenderer { Vector3f vector3f = new Vector3f((float) vec3i.getX(), (float) vec3i.getY(), (float) vec3i.getZ()); Matrix4f matrix4f = p_227890_1_.getModel(); vector3f.transform(p_227890_1_.getNormal()); - int i = 8; int j = aint.length / 8; try (MemoryStack memorystack = MemoryStack.stackPush()) { diff --git a/src/main/java/com/simibubi/create/foundation/utility/ghost/GhostBlocks.java b/src/main/java/com/simibubi/create/foundation/utility/ghost/GhostBlocks.java index d5ae5d175..2c6cc6f4b 100644 --- a/src/main/java/com/simibubi/create/foundation/utility/ghost/GhostBlocks.java +++ b/src/main/java/com/simibubi/create/foundation/utility/ghost/GhostBlocks.java @@ -1,13 +1,14 @@ package com.simibubi.create.foundation.utility.ghost; -import com.mojang.blaze3d.matrix.MatrixStack; -import com.simibubi.create.foundation.renderState.SuperRenderTypeBuffer; -import net.minecraft.block.BlockState; -import net.minecraft.util.math.MathHelper; - import java.util.HashMap; import java.util.Map; +import com.mojang.blaze3d.matrix.MatrixStack; +import com.simibubi.create.foundation.renderState.SuperRenderTypeBuffer; + +import net.minecraft.block.BlockState; +import net.minecraft.util.math.MathHelper; + public class GhostBlocks { public static double getBreathingAlpha() { diff --git a/src/main/java/com/simibubi/create/foundation/utility/outliner/ChasingAABBOutline.java b/src/main/java/com/simibubi/create/foundation/utility/outliner/ChasingAABBOutline.java index 931b2affb..6621b1a0e 100644 --- a/src/main/java/com/simibubi/create/foundation/utility/outliner/ChasingAABBOutline.java +++ b/src/main/java/com/simibubi/create/foundation/utility/outliner/ChasingAABBOutline.java @@ -3,6 +3,7 @@ package com.simibubi.create.foundation.utility.outliner; import com.mojang.blaze3d.matrix.MatrixStack; import com.simibubi.create.foundation.renderState.SuperRenderTypeBuffer; import com.simibubi.create.foundation.utility.AnimationTickHolder; + import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.MathHelper; diff --git a/src/main/java/com/simibubi/create/foundation/utility/outliner/LineOutline.java b/src/main/java/com/simibubi/create/foundation/utility/outliner/LineOutline.java index e76bbc56d..4a72da0da 100644 --- a/src/main/java/com/simibubi/create/foundation/utility/outliner/LineOutline.java +++ b/src/main/java/com/simibubi/create/foundation/utility/outliner/LineOutline.java @@ -3,6 +3,7 @@ package com.simibubi.create.foundation.utility.outliner; import com.mojang.blaze3d.matrix.MatrixStack; import com.simibubi.create.foundation.renderState.SuperRenderTypeBuffer; import com.simibubi.create.foundation.utility.AnimationTickHolder; + import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.Vec3d; diff --git a/src/main/java/com/simibubi/create/foundation/utility/outliner/Outliner.java b/src/main/java/com/simibubi/create/foundation/utility/outliner/Outliner.java index 61a210cb5..3d0311265 100644 --- a/src/main/java/com/simibubi/create/foundation/utility/outliner/Outliner.java +++ b/src/main/java/com/simibubi/create/foundation/utility/outliner/Outliner.java @@ -1,19 +1,24 @@ package com.simibubi.create.foundation.utility.outliner; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Optional; +import java.util.Set; + import com.mojang.blaze3d.matrix.MatrixStack; import com.simibubi.create.foundation.renderState.SuperRenderTypeBuffer; import com.simibubi.create.foundation.tileEntity.behaviour.ValueBox; import com.simibubi.create.foundation.utility.AnimationTickHolder; import com.simibubi.create.foundation.utility.outliner.LineOutline.EndChasingLineOutline; import com.simibubi.create.foundation.utility.outliner.Outline.OutlineParams; -import net.minecraft.client.Minecraft; + import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.Vec3d; -import java.util.*; - public class Outliner { final Map outlines; diff --git a/src/main/java/com/simibubi/create/foundation/utility/placement/IPlacementHelper.java b/src/main/java/com/simibubi/create/foundation/utility/placement/IPlacementHelper.java index c74301353..434d7a89f 100644 --- a/src/main/java/com/simibubi/create/foundation/utility/placement/IPlacementHelper.java +++ b/src/main/java/com/simibubi/create/foundation/utility/placement/IPlacementHelper.java @@ -1,9 +1,16 @@ package com.simibubi.create.foundation.utility.placement; +import java.util.Arrays; +import java.util.Comparator; +import java.util.List; +import java.util.function.Predicate; +import java.util.stream.Collectors; + import com.simibubi.create.CreateClient; import com.simibubi.create.foundation.utility.Iterate; import com.simibubi.create.foundation.utility.Pair; import com.simibubi.create.foundation.utility.VecHelper; + import mcp.MethodsReturnNonnullByDefault; import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; @@ -15,12 +22,6 @@ import net.minecraft.util.math.BlockRayTraceResult; import net.minecraft.util.math.Vec3d; import net.minecraft.world.World; -import java.util.Arrays; -import java.util.Comparator; -import java.util.List; -import java.util.function.Predicate; -import java.util.stream.Collectors; - @MethodsReturnNonnullByDefault public interface IPlacementHelper { diff --git a/src/main/java/com/simibubi/create/foundation/utility/placement/PlacementHelpers.java b/src/main/java/com/simibubi/create/foundation/utility/placement/PlacementHelpers.java index 002bc3e49..92ce7983d 100644 --- a/src/main/java/com/simibubi/create/foundation/utility/placement/PlacementHelpers.java +++ b/src/main/java/com/simibubi/create/foundation/utility/placement/PlacementHelpers.java @@ -1,5 +1,11 @@ package com.simibubi.create.foundation.utility.placement; +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Collectors; + +import org.lwjgl.opengl.GL11; + import com.mojang.blaze3d.systems.RenderSystem; import com.simibubi.create.foundation.config.AllConfigs; import com.simibubi.create.foundation.gui.AllGuiTextures; @@ -7,6 +13,7 @@ import com.simibubi.create.foundation.gui.widgets.InterpolatedChasingAngle; import com.simibubi.create.foundation.gui.widgets.InterpolatedChasingValue; import com.simibubi.create.foundation.utility.AngleHelper; import com.simibubi.create.foundation.utility.VecHelper; + import net.minecraft.block.BlockState; import net.minecraft.client.MainWindow; import net.minecraft.client.Minecraft; @@ -25,11 +32,6 @@ import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.client.event.RenderGameOverlayEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; -import org.lwjgl.opengl.GL11; - -import java.util.ArrayList; -import java.util.List; -import java.util.stream.Collectors; @Mod.EventBusSubscriber public class PlacementHelpers { diff --git a/src/main/java/com/simibubi/create/foundation/utility/placement/PlacementOffset.java b/src/main/java/com/simibubi/create/foundation/utility/placement/PlacementOffset.java index d6251384e..f1cb89170 100644 --- a/src/main/java/com/simibubi/create/foundation/utility/placement/PlacementOffset.java +++ b/src/main/java/com/simibubi/create/foundation/utility/placement/PlacementOffset.java @@ -1,5 +1,7 @@ package com.simibubi.create.foundation.utility.placement; +import java.util.function.Function; + import net.minecraft.advancements.CriteriaTriggers; import net.minecraft.block.BlockState; import net.minecraft.block.SoundType; @@ -22,8 +24,6 @@ import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.util.BlockSnapshot; import net.minecraftforge.event.world.BlockEvent; -import java.util.function.Function; - public class PlacementOffset { private final boolean success; diff --git a/src/main/java/com/simibubi/create/foundation/utility/placement/util/PoleHelper.java b/src/main/java/com/simibubi/create/foundation/utility/placement/util/PoleHelper.java index fef9b0783..4dceeaf48 100644 --- a/src/main/java/com/simibubi/create/foundation/utility/placement/util/PoleHelper.java +++ b/src/main/java/com/simibubi/create/foundation/utility/placement/util/PoleHelper.java @@ -1,7 +1,12 @@ package com.simibubi.create.foundation.utility.placement.util; +import java.util.List; +import java.util.function.Function; +import java.util.function.Predicate; + import com.simibubi.create.foundation.utility.placement.IPlacementHelper; import com.simibubi.create.foundation.utility.placement.PlacementOffset; + import mcp.MethodsReturnNonnullByDefault; import net.minecraft.block.BlockState; import net.minecraft.state.IProperty; @@ -10,10 +15,6 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockRayTraceResult; import net.minecraft.world.World; -import java.util.List; -import java.util.function.Function; -import java.util.function.Predicate; - @MethodsReturnNonnullByDefault public abstract class PoleHelper> implements IPlacementHelper { diff --git a/src/main/java/com/simibubi/create/foundation/utility/worldWrappers/WrappedChunkProvider.java b/src/main/java/com/simibubi/create/foundation/utility/worldWrappers/WrappedChunkProvider.java index e34d5cb11..f6a22d102 100644 --- a/src/main/java/com/simibubi/create/foundation/utility/worldWrappers/WrappedChunkProvider.java +++ b/src/main/java/com/simibubi/create/foundation/utility/worldWrappers/WrappedChunkProvider.java @@ -1,21 +1,22 @@ package com.simibubi.create.foundation.utility.worldWrappers; +import java.util.HashMap; +import java.util.Map; +import java.util.function.BooleanSupplier; +import java.util.stream.Stream; + +import javax.annotation.Nullable; + import com.simibubi.create.foundation.utility.worldWrappers.chunk.WrappedChunk; + import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.ChunkPos; import net.minecraft.world.IBlockReader; import net.minecraft.world.chunk.AbstractChunkProvider; import net.minecraft.world.chunk.ChunkStatus; import net.minecraft.world.chunk.IChunk; -import net.minecraft.world.chunk.IChunkLightProvider; import net.minecraft.world.lighting.WorldLightManager; -import javax.annotation.Nullable; -import java.util.HashMap; -import java.util.Map; -import java.util.function.BooleanSupplier; -import java.util.stream.Stream; - public class WrappedChunkProvider extends AbstractChunkProvider { private PlacementSimulationWorld world; diff --git a/src/main/java/com/simibubi/create/foundation/utility/worldWrappers/chunk/WrappedChunk.java b/src/main/java/com/simibubi/create/foundation/utility/worldWrappers/chunk/WrappedChunk.java index e21d3d044..c6904537d 100644 --- a/src/main/java/com/simibubi/create/foundation/utility/worldWrappers/chunk/WrappedChunk.java +++ b/src/main/java/com/simibubi/create/foundation/utility/worldWrappers/chunk/WrappedChunk.java @@ -1,7 +1,14 @@ package com.simibubi.create.foundation.utility.worldWrappers.chunk; +import java.util.Collection; +import java.util.Map; +import java.util.Set; +import java.util.stream.Stream; + +import javax.annotation.Nullable; + import com.simibubi.create.foundation.utility.worldWrappers.PlacementSimulationWorld; -import com.simibubi.create.foundation.utility.worldWrappers.WrappedWorld; + import it.unimi.dsi.fastutil.longs.LongSet; import it.unimi.dsi.fastutil.shorts.ShortList; import net.minecraft.block.Block; @@ -22,12 +29,6 @@ import net.minecraft.world.chunk.IChunk; import net.minecraft.world.gen.Heightmap; import net.minecraft.world.gen.feature.structure.StructureStart; -import javax.annotation.Nullable; -import java.util.Collection; -import java.util.Map; -import java.util.Set; -import java.util.stream.Stream; - public class WrappedChunk implements IChunk { final PlacementSimulationWorld world;