mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-11-10 20:11:35 +01:00
Merge branch 'mc1.15/dev' into comparator-tanks
This commit is contained in:
commit
562104341d
139 changed files with 2652 additions and 363 deletions
|
@ -39,7 +39,7 @@ minecraft {
|
|||
workingDirectory project.file('run')
|
||||
// property 'mixin.env.disableRefMap', 'true'
|
||||
arg '-mixin.config=create.mixins.json'
|
||||
// jvmArgs '-XX:+UnlockCommercialFeatures'
|
||||
jvmArgs '-XX:+UnlockCommercialFeatures'
|
||||
property 'forge.logging.console.level', 'info'
|
||||
property 'fml.earlyprogresswindow', 'false'
|
||||
mods {
|
||||
|
|
|
@ -371,6 +371,7 @@ e815bfd854c2653f10828bb11950f7fb991d7efc assets/create/blockstates/speedometer.j
|
|||
1cb7cdbefa0ff199263782809287854b9d85074c assets/create/blockstates/spout.json
|
||||
d62b7908119fa4f51715a186d0882b388bb25cab assets/create/blockstates/spruce_window.json
|
||||
8d7dfa60630a8b4bae4e8eca5c66e1cfa34dda1f assets/create/blockstates/spruce_window_pane.json
|
||||
5d7385d28a23dcfc95a221d36d82337908582726 assets/create/blockstates/sticker.json
|
||||
3d93eabbb327aecc526beae9c62283f1d43eb710 assets/create/blockstates/sticky_mechanical_piston.json
|
||||
f385988cb6fa9c48b5d59a6942ec50ed2b60c8bf assets/create/blockstates/stockpile_switch.json
|
||||
e815bfd854c2653f10828bb11950f7fb991d7efc assets/create/blockstates/stressometer.json
|
||||
|
@ -400,20 +401,6 @@ a3a11524cd3515fc01d905767b4b7ea782adaf03 assets/create/blockstates/yellow_seat.j
|
|||
6801fa1f466f172700e573e5b8ee8ee5f9ca4583 assets/create/blockstates/yellow_valve_handle.json
|
||||
7f39521b211441f5c3e06d60c5978cebe16cacfb assets/create/blockstates/zinc_block.json
|
||||
b7181bcd8182b2f17088e5aa881f374c9c65470c assets/create/blockstates/zinc_ore.json
|
||||
e3f618c5b622d21880de858678d1802cbf65e615 assets/create/lang/en_ud.json
|
||||
3c37fa4654a24869c15a12e01d60b5bf38ed260b assets/create/lang/en_us.json
|
||||
72f2d5e2d235338091671ff89f1225c427174eba assets/create/lang/unfinished/de_de.json
|
||||
2c4140f942ca2c799a899d8aaa2cbc2fdbca780e assets/create/lang/unfinished/es_es.json
|
||||
c42b6dda6a1f90763d7ef82c5fbce962febeb8db assets/create/lang/unfinished/es_mx.json
|
||||
ca09de2a4554a79b1ed4e25538dc441c9aed68e2 assets/create/lang/unfinished/fr_fr.json
|
||||
b599e283914c9b07f8c4fd5f875af8438065148d assets/create/lang/unfinished/it_it.json
|
||||
7482b319553c7ae226fcea8c8e4908ce3fc01e6b assets/create/lang/unfinished/ja_jp.json
|
||||
36b2f77f5365f99734bbb1565a478a5bb86300a1 assets/create/lang/unfinished/ko_kr.json
|
||||
4981e34cecbe98823ac39fd1743647218c88b679 assets/create/lang/unfinished/nl_nl.json
|
||||
2202c60512efb9de3c53ef47af98c78d0f26f012 assets/create/lang/unfinished/pt_br.json
|
||||
209f7d43d6f0ea161881eeb9aaae9b909c75f2a7 assets/create/lang/unfinished/ru_ru.json
|
||||
b330bf998d525c025c0f44063963be3b99158156 assets/create/lang/unfinished/zh_cn.json
|
||||
dfb0014541a6953406195b51286e4c69e192a336 assets/create/lang/unfinished/zh_tw.json
|
||||
846200eb548d3bfa2e77b41039de159b4b6cfb45 assets/create/models/block/acacia_window.json
|
||||
1930fa3a3c98d53dd19e4ee7f55bc27fd47aa281 assets/create/models/block/acacia_window_pane_noside.json
|
||||
1763ea2c9b981d187f5031ba608f3d5d3be3986a assets/create/models/block/acacia_window_pane_noside_alt.json
|
||||
|
@ -1192,6 +1179,7 @@ afd697168c9786eb80e54eccdc6a23afa6c7fb0e assets/create/models/item/chiseled_gabb
|
|||
a47fbe5f2da79080d99ef0975bfa8da4d08f8be4 assets/create/models/item/chiseled_scoria.json
|
||||
70232ce9b88119fb383717e2c1ad113f7aad6a99 assets/create/models/item/chiseled_weathered_limestone.json
|
||||
eabf1870127d78c920305228eb51ddf36c44d016 assets/create/models/item/chocolate_bucket.json
|
||||
473c8fcc3c53a7680b2f1c6505517c79fd07153a assets/create/models/item/chocolate_glazed_berries.json
|
||||
fe67c3f380d17735a9436a4579a8be1a02b8e4a0 assets/create/models/item/chute.json
|
||||
d418205c83d3e57c830755ee8c09e2962353e493 assets/create/models/item/cinder_flour.json
|
||||
c1da21be9f1af4f7a2ef4ec9cd92195d65ada316 assets/create/models/item/clockwork_bearing.json
|
||||
|
@ -1329,6 +1317,7 @@ b10f1b188f2bf380628377bd42af2b8f8ffe5611 assets/create/models/item/gantry_pinion
|
|||
b4bfd5041b62f3a0a955fa4872d178b590614f22 assets/create/models/item/gantry_shaft.json
|
||||
6ab0d17f3d02678ed992e188ff09f6b2c00b5b03 assets/create/models/item/gearbox.json
|
||||
2fe29893d74c176ea35aed73a169c13dd4ddb2a8 assets/create/models/item/gearshift.json
|
||||
21c3dc6a734be582c149b9d1d7da209e178ed58a assets/create/models/item/goggles.json
|
||||
52108a61865dab38133b9f916496ca680ae364ea assets/create/models/item/golden_sheet.json
|
||||
46d813bcb6676078347383295bb7dbda1d9dd060 assets/create/models/item/granite_bricks.json
|
||||
032a31c66d3de63595d478165d54b4f562e9831d assets/create/models/item/granite_bricks_slab.json
|
||||
|
@ -1347,6 +1336,7 @@ ecb9f32f62d3fa43fb226ab85adc2eb229fdfb77 assets/create/models/item/green_valve_h
|
|||
cfab82a2cf7495d21778c1de9730a26afbdd523d assets/create/models/item/handheld_blockzapper.json
|
||||
dee43bf1a9c211a752fac2c07aeba123f7f0c914 assets/create/models/item/handheld_worldshaper.json
|
||||
967695ab65edb8cb19e9759425f2d12d75406122 assets/create/models/item/honey_bucket.json
|
||||
31809415a3119aeda37cff6f16d2cf47f71e097f assets/create/models/item/honeyed_apple.json
|
||||
e7ec65ad5be13cae5f7d60836b8df9e4a5baad56 assets/create/models/item/horizontal_framed_glass.json
|
||||
f0e3b2b8a553b6e61746c922c27302dabfff71b6 assets/create/models/item/horizontal_framed_glass_pane.json
|
||||
ff92f6a9dfb73a6ee1eaaed3279c89390ff04a80 assets/create/models/item/hose_pulley.json
|
||||
|
@ -1541,10 +1531,12 @@ d6fb0d38b1b5bcc199b52ac8889eaecd167f6725 assets/create/models/item/speedometer.j
|
|||
b9abe1331d49871838231f3a8e5d2973634e9325 assets/create/models/item/spout.json
|
||||
b305e81f1dc5272634745b6e822af40955a2ef28 assets/create/models/item/spruce_window.json
|
||||
5f622bca8386b8dd077310647e39ac3abb80c6a1 assets/create/models/item/spruce_window_pane.json
|
||||
bb546e5342c6d1a6b4040cf7ccdd2f10c6f79965 assets/create/models/item/sticker.json
|
||||
891abc24593d53d282773eca5534065056d89b4c assets/create/models/item/sticky_mechanical_piston.json
|
||||
bbb5773adc23128c70174bfc531af936e6e063e3 assets/create/models/item/stockpile_switch.json
|
||||
bab8f78c319b2a79ed55c5d2a94b521ddaa44996 assets/create/models/item/stressometer.json
|
||||
29d571a061e3addf92ee51bfc55d96edc3a517a5 assets/create/models/item/super_glue.json
|
||||
9be61d209d2219ca00d35de7cd57c2c87b297379 assets/create/models/item/sweet_roll.json
|
||||
b1d3d00ff05908feacad06a86800da96cc9bc65d assets/create/models/item/tiled_glass.json
|
||||
8a2a81a8cbc52b6021e57107d79a32f73b82d8fe assets/create/models/item/tiled_glass_pane.json
|
||||
c081317f106a2b04700aafde12c57445844c20ab assets/create/models/item/tree_fertilizer.json
|
||||
|
@ -1812,6 +1804,7 @@ cd8cefee21a1690f9158b8e8661a92d20ad0f535 data/create/advancements/recipes/create
|
|||
e8a5d924ccf30b6eae4b9ec0a8040e31f0eb165b data/create/advancements/recipes/create.base/crafting/kinetics/speedometer.json
|
||||
90ff137eb1533695d9d17296ed180c0a88ddd891 data/create/advancements/recipes/create.base/crafting/kinetics/speedometerfrom_conversion.json
|
||||
44867af16ec6d960268747effcd578ab55e3a366 data/create/advancements/recipes/create.base/crafting/kinetics/spout.json
|
||||
8c7fd72b8b4d414a61859dd08857e8538d84f88b data/create/advancements/recipes/create.base/crafting/kinetics/sticker.json
|
||||
3859abc8839e92b01461d3e9ef853a4934c3256b data/create/advancements/recipes/create.base/crafting/kinetics/sticky_mechanical_piston.json
|
||||
9a4dad31370d9e71308afe5c3f9349b67f749635 data/create/advancements/recipes/create.base/crafting/kinetics/stressometerfrom_conversion.json
|
||||
f3fc3d4fee0712906f833aa17185f0bacb21922f data/create/advancements/recipes/create.base/crafting/kinetics/super_glue.json
|
||||
|
@ -2661,6 +2654,7 @@ b127cb6920e6d7d9c8b2402cb186402a9a8dd3fc data/create/loot_tables/blocks/shaft.js
|
|||
f6c497d625de67ea9377e840208b1be539d13b73 data/create/loot_tables/blocks/spout.json
|
||||
a23a1e332c9ba84474e3c0588e8a0857afe346e0 data/create/loot_tables/blocks/spruce_window.json
|
||||
3ee2350936ea82fef716bc58e4cd088a384616f0 data/create/loot_tables/blocks/spruce_window_pane.json
|
||||
111a3bb893abb899652a923b10ca7dc5ea424e5f data/create/loot_tables/blocks/sticker.json
|
||||
8d2970acd61b96844a4308d87e858b1612d5862e data/create/loot_tables/blocks/sticky_mechanical_piston.json
|
||||
ec2889e712702644092197a4b41a682fb953817d data/create/loot_tables/blocks/stockpile_switch.json
|
||||
3479775008a256bc35f98b31655975f7d5c836b2 data/create/loot_tables/blocks/stressometer.json
|
||||
|
@ -2872,6 +2866,7 @@ a17db27e61baa45f8a6ecb46a6d2a5a464704f8b data/create/recipes/crafting/kinetics/s
|
|||
b1a74f0b51fa37ca1ed814266b3d69b8b7e69fa3 data/create/recipes/crafting/kinetics/speedometer.json
|
||||
8d632845deeb723e1a56083536ee5f9d60de2fcb data/create/recipes/crafting/kinetics/speedometerfrom_conversion.json
|
||||
eea9d4066cd2fafef40b50b79323dcc603fa6388 data/create/recipes/crafting/kinetics/spout.json
|
||||
e532a5c405e48b415e3fcd4f7c6183ea335cb915 data/create/recipes/crafting/kinetics/sticker.json
|
||||
3be40664acfd150d0617bc138dc2dd9d54a21b3a data/create/recipes/crafting/kinetics/sticky_mechanical_piston.json
|
||||
af5854ee2fa3be195ad9abcdeebe6ed7306b651c data/create/recipes/crafting/kinetics/stressometerfrom_conversion.json
|
||||
21f885a674603367b67e1e993c175638cbda9ea3 data/create/recipes/crafting/kinetics/super_glue.json
|
||||
|
@ -3113,12 +3108,15 @@ d2ab9ce73636773165564506580f2ec13bd1fc50 data/create/recipes/fancy_weathered_lim
|
|||
1d0e41ca98e48073c72adf4077610c96e592f9a5 data/create/recipes/fancy_weathered_limestone_bricks_wall_from_fancy_weathered_limestone_bricks_stonecutting.json
|
||||
133e79f78a7f2c2f63ac7695d2be57d56e8955f4 data/create/recipes/filling/blaze_cake.json
|
||||
642e96ce5dd2f31e7a33c6ef4060eecb0bf2aa86 data/create/recipes/filling/builders_tea.json
|
||||
1367357fc36adc4b67467d90589ef91e657380a4 data/create/recipes/filling/chocolate_glazed_berries.json
|
||||
5bec6c2068a3c1005810d18bd45ce916389b5423 data/create/recipes/filling/glowstone.json
|
||||
5eb6227ccb6fa940b662d3ec029c3bd61fe61c8d data/create/recipes/filling/grass_block.json
|
||||
244f27eadefefbc966ac384ac087c57d19484321 data/create/recipes/filling/gunpowder.json
|
||||
c8ca74a6cd071308a1750a2ad1153e79422598a0 data/create/recipes/filling/honey_bottle.json
|
||||
d20703b67dd5e4c9b75718db02d575b1c7415c12 data/create/recipes/filling/honeyed_apple.json
|
||||
c83e77a9799b6ca34dd73aa76b56159f2103c48c data/create/recipes/filling/milk_bucket.json
|
||||
08ce1420d1551ecfef5988977436c087123851a6 data/create/recipes/filling/redstone.json
|
||||
fb8e4378cd2240644a4b5c0d06e27ad772ec7695 data/create/recipes/filling/sweet_roll.json
|
||||
5b8bbde7f8b270ab75fac18d6858f2fadbc0efa3 data/create/recipes/framed_glass_from_glass_colorless_stonecutting.json
|
||||
d697de0c9b706ca4e18da7a2d769e7e5fe8d769d data/create/recipes/framed_glass_pane.json
|
||||
a0dae50faaa1b7142bb4309675e3084c68daa547 data/create/recipes/gabbro_bricks_from_gabbro_stonecutting.json
|
||||
|
@ -3540,7 +3538,7 @@ eac71740fb12bdb38b5dfaa2268613d7ba82b809 data/create/tags/blocks/windmill_sails.
|
|||
081f5aa35602fc27af2ca01ea9f2fd5e7eb284dc data/create/tags/items/create_ingots.json
|
||||
94c62bf22678ef55b2b8a5398a7960e5b00682dc data/create/tags/items/crushed_ores.json
|
||||
6cdeeac1689f7b5bfd9bc40b462143d8eaf3ad0b data/create/tags/items/seats.json
|
||||
43ae6f21db7b43984e163af11f4e6cc80459803a data/create/tags/items/upright_on_belt.json
|
||||
c7efc23c08d5e3602c84ff43dac18f72b1cfced3 data/create/tags/items/upright_on_belt.json
|
||||
50936b211d94167a35ec78c89954082a336b6269 data/create/tags/items/valve_handles.json
|
||||
16bcb8fcbe9170c2c11f1ca8d99d8b36cd812bbd data/forge/tags/blocks/glass/colorless.json
|
||||
81ced867d24ec814942909965dd4576eff1db685 data/forge/tags/blocks/glass_panes.json
|
||||
|
|
108
src/generated/resources/assets/create/blockstates/sticker.json
Normal file
108
src/generated/resources/assets/create/blockstates/sticker.json
Normal file
|
@ -0,0 +1,108 @@
|
|||
{
|
||||
"variants": {
|
||||
"extended=false,facing=down,powered=false": {
|
||||
"model": "create:block/sticker/block",
|
||||
"x": 180
|
||||
},
|
||||
"extended=true,facing=down,powered=false": {
|
||||
"model": "create:block/sticker/block",
|
||||
"x": 180
|
||||
},
|
||||
"extended=false,facing=up,powered=false": {
|
||||
"model": "create:block/sticker/block"
|
||||
},
|
||||
"extended=true,facing=up,powered=false": {
|
||||
"model": "create:block/sticker/block"
|
||||
},
|
||||
"extended=false,facing=north,powered=false": {
|
||||
"model": "create:block/sticker/block",
|
||||
"x": 90
|
||||
},
|
||||
"extended=true,facing=north,powered=false": {
|
||||
"model": "create:block/sticker/block",
|
||||
"x": 90
|
||||
},
|
||||
"extended=false,facing=south,powered=false": {
|
||||
"model": "create:block/sticker/block",
|
||||
"x": 90,
|
||||
"y": 180
|
||||
},
|
||||
"extended=true,facing=south,powered=false": {
|
||||
"model": "create:block/sticker/block",
|
||||
"x": 90,
|
||||
"y": 180
|
||||
},
|
||||
"extended=false,facing=west,powered=false": {
|
||||
"model": "create:block/sticker/block",
|
||||
"x": 90,
|
||||
"y": 270
|
||||
},
|
||||
"extended=true,facing=west,powered=false": {
|
||||
"model": "create:block/sticker/block",
|
||||
"x": 90,
|
||||
"y": 270
|
||||
},
|
||||
"extended=false,facing=east,powered=false": {
|
||||
"model": "create:block/sticker/block",
|
||||
"x": 90,
|
||||
"y": 90
|
||||
},
|
||||
"extended=true,facing=east,powered=false": {
|
||||
"model": "create:block/sticker/block",
|
||||
"x": 90,
|
||||
"y": 90
|
||||
},
|
||||
"extended=false,facing=down,powered=true": {
|
||||
"model": "create:block/sticker/block_powered",
|
||||
"x": 180
|
||||
},
|
||||
"extended=true,facing=down,powered=true": {
|
||||
"model": "create:block/sticker/block_powered",
|
||||
"x": 180
|
||||
},
|
||||
"extended=false,facing=up,powered=true": {
|
||||
"model": "create:block/sticker/block_powered"
|
||||
},
|
||||
"extended=true,facing=up,powered=true": {
|
||||
"model": "create:block/sticker/block_powered"
|
||||
},
|
||||
"extended=false,facing=north,powered=true": {
|
||||
"model": "create:block/sticker/block_powered",
|
||||
"x": 90
|
||||
},
|
||||
"extended=true,facing=north,powered=true": {
|
||||
"model": "create:block/sticker/block_powered",
|
||||
"x": 90
|
||||
},
|
||||
"extended=false,facing=south,powered=true": {
|
||||
"model": "create:block/sticker/block_powered",
|
||||
"x": 90,
|
||||
"y": 180
|
||||
},
|
||||
"extended=true,facing=south,powered=true": {
|
||||
"model": "create:block/sticker/block_powered",
|
||||
"x": 90,
|
||||
"y": 180
|
||||
},
|
||||
"extended=false,facing=west,powered=true": {
|
||||
"model": "create:block/sticker/block_powered",
|
||||
"x": 90,
|
||||
"y": 270
|
||||
},
|
||||
"extended=true,facing=west,powered=true": {
|
||||
"model": "create:block/sticker/block_powered",
|
||||
"x": 90,
|
||||
"y": 270
|
||||
},
|
||||
"extended=false,facing=east,powered=true": {
|
||||
"model": "create:block/sticker/block_powered",
|
||||
"x": 90,
|
||||
"y": 90
|
||||
},
|
||||
"extended=true,facing=east,powered=true": {
|
||||
"model": "create:block/sticker/block_powered",
|
||||
"x": 90,
|
||||
"y": 90
|
||||
}
|
||||
}
|
||||
}
|
|
@ -372,6 +372,7 @@
|
|||
"block.create.spout": "\u0287nodS",
|
||||
"block.create.spruce_window": "\u028Dopu\u0131M \u01DD\u0254n\u0279dS",
|
||||
"block.create.spruce_window_pane": "\u01DDu\u0250\u0500 \u028Dopu\u0131M \u01DD\u0254n\u0279dS",
|
||||
"block.create.sticker": "\u0279\u01DD\u029E\u0254\u0131\u0287S",
|
||||
"block.create.sticky_mechanical_piston": "uo\u0287s\u0131\u0500 \u05DF\u0250\u0254\u0131u\u0250\u0265\u0254\u01DDW \u028E\u029E\u0254\u0131\u0287S",
|
||||
"block.create.stockpile_switch": "\u0265\u0254\u0287\u0131\u028DS \u01DD\u05DF\u0131d\u029E\u0254o\u0287S",
|
||||
"block.create.stressometer": "\u0279\u01DD\u0287\u01DD\u026Foss\u01DD\u0279\u0287S",
|
||||
|
@ -422,6 +423,7 @@
|
|||
"item.create.builders_tea": "\u0250\u01DD\u27D8 s,\u0279\u01DDp\u05DF\u0131n\u15FA",
|
||||
"item.create.chest_minecart_contraption": "uo\u0131\u0287d\u0250\u0279\u0287uo\u0186 \u0287\u0279\u0250\u0254\u01DDu\u0131W \u0287s\u01DD\u0265\u0186",
|
||||
"item.create.chocolate_bucket": "\u0287\u01DD\u029E\u0254n\u15FA \u01DD\u0287\u0250\u05DFo\u0254o\u0265\u0186",
|
||||
"item.create.chocolate_glazed_berries": "s\u01DD\u0131\u0279\u0279\u01DD\u15FA p\u01DDz\u0250\u05DF\u2141 \u01DD\u0287\u0250\u05DFo\u0254o\u0265\u0186",
|
||||
"item.create.chromatic_compound": "punod\u026Fo\u0186 \u0254\u0131\u0287\u0250\u026Fo\u0279\u0265\u0186",
|
||||
"item.create.cinder_flour": "\u0279no\u05DF\u2132 \u0279\u01DDpu\u0131\u0186",
|
||||
"item.create.copper_ingot": "\u0287obuI \u0279\u01DDddo\u0186",
|
||||
|
@ -455,6 +457,7 @@
|
|||
"item.create.handheld_blockzapper": "\u0279\u01DDdd\u0250z\u029E\u0254o\u05DF\u15FA p\u05DF\u01DD\u0265pu\u0250H",
|
||||
"item.create.handheld_worldshaper": "\u0279\u01DDd\u0250\u0265sp\u05DF\u0279oM p\u05DF\u01DD\u0265pu\u0250H",
|
||||
"item.create.honey_bucket": "\u0287\u01DD\u029E\u0254n\u15FA \u028E\u01DDuoH",
|
||||
"item.create.honeyed_apple": "\u01DD\u05DFdd\u2C6F p\u01DD\u028E\u01DDuoH",
|
||||
"item.create.integrated_circuit": "\u0287\u0131n\u0254\u0279\u0131\u0186 p\u01DD\u0287\u0250\u0279b\u01DD\u0287uI",
|
||||
"item.create.iron_sheet": "\u0287\u01DD\u01DD\u0265S uo\u0279I",
|
||||
"item.create.lapis_sheet": "\u0287\u01DD\u01DD\u0265S s\u0131d\u0250\uA780",
|
||||
|
@ -471,6 +474,7 @@
|
|||
"item.create.schematic_and_quill": "\u05DF\u05DF\u0131n\u1F49 pu\u2C6F \u0254\u0131\u0287\u0250\u026F\u01DD\u0265\u0254S",
|
||||
"item.create.shadow_steel": "\u05DF\u01DD\u01DD\u0287S \u028Dop\u0250\u0265S",
|
||||
"item.create.super_glue": "\u01DDn\u05DF\u2141 \u0279\u01DDdnS",
|
||||
"item.create.sweet_roll": "\u05DF\u05DFo\u1D1A \u0287\u01DD\u01DD\u028DS",
|
||||
"item.create.tree_fertilizer": "\u0279\u01DDz\u0131\u05DF\u0131\u0287\u0279\u01DD\u2132 \u01DD\u01DD\u0279\u27D8",
|
||||
"item.create.vertical_gearbox": "xoq\u0279\u0250\u01DD\u2141 \u05DF\u0250\u0254\u0131\u0287\u0279\u01DD\u039B",
|
||||
"item.create.wand_of_symmetry": "\u028E\u0279\u0287\u01DD\u026F\u026F\u028ES \u025FO pu\u0250M",
|
||||
|
|
|
@ -375,6 +375,7 @@
|
|||
"block.create.spout": "Spout",
|
||||
"block.create.spruce_window": "Spruce Window",
|
||||
"block.create.spruce_window_pane": "Spruce Window Pane",
|
||||
"block.create.sticker": "Sticker",
|
||||
"block.create.sticky_mechanical_piston": "Sticky Mechanical Piston",
|
||||
"block.create.stockpile_switch": "Stockpile Switch",
|
||||
"block.create.stressometer": "Stressometer",
|
||||
|
@ -428,6 +429,7 @@
|
|||
"item.create.builders_tea": "Builder's Tea",
|
||||
"item.create.chest_minecart_contraption": "Chest Minecart Contraption",
|
||||
"item.create.chocolate_bucket": "Chocolate Bucket",
|
||||
"item.create.chocolate_glazed_berries": "Chocolate Glazed Berries",
|
||||
"item.create.chromatic_compound": "Chromatic Compound",
|
||||
"item.create.cinder_flour": "Cinder Flour",
|
||||
"item.create.copper_ingot": "Copper Ingot",
|
||||
|
@ -461,6 +463,7 @@
|
|||
"item.create.handheld_blockzapper": "Handheld Blockzapper",
|
||||
"item.create.handheld_worldshaper": "Handheld Worldshaper",
|
||||
"item.create.honey_bucket": "Honey Bucket",
|
||||
"item.create.honeyed_apple": "Honeyed Apple",
|
||||
"item.create.integrated_circuit": "Integrated Circuit",
|
||||
"item.create.iron_sheet": "Iron Sheet",
|
||||
"item.create.lapis_sheet": "Lapis Sheet",
|
||||
|
@ -477,6 +480,7 @@
|
|||
"item.create.schematic_and_quill": "Schematic And Quill",
|
||||
"item.create.shadow_steel": "Shadow Steel",
|
||||
"item.create.super_glue": "Super Glue",
|
||||
"item.create.sweet_roll": "Sweet Roll",
|
||||
"item.create.tree_fertilizer": "Tree Fertilizer",
|
||||
"item.create.vertical_gearbox": "Vertical Gearbox",
|
||||
"item.create.wand_of_symmetry": "Wand Of Symmetry",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"_": "Missing Localizations: 985",
|
||||
|
||||
|
||||
"_": "->------------------------] Game Elements [------------------------<-",
|
||||
|
||||
|
@ -376,6 +376,7 @@
|
|||
"block.create.spout": "UNLOCALIZED: Spout",
|
||||
"block.create.spruce_window": "UNLOCALIZED: Spruce Window",
|
||||
"block.create.spruce_window_pane": "UNLOCALIZED: Spruce Window Pane",
|
||||
"block.create.sticker": "UNLOCALIZED: Sticker",
|
||||
"block.create.sticky_mechanical_piston": "Klebriger Mechanischer Kolben",
|
||||
"block.create.stockpile_switch": "Vorratssensor",
|
||||
"block.create.stressometer": "UNLOCALIZED: Stressometer",
|
||||
|
@ -429,6 +430,7 @@
|
|||
"item.create.builders_tea": "UNLOCALIZED: Builder's Tea",
|
||||
"item.create.chest_minecart_contraption": "UNLOCALIZED: Chest Minecart Contraption",
|
||||
"item.create.chocolate_bucket": "UNLOCALIZED: Chocolate Bucket",
|
||||
"item.create.chocolate_glazed_berries": "UNLOCALIZED: Chocolate Glazed Berries",
|
||||
"item.create.chromatic_compound": "UNLOCALIZED: Chromatic Compound",
|
||||
"item.create.cinder_flour": "UNLOCALIZED: Cinder Flour",
|
||||
"item.create.copper_ingot": "UNLOCALIZED: Copper Ingot",
|
||||
|
@ -462,6 +464,7 @@
|
|||
"item.create.handheld_blockzapper": "Blockpistole",
|
||||
"item.create.handheld_worldshaper": "Geländeformer",
|
||||
"item.create.honey_bucket": "Honigeimer",
|
||||
"item.create.honeyed_apple": "UNLOCALIZED: Honeyed Apple",
|
||||
"item.create.integrated_circuit": "UNLOCALIZED: Integrated Circuit",
|
||||
"item.create.iron_sheet": "Eisenblech",
|
||||
"item.create.lapis_sheet": "UNLOCALIZED: Lapis Sheet",
|
||||
|
@ -478,6 +481,7 @@
|
|||
"item.create.schematic_and_quill": "Bauplan und Feder",
|
||||
"item.create.shadow_steel": "UNLOCALIZED: Shadow Steel",
|
||||
"item.create.super_glue": "Superkleber",
|
||||
"item.create.sweet_roll": "UNLOCALIZED: Sweet Roll",
|
||||
"item.create.tree_fertilizer": "Baumdünger",
|
||||
"item.create.vertical_gearbox": "UNLOCALIZED: Vertical Gearbox",
|
||||
"item.create.wand_of_symmetry": "Symmetriestab",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"_": "Missing Localizations: 27",
|
||||
|
||||
|
||||
"_": "->------------------------] Game Elements [------------------------<-",
|
||||
|
||||
|
@ -376,6 +376,7 @@
|
|||
"block.create.spout": "Surtidor",
|
||||
"block.create.spruce_window": "Ventana de abeto",
|
||||
"block.create.spruce_window_pane": "Panel de ventana de abeto",
|
||||
"block.create.sticker": "UNLOCALIZED: Sticker",
|
||||
"block.create.sticky_mechanical_piston": "Pistón mecánico pegajoso",
|
||||
"block.create.stockpile_switch": "Interruptor de acopio",
|
||||
"block.create.stressometer": "Estresómetro",
|
||||
|
@ -429,6 +430,7 @@
|
|||
"item.create.builders_tea": "Té del Constructor",
|
||||
"item.create.chest_minecart_contraption": "Artilugio de vagoneta con cofre",
|
||||
"item.create.chocolate_bucket": "Cubo de chocolate",
|
||||
"item.create.chocolate_glazed_berries": "UNLOCALIZED: Chocolate Glazed Berries",
|
||||
"item.create.chromatic_compound": "Compuesto cromático",
|
||||
"item.create.cinder_flour": "Harina de ceniza",
|
||||
"item.create.copper_ingot": "Lingote de cobre",
|
||||
|
@ -462,6 +464,7 @@
|
|||
"item.create.handheld_blockzapper": "Blockzapper",
|
||||
"item.create.handheld_worldshaper": "Worldshaper",
|
||||
"item.create.honey_bucket": "Cubo de miel",
|
||||
"item.create.honeyed_apple": "UNLOCALIZED: Honeyed Apple",
|
||||
"item.create.integrated_circuit": "Chip de circuito integrado",
|
||||
"item.create.iron_sheet": "Lámina de hierro",
|
||||
"item.create.lapis_sheet": "Lámina de lapislázuli",
|
||||
|
@ -478,6 +481,7 @@
|
|||
"item.create.schematic_and_quill": "Esquema y Pluma",
|
||||
"item.create.shadow_steel": "Acero sombrío",
|
||||
"item.create.super_glue": "Super Pegamento",
|
||||
"item.create.sweet_roll": "UNLOCALIZED: Sweet Roll",
|
||||
"item.create.tree_fertilizer": "Fertilizador de árboles",
|
||||
"item.create.vertical_gearbox": "Caja de transmisión vertical",
|
||||
"item.create.wand_of_symmetry": "Varita de simetría",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"_": "Missing Localizations: 915",
|
||||
|
||||
|
||||
"_": "->------------------------] Game Elements [------------------------<-",
|
||||
|
||||
|
@ -376,6 +376,7 @@
|
|||
"block.create.spout": "Canaleta",
|
||||
"block.create.spruce_window": "Ventana de Abeto",
|
||||
"block.create.spruce_window_pane": "Panel de Ventana de Abeto",
|
||||
"block.create.sticker": "UNLOCALIZED: Sticker",
|
||||
"block.create.sticky_mechanical_piston": "Pistón Mecánico Pegajoso",
|
||||
"block.create.stockpile_switch": "Interruptor de Pila",
|
||||
"block.create.stressometer": "Estresómetro",
|
||||
|
@ -429,6 +430,7 @@
|
|||
"item.create.builders_tea": "Té del Constructor",
|
||||
"item.create.chest_minecart_contraption": "Artefacto de Vagón con Cofre",
|
||||
"item.create.chocolate_bucket": "Cubeta de Chocolate",
|
||||
"item.create.chocolate_glazed_berries": "UNLOCALIZED: Chocolate Glazed Berries",
|
||||
"item.create.chromatic_compound": "Compuesto Cromático",
|
||||
"item.create.cinder_flour": "Ceniza Molida",
|
||||
"item.create.copper_ingot": "Lingote de Cobre",
|
||||
|
@ -462,6 +464,7 @@
|
|||
"item.create.handheld_blockzapper": "Pistola de Manipulación de Bloques",
|
||||
"item.create.handheld_worldshaper": "Pistola de Manipulación de Mundo",
|
||||
"item.create.honey_bucket": "Cubeta de Miel",
|
||||
"item.create.honeyed_apple": "UNLOCALIZED: Honeyed Apple",
|
||||
"item.create.integrated_circuit": "Circuito Integrado",
|
||||
"item.create.iron_sheet": "Lámina de Hierro",
|
||||
"item.create.lapis_sheet": "Lámina de Lapislázuli",
|
||||
|
@ -478,6 +481,7 @@
|
|||
"item.create.schematic_and_quill": "Esquema y Pluma",
|
||||
"item.create.shadow_steel": "Acero Sombrío",
|
||||
"item.create.super_glue": "Super Pegamento",
|
||||
"item.create.sweet_roll": "UNLOCALIZED: Sweet Roll",
|
||||
"item.create.tree_fertilizer": "Fertilizador de Árboles",
|
||||
"item.create.vertical_gearbox": "Transmisión Vertical",
|
||||
"item.create.wand_of_symmetry": "Vara de la Simetria",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"_": "Missing Localizations: 697",
|
||||
|
||||
|
||||
"_": "->------------------------] Game Elements [------------------------<-",
|
||||
|
||||
|
@ -376,6 +376,7 @@
|
|||
"block.create.spout": "UNLOCALIZED: Spout",
|
||||
"block.create.spruce_window": "UNLOCALIZED: Spruce Window",
|
||||
"block.create.spruce_window_pane": "UNLOCALIZED: Spruce Window Pane",
|
||||
"block.create.sticker": "UNLOCALIZED: Sticker",
|
||||
"block.create.sticky_mechanical_piston": "Piston mécanique collant",
|
||||
"block.create.stockpile_switch": "Détecteur de stockage",
|
||||
"block.create.stressometer": "Stressomètre",
|
||||
|
@ -429,6 +430,7 @@
|
|||
"item.create.builders_tea": "Thé du constructeur",
|
||||
"item.create.chest_minecart_contraption": "Engin de wagonnet avec coffre",
|
||||
"item.create.chocolate_bucket": "Seau de chocolat",
|
||||
"item.create.chocolate_glazed_berries": "UNLOCALIZED: Chocolate Glazed Berries",
|
||||
"item.create.chromatic_compound": "Composé chromatique",
|
||||
"item.create.cinder_flour": "Farine de braise",
|
||||
"item.create.copper_ingot": "Lingot de cuivre",
|
||||
|
@ -462,6 +464,7 @@
|
|||
"item.create.handheld_blockzapper": "Blockzappeur portable",
|
||||
"item.create.handheld_worldshaper": "Térraformeur portable",
|
||||
"item.create.honey_bucket": "Seau de miel",
|
||||
"item.create.honeyed_apple": "UNLOCALIZED: Honeyed Apple",
|
||||
"item.create.integrated_circuit": "Circuit intégré",
|
||||
"item.create.iron_sheet": "Plaque de Fer",
|
||||
"item.create.lapis_sheet": "Feuille de lapis",
|
||||
|
@ -478,6 +481,7 @@
|
|||
"item.create.schematic_and_quill": "Schéma et plume",
|
||||
"item.create.shadow_steel": "Acier sombre",
|
||||
"item.create.super_glue": "Colle extra-forte",
|
||||
"item.create.sweet_roll": "UNLOCALIZED: Sweet Roll",
|
||||
"item.create.tree_fertilizer": "Engrais pour arbres",
|
||||
"item.create.vertical_gearbox": "Boîte de transfert verticale",
|
||||
"item.create.wand_of_symmetry": "Bâton de symétrie",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"_": "Missing Localizations: 32",
|
||||
|
||||
|
||||
"_": "->------------------------] Game Elements [------------------------<-",
|
||||
|
||||
|
@ -376,6 +376,7 @@
|
|||
"block.create.spout": "Spruzzo",
|
||||
"block.create.spruce_window": "Finestra di abete",
|
||||
"block.create.spruce_window_pane": "Pannello di finestra di abete",
|
||||
"block.create.sticker": "UNLOCALIZED: Sticker",
|
||||
"block.create.sticky_mechanical_piston": "Pistone meccanico appiccicoso",
|
||||
"block.create.stockpile_switch": "Interruttore accumulatore",
|
||||
"block.create.stressometer": "Stressometro",
|
||||
|
@ -429,6 +430,7 @@
|
|||
"item.create.builders_tea": "Tè del costruttore",
|
||||
"item.create.chest_minecart_contraption": "Contrazione per carrello da miniera con baule",
|
||||
"item.create.chocolate_bucket": "Secchio di cioccolata",
|
||||
"item.create.chocolate_glazed_berries": "UNLOCALIZED: Chocolate Glazed Berries",
|
||||
"item.create.chromatic_compound": "Composto cromatico",
|
||||
"item.create.cinder_flour": "Cenere farinosa",
|
||||
"item.create.copper_ingot": "Lingotto di rame",
|
||||
|
@ -462,6 +464,7 @@
|
|||
"item.create.handheld_blockzapper": "Zapper di blocchi portatile",
|
||||
"item.create.handheld_worldshaper": "Plasmatore del mondo portatile",
|
||||
"item.create.honey_bucket": "Secchio di miele",
|
||||
"item.create.honeyed_apple": "UNLOCALIZED: Honeyed Apple",
|
||||
"item.create.integrated_circuit": "Circuito integrato",
|
||||
"item.create.iron_sheet": "Lamiera di ferro",
|
||||
"item.create.lapis_sheet": "Lamiera di lapislazzuli",
|
||||
|
@ -478,6 +481,7 @@
|
|||
"item.create.schematic_and_quill": "Schematica e penna d'oca",
|
||||
"item.create.shadow_steel": "Acciaio oscuro",
|
||||
"item.create.super_glue": "Super colla",
|
||||
"item.create.sweet_roll": "UNLOCALIZED: Sweet Roll",
|
||||
"item.create.tree_fertilizer": "Fertilizzante per alberi",
|
||||
"item.create.vertical_gearbox": "Riduttore verticale",
|
||||
"item.create.wand_of_symmetry": "Asta di simmetria",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"_": "Missing Localizations: 39",
|
||||
|
||||
|
||||
"_": "->------------------------] Game Elements [------------------------<-",
|
||||
|
||||
|
@ -376,6 +376,7 @@
|
|||
"block.create.spout": "アイテム注液口",
|
||||
"block.create.spruce_window": "マツの窓",
|
||||
"block.create.spruce_window_pane": "マツの窓パネル",
|
||||
"block.create.sticker": "UNLOCALIZED: Sticker",
|
||||
"block.create.sticky_mechanical_piston": "粘着メカニカルピストン",
|
||||
"block.create.stockpile_switch": "在庫スイッチ",
|
||||
"block.create.stressometer": "応力メーター",
|
||||
|
@ -429,6 +430,7 @@
|
|||
"item.create.builders_tea": "建築家のお茶",
|
||||
"item.create.chest_minecart_contraption": "からくりチェストトロッコ",
|
||||
"item.create.chocolate_bucket": "チョコレート入りバケツ",
|
||||
"item.create.chocolate_glazed_berries": "UNLOCALIZED: Chocolate Glazed Berries",
|
||||
"item.create.chromatic_compound": "色彩の化合物",
|
||||
"item.create.cinder_flour": "ネザーラックの粉",
|
||||
"item.create.copper_ingot": "銅インゴット",
|
||||
|
@ -462,6 +464,7 @@
|
|||
"item.create.handheld_blockzapper": "携帯ブロックザッパー",
|
||||
"item.create.handheld_worldshaper": "携帯ワールドシェーパー",
|
||||
"item.create.honey_bucket": "ハチミツ入りバケツ",
|
||||
"item.create.honeyed_apple": "UNLOCALIZED: Honeyed Apple",
|
||||
"item.create.integrated_circuit": "集積回路",
|
||||
"item.create.iron_sheet": "鉄板",
|
||||
"item.create.lapis_sheet": "ラピスラズリ板",
|
||||
|
@ -478,6 +481,7 @@
|
|||
"item.create.schematic_and_quill": "概略図と羽根ペン",
|
||||
"item.create.shadow_steel": "シャドウスチール",
|
||||
"item.create.super_glue": "接着剤",
|
||||
"item.create.sweet_roll": "UNLOCALIZED: Sweet Roll",
|
||||
"item.create.tree_fertilizer": "樹木の肥料",
|
||||
"item.create.vertical_gearbox": "垂直ギアボックス",
|
||||
"item.create.wand_of_symmetry": "対称の杖",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"_": "Missing Localizations: 86",
|
||||
|
||||
|
||||
"_": "->------------------------] Game Elements [------------------------<-",
|
||||
|
||||
|
@ -376,6 +376,7 @@
|
|||
"block.create.spout": "수도꼭지",
|
||||
"block.create.spruce_window": "가문비나무 유리창",
|
||||
"block.create.spruce_window_pane": "가문비나무 유리판",
|
||||
"block.create.sticker": "UNLOCALIZED: Sticker",
|
||||
"block.create.sticky_mechanical_piston": "끈끈이 기계식 피스톤",
|
||||
"block.create.stockpile_switch": "수량 스위치",
|
||||
"block.create.stressometer": "피로도 계측기",
|
||||
|
@ -429,6 +430,7 @@
|
|||
"item.create.builders_tea": "건축가의 차",
|
||||
"item.create.chest_minecart_contraption": "상자가 실린 광산 수레 장치",
|
||||
"item.create.chocolate_bucket": "초콜릿 양동이",
|
||||
"item.create.chocolate_glazed_berries": "UNLOCALIZED: Chocolate Glazed Berries",
|
||||
"item.create.chromatic_compound": "색채 혼합물",
|
||||
"item.create.cinder_flour": "잿가루",
|
||||
"item.create.copper_ingot": "구리 주괴",
|
||||
|
@ -462,6 +464,7 @@
|
|||
"item.create.handheld_blockzapper": "휴대용 블록발사기",
|
||||
"item.create.handheld_worldshaper": "휴대용 세계편집기",
|
||||
"item.create.honey_bucket": "꿀 양동이",
|
||||
"item.create.honeyed_apple": "UNLOCALIZED: Honeyed Apple",
|
||||
"item.create.integrated_circuit": "집적 회로",
|
||||
"item.create.iron_sheet": "철 판",
|
||||
"item.create.lapis_sheet": "청금석 판",
|
||||
|
@ -478,6 +481,7 @@
|
|||
"item.create.schematic_and_quill": "청사진과 깃펜",
|
||||
"item.create.shadow_steel": "그림자 강철",
|
||||
"item.create.super_glue": "강력 접착제",
|
||||
"item.create.sweet_roll": "UNLOCALIZED: Sweet Roll",
|
||||
"item.create.tree_fertilizer": "나무 비료",
|
||||
"item.create.vertical_gearbox": "수직 기어박스",
|
||||
"item.create.wand_of_symmetry": "대칭의 지팡이",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"_": "Missing Localizations: 1184",
|
||||
|
||||
|
||||
"_": "->------------------------] Game Elements [------------------------<-",
|
||||
|
||||
|
@ -376,6 +376,7 @@
|
|||
"block.create.spout": "UNLOCALIZED: Spout",
|
||||
"block.create.spruce_window": "UNLOCALIZED: Spruce Window",
|
||||
"block.create.spruce_window_pane": "UNLOCALIZED: Spruce Window Pane",
|
||||
"block.create.sticker": "UNLOCALIZED: Sticker",
|
||||
"block.create.sticky_mechanical_piston": "Mechanische Zuiger",
|
||||
"block.create.stockpile_switch": "Voorraad Schakelaar",
|
||||
"block.create.stressometer": "Stressmeter",
|
||||
|
@ -429,6 +430,7 @@
|
|||
"item.create.builders_tea": "UNLOCALIZED: Builder's Tea",
|
||||
"item.create.chest_minecart_contraption": "UNLOCALIZED: Chest Minecart Contraption",
|
||||
"item.create.chocolate_bucket": "UNLOCALIZED: Chocolate Bucket",
|
||||
"item.create.chocolate_glazed_berries": "UNLOCALIZED: Chocolate Glazed Berries",
|
||||
"item.create.chromatic_compound": "UNLOCALIZED: Chromatic Compound",
|
||||
"item.create.cinder_flour": "UNLOCALIZED: Cinder Flour",
|
||||
"item.create.copper_ingot": "Koperstaaf",
|
||||
|
@ -462,6 +464,7 @@
|
|||
"item.create.handheld_blockzapper": "Blokzapper",
|
||||
"item.create.handheld_worldshaper": "UNLOCALIZED: Handheld Worldshaper",
|
||||
"item.create.honey_bucket": "UNLOCALIZED: Honey Bucket",
|
||||
"item.create.honeyed_apple": "UNLOCALIZED: Honeyed Apple",
|
||||
"item.create.integrated_circuit": "UNLOCALIZED: Integrated Circuit",
|
||||
"item.create.iron_sheet": "IJzeren Platen",
|
||||
"item.create.lapis_sheet": "UNLOCALIZED: Lapis Sheet",
|
||||
|
@ -478,6 +481,7 @@
|
|||
"item.create.schematic_and_quill": "Bouwtekening en Veer",
|
||||
"item.create.shadow_steel": "UNLOCALIZED: Shadow Steel",
|
||||
"item.create.super_glue": "UNLOCALIZED: Super Glue",
|
||||
"item.create.sweet_roll": "UNLOCALIZED: Sweet Roll",
|
||||
"item.create.tree_fertilizer": "Boom mest",
|
||||
"item.create.vertical_gearbox": "UNLOCALIZED: Vertical Gearbox",
|
||||
"item.create.wand_of_symmetry": "Symmetrie Staf",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"_": "Missing Localizations: 1250",
|
||||
|
||||
|
||||
"_": "->------------------------] Game Elements [------------------------<-",
|
||||
|
||||
|
@ -376,6 +376,7 @@
|
|||
"block.create.spout": "UNLOCALIZED: Spout",
|
||||
"block.create.spruce_window": "UNLOCALIZED: Spruce Window",
|
||||
"block.create.spruce_window_pane": "UNLOCALIZED: Spruce Window Pane",
|
||||
"block.create.sticker": "UNLOCALIZED: Sticker",
|
||||
"block.create.sticky_mechanical_piston": "Pistão Mecânico Grudento",
|
||||
"block.create.stockpile_switch": "Disjuntor de Armazenamento",
|
||||
"block.create.stressometer": "UNLOCALIZED: Stressometer",
|
||||
|
@ -429,6 +430,7 @@
|
|||
"item.create.builders_tea": "UNLOCALIZED: Builder's Tea",
|
||||
"item.create.chest_minecart_contraption": "UNLOCALIZED: Chest Minecart Contraption",
|
||||
"item.create.chocolate_bucket": "UNLOCALIZED: Chocolate Bucket",
|
||||
"item.create.chocolate_glazed_berries": "UNLOCALIZED: Chocolate Glazed Berries",
|
||||
"item.create.chromatic_compound": "UNLOCALIZED: Chromatic Compound",
|
||||
"item.create.cinder_flour": "UNLOCALIZED: Cinder Flour",
|
||||
"item.create.copper_ingot": "UNLOCALIZED: Copper Ingot",
|
||||
|
@ -462,6 +464,7 @@
|
|||
"item.create.handheld_blockzapper": "Blockzapper Portátil",
|
||||
"item.create.handheld_worldshaper": "UNLOCALIZED: Handheld Worldshaper",
|
||||
"item.create.honey_bucket": "UNLOCALIZED: Honey Bucket",
|
||||
"item.create.honeyed_apple": "UNLOCALIZED: Honeyed Apple",
|
||||
"item.create.integrated_circuit": "UNLOCALIZED: Integrated Circuit",
|
||||
"item.create.iron_sheet": "Placas de Ferro",
|
||||
"item.create.lapis_sheet": "UNLOCALIZED: Lapis Sheet",
|
||||
|
@ -478,6 +481,7 @@
|
|||
"item.create.schematic_and_quill": "Esquema e pena",
|
||||
"item.create.shadow_steel": "UNLOCALIZED: Shadow Steel",
|
||||
"item.create.super_glue": "UNLOCALIZED: Super Glue",
|
||||
"item.create.sweet_roll": "UNLOCALIZED: Sweet Roll",
|
||||
"item.create.tree_fertilizer": "Fertilizante de Árvore",
|
||||
"item.create.vertical_gearbox": "UNLOCALIZED: Vertical Gearbox",
|
||||
"item.create.wand_of_symmetry": "Varinha de Simetria",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"_": "Missing Localizations: 36",
|
||||
|
||||
|
||||
"_": "->------------------------] Game Elements [------------------------<-",
|
||||
|
||||
|
@ -376,6 +376,7 @@
|
|||
"block.create.spout": "Дозатор",
|
||||
"block.create.spruce_window": "Еловое окно",
|
||||
"block.create.spruce_window_pane": "Панель из елового окна",
|
||||
"block.create.sticker": "UNLOCALIZED: Sticker",
|
||||
"block.create.sticky_mechanical_piston": "Липкий механический поршень",
|
||||
"block.create.stockpile_switch": "Настраиваемый компаратор",
|
||||
"block.create.stressometer": "Динамометр",
|
||||
|
@ -429,6 +430,7 @@
|
|||
"item.create.builders_tea": "Чай Строителя",
|
||||
"item.create.chest_minecart_contraption": "Сундуко-вагонеточная штуковина",
|
||||
"item.create.chocolate_bucket": "Ведро шоколада",
|
||||
"item.create.chocolate_glazed_berries": "UNLOCALIZED: Chocolate Glazed Berries",
|
||||
"item.create.chromatic_compound": "Хроматический компаунд",
|
||||
"item.create.cinder_flour": "Незераковая пыль",
|
||||
"item.create.copper_ingot": "Медный слиток",
|
||||
|
@ -462,6 +464,7 @@
|
|||
"item.create.handheld_blockzapper": "Ручная блоковая пушка",
|
||||
"item.create.handheld_worldshaper": "Ручной редактор мира",
|
||||
"item.create.honey_bucket": "Ведро мёда",
|
||||
"item.create.honeyed_apple": "UNLOCALIZED: Honeyed Apple",
|
||||
"item.create.integrated_circuit": "Интегральная схема",
|
||||
"item.create.iron_sheet": "Железный лист",
|
||||
"item.create.lapis_sheet": "Лазуритовый лист",
|
||||
|
@ -478,6 +481,7 @@
|
|||
"item.create.schematic_and_quill": "Схематика и перо",
|
||||
"item.create.shadow_steel": "Призрачная сталь",
|
||||
"item.create.super_glue": "Супер-клей",
|
||||
"item.create.sweet_roll": "UNLOCALIZED: Sweet Roll",
|
||||
"item.create.tree_fertilizer": "Удобрение для деревьев",
|
||||
"item.create.vertical_gearbox": "Вертикальная коробка передач",
|
||||
"item.create.wand_of_symmetry": "Жезл симметрии",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"_": "Missing Localizations: 34",
|
||||
|
||||
|
||||
"_": "->------------------------] Game Elements [------------------------<-",
|
||||
|
||||
|
@ -376,6 +376,7 @@
|
|||
"block.create.spout": "注液器",
|
||||
"block.create.spruce_window": "云杉窗户",
|
||||
"block.create.spruce_window_pane": "云杉窗户板",
|
||||
"block.create.sticker": "UNLOCALIZED: Sticker",
|
||||
"block.create.sticky_mechanical_piston": "黏性动力活塞",
|
||||
"block.create.stockpile_switch": "存量转换器",
|
||||
"block.create.stressometer": "应力表",
|
||||
|
@ -429,6 +430,7 @@
|
|||
"item.create.builders_tea": "建造工茶饮",
|
||||
"item.create.chest_minecart_contraption": "装配过的动力矿车",
|
||||
"item.create.chocolate_bucket": "巧克力桶",
|
||||
"item.create.chocolate_glazed_berries": "UNLOCALIZED: Chocolate Glazed Berries",
|
||||
"item.create.chromatic_compound": "异彩化合物",
|
||||
"item.create.cinder_flour": "下界面粉",
|
||||
"item.create.copper_ingot": "铜锭",
|
||||
|
@ -462,6 +464,7 @@
|
|||
"item.create.handheld_blockzapper": "手持式方块放置器",
|
||||
"item.create.handheld_worldshaper": "手持式环境塑形器",
|
||||
"item.create.honey_bucket": "蜂蜜桶",
|
||||
"item.create.honeyed_apple": "UNLOCALIZED: Honeyed Apple",
|
||||
"item.create.integrated_circuit": "集成电路板",
|
||||
"item.create.iron_sheet": "铁板",
|
||||
"item.create.lapis_sheet": "青金石板",
|
||||
|
@ -478,6 +481,7 @@
|
|||
"item.create.schematic_and_quill": "蓝图与笔",
|
||||
"item.create.shadow_steel": "暗影钢",
|
||||
"item.create.super_glue": "强力胶",
|
||||
"item.create.sweet_roll": "UNLOCALIZED: Sweet Roll",
|
||||
"item.create.tree_fertilizer": "树木肥料",
|
||||
"item.create.vertical_gearbox": "竖直十字齿轮箱",
|
||||
"item.create.wand_of_symmetry": "对称之杖",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"_": "Missing Localizations: 39",
|
||||
|
||||
|
||||
"_": "->------------------------] Game Elements [------------------------<-",
|
||||
|
||||
|
@ -376,6 +376,7 @@
|
|||
"block.create.spout": "液體灌注器",
|
||||
"block.create.spruce_window": "雲杉木窗戶",
|
||||
"block.create.spruce_window_pane": "雲杉木窗戶片",
|
||||
"block.create.sticker": "UNLOCALIZED: Sticker",
|
||||
"block.create.sticky_mechanical_piston": "黏性機械活塞",
|
||||
"block.create.stockpile_switch": "存量檢測器",
|
||||
"block.create.stressometer": "動能錶",
|
||||
|
@ -429,6 +430,7 @@
|
|||
"item.create.builders_tea": "工人茶",
|
||||
"item.create.chest_minecart_contraption": "裝修過的機械礦車",
|
||||
"item.create.chocolate_bucket": "巧克力桶",
|
||||
"item.create.chocolate_glazed_berries": "UNLOCALIZED: Chocolate Glazed Berries",
|
||||
"item.create.chromatic_compound": "異彩化合物",
|
||||
"item.create.cinder_flour": "地獄麵粉",
|
||||
"item.create.copper_ingot": "銅錠",
|
||||
|
@ -462,6 +464,7 @@
|
|||
"item.create.handheld_blockzapper": "方塊放置器",
|
||||
"item.create.handheld_worldshaper": "地形雕塑器",
|
||||
"item.create.honey_bucket": "蜂蜜桶",
|
||||
"item.create.honeyed_apple": "UNLOCALIZED: Honeyed Apple",
|
||||
"item.create.integrated_circuit": "IC板",
|
||||
"item.create.iron_sheet": "鐵板",
|
||||
"item.create.lapis_sheet": "青金石板",
|
||||
|
@ -478,6 +481,7 @@
|
|||
"item.create.schematic_and_quill": "藍圖與筆",
|
||||
"item.create.shadow_steel": "暗影鋼",
|
||||
"item.create.super_glue": "強力膠",
|
||||
"item.create.sweet_roll": "UNLOCALIZED: Sweet Roll",
|
||||
"item.create.tree_fertilizer": "樹木肥料",
|
||||
"item.create.vertical_gearbox": "豎直齒輪箱",
|
||||
"item.create.wand_of_symmetry": "對稱杖",
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "create:item/chocolate_glazed_berries"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "create:item/goggles"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "create:item/honeyed_apple"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"parent": "create:block/sticker/item"
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "create:item/sweet_roll"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
"parent": "minecraft:recipes/root",
|
||||
"rewards": {
|
||||
"recipes": [
|
||||
"create:crafting/kinetics/sticker"
|
||||
]
|
||||
},
|
||||
"criteria": {
|
||||
"has_item": {
|
||||
"trigger": "minecraft:inventory_changed",
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"item": "create:andesite_alloy"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"has_the_recipe": {
|
||||
"trigger": "minecraft:recipe_unlocked",
|
||||
"conditions": {
|
||||
"recipe": "create:crafting/kinetics/sticker"
|
||||
}
|
||||
}
|
||||
},
|
||||
"requirements": [
|
||||
[
|
||||
"has_item",
|
||||
"has_the_recipe"
|
||||
]
|
||||
]
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "create:sticker"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
"ISI",
|
||||
"CRC"
|
||||
],
|
||||
"key": {
|
||||
"I": {
|
||||
"item": "create:andesite_alloy"
|
||||
},
|
||||
"C": {
|
||||
"tag": "forge:cobblestone"
|
||||
},
|
||||
"R": {
|
||||
"tag": "forge:dusts/redstone"
|
||||
},
|
||||
"S": {
|
||||
"tag": "forge:slimeballs"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "create:sticker"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"type": "create:filling",
|
||||
"ingredients": [
|
||||
{
|
||||
"item": "minecraft:sweet_berries"
|
||||
},
|
||||
{
|
||||
"fluid": "create:chocolate",
|
||||
"nbt": {},
|
||||
"amount": 250
|
||||
}
|
||||
],
|
||||
"results": [
|
||||
{
|
||||
"item": "create:chocolate_glazed_berries"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"type": "create:filling",
|
||||
"ingredients": [
|
||||
{
|
||||
"item": "minecraft:apple"
|
||||
},
|
||||
{
|
||||
"fluidTag": "forge:honey",
|
||||
"amount": 250
|
||||
}
|
||||
],
|
||||
"results": [
|
||||
{
|
||||
"item": "create:honeyed_apple"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"type": "create:filling",
|
||||
"ingredients": [
|
||||
{
|
||||
"item": "minecraft:bread"
|
||||
},
|
||||
{
|
||||
"fluidTag": "forge:milk",
|
||||
"amount": 250
|
||||
}
|
||||
],
|
||||
"results": [
|
||||
{
|
||||
"item": "create:sweet_roll"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -7,6 +7,7 @@
|
|||
"minecraft:glass_bottle",
|
||||
"minecraft:potion",
|
||||
"minecraft:splash_potion",
|
||||
"minecraft:lingering_potion"
|
||||
"minecraft:lingering_potion",
|
||||
"minecraft:honey_bottle"
|
||||
]
|
||||
}
|
|
@ -93,6 +93,8 @@ public class AllBlockPartials {
|
|||
|
||||
SYMMETRY_PLANE = get("symmetry_effect/plane"), SYMMETRY_CROSSPLANE = get("symmetry_effect/crossplane"),
|
||||
SYMMETRY_TRIPLEPLANE = get("symmetry_effect/tripleplane"),
|
||||
|
||||
STICKER_HEAD = get("sticker/head"),
|
||||
|
||||
PORTABLE_STORAGE_INTERFACE_MIDDLE = get("portable_storage_interface/block_middle"),
|
||||
PORTABLE_STORAGE_INTERFACE_MIDDLE_POWERED = get("portable_storage_interface/block_middle_powered"),
|
||||
|
@ -117,6 +119,8 @@ public class AllBlockPartials {
|
|||
|
||||
SPEED_CONTROLLER_BRACKET = get("rotation_speed_controller/bracket"),
|
||||
|
||||
GOGGLES = get("goggles"),
|
||||
|
||||
COUPLING_ATTACHMENT = getEntity("minecart_coupling/attachment"),
|
||||
COUPLING_RING = getEntity("minecart_coupling/ring"),
|
||||
COUPLING_CONNECTOR = getEntity("minecart_coupling/connector")
|
||||
|
|
|
@ -54,6 +54,7 @@ import com.simibubi.create.content.contraptions.components.structureMovement.bea
|
|||
import com.simibubi.create.content.contraptions.components.structureMovement.chassis.LinearChassisBlock;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.chassis.LinearChassisBlock.ChassisCTBehaviour;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.chassis.RadialChassisBlock;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.chassis.StickerBlock;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.gantry.GantryPinionBlock;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.mounted.CartAssemblerBlock;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.mounted.CartAssemblerBlock.MinecartAnchorBlock;
|
||||
|
@ -846,6 +847,15 @@ public class AllBlocks {
|
|||
.build()
|
||||
.register();
|
||||
|
||||
public static final BlockEntry<StickerBlock> STICKER = REGISTRATE.block("sticker", StickerBlock::new)
|
||||
.initialProperties(SharedProperties::stone)
|
||||
.properties(Block.Properties::nonOpaque)
|
||||
.addLayer(() -> RenderType::getCutoutMipped)
|
||||
.blockstate((c, p) -> p.directionalBlock(c.get(), AssetLookup.forPowered(c, p)))
|
||||
.item()
|
||||
.transform(customItemModel())
|
||||
.register();
|
||||
|
||||
public static final BlockEntry<DrillBlock> MECHANICAL_DRILL = REGISTRATE.block("mechanical_drill", DrillBlock::new)
|
||||
.initialProperties(SharedProperties::stone)
|
||||
.blockstate(BlockStateGen.directionalBlockProvider(true))
|
||||
|
|
|
@ -31,9 +31,9 @@ public class AllEntityTypes {
|
|||
contraption("gantry_contraption", GantryContraptionEntity::new, 10, 40, false);
|
||||
|
||||
public static final RegistryEntry<EntityType<SuperGlueEntity>> SUPER_GLUE = register("super_glue",
|
||||
SuperGlueEntity::new, EntityClassification.MISC, 10, Integer.MAX_VALUE, false, SuperGlueEntity::build);
|
||||
SuperGlueEntity::new, EntityClassification.MISC, 10, Integer.MAX_VALUE, false, true, SuperGlueEntity::build);
|
||||
public static final RegistryEntry<EntityType<SeatEntity>> SEAT =
|
||||
register("seat", SeatEntity::new, EntityClassification.MISC, 0, Integer.MAX_VALUE, false, SeatEntity::build);
|
||||
register("seat", SeatEntity::new, EntityClassification.MISC, 0, Integer.MAX_VALUE, false, true, SeatEntity::build);
|
||||
|
||||
//
|
||||
|
||||
|
@ -41,12 +41,12 @@ public class AllEntityTypes {
|
|||
|
||||
private static <T extends Entity> RegistryEntry<EntityType<T>> contraption(String name, IFactory<T> factory,
|
||||
int range, int updateFrequency, boolean sendVelocity) {
|
||||
return register(name, factory, EntityClassification.MISC, range, updateFrequency, sendVelocity,
|
||||
return register(name, factory, EntityClassification.MISC, range, updateFrequency, sendVelocity, true,
|
||||
AbstractContraptionEntity::build);
|
||||
}
|
||||
|
||||
private static <T extends Entity> RegistryEntry<EntityType<T>> register(String name, IFactory<T> factory,
|
||||
EntityClassification group, int range, int updateFrequency, boolean sendVelocity,
|
||||
EntityClassification group, int range, int updateFrequency, boolean sendVelocity, boolean immuneToFire,
|
||||
NonNullConsumer<EntityType.Builder<T>> propertyBuilder) {
|
||||
String id = Lang.asId(name);
|
||||
return Create.registrate()
|
||||
|
@ -55,6 +55,10 @@ public class AllEntityTypes {
|
|||
.setUpdateInterval(updateFrequency)
|
||||
.setShouldReceiveVelocityUpdates(sendVelocity))
|
||||
.properties(propertyBuilder)
|
||||
.properties(b -> {
|
||||
if (immuneToFire)
|
||||
b.immuneToFire();
|
||||
})
|
||||
.register();
|
||||
}
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@ import com.simibubi.create.content.contraptions.components.structureMovement.glu
|
|||
import com.simibubi.create.content.contraptions.components.structureMovement.mounted.MinecartContraptionItem;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.train.MinecartCouplingItem;
|
||||
import com.simibubi.create.content.contraptions.goggles.GogglesItem;
|
||||
import com.simibubi.create.content.contraptions.goggles.GogglesModel;
|
||||
import com.simibubi.create.content.contraptions.processing.burner.BlazeBurnerBlockItem;
|
||||
import com.simibubi.create.content.contraptions.relays.belt.item.BeltConnectorItem;
|
||||
import com.simibubi.create.content.contraptions.relays.gearbox.VerticalGearboxItem;
|
||||
|
@ -117,6 +118,24 @@ public class AllItems {
|
|||
.lang("Bar of Chocolate")
|
||||
.register();
|
||||
|
||||
public static final ItemEntry<Item> SWEET_ROLL = REGISTRATE.item("sweet_roll", Item::new)
|
||||
.properties(p -> p.food(new Food.Builder().hunger(6)
|
||||
.saturation(1.0F)
|
||||
.build()))
|
||||
.register();
|
||||
|
||||
public static final ItemEntry<Item> CHOCOLATE_BERRIES = REGISTRATE.item("chocolate_glazed_berries", Item::new)
|
||||
.properties(p -> p.food(new Food.Builder().hunger(7)
|
||||
.saturation(0.7F)
|
||||
.build()))
|
||||
.register();
|
||||
|
||||
public static final ItemEntry<Item> HONEYED_APPLE = REGISTRATE.item("honeyed_apple", Item::new)
|
||||
.properties(p -> p.food(new Food.Builder().hunger(8)
|
||||
.saturation(0.6F)
|
||||
.build()))
|
||||
.register();
|
||||
|
||||
public static final ItemEntry<BuildersTeaItem> BUILDERS_TEA = REGISTRATE.item("builders_tea", BuildersTeaItem::new)
|
||||
.tag(AllItemTags.UPRIGHT_ON_BELT.tag)
|
||||
.properties(p -> p.maxStackSize(16))
|
||||
|
@ -189,7 +208,7 @@ public class AllItems {
|
|||
|
||||
public static final ItemEntry<GogglesItem> GOGGLES = REGISTRATE.item("goggles", GogglesItem::new)
|
||||
.properties(p -> p.maxStackSize(1))
|
||||
.model(AssetLookup.existingItemModel())
|
||||
.onRegister(CreateRegistrate.itemModel(() -> GogglesModel::new))
|
||||
.lang("Engineer's Goggles")
|
||||
.register();
|
||||
|
||||
|
|
|
@ -176,7 +176,8 @@ public class AllTags {
|
|||
AllItemTags.CREATE_INGOTS.includeIn(AllItemTags.BEACON_PAYMENT);
|
||||
AllItemTags.CREATE_INGOTS.includeIn(AllItemTags.INGOTS);
|
||||
|
||||
AllItemTags.UPRIGHT_ON_BELT.add(Items.GLASS_BOTTLE, Items.POTION, Items.SPLASH_POTION, Items.LINGERING_POTION);
|
||||
AllItemTags.UPRIGHT_ON_BELT.add(Items.GLASS_BOTTLE, Items.POTION, Items.SPLASH_POTION, Items.LINGERING_POTION,
|
||||
Items.field_226638_pX_);
|
||||
|
||||
AllBlockTags.WINDMILL_SAILS.includeAll(BlockTags.WOOL);
|
||||
|
||||
|
|
|
@ -51,6 +51,8 @@ import com.simibubi.create.content.contraptions.components.structureMovement.bea
|
|||
import com.simibubi.create.content.contraptions.components.structureMovement.bearing.MechanicalBearingTileEntity;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.bearing.WindmillBearingTileEntity;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.chassis.ChassisTileEntity;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.chassis.StickerRenderer;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.chassis.StickerTileEntity;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.gantry.GantryPinionRenderer;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.gantry.GantryPinionTileEntity;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.mounted.CartAssemblerTileEntity;
|
||||
|
@ -104,6 +106,7 @@ import com.simibubi.create.content.contraptions.relays.gearbox.GearboxInstance;
|
|||
import com.simibubi.create.content.contraptions.relays.gearbox.GearboxRenderer;
|
||||
import com.simibubi.create.content.contraptions.relays.gearbox.GearboxTileEntity;
|
||||
import com.simibubi.create.content.contraptions.relays.gearbox.GearshiftTileEntity;
|
||||
import com.simibubi.create.content.logistics.block.belts.tunnel.BeltTunnelInstance;
|
||||
import com.simibubi.create.content.logistics.block.belts.tunnel.BeltTunnelRenderer;
|
||||
import com.simibubi.create.content.logistics.block.belts.tunnel.BeltTunnelTileEntity;
|
||||
import com.simibubi.create.content.logistics.block.belts.tunnel.BrassTunnelTileEntity;
|
||||
|
@ -116,6 +119,7 @@ import com.simibubi.create.content.logistics.block.depot.DepotTileEntity;
|
|||
import com.simibubi.create.content.logistics.block.diodes.AdjustablePulseRepeaterTileEntity;
|
||||
import com.simibubi.create.content.logistics.block.diodes.AdjustableRepeaterRenderer;
|
||||
import com.simibubi.create.content.logistics.block.diodes.AdjustableRepeaterTileEntity;
|
||||
import com.simibubi.create.content.logistics.block.funnel.FunnelInstance;
|
||||
import com.simibubi.create.content.logistics.block.funnel.FunnelRenderer;
|
||||
import com.simibubi.create.content.logistics.block.funnel.FunnelTileEntity;
|
||||
import com.simibubi.create.content.logistics.block.inventories.AdjustableCrateTileEntity;
|
||||
|
@ -339,12 +343,14 @@ public class AllTileEntities {
|
|||
.tileEntity("andesite_tunnel", BeltTunnelTileEntity::new)
|
||||
.validBlocks(AllBlocks.ANDESITE_TUNNEL)
|
||||
.renderer(() -> BeltTunnelRenderer::new)
|
||||
.onRegister(BeltTunnelInstance::register)
|
||||
.register();
|
||||
|
||||
public static final TileEntityEntry<BrassTunnelTileEntity> BRASS_TUNNEL = Create.registrate()
|
||||
.tileEntity("brass_tunnel", BrassTunnelTileEntity::new)
|
||||
.validBlocks(AllBlocks.BRASS_TUNNEL)
|
||||
.renderer(() -> BeltTunnelRenderer::new)
|
||||
.onRegister(BeltTunnelInstance::register)
|
||||
.register();
|
||||
|
||||
public static final TileEntityEntry<ArmTileEntity> MECHANICAL_ARM = Create.registrate()
|
||||
|
@ -394,6 +400,12 @@ public class AllTileEntities {
|
|||
.validBlocks(AllBlocks.RADIAL_CHASSIS, AllBlocks.LINEAR_CHASSIS, AllBlocks.SECONDARY_LINEAR_CHASSIS)
|
||||
// .renderer(() -> renderer)
|
||||
.register();
|
||||
|
||||
public static final TileEntityEntry<StickerTileEntity> STICKER = Create.registrate()
|
||||
.tileEntity("sticker", StickerTileEntity::new)
|
||||
.validBlocks(AllBlocks.STICKER)
|
||||
.renderer(() -> StickerRenderer::new)
|
||||
.register();
|
||||
|
||||
public static final TileEntityEntry<DrillTileEntity> DRILL = Create.registrate()
|
||||
.tileEntity("drill", DrillTileEntity::new)
|
||||
|
@ -591,6 +603,7 @@ public class AllTileEntities {
|
|||
.validBlocks(AllBlocks.BRASS_FUNNEL, AllBlocks.BRASS_BELT_FUNNEL, AllBlocks.ANDESITE_FUNNEL,
|
||||
AllBlocks.ANDESITE_BELT_FUNNEL)
|
||||
.renderer(() -> FunnelRenderer::new)
|
||||
.onRegister(FunnelInstance::register)
|
||||
.register();
|
||||
|
||||
public static final TileEntityEntry<ContentObserverTileEntity> CONTENT_OBSERVER = Create.registrate()
|
||||
|
|
|
@ -12,7 +12,7 @@ import net.minecraft.util.Direction.Axis;
|
|||
public abstract class AnimatedKinetics implements IDrawable {
|
||||
|
||||
public static float getCurrentAngle() {
|
||||
return ((AnimationTickHolder.getRenderTick()) * 4f) % 360;
|
||||
return ((AnimationTickHolder.getRenderTime()) * 4f) % 360;
|
||||
}
|
||||
|
||||
protected BlockState shaft(Axis axis) {
|
||||
|
|
|
@ -29,7 +29,7 @@ public class AnimatedMixer extends AnimatedKinetics {
|
|||
.scale(scale)
|
||||
.render();
|
||||
|
||||
float animation = ((MathHelper.sin(AnimationTickHolder.getRenderTick() / 32f) + 1) / 5) + .5f;
|
||||
float animation = ((MathHelper.sin(AnimationTickHolder.getRenderTime() / 32f) + 1) / 5) + .5f;
|
||||
|
||||
GuiGameElement.of(AllBlockPartials.MECHANICAL_MIXER_POLE)
|
||||
.atLocal(0, animation, 0)
|
||||
|
|
|
@ -48,7 +48,7 @@ public class AnimatedPress extends AnimatedKinetics {
|
|||
}
|
||||
|
||||
private float getAnimatedHeadOffset() {
|
||||
float cycle = (AnimationTickHolder.getRenderTick()) % 30;
|
||||
float cycle = (AnimationTickHolder.getRenderTime()) % 30;
|
||||
if (cycle < 10) {
|
||||
float progress = cycle / 10;
|
||||
return -(progress * progress * progress);
|
||||
|
|
|
@ -37,7 +37,7 @@ public class AnimatedSpout extends AnimatedKinetics {
|
|||
.scale(scale)
|
||||
.render();
|
||||
|
||||
float cycle = AnimationTickHolder.getRenderTick() % 30;
|
||||
float cycle = AnimationTickHolder.getRenderTime() % 30;
|
||||
float squeeze = cycle < 20 ? MathHelper.sin((float) (cycle / 20f * Math.PI)) : 0;
|
||||
squeeze *= 20;
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.simibubi.create.content.contraptions.base;
|
|||
|
||||
import com.simibubi.create.content.contraptions.components.actors.ContraptionActorData;
|
||||
import com.simibubi.create.content.contraptions.relays.belt.BeltData;
|
||||
import com.simibubi.create.content.logistics.block.FlapData;
|
||||
import com.simibubi.create.foundation.render.backend.instancing.InstancedModel;
|
||||
import com.simibubi.create.foundation.render.backend.instancing.MaterialType;
|
||||
|
||||
|
@ -10,4 +11,6 @@ public class KineticRenderMaterials {
|
|||
public static final MaterialType<InstancedModel<BeltData>> BELTS = new MaterialType<>();
|
||||
|
||||
public static final MaterialType<InstancedModel<ContraptionActorData>> ACTORS = new MaterialType<>();
|
||||
|
||||
public static final MaterialType<InstancedModel<FlapData>> FLAPS = new MaterialType<>();
|
||||
}
|
||||
|
|
|
@ -81,6 +81,9 @@ public abstract class KineticTileEntity extends SmartTileEntity
|
|||
}
|
||||
|
||||
super.initialize();
|
||||
|
||||
if (world != null && world.isRemote)
|
||||
DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> CreateClient.kineticRenderer.add(this));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -534,13 +537,6 @@ public abstract class KineticTileEntity extends SmartTileEntity
|
|||
return block.hasIntegratedCogwheel(world, pos, state);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoad() {
|
||||
super.onLoad();
|
||||
if (world != null && world.isRemote)
|
||||
DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> CreateClient.kineticRenderer.add(this));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onChunkUnloaded() {
|
||||
if (world != null && world.isRemote)
|
||||
|
|
|
@ -58,7 +58,7 @@ public class KineticTileEntityRenderer extends SafeTileEntityRenderer<KineticTil
|
|||
}
|
||||
|
||||
public static float getAngleForTe(KineticTileEntity te, final BlockPos pos, Axis axis) {
|
||||
float time = AnimationTickHolder.getRenderTick();
|
||||
float time = AnimationTickHolder.getRenderTime();
|
||||
float offset = getRotationOffsetForPosition(te, pos, axis);
|
||||
float angle = ((time * te.getSpeed() * 3f / 10 + offset) % 360) / 180 * (float) Math.PI;
|
||||
return angle;
|
||||
|
|
|
@ -44,7 +44,7 @@ public class DrillRenderer extends KineticTileEntityRenderer {
|
|||
float speed = (float) (context.contraption.stalled
|
||||
|| !VecHelper.isVecPointingTowards(context.relativeMotion, state.get(FACING)
|
||||
.getOpposite()) ? context.getAnimationSpeed() : 0);
|
||||
float time = AnimationTickHolder.getRenderTick() / 20;
|
||||
float time = AnimationTickHolder.getRenderTime() / 20;
|
||||
float angle = (float) (((time * speed) % 360));
|
||||
|
||||
for (MatrixStack m : matrixStacks)
|
||||
|
|
|
@ -70,7 +70,7 @@ public class HarvesterRenderer extends SafeTileEntityRenderer<HarvesterTileEntit
|
|||
|
||||
if (context.contraption.stalled)
|
||||
speed = 0;
|
||||
float time = AnimationTickHolder.getRenderTick() / 20;
|
||||
float time = AnimationTickHolder.getRenderTime() / 20;
|
||||
float angle = (time * speed) % 360;
|
||||
float originOffset = 1 / 16f;
|
||||
Vec3d rotOffset = new Vec3d(0, -2 * originOffset, originOffset).add(VecHelper.getCenterOf(BlockPos.ZERO));
|
||||
|
|
|
@ -20,6 +20,7 @@ import com.simibubi.create.foundation.utility.VecHelper;
|
|||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.entity.item.ItemEntity;
|
||||
import net.minecraft.item.BlockItem;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -199,12 +200,25 @@ public class CrushingWheelControllerTileEntity extends SmartTileEntity {
|
|||
return;
|
||||
|
||||
if (!(processingEntity instanceof ItemEntity)) {
|
||||
Vec3d entityOutPos = outPos.add(facing.getAxis() == Axis.X ? .5f * offset : 0f
|
||||
, facing.getAxis() == Axis.Y ? .5f * offset : 0f
|
||||
, facing.getAxis() == Axis.Z ? .5f * offset : 0f);
|
||||
int crusherDamage = AllConfigs.SERVER.kinetics.crushingDamage.get();
|
||||
|
||||
if (processingEntity instanceof LivingEntity) {
|
||||
if ((((LivingEntity) processingEntity).getHealth() - crusherDamage <= 0) //Takes LivingEntity instances as exception, so it can move them before it would kill them.
|
||||
&& (((LivingEntity) processingEntity).hurtTime <= 0)) { //This way it can actually output the items to the right spot.
|
||||
processingEntity.setPosition(entityOutPos.x
|
||||
, entityOutPos.y
|
||||
, entityOutPos.z);
|
||||
}
|
||||
}
|
||||
processingEntity.attackEntityFrom(CrushingWheelTileEntity.damageSource,
|
||||
AllConfigs.SERVER.kinetics.crushingDamage.get());
|
||||
crusherDamage);
|
||||
if (!processingEntity.isAlive()) {
|
||||
processingEntity.setPosition(outPos.x + (facing.getAxis() == Axis.X ? .75f * offset : 0f) //This is supposed to move the mobs to the output location
|
||||
, outPos.y + (facing.getAxis() == Axis.Y ? .75f * offset : 0f) //So the item drops end up on the other end
|
||||
, outPos.z + (facing.getAxis() == Axis.Z ? .75f * offset : 0f)); //This, however, does not currently work consistently for non-downwards crushers.
|
||||
processingEntity.setPosition(entityOutPos.x
|
||||
, entityOutPos.y
|
||||
, entityOutPos.z);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -3,11 +3,13 @@ package com.simibubi.create.content.contraptions.components.crusher;
|
|||
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
||||
import com.simibubi.create.foundation.utility.Iterate;
|
||||
|
||||
import net.minecraft.entity.item.ItemEntity;
|
||||
import net.minecraft.tileentity.TileEntityType;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraftforge.event.entity.living.LivingDeathEvent;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraftforge.event.entity.living.LivingDropsEvent;
|
||||
import net.minecraftforge.event.entity.living.LootingLevelEvent;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
|
||||
|
@ -50,14 +52,17 @@ public class CrushingWheelTileEntity extends KineticTileEntity {
|
|||
public static void crushingIsFortunate(LootingLevelEvent event) {
|
||||
if (event.getDamageSource() != damageSource)
|
||||
return;
|
||||
event.setLootingLevel(2);
|
||||
event.setLootingLevel(2); //This does not currently increase mob drops. It seems like this only works for damage done by an entity.
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public static void crushingTeleportsEntities(LivingDeathEvent event) {
|
||||
if (event.getSource() != damageSource)
|
||||
public static void handleCrushedMobDrops(LivingDropsEvent event) {
|
||||
if (event.getSource() != CrushingWheelTileEntity.damageSource)
|
||||
return;
|
||||
event.getEntity().setPos(event.getEntity().getX(), Math.floor(event.getEntity().getY()) - .5f, event.getEntity().getZ());
|
||||
Vec3d outSpeed = Vec3d.ZERO;
|
||||
for (ItemEntity outputItem : event.getDrops()) {
|
||||
outputItem.setMotion(outSpeed);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -89,7 +89,7 @@ public class DeployerRenderer extends SafeTileEntityRenderer<DeployerTileEntity>
|
|||
ms.translate(0, isBlockItem ? 9 / 16f : 11 / 16f, 0);
|
||||
ms.scale(scale, scale, scale);
|
||||
transform = TransformType.GROUND;
|
||||
ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(AnimationTickHolder.getRenderTick()));
|
||||
ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(AnimationTickHolder.getRenderTime()));
|
||||
|
||||
} else {
|
||||
float scale = punching ? .75f : isBlockItem ? .75f - 1 / 64f : .5f;
|
||||
|
@ -176,7 +176,7 @@ public class DeployerRenderer extends SafeTileEntityRenderer<DeployerTileEntity>
|
|||
|
||||
double factor;
|
||||
if (context.contraption.stalled || context.position == null || context.data.contains("StationaryTimer")) {
|
||||
factor = MathHelper.sin(AnimationTickHolder.getRenderTick() * .5f) * .25f + .25f;
|
||||
factor = MathHelper.sin(AnimationTickHolder.getRenderTime() * .5f) * .25f + .25f;
|
||||
} else {
|
||||
Vec3d center = VecHelper.getCenterOf(new BlockPos(context.position));
|
||||
double distance = context.position.distanceTo(center);
|
||||
|
|
|
@ -41,7 +41,7 @@ public class EncasedFanRenderer extends KineticTileEntityRenderer {
|
|||
SuperByteBuffer fanInner =
|
||||
AllBlockPartials.ENCASED_FAN_INNER.renderOnDirectionalSouth(te.getBlockState(), direction.getOpposite());
|
||||
|
||||
float time = AnimationTickHolder.getRenderTick();
|
||||
float time = AnimationTickHolder.getRenderTime();
|
||||
float speed = te.getSpeed() * 5;
|
||||
if (speed > 0)
|
||||
speed = MathHelper.clamp(speed, 80, 64 * 20);
|
||||
|
|
|
@ -45,7 +45,7 @@ public class MechanicalMixerRenderer extends KineticTileEntityRenderer {
|
|||
int packedLightmapCoords = WorldRenderer.getLightmapCoordinates(te.getWorld(), blockState, pos);
|
||||
float renderedHeadOffset = mixer.getRenderedHeadOffset(partialTicks);
|
||||
float speed = mixer.getRenderedHeadRotationSpeed(partialTicks);
|
||||
float time = AnimationTickHolder.getRenderTick();
|
||||
float time = AnimationTickHolder.getRenderTime();
|
||||
float angle = (float) (((time * speed * 6 / 10f) % 360) / 180 * (float) Math.PI);
|
||||
|
||||
SuperByteBuffer poleRender = AllBlockPartials.MECHANICAL_MIXER_POLE.renderOn(blockState);
|
||||
|
|
|
@ -649,4 +649,25 @@ public abstract class AbstractContraptionEntity extends Entity implements IEntit
|
|||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateAquatics() {
|
||||
/*
|
||||
Override this with an empty method to reduce enormous calculation time when contraptions are in water
|
||||
WARNING: THIS HAS A BUNCH OF SIDE EFFECTS!
|
||||
- Fluids will not try to change contraption movement direction
|
||||
- this.inWater and this.isInWater() will return unreliable data
|
||||
- entities riding a contraption will not cause water splashes (seats are their own entity so this should be fine)
|
||||
- fall distance is not reset when the contraption is in water
|
||||
- this.eyesInWater and this.canSwim() will always be false
|
||||
- swimming state will never be updated
|
||||
*/
|
||||
extinguish();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFire(int p_70015_1_) {
|
||||
// Contraptions no longer catch fire
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -14,6 +14,7 @@ import com.simibubi.create.content.contraptions.components.structureMovement.bea
|
|||
import com.simibubi.create.content.contraptions.components.structureMovement.bearing.MechanicalBearingTileEntity;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.bearing.SailBlock;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.chassis.AbstractChassisBlock;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.chassis.StickerBlock;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.mounted.CartAssemblerBlock;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonBlock;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonBlock.PistonState;
|
||||
|
@ -198,6 +199,10 @@ public class BlockMovementTraits {
|
|||
.getAxis();
|
||||
if (state.getBlock() instanceof FluidTankBlock)
|
||||
return FluidTankConnectivityHandler.isConnected(world, pos, pos.offset(direction));
|
||||
if (AllBlocks.STICKER.has(state) && state.get(StickerBlock.EXTENDED)) {
|
||||
return direction == state.get(StickerBlock.FACING)
|
||||
&& !notSupportive(world.getBlockState(pos.offset(direction)), direction.getOpposite());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -231,6 +236,8 @@ public class BlockMovementTraits {
|
|||
if (AllBlocks.MECHANICAL_PISTON_HEAD.has(state))
|
||||
return facing.getAxis() != state.get(BlockStateProperties.FACING)
|
||||
.getAxis();
|
||||
if (AllBlocks.STICKER.has(state) && !state.get(StickerBlock.EXTENDED))
|
||||
return facing == state.get(StickerBlock.FACING);
|
||||
return isBrittle(state);
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@ import java.util.Arrays;
|
|||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
@ -34,6 +33,7 @@ import com.simibubi.create.content.contraptions.components.structureMovement.bea
|
|||
import com.simibubi.create.content.contraptions.components.structureMovement.bearing.StabilizedContraption;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.chassis.AbstractChassisBlock;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.chassis.ChassisTileEntity;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.chassis.StickerBlock;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.gantry.GantryPinionBlock;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.glue.SuperGlueEntity;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.glue.SuperGlueHandler;
|
||||
|
@ -57,6 +57,7 @@ import com.simibubi.create.foundation.utility.BlockFace;
|
|||
import com.simibubi.create.foundation.utility.Iterate;
|
||||
import com.simibubi.create.foundation.utility.NBTHelper;
|
||||
import com.simibubi.create.foundation.utility.NBTProcessors;
|
||||
import com.simibubi.create.foundation.utility.UniqueLinkedList;
|
||||
import com.simibubi.create.foundation.utility.VecHelper;
|
||||
import com.simibubi.create.foundation.utility.worldWrappers.WrappedWorld;
|
||||
|
||||
|
@ -176,9 +177,10 @@ public abstract class Contraption {
|
|||
return contraption;
|
||||
}
|
||||
|
||||
public boolean searchMovedStructure(World world, BlockPos pos, @Nullable Direction forcedDirection) throws AssemblyException {
|
||||
public boolean searchMovedStructure(World world, BlockPos pos, @Nullable Direction forcedDirection)
|
||||
throws AssemblyException {
|
||||
initialPassengers.clear();
|
||||
Queue<BlockPos> frontier = new LinkedList<>();
|
||||
Queue<BlockPos> frontier = new UniqueLinkedList<>();
|
||||
Set<BlockPos> visited = new HashSet<>();
|
||||
anchor = pos;
|
||||
|
||||
|
@ -297,6 +299,14 @@ public abstract class Contraption {
|
|||
if (AllBlocks.GANTRY_SHAFT.has(state))
|
||||
moveGantryShaft(world, pos, frontier, visited, state);
|
||||
|
||||
if (AllBlocks.STICKER.has(state) && state.get(StickerBlock.EXTENDED)) {
|
||||
Direction offset = state.get(StickerBlock.FACING);
|
||||
BlockPos attached = pos.offset(offset);
|
||||
if (!visited.contains(attached)
|
||||
&& !BlockMovementTraits.notSupportive(world.getBlockState(attached), offset.getOpposite()))
|
||||
frontier.add(attached);
|
||||
}
|
||||
|
||||
// Bearings potentially create stabilized sub-contraptions
|
||||
if (AllBlocks.MECHANICAL_BEARING.has(state))
|
||||
moveBearing(pos, frontier, visited, state);
|
||||
|
@ -352,7 +362,8 @@ public abstract class Contraption {
|
|||
boolean brittle = BlockMovementTraits.isBrittle(blockState);
|
||||
boolean canStick = !brittle && state.canStickTo(blockState) && blockState.canStickTo(state);
|
||||
if (canStick) {
|
||||
if (state.getPushReaction() == PushReaction.PUSH_ONLY || blockState.getPushReaction() == PushReaction.PUSH_ONLY) {
|
||||
if (state.getPushReaction() == PushReaction.PUSH_ONLY
|
||||
|| blockState.getPushReaction() == PushReaction.PUSH_ONLY) {
|
||||
canStick = false;
|
||||
}
|
||||
if (BlockMovementTraits.notSupportive(state, offset)) {
|
||||
|
@ -363,7 +374,8 @@ public abstract class Contraption {
|
|||
}
|
||||
}
|
||||
|
||||
if (!wasVisited && (canStick || blockAttachedTowardsFace || faceHasGlue || (offset == forcedDirection && !BlockMovementTraits.notSupportive(state, forcedDirection))))
|
||||
if (!wasVisited && (canStick || blockAttachedTowardsFace || faceHasGlue
|
||||
|| (offset == forcedDirection && !BlockMovementTraits.notSupportive(state, forcedDirection))))
|
||||
frontier.add(offsetPos);
|
||||
if (faceHasGlue)
|
||||
addGlue(superglue.get(offset));
|
||||
|
@ -503,7 +515,8 @@ public abstract class Contraption {
|
|||
}
|
||||
}
|
||||
|
||||
private boolean moveMechanicalPiston(World world, BlockPos pos, Queue<BlockPos> frontier, Set<BlockPos> visited, BlockState state) throws AssemblyException {
|
||||
private boolean moveMechanicalPiston(World world, BlockPos pos, Queue<BlockPos> frontier, Set<BlockPos> visited,
|
||||
BlockState state) throws AssemblyException {
|
||||
Direction direction = state.get(MechanicalPistonBlock.FACING);
|
||||
PistonState pistonState = state.get(MechanicalPistonBlock.STATE);
|
||||
if (pistonState == PistonState.MOVING)
|
||||
|
@ -625,8 +638,9 @@ public abstract class Contraption {
|
|||
specialRenderedTileEntities.clear();
|
||||
|
||||
INBT blocks = nbt.get("Blocks");
|
||||
//used to differentiate between the 'old' and the paletted serialization
|
||||
boolean usePalettedDeserialization = blocks != null && blocks.getId() == 10 && ((CompoundNBT) blocks).contains("Palette");
|
||||
// used to differentiate between the 'old' and the paletted serialization
|
||||
boolean usePalettedDeserialization =
|
||||
blocks != null && blocks.getId() == 10 && ((CompoundNBT) blocks).contains("Palette");
|
||||
readBlocksCompound(blocks, world, usePalettedDeserialization);
|
||||
|
||||
actors.clear();
|
||||
|
@ -712,16 +726,16 @@ public abstract class Contraption {
|
|||
}
|
||||
|
||||
ListNBT superglueNBT = new ListNBT();
|
||||
for (Pair<BlockPos, Direction> glueEntry : superglue) {
|
||||
CompoundNBT c = new CompoundNBT();
|
||||
c.put("Pos", NBTUtil.writeBlockPos(glueEntry.getKey()));
|
||||
c.putByte("Direction", (byte) glueEntry.getValue()
|
||||
.getIndex());
|
||||
superglueNBT.add(c);
|
||||
}
|
||||
|
||||
ListNBT storageNBT = new ListNBT();
|
||||
if (!spawnPacket) {
|
||||
for (Pair<BlockPos, Direction> glueEntry : superglue) {
|
||||
CompoundNBT c = new CompoundNBT();
|
||||
c.put("Pos", NBTUtil.writeBlockPos(glueEntry.getKey()));
|
||||
c.putByte("Direction", (byte) glueEntry.getValue()
|
||||
.getIndex());
|
||||
superglueNBT.add(c);
|
||||
}
|
||||
|
||||
for (BlockPos pos : storage.keySet()) {
|
||||
CompoundNBT c = new CompoundNBT();
|
||||
MountedStorage mountedStorage = storage.get(pos);
|
||||
|
@ -778,7 +792,9 @@ public abstract class Contraption {
|
|||
|
||||
private CompoundNBT writeBlocksCompound() {
|
||||
CompoundNBT compound = new CompoundNBT();
|
||||
PaletteHashMap<BlockState> palette = new PaletteHashMap<>(GameData.getBlockStateIDMap(), 16, (i, s) -> {throw new IllegalStateException("Palette Map index exceeded maximum");}, NBTUtil::readBlockState, NBTUtil::writeBlockState);
|
||||
PaletteHashMap<BlockState> palette = new PaletteHashMap<>(GameData.getBlockStateIDMap(), 16, (i, s) -> {
|
||||
throw new IllegalStateException("Palette Map index exceeded maximum");
|
||||
}, NBTUtil::readBlockState, NBTUtil::writeBlockState);
|
||||
ListNBT blockList = new ListNBT();
|
||||
|
||||
for (BlockInfo block : this.blocks.values()) {
|
||||
|
@ -804,7 +820,9 @@ public abstract class Contraption {
|
|||
ListNBT blockList;
|
||||
if (usePalettedDeserialization) {
|
||||
CompoundNBT c = ((CompoundNBT) compound);
|
||||
palette = new PaletteHashMap<>(GameData.getBlockStateIDMap(), 16, (i, s) -> {throw new IllegalStateException("Palette Map index exceeded maximum");}, NBTUtil::readBlockState, NBTUtil::writeBlockState);
|
||||
palette = new PaletteHashMap<>(GameData.getBlockStateIDMap(), 16, (i, s) -> {
|
||||
throw new IllegalStateException("Palette Map index exceeded maximum");
|
||||
}, NBTUtil::readBlockState, NBTUtil::writeBlockState);
|
||||
palette.read(c.getList("Palette", 10));
|
||||
|
||||
blockList = c.getList("BlockList", 10);
|
||||
|
@ -862,19 +880,15 @@ public abstract class Contraption {
|
|||
}
|
||||
|
||||
private static BlockInfo readBlockInfo(CompoundNBT blockListEntry, PaletteHashMap<BlockState> palette) {
|
||||
return new BlockInfo(
|
||||
BlockPos.fromLong(blockListEntry.getLong("Pos")),
|
||||
Objects.requireNonNull(palette.get(blockListEntry.getInt("State"))),
|
||||
blockListEntry.contains("Data") ? blockListEntry.getCompound("Data") : null
|
||||
);
|
||||
return new BlockInfo(BlockPos.fromLong(blockListEntry.getLong("Pos")),
|
||||
Objects.requireNonNull(palette.get(blockListEntry.getInt("State"))),
|
||||
blockListEntry.contains("Data") ? blockListEntry.getCompound("Data") : null);
|
||||
}
|
||||
|
||||
private static BlockInfo legacyReadBlockInfo(CompoundNBT blockListEntry) {
|
||||
return new BlockInfo(
|
||||
NBTUtil.readBlockPos(blockListEntry.getCompound("Pos")),
|
||||
NBTUtil.readBlockState(blockListEntry.getCompound("Block")),
|
||||
blockListEntry.contains("Data") ? blockListEntry.getCompound("Data") : null
|
||||
);
|
||||
return new BlockInfo(NBTUtil.readBlockPos(blockListEntry.getCompound("Pos")),
|
||||
NBTUtil.readBlockState(blockListEntry.getCompound("Block")),
|
||||
blockListEntry.contains("Data") ? blockListEntry.getCompound("Data") : null);
|
||||
}
|
||||
|
||||
public void removeBlocksFromWorld(World world, BlockPos offset) {
|
||||
|
@ -902,7 +916,7 @@ public abstract class Contraption {
|
|||
world.getWorld()
|
||||
.removeTileEntity(add);
|
||||
int flags = BlockFlags.IS_MOVING | BlockFlags.NO_NEIGHBOR_DROPS | BlockFlags.UPDATE_NEIGHBORS
|
||||
| BlockFlags.BLOCK_UPDATE;
|
||||
| BlockFlags.BLOCK_UPDATE | BlockFlags.RERENDER_MAIN_THREAD;
|
||||
if (blockIn instanceof IWaterLoggable && oldState.has(BlockStateProperties.WATERLOGGED)
|
||||
&& oldState.get(BlockStateProperties.WATERLOGGED)
|
||||
.booleanValue()) {
|
||||
|
|
|
@ -39,7 +39,7 @@ public class ContraptionEntityRenderer<C extends AbstractContraptionEntity> exte
|
|||
super.render(entity, yaw, partialTicks, ms, buffers, overlay);
|
||||
|
||||
// Keep a copy of the transforms in order to determine correct lighting
|
||||
MatrixStack msLocal = translateTo(entity, AnimationTickHolder.getRenderTick());
|
||||
MatrixStack msLocal = translateTo(entity, AnimationTickHolder.getPartialTicks());
|
||||
MatrixStack[] matrixStacks = new MatrixStack[] { ms, msLocal };
|
||||
|
||||
ms.push();
|
||||
|
|
|
@ -19,25 +19,13 @@ public class BearingLighter extends ContraptionLighter<BearingContraption> {
|
|||
Set<BlockPos> blocks = contraption.getBlocks().keySet();
|
||||
|
||||
Direction orientation = contraption.facing;
|
||||
|
||||
float maxDistanceSq = -1;
|
||||
for (BlockPos pos : blocks) {
|
||||
float x = pos.getX();
|
||||
float y = pos.getY();
|
||||
float z = pos.getZ();
|
||||
|
||||
float distSq = x * x + y * y + z * z;
|
||||
|
||||
if (distSq > maxDistanceSq) maxDistanceSq = distSq;
|
||||
}
|
||||
|
||||
int radius = (int) (Math.ceil(Math.sqrt(maxDistanceSq)));
|
||||
|
||||
GridAlignedBB betterBounds = GridAlignedBB.ofRadius(radius);
|
||||
GridAlignedBB contraptionBounds = GridAlignedBB.fromAABB(contraption.bounds);
|
||||
|
||||
Direction.Axis axis = orientation.getAxis();
|
||||
|
||||
int radius = (int) (Math.ceil(Math.sqrt(getRadius(blocks, axis))));
|
||||
|
||||
GridAlignedBB betterBounds = GridAlignedBB.ofRadius(radius);
|
||||
|
||||
GridAlignedBB contraptionBounds = GridAlignedBB.fromAABB(contraption.bounds);
|
||||
if (axis == Direction.Axis.X) {
|
||||
betterBounds.maxX = contraptionBounds.maxX;
|
||||
betterBounds.minX = contraptionBounds.minX;
|
||||
|
@ -52,4 +40,36 @@ public class BearingLighter extends ContraptionLighter<BearingContraption> {
|
|||
betterBounds.translate(contraption.anchor);
|
||||
return betterBounds;
|
||||
}
|
||||
|
||||
private static float getRadius(Set<BlockPos> blocks, Direction.Axis axis) {
|
||||
switch (axis) {
|
||||
case X:
|
||||
return getMaxDistSqr(blocks, BlockPos::getY, BlockPos::getZ);
|
||||
case Y:
|
||||
return getMaxDistSqr(blocks, BlockPos::getX, BlockPos::getZ);
|
||||
case Z:
|
||||
return getMaxDistSqr(blocks, BlockPos::getX, BlockPos::getY);
|
||||
}
|
||||
|
||||
throw new IllegalStateException("Impossible axis");
|
||||
}
|
||||
|
||||
private static float getMaxDistSqr(Set<BlockPos> blocks, Coordinate one, Coordinate other) {
|
||||
float maxDistSq = -1;
|
||||
for (BlockPos pos : blocks) {
|
||||
float a = one.get(pos);
|
||||
float b = other.get(pos);
|
||||
|
||||
float distSq = a * a + b * b;
|
||||
|
||||
|
||||
if (distSq > maxDistSq) maxDistSq = distSq;
|
||||
}
|
||||
|
||||
return maxDistSq;
|
||||
}
|
||||
|
||||
private interface Coordinate {
|
||||
float get(BlockPos from);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,162 @@
|
|||
package com.simibubi.create.content.contraptions.components.structureMovement.chassis;
|
||||
|
||||
import com.simibubi.create.AllBlocks;
|
||||
import com.simibubi.create.AllTileEntities;
|
||||
import com.simibubi.create.foundation.block.ITE;
|
||||
import com.simibubi.create.foundation.block.ProperDirectionalBlock;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.item.BlockItemUseContext;
|
||||
import net.minecraft.particles.BlockParticleData;
|
||||
import net.minecraft.particles.ParticleTypes;
|
||||
import net.minecraft.state.BooleanProperty;
|
||||
import net.minecraft.state.StateContainer.Builder;
|
||||
import net.minecraft.state.properties.BlockStateProperties;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.world.IBlockReader;
|
||||
import net.minecraft.world.IWorldReader;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.server.ServerWorld;
|
||||
|
||||
public class StickerBlock extends ProperDirectionalBlock implements ITE<StickerTileEntity> {
|
||||
|
||||
public static final BooleanProperty POWERED = BlockStateProperties.POWERED;
|
||||
public static final BooleanProperty EXTENDED = BlockStateProperties.EXTENDED;
|
||||
|
||||
public StickerBlock(Properties p_i48415_1_) {
|
||||
super(p_i48415_1_);
|
||||
setDefaultState(getDefaultState().with(POWERED, false)
|
||||
.with(EXTENDED, false));
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockState getStateForPlacement(BlockItemUseContext context) {
|
||||
Direction nearestLookingDirection = context.getNearestLookingDirection();
|
||||
boolean shouldPower = context.getWorld()
|
||||
.isBlockPowered(context.getPos());
|
||||
Direction facing = context.getPlayer() != null && context.getPlayer()
|
||||
.isSneaking() ? nearestLookingDirection : nearestLookingDirection.getOpposite();
|
||||
|
||||
return getDefaultState().with(FACING, facing)
|
||||
.with(POWERED, shouldPower);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void fillStateContainer(Builder<Block, BlockState> builder) {
|
||||
super.fillStateContainer(builder.add(POWERED, EXTENDED));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void neighborChanged(BlockState state, World worldIn, BlockPos pos, Block blockIn, BlockPos fromPos,
|
||||
boolean isMoving) {
|
||||
if (worldIn.isRemote)
|
||||
return;
|
||||
|
||||
boolean previouslyPowered = state.get(POWERED);
|
||||
if (previouslyPowered != worldIn.isBlockPowered(pos)) {
|
||||
state = state.cycle(POWERED);
|
||||
if (state.get(POWERED))
|
||||
state = state.cycle(EXTENDED);
|
||||
worldIn.setBlockState(pos, state, 2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasTileEntity(BlockState state) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldCheckWeakPower(BlockState state, IWorldReader world, BlockPos pos, Direction side) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createTileEntity(BlockState state, IBlockReader world) {
|
||||
return AllTileEntities.STICKER.create();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<StickerTileEntity> getTileEntityClass() {
|
||||
return StickerTileEntity.class;
|
||||
}
|
||||
|
||||
// Slime block stuff
|
||||
|
||||
private boolean isUprightSticker(IBlockReader world, BlockPos pos) {
|
||||
BlockState blockState = world.getBlockState(pos);
|
||||
return AllBlocks.STICKER.has(blockState) && blockState.get(FACING) == Direction.UP;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFallenUpon(World p_180658_1_, BlockPos p_180658_2_, Entity p_180658_3_, float p_180658_4_) {
|
||||
if (!isUprightSticker(p_180658_1_, p_180658_2_) || p_180658_3_.bypassesLandingEffects()) {
|
||||
super.onFallenUpon(p_180658_1_, p_180658_2_, p_180658_3_, p_180658_4_);
|
||||
} else {
|
||||
p_180658_3_.handleFallDamage(p_180658_4_, 0.0F);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLanded(IBlockReader p_176216_1_, Entity p_176216_2_) {
|
||||
if (!isUprightSticker(p_176216_1_, p_176216_2_.getPosition()
|
||||
.down()) || p_176216_2_.bypassesLandingEffects()) {
|
||||
super.onLanded(p_176216_1_, p_176216_2_);
|
||||
} else {
|
||||
this.func_226946_a_(p_176216_2_);
|
||||
}
|
||||
}
|
||||
|
||||
private void func_226946_a_(Entity p_226946_1_) {
|
||||
Vec3d vec3d = p_226946_1_.getMotion();
|
||||
if (vec3d.y < 0.0D) {
|
||||
double d0 = p_226946_1_ instanceof LivingEntity ? 1.0D : 0.8D;
|
||||
p_226946_1_.setMotion(vec3d.x, -vec3d.y * d0, vec3d.z);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEntityWalk(World p_176199_1_, BlockPos p_176199_2_, Entity p_176199_3_) {
|
||||
double d0 = Math.abs(p_176199_3_.getMotion().y);
|
||||
if (d0 < 0.1D && !p_176199_3_.bypassesSteppingEffects() && isUprightSticker(p_176199_1_, p_176199_2_)) {
|
||||
double d1 = 0.4D + d0 * 0.2D;
|
||||
p_176199_3_.setMotion(p_176199_3_.getMotion()
|
||||
.mul(d1, 1.0D, d1));
|
||||
}
|
||||
super.onEntityWalk(p_176199_1_, p_176199_2_, p_176199_3_);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean addLandingEffects(BlockState state1, ServerWorld worldserver, BlockPos pos, BlockState state2,
|
||||
LivingEntity entity, int numberOfParticles) {
|
||||
if (isUprightSticker(worldserver, pos)) {
|
||||
worldserver.spawnParticle(new BlockParticleData(ParticleTypes.BLOCK, Blocks.SLIME_BLOCK.getDefaultState()),
|
||||
entity.getX(), entity.getY(), entity.getZ(), numberOfParticles, 0.0D, 0.0D, 0.0D, (double) 0.15F);
|
||||
return true;
|
||||
}
|
||||
return super.addLandingEffects(state1, worldserver, pos, state2, entity, numberOfParticles);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean addRunningEffects(BlockState state, World world, BlockPos pos, Entity entity) {
|
||||
if (state.get(FACING) == Direction.UP) {
|
||||
Vec3d vec3d = entity.getMotion();
|
||||
world.addParticle(
|
||||
new BlockParticleData(ParticleTypes.BLOCK, Blocks.SLIME_BLOCK.getDefaultState()).setPos(pos),
|
||||
entity.getX() + ((double) world.rand.nextFloat() - 0.5D) * (double) entity.getWidth(),
|
||||
entity.getY() + 0.1D,
|
||||
entity.getZ() + ((double) world.rand.nextFloat() - 0.5D) * (double) entity.getWidth(), vec3d.x * -4.0D,
|
||||
1.5D, vec3d.z * -4.0D);
|
||||
return true;
|
||||
}
|
||||
return super.addRunningEffects(state, world, pos, entity);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
package com.simibubi.create.content.contraptions.components.structureMovement.chassis;
|
||||
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import com.simibubi.create.AllBlockPartials;
|
||||
import com.simibubi.create.foundation.render.SuperByteBuffer;
|
||||
import com.simibubi.create.foundation.tileEntity.renderer.SafeTileEntityRenderer;
|
||||
import com.simibubi.create.foundation.utility.AngleHelper;
|
||||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||
import com.simibubi.create.foundation.utility.MatrixStacker;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
||||
import net.minecraft.client.renderer.RenderType;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
|
||||
import net.minecraft.util.Direction;
|
||||
|
||||
public class StickerRenderer extends SafeTileEntityRenderer<StickerTileEntity> {
|
||||
|
||||
public StickerRenderer(TileEntityRendererDispatcher dispatcher) {
|
||||
super(dispatcher);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void renderSafe(StickerTileEntity te, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffer,
|
||||
int light, int overlay) {
|
||||
BlockState state = te.getBlockState();
|
||||
SuperByteBuffer head = AllBlockPartials.STICKER_HEAD.renderOn(state);
|
||||
float offset = te.piston.getValue(AnimationTickHolder.getPartialTicks());
|
||||
|
||||
if (te.getWorld() != Minecraft.getInstance().world)
|
||||
offset = state.get(StickerBlock.EXTENDED) ? 1 : 0;
|
||||
|
||||
Direction facing = state.get(StickerBlock.FACING);
|
||||
ms.push();
|
||||
MatrixStacker.of(ms)
|
||||
.nudge(te.hashCode())
|
||||
.centre()
|
||||
.rotateY(AngleHelper.horizontalAngle(facing))
|
||||
.rotateX(AngleHelper.verticalAngle(facing) + 90)
|
||||
.unCentre();
|
||||
ms.translate(0, (offset * offset) * 4 / 16f, 0);
|
||||
head.light(light)
|
||||
.renderInto(ms, buffer.getBuffer(RenderType.getSolid()));
|
||||
ms.pop();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,94 @@
|
|||
package com.simibubi.create.content.contraptions.components.structureMovement.chassis;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.simibubi.create.AllBlocks;
|
||||
import com.simibubi.create.AllSoundEvents;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.glue.SuperGlueEntity;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.glue.SuperGlueItem;
|
||||
import com.simibubi.create.foundation.tileEntity.SmartTileEntity;
|
||||
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
|
||||
import com.simibubi.create.foundation.utility.LerpedFloat;
|
||||
import com.simibubi.create.foundation.utility.LerpedFloat.Chaser;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.tileentity.TileEntityType;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.SoundCategory;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import net.minecraftforge.fml.DistExecutor;
|
||||
|
||||
public class StickerTileEntity extends SmartTileEntity {
|
||||
|
||||
LerpedFloat piston;
|
||||
boolean update;
|
||||
|
||||
public StickerTileEntity(TileEntityType<?> tileEntityTypeIn) {
|
||||
super(tileEntityTypeIn);
|
||||
piston = LerpedFloat.linear();
|
||||
update = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addBehaviours(List<TileEntityBehaviour> behaviours) {}
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
super.initialize();
|
||||
if (!world.isRemote)
|
||||
return;
|
||||
piston.startWithValue(isBlockStateExtended() ? 1 : 0);
|
||||
}
|
||||
|
||||
public boolean isBlockStateExtended() {
|
||||
BlockState blockState = getBlockState();
|
||||
boolean extended = AllBlocks.STICKER.has(blockState) && blockState.get(StickerBlock.EXTENDED);
|
||||
return extended;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
super.tick();
|
||||
if (!world.isRemote)
|
||||
return;
|
||||
piston.tickChaser();
|
||||
|
||||
if (isAttachedToBlock() && piston.getValue(0) != piston.getValue() && piston.getValue() == 1) {
|
||||
SuperGlueItem.spawnParticles(world, pos, getBlockState().get(StickerBlock.FACING), true);
|
||||
DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> playSound(true));
|
||||
}
|
||||
|
||||
if (!update)
|
||||
return;
|
||||
update = false;
|
||||
int target = isBlockStateExtended() ? 1 : 0;
|
||||
if (isAttachedToBlock() && target == 0 && piston.getChaseTarget() == 1)
|
||||
DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> playSound(false));
|
||||
piston.chase(target, .4f, Chaser.LINEAR);
|
||||
}
|
||||
|
||||
public boolean isAttachedToBlock() {
|
||||
BlockState blockState = getBlockState();
|
||||
if (!AllBlocks.STICKER.has(blockState))
|
||||
return false;
|
||||
Direction direction = blockState.get(StickerBlock.FACING);
|
||||
return SuperGlueEntity.isValidFace(world, pos.offset(direction), direction.getOpposite());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void read(CompoundNBT compound, boolean clientPacket) {
|
||||
super.read(compound, clientPacket);
|
||||
if (clientPacket)
|
||||
update = true;
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public void playSound(boolean attach) {
|
||||
world.playSound(Minecraft.getInstance().player, pos, AllSoundEvents.SLIME_ADDED.get(), SoundCategory.BLOCKS,
|
||||
0.35F, attach ? 0.75F : 0.2f);
|
||||
}
|
||||
|
||||
}
|
|
@ -72,7 +72,7 @@ public class GantryPinionRenderer extends KineticTileEntityRenderer {
|
|||
}
|
||||
|
||||
public static float getAngleForTe(KineticTileEntity te, final BlockPos pos, Axis axis) {
|
||||
float time = AnimationTickHolder.getRenderTick();
|
||||
float time = AnimationTickHolder.getRenderTime();
|
||||
float offset = getRotationOffsetForPosition(te, pos, axis);
|
||||
return ((time * te.getSpeed() * 3f / 20 + offset) % 360) / 180 * (float) Math.PI;
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ import com.simibubi.create.content.contraptions.base.KineticRenderMaterials;
|
|||
import com.simibubi.create.content.contraptions.base.RotatingInstancedModel;
|
||||
import com.simibubi.create.content.contraptions.components.actors.RotatingActorModel;
|
||||
import com.simibubi.create.content.contraptions.relays.belt.BeltInstancedModel;
|
||||
import com.simibubi.create.content.logistics.block.FlapInstancedModel;
|
||||
import com.simibubi.create.foundation.render.AllProgramSpecs;
|
||||
import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer;
|
||||
import com.simibubi.create.foundation.render.backend.instancing.RenderMaterial;
|
||||
|
@ -16,6 +17,7 @@ public class ContraptionKineticRenderer extends InstancedTileRenderer<Contraptio
|
|||
public void registerMaterials() {
|
||||
materials.put(KineticRenderMaterials.BELTS, new RenderMaterial<>(this, AllProgramSpecs.CONTRAPTION_BELT, BeltInstancedModel::new));
|
||||
materials.put(KineticRenderMaterials.ROTATING, new RenderMaterial<>(this, AllProgramSpecs.CONTRAPTION_ROTATING, RotatingInstancedModel::new));
|
||||
materials.put(KineticRenderMaterials.FLAPS, new RenderMaterial<>(this, AllProgramSpecs.CONTRAPTION_FLAPS, FlapInstancedModel::new));
|
||||
materials.put(KineticRenderMaterials.ACTORS, new RenderMaterial<>(this, AllProgramSpecs.CONTRAPTION_ACTOR, RotatingActorModel::new));
|
||||
}
|
||||
|
||||
|
|
|
@ -3,20 +3,69 @@ package com.simibubi.create.content.contraptions.components.structureMovement.re
|
|||
import java.nio.ByteBuffer;
|
||||
|
||||
import com.simibubi.create.foundation.render.backend.BufferedModel;
|
||||
import com.simibubi.create.foundation.render.backend.gl.GlBuffer;
|
||||
import com.simibubi.create.foundation.render.backend.gl.GlPrimitiveType;
|
||||
import com.simibubi.create.foundation.render.backend.gl.attrib.VertexFormat;
|
||||
|
||||
import net.minecraft.client.renderer.BufferBuilder;
|
||||
import net.minecraft.client.renderer.LightTexture;
|
||||
import org.lwjgl.opengl.GL15;
|
||||
import org.lwjgl.opengl.GL20;
|
||||
|
||||
public class ContraptionModel extends BufferedModel {
|
||||
public static final VertexFormat FORMAT = VertexFormat.builder()
|
||||
.addAttributes(ContraptionVertexAttributes.class)
|
||||
.build();
|
||||
|
||||
protected GlPrimitiveType eboIndexType;
|
||||
protected GlBuffer ebo;
|
||||
|
||||
public ContraptionModel(BufferBuilder buf) {
|
||||
super(buf);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void init() {
|
||||
super.init();
|
||||
|
||||
createEBO();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doRender() {
|
||||
modelVBO.bind();
|
||||
ebo.bind();
|
||||
|
||||
setupAttributes();
|
||||
GL20.glDrawElements(GL20.GL_QUADS, vertexCount, eboIndexType.getGlConstant(), 0);
|
||||
|
||||
int numAttributes = getTotalShaderAttributeCount();
|
||||
for (int i = 0; i <= numAttributes; i++) {
|
||||
GL20.glDisableVertexAttribArray(i);
|
||||
}
|
||||
|
||||
ebo.unbind();
|
||||
modelVBO.unbind();
|
||||
}
|
||||
|
||||
protected final void createEBO() {
|
||||
ebo = new GlBuffer(GL15.GL_ELEMENT_ARRAY_BUFFER);
|
||||
eboIndexType = GlPrimitiveType.UINT; // TODO: choose this based on the number of vertices
|
||||
|
||||
int indicesSize = vertexCount * eboIndexType.getSize();
|
||||
|
||||
ebo.bind();
|
||||
|
||||
GL15.glBufferData(GL15.GL_ELEMENT_ARRAY_BUFFER, indicesSize, GL15.GL_STATIC_DRAW);
|
||||
ebo.map(indicesSize, indices -> {
|
||||
for (int i = 0; i < vertexCount; i++) {
|
||||
indices.putInt(i);
|
||||
}
|
||||
});
|
||||
|
||||
ebo.unbind();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void copyVertex(ByteBuffer to, int vertex) {
|
||||
to.putFloat(getX(template, vertex));
|
||||
|
@ -48,4 +97,10 @@ public class ContraptionModel extends BufferedModel {
|
|||
protected VertexFormat getModelFormat() {
|
||||
return FORMAT;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void deleteInternal() {
|
||||
super.deleteInternal();
|
||||
ebo.delete();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -64,6 +64,12 @@ public class ContraptionRenderDispatcher {
|
|||
}
|
||||
}
|
||||
|
||||
public static void notifyLightPacket(ILightReader world, int chunkX, int chunkZ) {
|
||||
for (RenderedContraption renderer : renderers.values()) {
|
||||
renderer.getLighter().lightVolume.notifyLightPacket(world, chunkX, chunkZ);
|
||||
}
|
||||
}
|
||||
|
||||
public static void renderTick() {
|
||||
firstLayer = true;
|
||||
}
|
||||
|
@ -98,20 +104,17 @@ public class ContraptionRenderDispatcher {
|
|||
return contraption;
|
||||
}
|
||||
|
||||
public static void beginFrame(double camX, double camY, double camZ) {
|
||||
for (RenderedContraption renderer : renderers.values()) {
|
||||
renderer.beginFrame(camX, camY, camZ);
|
||||
}
|
||||
}
|
||||
|
||||
public static void renderLayer(RenderType layer, Matrix4f viewProjection, double camX, double camY, double camZ) {
|
||||
removeDeadContraptions();
|
||||
|
||||
if (renderers.isEmpty()) return;
|
||||
|
||||
if (firstLayer) {
|
||||
|
||||
for (RenderedContraption renderer : renderers.values()) {
|
||||
renderer.beginFrame(camX, camY, camZ);
|
||||
}
|
||||
|
||||
firstLayer = false;
|
||||
}
|
||||
|
||||
layer.startDrawing();
|
||||
GL11.glEnable(GL13.GL_TEXTURE_3D);
|
||||
GL13.glActiveTexture(GL40.GL_TEXTURE4); // the shaders expect light volumes to be in texture 4
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
package com.simibubi.create.content.contraptions.goggles;
|
||||
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import com.simibubi.create.AllBlockPartials;
|
||||
import com.simibubi.create.foundation.block.render.WrappedBakedModel;
|
||||
|
||||
import net.minecraft.client.renderer.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.model.ItemCameraTransforms.TransformType;
|
||||
|
||||
public class GogglesModel extends WrappedBakedModel {
|
||||
|
||||
public GogglesModel(IBakedModel template) {
|
||||
super(template);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBakedModel handlePerspective(TransformType cameraTransformType, MatrixStack mat) {
|
||||
if (cameraTransformType == TransformType.HEAD)
|
||||
return AllBlockPartials.GOGGLES.get()
|
||||
.handlePerspective(cameraTransformType, mat);
|
||||
return super.handlePerspective(cameraTransformType, mat);
|
||||
}
|
||||
|
||||
}
|
|
@ -72,7 +72,7 @@ public class BasinRenderer extends SmartTileEntityRenderer<BasinTileEntity> {
|
|||
|
||||
if (fluidLevel > 0) {
|
||||
ms.translate(0,
|
||||
(MathHelper.sin(AnimationTickHolder.getRenderTick() / 12f + anglePartition * itemCount) + 1.5f) * 1
|
||||
(MathHelper.sin(AnimationTickHolder.getRenderTime() / 12f + anglePartition * itemCount) + 1.5f) * 1
|
||||
/ 32f,
|
||||
0);
|
||||
}
|
||||
|
|
|
@ -55,6 +55,8 @@ public class ProcessingInventory extends ItemStackHandler {
|
|||
recipeDuration = nbt.getFloat("RecipeTime");
|
||||
appliedRecipe = nbt.getBoolean("AppliedRecipe");
|
||||
super.deserializeNBT(nbt);
|
||||
if(isEmpty())
|
||||
appliedRecipe = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -27,7 +27,7 @@ public class BlazeBurnerRenderer extends SafeTileEntityRenderer<BlazeBurnerTileE
|
|||
if (heatLevel == HeatLevel.NONE)
|
||||
return;
|
||||
|
||||
float renderTick = AnimationTickHolder.getRenderTick() + (te.hashCode() % 13) * 16f;
|
||||
float renderTick = AnimationTickHolder.getRenderTime() + (te.hashCode() % 13) * 16f;
|
||||
float offset = (MathHelper.sin((float) ((renderTick / 16f) % (2 * Math.PI))) + .5f) / 16f;
|
||||
|
||||
AllBlockPartials blazeModel = AllBlockPartials.BLAZES.get(heatLevel);
|
||||
|
|
|
@ -72,7 +72,7 @@ public class BeltRenderer extends SafeTileEntityRenderer<BeltTileEntity> {
|
|||
|
||||
MatrixStacker msr = MatrixStacker.of(ms);
|
||||
IVertexBuilder vb = buffer.getBuffer(RenderType.getSolid());
|
||||
float renderTick = AnimationTickHolder.getRenderTick();
|
||||
float renderTick = AnimationTickHolder.getRenderTime();
|
||||
|
||||
ms.push();
|
||||
msr.centre();
|
||||
|
|
|
@ -521,7 +521,7 @@ public class BeltTileEntity extends KineticTileEntity {
|
|||
|
||||
@Override
|
||||
public boolean shouldRenderAsTE() {
|
||||
return isController();
|
||||
return BeltBlock.canTransportObjects(getBlockState());
|
||||
}
|
||||
|
||||
private void updateLight() {
|
||||
|
|
|
@ -32,7 +32,7 @@ public class SplitShaftRenderer extends KineticTileEntityRenderer {
|
|||
Block block = te.getBlockState().getBlock();
|
||||
final Axis boxAxis = ((IRotate) block).getRotationAxis(te.getBlockState());
|
||||
final BlockPos pos = te.getPos();
|
||||
float time = AnimationTickHolder.getRenderTick();
|
||||
float time = AnimationTickHolder.getRenderTime();
|
||||
|
||||
for (Direction direction : Iterate.directions) {
|
||||
Axis axis = direction.getAxis();
|
||||
|
|
|
@ -30,7 +30,7 @@ public class GearboxRenderer extends KineticTileEntityRenderer {
|
|||
|
||||
final Axis boxAxis = te.getBlockState().get(BlockStateProperties.AXIS);
|
||||
final BlockPos pos = te.getPos();
|
||||
float time = AnimationTickHolder.getRenderTick();
|
||||
float time = AnimationTickHolder.getRenderTime();
|
||||
|
||||
for (Direction direction : Iterate.directions) {
|
||||
final Axis axis = direction.getAxis();
|
||||
|
|
|
@ -16,7 +16,7 @@ public class WrenchItemRenderer extends CustomRenderedItemModelRenderer<WrenchMo
|
|||
IRenderTypeBuffer buffer, int light, int overlay) {
|
||||
renderer.render(model.getBakedModel(), light);
|
||||
|
||||
float worldTime = AnimationTickHolder.getRenderTick();
|
||||
float worldTime = AnimationTickHolder.getRenderTime();
|
||||
float angle = worldTime * -.5f % 360;
|
||||
float xOffset = -1/16f;
|
||||
ms.translate(-xOffset, 0, 0);
|
||||
|
|
|
@ -14,7 +14,7 @@ public class ChromaticCompoundColor implements IItemColor {
|
|||
public int getColor(ItemStack stack, int layer) {
|
||||
Minecraft mc = Minecraft.getInstance();
|
||||
float pt = AnimationTickHolder.getPartialTicks();
|
||||
float progress = (float) ((mc.player.getYaw(pt)) / 180 * Math.PI) + (AnimationTickHolder.getRenderTick() / 10f);
|
||||
float progress = (float) ((mc.player.getYaw(pt)) / 180 * Math.PI) + (AnimationTickHolder.getRenderTime() / 10f);
|
||||
if (layer == 0)
|
||||
return ColorHelper.mixColors(0x6e5773, 0x6B3074, ((float) MathHelper.sin(progress) + 1) / 2);
|
||||
if (layer == 1)
|
||||
|
|
|
@ -100,7 +100,7 @@ public class SymmetryHandler {
|
|||
|
||||
float yShift = 0;
|
||||
double speed = 1 / 16d;
|
||||
yShift = MathHelper.sin((float) (AnimationTickHolder.getRenderTick() * speed)) / 5f;
|
||||
yShift = MathHelper.sin((float) (AnimationTickHolder.getRenderTime() * speed)) / 5f;
|
||||
|
||||
IRenderTypeBuffer.Impl buffer = Minecraft.getInstance()
|
||||
.getBufferBuilders()
|
||||
|
|
|
@ -15,7 +15,7 @@ public class SymmetryWandItemRenderer extends CustomRenderedItemModelRenderer<Sy
|
|||
@Override
|
||||
protected void render(ItemStack stack, SymmetryWandModel model, PartialItemModelRenderer renderer, MatrixStack ms,
|
||||
IRenderTypeBuffer buffer, int light, int overlay) {
|
||||
float worldTime = AnimationTickHolder.getRenderTick() / 20;
|
||||
float worldTime = AnimationTickHolder.getRenderTime() / 20;
|
||||
int maxLight = 0xF000F0;
|
||||
|
||||
renderer.render(model.getBakedModel(), light);
|
||||
|
|
|
@ -15,7 +15,7 @@ public class DeforesterItemRenderer extends CustomRenderedItemModelRenderer<Defo
|
|||
protected void render(ItemStack stack, DeforesterModel model, PartialItemModelRenderer renderer,
|
||||
MatrixStack ms, IRenderTypeBuffer buffer, int light, int overlay) {
|
||||
int maxLight = 0xF000F0;
|
||||
float worldTime = AnimationTickHolder.getRenderTick();
|
||||
float worldTime = AnimationTickHolder.getRenderTime();
|
||||
|
||||
renderer.renderSolid(model.getBakedModel(), light);
|
||||
renderer.renderSolidGlowing(model.getPartial("core"), maxLight);
|
||||
|
|
|
@ -97,7 +97,7 @@ public class ExtendoGripItemRenderer extends CustomRenderedItemModelRenderer<Ext
|
|||
|
||||
// cog
|
||||
ms.push();
|
||||
float angle = AnimationTickHolder.getRenderTick() * -2;
|
||||
float angle = AnimationTickHolder.getRenderTime() * -2;
|
||||
if (leftHand || rightHand)
|
||||
angle += 360 * animation;
|
||||
angle %= 360;
|
||||
|
|
|
@ -33,7 +33,7 @@ public class BlockzapperItemRenderer extends ZapperItemRenderer<BlockzapperModel
|
|||
super.render(stack, model, renderer, ms, buffer, light, overlay);
|
||||
|
||||
float pt = AnimationTickHolder.getPartialTicks();
|
||||
float worldTime = AnimationTickHolder.getRenderTick() / 20;
|
||||
float worldTime = AnimationTickHolder.getRenderTime() / 20;
|
||||
|
||||
renderer.render(model.getBakedModel(), light);
|
||||
renderComponent(stack, model, Body, renderer, light);
|
||||
|
|
|
@ -25,7 +25,7 @@ public class WorldshaperItemRenderer extends ZapperItemRenderer<WorldshaperModel
|
|||
super.render(stack, model, renderer, ms, buffer, light, overlay);
|
||||
|
||||
float pt = AnimationTickHolder.getPartialTicks();
|
||||
float worldTime = AnimationTickHolder.getRenderTick() / 20;
|
||||
float worldTime = AnimationTickHolder.getRenderTime() / 20;
|
||||
|
||||
renderer.renderSolid(model.getBakedModel(), light);
|
||||
|
||||
|
|
|
@ -0,0 +1,122 @@
|
|||
package com.simibubi.create.content.logistics.block;
|
||||
|
||||
import com.simibubi.create.foundation.render.backend.gl.attrib.VertexFormat;
|
||||
import com.simibubi.create.foundation.render.backend.instancing.InstanceData;
|
||||
import com.simibubi.create.foundation.render.backend.instancing.InstancedModel;
|
||||
import net.minecraft.client.renderer.Vector3f;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
public class FlapData extends InstanceData {
|
||||
|
||||
public static VertexFormat FORMAT = VertexFormat.builder()
|
||||
.addAttributes(FlapVertexAttributes.class)
|
||||
.build();
|
||||
|
||||
private float x;
|
||||
private float y;
|
||||
private float z;
|
||||
private byte blockLight;
|
||||
private byte skyLight;
|
||||
|
||||
private float segmentOffsetX;
|
||||
private float segmentOffsetY;
|
||||
private float segmentOffsetZ;
|
||||
|
||||
private float pivotX;
|
||||
private float pivotY;
|
||||
private float pivotZ;
|
||||
|
||||
private float horizontalAngle;
|
||||
private float intensity;
|
||||
private float flapScale;
|
||||
|
||||
private float flapness;
|
||||
|
||||
public FlapData(InstancedModel<?> owner) {
|
||||
super(owner);
|
||||
}
|
||||
|
||||
public FlapData setPosition(BlockPos pos) {
|
||||
return setPosition(pos.getX(), pos.getY(), pos.getZ());
|
||||
}
|
||||
|
||||
public FlapData setPosition(Vector3f pos) {
|
||||
return setPosition(pos.getX(), pos.getY(), pos.getZ());
|
||||
}
|
||||
|
||||
public FlapData setPosition(int x, int y, int z) {
|
||||
BlockPos origin = owner.renderer.getOriginCoordinate();
|
||||
|
||||
return setPosition((float) (x - origin.getX()),
|
||||
(float) (y - origin.getY()),
|
||||
(float) (z - origin.getZ()));
|
||||
}
|
||||
|
||||
public FlapData setPosition(float x, float y, float z) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
return this;
|
||||
}
|
||||
|
||||
public FlapData setBlockLight(int blockLight) {
|
||||
this.blockLight = (byte) ((blockLight & 0xF) << 4);
|
||||
return this;
|
||||
}
|
||||
|
||||
public FlapData setSkyLight(int skyLight) {
|
||||
this.skyLight = (byte) ((skyLight & 0xF) << 4);
|
||||
return this;
|
||||
}
|
||||
|
||||
public FlapData setSegmentOffset(float x, float y, float z) {
|
||||
this.segmentOffsetX = x;
|
||||
this.segmentOffsetY = y;
|
||||
this.segmentOffsetZ = z;
|
||||
return this;
|
||||
}
|
||||
|
||||
public FlapData setIntensity(float intensity) {
|
||||
this.intensity = intensity;
|
||||
return this;
|
||||
}
|
||||
|
||||
public FlapData setHorizontalAngle(float horizontalAngle) {
|
||||
this.horizontalAngle = horizontalAngle;
|
||||
return this;
|
||||
}
|
||||
|
||||
public FlapData setFlapScale(float flapScale) {
|
||||
this.flapScale = flapScale;
|
||||
return this;
|
||||
}
|
||||
|
||||
public FlapData setFlapness(float flapness) {
|
||||
this.flapness = flapness;
|
||||
return this;
|
||||
}
|
||||
|
||||
public FlapData setPivotVoxelSpace(float x, float y, float z) {
|
||||
pivotX = x / 16f;
|
||||
pivotY = y / 16f;
|
||||
pivotZ = z / 16f;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(ByteBuffer buf) {
|
||||
putVec3(buf, x, y, z);
|
||||
putVec2(buf, blockLight, skyLight);
|
||||
|
||||
putVec3(buf, segmentOffsetX, segmentOffsetY, segmentOffsetZ);
|
||||
putVec3(buf, pivotX, pivotY, pivotZ);
|
||||
|
||||
put(buf, horizontalAngle);
|
||||
put(buf, intensity);
|
||||
put(buf, flapScale);
|
||||
|
||||
put(buf, flapness);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
package com.simibubi.create.content.logistics.block;
|
||||
|
||||
import com.simibubi.create.foundation.render.backend.gl.attrib.VertexFormat;
|
||||
import com.simibubi.create.foundation.render.backend.instancing.InstancedModel;
|
||||
import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer;
|
||||
import net.minecraft.client.renderer.BufferBuilder;
|
||||
|
||||
public class FlapInstancedModel extends InstancedModel<FlapData> {
|
||||
public FlapInstancedModel(InstancedTileRenderer<?> renderer, BufferBuilder buf) {
|
||||
super(renderer, buf);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected FlapData newInstance() {
|
||||
return new FlapData(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected VertexFormat getInstanceFormat() {
|
||||
return FlapData.FORMAT;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
package com.simibubi.create.content.logistics.block;
|
||||
|
||||
import com.simibubi.create.foundation.render.backend.gl.attrib.CommonAttributes;
|
||||
import com.simibubi.create.foundation.render.backend.gl.attrib.IVertexAttrib;
|
||||
import com.simibubi.create.foundation.render.backend.gl.attrib.VertexAttribSpec;
|
||||
|
||||
public enum FlapVertexAttributes implements IVertexAttrib {
|
||||
INSTANCE_POSITION("aInstancePos",CommonAttributes.VEC3),
|
||||
LIGHT("aLight", CommonAttributes.LIGHT),
|
||||
SEGMENT_OFFSET("aSegmentOffset", CommonAttributes.VEC3),
|
||||
PIVOT("aPivot", CommonAttributes.VEC3),
|
||||
HORIZONTAL_ANGLE("aHorizontalAngle", CommonAttributes.FLOAT),
|
||||
INTENSITY("aIntensity", CommonAttributes.FLOAT),
|
||||
FLAP_SCALE("aFlapScale", CommonAttributes.FLOAT),
|
||||
FLAPNESS("aFlapness", CommonAttributes.FLOAT),
|
||||
;
|
||||
|
||||
private final String name;
|
||||
private final VertexAttribSpec spec;
|
||||
|
||||
FlapVertexAttributes(String name, VertexAttribSpec spec) {
|
||||
this.name = name;
|
||||
this.spec = spec;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String attribName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public VertexAttribSpec attribSpec() {
|
||||
return spec;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getDivisor() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBufferIndex() {
|
||||
return 1;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,106 @@
|
|||
package com.simibubi.create.content.logistics.block.belts.tunnel;
|
||||
|
||||
import com.simibubi.create.AllBlockPartials;
|
||||
import com.simibubi.create.content.contraptions.base.KineticRenderMaterials;
|
||||
import com.simibubi.create.content.logistics.block.FlapData;
|
||||
import com.simibubi.create.foundation.render.backend.instancing.*;
|
||||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||
import net.minecraft.tileentity.TileEntityType;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.world.LightType;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.fml.DistExecutor;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.EnumMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class BeltTunnelInstance extends TileEntityInstance<BeltTunnelTileEntity> implements ITickableInstance {
|
||||
public static void register(TileEntityType<? extends BeltTunnelTileEntity> type) {
|
||||
DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () ->
|
||||
InstancedTileRenderRegistry.instance.register(type, BeltTunnelInstance::new));
|
||||
}
|
||||
|
||||
private Map<Direction, ArrayList<InstanceKey<FlapData>>> tunnelFlaps;
|
||||
|
||||
public BeltTunnelInstance(InstancedTileRenderer<?> modelManager, BeltTunnelTileEntity tile) {
|
||||
super(modelManager, tile);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void init() {
|
||||
tunnelFlaps = new EnumMap<>(Direction.class);
|
||||
|
||||
InstancedModel<FlapData> model = modelManager.getMaterial(KineticRenderMaterials.FLAPS)
|
||||
.getModel(AllBlockPartials.BELT_TUNNEL_FLAP, lastState);
|
||||
|
||||
int blockLight = world.getLightLevel(LightType.BLOCK, pos);
|
||||
int skyLight = world.getLightLevel(LightType.SKY, pos);
|
||||
|
||||
tile.flaps.forEach((direction, flapValue) -> {
|
||||
|
||||
float flapness = flapValue.get(AnimationTickHolder.getPartialTicks());
|
||||
|
||||
float horizontalAngle = direction.getOpposite().getHorizontalAngle();
|
||||
|
||||
float flapScale = direction.getAxis() == Direction.Axis.X ? 1 : -1;
|
||||
|
||||
ArrayList<InstanceKey<FlapData>> flaps = new ArrayList<>(4);
|
||||
|
||||
for (int segment = 0; segment <= 3; segment++) {
|
||||
float intensity = segment == 3 ? 1.5f : segment + 1;
|
||||
float segmentOffset = -3 / 16f * segment;
|
||||
|
||||
flaps.add(model.setupInstance(flapData -> {
|
||||
flapData.setPosition(pos)
|
||||
.setSegmentOffset(segmentOffset, 0, 0)
|
||||
.setBlockLight(blockLight)
|
||||
.setSkyLight(skyLight)
|
||||
.setHorizontalAngle(horizontalAngle)
|
||||
.setFlapness(flapness)
|
||||
.setFlapScale(flapScale)
|
||||
.setPivotVoxelSpace(0, 10, 1)
|
||||
.setIntensity(intensity);
|
||||
}));
|
||||
}
|
||||
|
||||
tunnelFlaps.put(direction, flaps);
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
tunnelFlaps.forEach((direction, keys) -> {
|
||||
|
||||
float flapness = tile.flaps.get(direction).get(AnimationTickHolder.getPartialTicks());
|
||||
for (InstanceKey<FlapData> key : keys) {
|
||||
key.modifyInstance(data -> data.setFlapness(flapness));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onUpdate() { }
|
||||
|
||||
@Override
|
||||
public void updateLight() {
|
||||
int blockLight = world.getLightLevel(LightType.BLOCK, pos);
|
||||
int skyLight = world.getLightLevel(LightType.SKY, pos);
|
||||
|
||||
for (ArrayList<InstanceKey<FlapData>> instanceKeys : tunnelFlaps.values()) {
|
||||
for (InstanceKey<FlapData> it : instanceKeys) {
|
||||
it.modifyInstance(data -> data.setBlockLight(blockLight)
|
||||
.setSkyLight(skyLight));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void remove() {
|
||||
tunnelFlaps.values()
|
||||
.stream()
|
||||
.flatMap(Collection::stream)
|
||||
.forEach(InstanceKey::delete);
|
||||
}
|
||||
}
|
|
@ -4,6 +4,8 @@ import com.mojang.blaze3d.matrix.MatrixStack;
|
|||
import com.mojang.blaze3d.vertex.IVertexBuilder;
|
||||
import com.simibubi.create.AllBlockPartials;
|
||||
import com.simibubi.create.foundation.render.SuperByteBuffer;
|
||||
import com.simibubi.create.foundation.render.backend.Backend;
|
||||
import com.simibubi.create.foundation.render.backend.FastRenderDispatcher;
|
||||
import com.simibubi.create.foundation.tileEntity.renderer.SmartTileEntityRenderer;
|
||||
import com.simibubi.create.foundation.utility.AngleHelper;
|
||||
import com.simibubi.create.foundation.utility.Iterate;
|
||||
|
@ -28,6 +30,9 @@ public class BeltTunnelRenderer extends SmartTileEntityRenderer<BeltTunnelTileEn
|
|||
protected void renderSafe(BeltTunnelTileEntity te, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffer,
|
||||
int light, int overlay) {
|
||||
super.renderSafe(te, partialTicks, ms, buffer, light, overlay);
|
||||
|
||||
if (FastRenderDispatcher.available(te.getWorld())) return;
|
||||
|
||||
SuperByteBuffer flapBuffer = AllBlockPartials.BELT_TUNNEL_FLAP.renderOn(te.getBlockState());
|
||||
IVertexBuilder vb = buffer.getBuffer(RenderType.getSolid());
|
||||
Vec3d pivot = VecHelper.voxelSpace(0, 10, 1f);
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
package com.simibubi.create.content.logistics.block.belts.tunnel;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.*;
|
||||
|
||||
import com.simibubi.create.CreateClient;
|
||||
import com.simibubi.create.foundation.render.backend.instancing.IInstanceRendered;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.fml.DistExecutor;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
|
||||
import com.simibubi.create.AllBlocks;
|
||||
|
@ -33,9 +33,9 @@ import net.minecraftforge.common.util.LazyOptional;
|
|||
import net.minecraftforge.items.CapabilityItemHandler;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
|
||||
public class BeltTunnelTileEntity extends SmartTileEntity {
|
||||
public class BeltTunnelTileEntity extends SmartTileEntity implements IInstanceRendered {
|
||||
|
||||
public HashMap<Direction, InterpolatedChasingValue> flaps;
|
||||
public Map<Direction, InterpolatedChasingValue> flaps;
|
||||
public Set<Direction> sides;
|
||||
|
||||
protected LazyOptional<IItemHandler> cap = LazyOptional.empty();
|
||||
|
@ -43,7 +43,7 @@ public class BeltTunnelTileEntity extends SmartTileEntity {
|
|||
|
||||
public BeltTunnelTileEntity(TileEntityType<? extends BeltTunnelTileEntity> type) {
|
||||
super(type);
|
||||
flaps = new HashMap<>();
|
||||
flaps = new EnumMap<>(Direction.class);
|
||||
sides = new HashSet<>();
|
||||
flapsToSend = new LinkedList<>();
|
||||
}
|
||||
|
@ -174,7 +174,9 @@ public class BeltTunnelTileEntity extends SmartTileEntity {
|
|||
@Override
|
||||
public void initialize() {
|
||||
super.initialize();
|
||||
// updateTunnelConnections();
|
||||
updateTunnelConnections();
|
||||
if (world != null && world.isRemote)
|
||||
DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> CreateClient.kineticRenderer.add(this));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -212,4 +214,8 @@ public class BeltTunnelTileEntity extends SmartTileEntity {
|
|||
return this.cap.cast();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onChunkLightUpdate() {
|
||||
CreateClient.kineticRenderer.onLightUpdate(this);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,93 @@
|
|||
package com.simibubi.create.content.logistics.block.funnel;
|
||||
|
||||
import com.simibubi.create.AllBlockPartials;
|
||||
import com.simibubi.create.content.contraptions.base.KineticRenderMaterials;
|
||||
import com.simibubi.create.content.logistics.block.FlapData;
|
||||
import com.simibubi.create.foundation.render.backend.instancing.*;
|
||||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||
import net.minecraft.tileentity.TileEntityType;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.world.LightType;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.fml.DistExecutor;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class FunnelInstance extends TileEntityInstance<FunnelTileEntity> implements ITickableInstance {
|
||||
public static void register(TileEntityType<? extends FunnelTileEntity> type) {
|
||||
DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () ->
|
||||
InstancedTileRenderRegistry.instance.register(type, FunnelInstance::new));
|
||||
}
|
||||
|
||||
private ArrayList<InstanceKey<FlapData>> flaps;
|
||||
|
||||
public FunnelInstance(InstancedTileRenderer<?> modelManager, FunnelTileEntity tile) {
|
||||
super(modelManager, tile);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void init() {
|
||||
flaps = new ArrayList<>(4);
|
||||
|
||||
if (!tile.hasFlap()) return;
|
||||
|
||||
AllBlockPartials flapPartial = (lastState.getBlock() instanceof FunnelBlock ? AllBlockPartials.FUNNEL_FLAP
|
||||
: AllBlockPartials.BELT_FUNNEL_FLAP);
|
||||
InstancedModel<FlapData> model = modelManager.getMaterial(KineticRenderMaterials.FLAPS)
|
||||
.getModel(flapPartial, lastState);
|
||||
|
||||
int blockLight = world.getLightLevel(LightType.BLOCK, pos);
|
||||
int skyLight = world.getLightLevel(LightType.SKY, pos);
|
||||
|
||||
Direction direction = FunnelBlock.getFunnelFacing(lastState);
|
||||
|
||||
float flapness = tile.flap.get(AnimationTickHolder.getPartialTicks());
|
||||
float horizontalAngle = direction.getOpposite().getHorizontalAngle();
|
||||
|
||||
for (int segment = 0; segment <= 3; segment++) {
|
||||
float intensity = segment == 3 ? 1.5f : segment + 1;
|
||||
float segmentOffset = -3 / 16f * segment;
|
||||
|
||||
flaps.add(model.setupInstance(flapData -> flapData.setPosition(pos)
|
||||
.setSegmentOffset(segmentOffset, 0, -tile.getFlapOffset())
|
||||
.setBlockLight(blockLight)
|
||||
.setSkyLight(skyLight)
|
||||
.setHorizontalAngle(horizontalAngle)
|
||||
.setFlapness(flapness)
|
||||
.setFlapScale(-1)
|
||||
.setPivotVoxelSpace(0, 10, 9.5f)
|
||||
.setIntensity(intensity)));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
if (flaps == null) return;
|
||||
|
||||
float flapness = tile.flap.get(AnimationTickHolder.getPartialTicks());
|
||||
|
||||
for (InstanceKey<FlapData> key : flaps) {
|
||||
key.modifyInstance(data -> data.setFlapness(flapness));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateLight() {
|
||||
if (flaps == null) return;
|
||||
|
||||
int blockLight = world.getLightLevel(LightType.BLOCK, pos);
|
||||
int skyLight = world.getLightLevel(LightType.SKY, pos);
|
||||
|
||||
for (InstanceKey<FlapData> it : flaps) {
|
||||
it.modifyInstance(data -> data.setBlockLight(blockLight)
|
||||
.setSkyLight(skyLight));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void remove() {
|
||||
if (flaps == null) return;
|
||||
|
||||
flaps.forEach(InstanceKey::delete);
|
||||
}
|
||||
}
|
|
@ -4,6 +4,7 @@ import com.mojang.blaze3d.matrix.MatrixStack;
|
|||
import com.mojang.blaze3d.vertex.IVertexBuilder;
|
||||
import com.simibubi.create.AllBlockPartials;
|
||||
import com.simibubi.create.foundation.render.SuperByteBuffer;
|
||||
import com.simibubi.create.foundation.render.backend.FastRenderDispatcher;
|
||||
import com.simibubi.create.foundation.tileEntity.renderer.SmartTileEntityRenderer;
|
||||
import com.simibubi.create.foundation.utility.AngleHelper;
|
||||
import com.simibubi.create.foundation.utility.MatrixStacker;
|
||||
|
@ -27,7 +28,7 @@ public class FunnelRenderer extends SmartTileEntityRenderer<FunnelTileEntity> {
|
|||
int light, int overlay) {
|
||||
super.renderSafe(te, partialTicks, ms, buffer, light, overlay);
|
||||
|
||||
if (!te.hasFlap())
|
||||
if (!te.hasFlap() || FastRenderDispatcher.available(te.getWorld()))
|
||||
return;
|
||||
|
||||
BlockState blockState = te.getBlockState();
|
||||
|
|
|
@ -4,6 +4,7 @@ import java.lang.ref.WeakReference;
|
|||
import java.util.List;
|
||||
|
||||
import com.simibubi.create.AllBlocks;
|
||||
import com.simibubi.create.CreateClient;
|
||||
import com.simibubi.create.content.contraptions.components.saw.SawTileEntity;
|
||||
import com.simibubi.create.content.contraptions.goggles.IHaveHoveringInformation;
|
||||
import com.simibubi.create.content.contraptions.relays.belt.BeltHelper;
|
||||
|
@ -14,6 +15,7 @@ import com.simibubi.create.content.logistics.block.funnel.BeltFunnelBlock.Shape;
|
|||
import com.simibubi.create.foundation.config.AllConfigs;
|
||||
import com.simibubi.create.foundation.gui.widgets.InterpolatedChasingValue;
|
||||
import com.simibubi.create.foundation.item.TooltipHelper;
|
||||
import com.simibubi.create.foundation.render.backend.instancing.IInstanceRendered;
|
||||
import com.simibubi.create.foundation.tileEntity.SmartTileEntity;
|
||||
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
|
||||
import com.simibubi.create.foundation.tileEntity.behaviour.belt.DirectBeltInputBehaviour;
|
||||
|
@ -33,11 +35,13 @@ import net.minecraft.util.Direction;
|
|||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.common.util.LazyOptional;
|
||||
import net.minecraftforge.fml.DistExecutor;
|
||||
import net.minecraftforge.items.CapabilityItemHandler;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
|
||||
public class FunnelTileEntity extends SmartTileEntity implements IHaveHoveringInformation {
|
||||
public class FunnelTileEntity extends SmartTileEntity implements IHaveHoveringInformation, IInstanceRendered {
|
||||
|
||||
private FilteringBehaviour filtering;
|
||||
private InvManipulationBehaviour invManipulation;
|
||||
|
@ -381,4 +385,15 @@ public class FunnelTileEntity extends SmartTileEntity implements IHaveHoveringIn
|
|||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
super.initialize();
|
||||
if (world != null && world.isRemote)
|
||||
DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> CreateClient.kineticRenderer.add(this));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onChunkLightUpdate() {
|
||||
CreateClient.kineticRenderer.onLightUpdate(this);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ public class ArmRenderer extends KineticTileEntityRenderer {
|
|||
float headAngle = arm.headAngle.get(pt);
|
||||
|
||||
boolean rave = arm.phase == Phase.DANCING;
|
||||
float renderTick = AnimationTickHolder.getRenderTick() + (te.hashCode() % 64);
|
||||
float renderTick = AnimationTickHolder.getRenderTime() + (te.hashCode() % 64);
|
||||
if (rave) {
|
||||
baseAngle = (renderTick * 10) % 360;
|
||||
lowerArmAngle = MathHelper.lerp((MathHelper.sin(renderTick / 4) + 1) / 2, -45, 15);
|
||||
|
|
|
@ -19,9 +19,9 @@ public class AllTriggers {
|
|||
|
||||
private static final List<CriterionTriggerBase<?>> triggers = new LinkedList<>();
|
||||
|
||||
public static final RegistryTrigger<Fluid> INFINITE_FLUID = add(new RegistryTrigger<>("infinite_fluid", ForgeRegistries.FLUIDS));
|
||||
public static final RegistryTrigger<Block> BRACKET_APPLY_TRIGGER = add(new RegistryTrigger<>("bracket_apply", ForgeRegistries.BLOCKS));
|
||||
public static final EnumTrigger<InWorldProcessing.Type> FAN_PROCESSING = add(new EnumTrigger<>("fan_processing", InWorldProcessing.Type.class));
|
||||
public static final StringSerializableTrigger<Fluid> INFINITE_FLUID = add(new RegistryTrigger<>("infinite_fluid", ForgeRegistries.FLUIDS));
|
||||
public static final StringSerializableTrigger<Block> BRACKET_APPLY_TRIGGER = add(new RegistryTrigger<>("bracket_apply", ForgeRegistries.BLOCKS));
|
||||
public static final StringSerializableTrigger<InWorldProcessing.Type> FAN_PROCESSING = add(new EnumTrigger<>("fan_processing", InWorldProcessing.Type.class));
|
||||
|
||||
public static final SimpleTrigger
|
||||
ROTATION = simple("rotation"),
|
||||
|
|
|
@ -28,6 +28,7 @@ public class AllCommands {
|
|||
.then(FixLightingCommand.register())
|
||||
.then(HighlightCommand.register())
|
||||
.then(CouplingCommand.register())
|
||||
.then(CloneCommand.register())
|
||||
|
||||
//utility
|
||||
.then(util)
|
||||
|
@ -47,10 +48,10 @@ public class AllCommands {
|
|||
private static LiteralCommandNode<CommandSource> buildUtilityCommands() {
|
||||
|
||||
return Commands.literal("util")
|
||||
.then(FlySpeedCommand.register())
|
||||
.then(ReplaceInCommandBlocksCommand.register())
|
||||
.then(ClearBufferCacheCommand.register())
|
||||
.then(ChunkUtilCommand.register())
|
||||
.then(FlySpeedCommand.register())
|
||||
//.then(KillTPSCommand.register())
|
||||
.build();
|
||||
|
||||
|
|
|
@ -0,0 +1,170 @@
|
|||
package com.simibubi.create.foundation.command;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.mojang.brigadier.Command;
|
||||
import com.mojang.brigadier.builder.ArgumentBuilder;
|
||||
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
||||
import com.mojang.brigadier.exceptions.Dynamic2CommandExceptionType;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.glue.SuperGlueEntity;
|
||||
import com.simibubi.create.foundation.utility.Pair;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.command.CommandSource;
|
||||
import net.minecraft.command.Commands;
|
||||
import net.minecraft.command.arguments.BlockPosArgument;
|
||||
import net.minecraft.inventory.IClearable;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.CachedBlockInfo;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.MutableBoundingBox;
|
||||
import net.minecraft.util.text.StringTextComponent;
|
||||
import net.minecraft.util.text.TranslationTextComponent;
|
||||
import net.minecraft.world.gen.feature.template.Template;
|
||||
import net.minecraft.world.server.ServerWorld;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class CloneCommand {
|
||||
|
||||
private static final Dynamic2CommandExceptionType CLONE_TOO_BIG_EXCEPTION = new Dynamic2CommandExceptionType((arg1, arg2) -> new TranslationTextComponent("commands.clone.toobig", arg1, arg2));
|
||||
|
||||
public static ArgumentBuilder<CommandSource, ?> register() {
|
||||
return Commands.literal("clone")
|
||||
.requires(cs -> cs.hasPermissionLevel(2))
|
||||
.then(Commands.argument("begin", BlockPosArgument.blockPos())
|
||||
.then(Commands.argument("end", BlockPosArgument.blockPos())
|
||||
.then(Commands.argument("destination", BlockPosArgument.blockPos())
|
||||
.then(Commands.literal("skipBlocks")
|
||||
.executes(ctx -> doClone(ctx.getSource(), BlockPosArgument.getLoadedBlockPos(ctx, "begin"), BlockPosArgument.getLoadedBlockPos(ctx, "end"), BlockPosArgument.getLoadedBlockPos(ctx, "destination"), false))
|
||||
)
|
||||
.executes(ctx -> doClone(ctx.getSource(), BlockPosArgument.getLoadedBlockPos(ctx, "begin"), BlockPosArgument.getLoadedBlockPos(ctx, "end"), BlockPosArgument.getLoadedBlockPos(ctx, "destination"), true))
|
||||
)
|
||||
)
|
||||
)
|
||||
.executes(ctx -> {
|
||||
ctx.getSource().sendFeedback(new StringTextComponent("Clones all blocks as well as super glue from the specified area to the target destination"), true);
|
||||
|
||||
return Command.SINGLE_SUCCESS;
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
private static int doClone(CommandSource source, BlockPos begin, BlockPos end, BlockPos destination, boolean cloneBlocks) throws CommandSyntaxException {
|
||||
MutableBoundingBox sourceArea = new MutableBoundingBox(begin, end);
|
||||
BlockPos destinationEnd = destination.add(sourceArea.getLength());
|
||||
MutableBoundingBox destinationArea = new MutableBoundingBox(destination, destinationEnd);
|
||||
|
||||
int i = sourceArea.getXSize() * sourceArea.getYSize() * sourceArea.getZSize();
|
||||
if (i > 32768)
|
||||
throw CLONE_TOO_BIG_EXCEPTION.create(32768, i);
|
||||
|
||||
ServerWorld world = source.getWorld();
|
||||
|
||||
if (!world.isAreaLoaded(begin, end) || !world.isAreaLoaded(destination, destinationEnd))
|
||||
throw BlockPosArgument.POS_UNLOADED.create();
|
||||
|
||||
BlockPos diffToTarget = new BlockPos(destinationArea.minX - sourceArea.minX, destinationArea.minY - sourceArea.minY, destinationArea.minZ - sourceArea.minZ);
|
||||
|
||||
int blockPastes = cloneBlocks ? cloneBlocks(sourceArea, world, diffToTarget) : 0;
|
||||
int gluePastes = cloneGlue(sourceArea, world, diffToTarget);
|
||||
|
||||
if (cloneBlocks)
|
||||
source.sendFeedback(new StringTextComponent("Successfully cloned " + blockPastes + " Blocks"), true);
|
||||
|
||||
source.sendFeedback(new StringTextComponent("Successfully applied glue " + gluePastes + " times"), true);
|
||||
return blockPastes + gluePastes;
|
||||
|
||||
}
|
||||
|
||||
private static int cloneGlue(MutableBoundingBox sourceArea, ServerWorld world, BlockPos diffToTarget) {
|
||||
int gluePastes = 0;
|
||||
|
||||
List<SuperGlueEntity> glue = world.getEntitiesWithinAABB(SuperGlueEntity.class, AxisAlignedBB.func_216363_a(sourceArea));
|
||||
List<Pair<BlockPos, Direction>> newGlue = Lists.newArrayList();
|
||||
|
||||
for (SuperGlueEntity g : glue) {
|
||||
BlockPos pos = g.getHangingPosition();
|
||||
Direction direction = g.getFacingDirection();
|
||||
newGlue.add(Pair.of(pos.add(diffToTarget), direction));
|
||||
}
|
||||
|
||||
for (Pair<BlockPos, Direction> p : newGlue) {
|
||||
SuperGlueEntity g = new SuperGlueEntity(world, p.getFirst(), p.getSecond());
|
||||
if (g.onValidSurface()){
|
||||
world.addEntity(g);
|
||||
gluePastes++;
|
||||
}
|
||||
}
|
||||
return gluePastes;
|
||||
}
|
||||
|
||||
private static int cloneBlocks(MutableBoundingBox sourceArea, ServerWorld world, BlockPos diffToTarget) {
|
||||
int blockPastes = 0;
|
||||
|
||||
List<Template.BlockInfo> blocks = Lists.newArrayList();
|
||||
List<Template.BlockInfo> tileBlocks = Lists.newArrayList();
|
||||
|
||||
for (int z = sourceArea.minZ; z <= sourceArea.maxZ; ++z) {
|
||||
for (int y = sourceArea.minY; y <= sourceArea.maxY; ++y) {
|
||||
for (int x = sourceArea.minX; x <= sourceArea.maxX; ++x) {
|
||||
BlockPos currentPos = new BlockPos(x, y, z);
|
||||
BlockPos newPos = currentPos.add(diffToTarget);
|
||||
CachedBlockInfo cached = new CachedBlockInfo(world, currentPos, false);
|
||||
BlockState state = cached.getBlockState();
|
||||
TileEntity te = world.getTileEntity(currentPos);
|
||||
if (te != null) {
|
||||
CompoundNBT nbt = te.write(new CompoundNBT());
|
||||
tileBlocks.add(new Template.BlockInfo(newPos, state, nbt));
|
||||
} else {
|
||||
blocks.add(new Template.BlockInfo(newPos, state, null));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
List<Template.BlockInfo> allBlocks = Lists.newArrayList();
|
||||
allBlocks.addAll(blocks);
|
||||
allBlocks.addAll(tileBlocks);
|
||||
|
||||
List<Template.BlockInfo> reverse = Lists.reverse(allBlocks);
|
||||
|
||||
for (Template.BlockInfo info : reverse) {
|
||||
TileEntity te = world.getTileEntity(info.pos);
|
||||
IClearable.clearObj(te);
|
||||
world.setBlockState(info.pos, Blocks.BARRIER.getDefaultState(), 2);
|
||||
}
|
||||
|
||||
for (Template.BlockInfo info : allBlocks) {
|
||||
if (world.setBlockState(info.pos, info.state, 2))
|
||||
blockPastes++;
|
||||
}
|
||||
|
||||
for (Template.BlockInfo info : tileBlocks) {
|
||||
TileEntity te = world.getTileEntity(info.pos);
|
||||
if (te != null && info.nbt != null) {
|
||||
info.nbt.putInt("x", info.pos.getX());
|
||||
info.nbt.putInt("y", info.pos.getY());
|
||||
info.nbt.putInt("z", info.pos.getZ());
|
||||
te.read(info.nbt);
|
||||
te.markDirty();
|
||||
}
|
||||
|
||||
//idk why the state is set twice for a te, but its done like this in the original clone command
|
||||
world.setBlockState(info.pos, info.state, 2);
|
||||
}
|
||||
|
||||
for (Template.BlockInfo info : reverse) {
|
||||
world.notifyNeighbors(info.pos, info.state.getBlock());
|
||||
}
|
||||
|
||||
|
||||
world.getPendingBlockTicks().copyTicks(sourceArea, diffToTarget);
|
||||
|
||||
return blockPastes;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,7 +1,9 @@
|
|||
package com.simibubi.create.foundation.command;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.mojang.brigadier.Command;
|
||||
import com.mojang.brigadier.builder.ArgumentBuilder;
|
||||
import com.mojang.brigadier.exceptions.DynamicCommandExceptionType;
|
||||
import com.mojang.brigadier.exceptions.SimpleCommandExceptionType;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.train.CouplingHandler;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.train.capability.CapabilityMinecartController;
|
||||
|
@ -16,12 +18,15 @@ import net.minecraft.entity.player.PlayerEntity;
|
|||
import net.minecraft.util.text.StringTextComponent;
|
||||
import net.minecraftforge.common.util.LazyOptional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.UUID;
|
||||
|
||||
public class CouplingCommand {
|
||||
|
||||
public static final SimpleCommandExceptionType ONLY_MINECARTS_ALLOWED = new SimpleCommandExceptionType(new StringTextComponent("Only Minecarts can be coupled"));
|
||||
public static final SimpleCommandExceptionType SAME_DIMENSION = new SimpleCommandExceptionType(new StringTextComponent("Minecarts have to be in the same Dimension"));
|
||||
public static final DynamicCommandExceptionType TWO_CARTS = new DynamicCommandExceptionType(a -> new StringTextComponent("Your selector targeted " + a + " entities. You can only couple 2 Minecarts at a time."));
|
||||
|
||||
public static ArgumentBuilder<CommandSource, ?> register() {
|
||||
|
||||
|
@ -50,6 +55,31 @@ public class CouplingCommand {
|
|||
})
|
||||
)
|
||||
)
|
||||
.then(Commands.argument("carts", EntityArgument.entities())
|
||||
.executes(ctx -> {
|
||||
Collection<? extends Entity> entities = EntityArgument.getEntities(ctx, "carts");
|
||||
if (entities.size() != 2)
|
||||
throw TWO_CARTS.create(entities.size());
|
||||
|
||||
ArrayList<? extends Entity> eList = Lists.newArrayList(entities);
|
||||
Entity cart1 = eList.get(0);
|
||||
if (!(cart1 instanceof AbstractMinecartEntity))
|
||||
throw ONLY_MINECARTS_ALLOWED.create();
|
||||
|
||||
Entity cart2 = eList.get(1);
|
||||
if (!(cart2 instanceof AbstractMinecartEntity))
|
||||
throw ONLY_MINECARTS_ALLOWED.create();
|
||||
|
||||
if (!cart1.getEntityWorld().equals(cart2.getEntityWorld()))
|
||||
throw SAME_DIMENSION.create();
|
||||
|
||||
Entity source = ctx.getSource().getEntity();
|
||||
|
||||
CouplingHandler.tryToCoupleCarts(source instanceof PlayerEntity ? (PlayerEntity) source : null, cart1.getEntityWorld(), cart1.getEntityId(), cart2.getEntityId());
|
||||
|
||||
return Command.SINGLE_SUCCESS;
|
||||
})
|
||||
)
|
||||
)
|
||||
.then(Commands.literal("remove")
|
||||
.then(Commands.argument("cart1", EntityArgument.entity())
|
||||
|
|
|
@ -26,6 +26,18 @@ public class FillingRecipeGen extends ProcessingRecipeGen {
|
|||
BLAZE_CAKE = create("blaze_cake", b -> b.require(Fluids.LAVA, 250)
|
||||
.require(AllItems.BLAZE_CAKE_BASE.get())
|
||||
.output(AllItems.BLAZE_CAKE.get())),
|
||||
|
||||
HONEYED_APPLE = create("honeyed_apple", b -> b.require(AllTags.forgeFluidTag("honey"), 250)
|
||||
.require(Items.APPLE)
|
||||
.output(AllItems.HONEYED_APPLE.get())),
|
||||
|
||||
SWEET_ROLL = create("sweet_roll", b -> b.require(AllTags.forgeFluidTag("milk"), 250)
|
||||
.require(Items.BREAD)
|
||||
.output(AllItems.SWEET_ROLL.get())),
|
||||
|
||||
CHOCOLATE_BERRIES = create("chocolate_glazed_berries", b -> b.require(AllFluids.CHOCOLATE.get(), 250)
|
||||
.require(Items.SWEET_BERRIES)
|
||||
.output(AllItems.CHOCOLATE_BERRIES.get())),
|
||||
|
||||
GRASS_BLOCK = create("grass_block", b -> b.require(Fluids.WATER, 500)
|
||||
.require(Items.DIRT)
|
||||
|
|
|
@ -317,7 +317,7 @@ public class StandardRecipeGen extends CreateRecipeProvider {
|
|||
.patternLine("P")
|
||||
.patternLine("A")
|
||||
.patternLine("P")),
|
||||
|
||||
|
||||
GANTRY_PINION = create(AllBlocks.GANTRY_PINION).unlockedBy(I::andesiteCasing)
|
||||
.viaShaped(b -> b.key('B', ItemTags.PLANKS)
|
||||
.key('S', I.cog())
|
||||
|
@ -669,6 +669,15 @@ public class StandardRecipeGen extends CreateRecipeProvider {
|
|||
LINEAR_CHASSIS_CYCLE =
|
||||
conversionCycle(ImmutableList.of(AllBlocks.LINEAR_CHASSIS, AllBlocks.SECONDARY_LINEAR_CHASSIS)),
|
||||
|
||||
STICKER = create(AllBlocks.STICKER).returns(1)
|
||||
.unlockedBy(I::andesite)
|
||||
.viaShaped(b -> b.key('I', I.andesite())
|
||||
.key('C', Tags.Items.COBBLESTONE)
|
||||
.key('R', I.redstone())
|
||||
.key('S', Tags.Items.SLIMEBALLS)
|
||||
.patternLine("ISI")
|
||||
.patternLine("CRC")),
|
||||
|
||||
MINECART = create(() -> Items.MINECART).withSuffix("_from_contraption_cart")
|
||||
.unlockedBy(AllBlocks.CART_ASSEMBLER::get)
|
||||
.viaShapeless(b -> b.addIngredient(AllItems.MINECART_CONTRAPTION.get())),
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
package com.simibubi.create.foundation.mixin;
|
||||
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionRenderDispatcher;
|
||||
import com.simibubi.create.foundation.render.backend.RenderWork;
|
||||
import com.simibubi.create.foundation.render.backend.light.ILightListener;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.network.play.ClientPlayNetHandler;
|
||||
import net.minecraft.client.world.ClientWorld;
|
||||
import net.minecraft.network.play.server.SUpdateLightPacket;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
@Mixin(ClientPlayNetHandler.class)
|
||||
public class NetworkLightUpdateMixin {
|
||||
|
||||
@Inject(at = @At("TAIL"), method = "handleUpdateLight")
|
||||
private void onLightPacket(SUpdateLightPacket packet, CallbackInfo ci) {
|
||||
RenderWork.enqueue(() -> {
|
||||
ClientWorld world = Minecraft.getInstance().world;
|
||||
|
||||
if (world == null) return;
|
||||
|
||||
int chunkX = packet.getChunkX();
|
||||
int chunkZ = packet.getChunkZ();
|
||||
|
||||
Chunk chunk = world.getChunkProvider().getChunk(chunkX, chunkZ, false);
|
||||
|
||||
if (chunk != null) {
|
||||
chunk.getTileEntityMap()
|
||||
.values()
|
||||
.stream()
|
||||
.filter(tile -> tile instanceof ILightListener)
|
||||
.map(tile -> (ILightListener) tile)
|
||||
.forEach(ILightListener::onChunkLightUpdate);
|
||||
}
|
||||
|
||||
ContraptionRenderDispatcher.notifyLightPacket(world, chunkX, chunkZ);
|
||||
});
|
||||
}
|
||||
}
|
|
@ -1,5 +1,7 @@
|
|||
package com.simibubi.create.foundation.mixin;
|
||||
|
||||
import net.minecraft.client.renderer.*;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import org.lwjgl.opengl.GL20;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
|
@ -14,9 +16,6 @@ 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;
|
||||
|
@ -32,7 +31,7 @@ public class RenderHooksMixin {
|
|||
* layer-correct custom rendering. RenderWorldLast is not refined enough for rendering world objects.
|
||||
* This should probably be a forge event.
|
||||
*/
|
||||
@Inject(at = @At(value = "TAIL"), method = "renderLayer")
|
||||
@Inject(at = @At("TAIL"), method = "renderLayer")
|
||||
private void renderLayer(RenderType type, MatrixStack stack, double camX, double camY, double camZ, CallbackInfo ci) {
|
||||
if (!Backend.available()) return;
|
||||
|
||||
|
@ -46,7 +45,18 @@ public class RenderHooksMixin {
|
|||
GL20.glUseProgram(0);
|
||||
}
|
||||
|
||||
@Inject(at = @At(value = "TAIL"), method = "loadRenderers")
|
||||
@Inject(at = @At(value = "INVOKE", target = "updateChunks(J)V"), method = "render")
|
||||
private void setupFrame(MatrixStack p_228426_1_, float p_228426_2_, long p_228426_3_, boolean p_228426_5_, ActiveRenderInfo info, GameRenderer p_228426_7_, LightTexture p_228426_8_, Matrix4f p_228426_9_, CallbackInfo ci) {
|
||||
Vec3d cameraPos = info.getProjectedView();
|
||||
double camX = cameraPos.getX();
|
||||
double camY = cameraPos.getY();
|
||||
double camZ = cameraPos.getZ();
|
||||
|
||||
CreateClient.kineticRenderer.beginFrame(camX, camY, camZ);
|
||||
ContraptionRenderDispatcher.beginFrame(camX, camY, camZ);
|
||||
}
|
||||
|
||||
@Inject(at = @At("TAIL"), method = "loadRenderers")
|
||||
private void refresh(CallbackInfo ci) {
|
||||
CreateClient.kineticRenderer.invalidate();
|
||||
ContraptionRenderDispatcher.invalidateAll();
|
||||
|
|
|
@ -9,6 +9,7 @@ import com.simibubi.create.content.contraptions.components.actors.ActorVertexAtt
|
|||
import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionProgram;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionVertexAttributes;
|
||||
import com.simibubi.create.content.contraptions.relays.belt.BeltVertexAttributes;
|
||||
import com.simibubi.create.content.logistics.block.FlapVertexAttributes;
|
||||
import com.simibubi.create.foundation.render.backend.gl.BasicProgram;
|
||||
import com.simibubi.create.foundation.render.backend.gl.attrib.ModelVertexAttributes;
|
||||
import com.simibubi.create.foundation.render.backend.gl.shader.ProgramSpec;
|
||||
|
@ -33,6 +34,13 @@ public class AllProgramSpecs {
|
|||
.setFrag(Locations.INSTANCED)
|
||||
.createProgramSpec());
|
||||
|
||||
public static final ProgramSpec<BasicProgram> FLAPS = register(ProgramSpec.builder("flap", BasicProgram::new)
|
||||
.addAttributes(ModelVertexAttributes.class)
|
||||
.addAttributes(FlapVertexAttributes.class)
|
||||
.setVert(Locations.FLAP)
|
||||
.setFrag(Locations.INSTANCED)
|
||||
.createProgramSpec());
|
||||
|
||||
public static final ProgramSpec<ContraptionProgram> CONTRAPTION_STRUCTURE = register(ProgramSpec.builder("contraption_structure", ContraptionProgram::new)
|
||||
.addAttributes(ContraptionVertexAttributes.class)
|
||||
.setVert(Locations.CONTRAPTION_STRUCTURE)
|
||||
|
@ -57,6 +65,14 @@ public class AllProgramSpecs {
|
|||
.setDefines(ShaderConstants.define("CONTRAPTION"))
|
||||
.createProgramSpec());
|
||||
|
||||
public static final ProgramSpec<ContraptionProgram> CONTRAPTION_FLAPS = register(ProgramSpec.builder("contraption_flap", ContraptionProgram::new)
|
||||
.addAttributes(ModelVertexAttributes.class)
|
||||
.addAttributes(FlapVertexAttributes.class)
|
||||
.setVert(Locations.FLAP)
|
||||
.setFrag(Locations.CONTRAPTION)
|
||||
.setDefines(ShaderConstants.define("CONTRAPTION"))
|
||||
.createProgramSpec());
|
||||
|
||||
public static final ProgramSpec<ContraptionProgram> CONTRAPTION_ACTOR = register(ProgramSpec.builder("contraption_actor", ContraptionProgram::new)
|
||||
.addAttributes(ModelVertexAttributes.class)
|
||||
.addAttributes(ActorVertexAttributes.class)
|
||||
|
@ -64,12 +80,14 @@ public class AllProgramSpecs {
|
|||
.setFrag(Locations.CONTRAPTION)
|
||||
.createProgramSpec());
|
||||
|
||||
|
||||
public static class Locations {
|
||||
public static final ResourceLocation INSTANCED = loc("instanced.frag");
|
||||
public static final ResourceLocation CONTRAPTION = loc("contraption.frag");
|
||||
|
||||
public static final ResourceLocation ROTATING = loc("rotating.vert");
|
||||
public static final ResourceLocation BELT = loc("belt.vert");
|
||||
public static final ResourceLocation FLAP = loc("flap.vert");
|
||||
public static final ResourceLocation CONTRAPTION_STRUCTURE = loc("contraption_structure.vert");
|
||||
public static final ResourceLocation CONTRAPTION_ACTOR = loc("contraption_actor.vert");
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ import java.util.ArrayList;
|
|||
import com.simibubi.create.content.contraptions.base.KineticRenderMaterials;
|
||||
import com.simibubi.create.content.contraptions.base.RotatingInstancedModel;
|
||||
import com.simibubi.create.content.contraptions.relays.belt.BeltInstancedModel;
|
||||
import com.simibubi.create.content.logistics.block.FlapInstancedModel;
|
||||
import com.simibubi.create.foundation.render.backend.gl.BasicProgram;
|
||||
import com.simibubi.create.foundation.render.backend.gl.shader.ShaderCallback;
|
||||
import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer;
|
||||
|
@ -26,6 +27,7 @@ public class KineticRenderer extends InstancedTileRenderer<BasicProgram> {
|
|||
public void registerMaterials() {
|
||||
materials.put(KineticRenderMaterials.BELTS, new RenderMaterial<>(this, AllProgramSpecs.BELT, BeltInstancedModel::new));
|
||||
materials.put(KineticRenderMaterials.ROTATING, new RenderMaterial<>(this, AllProgramSpecs.ROTATING, RotatingInstancedModel::new));
|
||||
materials.put(KineticRenderMaterials.FLAPS, new RenderMaterial<>(this, AllProgramSpecs.FLAPS, FlapInstancedModel::new));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -7,6 +7,7 @@ import com.simibubi.create.Create;
|
|||
import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionRenderDispatcher;
|
||||
import com.simibubi.create.foundation.config.AllConfigs;
|
||||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||
import com.simibubi.create.foundation.utility.Debug;
|
||||
import com.simibubi.create.foundation.utility.MatrixStacker;
|
||||
import com.simibubi.create.foundation.utility.worldWrappers.PlacementSimulationWorld;
|
||||
|
||||
|
|
|
@ -3,14 +3,12 @@ package com.simibubi.create.foundation.render.backend;
|
|||
import java.io.BufferedInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.FloatBuffer;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
import com.simibubi.create.foundation.render.backend.gl.versioned.GlFeatureCompat;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.lwjgl.opengl.GL;
|
||||
|
@ -22,8 +20,6 @@ import com.simibubi.create.foundation.render.backend.gl.shader.GlProgram;
|
|||
import com.simibubi.create.foundation.render.backend.gl.shader.GlShader;
|
||||
import com.simibubi.create.foundation.render.backend.gl.shader.ProgramSpec;
|
||||
import com.simibubi.create.foundation.render.backend.gl.shader.ShaderType;
|
||||
import com.simibubi.create.foundation.render.backend.gl.versioned.GlVersioned;
|
||||
import com.simibubi.create.foundation.render.backend.gl.versioned.MapBuffer;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.texture.TextureUtil;
|
||||
|
@ -44,16 +40,12 @@ public class Backend {
|
|||
private static boolean enabled;
|
||||
|
||||
public static GLCapabilities capabilities;
|
||||
private static MapBuffer mapBuffer;
|
||||
public static GlFeatureCompat compat;
|
||||
|
||||
public Backend() {
|
||||
throw new IllegalStateException();
|
||||
}
|
||||
|
||||
public static void mapBuffer(int target, int offset, int length, Consumer<ByteBuffer> upload) {
|
||||
mapBuffer.mapBuffer(target, offset, length, upload);
|
||||
}
|
||||
|
||||
/**
|
||||
* Register a shader program. TODO: replace with forge registry?
|
||||
*/
|
||||
|
@ -71,47 +63,21 @@ public class Backend {
|
|||
return (P) programs.get(spec);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the most compatible version of a specific OpenGL feature by iterating over enum constants in order.
|
||||
*
|
||||
* @param clazz The class of the versioning enum.
|
||||
* @param <V> The type of the versioning enum.
|
||||
* @return The first defined enum variant to return true.
|
||||
*/
|
||||
public static <V extends Enum<V> & GlVersioned> V getLatest(Class<V> clazz) {
|
||||
return getLatest(clazz, capabilities);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the most compatible version of a specific OpenGL feature by iterating over enum constants in order.
|
||||
*
|
||||
* @param clazz The class of the versioning enum.
|
||||
* @param caps The current system's supported features.
|
||||
* @param <V> The type of the versioning enum.
|
||||
* @return The first defined enum variant to return true.
|
||||
*/
|
||||
public static <V extends Enum<V> & GlVersioned> V getLatest(Class<V> clazz, GLCapabilities caps) {
|
||||
V[] constants = clazz.getEnumConstants();
|
||||
V last = constants[constants.length - 1];
|
||||
if (!last.supported(caps)) {
|
||||
throw new IllegalStateException("");
|
||||
}
|
||||
|
||||
return Arrays.stream(constants).filter(it -> it.supported(caps)).findFirst().orElse(last);
|
||||
public static boolean available() {
|
||||
return canUseVBOs();
|
||||
}
|
||||
|
||||
public static boolean canUseInstancing() {
|
||||
return enabled && gl33();
|
||||
return enabled &&
|
||||
compat.vertexArrayObjectsSupported() &&
|
||||
compat.drawInstancedSupported() &&
|
||||
compat.instancedArraysSupported();
|
||||
}
|
||||
|
||||
public static boolean canUseVBOs() {
|
||||
return enabled && gl20();
|
||||
}
|
||||
|
||||
public static boolean available() {
|
||||
return enabled && gl20();
|
||||
}
|
||||
|
||||
public static boolean gl33() {
|
||||
return capabilities.OpenGL33;
|
||||
}
|
||||
|
@ -136,7 +102,7 @@ public class Backend {
|
|||
private static void onResourceManagerReload(IResourceManager manager, Predicate<IResourceType> predicate) {
|
||||
if (predicate.test(VanillaResourceType.SHADERS)) {
|
||||
capabilities = GL.createCapabilities();
|
||||
mapBuffer = getLatest(MapBuffer.class);
|
||||
compat = new GlFeatureCompat(capabilities);
|
||||
|
||||
OptifineHandler.refresh();
|
||||
refresh();
|
||||
|
|
|
@ -14,11 +14,10 @@ import net.minecraft.client.renderer.BufferBuilder;
|
|||
|
||||
public abstract class BufferedModel extends TemplateBuffer {
|
||||
|
||||
protected GlBuffer ebo;
|
||||
protected GlBuffer modelVBO;
|
||||
protected boolean removed;
|
||||
|
||||
public BufferedModel(BufferBuilder buf) {
|
||||
protected BufferedModel(BufferBuilder buf) {
|
||||
super(buf);
|
||||
if (vertexCount > 0) init();
|
||||
}
|
||||
|
@ -28,8 +27,6 @@ public abstract class BufferedModel extends TemplateBuffer {
|
|||
modelVBO = new GlBuffer(GL20.GL_ARRAY_BUFFER);
|
||||
|
||||
modelVBO.with(vbo -> initModel());
|
||||
|
||||
ebo = createEBO();
|
||||
}
|
||||
|
||||
protected void initModel() {
|
||||
|
@ -47,25 +44,6 @@ public abstract class BufferedModel extends TemplateBuffer {
|
|||
});
|
||||
}
|
||||
|
||||
protected final GlBuffer createEBO() {
|
||||
GlBuffer ebo = new GlBuffer(GL15.GL_ELEMENT_ARRAY_BUFFER);
|
||||
|
||||
int indicesSize = vertexCount * GlPrimitiveType.USHORT.getSize();
|
||||
|
||||
ebo.bind();
|
||||
|
||||
GL15.glBufferData(GL15.GL_ELEMENT_ARRAY_BUFFER, indicesSize, GL15.GL_STATIC_DRAW);
|
||||
ebo.map(indicesSize, indices -> {
|
||||
for (int i = 0; i < vertexCount; i++) {
|
||||
indices.putShort((short) i);
|
||||
}
|
||||
});
|
||||
|
||||
ebo.unbind();
|
||||
|
||||
return ebo;
|
||||
}
|
||||
|
||||
protected abstract void copyVertex(ByteBuffer to, int index);
|
||||
|
||||
protected abstract VertexFormat getModelFormat();
|
||||
|
@ -75,7 +53,7 @@ public abstract class BufferedModel extends TemplateBuffer {
|
|||
}
|
||||
|
||||
/**
|
||||
* Renders this model, checking first if it should actually be rendered.
|
||||
* Renders this model, checking first if there is anything to render.
|
||||
*/
|
||||
public final void render() {
|
||||
if (vertexCount == 0 || removed) return;
|
||||
|
@ -84,23 +62,9 @@ public abstract class BufferedModel extends TemplateBuffer {
|
|||
}
|
||||
|
||||
/**
|
||||
* Override this.
|
||||
* Set up any state and make the draw calls.
|
||||
*/
|
||||
protected void doRender() {
|
||||
modelVBO.bind();
|
||||
ebo.bind();
|
||||
|
||||
setupAttributes();
|
||||
GL20.glDrawElements(GL20.GL_QUADS, vertexCount, GlPrimitiveType.USHORT.getGlConstant(), 0);
|
||||
|
||||
int numAttributes = getTotalShaderAttributeCount();
|
||||
for (int i = 0; i <= numAttributes; i++) {
|
||||
GL20.glDisableVertexAttribArray(i);
|
||||
}
|
||||
|
||||
ebo.unbind();
|
||||
modelVBO.unbind();
|
||||
}
|
||||
protected abstract void doRender();
|
||||
|
||||
protected void setupAttributes() {
|
||||
int numAttributes = getTotalShaderAttributeCount();
|
||||
|
@ -111,7 +75,7 @@ public abstract class BufferedModel extends TemplateBuffer {
|
|||
getModelFormat().vertexAttribPointers(0);
|
||||
}
|
||||
|
||||
public void delete() {
|
||||
public final void delete() {
|
||||
removed = true;
|
||||
if (vertexCount > 0) {
|
||||
RenderWork.enqueue(this::deleteInternal);
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue