Merge branch 'mc1.18/0.5.1' into mc1.18/0.5.1-trackworks

This commit is contained in:
simibubi 2023-02-25 14:28:12 +01:00
commit d5db85df79
401 changed files with 2184 additions and 72615 deletions

View File

@ -49,6 +49,7 @@ body:
label: Mod Version
description: The version of the mod you were using when the bug occured
options:
- "0.5.0i"
- "0.5.0h"
- "0.5.0g"
- "0.5.0f"

View File

@ -5,7 +5,7 @@
<a href="https://github.com/Creators-of-Create/Create/blob/master/LICENSE"><img src="https://img.shields.io/github/license/Creators-of-Create/Create?style=flat&color=900c3f" alt="License"></a>
<a href="https://discord.gg/hmaD7Se"><img src="https://img.shields.io/discord/620934202875183104?color=5865f2&label=Discord&style=flat" alt="Discord"></a>
<a href="https://www.curseforge.com/minecraft/mc-mods/create"><img src="http://cf.way2muchnoise.eu/328085.svg" alt="CF"></a>
<a href="https://modrinth.com/mod/create"><img src="https://img.shields.io/badge/dynamic/json?logo=data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+Cjxzdmcgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDUxMiA1MTQiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgeG1sbnM6c2VyaWY9Imh0dHA6Ly93d3cuc2VyaWYuY29tLyIgc3R5bGU9ImZpbGwtcnVsZTpldmVub2RkO2NsaXAtcnVsZTpldmVub2RkO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoyOyI+CiAgICA8Zz4KICAgICAgICA8ZyBpZD0ibW9kcmludGgiPgogICAgICAgICAgICA8cGF0aCBkPSJNNTAzLjE2LDMyMy41NkM1MTQuNTUsMjgxLjQ3IDUxNS4zMiwyMzUuOTEgNTAzLjIsMTkwLjc2QzQ2Ni41Nyw1NC4yMyAzMjYuMDQsLTI2LjggMTg5LjMzLDkuNzhDODMuODEsMzguMDIgMTEuMzksMTI4LjA3IDAuNjksMjMwLjQ3TDQzLjk5LDIzMC40N0M1NC4yOSwxNDcuMzMgMTEzLjc0LDc0LjczIDE5OS43NSw1MS43MUMzMDYuMDUsMjMuMjYgNDE1LjEzLDgwLjY3IDQ1My4xNywxODEuMzhMNDExLjAzLDE5Mi42NUMzOTEuNjQsMTQ1LjggMzUyLjU3LDExMS40NSAzMDYuMyw5Ni44MkwyOTguNTYsMTQwLjY2QzMzNS4wOSwxNTQuMTMgMzY0LjcyLDE4NC41IDM3NS41NiwyMjQuOTFDMzkxLjM2LDI4My44IDM2MS45NCwzNDQuMTQgMzA4LjU2LDM2OS4xN0wzMjAuMDksNDEyLjE2QzM5MC4yNSwzODMuMjEgNDMyLjQsMzEwLjMgNDIyLjQzLDIzNS4xNEw0NjQuNDEsMjIzLjkxQzQ2OC45MSwyNTIuNjIgNDY3LjM1LDI4MS4xNiA0NjAuNTUsMzA4LjA3TDUwMy4xNiwzMjMuNTZaIiBzdHlsZT0iZmlsbDpyZ2IoMjMsMjMsMjUpOyIvPgogICAgICAgICAgICA8cGF0aCBkPSJNMzIxLjk5LDUwNC4yMkMxODUuMjcsNTQwLjggNDQuNzUsNDU5Ljc3IDguMTEsMzIzLjI0QzMuODQsMzA3LjMxIDEuMTcsMjkxLjMzIDAsMjc1LjQ2TDQzLjI3LDI3NS40NkM0NC4zNiwyODcuMzcgNDYuNDcsMjk5LjM1IDQ5LjY4LDMxMS4yOUM1My4wNCwzMjMuOCA1Ny40NSwzMzUuNzUgNjIuNzksMzQ3LjA3TDEwMS4zOCwzMjMuOTJDOTguMTMsMzE2LjQyIDk1LjM5LDMwOC42IDkzLjIxLDMwMC40N0M2OS4xNywyMTAuODcgMTIyLjQxLDExOC43NyAyMTIuMTMsOTQuNzZDMjI5LjEzLDkwLjIxIDI0Ni4yMyw4OC40NCAyNjIuOTMsODkuMTVMMjU1LjE5LDEzM0MyNDQuNzMsMTMzLjA1IDIzNC4xMSwxMzQuNDIgMjIzLjUzLDEzNy4yNUMxNTcuMzEsMTU0Ljk4IDExOC4wMSwyMjIuOTUgMTM1Ljc1LDI4OS4wOUMxMzYuODUsMjkzLjE2IDEzOC4xMywyOTcuMTMgMTM5LjU5LDMwMC45OUwxODguOTQsMjcxLjM4TDE3NC4wNywyMzEuOTVMMjIwLjY3LDE4NC4wOEwyNzkuNTcsMTcxLjM5TDI5Ni42MiwxOTIuMzhMMjY5LjQ3LDIxOS44OEwyNDUuNzksMjI3LjMzTDIyOC44NywyNDQuNzJMMjM3LjE2LDI2Ny43OUMyMzcuMTYsMjY3Ljc5IDI1My45NSwyODUuNjMgMjUzLjk4LDI4NS42NEwyNzcuNywyNzkuMzNMMjk0LjU4LDI2MC43OUwzMzEuNDQsMjQ5LjEyTDM0Mi40MiwyNzMuODJMMzA0LjM5LDMyMC40NUwyNDAuNjYsMzQwLjYzTDIxMi4wOCwzMDguODFMMTYyLjI2LDMzOC43QzE4Ny44LDM2Ny43OCAyMjYuMiwzODMuOTMgMjY2LjAxLDM4MC41NkwyNzcuNTQsNDIzLjU1QzIxOC4xMyw0MzEuNDEgMTYwLjEsNDA2LjgyIDEyNC4wNSwzNjEuNjRMODUuNjQsMzg0LjY4QzEzNi4yNSw0NTEuMTcgMjIzLjg0LDQ4NC4xMSAzMDkuNjEsNDYxLjE2QzM3MS4zNSw0NDQuNjQgNDE5LjQsNDAyLjU2IDQ0NS40MiwzNDkuMzhMNDg4LjA2LDM2NC44OEM0NTcuMTcsNDMxLjE2IDM5OC4yMiw0ODMuODIgMzIxLjk5LDUwNC4yMloiIHN0eWxlPSJmaWxsOnJnYigyMywyMywyNSk7ZmlsbC1ydWxlOm5vbnplcm87Ii8+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4K&label=&suffix=%20&query=downloads&url=https://api.modrinth.com/api/v1/mod/LNytGWDc&style=flat&color=242629&labelColor=5ca424" alt="Modrinth"></a>
<a href="https://modrinth.com/mod/create"><img src="https://img.shields.io/modrinth/dt/create?logo=modrinth&label=&suffix=%20&style=flat&color=242629&labelColor=5ca424&logoColor=1c1c1c" alt="Modrinth"></a>
<br><br>
</h1>

View File

@ -8,7 +8,7 @@ mod_version = 0.5.1
artifact_minecraft_version = 1.18.2
minecraft_version = 1.18.2
forge_version = 40.1.60
forge_version = 40.2.1
# build dependency versions
forgegradle_version = 5.1.53

View File

@ -294,14 +294,13 @@ bff90a8d674a839b13fd9cd1f78bf3d0ad9fad4f assets/create/blockstates/limestone_pil
ddcf4bb281e046fbb1026b8f46a2cf12448598df assets/create/blockstates/mechanical_bearing.json
5586beef2d9183dc34d8e8d2723620c0569592ae assets/create/blockstates/mechanical_crafter.json
0cfa8a4a37f4142fa07e04666e0aef080c517053 assets/create/blockstates/mechanical_drill.json
f199f57510befeb2a583126bc16392e49a70dc7f assets/create/blockstates/mechanical_harvester.json
0fb175e5260ec60e130e589d682a4d3301d7364e assets/create/blockstates/mechanical_harvester.json
d9afcfa27c42df5fd54a7b783acb0eb45ddf5aa5 assets/create/blockstates/mechanical_mixer.json
da612a05f94dc19e07e250efc35a7b2839d2ee76 assets/create/blockstates/mechanical_piston.json
94ec340a50b2406f833735f7501a1840c692e32a assets/create/blockstates/mechanical_piston_head.json
cd13e5327f1adaf9ab2bfc511ead05b2799fdfb3 assets/create/blockstates/mechanical_plough.json
debef0f5dde74103aaf4422de4bc90e4099b0c47 assets/create/blockstates/mechanical_plough.json
92269fe66d7b83095a2e04e121af0be792f55dd6 assets/create/blockstates/mechanical_press.json
b7c4a0ff0c6f16e14d71fc0fb7fc66d032b65cf3 assets/create/blockstates/mechanical_pump.json
29ec1a3ec9b158b954f9ca126eaac89cee96cf84 assets/create/blockstates/mechanical_roller.json
264d72320ee0f1e014319f7d99dcc1fa953a4ad4 assets/create/blockstates/mechanical_saw.json
94bbcb7e622471dbf418d78f9200ad321c7168de assets/create/blockstates/metal_bracket.json
c253a827d9f0b0e29f67dfd19d65b259d3d4f045 assets/create/blockstates/metal_girder.json
@ -566,31 +565,8 @@ bf2b0310500213ff853c748c236eb5d01f61658e assets/create/blockstates/yellow_toolbo
5616dda664dd106d576848124fc0fc1de18d0fd3 assets/create/blockstates/yellow_valve_handle.json
7f39521b211441f5c3e06d60c5978cebe16cacfb assets/create/blockstates/zinc_block.json
b7181bcd8182b2f17088e5aa881f374c9c65470c assets/create/blockstates/zinc_ore.json
f1bedeb51c35e70a2247178634e61ea637a6622e assets/create/lang/en_ud.json
629c4b2f4a7b93c4ba276245ea92b56931fa1e55 assets/create/lang/en_us.json
f409c19eb8fcab16e270a51f5a3865c933ae37fa assets/create/lang/unfinished/cs_cz.json
38b96811697f30d5a7656e17c2874ba76cf3711d assets/create/lang/unfinished/da_dk.json
f2d95918e378b28e44392e46860383091523bdb3 assets/create/lang/unfinished/de_de.json
fd181773e9f3515a9a8f797024c79c4c8003515a assets/create/lang/unfinished/es_cl.json
78fef9fbc89d9ff476430e30b1dea5857c11d920 assets/create/lang/unfinished/es_es.json
2a9aa2e8dd66f40a09a15794318ebf70d5b57a05 assets/create/lang/unfinished/es_mx.json
9b89df317edb110ac5df3e9842fdf67d1432108a assets/create/lang/unfinished/fr_fr.json
40012bcf7152b6c8ee906278bb44678354b4e3ca assets/create/lang/unfinished/hu_hu.json
651125b7f58573fc357630eb2c7003013357b860 assets/create/lang/unfinished/it_it.json
ea9197b6373e059aef42f8ee0c6bda66949cac2f assets/create/lang/unfinished/ja_jp.json
8897df5518b74c8d28364c82c237ec784e9222bf assets/create/lang/unfinished/ko_kr.json
554765f5eab85c86c26dc292b214fcdd05b55828 assets/create/lang/unfinished/nl_nl.json
ee06a5dbc1eaa43944e1666b5626d4bf168f422c assets/create/lang/unfinished/no_no.json
1740766c3789bd8ac476f789b25c12c4f88005ce assets/create/lang/unfinished/pl_pl.json
1d935b043ae8050228ba5685d39b13c156f793a0 assets/create/lang/unfinished/pt_br.json
bce4776c51d30ffbba1d7ef24e5cf5c794854cdc assets/create/lang/unfinished/pt_pt.json
58863a13d65ecf34fe31dc37c90854972ec5427e assets/create/lang/unfinished/ro_ro.json
0471b8bb5bbd8d3c07e971c4d1e1606f78d50e66 assets/create/lang/unfinished/ru_ru.json
7fe39a993e8f9870a39f8d411b1577368effa477 assets/create/lang/unfinished/sv_se.json
3b0df05712345b5d239882f0ca9ee7931591a611 assets/create/lang/unfinished/th_th.json
84e50f51ed81826a585a7f686f762a3800ba3082 assets/create/lang/unfinished/uk_ua.json
8d04ac15eaa0b6f5632bc389946a452f3862608a assets/create/lang/unfinished/zh_cn.json
7965f6b897b0109e46e47e092e280eea20fb20d1 assets/create/lang/unfinished/zh_tw.json
3054a5519fbf91481b0c9c8160a20679fa9530da assets/create/lang/en_ud.json
093dfa9846e481071cd27239b4d66760848b160e assets/create/lang/en_us.json
487a511a01b2a4531fb672f917922312db78f958 assets/create/models/block/acacia_window.json
b48060cba1a382f373a05bf0039054053eccf076 assets/create/models/block/acacia_window_pane_noside.json
3066db1bf03cffa1a9c7fbacf47ae586632f4eb3 assets/create/models/block/acacia_window_pane_noside_alt.json
@ -1954,7 +1930,6 @@ f8d0d4b2a890ea7a69ab0c390947b48fe0478d3f assets/create/models/item/mechanical_pi
726ae61699dc379a4f535c1be3ec2672a2f03583 assets/create/models/item/mechanical_plough.json
6c2acb80e53256fbb85f76851f335f9248ace6da assets/create/models/item/mechanical_press.json
4e363477e3e8059dd7b2bad04046521b31923d1b assets/create/models/item/mechanical_pump.json
2d7d314661e39f027c118cf14ae2f4acf213b9be assets/create/models/item/mechanical_roller.json
3fc1fcb2016d2782c3667c21575423122b66705a assets/create/models/item/mechanical_saw.json
3afa723a8ba4160a4bd8778a56e1880e7ff53ed9 assets/create/models/item/metal_bracket.json
56494f6d8743241836f7e68122ad9cc83f77658a assets/create/models/item/metal_girder.json
@ -2463,7 +2438,6 @@ c32f74a21df56b67f99366fba747277c40b09935 data/create/advancements/recipes/create
ab3cb22e7cb2469c69a177ba83e29a2e1abdc3f8 data/create/advancements/recipes/create.base/crafting/kinetics/mechanical_plough.json
6b1ae84d071e8fc7a1789aaeb01a15260831fc82 data/create/advancements/recipes/create.base/crafting/kinetics/mechanical_press.json
90434eccfbcff42e8bc397881fd9d68f2dcb7ad4 data/create/advancements/recipes/create.base/crafting/kinetics/mechanical_pump.json
b0fabbe0b97cf7a56260af78cb29d21c55aafbe1 data/create/advancements/recipes/create.base/crafting/kinetics/mechanical_roller.json
40a87b7abbc22436efab546fad3910f4a945c5fc data/create/advancements/recipes/create.base/crafting/kinetics/mechanical_saw.json
ed6f472a0de659074e384d20e6c5903bda543acc data/create/advancements/recipes/create.base/crafting/kinetics/metal_bracket.json
3072592260b044257cc53be8f023909394b6cfea data/create/advancements/recipes/create.base/crafting/kinetics/metal_girder.json
@ -3701,7 +3675,6 @@ a21c4e4eebeff2daf1f081cd6226f29adfeade7c data/create/loot_tables/blocks/mechanic
b8f5a9201775b711195a01882888307dd273aeab data/create/loot_tables/blocks/mechanical_plough.json
ff55d31ae8f7a8943f1e9fcc330d18e246566997 data/create/loot_tables/blocks/mechanical_press.json
8f885b8cec8f1ef9e35bd9b93a64a0f6e14c31b0 data/create/loot_tables/blocks/mechanical_pump.json
fda8ee4cd0f5a29267b10e53b013dc75cee253e9 data/create/loot_tables/blocks/mechanical_roller.json
6c88dd3f096f2a7572573158f8e6d9f4b3dedae0 data/create/loot_tables/blocks/mechanical_saw.json
fcd800d7abf5dc5ce50b6fff6f2fc934b3d47b4b data/create/loot_tables/blocks/metal_bracket.json
afdff197c9d1a6940e988c00435135f9705fd0e5 data/create/loot_tables/blocks/metal_girder.json
@ -4138,7 +4111,6 @@ e8d842e3bd9949ea12682d9cddf29e7d54f926ec data/create/recipes/crafting/kinetics/m
8a2f9068d6fab81f46699f897e619461ca89e38f data/create/recipes/crafting/kinetics/mechanical_plough.json
be0b5c980c310807253d54006a714534a4b27065 data/create/recipes/crafting/kinetics/mechanical_press.json
4307cc2c988ac19602f2f86afa2146c7e7fef026 data/create/recipes/crafting/kinetics/mechanical_pump.json
316c72e1a2ec264b33f98a51125a6de20e679c38 data/create/recipes/crafting/kinetics/mechanical_roller.json
ce28bcb47a379976d4a1bdfcfd1cdd0bae0bcdae data/create/recipes/crafting/kinetics/mechanical_saw.json
353146e9501096b4cd9632ad5500b0a2406c6f5d data/create/recipes/crafting/kinetics/metal_bracket.json
0ef8088b775f551c6f5b44f21f419fba366a971e data/create/recipes/crafting/kinetics/metal_girder.json
@ -5762,8 +5734,8 @@ e16d74571ae10007f06f3b86ddf05d3ca9b73559 data/minecraft/tags/blocks/doors.json
2db7759fe036160c14c6ed19a68604ca16f4de60 data/minecraft/tags/blocks/dripstone_replaceable_blocks.json
69f596fcb065e26b02ce246760432b5174191b76 data/minecraft/tags/blocks/impermeable.json
2db7759fe036160c14c6ed19a68604ca16f4de60 data/minecraft/tags/blocks/lush_ground_replaceable.json
e2ba2b22fbda681faa4db4a32f6e15d2c7946fec data/minecraft/tags/blocks/mineable/axe.json
1c1c974423a0d5668d20ebabfe4444e7fb1fe372 data/minecraft/tags/blocks/mineable/pickaxe.json
a8662d145a8b1b5faa263c2aac9d12e7727c8c3f data/minecraft/tags/blocks/mineable/axe.json
6f18f0d6fe0e4204079cbf9c7b6dc79c8cebcaa9 data/minecraft/tags/blocks/mineable/pickaxe.json
2db7759fe036160c14c6ed19a68604ca16f4de60 data/minecraft/tags/blocks/moss_replaceable.json
e157c1d3af30e409e34bbefbe15a037e6e1c8daa data/minecraft/tags/blocks/needs_iron_tool.json
a08f67865337f62601c5e333b4011382d10020e4 data/minecraft/tags/blocks/needs_stone_tool.json

View File

@ -1141,6 +1141,7 @@
"create.schematicAndQuill.saved": "Saved as %1$s",
"create.schematic.invalid": "[!] Invalid Item - Use the Schematic Table instead",
"create.schematic.error": "Schematic failed to Load - Check Game Logs",
"create.schematic.position": "Position",
"create.schematic.rotation": "Rotation",
"create.schematic.rotation.none": "None",
@ -1234,6 +1235,8 @@
"create.schematicannon.status.schematicInvalid": "Schematic Invalid",
"create.schematicannon.status.schematicNotPlaced": "Schematic not Positioned",
"create.schematicannon.status.schematicExpired": "Schematic File Expired",
"create.schematicannon.status.schematicErrored": "Incompatible Blocks",
"create.schematicannon.status.schematicErroredCheckLogs": "Check Server Logs",
"create.materialChecklist": "Material Checklist",
"create.materialChecklist.blocksNotLoaded": "* Disclaimer *\n\nMaterial List may be inaccurate due to relevant chunks not being loaded.",
@ -1659,6 +1662,20 @@
"create.contraption.controls.actor_toggle.on": "On",
"create.contraption.controls.actor_toggle.off": "Off",
"create.contraption.controls.floor_unreachable": "Unreachable",
"create.contraption.door_control": "Onboard Door Control",
"create.contraption.door_control.all": "Open All Doors",
"create.contraption.door_control.all.short": "Open All",
"create.contraption.door_control.north": "North Side Only",
"create.contraption.door_control.north.short": "North",
"create.contraption.door_control.east": "East Side Only",
"create.contraption.door_control.east.short": "East",
"create.contraption.door_control.south": "South Side Only",
"create.contraption.door_control.south.short": "South",
"create.contraption.door_control.west": "West Side Only",
"create.contraption.door_control.west.short": "West",
"create.contraption.door_control.none": "Keep Doors Closed",
"create.contraption.door_control.none.short": "None",
"create.contraption.door_control.player_facing": "You are facing: %1$s",
"create.display_link.set": "Targeted position selected",
"create.display_link.success": "Successfully bound to targeted position",
@ -1780,6 +1797,9 @@
"create.contraption.minecart_contraption_too_big": "This Cart Contraption seems too big to pick up",
"create.contraption.minecart_contraption_illegal_pickup": "A mystical force is binding this Cart Contraption to the world",
"enchantment.create.capacity.desc": "Increases Backtank air capacity.",
"enchantment.create.potato_recovery.desc": "Potato Cannon projectiles have a chance to be reused.",
"_": "->------------------------] Subtitles [------------------------<-",

View File

@ -25,8 +25,8 @@ import com.simibubi.create.content.contraptions.components.actors.controls.Contr
import com.simibubi.create.content.contraptions.components.clock.CuckooClockBlockEntity;
import com.simibubi.create.content.contraptions.components.clock.CuckooClockRenderer;
import com.simibubi.create.content.contraptions.components.crafter.MechanicalCrafterBlockEntity;
import com.simibubi.create.content.contraptions.components.crafter.MechanicalCrafterInstance;
import com.simibubi.create.content.contraptions.components.crafter.MechanicalCrafterRenderer;
import com.simibubi.create.content.contraptions.components.crafter.ShaftlessCogwheelInstance;
import com.simibubi.create.content.contraptions.components.crank.HandCrankBlockEntity;
import com.simibubi.create.content.contraptions.components.crank.HandCrankInstance;
import com.simibubi.create.content.contraptions.components.crank.HandCrankRenderer;
@ -39,11 +39,11 @@ import com.simibubi.create.content.contraptions.components.fan.EncasedFanBlockEn
import com.simibubi.create.content.contraptions.components.fan.EncasedFanRenderer;
import com.simibubi.create.content.contraptions.components.fan.FanInstance;
import com.simibubi.create.content.contraptions.components.fan.NozzleBlockEntity;
import com.simibubi.create.content.contraptions.components.flywheel.FlyWheelInstance;
import com.simibubi.create.content.contraptions.components.flywheel.FlywheelBlockEntity;
import com.simibubi.create.content.contraptions.components.flywheel.FlywheelInstance;
import com.simibubi.create.content.contraptions.components.flywheel.FlywheelRenderer;
import com.simibubi.create.content.contraptions.components.millstone.MillStoneCogInstance;
import com.simibubi.create.content.contraptions.components.millstone.MillstoneBlockEntity;
import com.simibubi.create.content.contraptions.components.millstone.MillstoneCogInstance;
import com.simibubi.create.content.contraptions.components.millstone.MillstoneRenderer;
import com.simibubi.create.content.contraptions.components.mixer.MechanicalMixerBlockEntity;
import com.simibubi.create.content.contraptions.components.mixer.MechanicalMixerRenderer;
@ -581,14 +581,14 @@ public class AllBlockEntityTypes {
public static final BlockEntityEntry<FlywheelBlockEntity> FLYWHEEL = REGISTRATE
.blockEntity("flywheel", FlywheelBlockEntity::new)
.instance(() -> FlyWheelInstance::new, false)
.instance(() -> FlywheelInstance::new, false)
.validBlocks(AllBlocks.FLYWHEEL)
.renderer(() -> FlywheelRenderer::new)
.register();
public static final BlockEntityEntry<MillstoneBlockEntity> MILLSTONE = REGISTRATE
.blockEntity("millstone", MillstoneBlockEntity::new)
.instance(() -> MillStoneCogInstance::new, false)
.instance(() -> MillstoneCogInstance::new, false)
.validBlocks(AllBlocks.MILLSTONE)
.renderer(() -> MillstoneRenderer::new)
.register();
@ -649,7 +649,7 @@ public class AllBlockEntityTypes {
public static final BlockEntityEntry<MechanicalCrafterBlockEntity> MECHANICAL_CRAFTER = REGISTRATE
.blockEntity("mechanical_crafter", MechanicalCrafterBlockEntity::new)
.instance(() -> MechanicalCrafterInstance::new)
.instance(() -> ShaftlessCogwheelInstance::new)
.validBlocks(AllBlocks.MECHANICAL_CRAFTER)
.renderer(() -> MechanicalCrafterRenderer::new)
.register();
@ -839,14 +839,14 @@ public class AllBlockEntityTypes {
.validBlocks(AllBlocks.TRAIN_DOOR, AllBlocks.FRAMED_GLASS_DOOR)
.register();
public static final BlockEntityEntry<CopycatBlockEntity> UNIVERSAL_FRAME = REGISTRATE
.blockEntity("universal_frame", CopycatBlockEntity::new)
public static final BlockEntityEntry<CopycatBlockEntity> COPYCAT = REGISTRATE
.blockEntity("copycat", CopycatBlockEntity::new)
.validBlocks(AllBlocks.COPYCAT_PANEL, AllBlocks.COPYCAT_STEP)
.register();
public static final BlockEntityEntry<FlapDisplayBlockEntity> FLAP_DISPLAY = REGISTRATE
.blockEntity("flap_display", FlapDisplayBlockEntity::new)
.instance(() -> MechanicalCrafterInstance::new)
.instance(() -> ShaftlessCogwheelInstance::new)
.renderer(() -> FlapDisplayRenderer::new)
.validBlocks(AllBlocks.DISPLAY_BOARD)
.register();

View File

@ -123,6 +123,7 @@ import com.simibubi.create.content.contraptions.relays.belt.BeltModel;
import com.simibubi.create.content.contraptions.relays.elementary.BracketedKineticBlockModel;
import com.simibubi.create.content.contraptions.relays.elementary.CogWheelBlock;
import com.simibubi.create.content.contraptions.relays.elementary.CogwheelBlockItem;
import com.simibubi.create.content.contraptions.relays.elementary.EncasingRegistry;
import com.simibubi.create.content.contraptions.relays.elementary.ShaftBlock;
import com.simibubi.create.content.contraptions.relays.encased.AdjustablePulleyBlock;
import com.simibubi.create.content.contraptions.relays.encased.ClutchBlock;
@ -363,23 +364,26 @@ public class AllBlocks {
.register();
public static final BlockEntry<EncasedShaftBlock> ANDESITE_ENCASED_SHAFT =
REGISTRATE.block("andesite_encased_shaft", EncasedShaftBlock::andesite)
REGISTRATE.block("andesite_encased_shaft", p -> new EncasedShaftBlock(p, AllBlocks.ANDESITE_CASING::get))
.properties(p -> p.color(MaterialColor.PODZOL))
.transform(BuilderTransformers.encasedShaft("andesite", () -> AllSpriteShifts.ANDESITE_CASING))
.transform(EncasingRegistry.addVariantTo(AllBlocks.SHAFT))
.transform(axeOrPickaxe())
.register();
public static final BlockEntry<EncasedShaftBlock> BRASS_ENCASED_SHAFT =
REGISTRATE.block("brass_encased_shaft", EncasedShaftBlock::brass)
REGISTRATE.block("brass_encased_shaft", p -> new EncasedShaftBlock(p, AllBlocks.BRASS_CASING::get))
.properties(p -> p.color(MaterialColor.TERRACOTTA_BROWN))
.transform(BuilderTransformers.encasedShaft("brass", () -> AllSpriteShifts.BRASS_CASING))
.transform(EncasingRegistry.addVariantTo(AllBlocks.SHAFT))
.transform(axeOrPickaxe())
.register();
public static final BlockEntry<EncasedCogwheelBlock> ANDESITE_ENCASED_COGWHEEL = REGISTRATE
.block("andesite_encased_cogwheel", p -> EncasedCogwheelBlock.andesite(false, p))
.block("andesite_encased_cogwheel", p -> new EncasedCogwheelBlock(p, false, AllBlocks.ANDESITE_CASING::get))
.properties(p -> p.color(MaterialColor.PODZOL))
.transform(BuilderTransformers.encasedCogwheel("andesite", () -> AllSpriteShifts.ANDESITE_CASING))
.transform(EncasingRegistry.addVariantTo(AllBlocks.COGWHEEL))
.onRegister(CreateRegistrate.connectedTextures(() -> new EncasedCogCTBehaviour(AllSpriteShifts.ANDESITE_CASING,
Couple.create(AllSpriteShifts.ANDESITE_ENCASED_COGWHEEL_SIDE,
AllSpriteShifts.ANDESITE_ENCASED_COGWHEEL_OTHERSIDE))))
@ -387,9 +391,10 @@ public class AllBlocks {
.register();
public static final BlockEntry<EncasedCogwheelBlock> BRASS_ENCASED_COGWHEEL =
REGISTRATE.block("brass_encased_cogwheel", p -> EncasedCogwheelBlock.brass(false, p))
REGISTRATE.block("brass_encased_cogwheel", p -> new EncasedCogwheelBlock(p, false, AllBlocks.BRASS_CASING::get))
.properties(p -> p.color(MaterialColor.TERRACOTTA_BROWN))
.transform(BuilderTransformers.encasedCogwheel("brass", () -> AllSpriteShifts.BRASS_CASING))
.transform(EncasingRegistry.addVariantTo(AllBlocks.COGWHEEL))
.onRegister(CreateRegistrate.connectedTextures(() -> new EncasedCogCTBehaviour(AllSpriteShifts.BRASS_CASING,
Couple.create(AllSpriteShifts.BRASS_ENCASED_COGWHEEL_SIDE,
AllSpriteShifts.BRASS_ENCASED_COGWHEEL_OTHERSIDE))))
@ -397,16 +402,18 @@ public class AllBlocks {
.register();
public static final BlockEntry<EncasedCogwheelBlock> ANDESITE_ENCASED_LARGE_COGWHEEL =
REGISTRATE.block("andesite_encased_large_cogwheel", p -> EncasedCogwheelBlock.andesite(true, p))
REGISTRATE.block("andesite_encased_large_cogwheel", p -> new EncasedCogwheelBlock(p, true, AllBlocks.ANDESITE_CASING::get))
.properties(p -> p.color(MaterialColor.PODZOL))
.transform(BuilderTransformers.encasedLargeCogwheel("andesite", () -> AllSpriteShifts.ANDESITE_CASING))
.transform(EncasingRegistry.addVariantTo(AllBlocks.LARGE_COGWHEEL))
.transform(axeOrPickaxe())
.register();
public static final BlockEntry<EncasedCogwheelBlock> BRASS_ENCASED_LARGE_COGWHEEL =
REGISTRATE.block("brass_encased_large_cogwheel", p -> EncasedCogwheelBlock.brass(true, p))
REGISTRATE.block("brass_encased_large_cogwheel", p -> new EncasedCogwheelBlock(p, true, AllBlocks.BRASS_CASING::get))
.properties(p -> p.color(MaterialColor.TERRACOTTA_BROWN))
.transform(BuilderTransformers.encasedLargeCogwheel("brass", () -> AllSpriteShifts.BRASS_CASING))
.transform(EncasingRegistry.addVariantTo(AllBlocks.LARGE_COGWHEEL))
.transform(axeOrPickaxe())
.register();
@ -824,7 +831,7 @@ public class AllBlocks {
.register();
public static final BlockEntry<EncasedPipeBlock> ENCASED_FLUID_PIPE =
REGISTRATE.block("encased_fluid_pipe", EncasedPipeBlock::new)
REGISTRATE.block("encased_fluid_pipe", p -> new EncasedPipeBlock(p, AllBlocks.COPPER_CASING::get))
.initialProperties(SharedProperties::copperMetal)
.properties(p -> p.color(MaterialColor.TERRACOTTA_LIGHT_GRAY))
.properties(BlockBehaviour.Properties::noOcclusion)
@ -835,6 +842,7 @@ public class AllBlocks {
(s, f) -> !s.getValue(EncasedPipeBlock.FACING_TO_PROPERTY_MAP.get(f)))))
.onRegister(CreateRegistrate.blockModel(() -> PipeAttachmentModel::new))
.loot((p, b) -> p.dropOther(b, FLUID_PIPE.get()))
.transform(EncasingRegistry.addVariantTo(AllBlocks.FLUID_PIPE))
.register();
public static final BlockEntry<GlassFluidPipeBlock> GLASS_FLUID_PIPE =

View File

@ -14,7 +14,7 @@ import com.simibubi.create.foundation.utility.Lang;
import net.minecraft.core.Direction;
import net.minecraft.world.item.DyeColor;
public class AllBlockPartials {
public class AllPartialModels {
public static final PartialModel

View File

@ -84,7 +84,7 @@ public class CreateClient {
BUFFER_CACHE.registerCompartment(WorldSectionElement.DOC_WORLD_SECTION, 20);
AllKeys.register();
AllBlockPartials.init();
AllPartialModels.init();
AllStitchedTextures.init();
PonderIndex.register();
@ -121,7 +121,7 @@ public class CreateClient {
if (mc.options.graphicsMode != GraphicsStatus.FABULOUS)
return;
if (AllConfigs.CLIENT.ignoreFabulousWarning.get())
if (AllConfigs.client().ignoreFabulousWarning.get())
return;
MutableComponent text = ComponentUtils.wrapInSquareBrackets(Components.literal("WARN"))

View File

@ -34,7 +34,7 @@ public class BlueprintTransferHandler implements IRecipeTransferHandler<Blueprin
if (!doTransfer)
return null;
AllPackets.channel.sendToServer(new BlueprintAssignCompleteRecipePacket(craftingRecipe.getId()));
AllPackets.getChannel().sendToServer(new BlueprintAssignCompleteRecipePacket(craftingRecipe.getId()));
return null;
}

View File

@ -503,7 +503,7 @@ public class CreateJEI implements IModPlugin {
public CreateRecipeCategory<T> build(String name, CreateRecipeCategory.Factory<T> factory) {
Supplier<List<T>> recipesSupplier;
if (predicate.test(AllConfigs.SERVER.recipes)) {
if (predicate.test(AllConfigs.server().recipes)) {
recipesSupplier = () -> {
List<T> recipes = new ArrayList<>();
for (Consumer<List<T>> consumer : recipeListConsumers)

View File

@ -82,7 +82,7 @@ public class GhostIngredientHandler<T extends GhostItemMenu<?>>
return;
// sync new filter contents with server
AllPackets.channel.sendToServer(new GhostItemSubmitPacket(stack, slotIndex));
AllPackets.getChannel().sendToServer(new GhostItemSubmitPacket(stack, slotIndex));
}
}
}

View File

@ -7,8 +7,8 @@ import javax.annotation.ParametersAreNonnullByDefault;
import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.math.Vector3f;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.AllPartialModels;
import com.simibubi.create.compat.jei.category.animations.AnimatedKinetics;
import com.simibubi.create.content.contraptions.processing.ProcessingOutput;
import com.simibubi.create.content.contraptions.processing.ProcessingRecipe;
@ -57,7 +57,7 @@ public abstract class ProcessingViaFanCategory<T extends Recipe<?>> extends Crea
matrixStack.mulPose(Vector3f.XP.rotationDegrees(-12.5f));
matrixStack.mulPose(Vector3f.YP.rotationDegrees(22.5f));
AnimatedKinetics.defaultBlockElement(AllBlockPartials.ENCASED_FAN_INNER)
AnimatedKinetics.defaultBlockElement(AllPartialModels.ENCASED_FAN_INNER)
.rotateBlock(180, 0, AnimatedKinetics.getCurrentAngle() * 16)
.scale(SCALE)
.render(matrixStack);

View File

@ -4,8 +4,8 @@ import com.jozufozu.flywheel.core.PartialModel;
import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.blaze3d.vertex.VertexConsumer;
import com.mojang.math.Vector3f;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.AllPartialModels;
import com.simibubi.create.AllSpriteShifts;
import com.simibubi.create.content.contraptions.processing.burner.BlazeBurnerBlock.HeatLevel;
import com.simibubi.create.foundation.block.render.SpriteShiftEntry;
@ -42,9 +42,9 @@ public class AnimatedBlazeBurner extends AnimatedKinetics {
.render(matrixStack);
PartialModel blaze =
heatLevel == HeatLevel.SEETHING ? AllBlockPartials.BLAZE_SUPER : AllBlockPartials.BLAZE_ACTIVE;
PartialModel rods2 = heatLevel == HeatLevel.SEETHING ? AllBlockPartials.BLAZE_BURNER_SUPER_RODS_2
: AllBlockPartials.BLAZE_BURNER_RODS_2;
heatLevel == HeatLevel.SEETHING ? AllPartialModels.BLAZE_SUPER : AllPartialModels.BLAZE_ACTIVE;
PartialModel rods2 = heatLevel == HeatLevel.SEETHING ? AllPartialModels.BLAZE_BURNER_SUPER_RODS_2
: AllPartialModels.BLAZE_BURNER_RODS_2;
blockElement(blaze).atLocal(1, 1.8, 1)
.rotate(0, 180, 0)
@ -86,7 +86,7 @@ public class AnimatedBlazeBurner extends AnimatedKinetics {
MultiBufferSource.BufferSource buffer = mc.renderBuffers()
.bufferSource();
VertexConsumer vb = buffer.getBuffer(RenderType.cutoutMipped());
CachedBufferer.partial(AllBlockPartials.BLAZE_BURNER_FLAME, Blocks.AIR.defaultBlockState())
CachedBufferer.partial(AllPartialModels.BLAZE_BURNER_FLAME, Blocks.AIR.defaultBlockState())
.shiftUVScrolling(spriteShift, (float) uScroll, (float) vScroll)
.light(LightTexture.FULL_BRIGHT)
.renderInto(matrixStack, vb);

View File

@ -2,8 +2,8 @@ package com.simibubi.create.compat.jei.category.animations;
import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.math.Vector3f;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.AllPartialModels;
import com.simibubi.create.content.contraptions.components.deployer.DeployerBlock;
import com.simibubi.create.foundation.utility.AnimationTickHolder;
@ -37,11 +37,11 @@ public class AnimatedDeployer extends AnimatedKinetics {
matrixStack.pushPose();
matrixStack.translate(0, offset * 17, 0);
blockElement(AllBlockPartials.DEPLOYER_POLE)
blockElement(AllPartialModels.DEPLOYER_POLE)
.rotateBlock(90, 0, 0)
.scale(scale)
.render(matrixStack);
blockElement(AllBlockPartials.DEPLOYER_HAND_HOLDING)
blockElement(AllPartialModels.DEPLOYER_HAND_HOLDING)
.rotateBlock(90, 0, 0)
.scale(scale)
.render(matrixStack);

View File

@ -1,8 +1,8 @@
package com.simibubi.create.compat.jei.category.animations;
import com.jozufozu.flywheel.core.PartialModel;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.AllPartialModels;
import com.simibubi.create.foundation.gui.CustomLightingSettings;
import com.simibubi.create.foundation.gui.ILightingSettings;
import com.simibubi.create.foundation.gui.element.GuiGameElement;
@ -49,7 +49,7 @@ public abstract class AnimatedKinetics implements IDrawable {
}
protected PartialModel cogwheel() {
return AllBlockPartials.SHAFTLESS_COGWHEEL;
return AllPartialModels.SHAFTLESS_COGWHEEL;
}
protected GuiGameElement.GuiRenderBuilder blockElement(BlockState state) {

View File

@ -1,8 +1,8 @@
package com.simibubi.create.compat.jei.category.animations;
import com.mojang.blaze3d.vertex.PoseStack;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.AllPartialModels;
import com.simibubi.create.foundation.gui.AllGuiTextures;
public class AnimatedMillstone extends AnimatedKinetics {
@ -15,7 +15,7 @@ public class AnimatedMillstone extends AnimatedKinetics {
matrixStack.translate(-2, 18, 0);
int scale = 22;
blockElement(AllBlockPartials.MILLSTONE_COG)
blockElement(AllPartialModels.MILLSTONE_COG)
.rotateBlock(22.5, getCurrentAngle() * 2, 0)
.scale(scale)
.render(matrixStack);

View File

@ -2,8 +2,8 @@ package com.simibubi.create.compat.jei.category.animations;
import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.math.Vector3f;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.AllPartialModels;
import com.simibubi.create.foundation.utility.AnimationTickHolder;
import net.minecraft.util.Mth;
@ -31,12 +31,12 @@ public class AnimatedMixer extends AnimatedKinetics {
float animation = ((Mth.sin(AnimationTickHolder.getRenderTime() / 32f) + 1) / 5) + .5f;
blockElement(AllBlockPartials.MECHANICAL_MIXER_POLE)
blockElement(AllPartialModels.MECHANICAL_MIXER_POLE)
.atLocal(0, animation, 0)
.scale(scale)
.render(matrixStack);
blockElement(AllBlockPartials.MECHANICAL_MIXER_HEAD)
blockElement(AllPartialModels.MECHANICAL_MIXER_HEAD)
.rotateBlock(0, getCurrentAngle() * 4, 0)
.atLocal(0, animation, 0)
.scale(scale)

View File

@ -2,8 +2,8 @@ package com.simibubi.create.compat.jei.category.animations;
import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.math.Vector3f;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.AllPartialModels;
import com.simibubi.create.foundation.utility.AnimationTickHolder;
import net.minecraft.core.Direction.Axis;
@ -33,7 +33,7 @@ public class AnimatedPress extends AnimatedKinetics {
.scale(scale)
.render(matrixStack);
blockElement(AllBlockPartials.MECHANICAL_PRESS_HEAD)
blockElement(AllPartialModels.MECHANICAL_PRESS_HEAD)
.atLocal(0, -getAnimatedHeadOffset(), 0)
.scale(scale)
.render(matrixStack);

View File

@ -2,8 +2,8 @@ package com.simibubi.create.compat.jei.category.animations;
import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.math.Vector3f;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.AllPartialModels;
import com.simibubi.create.content.contraptions.components.saw.SawBlock;
import net.minecraft.core.Direction;
@ -32,7 +32,7 @@ public class AnimatedSaw extends AnimatedKinetics {
.scale(scale)
.render(matrixStack);
blockElement(AllBlockPartials.SAW_BLADE_VERTICAL_ACTIVE)
blockElement(AllPartialModels.SAW_BLADE_VERTICAL_ACTIVE)
.rotateBlock(0, -90, -90)
.scale(scale)
.render(matrixStack);

View File

@ -6,8 +6,8 @@ import com.mojang.blaze3d.platform.Lighting;
import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.blaze3d.vertex.Tesselator;
import com.mojang.math.Vector3f;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.AllPartialModels;
import com.simibubi.create.foundation.fluid.FluidRenderer;
import com.simibubi.create.foundation.gui.UIRenderHelper;
import com.simibubi.create.foundation.utility.AnimationTickHolder;
@ -45,15 +45,15 @@ public class AnimatedSpout extends AnimatedKinetics {
matrixStack.pushPose();
blockElement(AllBlockPartials.SPOUT_TOP)
blockElement(AllPartialModels.SPOUT_TOP)
.scale(scale)
.render(matrixStack);
matrixStack.translate(0, -3 * squeeze / 32f, 0);
blockElement(AllBlockPartials.SPOUT_MIDDLE)
blockElement(AllPartialModels.SPOUT_MIDDLE)
.scale(scale)
.render(matrixStack);
matrixStack.translate(0, -3 * squeeze / 32f, 0);
blockElement(AllBlockPartials.SPOUT_BOTTOM)
blockElement(AllPartialModels.SPOUT_BOTTOM)
.scale(scale)
.render(matrixStack);
matrixStack.translate(0, -3 * squeeze / 32f, 0);

View File

@ -66,7 +66,7 @@ public class SpoutCasting extends BlockSpoutingBehaviour {
TICON_PRESENT = Mods.TCONSTRUCT.isLoaded();
if (!TICON_PRESENT)
return false;
return AllConfigs.SERVER.recipes.allowCastingBySpout.get();
return AllConfigs.server().recipes.allowCastingBySpout.get();
}
}

View File

@ -61,7 +61,7 @@ public class KineticDebugger {
}
public static boolean isActive() {
return isF3DebugModeActive() && AllConfigs.CLIENT.rainbowDebug.get();
return isF3DebugModeActive() && AllConfigs.client().rainbowDebug.get();
}
public static boolean isF3DebugModeActive() {

View File

@ -234,8 +234,8 @@ public class RotationPropagator {
boolean incompatible =
Math.signum(newSpeed) != Math.signum(speedOfNeighbour) && (newSpeed != 0 && speedOfNeighbour != 0);
boolean tooFast = Math.abs(newSpeed) > AllConfigs.SERVER.kinetics.maxRotationSpeed.get()
|| Math.abs(oppositeSpeed) > AllConfigs.SERVER.kinetics.maxRotationSpeed.get();
boolean tooFast = Math.abs(newSpeed) > AllConfigs.server().kinetics.maxRotationSpeed.get()
|| Math.abs(oppositeSpeed) > AllConfigs.server().kinetics.maxRotationSpeed.get();
// Check for both the new speed and the opposite speed, just in case
boolean speedChangedTooOften = currentTE.getFlickerScore() > MAX_FLICKER_SCORE;

View File

@ -5,8 +5,8 @@ import com.jozufozu.flywheel.api.MaterialManager;
import net.minecraft.core.Direction;
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
public class BackHalfShaftInstance extends HalfShaftInstance {
public BackHalfShaftInstance(MaterialManager materialManager, KineticBlockEntity blockEntity) {
public class BackHalfShaftInstance<T extends KineticBlockEntity> extends HalfShaftInstance<T> {
public BackHalfShaftInstance(MaterialManager materialManager, T blockEntity) {
super(materialManager, blockEntity);
}

View File

@ -5,8 +5,8 @@ import com.jozufozu.flywheel.api.MaterialManager;
import com.simibubi.create.content.contraptions.base.flwdata.RotatingData;
import com.simibubi.create.foundation.render.AllMaterialSpecs;
public class CutoutRotatingInstance extends SingleRotatingInstance {
public CutoutRotatingInstance(MaterialManager materialManager, KineticBlockEntity blockEntity) {
public class CutoutRotatingInstance<T extends KineticBlockEntity> extends SingleRotatingInstance<T> {
public CutoutRotatingInstance(MaterialManager materialManager, T blockEntity) {
super(materialManager, blockEntity);
}

View File

@ -2,21 +2,21 @@ package com.simibubi.create.content.contraptions.base;
import com.jozufozu.flywheel.api.Instancer;
import com.jozufozu.flywheel.api.MaterialManager;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.AllPartialModels;
import com.simibubi.create.content.contraptions.base.flwdata.RotatingData;
import net.minecraft.core.Direction;
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
public class HalfShaftInstance extends SingleRotatingInstance {
public HalfShaftInstance(MaterialManager materialManager, KineticBlockEntity blockEntity) {
public class HalfShaftInstance<T extends KineticBlockEntity> extends SingleRotatingInstance<T> {
public HalfShaftInstance(MaterialManager materialManager, T blockEntity) {
super(materialManager, blockEntity);
}
@Override
protected Instancer<RotatingData> getModel() {
Direction dir = getShaftDirection();
return getRotatingMaterial().getModel(AllBlockPartials.SHAFT_HALF, blockState, dir);
return getRotatingMaterial().getModel(AllPartialModels.SHAFT_HALF, blockState, dir);
}
protected Direction getShaftDirection() {

View File

@ -5,9 +5,9 @@ import com.jozufozu.flywheel.api.MaterialManager;
import net.minecraft.core.Direction;
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
public class HorizontalHalfShaftInstance extends HalfShaftInstance {
public class HorizontalHalfShaftInstance<T extends KineticBlockEntity> extends HalfShaftInstance<T> {
public HorizontalHalfShaftInstance(MaterialManager materialManager, KineticBlockEntity blockEntity) {
public HorizontalHalfShaftInstance(MaterialManager materialManager, T blockEntity) {
super(materialManager, blockEntity);
}

View File

@ -46,10 +46,10 @@ public interface IRotate extends IWrenchable {
public float getSpeedValue() {
switch (this) {
case FAST:
return AllConfigs.SERVER.kinetics.fastSpeed.get()
return AllConfigs.server().kinetics.fastSpeed.get()
.floatValue();
case MEDIUM:
return AllConfigs.SERVER.kinetics.mediumSpeed.get()
return AllConfigs.server().kinetics.mediumSpeed.get()
.floatValue();
case SLOW:
return 1;
@ -62,9 +62,9 @@ public interface IRotate extends IWrenchable {
public static SpeedLevel of(float speed) {
speed = Math.abs(speed);
if (speed >= AllConfigs.SERVER.kinetics.fastSpeed.get())
if (speed >= AllConfigs.server().kinetics.fastSpeed.get())
return FAST;
if (speed >= AllConfigs.SERVER.kinetics.mediumSpeed.get())
if (speed >= AllConfigs.server().kinetics.mediumSpeed.get())
return MEDIUM;
if (speed >= 1)
return SLOW;
@ -128,7 +128,7 @@ public interface IRotate extends IWrenchable {
}
public static boolean isEnabled() {
return !AllConfigs.SERVER.kinetics.disableStress.get();
return !AllConfigs.server().kinetics.disableStress.get();
}
public static LangBuilder getFormattedStressText(double stressPercent) {

View File

@ -102,7 +102,7 @@ public class KineticBlockEntity extends SmartBlockEntity implements IHaveGoggleI
}
if (validationCountdown-- <= 0) {
validationCountdown = AllConfigs.SERVER.kinetics.kineticValidationFrequency.get();
validationCountdown = AllConfigs.server().kinetics.kineticValidationFrequency.get();
validateKinetics();
}
@ -392,7 +392,7 @@ public class KineticBlockEntity extends SmartBlockEntity implements IHaveGoggleI
public boolean addToTooltip(List<Component> tooltip, boolean isPlayerSneaking) {
boolean notFastEnough = !isSpeedRequirementFulfilled() && getSpeed() != 0;
if (overStressed && AllConfigs.CLIENT.enableOverstressedTooltip.get()) {
if (overStressed && AllConfigs.client().enableOverstressedTooltip.get()) {
Lang.translate("gui.stressometer.overstressed")
.style(GOLD)
.forGoggles(tooltip);

View File

@ -26,7 +26,7 @@ import net.minecraft.core.Direction.AxisDirection;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
public class KineticBlockEntityRenderer extends SafeBlockEntityRenderer<KineticBlockEntity> {
public class KineticBlockEntityRenderer<T extends KineticBlockEntity> extends SafeBlockEntityRenderer<T> {
public static final SuperByteBufferCache.Compartment<BlockState> KINETIC_BLOCK = new SuperByteBufferCache.Compartment<>();
public static boolean rainbowMode = false;
@ -40,7 +40,7 @@ public class KineticBlockEntityRenderer extends SafeBlockEntityRenderer<KineticB
}
@Override
protected void renderSafe(KineticBlockEntity be, float partialTicks, PoseStack ms, MultiBufferSource buffer,
protected void renderSafe(T be, float partialTicks, PoseStack ms, MultiBufferSource buffer,
int light, int overlay) {
if (Backend.canUseInstancing(be.getLevel())) return;
@ -50,18 +50,18 @@ public class KineticBlockEntityRenderer extends SafeBlockEntityRenderer<KineticB
renderRotatingBuffer(be, getRotatedModel(be, state), ms, buffer.getBuffer(type), light);
}
protected BlockState getRenderedBlockState(KineticBlockEntity be) {
protected BlockState getRenderedBlockState(T be) {
return be.getBlockState();
}
protected RenderType getRenderType(KineticBlockEntity be, BlockState state) {
protected RenderType getRenderType(T be, BlockState state) {
for (RenderType type : REVERSED_CHUNK_BUFFER_LAYERS)
if (ItemBlockRenderTypes.canRenderInLayer(state, type))
return type;
return null;
}
protected SuperByteBuffer getRotatedModel(KineticBlockEntity be, BlockState state) {
protected SuperByteBuffer getRotatedModel(T be, BlockState state) {
return CachedBufferer.block(KINETIC_BLOCK, state);
}

View File

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

View File

@ -0,0 +1,76 @@
package com.simibubi.create.content.contraptions.components.actors;
import java.util.Arrays;
import java.util.function.Consumer;
import com.simibubi.create.foundation.gui.widget.Label;
import com.simibubi.create.foundation.gui.widget.ScrollInput;
import com.simibubi.create.foundation.gui.widget.SelectionScrollInput;
import com.simibubi.create.foundation.utility.Components;
import com.simibubi.create.foundation.utility.Lang;
import com.simibubi.create.foundation.utility.Pair;
import net.minecraft.client.Minecraft;
import net.minecraft.core.Direction;
import net.minecraft.world.entity.Entity;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
public enum DoorControl {
ALL, NORTH, EAST, SOUTH, WEST, NONE;
private static String[] valuesAsString() {
DoorControl[] values = values();
return Arrays.stream(values)
.map(dc -> Lang.asId(dc.name()))
.toList()
.toArray(new String[values.length]);
}
public boolean matches(Direction doorDirection) {
return switch (this) {
case ALL -> true;
case NORTH -> doorDirection == Direction.NORTH;
case EAST -> doorDirection == Direction.EAST;
case SOUTH -> doorDirection == Direction.SOUTH;
case WEST -> doorDirection == Direction.WEST;
default -> false;
};
}
@OnlyIn(Dist.CLIENT)
public static Pair<ScrollInput, Label> createWidget(int x, int y, Consumer<DoorControl> callback,
DoorControl initial) {
DoorControl playerFacing = NONE;
Entity cameraEntity = Minecraft.getInstance().cameraEntity;
if (cameraEntity != null) {
Direction direction = cameraEntity.getDirection();
if (direction == Direction.EAST)
playerFacing = EAST;
if (direction == Direction.WEST)
playerFacing = WEST;
if (direction == Direction.NORTH)
playerFacing = NORTH;
if (direction == Direction.SOUTH)
playerFacing = SOUTH;
}
Label label = new Label(x + 4, y + 6, Components.empty()).withShadow();
ScrollInput input = new SelectionScrollInput(x, y, 53, 16)
.forOptions(Lang.translatedOptions("contraption.door_control", valuesAsString()))
.titled(Lang.translateDirect("contraption.door_control"))
.calling(s -> {
DoorControl mode = values()[s];
label.text = Lang.translateDirect("contraption.door_control." + Lang.asId(mode.name()) + ".short");
callback.accept(mode);
})
.addHint(Lang.translateDirect("contraption.door_control.player_facing",
Lang.translateDirect("contraption.door_control." + Lang.asId(playerFacing.name()) + ".short")))
.setState(initial.ordinal());
input.onChanged();
return Pair.of(input, label);
}
}

View File

@ -0,0 +1,45 @@
package com.simibubi.create.content.contraptions.components.actors;
import com.simibubi.create.foundation.blockEntity.BlockEntityBehaviour;
import com.simibubi.create.foundation.blockEntity.SmartBlockEntity;
import com.simibubi.create.foundation.blockEntity.behaviour.BehaviourType;
import com.simibubi.create.foundation.utility.NBTHelper;
import net.minecraft.nbt.CompoundTag;
public class DoorControlBehaviour extends BlockEntityBehaviour {
public static final BehaviourType<DoorControlBehaviour> TYPE = new BehaviourType<>();
public DoorControl mode;
public DoorControlBehaviour(SmartBlockEntity be) {
super(be);
mode = DoorControl.ALL;
}
public void set(DoorControl mode) {
if (this.mode == mode)
return;
this.mode = mode;
blockEntity.notifyUpdate();
}
@Override
public void write(CompoundTag nbt, boolean clientPacket) {
NBTHelper.writeEnum(nbt, "DoorControl", mode);
super.write(nbt, clientPacket);
}
@Override
public void read(CompoundTag nbt, boolean clientPacket) {
mode = NBTHelper.readEnum(nbt, "DoorControl", DoorControl.class);
super.read(nbt, clientPacket);
}
@Override
public BehaviourType<?> getType() {
return TYPE;
}
}

View File

@ -4,7 +4,7 @@ import com.jozufozu.flywheel.api.Material;
import com.jozufozu.flywheel.api.MaterialManager;
import com.jozufozu.flywheel.core.virtual.VirtualRenderWorld;
import com.mojang.math.Quaternion;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.AllPartialModels;
import com.simibubi.create.content.contraptions.components.actors.flwdata.ActorData;
import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext;
import com.simibubi.create.content.contraptions.components.structureMovement.render.ActorInstance;
@ -39,7 +39,7 @@ public class DrillActorInstance extends ActorInstance {
else
eulerY = facing.toYRot() + ((axis == Direction.Axis.X) ? 180 : 0);
drillHead = material.getModel(AllBlockPartials.DRILL_HEAD, state).createInstance();
drillHead = material.getModel(AllPartialModels.DRILL_HEAD, state).createInstance();
drillHead.setPosition(context.localPos)
.setBlockLight(localBlockLight())

View File

@ -2,8 +2,7 @@ package com.simibubi.create.content.contraptions.components.actors;
import com.jozufozu.flywheel.api.Instancer;
import com.jozufozu.flywheel.api.MaterialManager;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.content.contraptions.base.KineticBlockEntity;
import com.simibubi.create.AllPartialModels;
import com.simibubi.create.content.contraptions.base.SingleRotatingInstance;
import com.simibubi.create.content.contraptions.base.flwdata.RotatingData;
@ -11,9 +10,9 @@ import net.minecraft.core.Direction;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
public class DrillInstance extends SingleRotatingInstance {
public class DrillInstance extends SingleRotatingInstance<DrillBlockEntity> {
public DrillInstance(MaterialManager materialManager, KineticBlockEntity blockEntity) {
public DrillInstance(MaterialManager materialManager, DrillBlockEntity blockEntity) {
super(materialManager, blockEntity);
}
@ -21,6 +20,6 @@ public class DrillInstance extends SingleRotatingInstance {
protected Instancer<RotatingData> getModel() {
BlockState referenceState = blockEntity.getBlockState();
Direction facing = referenceState.getValue(BlockStateProperties.FACING);
return getRotatingMaterial().getModel(AllBlockPartials.DRILL_HEAD, referenceState, facing);
return getRotatingMaterial().getModel(AllPartialModels.DRILL_HEAD, referenceState, facing);
}
}

View File

@ -1,8 +1,7 @@
package com.simibubi.create.content.contraptions.components.actors;
import com.jozufozu.flywheel.core.virtual.VirtualRenderWorld;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.content.contraptions.base.KineticBlockEntity;
import com.simibubi.create.AllPartialModels;
import com.simibubi.create.content.contraptions.base.KineticBlockEntityRenderer;
import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext;
import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionMatrices;
@ -19,21 +18,21 @@ import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider;
import net.minecraft.core.Direction;
import net.minecraft.world.level.block.state.BlockState;
public class DrillRenderer extends KineticBlockEntityRenderer {
public class DrillRenderer extends KineticBlockEntityRenderer<DrillBlockEntity> {
public DrillRenderer(BlockEntityRendererProvider.Context context) {
super(context);
}
@Override
protected SuperByteBuffer getRotatedModel(KineticBlockEntity be, BlockState state) {
return CachedBufferer.partialFacing(AllBlockPartials.DRILL_HEAD, state);
protected SuperByteBuffer getRotatedModel(DrillBlockEntity be, BlockState state) {
return CachedBufferer.partialFacing(AllPartialModels.DRILL_HEAD, state);
}
public static void renderInContraption(MovementContext context, VirtualRenderWorld renderWorld,
ContraptionMatrices matrices, MultiBufferSource buffer) {
BlockState state = context.state;
SuperByteBuffer superBuffer = CachedBufferer.partial(AllBlockPartials.DRILL_HEAD, state);
SuperByteBuffer superBuffer = CachedBufferer.partial(AllPartialModels.DRILL_HEAD, state);
Direction facing = state.getValue(DrillBlock.FACING);
float speed = (float) (context.contraption.stalled

View File

@ -6,7 +6,7 @@ import com.jozufozu.flywheel.core.Materials;
import com.jozufozu.flywheel.core.PartialModel;
import com.jozufozu.flywheel.core.materials.model.ModelData;
import com.jozufozu.flywheel.core.virtual.VirtualRenderWorld;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.AllPartialModels;
import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext;
import com.simibubi.create.content.contraptions.components.structureMovement.render.ActorInstance;
import com.simibubi.create.foundation.utility.AngleHelper;
@ -48,7 +48,7 @@ public class HarvesterActorInstance extends ActorInstance {
}
protected PartialModel getRollingPartial() {
return AllBlockPartials.HARVESTER_BLADE;
return AllPartialModels.HARVESTER_BLADE;
}
protected Vec3 getRotationOffset() {

View File

@ -97,7 +97,7 @@ public class HarvesterMovementBehaviour implements MovementBehaviour {
MutableBoolean seedSubtracted = new MutableBoolean(notCropButCuttable);
BlockState state = stateVisited;
BlockHelper.destroyBlockAs(world, pos, null, item, effectChance, stack -> {
if (AllConfigs.SERVER.kinetics.harvesterReplants.get() && !seedSubtracted.getValue()
if (AllConfigs.server().kinetics.harvesterReplants.get() && !seedSubtracted.getValue()
&& stack.sameItem(new ItemStack(state.getBlock()))) {
stack.shrink(1);
seedSubtracted.setTrue();
@ -110,8 +110,8 @@ public class HarvesterMovementBehaviour implements MovementBehaviour {
}
public boolean isValidCrop(Level world, BlockPos pos, BlockState state) {
boolean harvestPartial = AllConfigs.SERVER.kinetics.harvestPartiallyGrown.get();
boolean replant = AllConfigs.SERVER.kinetics.harvesterReplants.get();
boolean harvestPartial = AllConfigs.server().kinetics.harvestPartiallyGrown.get();
boolean replant = AllConfigs.server().kinetics.harvesterReplants.get();
if (state.getBlock() instanceof CropBlock) {
CropBlock crop = (CropBlock) state.getBlock();
@ -175,7 +175,7 @@ public class HarvesterMovementBehaviour implements MovementBehaviour {
}
private BlockState cutCrop(Level world, BlockPos pos, BlockState state) {
if (!AllConfigs.SERVER.kinetics.harvesterReplants.get()) {
if (!AllConfigs.server().kinetics.harvesterReplants.get()) {
if (state.getFluidState()
.isEmpty())
return Blocks.AIR.defaultBlockState();

View File

@ -4,7 +4,7 @@ import static net.minecraft.world.level.block.state.properties.BlockStatePropert
import com.jozufozu.flywheel.core.virtual.VirtualRenderWorld;
import com.mojang.blaze3d.vertex.PoseStack;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.AllPartialModels;
import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext;
import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionMatrices;
import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionRenderDispatcher;
@ -33,7 +33,7 @@ public class HarvesterRenderer extends SafeBlockEntityRenderer<HarvesterBlockEnt
protected void renderSafe(HarvesterBlockEntity be, float partialTicks, PoseStack ms, MultiBufferSource buffer,
int light, int overlay) {
BlockState blockState = be.getBlockState();
SuperByteBuffer superBuffer = CachedBufferer.partial(AllBlockPartials.HARVESTER_BLADE, blockState);
SuperByteBuffer superBuffer = CachedBufferer.partial(AllPartialModels.HARVESTER_BLADE, blockState);
transform(be.getLevel(), blockState.getValue(HarvesterBlock.FACING), superBuffer, be.getAnimatedSpeed(), PIVOT);
superBuffer.light(light)
.renderInto(ms, buffer.getBuffer(RenderType.cutoutMipped()));
@ -43,7 +43,7 @@ public class HarvesterRenderer extends SafeBlockEntityRenderer<HarvesterBlockEnt
ContraptionMatrices matrices, MultiBufferSource buffers) {
BlockState blockState = context.state;
Direction facing = blockState.getValue(HORIZONTAL_FACING);
SuperByteBuffer superBuffer = CachedBufferer.partial(AllBlockPartials.HARVESTER_BLADE, blockState);
SuperByteBuffer superBuffer = CachedBufferer.partial(AllPartialModels.HARVESTER_BLADE, blockState);
float speed = (float) (!VecHelper.isVecPointingTowards(context.relativeMotion, facing.getOpposite())
? context.getAnimationSpeed()
: 0);

View File

@ -191,7 +191,7 @@ public abstract class PortableStorageInterfaceBlockEntity extends SmartBlockEnti
}
protected Integer getTransferTimeout() {
return AllConfigs.SERVER.logistics.psiTimeout.get();
return AllConfigs.server().logistics.psiTimeout.get();
}
@Override

View File

@ -7,8 +7,8 @@ import com.jozufozu.flywheel.core.PartialModel;
import com.jozufozu.flywheel.core.virtual.VirtualRenderWorld;
import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.blaze3d.vertex.VertexConsumer;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.AllPartialModels;
import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext;
import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionMatrices;
import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionRenderDispatcher;
@ -103,16 +103,16 @@ public class PortableStorageInterfaceRenderer extends SafeBlockEntityRenderer<Po
static PartialModel getMiddleForState(BlockState state, boolean lit) {
if (AllBlocks.PORTABLE_FLUID_INTERFACE.has(state))
return lit ? AllBlockPartials.PORTABLE_FLUID_INTERFACE_MIDDLE_POWERED
: AllBlockPartials.PORTABLE_FLUID_INTERFACE_MIDDLE;
return lit ? AllBlockPartials.PORTABLE_STORAGE_INTERFACE_MIDDLE_POWERED
: AllBlockPartials.PORTABLE_STORAGE_INTERFACE_MIDDLE;
return lit ? AllPartialModels.PORTABLE_FLUID_INTERFACE_MIDDLE_POWERED
: AllPartialModels.PORTABLE_FLUID_INTERFACE_MIDDLE;
return lit ? AllPartialModels.PORTABLE_STORAGE_INTERFACE_MIDDLE_POWERED
: AllPartialModels.PORTABLE_STORAGE_INTERFACE_MIDDLE;
}
static PartialModel getTopForState(BlockState state) {
if (AllBlocks.PORTABLE_FLUID_INTERFACE.has(state))
return AllBlockPartials.PORTABLE_FLUID_INTERFACE_TOP;
return AllBlockPartials.PORTABLE_STORAGE_INTERFACE_TOP;
return AllPartialModels.PORTABLE_FLUID_INTERFACE_TOP;
return AllPartialModels.PORTABLE_STORAGE_INTERFACE_TOP;
}
}

View File

@ -101,7 +101,7 @@ public class ContraptionControlsMovingInteraction extends MovingInteractionBehav
}
private void send(AbstractContraptionEntity contraptionEntity, ItemStack filter, boolean disable) {
AllPackets.channel.send(PacketDistributor.TRACKING_ENTITY.with(() -> contraptionEntity),
AllPackets.getChannel().send(PacketDistributor.TRACKING_ENTITY.with(() -> contraptionEntity),
new ContraptionDisableActorPacket(contraptionEntity.getId(), filter, !disable));
}
@ -118,7 +118,7 @@ public class ContraptionControlsMovingInteraction extends MovingInteractionBehav
if (efs.currentTargetY == contraption.clientYTarget)
return false;
AllPackets.channel.sendToServer(new ElevatorTargetFloorPacket(contraptionEntity, efs.currentTargetY));
AllPackets.getChannel().sendToServer(new ElevatorTargetFloorPacket(contraptionEntity, efs.currentTargetY));
if (contraption.presentBlockEntities.get(ctx.localPos)instanceof ContraptionControlsBlockEntity cte)
cte.pressButton();
return true;

View File

@ -6,8 +6,8 @@ import com.jozufozu.flywheel.core.virtual.VirtualRenderWorld;
import com.jozufozu.flywheel.util.transform.TransformStack;
import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.blaze3d.vertex.VertexConsumer;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.AllPartialModels;
import com.simibubi.create.content.contraptions.components.actors.controls.ContraptionControlsMovement.ElevatorFloorSelection;
import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext;
import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionMatrices;
@ -55,14 +55,14 @@ public class ContraptionControlsRenderer extends SmartBlockEntityRenderer<Contra
super.renderSafe(blockEntity, pt, ms, buffer, light, overlay);
VertexConsumer vc = buffer.getBuffer(RenderType.solid());
CachedBufferer.partialFacing(AllBlockPartials.CONTRAPTION_CONTROLS_BUTTON, blockState, facing)
CachedBufferer.partialFacing(AllPartialModels.CONTRAPTION_CONTROLS_BUTTON, blockState, facing)
.light(light)
.renderInto(ms, vc);
ms.popPose();
int i = (((int) blockEntity.indicator.getValue(pt) / 45) % 8) + 8;
CachedBufferer.partialFacing(AllBlockPartials.CONTRAPTION_CONTROLS_INDICATOR.get(i % 8), blockState, facing)
CachedBufferer.partialFacing(AllPartialModels.CONTRAPTION_CONTROLS_INDICATOR.get(i % 8), blockState, facing)
.light(light)
.renderInto(ms, vc);
}

View File

@ -3,8 +3,7 @@ package com.simibubi.create.content.contraptions.components.clock;
import com.jozufozu.flywheel.core.PartialModel;
import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.blaze3d.vertex.VertexConsumer;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.content.contraptions.base.KineticBlockEntity;
import com.simibubi.create.AllPartialModels;
import com.simibubi.create.content.contraptions.base.KineticBlockEntityRenderer;
import com.simibubi.create.content.contraptions.components.clock.CuckooClockBlockEntity.Animation;
import com.simibubi.create.foundation.render.CachedBufferer;
@ -18,44 +17,43 @@ import net.minecraft.core.Direction;
import net.minecraft.util.Mth;
import net.minecraft.world.level.block.state.BlockState;
public class CuckooClockRenderer extends KineticBlockEntityRenderer {
public class CuckooClockRenderer extends KineticBlockEntityRenderer<CuckooClockBlockEntity> {
public CuckooClockRenderer(BlockEntityRendererProvider.Context context) {
super(context);
}
@Override
protected void renderSafe(KineticBlockEntity be, float partialTicks, PoseStack ms, MultiBufferSource buffer,
protected void renderSafe(CuckooClockBlockEntity be, float partialTicks, PoseStack ms, MultiBufferSource buffer,
int light, int overlay) {
super.renderSafe(be, partialTicks, ms, buffer, light, overlay);
if (!(be instanceof CuckooClockBlockEntity))
return;
CuckooClockBlockEntity clock = (CuckooClockBlockEntity) be;
BlockState blockState = be.getBlockState();
Direction direction = blockState.getValue(CuckooClockBlock.HORIZONTAL_FACING);
VertexConsumer vb = buffer.getBuffer(RenderType.solid());
// Render Hands
SuperByteBuffer hourHand = CachedBufferer.partial(AllBlockPartials.CUCKOO_HOUR_HAND, blockState);
SuperByteBuffer minuteHand = CachedBufferer.partial(AllBlockPartials.CUCKOO_MINUTE_HAND, blockState);
float hourAngle = clock.hourHand.getValue(partialTicks);
float minuteAngle = clock.minuteHand.getValue(partialTicks);
SuperByteBuffer hourHand = CachedBufferer.partial(AllPartialModels.CUCKOO_HOUR_HAND, blockState);
SuperByteBuffer minuteHand = CachedBufferer.partial(AllPartialModels.CUCKOO_MINUTE_HAND, blockState);
float hourAngle = be.hourHand.getValue(partialTicks);
float minuteAngle = be.minuteHand.getValue(partialTicks);
rotateHand(hourHand, hourAngle, direction).light(light)
.renderInto(ms, vb);
rotateHand(minuteHand, minuteAngle, direction).light(light)
.renderInto(ms, vb);
// Doors
SuperByteBuffer leftDoor = CachedBufferer.partial(AllBlockPartials.CUCKOO_LEFT_DOOR, blockState);
SuperByteBuffer rightDoor = CachedBufferer.partial(AllBlockPartials.CUCKOO_RIGHT_DOOR, blockState);
SuperByteBuffer leftDoor = CachedBufferer.partial(AllPartialModels.CUCKOO_LEFT_DOOR, blockState);
SuperByteBuffer rightDoor = CachedBufferer.partial(AllPartialModels.CUCKOO_RIGHT_DOOR, blockState);
float angle = 0;
float offset = 0;
if (clock.animationType != null) {
float value = clock.animationProgress.getValue(partialTicks);
int step = clock.animationType == Animation.SURPRISE ? 3 : 15;
if (be.animationType != null) {
float value = be.animationProgress.getValue(partialTicks);
int step = be.animationType == Animation.SURPRISE ? 3 : 15;
for (int phase = 30; phase <= 60; phase += step) {
float local = value - phase;
if (local < -step / 3)
@ -76,9 +74,9 @@ public class CuckooClockRenderer extends KineticBlockEntityRenderer {
.renderInto(ms, vb);
// Figure
if (clock.animationType != Animation.NONE) {
if (be.animationType != Animation.NONE) {
offset = -(angle / 135) * 1 / 2f + 10 / 16f;
PartialModel partialModel = (clock.animationType == Animation.PIG ? AllBlockPartials.CUCKOO_PIG : AllBlockPartials.CUCKOO_CREEPER);
PartialModel partialModel = (be.animationType == Animation.PIG ? AllPartialModels.CUCKOO_PIG : AllPartialModels.CUCKOO_CREEPER);
SuperByteBuffer figure =
CachedBufferer.partial(partialModel, blockState);
figure.rotateCentered(Direction.UP, AngleHelper.rad(AngleHelper.horizontalAngle(direction.getCounterClockWise())));
@ -90,8 +88,8 @@ public class CuckooClockRenderer extends KineticBlockEntityRenderer {
}
@Override
protected SuperByteBuffer getRotatedModel(KineticBlockEntity be, BlockState state) {
return CachedBufferer.partialFacing(AllBlockPartials.SHAFT_HALF, state, state
protected SuperByteBuffer getRotatedModel(CuckooClockBlockEntity be, BlockState state) {
return CachedBufferer.partialFacing(AllPartialModels.SHAFT_HALF, state, state
.getValue(CuckooClockBlock.HORIZONTAL_FACING)
.getOpposite());
}

View File

@ -9,7 +9,7 @@ import com.jozufozu.flywheel.util.transform.TransformStack;
import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.blaze3d.vertex.VertexConsumer;
import com.mojang.math.Vector3f;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.AllPartialModels;
import com.simibubi.create.AllSpriteShifts;
import com.simibubi.create.content.contraptions.components.crafter.MechanicalCrafterBlockEntity.Phase;
import com.simibubi.create.content.contraptions.components.crafter.RecipeGridHandler.GroupedItems;
@ -170,7 +170,7 @@ public class MechanicalCrafterRenderer extends SafeBlockEntityRenderer<Mechanica
VertexConsumer vb = buffer.getBuffer(RenderType.solid());
if (!Backend.canUseInstancing(be.getLevel())) {
SuperByteBuffer superBuffer = CachedBufferer.partial(AllBlockPartials.SHAFTLESS_COGWHEEL, blockState);
SuperByteBuffer superBuffer = CachedBufferer.partial(AllPartialModels.SHAFTLESS_COGWHEEL, blockState);
standardKineticRotationTransform(superBuffer, be, light);
superBuffer.rotateCentered(Direction.UP, (float) (blockState.getValue(HORIZONTAL_FACING)
.getAxis() != Direction.Axis.X ? 0 : Math.PI / 2));
@ -182,15 +182,15 @@ public class MechanicalCrafterRenderer extends SafeBlockEntityRenderer<Mechanica
BlockPos pos = be.getBlockPos();
if ((be.covered || be.phase != Phase.IDLE) && be.phase != Phase.CRAFTING && be.phase != Phase.INSERTING) {
SuperByteBuffer lidBuffer = renderAndTransform(AllBlockPartials.MECHANICAL_CRAFTER_LID, blockState);
SuperByteBuffer lidBuffer = renderAndTransform(AllPartialModels.MECHANICAL_CRAFTER_LID, blockState);
lidBuffer.light(light)
.renderInto(ms, vb);
}
if (MechanicalCrafterBlock.isValidTarget(be.getLevel(), pos.relative(targetDirection), blockState)) {
SuperByteBuffer beltBuffer = renderAndTransform(AllBlockPartials.MECHANICAL_CRAFTER_BELT, blockState);
SuperByteBuffer beltBuffer = renderAndTransform(AllPartialModels.MECHANICAL_CRAFTER_BELT, blockState);
SuperByteBuffer beltFrameBuffer =
renderAndTransform(AllBlockPartials.MECHANICAL_CRAFTER_BELT_FRAME, blockState);
renderAndTransform(AllPartialModels.MECHANICAL_CRAFTER_BELT_FRAME, blockState);
if (be.phase == Phase.EXPORTING) {
int textureIndex = (int) ((be.getCountDownSpeed() / 128f * AnimationTickHolder.getTicks()));
@ -203,7 +203,7 @@ public class MechanicalCrafterRenderer extends SafeBlockEntityRenderer<Mechanica
.renderInto(ms, vb);
} else {
SuperByteBuffer arrowBuffer = renderAndTransform(AllBlockPartials.MECHANICAL_CRAFTER_ARROW, blockState);
SuperByteBuffer arrowBuffer = renderAndTransform(AllPartialModels.MECHANICAL_CRAFTER_ARROW, blockState);
arrowBuffer.light(light)
.renderInto(ms, vb);
}

View File

@ -144,7 +144,7 @@ public class RecipeGridHandler {
items.calcStats();
CraftingContainer craftinginventory = new MechanicalCraftingInventory(items);
ItemStack result = null;
if (AllConfigs.SERVER.recipes.allowRegularCraftingInCrafter.get())
if (AllConfigs.server().recipes.allowRegularCraftingInCrafter.get())
result = world.getRecipeManager()
.getRecipeFor(RecipeType.CRAFTING, craftinginventory, world)
.filter(r -> isRecipeAllowed(r, craftinginventory))
@ -165,7 +165,7 @@ public class RecipeGridHandler {
numItems++;
}
}
if (numItems > AllConfigs.SERVER.recipes.maxFireworkIngredientsInCrafter.get()) {
if (numItems > AllConfigs.server().recipes.maxFireworkIngredientsInCrafter.get()) {
return false;
}
}

View File

@ -6,16 +6,16 @@ import com.jozufozu.flywheel.api.Instancer;
import com.jozufozu.flywheel.api.MaterialManager;
import com.jozufozu.flywheel.util.transform.TransformStack;
import com.mojang.blaze3d.vertex.PoseStack;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.AllPartialModels;
import com.simibubi.create.content.contraptions.base.KineticBlockEntity;
import com.simibubi.create.content.contraptions.base.SingleRotatingInstance;
import com.simibubi.create.content.contraptions.base.flwdata.RotatingData;
import net.minecraft.core.Direction;
public class MechanicalCrafterInstance extends SingleRotatingInstance {
public class ShaftlessCogwheelInstance extends SingleRotatingInstance<KineticBlockEntity> {
public MechanicalCrafterInstance(MaterialManager materialManager, KineticBlockEntity blockEntity) {
public ShaftlessCogwheelInstance(MaterialManager materialManager, KineticBlockEntity blockEntity) {
super(materialManager, blockEntity);
}
@ -23,7 +23,7 @@ public class MechanicalCrafterInstance extends SingleRotatingInstance {
protected Instancer<RotatingData> getModel() {
Direction facing = blockState.getValue(MechanicalCrafterBlock.HORIZONTAL_FACING);
return getRotatingMaterial().getModel(AllBlockPartials.SHAFTLESS_COGWHEEL, blockState, facing, rotateToFace(facing));
return getRotatingMaterial().getModel(AllPartialModels.SHAFTLESS_COGWHEEL, blockState, facing, rotateToFace(facing));
}
private Supplier<PoseStack> rotateToFace(Direction facing) {

View File

@ -2,7 +2,7 @@ package com.simibubi.create.content.contraptions.components.crank;
import com.jozufozu.flywheel.core.PartialModel;
import com.simibubi.create.AllBlockEntityTypes;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.AllPartialModels;
import com.simibubi.create.AllShapes;
import com.simibubi.create.content.contraptions.base.DirectionalKineticBlock;
import com.simibubi.create.foundation.advancement.AllAdvancements;
@ -55,7 +55,7 @@ public class HandCrankBlock extends DirectionalKineticBlock
@OnlyIn(Dist.CLIENT)
public PartialModel getRenderedHandle() {
return AllBlockPartials.HAND_CRANK_HANDLE;
return AllPartialModels.HAND_CRANK_HANDLE;
}
public int getRotationSpeed() {
@ -74,7 +74,7 @@ public class HandCrankBlock extends DirectionalKineticBlock
return InteractionResult.PASS;
withBlockEntityDo(worldIn, pos, be -> be.turn(player.isShiftKeyDown()));
player.causeFoodExhaustion(getRotationSpeed() * AllConfigs.SERVER.kinetics.crankHungerMultiplier.getF());
player.causeFoodExhaustion(getRotationSpeed() * AllConfigs.server().kinetics.crankHungerMultiplier.getF());
if (player.getFoodData()
.getFoodLevel() == 0)

View File

@ -12,15 +12,13 @@ import net.minecraft.core.Direction;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
public class HandCrankInstance extends SingleRotatingInstance implements DynamicInstance {
public class HandCrankInstance extends SingleRotatingInstance<HandCrankBlockEntity> implements DynamicInstance {
private final HandCrankBlockEntity blockEntity;
private ModelData crank;
private Direction facing;
public HandCrankInstance(MaterialManager modelManager, HandCrankBlockEntity blockEntity) {
super(modelManager, blockEntity);
this.blockEntity = blockEntity;
Block block = blockState.getBlock();
PartialModel renderedHandle = null;

View File

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

View File

@ -218,7 +218,7 @@ public class CrushingWheelControllerBlockEntity extends SmartBlockEntity {
if (!(processingEntity instanceof ItemEntity)) {
Vec3 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();
int crusherDamage = AllConfigs.server().kinetics.crushingDamage.get();
if (processingEntity instanceof LivingEntity) {
if ((((LivingEntity) processingEntity).getHealth() - crusherDamage <= 0) // Takes LivingEntity instances

View File

@ -11,7 +11,7 @@ import com.jozufozu.flywheel.core.materials.model.ModelData;
import com.jozufozu.flywheel.core.virtual.VirtualRenderWorld;
import com.jozufozu.flywheel.util.transform.TransformStack;
import com.mojang.blaze3d.vertex.PoseStack;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.AllPartialModels;
import com.simibubi.create.content.contraptions.base.IRotate;
import com.simibubi.create.content.contraptions.base.KineticBlockEntityInstance;
import com.simibubi.create.content.contraptions.base.flwdata.RotatingData;
@ -61,7 +61,7 @@ public class DeployerActorInstance extends ActorInstance {
xRot = facing == Direction.UP ? 270 : facing == Direction.DOWN ? 90 : 0;
zRot = rotatePole ? 90 : 0;
pole = mat.getModel(AllBlockPartials.DEPLOYER_POLE, state).createInstance();
pole = mat.getModel(AllPartialModels.DEPLOYER_POLE, state).createInstance();
hand = mat.getModel(handPose, state).createInstance();
Direction.Axis axis = ((IRotate) state.getBlock()).getRotationAxis(state);

View File

@ -9,8 +9,8 @@ import java.util.List;
import javax.annotation.Nullable;
import com.jozufozu.flywheel.core.PartialModel;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.AllPartialModels;
import com.simibubi.create.AllRecipeTypes;
import com.simibubi.create.content.contraptions.base.IRotate.StressImpact;
import com.simibubi.create.content.contraptions.base.KineticBlockEntity;
@ -425,8 +425,8 @@ public class DeployerBlockEntity extends KineticBlockEntity {
@OnlyIn(Dist.CLIENT)
public PartialModel getHandPose() {
return mode == Mode.PUNCH ? AllBlockPartials.DEPLOYER_HAND_PUNCHING
: heldItem.isEmpty() ? AllBlockPartials.DEPLOYER_HAND_POINTING : AllBlockPartials.DEPLOYER_HAND_HOLDING;
return mode == Mode.PUNCH ? AllPartialModels.DEPLOYER_HAND_PUNCHING
: heldItem.isEmpty() ? AllPartialModels.DEPLOYER_HAND_POINTING : AllPartialModels.DEPLOYER_HAND_HOLDING;
}
@Override
@ -519,8 +519,8 @@ public class DeployerBlockEntity extends KineticBlockEntity {
}
if (state == State.RETRACTING)
progress = (timer - partialTicks * timerSpeed) / 1000f;
float handLength = handPose == AllBlockPartials.DEPLOYER_HAND_POINTING ? 0
: handPose == AllBlockPartials.DEPLOYER_HAND_HOLDING ? 4 / 16f : 3 / 16f;
float handLength = handPose == AllPartialModels.DEPLOYER_HAND_POINTING ? 0
: handPose == AllPartialModels.DEPLOYER_HAND_HOLDING ? 4 / 16f : 3 / 16f;
float distance = Math.min(Mth.clamp(progress, 0, 1) * (reach + handLength), 21 / 16f);
return distance;

View File

@ -141,7 +141,7 @@ public class DeployerFakePlayer extends FakePlayer {
return;
Mob mob = (Mob) entityLiving;
CKinetics.DeployerAggroSetting setting = AllConfigs.SERVER.kinetics.ignoreDeployerAttacks.get();
CKinetics.DeployerAggroSetting setting = AllConfigs.server().kinetics.ignoreDeployerAttacks.get();
switch (setting) {
case ALL:

View File

@ -9,8 +9,7 @@ import com.jozufozu.flywheel.api.instance.TickableInstance;
import com.jozufozu.flywheel.core.PartialModel;
import com.jozufozu.flywheel.core.materials.oriented.OrientedData;
import com.mojang.math.Quaternion;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.content.contraptions.base.KineticBlockEntity;
import com.simibubi.create.AllPartialModels;
import com.simibubi.create.content.contraptions.relays.encased.ShaftInstance;
import com.simibubi.create.foundation.utility.AngleHelper;
import com.simibubi.create.foundation.utility.AnimationTickHolder;
@ -20,9 +19,8 @@ import net.minecraft.core.Direction;
import net.minecraft.core.Vec3i;
import net.minecraft.util.Mth;
public class DeployerInstance extends ShaftInstance implements DynamicInstance, TickableInstance {
public class DeployerInstance extends ShaftInstance<DeployerBlockEntity> implements DynamicInstance, TickableInstance {
final DeployerBlockEntity blockEntity;
final Direction facing;
final float yRot;
final float xRot;
@ -35,10 +33,9 @@ public class DeployerInstance extends ShaftInstance implements DynamicInstance,
PartialModel currentHand;
float progress;
public DeployerInstance(MaterialManager materialManager, KineticBlockEntity blockEntity) {
public DeployerInstance(MaterialManager materialManager, DeployerBlockEntity blockEntity) {
super(materialManager, blockEntity);
this.blockEntity = (DeployerBlockEntity) super.blockEntity;
facing = blockState.getValue(FACING);
boolean rotatePole = blockState.getValue(AXIS_ALONG_FIRST_COORDINATE) ^ facing.getAxis() == Direction.Axis.Z;
@ -47,7 +44,7 @@ public class DeployerInstance extends ShaftInstance implements DynamicInstance,
xRot = facing == Direction.UP ? 270 : facing == Direction.DOWN ? 90 : 0;
zRot = rotatePole ? 90 : 0;
pole = getOrientedMaterial().getModel(AllBlockPartials.DEPLOYER_POLE, blockState).createInstance();
pole = getOrientedMaterial().getModel(AllPartialModels.DEPLOYER_POLE, blockState).createInstance();
currentHand = this.blockEntity.getHandPose();
@ -107,8 +104,8 @@ public class DeployerInstance extends ShaftInstance implements DynamicInstance,
}
private void updatePosition() {
float handLength = currentHand == AllBlockPartials.DEPLOYER_HAND_POINTING ? 0
: currentHand == AllBlockPartials.DEPLOYER_HAND_HOLDING ? 4 / 16f : 3 / 16f;
float handLength = currentHand == AllPartialModels.DEPLOYER_HAND_POINTING ? 0
: currentHand == AllPartialModels.DEPLOYER_HAND_HOLDING ? 4 / 16f : 3 / 16f;
float distance = Math.min(Mth.clamp(progress, 0, 1) * (blockEntity.reach + handLength), 21 / 16f);
Vec3i facingVec = facing.getNormal();
BlockPos blockPos = getInstancePosition();

View File

@ -10,8 +10,8 @@ import com.jozufozu.flywheel.util.transform.TransformStack;
import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.blaze3d.vertex.VertexConsumer;
import com.mojang.math.Vector3f;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.AllPartialModels;
import com.simibubi.create.content.contraptions.base.IRotate;
import com.simibubi.create.content.contraptions.base.KineticBlockEntity;
import com.simibubi.create.content.contraptions.base.KineticBlockEntityRenderer;
@ -120,7 +120,7 @@ public class DeployerRenderer extends SafeBlockEntityRenderer<DeployerBlockEntit
BlockState blockState = be.getBlockState();
Vec3 offset = getHandOffset(be, partialTicks, blockState);
SuperByteBuffer pole = CachedBufferer.partial(AllBlockPartials.DEPLOYER_POLE, blockState);
SuperByteBuffer pole = CachedBufferer.partial(AllPartialModels.DEPLOYER_POLE, blockState);
SuperByteBuffer hand = CachedBufferer.partial(be.getHandPose(), blockState);
transform(pole.translate(offset.x, offset.y, offset.z), blockState, true)
@ -167,7 +167,7 @@ public class DeployerRenderer extends SafeBlockEntityRenderer<DeployerBlockEntit
speed = 0;
SuperByteBuffer shaft = CachedBufferer.block(AllBlocks.SHAFT.getDefaultState());
SuperByteBuffer pole = CachedBufferer.partial(AllBlockPartials.DEPLOYER_POLE, blockState);
SuperByteBuffer pole = CachedBufferer.partial(AllPartialModels.DEPLOYER_POLE, blockState);
SuperByteBuffer hand = CachedBufferer.partial(handPose, blockState);
double factor;
@ -225,7 +225,7 @@ public class DeployerRenderer extends SafeBlockEntityRenderer<DeployerBlockEntit
}
static PartialModel getHandPose(DeployerBlockEntity.Mode mode) {
return mode == DeployerBlockEntity.Mode.PUNCH ? AllBlockPartials.DEPLOYER_HAND_PUNCHING : AllBlockPartials.DEPLOYER_HAND_POINTING;
return mode == DeployerBlockEntity.Mode.PUNCH ? AllPartialModels.DEPLOYER_HAND_PUNCHING : AllPartialModels.DEPLOYER_HAND_POINTING;
}
}

View File

@ -69,7 +69,7 @@ public class AirCurrent {
Vec3 pos = VecHelper.getCenterOf(source.getAirCurrentPos())
.add(Vec3.atLowerCornerOf(facing.getNormal())
.scale(offset));
if (world.random.nextFloat() < AllConfigs.CLIENT.fanParticleDensity.get())
if (world.random.nextFloat() < AllConfigs.client().fanParticleDensity.get())
world.addParticle(new AirFlowParticleData(source.getAirCurrentPos()), pos.x, pos.y, pos.z, 0, 0, 0);
}

View File

@ -128,7 +128,7 @@ public class EncasedFanBlockEntity extends KineticBlockEntity implements IAirCur
boolean server = !level.isClientSide || isVirtual();
if (server && airCurrentUpdateCooldown-- <= 0) {
airCurrentUpdateCooldown = AllConfigs.SERVER.kinetics.fanBlockCheckRate.get();
airCurrentUpdateCooldown = AllConfigs.server().kinetics.fanBlockCheckRate.get();
updateAirFlow = true;
}

View File

@ -5,8 +5,7 @@ import static net.minecraft.world.level.block.state.properties.BlockStatePropert
import com.jozufozu.flywheel.backend.Backend;
import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.blaze3d.vertex.VertexConsumer;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.content.contraptions.base.KineticBlockEntity;
import com.simibubi.create.AllPartialModels;
import com.simibubi.create.content.contraptions.base.KineticBlockEntityRenderer;
import com.simibubi.create.foundation.render.CachedBufferer;
import com.simibubi.create.foundation.render.SuperByteBuffer;
@ -19,14 +18,14 @@ import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider;
import net.minecraft.core.Direction;
import net.minecraft.util.Mth;
public class EncasedFanRenderer extends KineticBlockEntityRenderer {
public class EncasedFanRenderer extends KineticBlockEntityRenderer<EncasedFanBlockEntity> {
public EncasedFanRenderer(BlockEntityRendererProvider.Context context) {
super(context);
}
@Override
protected void renderSafe(KineticBlockEntity be, float partialTicks, PoseStack ms, MultiBufferSource buffer,
protected void renderSafe(EncasedFanBlockEntity be, float partialTicks, PoseStack ms, MultiBufferSource buffer,
int light, int overlay) {
if (Backend.canUseInstancing(be.getLevel())) return;
@ -38,9 +37,9 @@ public class EncasedFanRenderer extends KineticBlockEntityRenderer {
int lightInFront = LevelRenderer.getLightColor(be.getLevel(), be.getBlockPos().relative(direction));
SuperByteBuffer shaftHalf =
CachedBufferer.partialFacing(AllBlockPartials.SHAFT_HALF, be.getBlockState(), direction.getOpposite());
CachedBufferer.partialFacing(AllPartialModels.SHAFT_HALF, be.getBlockState(), direction.getOpposite());
SuperByteBuffer fanInner =
CachedBufferer.partialFacing(AllBlockPartials.ENCASED_FAN_INNER, be.getBlockState(), direction.getOpposite());
CachedBufferer.partialFacing(AllPartialModels.ENCASED_FAN_INNER, be.getBlockState(), direction.getOpposite());
float time = AnimationTickHolder.getRenderTime(be.getLevel());
float speed = be.getSpeed() * 5;

View File

@ -3,7 +3,7 @@ package com.simibubi.create.content.contraptions.components.fan;
import static net.minecraft.world.level.block.state.properties.BlockStateProperties.FACING;
import com.jozufozu.flywheel.api.MaterialManager;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.AllPartialModels;
import com.simibubi.create.content.contraptions.base.KineticBlockEntityInstance;
import com.simibubi.create.content.contraptions.base.flwdata.RotatingData;
import com.simibubi.create.foundation.render.AllMaterialSpecs;
@ -25,10 +25,10 @@ public class FanInstance extends KineticBlockEntityInstance<EncasedFanBlockEntit
direction = blockState.getValue(FACING);
opposite = direction.getOpposite();
shaft = getRotatingMaterial().getModel(AllBlockPartials.SHAFT_HALF, blockState, opposite).createInstance();
shaft = getRotatingMaterial().getModel(AllPartialModels.SHAFT_HALF, blockState, opposite).createInstance();
fan = materialManager.defaultCutout()
.material(AllMaterialSpecs.ROTATING)
.getModel(AllBlockPartials.ENCASED_FAN_INNER, blockState, opposite)
.getModel(AllPartialModels.ENCASED_FAN_INNER, blockState, opposite)
.createInstance();
setup(shaft);

View File

@ -30,7 +30,7 @@ public interface IAirCurrentSource {
default float getMaxDistance() {
float speed = Math.abs(this.getSpeed());
CKinetics config = AllConfigs.SERVER.kinetics;
CKinetics config = AllConfigs.server().kinetics;
float distanceFactor = Math.min(speed / config.fanRotationArgmax.get(), 1);
float pushDistance = Mth.lerp(distanceFactor, 3, config.fanPushDistance.get());
float pullDistance = Mth.lerp(distanceFactor, 3f, config.fanPullDistance.get());

View File

@ -77,7 +77,7 @@ public class NozzleBlockEntity extends SmartBlockEntity {
Vec3 center = VecHelper.getCenterOf(worldPosition);
if (level.isClientSide && range != 0) {
if (level.random.nextInt(
Mth.clamp((AllConfigs.SERVER.kinetics.fanPushDistance.get() - (int) range), 1, 10)) == 0) {
Mth.clamp((AllConfigs.server().kinetics.fanPushDistance.get() - (int) range), 1, 10)) == 0) {
Vec3 start = VecHelper.offsetRandomly(center, level.random, pushing ? 1 : range / 2);
Vec3 motion = center.subtract(start)
.normalize()

View File

@ -12,13 +12,13 @@ import com.simibubi.create.foundation.utility.AnimationTickHolder;
import net.minecraft.core.Direction;
public class FlyWheelInstance extends KineticBlockEntityInstance<FlywheelBlockEntity> implements DynamicInstance {
public class FlywheelInstance extends KineticBlockEntityInstance<FlywheelBlockEntity> implements DynamicInstance {
protected final RotatingData shaft;
protected final ModelData wheel;
protected float lastAngle = Float.NaN;
public FlyWheelInstance(MaterialManager materialManager, FlywheelBlockEntity blockEntity) {
public FlywheelInstance(MaterialManager materialManager, FlywheelBlockEntity blockEntity) {
super(materialManager, blockEntity);
shaft = setup(getRotatingMaterial().getModel(shaft())

View File

@ -3,7 +3,6 @@ package com.simibubi.create.content.contraptions.components.flywheel;
import com.jozufozu.flywheel.backend.Backend;
import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.blaze3d.vertex.VertexConsumer;
import com.simibubi.create.content.contraptions.base.KineticBlockEntity;
import com.simibubi.create.content.contraptions.base.KineticBlockEntityRenderer;
import com.simibubi.create.foundation.render.CachedBufferer;
import com.simibubi.create.foundation.render.SuperByteBuffer;
@ -14,14 +13,14 @@ import net.minecraft.client.renderer.RenderType;
import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider;
import net.minecraft.world.level.block.state.BlockState;
public class FlywheelRenderer extends KineticBlockEntityRenderer {
public class FlywheelRenderer extends KineticBlockEntityRenderer<FlywheelBlockEntity> {
public FlywheelRenderer(BlockEntityRendererProvider.Context context) {
super(context);
}
@Override
protected void renderSafe(KineticBlockEntity be, float partialTicks, PoseStack ms, MultiBufferSource buffer,
protected void renderSafe(FlywheelBlockEntity be, float partialTicks, PoseStack ms, MultiBufferSource buffer,
int light, int overlay) {
super.renderSafe(be, partialTicks, ms, buffer, light, overlay);
@ -29,16 +28,15 @@ public class FlywheelRenderer extends KineticBlockEntityRenderer {
return;
BlockState blockState = be.getBlockState();
FlywheelBlockEntity wte = (FlywheelBlockEntity) be;
float speed = wte.visualSpeed.getValue(partialTicks) * 3 / 10f;
float angle = wte.angle + speed * partialTicks;
float speed = be.visualSpeed.getValue(partialTicks) * 3 / 10f;
float angle = be.angle + speed * partialTicks;
VertexConsumer vb = buffer.getBuffer(RenderType.solid());
renderFlywheel(be, ms, light, blockState, angle, vb);
}
private void renderFlywheel(KineticBlockEntity be, PoseStack ms, int light, BlockState blockState, float angle,
private void renderFlywheel(FlywheelBlockEntity be, PoseStack ms, int light, BlockState blockState, float angle,
VertexConsumer vb) {
SuperByteBuffer wheel = CachedBufferer.block(blockState);
kineticRotationTransform(wheel, be, getRotationAxisOf(be), AngleHelper.rad(angle), light);
@ -46,7 +44,7 @@ public class FlywheelRenderer extends KineticBlockEntityRenderer {
}
@Override
protected BlockState getRenderedBlockState(KineticBlockEntity be) {
protected BlockState getRenderedBlockState(FlywheelBlockEntity be) {
return shaft(getRotationAxisOf(be));
}

View File

@ -2,19 +2,18 @@ package com.simibubi.create.content.contraptions.components.millstone;
import com.jozufozu.flywheel.api.Instancer;
import com.jozufozu.flywheel.api.MaterialManager;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.content.contraptions.base.KineticBlockEntity;
import com.simibubi.create.AllPartialModels;
import com.simibubi.create.content.contraptions.base.SingleRotatingInstance;
import com.simibubi.create.content.contraptions.base.flwdata.RotatingData;
public class MillStoneCogInstance extends SingleRotatingInstance {
public class MillstoneCogInstance extends SingleRotatingInstance<MillstoneBlockEntity> {
public MillStoneCogInstance(MaterialManager materialManager, KineticBlockEntity blockEntity) {
public MillstoneCogInstance(MaterialManager materialManager, MillstoneBlockEntity blockEntity) {
super(materialManager, blockEntity);
}
@Override
protected Instancer<RotatingData> getModel() {
return getRotatingMaterial().getModel(AllBlockPartials.MILLSTONE_COG, blockEntity.getBlockState());
return getRotatingMaterial().getModel(AllPartialModels.MILLSTONE_COG, blockEntity.getBlockState());
}
}

View File

@ -1,7 +1,6 @@
package com.simibubi.create.content.contraptions.components.millstone;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.content.contraptions.base.KineticBlockEntity;
import com.simibubi.create.AllPartialModels;
import com.simibubi.create.content.contraptions.base.KineticBlockEntityRenderer;
import com.simibubi.create.foundation.render.CachedBufferer;
import com.simibubi.create.foundation.render.SuperByteBuffer;
@ -9,15 +8,15 @@ import com.simibubi.create.foundation.render.SuperByteBuffer;
import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider;
import net.minecraft.world.level.block.state.BlockState;
public class MillstoneRenderer extends KineticBlockEntityRenderer {
public class MillstoneRenderer extends KineticBlockEntityRenderer<MillstoneBlockEntity> {
public MillstoneRenderer(BlockEntityRendererProvider.Context context) {
super(context);
}
@Override
protected SuperByteBuffer getRotatedModel(KineticBlockEntity be, BlockState state) {
return CachedBufferer.partial(AllBlockPartials.MILLSTONE_COG, state);
protected SuperByteBuffer getRotatedModel(MillstoneBlockEntity be, BlockState state) {
return CachedBufferer.partial(AllPartialModels.MILLSTONE_COG, state);
}
}

View File

@ -218,7 +218,7 @@ public class MechanicalMixerBlockEntity extends BasinOperatingBlockEntity {
protected List<Recipe<?>> getMatchingRecipes() {
List<Recipe<?>> matchingRecipes = super.getMatchingRecipes();
if (!AllConfigs.SERVER.recipes.allowBrewingInMixer.get())
if (!AllConfigs.server().recipes.allowBrewingInMixer.get())
return matchingRecipes;
Optional<BasinBlockEntity> basin = getBasin();
@ -254,7 +254,7 @@ public class MechanicalMixerBlockEntity extends BasinOperatingBlockEntity {
@Override
protected <C extends Container> boolean matchStaticFilters(Recipe<C> r) {
return ((r instanceof CraftingRecipe && !(r instanceof IShapedRecipe<?>)
&& AllConfigs.SERVER.recipes.allowShapelessInMixer.get() && r.getIngredients()
&& AllConfigs.server().recipes.allowShapelessInMixer.get() && r.getIngredients()
.size() > 1
&& !MechanicalPressBlockEntity.canCompress(r)) && !AllRecipeTypes.shouldIgnoreInAutomation(r)
|| r.getType() == AllRecipeTypes.MIXING.getType());

View File

@ -3,8 +3,7 @@ package com.simibubi.create.content.contraptions.components.mixer;
import com.jozufozu.flywheel.backend.Backend;
import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.blaze3d.vertex.VertexConsumer;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.content.contraptions.base.KineticBlockEntity;
import com.simibubi.create.AllPartialModels;
import com.simibubi.create.content.contraptions.base.KineticBlockEntityRenderer;
import com.simibubi.create.foundation.render.CachedBufferer;
import com.simibubi.create.foundation.render.SuperByteBuffer;
@ -16,42 +15,41 @@ import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider;
import net.minecraft.core.Direction;
import net.minecraft.world.level.block.state.BlockState;
public class MechanicalMixerRenderer extends KineticBlockEntityRenderer {
public class MechanicalMixerRenderer extends KineticBlockEntityRenderer<MechanicalMixerBlockEntity> {
public MechanicalMixerRenderer(BlockEntityRendererProvider.Context context) {
super(context);
}
@Override
public boolean shouldRenderOffScreen(KineticBlockEntity be) {
public boolean shouldRenderOffScreen(MechanicalMixerBlockEntity be) {
return true;
}
@Override
protected void renderSafe(KineticBlockEntity be, float partialTicks, PoseStack ms, MultiBufferSource buffer,
protected void renderSafe(MechanicalMixerBlockEntity be, float partialTicks, PoseStack ms, MultiBufferSource buffer,
int light, int overlay) {
if (Backend.canUseInstancing(be.getLevel())) return;
BlockState blockState = be.getBlockState();
MechanicalMixerBlockEntity mixer = (MechanicalMixerBlockEntity) be;
VertexConsumer vb = buffer.getBuffer(RenderType.solid());
SuperByteBuffer superBuffer = CachedBufferer.partial(AllBlockPartials.SHAFTLESS_COGWHEEL, blockState);
SuperByteBuffer superBuffer = CachedBufferer.partial(AllPartialModels.SHAFTLESS_COGWHEEL, blockState);
standardKineticRotationTransform(superBuffer, be, light).renderInto(ms, vb);
float renderedHeadOffset = mixer.getRenderedHeadOffset(partialTicks);
float speed = mixer.getRenderedHeadRotationSpeed(partialTicks);
float renderedHeadOffset = be.getRenderedHeadOffset(partialTicks);
float speed = be.getRenderedHeadRotationSpeed(partialTicks);
float time = AnimationTickHolder.getRenderTime(be.getLevel());
float angle = ((time * speed * 6 / 10f) % 360) / 180 * (float) Math.PI;
SuperByteBuffer poleRender = CachedBufferer.partial(AllBlockPartials.MECHANICAL_MIXER_POLE, blockState);
SuperByteBuffer poleRender = CachedBufferer.partial(AllPartialModels.MECHANICAL_MIXER_POLE, blockState);
poleRender.translate(0, -renderedHeadOffset, 0)
.light(light)
.renderInto(ms, vb);
SuperByteBuffer headRender = CachedBufferer.partial(AllBlockPartials.MECHANICAL_MIXER_HEAD, blockState);
SuperByteBuffer headRender = CachedBufferer.partial(AllPartialModels.MECHANICAL_MIXER_HEAD, blockState);
headRender.rotateCentered(Direction.UP, angle)
.translate(0, -renderedHeadOffset, 0)
.light(light)

View File

@ -4,7 +4,7 @@ import com.jozufozu.flywheel.api.Instancer;
import com.jozufozu.flywheel.api.MaterialManager;
import com.jozufozu.flywheel.api.instance.DynamicInstance;
import com.jozufozu.flywheel.core.materials.oriented.OrientedData;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.AllPartialModels;
import com.simibubi.create.content.contraptions.base.flwdata.RotatingData;
import com.simibubi.create.content.contraptions.relays.encased.EncasedCogInstance;
import com.simibubi.create.foundation.render.AllMaterialSpecs;
@ -22,13 +22,13 @@ public class MixerInstance extends EncasedCogInstance implements DynamicInstance
super(materialManager, blockEntity, false);
this.mixer = blockEntity;
mixerHead = getRotatingMaterial().getModel(AllBlockPartials.MECHANICAL_MIXER_HEAD, blockState)
mixerHead = getRotatingMaterial().getModel(AllPartialModels.MECHANICAL_MIXER_HEAD, blockState)
.createInstance();
mixerHead.setRotationAxis(Direction.Axis.Y);
mixerPole = getOrientedMaterial()
.getModel(AllBlockPartials.MECHANICAL_MIXER_POLE, blockState)
.getModel(AllPartialModels.MECHANICAL_MIXER_POLE, blockState)
.createInstance();
@ -42,7 +42,7 @@ public class MixerInstance extends EncasedCogInstance implements DynamicInstance
protected Instancer<RotatingData> getCogModel() {
return materialManager.defaultSolid()
.material(AllMaterialSpecs.ROTATING)
.getModel(AllBlockPartials.SHAFTLESS_COGWHEEL, blockEntity.getBlockState());
.getModel(AllPartialModels.SHAFTLESS_COGWHEEL, blockEntity.getBlockState());
}
@Override

View File

@ -27,7 +27,7 @@ public class CreativeMotorBlockEntity extends GeneratingKineticBlockEntity {
@Override
public void addBehaviours(List<BlockEntityBehaviour> behaviours) {
super.addBehaviours(behaviours);
Integer max = AllConfigs.SERVER.kinetics.maxMotorSpeed.get();
Integer max = AllConfigs.server().kinetics.maxMotorSpeed.get();
CenteredSideValueBoxTransform slot = new CenteredSideValueBoxTransform(
(motor, side) -> motor.getValue(CreativeMotorBlock.FACING) == side.getOpposite());

View File

@ -1,7 +1,6 @@
package com.simibubi.create.content.contraptions.components.motor;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.content.contraptions.base.KineticBlockEntity;
import com.simibubi.create.AllPartialModels;
import com.simibubi.create.content.contraptions.base.KineticBlockEntityRenderer;
import com.simibubi.create.foundation.render.CachedBufferer;
import com.simibubi.create.foundation.render.SuperByteBuffer;
@ -9,15 +8,15 @@ import com.simibubi.create.foundation.render.SuperByteBuffer;
import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider;
import net.minecraft.world.level.block.state.BlockState;
public class CreativeMotorRenderer extends KineticBlockEntityRenderer {
public class CreativeMotorRenderer extends KineticBlockEntityRenderer<CreativeMotorBlockEntity> {
public CreativeMotorRenderer(BlockEntityRendererProvider.Context context) {
super(context);
}
@Override
protected SuperByteBuffer getRotatedModel(KineticBlockEntity be, BlockState state) {
return CachedBufferer.partialFacing(AllBlockPartials.SHAFT_HALF, state);
protected SuperByteBuffer getRotatedModel(CreativeMotorBlockEntity be, BlockState state) {
return CachedBufferer.partialFacing(AllPartialModels.SHAFT_HALF, state);
}
}

View File

@ -192,7 +192,7 @@ public class MechanicalPressBlockEntity extends BasinOperatingBlockEntity implem
}
public static <C extends Container> boolean canCompress(Recipe<C> recipe) {
if (!(recipe instanceof CraftingRecipe) || !AllConfigs.SERVER.recipes.allowShapedSquareInPress.get())
if (!(recipe instanceof CraftingRecipe) || !AllConfigs.server().recipes.allowShapedSquareInPress.get())
return false;
NonNullList<Ingredient> ingredients = recipe.getIngredients();
return (ingredients.size() == 4 || ingredients.size() == 9) && ItemHelper.matchAllIngredients(ingredients);
@ -212,7 +212,7 @@ public class MechanicalPressBlockEntity extends BasinOperatingBlockEntity implem
@Override
public boolean canProcessInBulk() {
return AllConfigs.SERVER.recipes.bulkPressing.get();
return AllConfigs.server().recipes.bulkPressing.get();
}
@Override

View File

@ -4,8 +4,7 @@ import static net.minecraft.world.level.block.state.properties.BlockStatePropert
import com.jozufozu.flywheel.backend.Backend;
import com.mojang.blaze3d.vertex.PoseStack;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.content.contraptions.base.KineticBlockEntity;
import com.simibubi.create.AllPartialModels;
import com.simibubi.create.content.contraptions.base.KineticBlockEntityRenderer;
import com.simibubi.create.foundation.render.CachedBufferer;
import com.simibubi.create.foundation.render.SuperByteBuffer;
@ -15,19 +14,19 @@ import net.minecraft.client.renderer.RenderType;
import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider;
import net.minecraft.world.level.block.state.BlockState;
public class MechanicalPressRenderer extends KineticBlockEntityRenderer {
public class MechanicalPressRenderer extends KineticBlockEntityRenderer<MechanicalPressBlockEntity> {
public MechanicalPressRenderer(BlockEntityRendererProvider.Context context) {
super(context);
}
@Override
public boolean shouldRenderOffScreen(KineticBlockEntity be) {
public boolean shouldRenderOffScreen(MechanicalPressBlockEntity be) {
return true;
}
@Override
protected void renderSafe(KineticBlockEntity be, float partialTicks, PoseStack ms, MultiBufferSource buffer,
protected void renderSafe(MechanicalPressBlockEntity be, float partialTicks, PoseStack ms, MultiBufferSource buffer,
int light, int overlay) {
super.renderSafe(be, partialTicks, ms, buffer, light, overlay);
@ -35,11 +34,11 @@ public class MechanicalPressRenderer extends KineticBlockEntityRenderer {
return;
BlockState blockState = be.getBlockState();
PressingBehaviour pressingBehaviour = ((MechanicalPressBlockEntity) be).getPressingBehaviour();
PressingBehaviour pressingBehaviour = be.getPressingBehaviour();
float renderedHeadOffset =
pressingBehaviour.getRenderedHeadOffset(partialTicks) * pressingBehaviour.mode.headOffset;
SuperByteBuffer headRender = CachedBufferer.partialFacing(AllBlockPartials.MECHANICAL_PRESS_HEAD, blockState,
SuperByteBuffer headRender = CachedBufferer.partialFacing(AllPartialModels.MECHANICAL_PRESS_HEAD, blockState,
blockState.getValue(HORIZONTAL_FACING));
headRender.translate(0, -renderedHeadOffset, 0)
.light(light)
@ -47,7 +46,7 @@ public class MechanicalPressRenderer extends KineticBlockEntityRenderer {
}
@Override
protected BlockState getRenderedBlockState(KineticBlockEntity be) {
protected BlockState getRenderedBlockState(MechanicalPressBlockEntity be) {
return shaft(getRotationAxisOf(be));
}

View File

@ -6,23 +6,21 @@ import com.jozufozu.flywheel.core.Materials;
import com.jozufozu.flywheel.core.materials.oriented.OrientedData;
import com.mojang.math.Quaternion;
import com.mojang.math.Vector3f;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.AllPartialModels;
import com.simibubi.create.content.contraptions.relays.encased.ShaftInstance;
import com.simibubi.create.foundation.utility.AngleHelper;
import com.simibubi.create.foundation.utility.AnimationTickHolder;
public class PressInstance extends ShaftInstance implements DynamicInstance {
public class PressInstance extends ShaftInstance<MechanicalPressBlockEntity> implements DynamicInstance {
private final OrientedData pressHead;
private final MechanicalPressBlockEntity press;
public PressInstance(MaterialManager materialManager, MechanicalPressBlockEntity blockEntity) {
super(materialManager, blockEntity);
press = blockEntity;
pressHead = materialManager.defaultSolid()
.material(Materials.ORIENTED)
.getModel(AllBlockPartials.MECHANICAL_PRESS_HEAD, blockState)
.getModel(AllPartialModels.MECHANICAL_PRESS_HEAD, blockState)
.createInstance();
Quaternion q = Vector3f.YP
@ -39,7 +37,7 @@ public class PressInstance extends ShaftInstance implements DynamicInstance {
}
private void transformModels() {
float renderedHeadOffset = getRenderedHeadOffset(press);
float renderedHeadOffset = getRenderedHeadOffset(blockEntity);
pressHead.setPosition(getInstancePosition())
.nudge(0, -renderedHeadOffset, 0);

View File

@ -86,7 +86,7 @@ public class SawBlockEntity extends BlockBreakingKineticBlockEntity {
public SawBlockEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) {
super(type, pos, state);
inventory = new ProcessingInventory(this::start).withSlotLimit(!AllConfigs.SERVER.recipes.bulkCutting.get());
inventory = new ProcessingInventory(this::start).withSlotLimit(!AllConfigs.server().recipes.bulkCutting.get());
inventory.remainingTime = -1;
recipeIndex = 0;
invProvider = LazyOptional.of(() -> inventory);
@ -366,8 +366,8 @@ public class SawBlockEntity extends BlockBreakingKineticBlockEntity {
return ImmutableList.of(assemblyRecipe.get());
Predicate<Recipe<?>> types = RecipeConditions.isOfType(AllRecipeTypes.CUTTING.getType(),
AllConfigs.SERVER.recipes.allowStonecuttingOnSaw.get() ? RecipeType.STONECUTTING : null,
AllConfigs.SERVER.recipes.allowWoodcuttingOnSaw.get() ? woodcuttingRecipeType.get() : null);
AllConfigs.server().recipes.allowStonecuttingOnSaw.get() ? RecipeType.STONECUTTING : null,
AllConfigs.server().recipes.allowWoodcuttingOnSaw.get() ? woodcuttingRecipeType.get() : null);
List<Recipe<?>> startedSearch = RecipeFinder.get(cuttingRecipesKey, level, types);
return startedSearch.stream()

View File

@ -2,8 +2,7 @@ package com.simibubi.create.content.contraptions.components.saw;
import com.jozufozu.flywheel.api.Instancer;
import com.jozufozu.flywheel.api.MaterialManager;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.content.contraptions.base.KineticBlockEntity;
import com.simibubi.create.AllPartialModels;
import com.simibubi.create.content.contraptions.base.SingleRotatingInstance;
import com.simibubi.create.content.contraptions.base.flwdata.RotatingData;
@ -12,9 +11,9 @@ import net.minecraft.world.level.block.Rotation;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
public class SawInstance extends SingleRotatingInstance {
public class SawInstance extends SingleRotatingInstance<SawBlockEntity> {
public SawInstance(MaterialManager materialManager, KineticBlockEntity blockEntity) {
public SawInstance(MaterialManager materialManager, SawBlockEntity blockEntity) {
super(materialManager, blockEntity);
}
@ -25,7 +24,7 @@ public class SawInstance extends SingleRotatingInstance {
.isHorizontal()) {
BlockState referenceState = blockState.rotate(blockEntity.getLevel(), blockEntity.getBlockPos(), Rotation.CLOCKWISE_180);
Direction facing = referenceState.getValue(BlockStateProperties.FACING);
return getRotatingMaterial().getModel(AllBlockPartials.SHAFT_HALF, referenceState, facing);
return getRotatingMaterial().getModel(AllPartialModels.SHAFT_HALF, referenceState, facing);
} else {
return getRotatingMaterial().getModel(shaft());
}

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