mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2025-02-05 17:54:59 +01:00
Merge remote-tracking branch 'origin/mc1.15/dev' into mc1.15/dev
# Conflicts: # src/generated/resources/assets/create/blockstates/fluid_pipe.json
This commit is contained in:
commit
8c8a9abd8a
403 changed files with 9467 additions and 1420 deletions
18
build.gradle
18
build.gradle
|
@ -3,9 +3,11 @@ buildscript {
|
||||||
maven { url = 'https://files.minecraftforge.net/maven' }
|
maven { url = 'https://files.minecraftforge.net/maven' }
|
||||||
jcenter()
|
jcenter()
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
maven { url='https://dist.creeper.host/Sponge/maven' }
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true
|
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true
|
||||||
|
classpath group: 'org.spongepowered', name: 'mixingradle', version: '0.7-SNAPSHOT'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
plugins {
|
plugins {
|
||||||
|
@ -35,6 +37,9 @@ minecraft {
|
||||||
runs {
|
runs {
|
||||||
client {
|
client {
|
||||||
workingDirectory project.file('run')
|
workingDirectory project.file('run')
|
||||||
|
// property 'mixin.env.disableRefMap', 'true'
|
||||||
|
arg '-mixin.config=create.mixins.json'
|
||||||
|
// jvmArgs '-XX:+UnlockCommercialFeatures'
|
||||||
property 'forge.logging.console.level', 'info'
|
property 'forge.logging.console.level', 'info'
|
||||||
property 'fml.earlyprogresswindow', 'false'
|
property 'fml.earlyprogresswindow', 'false'
|
||||||
mods {
|
mods {
|
||||||
|
@ -46,6 +51,8 @@ minecraft {
|
||||||
|
|
||||||
server {
|
server {
|
||||||
workingDirectory project.file('run/server')
|
workingDirectory project.file('run/server')
|
||||||
|
// property 'mixin.env.disableRefMap', 'true'
|
||||||
|
arg '-mixin.config=create.mixins.json'
|
||||||
property 'forge.logging.console.level', 'info'
|
property 'forge.logging.console.level', 'info'
|
||||||
mods {
|
mods {
|
||||||
create {
|
create {
|
||||||
|
@ -124,6 +131,8 @@ dependencies {
|
||||||
// i'll leave this here commented for easier testing
|
// i'll leave this here commented for easier testing
|
||||||
//runtimeOnly fg.deobf("vazkii.arl:AutoRegLib:1.4-35.69")
|
//runtimeOnly fg.deobf("vazkii.arl:AutoRegLib:1.4-35.69")
|
||||||
//runtimeOnly fg.deobf("vazkii.quark:Quark:r2.0-212.984")
|
//runtimeOnly fg.deobf("vazkii.quark:Quark:r2.0-212.984")
|
||||||
|
|
||||||
|
annotationProcessor 'org.spongepowered:mixin:0.8:processor'
|
||||||
}
|
}
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
|
@ -136,7 +145,8 @@ jar {
|
||||||
"Implementation-Title": project.name,
|
"Implementation-Title": project.name,
|
||||||
"Implementation-Version": "${version}",
|
"Implementation-Version": "${version}",
|
||||||
"Implementation-Vendor" :"simibubi",
|
"Implementation-Vendor" :"simibubi",
|
||||||
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
|
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
|
||||||
|
"MixinConfigs": "create.mixins.json"
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -205,3 +215,9 @@ curseforge {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
apply plugin: 'org.spongepowered.mixin'
|
||||||
|
|
||||||
|
mixin {
|
||||||
|
add sourceSets.main, "create.refmap.json"
|
||||||
|
}
|
|
@ -140,7 +140,7 @@ de8a40b7daf1497d5aecee47a43b3e0b1d030b00 assets/create/blockstates/fancy_scoria_
|
||||||
fc9ac0a7e7191b93516719455a17177fa6524ecc assets/create/blockstates/fancy_weathered_limestone_bricks_slab.json
|
fc9ac0a7e7191b93516719455a17177fa6524ecc assets/create/blockstates/fancy_weathered_limestone_bricks_slab.json
|
||||||
b2a7c321b1795f20e7433f81a55ce4683de081b8 assets/create/blockstates/fancy_weathered_limestone_bricks_stairs.json
|
b2a7c321b1795f20e7433f81a55ce4683de081b8 assets/create/blockstates/fancy_weathered_limestone_bricks_stairs.json
|
||||||
6372fe02ba0065acb0758121c45a15a1a8fdc5de assets/create/blockstates/fancy_weathered_limestone_bricks_wall.json
|
6372fe02ba0065acb0758121c45a15a1a8fdc5de assets/create/blockstates/fancy_weathered_limestone_bricks_wall.json
|
||||||
4c3e0500f9382d2e426e823fe876f57f4d7ee3b4 assets/create/blockstates/fluid_pipe.json
|
48086bf71a824faf14841b698050cc8544b09a9b assets/create/blockstates/fluid_pipe.json
|
||||||
f0eaab18e16c4f3f65ebf3b55b08f0dc445720fe assets/create/blockstates/fluid_tank.json
|
f0eaab18e16c4f3f65ebf3b55b08f0dc445720fe assets/create/blockstates/fluid_tank.json
|
||||||
5408d92ab02af86539ac42971d4033545970bb3a assets/create/blockstates/fluid_valve.json
|
5408d92ab02af86539ac42971d4033545970bb3a assets/create/blockstates/fluid_valve.json
|
||||||
e9da1794b6ece7f9aa8bcb43d42c23a55446133b assets/create/blockstates/flywheel.json
|
e9da1794b6ece7f9aa8bcb43d42c23a55446133b assets/create/blockstates/flywheel.json
|
||||||
|
@ -337,7 +337,7 @@ e8b0a401c10d1ba67ed71ba31bd5f9bc28571b65 assets/create/blockstates/powered_toggl
|
||||||
d06cd9a1101b18d306a786320aab12018b1325d6 assets/create/blockstates/purple_sail.json
|
d06cd9a1101b18d306a786320aab12018b1325d6 assets/create/blockstates/purple_sail.json
|
||||||
92957119abd5fbcca36a113b2a80255fd70fc303 assets/create/blockstates/purple_seat.json
|
92957119abd5fbcca36a113b2a80255fd70fc303 assets/create/blockstates/purple_seat.json
|
||||||
61035f8afe75ff7bbd291da5d8690bcbebe679eb assets/create/blockstates/purple_valve_handle.json
|
61035f8afe75ff7bbd291da5d8690bcbebe679eb assets/create/blockstates/purple_valve_handle.json
|
||||||
bdd56f32ce0a148b6e466a55ab2777f69fc08cfc assets/create/blockstates/radial_chassis.json
|
6fa36883e76e9e403bb429c8f86b8c0d3bba0cff assets/create/blockstates/radial_chassis.json
|
||||||
45877c4d90a7185c2f304edbd67379d800920439 assets/create/blockstates/red_sail.json
|
45877c4d90a7185c2f304edbd67379d800920439 assets/create/blockstates/red_sail.json
|
||||||
da1b08387af7afa0855ee8d040f620c01f20660a assets/create/blockstates/red_seat.json
|
da1b08387af7afa0855ee8d040f620c01f20660a assets/create/blockstates/red_seat.json
|
||||||
722fc77bbf387af8a4016e42cbf9501d2b968881 assets/create/blockstates/red_valve_handle.json
|
722fc77bbf387af8a4016e42cbf9501d2b968881 assets/create/blockstates/red_valve_handle.json
|
||||||
|
@ -401,18 +401,18 @@ a3a11524cd3515fc01d905767b4b7ea782adaf03 assets/create/blockstates/yellow_seat.j
|
||||||
7f39521b211441f5c3e06d60c5978cebe16cacfb assets/create/blockstates/zinc_block.json
|
7f39521b211441f5c3e06d60c5978cebe16cacfb assets/create/blockstates/zinc_block.json
|
||||||
b7181bcd8182b2f17088e5aa881f374c9c65470c assets/create/blockstates/zinc_ore.json
|
b7181bcd8182b2f17088e5aa881f374c9c65470c assets/create/blockstates/zinc_ore.json
|
||||||
e3f618c5b622d21880de858678d1802cbf65e615 assets/create/lang/en_ud.json
|
e3f618c5b622d21880de858678d1802cbf65e615 assets/create/lang/en_ud.json
|
||||||
acc852d80378b426d7ee6cb59c169e06b6d63b25 assets/create/lang/en_us.json
|
04b4c59db79887cdddd128cd4cb59320c715a76a assets/create/lang/en_us.json
|
||||||
30ce93c56557cea2f384a47b549fb893700523a5 assets/create/lang/unfinished/de_de.json
|
92840d43a7a5056ba1ddf043fe2a4b2b54533192 assets/create/lang/unfinished/de_de.json
|
||||||
77b8310f3cbed36fa0d2ee29e65ac6aee0c2adc2 assets/create/lang/unfinished/es_mx.json
|
fcded5cc7ba38ce1f13bbcf481c52da384d4335e assets/create/lang/unfinished/es_mx.json
|
||||||
8db9f9147dcef8c8182c548a524f96f578c116ec assets/create/lang/unfinished/fr_fr.json
|
d926a35cff961a017a174e5bad8976b8bfa246f0 assets/create/lang/unfinished/fr_fr.json
|
||||||
89f7029d73733938ee9f900fc36d52ab7fc97563 assets/create/lang/unfinished/it_it.json
|
bcf5cf92717d5d8b5b4b56dc759cc5dcd3b05ae7 assets/create/lang/unfinished/it_it.json
|
||||||
b1935e7f8d79d1112e1685adb42daedb976ac6d7 assets/create/lang/unfinished/ja_jp.json
|
dddcd6a8d3842035b07172dae1b61064b210dd3b assets/create/lang/unfinished/ja_jp.json
|
||||||
23aaf879d07a24775aeba3b98c355c992b24f28b assets/create/lang/unfinished/ko_kr.json
|
6fc6f612108b1c4498ea90e83f1ed0a7bce198d5 assets/create/lang/unfinished/ko_kr.json
|
||||||
7372533759001f094dbcad787f01f3de7422d8c0 assets/create/lang/unfinished/nl_nl.json
|
f6d7256dca3a9979ce85333a72ad787657c954ff assets/create/lang/unfinished/nl_nl.json
|
||||||
0d1e5d79ef196a06b273962d5ac8f2013f91209c assets/create/lang/unfinished/pt_br.json
|
48adee636f2a0ff06c97b738c9552dcdd48dd72c assets/create/lang/unfinished/pt_br.json
|
||||||
54da7badbd4fb043f73f6e9a4dfc52bd9e7f515c assets/create/lang/unfinished/ru_ru.json
|
a82ef75492ff34c22f5e480fefe826aceefa956e assets/create/lang/unfinished/ru_ru.json
|
||||||
45ca54406acac857752c67a45729da953d11f94a assets/create/lang/unfinished/zh_cn.json
|
25b9387af4a75d4264ff001562cc4b14fccd49e6 assets/create/lang/unfinished/zh_cn.json
|
||||||
4093ea8612465858aa57581b36f8f60aa23ac203 assets/create/lang/unfinished/zh_tw.json
|
21e291e10cc5194b61d82c8a271cff2682ec0aee assets/create/lang/unfinished/zh_tw.json
|
||||||
846200eb548d3bfa2e77b41039de159b4b6cfb45 assets/create/models/block/acacia_window.json
|
846200eb548d3bfa2e77b41039de159b4b6cfb45 assets/create/models/block/acacia_window.json
|
||||||
1930fa3a3c98d53dd19e4ee7f55bc27fd47aa281 assets/create/models/block/acacia_window_pane_noside.json
|
1930fa3a3c98d53dd19e4ee7f55bc27fd47aa281 assets/create/models/block/acacia_window_pane_noside.json
|
||||||
1763ea2c9b981d187f5031ba608f3d5d3be3986a assets/create/models/block/acacia_window_pane_noside_alt.json
|
1763ea2c9b981d187f5031ba608f3d5d3be3986a assets/create/models/block/acacia_window_pane_noside_alt.json
|
||||||
|
|
|
@ -61,9 +61,9 @@
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"down": "false",
|
"down": "false",
|
||||||
"north": "true",
|
|
||||||
"up": "true",
|
"up": "true",
|
||||||
"south": "false"
|
"south": "false",
|
||||||
|
"north": "true"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/fluid_pipe/lu_x"
|
"model": "create:block/fluid_pipe/lu_x"
|
||||||
|
@ -72,9 +72,9 @@
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"down": "false",
|
"down": "false",
|
||||||
"north": "false",
|
|
||||||
"up": "true",
|
"up": "true",
|
||||||
"south": "true"
|
"south": "true",
|
||||||
|
"north": "false"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/fluid_pipe/ru_x"
|
"model": "create:block/fluid_pipe/ru_x"
|
||||||
|
@ -83,9 +83,9 @@
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"down": "true",
|
"down": "true",
|
||||||
"north": "true",
|
|
||||||
"up": "false",
|
"up": "false",
|
||||||
"south": "false"
|
"south": "false",
|
||||||
|
"north": "true"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/fluid_pipe/ld_x"
|
"model": "create:block/fluid_pipe/ld_x"
|
||||||
|
@ -94,9 +94,9 @@
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"down": "true",
|
"down": "true",
|
||||||
"north": "false",
|
|
||||||
"up": "false",
|
"up": "false",
|
||||||
"south": "true"
|
"south": "true",
|
||||||
|
"north": "false"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/fluid_pipe/rd_x"
|
"model": "create:block/fluid_pipe/rd_x"
|
||||||
|
@ -105,9 +105,9 @@
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"down": "true",
|
"down": "true",
|
||||||
"north": "false",
|
|
||||||
"up": "true",
|
"up": "true",
|
||||||
"south": "false"
|
"south": "false",
|
||||||
|
"north": "false"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/fluid_pipe/ud_x"
|
"model": "create:block/fluid_pipe/ud_x"
|
||||||
|
@ -116,9 +116,9 @@
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"down": "false",
|
"down": "false",
|
||||||
"north": "false",
|
|
||||||
"up": "true",
|
"up": "true",
|
||||||
"south": "false"
|
"south": "false",
|
||||||
|
"north": "false"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/fluid_pipe/ud_x"
|
"model": "create:block/fluid_pipe/ud_x"
|
||||||
|
@ -127,9 +127,9 @@
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"down": "true",
|
"down": "true",
|
||||||
"north": "false",
|
|
||||||
"up": "false",
|
"up": "false",
|
||||||
"south": "false"
|
"south": "false",
|
||||||
|
"north": "false"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/fluid_pipe/ud_x"
|
"model": "create:block/fluid_pipe/ud_x"
|
||||||
|
@ -138,9 +138,9 @@
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"down": "false",
|
"down": "false",
|
||||||
"north": "true",
|
|
||||||
"up": "false",
|
"up": "false",
|
||||||
"south": "true"
|
"south": "true",
|
||||||
|
"north": "true"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/fluid_pipe/lr_x"
|
"model": "create:block/fluid_pipe/lr_x"
|
||||||
|
@ -149,9 +149,9 @@
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"down": "false",
|
"down": "false",
|
||||||
"north": "true",
|
|
||||||
"up": "false",
|
"up": "false",
|
||||||
"south": "false"
|
"south": "false",
|
||||||
|
"north": "true"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/fluid_pipe/lr_x"
|
"model": "create:block/fluid_pipe/lr_x"
|
||||||
|
@ -160,9 +160,9 @@
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"down": "false",
|
"down": "false",
|
||||||
"north": "false",
|
|
||||||
"up": "false",
|
"up": "false",
|
||||||
"south": "true"
|
"south": "true",
|
||||||
|
"north": "false"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/fluid_pipe/lr_x"
|
"model": "create:block/fluid_pipe/lr_x"
|
||||||
|
@ -171,9 +171,9 @@
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"down": "false",
|
"down": "false",
|
||||||
"north": "false",
|
|
||||||
"up": "false",
|
"up": "false",
|
||||||
"south": "false"
|
"south": "false",
|
||||||
|
"north": "false"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/fluid_pipe/none_x"
|
"model": "create:block/fluid_pipe/none_x"
|
||||||
|
@ -181,10 +181,10 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
|
"south": "true",
|
||||||
"west": "true",
|
"west": "true",
|
||||||
"east": "false",
|
|
||||||
"north": "false",
|
"north": "false",
|
||||||
"south": "true"
|
"east": "false"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/fluid_pipe/lu_y"
|
"model": "create:block/fluid_pipe/lu_y"
|
||||||
|
@ -192,10 +192,10 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
|
"south": "true",
|
||||||
"west": "false",
|
"west": "false",
|
||||||
"east": "true",
|
|
||||||
"north": "false",
|
"north": "false",
|
||||||
"south": "true"
|
"east": "true"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/fluid_pipe/ru_y"
|
"model": "create:block/fluid_pipe/ru_y"
|
||||||
|
@ -203,10 +203,10 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
|
"south": "false",
|
||||||
"west": "true",
|
"west": "true",
|
||||||
"east": "false",
|
|
||||||
"north": "true",
|
"north": "true",
|
||||||
"south": "false"
|
"east": "false"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/fluid_pipe/ld_y"
|
"model": "create:block/fluid_pipe/ld_y"
|
||||||
|
@ -214,10 +214,10 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
|
"south": "false",
|
||||||
"west": "false",
|
"west": "false",
|
||||||
"east": "true",
|
|
||||||
"north": "true",
|
"north": "true",
|
||||||
"south": "false"
|
"east": "true"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/fluid_pipe/rd_y"
|
"model": "create:block/fluid_pipe/rd_y"
|
||||||
|
@ -225,10 +225,10 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
|
"south": "true",
|
||||||
"west": "false",
|
"west": "false",
|
||||||
"east": "false",
|
|
||||||
"north": "true",
|
"north": "true",
|
||||||
"south": "true"
|
"east": "false"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/fluid_pipe/ud_y"
|
"model": "create:block/fluid_pipe/ud_y"
|
||||||
|
@ -236,10 +236,10 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
|
"south": "true",
|
||||||
"west": "false",
|
"west": "false",
|
||||||
"east": "false",
|
|
||||||
"north": "false",
|
"north": "false",
|
||||||
"south": "true"
|
"east": "false"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/fluid_pipe/ud_y"
|
"model": "create:block/fluid_pipe/ud_y"
|
||||||
|
@ -247,10 +247,10 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
|
"south": "false",
|
||||||
"west": "false",
|
"west": "false",
|
||||||
"east": "false",
|
|
||||||
"north": "true",
|
"north": "true",
|
||||||
"south": "false"
|
"east": "false"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/fluid_pipe/ud_y"
|
"model": "create:block/fluid_pipe/ud_y"
|
||||||
|
@ -258,10 +258,10 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
|
"south": "false",
|
||||||
"west": "true",
|
"west": "true",
|
||||||
"east": "true",
|
|
||||||
"north": "false",
|
"north": "false",
|
||||||
"south": "false"
|
"east": "true"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/fluid_pipe/lr_y"
|
"model": "create:block/fluid_pipe/lr_y"
|
||||||
|
@ -269,10 +269,10 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
|
"south": "false",
|
||||||
"west": "true",
|
"west": "true",
|
||||||
"east": "false",
|
|
||||||
"north": "false",
|
"north": "false",
|
||||||
"south": "false"
|
"east": "false"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/fluid_pipe/lr_y"
|
"model": "create:block/fluid_pipe/lr_y"
|
||||||
|
@ -280,10 +280,10 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
|
"south": "false",
|
||||||
"west": "false",
|
"west": "false",
|
||||||
"east": "true",
|
|
||||||
"north": "false",
|
"north": "false",
|
||||||
"south": "false"
|
"east": "true"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/fluid_pipe/lr_y"
|
"model": "create:block/fluid_pipe/lr_y"
|
||||||
|
@ -291,10 +291,10 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
|
"south": "false",
|
||||||
"west": "false",
|
"west": "false",
|
||||||
"east": "false",
|
|
||||||
"north": "false",
|
"north": "false",
|
||||||
"south": "false"
|
"east": "false"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/fluid_pipe/none_y"
|
"model": "create:block/fluid_pipe/none_y"
|
||||||
|
@ -302,10 +302,10 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"west": "false",
|
|
||||||
"down": "false",
|
"down": "false",
|
||||||
"east": "true",
|
"up": "true",
|
||||||
"up": "true"
|
"west": "false",
|
||||||
|
"east": "true"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/fluid_pipe/lu_z"
|
"model": "create:block/fluid_pipe/lu_z"
|
||||||
|
@ -313,10 +313,10 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"west": "true",
|
|
||||||
"down": "false",
|
"down": "false",
|
||||||
"east": "false",
|
"up": "true",
|
||||||
"up": "true"
|
"west": "true",
|
||||||
|
"east": "false"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/fluid_pipe/ru_z"
|
"model": "create:block/fluid_pipe/ru_z"
|
||||||
|
@ -324,10 +324,10 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"west": "false",
|
|
||||||
"down": "true",
|
"down": "true",
|
||||||
"east": "true",
|
"up": "false",
|
||||||
"up": "false"
|
"west": "false",
|
||||||
|
"east": "true"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/fluid_pipe/ld_z"
|
"model": "create:block/fluid_pipe/ld_z"
|
||||||
|
@ -335,10 +335,10 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"west": "true",
|
|
||||||
"down": "true",
|
"down": "true",
|
||||||
"east": "false",
|
"up": "false",
|
||||||
"up": "false"
|
"west": "true",
|
||||||
|
"east": "false"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/fluid_pipe/rd_z"
|
"model": "create:block/fluid_pipe/rd_z"
|
||||||
|
@ -346,10 +346,10 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"west": "false",
|
|
||||||
"down": "true",
|
"down": "true",
|
||||||
"east": "false",
|
"up": "true",
|
||||||
"up": "true"
|
"west": "false",
|
||||||
|
"east": "false"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/fluid_pipe/ud_z"
|
"model": "create:block/fluid_pipe/ud_z"
|
||||||
|
@ -357,10 +357,10 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"west": "false",
|
|
||||||
"down": "false",
|
"down": "false",
|
||||||
"east": "false",
|
"up": "true",
|
||||||
"up": "true"
|
"west": "false",
|
||||||
|
"east": "false"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/fluid_pipe/ud_z"
|
"model": "create:block/fluid_pipe/ud_z"
|
||||||
|
@ -368,10 +368,10 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"west": "false",
|
|
||||||
"down": "true",
|
"down": "true",
|
||||||
"east": "false",
|
"up": "false",
|
||||||
"up": "false"
|
"west": "false",
|
||||||
|
"east": "false"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/fluid_pipe/ud_z"
|
"model": "create:block/fluid_pipe/ud_z"
|
||||||
|
@ -379,10 +379,10 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
|
"down": "false",
|
||||||
|
"up": "false",
|
||||||
"west": "true",
|
"west": "true",
|
||||||
"down": "false",
|
"east": "true"
|
||||||
"east": "true",
|
|
||||||
"up": "false"
|
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/fluid_pipe/lr_z"
|
"model": "create:block/fluid_pipe/lr_z"
|
||||||
|
@ -390,10 +390,10 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
|
"down": "false",
|
||||||
|
"up": "false",
|
||||||
"west": "false",
|
"west": "false",
|
||||||
"down": "false",
|
"east": "true"
|
||||||
"east": "true",
|
|
||||||
"up": "false"
|
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/fluid_pipe/lr_z"
|
"model": "create:block/fluid_pipe/lr_z"
|
||||||
|
@ -401,10 +401,10 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
|
"down": "false",
|
||||||
|
"up": "false",
|
||||||
"west": "true",
|
"west": "true",
|
||||||
"down": "false",
|
"east": "false"
|
||||||
"east": "false",
|
|
||||||
"up": "false"
|
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/fluid_pipe/lr_z"
|
"model": "create:block/fluid_pipe/lr_z"
|
||||||
|
@ -412,10 +412,10 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"west": "false",
|
|
||||||
"down": "false",
|
"down": "false",
|
||||||
"east": "false",
|
"up": "false",
|
||||||
"up": "false"
|
"west": "false",
|
||||||
|
"east": "false"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/fluid_pipe/none_z"
|
"model": "create:block/fluid_pipe/none_z"
|
||||||
|
|
|
@ -29,8 +29,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"sticky_south": "true",
|
"axis": "x",
|
||||||
"axis": "x"
|
"sticky_south": "true"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/radial_chassis_side_x_sticky",
|
"model": "create:block/radial_chassis_side_x_sticky",
|
||||||
|
@ -39,8 +39,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"sticky_south": "true",
|
"axis": "y",
|
||||||
"axis": "y"
|
"sticky_south": "true"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/radial_chassis_side_y_sticky"
|
"model": "create:block/radial_chassis_side_y_sticky"
|
||||||
|
@ -48,8 +48,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"sticky_south": "true",
|
"axis": "z",
|
||||||
"axis": "z"
|
"sticky_south": "true"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/radial_chassis_side_x_sticky",
|
"model": "create:block/radial_chassis_side_x_sticky",
|
||||||
|
@ -59,8 +59,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"sticky_south": "false",
|
"axis": "x",
|
||||||
"axis": "x"
|
"sticky_south": "false"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/radial_chassis_side_x",
|
"model": "create:block/radial_chassis_side_x",
|
||||||
|
@ -69,8 +69,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"sticky_south": "false",
|
"axis": "y",
|
||||||
"axis": "y"
|
"sticky_south": "false"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/radial_chassis_side_y"
|
"model": "create:block/radial_chassis_side_y"
|
||||||
|
@ -78,8 +78,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"sticky_south": "false",
|
"axis": "z",
|
||||||
"axis": "z"
|
"sticky_south": "false"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/radial_chassis_side_x",
|
"model": "create:block/radial_chassis_side_x",
|
||||||
|
@ -89,8 +89,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"axis": "x",
|
"sticky_west": "true",
|
||||||
"sticky_west": "true"
|
"axis": "x"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/radial_chassis_side_x_sticky",
|
"model": "create:block/radial_chassis_side_x_sticky",
|
||||||
|
@ -99,8 +99,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"axis": "y",
|
"sticky_west": "true",
|
||||||
"sticky_west": "true"
|
"axis": "y"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/radial_chassis_side_y_sticky",
|
"model": "create:block/radial_chassis_side_y_sticky",
|
||||||
|
@ -109,8 +109,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"axis": "z",
|
"sticky_west": "true",
|
||||||
"sticky_west": "true"
|
"axis": "z"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/radial_chassis_side_z_sticky",
|
"model": "create:block/radial_chassis_side_z_sticky",
|
||||||
|
@ -119,8 +119,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"axis": "x",
|
"sticky_west": "false",
|
||||||
"sticky_west": "false"
|
"axis": "x"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/radial_chassis_side_x",
|
"model": "create:block/radial_chassis_side_x",
|
||||||
|
@ -129,8 +129,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"axis": "y",
|
"sticky_west": "false",
|
||||||
"sticky_west": "false"
|
"axis": "y"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/radial_chassis_side_y",
|
"model": "create:block/radial_chassis_side_y",
|
||||||
|
@ -139,8 +139,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"axis": "z",
|
"sticky_west": "false",
|
||||||
"sticky_west": "false"
|
"axis": "z"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/radial_chassis_side_z",
|
"model": "create:block/radial_chassis_side_z",
|
||||||
|
@ -207,8 +207,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"axis": "x",
|
"sticky_east": "true",
|
||||||
"sticky_east": "true"
|
"axis": "x"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/radial_chassis_side_x_sticky",
|
"model": "create:block/radial_chassis_side_x_sticky",
|
||||||
|
@ -217,8 +217,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"axis": "y",
|
"sticky_east": "true",
|
||||||
"sticky_east": "true"
|
"axis": "y"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/radial_chassis_side_y_sticky",
|
"model": "create:block/radial_chassis_side_y_sticky",
|
||||||
|
@ -227,8 +227,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"axis": "z",
|
"sticky_east": "true",
|
||||||
"sticky_east": "true"
|
"axis": "z"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/radial_chassis_side_z_sticky"
|
"model": "create:block/radial_chassis_side_z_sticky"
|
||||||
|
@ -236,8 +236,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"axis": "x",
|
"sticky_east": "false",
|
||||||
"sticky_east": "false"
|
"axis": "x"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/radial_chassis_side_x",
|
"model": "create:block/radial_chassis_side_x",
|
||||||
|
@ -246,8 +246,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"axis": "y",
|
"sticky_east": "false",
|
||||||
"sticky_east": "false"
|
"axis": "y"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/radial_chassis_side_y",
|
"model": "create:block/radial_chassis_side_y",
|
||||||
|
@ -256,8 +256,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"when": {
|
"when": {
|
||||||
"axis": "z",
|
"sticky_east": "false",
|
||||||
"sticky_east": "false"
|
"axis": "z"
|
||||||
},
|
},
|
||||||
"apply": {
|
"apply": {
|
||||||
"model": "create:block/radial_chassis_side_z"
|
"model": "create:block/radial_chassis_side_z"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 1095",
|
"_": "Missing Localizations: 1101",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 886",
|
"_": "Missing Localizations: 892",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -823,6 +823,12 @@
|
||||||
"create.gui.goggles.kinetic_stats": "UNLOCALIZED: Kinetic Stats:",
|
"create.gui.goggles.kinetic_stats": "UNLOCALIZED: Kinetic Stats:",
|
||||||
"create.gui.goggles.at_current_speed": "UNLOCALIZED: at current speed",
|
"create.gui.goggles.at_current_speed": "UNLOCALIZED: at current speed",
|
||||||
"create.gui.goggles.pole_length": "UNLOCALIZED: Pole Length:",
|
"create.gui.goggles.pole_length": "UNLOCALIZED: Pole Length:",
|
||||||
|
"create.gui.assembly.exception": "UNLOCALIZED: This Contraption was unable to assemble:",
|
||||||
|
"create.gui.assembly.exception.unmovableBlock": "UNLOCALIZED: Unmovable Block (%4$s) at [%1$s %2$s %3$s]",
|
||||||
|
"create.gui.assembly.exception.chunkNotLoaded": "UNLOCALIZED: The Block at [%1$s %2$s %3$s] was not in a loaded chunk",
|
||||||
|
"create.gui.assembly.exception.structureTooLarge": "UNLOCALIZED: There are too many Blocks included in the contraption.\nThe configured maximum is: %1$s",
|
||||||
|
"create.gui.assembly.exception.tooManyPistonPoles": "UNLOCALIZED: There are too many extension Poles attached to this Piston.\nThe configured maximum is: %1$s",
|
||||||
|
"create.gui.assembly.exception.noPistonPoles": "UNLOCALIZED: The Piston is missing some extension Poles",
|
||||||
"create.gui.gauge.info_header": "UNLOCALIZED: Gauge Information:",
|
"create.gui.gauge.info_header": "UNLOCALIZED: Gauge Information:",
|
||||||
"create.gui.speedometer.title": "UNLOCALIZED: Rotation Speed",
|
"create.gui.speedometer.title": "UNLOCALIZED: Rotation Speed",
|
||||||
"create.gui.stressometer.title": "UNLOCALIZED: Network Stress",
|
"create.gui.stressometer.title": "UNLOCALIZED: Network Stress",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 666",
|
"_": "Missing Localizations: 672",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -823,6 +823,12 @@
|
||||||
"create.gui.goggles.kinetic_stats": "Statistiques cinétiques:",
|
"create.gui.goggles.kinetic_stats": "Statistiques cinétiques:",
|
||||||
"create.gui.goggles.at_current_speed": "À la vitesse actuelle",
|
"create.gui.goggles.at_current_speed": "À la vitesse actuelle",
|
||||||
"create.gui.goggles.pole_length": "Longueur de la barre",
|
"create.gui.goggles.pole_length": "Longueur de la barre",
|
||||||
|
"create.gui.assembly.exception": "UNLOCALIZED: This Contraption was unable to assemble:",
|
||||||
|
"create.gui.assembly.exception.unmovableBlock": "UNLOCALIZED: Unmovable Block (%4$s) at [%1$s %2$s %3$s]",
|
||||||
|
"create.gui.assembly.exception.chunkNotLoaded": "UNLOCALIZED: The Block at [%1$s %2$s %3$s] was not in a loaded chunk",
|
||||||
|
"create.gui.assembly.exception.structureTooLarge": "UNLOCALIZED: There are too many Blocks included in the contraption.\nThe configured maximum is: %1$s",
|
||||||
|
"create.gui.assembly.exception.tooManyPistonPoles": "UNLOCALIZED: There are too many extension Poles attached to this Piston.\nThe configured maximum is: %1$s",
|
||||||
|
"create.gui.assembly.exception.noPistonPoles": "UNLOCALIZED: The Piston is missing some extension Poles",
|
||||||
"create.gui.gauge.info_header": "Informations sur la jauge:",
|
"create.gui.gauge.info_header": "Informations sur la jauge:",
|
||||||
"create.gui.speedometer.title": "Vitesse de rotation",
|
"create.gui.speedometer.title": "Vitesse de rotation",
|
||||||
"create.gui.stressometer.title": "Stress du réseau",
|
"create.gui.stressometer.title": "Stress du réseau",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 3",
|
"_": "Missing Localizations: 7",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -162,8 +162,8 @@
|
||||||
"block.create.gabbro_cobblestone_stairs": "Scalini di pietrisco di gabbro",
|
"block.create.gabbro_cobblestone_stairs": "Scalini di pietrisco di gabbro",
|
||||||
"block.create.gabbro_cobblestone_wall": "Muretto di pietrisco di gabbro",
|
"block.create.gabbro_cobblestone_wall": "Muretto di pietrisco di gabbro",
|
||||||
"block.create.gabbro_pillar": "Pilastro di gabbro",
|
"block.create.gabbro_pillar": "Pilastro di gabbro",
|
||||||
"block.create.gantry_pinion": "UNLOCALIZED: Gantry Pinion",
|
"block.create.gantry_pinion": "Pignone a portale",
|
||||||
"block.create.gantry_shaft": "UNLOCALIZED: Gantry Shaft",
|
"block.create.gantry_shaft": "Albero a portale",
|
||||||
"block.create.gearbox": "Riduttore",
|
"block.create.gearbox": "Riduttore",
|
||||||
"block.create.gearshift": "Cambio",
|
"block.create.gearshift": "Cambio",
|
||||||
"block.create.glass_fluid_pipe": "Tubo per fluidi con vetrata",
|
"block.create.glass_fluid_pipe": "Tubo per fluidi con vetrata",
|
||||||
|
@ -823,6 +823,12 @@
|
||||||
"create.gui.goggles.kinetic_stats": "Statistiche cinetiche:",
|
"create.gui.goggles.kinetic_stats": "Statistiche cinetiche:",
|
||||||
"create.gui.goggles.at_current_speed": "Alla velocità attuale",
|
"create.gui.goggles.at_current_speed": "Alla velocità attuale",
|
||||||
"create.gui.goggles.pole_length": "Lunghezza palo:",
|
"create.gui.goggles.pole_length": "Lunghezza palo:",
|
||||||
|
"create.gui.assembly.exception": "UNLOCALIZED: This Contraption was unable to assemble:",
|
||||||
|
"create.gui.assembly.exception.unmovableBlock": "UNLOCALIZED: Unmovable Block (%4$s) at [%1$s %2$s %3$s]",
|
||||||
|
"create.gui.assembly.exception.chunkNotLoaded": "UNLOCALIZED: The Block at [%1$s %2$s %3$s] was not in a loaded chunk",
|
||||||
|
"create.gui.assembly.exception.structureTooLarge": "UNLOCALIZED: There are too many Blocks included in the contraption.\nThe configured maximum is: %1$s",
|
||||||
|
"create.gui.assembly.exception.tooManyPistonPoles": "UNLOCALIZED: There are too many extension Poles attached to this Piston.\nThe configured maximum is: %1$s",
|
||||||
|
"create.gui.assembly.exception.noPistonPoles": "UNLOCALIZED: The Piston is missing some extension Poles",
|
||||||
"create.gui.gauge.info_header": "Informazioni sul calibro:",
|
"create.gui.gauge.info_header": "Informazioni sul calibro:",
|
||||||
"create.gui.speedometer.title": "Velocità di rotazione",
|
"create.gui.speedometer.title": "Velocità di rotazione",
|
||||||
"create.gui.stressometer.title": "Stress della rete",
|
"create.gui.stressometer.title": "Stress della rete",
|
||||||
|
@ -1367,7 +1373,7 @@
|
||||||
"item.create.schematic_and_quill.tooltip.condition1": "Passo 1",
|
"item.create.schematic_and_quill.tooltip.condition1": "Passo 1",
|
||||||
"item.create.schematic_and_quill.tooltip.behaviour1": "Seleziona due punti d'angolo usando il clic destro.",
|
"item.create.schematic_and_quill.tooltip.behaviour1": "Seleziona due punti d'angolo usando il clic destro.",
|
||||||
"item.create.schematic_and_quill.tooltip.condition2": "Passo 2",
|
"item.create.schematic_and_quill.tooltip.condition2": "Passo 2",
|
||||||
"item.create.schematic_and_quill.tooltip.behaviour2": "Premi _Ctrl_ e _scorri_ sui volti per regolare le dimensioni. Clic destro di nuovo per salvare.",
|
"item.create.schematic_and_quill.tooltip.behaviour2": "Premi _Ctrl_ e _scorri_ sulle facciate per regolare le dimensioni. Clic destro di nuovo per salvare.",
|
||||||
"item.create.schematic_and_quill.tooltip.control1": "Clic-Destro",
|
"item.create.schematic_and_quill.tooltip.control1": "Clic-Destro",
|
||||||
"item.create.schematic_and_quill.tooltip.action1": "Seleziona un punto d'angolo / conferma il salvataggio.",
|
"item.create.schematic_and_quill.tooltip.action1": "Seleziona un punto d'angolo / conferma il salvataggio.",
|
||||||
"item.create.schematic_and_quill.tooltip.control2": "Ctrl premuto",
|
"item.create.schematic_and_quill.tooltip.control2": "Ctrl premuto",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 12",
|
"_": "Missing Localizations: 14",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -149,8 +149,8 @@
|
||||||
"block.create.fluid_tank": "液体タンク",
|
"block.create.fluid_tank": "液体タンク",
|
||||||
"block.create.fluid_valve": "液体バルブ",
|
"block.create.fluid_valve": "液体バルブ",
|
||||||
"block.create.flywheel": "勢車",
|
"block.create.flywheel": "勢車",
|
||||||
"block.create.framed_glass": "大きなガラス窓",
|
"block.create.framed_glass": "ガラス窓",
|
||||||
"block.create.framed_glass_pane": "大きなガラス窓板",
|
"block.create.framed_glass_pane": "ガラス窓板",
|
||||||
"block.create.furnace_engine": "かまどエンジン",
|
"block.create.furnace_engine": "かまどエンジン",
|
||||||
"block.create.gabbro": "斑れい岩",
|
"block.create.gabbro": "斑れい岩",
|
||||||
"block.create.gabbro_bricks": "斑れい岩レンガ",
|
"block.create.gabbro_bricks": "斑れい岩レンガ",
|
||||||
|
@ -162,8 +162,8 @@
|
||||||
"block.create.gabbro_cobblestone_stairs": "斑れい岩の丸石の階段",
|
"block.create.gabbro_cobblestone_stairs": "斑れい岩の丸石の階段",
|
||||||
"block.create.gabbro_cobblestone_wall": "斑れい岩の丸石の壁",
|
"block.create.gabbro_cobblestone_wall": "斑れい岩の丸石の壁",
|
||||||
"block.create.gabbro_pillar": "斑れい岩の柱",
|
"block.create.gabbro_pillar": "斑れい岩の柱",
|
||||||
"block.create.gantry_pinion": "UNLOCALIZED: Gantry Pinion",
|
"block.create.gantry_pinion": "ガントリーピニオン",
|
||||||
"block.create.gantry_shaft": "UNLOCALIZED: Gantry Shaft",
|
"block.create.gantry_shaft": "ガントリーシャフト",
|
||||||
"block.create.gearbox": "ギアボックス",
|
"block.create.gearbox": "ギアボックス",
|
||||||
"block.create.gearshift": "ギアシフト",
|
"block.create.gearshift": "ギアシフト",
|
||||||
"block.create.glass_fluid_pipe": "ガラスの液体パイプ",
|
"block.create.glass_fluid_pipe": "ガラスの液体パイプ",
|
||||||
|
@ -372,13 +372,13 @@
|
||||||
"block.create.shaft": "シャフト",
|
"block.create.shaft": "シャフト",
|
||||||
"block.create.smart_chute": "スマートシュート",
|
"block.create.smart_chute": "スマートシュート",
|
||||||
"block.create.smart_fluid_pipe": "スマート液体パイプ",
|
"block.create.smart_fluid_pipe": "スマート液体パイプ",
|
||||||
"block.create.speedometer": "スピードメーター",
|
"block.create.speedometer": "速度メーター",
|
||||||
"block.create.spout": "アイテム注液口",
|
"block.create.spout": "アイテム注液口",
|
||||||
"block.create.spruce_window": "マツの窓",
|
"block.create.spruce_window": "マツの窓",
|
||||||
"block.create.spruce_window_pane": "マツの窓パネル",
|
"block.create.spruce_window_pane": "マツの窓パネル",
|
||||||
"block.create.sticky_mechanical_piston": "粘着メカニカルピストン",
|
"block.create.sticky_mechanical_piston": "粘着メカニカルピストン",
|
||||||
"block.create.stockpile_switch": "在庫スイッチ",
|
"block.create.stockpile_switch": "在庫スイッチ",
|
||||||
"block.create.stressometer": "ストレスメーター",
|
"block.create.stressometer": "応力メーター",
|
||||||
"block.create.tiled_glass": "タイルガラス",
|
"block.create.tiled_glass": "タイルガラス",
|
||||||
"block.create.tiled_glass_pane": "タイルガラス板",
|
"block.create.tiled_glass_pane": "タイルガラス板",
|
||||||
"block.create.turntable": "ターンテーブル",
|
"block.create.turntable": "ターンテーブル",
|
||||||
|
@ -407,7 +407,7 @@
|
||||||
"block.create.zinc_ore": "亜鉛鉱石",
|
"block.create.zinc_ore": "亜鉛鉱石",
|
||||||
|
|
||||||
"entity.create.contraption": "からくり",
|
"entity.create.contraption": "からくり",
|
||||||
"entity.create.gantry_contraption": "UNLOCALIZED: Gantry Contraption",
|
"entity.create.gantry_contraption": "ガントリーからくり",
|
||||||
"entity.create.seat": "シート",
|
"entity.create.seat": "シート",
|
||||||
"entity.create.stationary_contraption": "付設からくり",
|
"entity.create.stationary_contraption": "付設からくり",
|
||||||
"entity.create.super_glue": "接着剤",
|
"entity.create.super_glue": "接着剤",
|
||||||
|
@ -527,9 +527,9 @@
|
||||||
"advancement.create.goggles": "応力をこの目で",
|
"advancement.create.goggles": "応力をこの目で",
|
||||||
"advancement.create.goggles.desc": "機械からより多くの情報を手に入れるために、エンジニアのゴーグルを作る",
|
"advancement.create.goggles.desc": "機械からより多くの情報を手に入れるために、エンジニアのゴーグルを作る",
|
||||||
"advancement.create.speedometer": "正確な速度は?",
|
"advancement.create.speedometer": "正確な速度は?",
|
||||||
"advancement.create.speedometer.desc": "動作中のスピードメーターをゴーグルで見て、正確な値を読み取る",
|
"advancement.create.speedometer.desc": "動作中の速度メーターをゴーグルで見て、正確な値を読み取る",
|
||||||
"advancement.create.stressometer": "正確な応力は?",
|
"advancement.create.stressometer": "正確な応力は?",
|
||||||
"advancement.create.stressometer.desc": "動作中のストレスメーターをゴーグルを通して見て、正確な値を読み取る",
|
"advancement.create.stressometer.desc": "動作中の応力メーターをゴーグルを通して見て、正確な値を読み取る",
|
||||||
"advancement.create.aesthetics": "装飾ブーム!",
|
"advancement.create.aesthetics": "装飾ブーム!",
|
||||||
"advancement.create.aesthetics.desc": "シャフト、パイプ、歯車に腕木や腕金を取り付ける",
|
"advancement.create.aesthetics.desc": "シャフト、パイプ、歯車に腕木や腕金を取り付ける",
|
||||||
"advancement.create.reinforced": "補強ブーム!",
|
"advancement.create.reinforced": "補強ブーム!",
|
||||||
|
@ -591,7 +591,7 @@
|
||||||
"advancement.create.pipe_spill": "漏れてる!",
|
"advancement.create.pipe_spill": "漏れてる!",
|
||||||
"advancement.create.pipe_spill.desc": "パイプの端を露出させて液体が吹き出しているところを見る",
|
"advancement.create.pipe_spill.desc": "パイプの端を露出させて液体が吹き出しているところを見る",
|
||||||
"advancement.create.hose_pulley": "工業排水",
|
"advancement.create.hose_pulley": "工業排水",
|
||||||
"advancement.create.hose_pulley.desc": "ホースプーリーを下げて、液体の排出や吸引を見る",
|
"advancement.create.hose_pulley.desc": "ホースプーリーを下げて、液体の放出や吸引を見る",
|
||||||
"advancement.create.infinite_water": "海の水ぜんぶ抜く大作戦",
|
"advancement.create.infinite_water": "海の水ぜんぶ抜く大作戦",
|
||||||
"advancement.create.infinite_water.desc": "無限と言えるほどの大量の水を吸引する",
|
"advancement.create.infinite_water.desc": "無限と言えるほどの大量の水を吸引する",
|
||||||
"advancement.create.infinite_lava": "星の核ぜんぶ抜く大作戦",
|
"advancement.create.infinite_lava": "星の核ぜんぶ抜く大作戦",
|
||||||
|
@ -602,7 +602,7 @@
|
||||||
"advancement.create.crafter.desc": "メカニカルクラフターを設置して、回転力を与える",
|
"advancement.create.crafter.desc": "メカニカルクラフターを設置して、回転力を与える",
|
||||||
"advancement.create.clockwork_bearing": "時計仕掛け",
|
"advancement.create.clockwork_bearing": "時計仕掛け",
|
||||||
"advancement.create.clockwork_bearing.desc": "時計仕掛けのベアリングの上に構造物を組み立てる",
|
"advancement.create.clockwork_bearing.desc": "時計仕掛けのベアリングの上に構造物を組み立てる",
|
||||||
"advancement.create.nixie_tube": "派手な看板",
|
"advancement.create.nixie_tube": "イカした看板",
|
||||||
"advancement.create.nixie_tube.desc": "ニキシー管を手に入れて、設置する",
|
"advancement.create.nixie_tube.desc": "ニキシー管を手に入れて、設置する",
|
||||||
"advancement.create.deployer": "突く、置く、殴る!",
|
"advancement.create.deployer": "突く、置く、殴る!",
|
||||||
"advancement.create.deployer.desc": "自分の手と全く同じ動きをするデプロイヤーを設置して、稼働させる",
|
"advancement.create.deployer.desc": "自分の手と全く同じ動きをするデプロイヤーを設置して、稼働させる",
|
||||||
|
@ -610,7 +610,7 @@
|
||||||
"advancement.create.speed_controller.desc": "究極の伝動機、回転速度コントローラーを設置する",
|
"advancement.create.speed_controller.desc": "究極の伝動機、回転速度コントローラーを設置する",
|
||||||
"advancement.create.flywheel": "工場の心臓部",
|
"advancement.create.flywheel": "工場の心臓部",
|
||||||
"advancement.create.flywheel.desc": "かまどエンジンを勢車に繋ぐ",
|
"advancement.create.flywheel.desc": "かまどエンジンを勢車に繋ぐ",
|
||||||
"advancement.create.overstress_flywheel": "高レベル応力",
|
"advancement.create.overstress_flywheel": "ハイレベル応力",
|
||||||
"advancement.create.overstress_flywheel.desc": "かまどエンジンに超過応力をかける",
|
"advancement.create.overstress_flywheel.desc": "かまどエンジンに超過応力をかける",
|
||||||
"advancement.create.integrated_circuit": "複素数の計算",
|
"advancement.create.integrated_circuit": "複素数の計算",
|
||||||
"advancement.create.integrated_circuit.desc": "集積回路を組み立てる",
|
"advancement.create.integrated_circuit.desc": "集積回路を組み立てる",
|
||||||
|
@ -680,7 +680,7 @@
|
||||||
"create.recipe.automatic_shapeless": "自動不定形クラフト",
|
"create.recipe.automatic_shapeless": "自動不定形クラフト",
|
||||||
"create.recipe.automatic_brewing": "自動醸造",
|
"create.recipe.automatic_brewing": "自動醸造",
|
||||||
"create.recipe.packing": "圧縮",
|
"create.recipe.packing": "圧縮",
|
||||||
"create.recipe.automatic_packing": "自動包装",
|
"create.recipe.automatic_packing": "自動圧縮クラフト",
|
||||||
"create.recipe.sawing": "製材",
|
"create.recipe.sawing": "製材",
|
||||||
"create.recipe.mechanical_crafting": "メカニカルクラフト",
|
"create.recipe.mechanical_crafting": "メカニカルクラフト",
|
||||||
"create.recipe.automatic_shaped": "自動定形クラフト",
|
"create.recipe.automatic_shaped": "自動定形クラフト",
|
||||||
|
@ -823,6 +823,12 @@
|
||||||
"create.gui.goggles.kinetic_stats": "動力の統計:",
|
"create.gui.goggles.kinetic_stats": "動力の統計:",
|
||||||
"create.gui.goggles.at_current_speed": "現在の速度",
|
"create.gui.goggles.at_current_speed": "現在の速度",
|
||||||
"create.gui.goggles.pole_length": "ポールの長さ:",
|
"create.gui.goggles.pole_length": "ポールの長さ:",
|
||||||
|
"create.gui.assembly.exception": "UNLOCALIZED: This Contraption was unable to assemble:",
|
||||||
|
"create.gui.assembly.exception.unmovableBlock": "UNLOCALIZED: Unmovable Block (%4$s) at [%1$s %2$s %3$s]",
|
||||||
|
"create.gui.assembly.exception.chunkNotLoaded": "UNLOCALIZED: The Block at [%1$s %2$s %3$s] was not in a loaded chunk",
|
||||||
|
"create.gui.assembly.exception.structureTooLarge": "UNLOCALIZED: There are too many Blocks included in the contraption.\nThe configured maximum is: %1$s",
|
||||||
|
"create.gui.assembly.exception.tooManyPistonPoles": "UNLOCALIZED: There are too many extension Poles attached to this Piston.\nThe configured maximum is: %1$s",
|
||||||
|
"create.gui.assembly.exception.noPistonPoles": "UNLOCALIZED: The Piston is missing some extension Poles",
|
||||||
"create.gui.gauge.info_header": "計器の情報:",
|
"create.gui.gauge.info_header": "計器の情報:",
|
||||||
"create.gui.speedometer.title": "回転速度",
|
"create.gui.speedometer.title": "回転速度",
|
||||||
"create.gui.stressometer.title": "ネットワークの応力",
|
"create.gui.stressometer.title": "ネットワークの応力",
|
||||||
|
@ -830,7 +836,7 @@
|
||||||
"create.gui.stressometer.overstressed": "超過応力",
|
"create.gui.stressometer.overstressed": "超過応力",
|
||||||
"create.gui.stressometer.no_rotation": "回転なし",
|
"create.gui.stressometer.no_rotation": "回転なし",
|
||||||
"create.gui.contraptions.not_fast_enough": "この %1$s は_十分な_回転を_していない_ようです。",
|
"create.gui.contraptions.not_fast_enough": "この %1$s は_十分な_回転を_していない_ようです。",
|
||||||
"create.gui.contraptions.network_overstressed": "この仕掛けは_超過応力_のようです。さらに原動機を追加するか、_応力_の影響が大きい機械のスピードを_下げて_ください。",
|
"create.gui.contraptions.network_overstressed": "この仕掛けは_超過応力_のようです。さらに原動機を追加するか、_応力_の影響が大きい機械の速度を_下げて_ください。",
|
||||||
"create.gui.adjustable_crate.title": "可変クレート",
|
"create.gui.adjustable_crate.title": "可変クレート",
|
||||||
"create.gui.adjustable_crate.storageSpace": "収納スペース",
|
"create.gui.adjustable_crate.storageSpace": "収納スペース",
|
||||||
"create.gui.stockpile_switch.title": "在庫スイッチ",
|
"create.gui.stockpile_switch.title": "在庫スイッチ",
|
||||||
|
@ -1030,7 +1036,7 @@
|
||||||
"create.gui.attribute_filter.selected_attributes": "選択された属性:",
|
"create.gui.attribute_filter.selected_attributes": "選択された属性:",
|
||||||
"create.gui.attribute_filter.add_attribute": "属性をリストに追加する",
|
"create.gui.attribute_filter.add_attribute": "属性をリストに追加する",
|
||||||
"create.gui.attribute_filter.add_inverted_attribute": "反属性をリストに追加する",
|
"create.gui.attribute_filter.add_inverted_attribute": "反属性をリストに追加する",
|
||||||
"create.gui.attribute_filter.allow_list_disjunctive": "ホワイトリスト(どれか)",
|
"create.gui.attribute_filter.allow_list_disjunctive": "ホワイトリスト(いずれか)",
|
||||||
"create.gui.attribute_filter.allow_list_disjunctive.description": "選択した属性のいずれかを持っている場合、アイテムは通り抜けます。",
|
"create.gui.attribute_filter.allow_list_disjunctive.description": "選択した属性のいずれかを持っている場合、アイテムは通り抜けます。",
|
||||||
"create.gui.attribute_filter.allow_list_conjunctive": "ホワイトリスト(全て)",
|
"create.gui.attribute_filter.allow_list_conjunctive": "ホワイトリスト(全て)",
|
||||||
"create.gui.attribute_filter.allow_list_conjunctive.description": "選択した属性をすべてを持っている場合、アイテムは通り抜けます。",
|
"create.gui.attribute_filter.allow_list_conjunctive.description": "選択した属性をすべてを持っている場合、アイテムは通り抜けます。",
|
||||||
|
@ -1046,12 +1052,12 @@
|
||||||
"create.tooltip.speedRequirement.none": "無し",
|
"create.tooltip.speedRequirement.none": "無し",
|
||||||
"create.tooltip.speedRequirement.medium": "中速",
|
"create.tooltip.speedRequirement.medium": "中速",
|
||||||
"create.tooltip.speedRequirement.high": "高速",
|
"create.tooltip.speedRequirement.high": "高速",
|
||||||
"create.tooltip.stressImpact": "応力への影響: %1$s",
|
"create.tooltip.stressImpact": "応力の影響: %1$s",
|
||||||
"create.tooltip.stressImpact.low": "低",
|
"create.tooltip.stressImpact.low": "低",
|
||||||
"create.tooltip.stressImpact.medium": "中",
|
"create.tooltip.stressImpact.medium": "中",
|
||||||
"create.tooltip.stressImpact.high": "高",
|
"create.tooltip.stressImpact.high": "高",
|
||||||
"create.tooltip.stressImpact.overstressed": "超過応力",
|
"create.tooltip.stressImpact.overstressed": "超過応力",
|
||||||
"create.tooltip.capacityProvided": "応力許容量: %1$s",
|
"create.tooltip.capacityProvided": "応力の容量: %1$s",
|
||||||
"create.tooltip.capacityProvided.low": "小",
|
"create.tooltip.capacityProvided.low": "小",
|
||||||
"create.tooltip.capacityProvided.medium": "中",
|
"create.tooltip.capacityProvided.medium": "中",
|
||||||
"create.tooltip.capacityProvided.high": "大",
|
"create.tooltip.capacityProvided.high": "大",
|
||||||
|
@ -1119,7 +1125,7 @@
|
||||||
"create.command.killTPSCommand.argument.tickTime": "tickTime",
|
"create.command.killTPSCommand.argument.tickTime": "tickTime",
|
||||||
|
|
||||||
"create.subtitle.schematicannon_launch_block": "概略図砲が発射する",
|
"create.subtitle.schematicannon_launch_block": "概略図砲が発射する",
|
||||||
"create.subtitle.schematicannon_finish": "概略図砲が完了する",
|
"create.subtitle.schematicannon_finish": "概略図砲が作業を終える",
|
||||||
"create.subtitle.slime_added": "スライムがぐしゃっとつぶれる",
|
"create.subtitle.slime_added": "スライムがぐしゃっとつぶれる",
|
||||||
"create.subtitle.mechanical_press_activation": "メカニカルプレスが作動する",
|
"create.subtitle.mechanical_press_activation": "メカニカルプレスが作動する",
|
||||||
"create.subtitle.mechanical_press_item_break": "金属がガチャンと鳴る",
|
"create.subtitle.mechanical_press_item_break": "金属がガチャンと鳴る",
|
||||||
|
@ -1180,7 +1186,7 @@
|
||||||
"block.create.brass_funnel.tooltip.behaviour3": "下向きホッパーのように、_アイテム_を_下方向_に_移動_させます。",
|
"block.create.brass_funnel.tooltip.behaviour3": "下向きホッパーのように、_アイテム_を_下方向_に_移動_させます。",
|
||||||
|
|
||||||
"block.create.brass_tunnel.tooltip": "真鍮トンネル",
|
"block.create.brass_tunnel.tooltip": "真鍮トンネル",
|
||||||
"block.create.brass_tunnel.tooltip.summary": "派手な_メカニカルベルト_の保護カバー!_真鍮トンネル_にはアイテムの_フィルター機能_や、_分割機能_の設定項目も多数用意されています。",
|
"block.create.brass_tunnel.tooltip.summary": "オシャレな_メカニカルベルト_の保護カバー!_真鍮トンネル_にはアイテムの_フィルター機能_や、_分割機能_の設定項目も多数用意されています。",
|
||||||
"block.create.brass_tunnel.tooltip.condition1": "並べて設置したとき",
|
"block.create.brass_tunnel.tooltip.condition1": "並べて設置したとき",
|
||||||
"block.create.brass_tunnel.tooltip.behaviour1": "_真鍮トンネル_は相互に接続し、ある_メカニカルベルト_のアイテムを別の_メカニカルベルト_に送ったりできるようにします。",
|
"block.create.brass_tunnel.tooltip.behaviour1": "_真鍮トンネル_は相互に接続し、ある_メカニカルベルト_のアイテムを別の_メカニカルベルト_に送ったりできるようにします。",
|
||||||
"block.create.brass_tunnel.tooltip.condition2": "フィルター機能",
|
"block.create.brass_tunnel.tooltip.condition2": "フィルター機能",
|
||||||
|
@ -1238,14 +1244,14 @@
|
||||||
"block.create.hose_pulley.tooltip": "ホースプーリー",
|
"block.create.hose_pulley.tooltip": "ホースプーリー",
|
||||||
"block.create.hose_pulley.tooltip.summary": "ワールドの大量の_液体_を_吸引_したり、_放出_したりするのに使います。",
|
"block.create.hose_pulley.tooltip.summary": "ワールドの大量の_液体_を_吸引_したり、_放出_したりするのに使います。",
|
||||||
"block.create.hose_pulley.tooltip.condition1": "回転したとき",
|
"block.create.hose_pulley.tooltip.condition1": "回転したとき",
|
||||||
"block.create.hose_pulley.tooltip.behaviour1": "ホースを_上げ下げ_して、どの程度の_高さ_まで_吸引_や_排出_を行うか決めます。",
|
"block.create.hose_pulley.tooltip.behaviour1": "ホースを_上げ下げ_して、どの程度の_高さ_まで_吸引_や_放出_を行うか決めます。",
|
||||||
"block.create.hose_pulley.tooltip.condition2": "プーリーから液体が吸い込まれたとき",
|
"block.create.hose_pulley.tooltip.condition2": "プーリーから液体が吸い込まれたとき",
|
||||||
"block.create.hose_pulley.tooltip.behaviour2": "ホースの端がおろされた本体から_液体_ブロックを_吸引_し始めます。非常に_大量_の液体は_無限_と_みなされます_。",
|
"block.create.hose_pulley.tooltip.behaviour2": "ホースの端がおろされた本体から_液体_ブロックを_吸引_し始めます。非常に_大量_の液体は_無限_と_みなされます_。",
|
||||||
"block.create.hose_pulley.tooltip.condition3": "液体がプーリーに押しこまれたとき",
|
"block.create.hose_pulley.tooltip.condition3": "液体がプーリーに押しこまれたとき",
|
||||||
"block.create.hose_pulley.tooltip.behaviour3": "ホースの端の_高さ_まで、_液体_の_放出_を始めます。",
|
"block.create.hose_pulley.tooltip.behaviour3": "ホースの端の_高さ_まで、_液体_の_放出_を始めます。",
|
||||||
|
|
||||||
"block.create.fluid_tank.tooltip": "液体タンク",
|
"block.create.fluid_tank.tooltip": "液体タンク",
|
||||||
"block.create.fluid_tank.tooltip.summary": "あなたのお気に入りの_液体_をすべて_貯蔵_します。縦横に並べて大きさを調整できます。",
|
"block.create.fluid_tank.tooltip.summary": "あなたのお気に入りのあらゆる_液体_を_貯蔵_できます。縦横に並べて大きさを調整できます。",
|
||||||
"block.create.fluid_tank.tooltip.condition1": "レンチで右クリックしたとき",
|
"block.create.fluid_tank.tooltip.condition1": "レンチで右クリックしたとき",
|
||||||
"block.create.fluid_tank.tooltip.behaviour1": "窓の設定を変更します。",
|
"block.create.fluid_tank.tooltip.behaviour1": "窓の設定を変更します。",
|
||||||
|
|
||||||
|
@ -1310,7 +1316,7 @@
|
||||||
"item.create.handheld_blockzapper.tooltip": "携帯ブロックザッパー",
|
"item.create.handheld_blockzapper.tooltip": "携帯ブロックザッパー",
|
||||||
"item.create.handheld_blockzapper.tooltip.summary": "離れた場所にブロックを設置または交換する新しいガジェット。",
|
"item.create.handheld_blockzapper.tooltip.summary": "離れた場所にブロックを設置または交換する新しいガジェット。",
|
||||||
"item.create.handheld_blockzapper.tooltip.control1": "ブロックを左クリックしたとき",
|
"item.create.handheld_blockzapper.tooltip.control1": "ブロックを左クリックしたとき",
|
||||||
"item.create.handheld_blockzapper.tooltip.action1": "UNLOCALIZED: Sets blocks placed by the tool to the targeted block.",
|
"item.create.handheld_blockzapper.tooltip.action1": "ターゲットのブロックをこのツールに設定します。",
|
||||||
"item.create.handheld_blockzapper.tooltip.control2": "ブロックを右クリックしたとき",
|
"item.create.handheld_blockzapper.tooltip.control2": "ブロックを右クリックしたとき",
|
||||||
"item.create.handheld_blockzapper.tooltip.action2": "ターゲットブロックを_配置_または_置換_します。",
|
"item.create.handheld_blockzapper.tooltip.action2": "ターゲットブロックを_配置_または_置換_します。",
|
||||||
"item.create.handheld_blockzapper.tooltip.control3": "スニークしながら右クリックしたとき。",
|
"item.create.handheld_blockzapper.tooltip.control3": "スニークしながら右クリックしたとき。",
|
||||||
|
@ -1391,7 +1397,7 @@
|
||||||
"block.create.cogwheel.tooltip": "歯車",
|
"block.create.cogwheel.tooltip": "歯車",
|
||||||
"block.create.cogwheel.tooltip.summary": "_回転_を直線で、または隣接する_歯車_に_伝達_します。",
|
"block.create.cogwheel.tooltip.summary": "_回転_を直線で、または隣接する_歯車_に_伝達_します。",
|
||||||
|
|
||||||
"block.create.large_cogwheel.tooltip": "大型歯車",
|
"block.create.large_cogwheel.tooltip": "大きな歯車",
|
||||||
"block.create.large_cogwheel.tooltip.summary": "小さな歯車に接続したときに_回転速度_を_変更_できる歯車の大型バージョン。",
|
"block.create.large_cogwheel.tooltip.summary": "小さな歯車に接続したときに_回転速度_を_変更_できる歯車の大型バージョン。",
|
||||||
|
|
||||||
"block.create.encased_shaft.tooltip": "ケース入りシャフト",
|
"block.create.encased_shaft.tooltip": "ケース入りシャフト",
|
||||||
|
@ -1549,7 +1555,7 @@
|
||||||
"block.create.portable_fluid_interface.tooltip.behaviour2": "アクティブな接続を即座に_切断_します。",
|
"block.create.portable_fluid_interface.tooltip.behaviour2": "アクティブな接続を即座に_切断_します。",
|
||||||
|
|
||||||
"block.create.rotation_speed_controller.tooltip": "回転速度コントローラー",
|
"block.create.rotation_speed_controller.tooltip": "回転速度コントローラー",
|
||||||
"block.create.rotation_speed_controller.tooltip.summary": "回転を任意の速度にスピードアップまたはスローダウンさせることができる_設定_可能な_伝達機_。",
|
"block.create.rotation_speed_controller.tooltip.summary": "回転を任意の速度に上げたり下げたりさせることができる_設定_可能な_伝達機_。",
|
||||||
"block.create.rotation_speed_controller.tooltip.condition1": "大きな歯車を取り付けたとき",
|
"block.create.rotation_speed_controller.tooltip.condition1": "大きな歯車を取り付けたとき",
|
||||||
"block.create.rotation_speed_controller.tooltip.behaviour1": "入ってくる回転力を歯車に伝達して、目標とする_速度_に_合わせ_ようとします。_歯車_はコントローラの_上_に_取り付ける_必要があります。",
|
"block.create.rotation_speed_controller.tooltip.behaviour1": "入ってくる回転力を歯車に伝達して、目標とする_速度_に_合わせ_ようとします。_歯車_はコントローラの_上_に_取り付ける_必要があります。",
|
||||||
|
|
||||||
|
@ -1678,7 +1684,7 @@
|
||||||
"block.create.redstone_link.tooltip.action2": "_受信_モードと_送信_モードを切り替えます。",
|
"block.create.redstone_link.tooltip.action2": "_受信_モードと_送信_モードを切り替えます。",
|
||||||
|
|
||||||
"block.create.nixie_tube.tooltip": "ニキシー管",
|
"block.create.nixie_tube.tooltip": "ニキシー管",
|
||||||
"block.create.nixie_tube.tooltip.summary": "派手にレッドストーン強度と文字を表示します。",
|
"block.create.nixie_tube.tooltip.summary": "オシャレにレッドストーン強度と文字を表示します。",
|
||||||
"block.create.nixie_tube.tooltip.condition1": "レッドストーン信号を受けたとき",
|
"block.create.nixie_tube.tooltip.condition1": "レッドストーン信号を受けたとき",
|
||||||
"block.create.nixie_tube.tooltip.behaviour1": "現在のレッドストーンの_信号強度_を表示します。",
|
"block.create.nixie_tube.tooltip.behaviour1": "現在のレッドストーンの_信号強度_を表示します。",
|
||||||
"block.create.nixie_tube.tooltip.condition2": "名札を使ったとき",
|
"block.create.nixie_tube.tooltip.condition2": "名札を使ったとき",
|
||||||
|
@ -1736,12 +1742,12 @@
|
||||||
"block.create.controller_rail.tooltip.condition1": "レッドストーン信号を受けたとき",
|
"block.create.controller_rail.tooltip.condition1": "レッドストーン信号を受けたとき",
|
||||||
"block.create.controller_rail.tooltip.behaviour1": "通過する_トロッコ_を_信号の強度_に対応した速度に_加速_または_減速_します。また、隣接するコントローラレールにレッドストーン信号を伝達します。強度の異なる2つのコントローラレールにレッドストーン信号を供給すると、それらの間のレールはその信号の変化を補間します。",
|
"block.create.controller_rail.tooltip.behaviour1": "通過する_トロッコ_を_信号の強度_に対応した速度に_加速_または_減速_します。また、隣接するコントローラレールにレッドストーン信号を伝達します。強度の異なる2つのコントローラレールにレッドストーン信号を供給すると、それらの間のレールはその信号の変化を補間します。",
|
||||||
|
|
||||||
"block.create.speedometer.tooltip": "スピードメーター",
|
"block.create.speedometer.tooltip": "速度メーター",
|
||||||
"block.create.speedometer.tooltip.summary": "接続された機械の_回転速度_を測定して表示します。_レッドストーンコンパレーター_に対応しています。",
|
"block.create.speedometer.tooltip.summary": "接続された機械の_回転速度_を測定して表示します。_レッドストーンコンパレーター_に対応しています。",
|
||||||
"block.create.speedometer.tooltip.condition1": "回転したとき",
|
"block.create.speedometer.tooltip.condition1": "回転したとき",
|
||||||
"block.create.speedometer.tooltip.behaviour1": "速度レベルに対応する色を表示します。_緑_は低速、_青_は中速、_紫_は高速を示します。一部の機械は、稼働に十分なレベルの速度を必要とします。",
|
"block.create.speedometer.tooltip.behaviour1": "速度レベルに対応する色を表示します。_緑_は低速、_青_は中速、_紫_は高速を示します。一部の機械は、稼働に十分なレベルの速度を必要とします。",
|
||||||
|
|
||||||
"block.create.stressometer.tooltip": "ストレスメーター",
|
"block.create.stressometer.tooltip": "速度メーター",
|
||||||
"block.create.stressometer.tooltip.summary": "接続された動力ネットワーク全体の応力を測定して表示します。_レッドストーンコンパレーター_に対応しています。",
|
"block.create.stressometer.tooltip.summary": "接続された動力ネットワーク全体の応力を測定して表示します。_レッドストーンコンパレーター_に対応しています。",
|
||||||
"block.create.stressometer.tooltip.condition1": "回転したとき",
|
"block.create.stressometer.tooltip.condition1": "回転したとき",
|
||||||
"block.create.stressometer.tooltip.behaviour1": "応力レベルに対応する色を表示します。_過度に応力がかかった(超過応力)ネットワーク_の機械は全て停止します。応力は動力ネットワークに_原動機_を追加することで緩和することができます。",
|
"block.create.stressometer.tooltip.behaviour1": "応力レベルに対応する色を表示します。_過度に応力がかかった(超過応力)ネットワーク_の機械は全て停止します。応力は動力ネットワークに_原動機_を追加することで緩和することができます。",
|
||||||
|
@ -1762,7 +1768,7 @@
|
||||||
"item.create.builders_tea.tooltip.summary": "_やる気_がみなぎる、一日の始まりに最適な飲み物。",
|
"item.create.builders_tea.tooltip.summary": "_やる気_がみなぎる、一日の始まりに最適な飲み物。",
|
||||||
|
|
||||||
"item.create.refined_radiance.tooltip": "洗練された輝き",
|
"item.create.refined_radiance.tooltip": "洗練された輝き",
|
||||||
"item.create.refined_radiance.tooltip.summary": "_吸収した光_から鍛造した色彩素材。",
|
"item.create.refined_radiance.tooltip.summary": "_吸収した輝き_から鍛造した色彩素材。",
|
||||||
|
|
||||||
"item.create.shadow_steel.tooltip": "シャドウスチール",
|
"item.create.shadow_steel.tooltip": "シャドウスチール",
|
||||||
"item.create.shadow_steel.tooltip.summary": "_奈落の虚無_から鍛造した色彩素材。",
|
"item.create.shadow_steel.tooltip.summary": "_奈落の虚無_から鍛造した色彩素材。",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 55",
|
"_": "Missing Localizations: 61",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -823,6 +823,12 @@
|
||||||
"create.gui.goggles.kinetic_stats": "가동 상태:",
|
"create.gui.goggles.kinetic_stats": "가동 상태:",
|
||||||
"create.gui.goggles.at_current_speed": "현재 에너지량",
|
"create.gui.goggles.at_current_speed": "현재 에너지량",
|
||||||
"create.gui.goggles.pole_length": "UNLOCALIZED: Pole Length:",
|
"create.gui.goggles.pole_length": "UNLOCALIZED: Pole Length:",
|
||||||
|
"create.gui.assembly.exception": "UNLOCALIZED: This Contraption was unable to assemble:",
|
||||||
|
"create.gui.assembly.exception.unmovableBlock": "UNLOCALIZED: Unmovable Block (%4$s) at [%1$s %2$s %3$s]",
|
||||||
|
"create.gui.assembly.exception.chunkNotLoaded": "UNLOCALIZED: The Block at [%1$s %2$s %3$s] was not in a loaded chunk",
|
||||||
|
"create.gui.assembly.exception.structureTooLarge": "UNLOCALIZED: There are too many Blocks included in the contraption.\nThe configured maximum is: %1$s",
|
||||||
|
"create.gui.assembly.exception.tooManyPistonPoles": "UNLOCALIZED: There are too many extension Poles attached to this Piston.\nThe configured maximum is: %1$s",
|
||||||
|
"create.gui.assembly.exception.noPistonPoles": "UNLOCALIZED: The Piston is missing some extension Poles",
|
||||||
"create.gui.gauge.info_header": "게이지 정보:",
|
"create.gui.gauge.info_header": "게이지 정보:",
|
||||||
"create.gui.speedometer.title": "회전 속도",
|
"create.gui.speedometer.title": "회전 속도",
|
||||||
"create.gui.stressometer.title": "네트워크 부하",
|
"create.gui.stressometer.title": "네트워크 부하",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 1155",
|
"_": "Missing Localizations: 1161",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -823,6 +823,12 @@
|
||||||
"create.gui.goggles.kinetic_stats": "UNLOCALIZED: Kinetic Stats:",
|
"create.gui.goggles.kinetic_stats": "UNLOCALIZED: Kinetic Stats:",
|
||||||
"create.gui.goggles.at_current_speed": "UNLOCALIZED: at current speed",
|
"create.gui.goggles.at_current_speed": "UNLOCALIZED: at current speed",
|
||||||
"create.gui.goggles.pole_length": "UNLOCALIZED: Pole Length:",
|
"create.gui.goggles.pole_length": "UNLOCALIZED: Pole Length:",
|
||||||
|
"create.gui.assembly.exception": "UNLOCALIZED: This Contraption was unable to assemble:",
|
||||||
|
"create.gui.assembly.exception.unmovableBlock": "UNLOCALIZED: Unmovable Block (%4$s) at [%1$s %2$s %3$s]",
|
||||||
|
"create.gui.assembly.exception.chunkNotLoaded": "UNLOCALIZED: The Block at [%1$s %2$s %3$s] was not in a loaded chunk",
|
||||||
|
"create.gui.assembly.exception.structureTooLarge": "UNLOCALIZED: There are too many Blocks included in the contraption.\nThe configured maximum is: %1$s",
|
||||||
|
"create.gui.assembly.exception.tooManyPistonPoles": "UNLOCALIZED: There are too many extension Poles attached to this Piston.\nThe configured maximum is: %1$s",
|
||||||
|
"create.gui.assembly.exception.noPistonPoles": "UNLOCALIZED: The Piston is missing some extension Poles",
|
||||||
"create.gui.gauge.info_header": "UNLOCALIZED: Gauge Information:",
|
"create.gui.gauge.info_header": "UNLOCALIZED: Gauge Information:",
|
||||||
"create.gui.speedometer.title": "UNLOCALIZED: Rotation Speed",
|
"create.gui.speedometer.title": "UNLOCALIZED: Rotation Speed",
|
||||||
"create.gui.stressometer.title": "UNLOCALIZED: Network Stress",
|
"create.gui.stressometer.title": "UNLOCALIZED: Network Stress",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 1221",
|
"_": "Missing Localizations: 1227",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -823,6 +823,12 @@
|
||||||
"create.gui.goggles.kinetic_stats": "UNLOCALIZED: Kinetic Stats:",
|
"create.gui.goggles.kinetic_stats": "UNLOCALIZED: Kinetic Stats:",
|
||||||
"create.gui.goggles.at_current_speed": "UNLOCALIZED: at current speed",
|
"create.gui.goggles.at_current_speed": "UNLOCALIZED: at current speed",
|
||||||
"create.gui.goggles.pole_length": "UNLOCALIZED: Pole Length:",
|
"create.gui.goggles.pole_length": "UNLOCALIZED: Pole Length:",
|
||||||
|
"create.gui.assembly.exception": "UNLOCALIZED: This Contraption was unable to assemble:",
|
||||||
|
"create.gui.assembly.exception.unmovableBlock": "UNLOCALIZED: Unmovable Block (%4$s) at [%1$s %2$s %3$s]",
|
||||||
|
"create.gui.assembly.exception.chunkNotLoaded": "UNLOCALIZED: The Block at [%1$s %2$s %3$s] was not in a loaded chunk",
|
||||||
|
"create.gui.assembly.exception.structureTooLarge": "UNLOCALIZED: There are too many Blocks included in the contraption.\nThe configured maximum is: %1$s",
|
||||||
|
"create.gui.assembly.exception.tooManyPistonPoles": "UNLOCALIZED: There are too many extension Poles attached to this Piston.\nThe configured maximum is: %1$s",
|
||||||
|
"create.gui.assembly.exception.noPistonPoles": "UNLOCALIZED: The Piston is missing some extension Poles",
|
||||||
"create.gui.gauge.info_header": "UNLOCALIZED: Gauge Information:",
|
"create.gui.gauge.info_header": "UNLOCALIZED: Gauge Information:",
|
||||||
"create.gui.speedometer.title": "UNLOCALIZED: Rotation Speed",
|
"create.gui.speedometer.title": "UNLOCALIZED: Rotation Speed",
|
||||||
"create.gui.stressometer.title": "UNLOCALIZED: Network Stress",
|
"create.gui.stressometer.title": "UNLOCALIZED: Network Stress",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 5",
|
"_": "Missing Localizations: 11",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -823,6 +823,12 @@
|
||||||
"create.gui.goggles.kinetic_stats": "Кинетическая статистика:",
|
"create.gui.goggles.kinetic_stats": "Кинетическая статистика:",
|
||||||
"create.gui.goggles.at_current_speed": "На текущей скорости",
|
"create.gui.goggles.at_current_speed": "На текущей скорости",
|
||||||
"create.gui.goggles.pole_length": "Длина поршня",
|
"create.gui.goggles.pole_length": "Длина поршня",
|
||||||
|
"create.gui.assembly.exception": "UNLOCALIZED: This Contraption was unable to assemble:",
|
||||||
|
"create.gui.assembly.exception.unmovableBlock": "UNLOCALIZED: Unmovable Block (%4$s) at [%1$s %2$s %3$s]",
|
||||||
|
"create.gui.assembly.exception.chunkNotLoaded": "UNLOCALIZED: The Block at [%1$s %2$s %3$s] was not in a loaded chunk",
|
||||||
|
"create.gui.assembly.exception.structureTooLarge": "UNLOCALIZED: There are too many Blocks included in the contraption.\nThe configured maximum is: %1$s",
|
||||||
|
"create.gui.assembly.exception.tooManyPistonPoles": "UNLOCALIZED: There are too many extension Poles attached to this Piston.\nThe configured maximum is: %1$s",
|
||||||
|
"create.gui.assembly.exception.noPistonPoles": "UNLOCALIZED: The Piston is missing some extension Poles",
|
||||||
"create.gui.gauge.info_header": "Калибровочная информация:",
|
"create.gui.gauge.info_header": "Калибровочная информация:",
|
||||||
"create.gui.speedometer.title": "Скорость вращения",
|
"create.gui.speedometer.title": "Скорость вращения",
|
||||||
"create.gui.stressometer.title": "Сетевой момент",
|
"create.gui.stressometer.title": "Сетевой момент",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 3",
|
"_": "Missing Localizations: 9",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -823,6 +823,12 @@
|
||||||
"create.gui.goggles.kinetic_stats": "动力学状态:",
|
"create.gui.goggles.kinetic_stats": "动力学状态:",
|
||||||
"create.gui.goggles.at_current_speed": "当前速度应力值",
|
"create.gui.goggles.at_current_speed": "当前速度应力值",
|
||||||
"create.gui.goggles.pole_length": "活塞杆长度:",
|
"create.gui.goggles.pole_length": "活塞杆长度:",
|
||||||
|
"create.gui.assembly.exception": "UNLOCALIZED: This Contraption was unable to assemble:",
|
||||||
|
"create.gui.assembly.exception.unmovableBlock": "UNLOCALIZED: Unmovable Block (%4$s) at [%1$s %2$s %3$s]",
|
||||||
|
"create.gui.assembly.exception.chunkNotLoaded": "UNLOCALIZED: The Block at [%1$s %2$s %3$s] was not in a loaded chunk",
|
||||||
|
"create.gui.assembly.exception.structureTooLarge": "UNLOCALIZED: There are too many Blocks included in the contraption.\nThe configured maximum is: %1$s",
|
||||||
|
"create.gui.assembly.exception.tooManyPistonPoles": "UNLOCALIZED: There are too many extension Poles attached to this Piston.\nThe configured maximum is: %1$s",
|
||||||
|
"create.gui.assembly.exception.noPistonPoles": "UNLOCALIZED: The Piston is missing some extension Poles",
|
||||||
"create.gui.gauge.info_header": "仪表信息:",
|
"create.gui.gauge.info_header": "仪表信息:",
|
||||||
"create.gui.speedometer.title": "旋转速度",
|
"create.gui.speedometer.title": "旋转速度",
|
||||||
"create.gui.stressometer.title": "网络应力",
|
"create.gui.stressometer.title": "网络应力",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 8",
|
"_": "Missing Localizations: 14",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -823,6 +823,12 @@
|
||||||
"create.gui.goggles.kinetic_stats": "機械學狀態:",
|
"create.gui.goggles.kinetic_stats": "機械學狀態:",
|
||||||
"create.gui.goggles.at_current_speed": "現在速度動能值",
|
"create.gui.goggles.at_current_speed": "現在速度動能值",
|
||||||
"create.gui.goggles.pole_length": "UNLOCALIZED: Pole Length:",
|
"create.gui.goggles.pole_length": "UNLOCALIZED: Pole Length:",
|
||||||
|
"create.gui.assembly.exception": "UNLOCALIZED: This Contraption was unable to assemble:",
|
||||||
|
"create.gui.assembly.exception.unmovableBlock": "UNLOCALIZED: Unmovable Block (%4$s) at [%1$s %2$s %3$s]",
|
||||||
|
"create.gui.assembly.exception.chunkNotLoaded": "UNLOCALIZED: The Block at [%1$s %2$s %3$s] was not in a loaded chunk",
|
||||||
|
"create.gui.assembly.exception.structureTooLarge": "UNLOCALIZED: There are too many Blocks included in the contraption.\nThe configured maximum is: %1$s",
|
||||||
|
"create.gui.assembly.exception.tooManyPistonPoles": "UNLOCALIZED: There are too many extension Poles attached to this Piston.\nThe configured maximum is: %1$s",
|
||||||
|
"create.gui.assembly.exception.noPistonPoles": "UNLOCALIZED: The Piston is missing some extension Poles",
|
||||||
"create.gui.gauge.info_header": "儀表訊息:",
|
"create.gui.gauge.info_header": "儀表訊息:",
|
||||||
"create.gui.speedometer.title": "旋轉速度",
|
"create.gui.speedometer.title": "旋轉速度",
|
||||||
"create.gui.stressometer.title": "網路動能",
|
"create.gui.stressometer.title": "網路動能",
|
||||||
|
|
|
@ -7,15 +7,21 @@ import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.function.Supplier;
|
||||||
|
|
||||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||||
|
import com.simibubi.create.content.contraptions.base.KineticRenderMaterials;
|
||||||
|
import com.simibubi.create.content.contraptions.base.RotatingData;
|
||||||
import com.simibubi.create.content.contraptions.fluids.FluidTransportBehaviour.AttachmentTypes;
|
import com.simibubi.create.content.contraptions.fluids.FluidTransportBehaviour.AttachmentTypes;
|
||||||
import com.simibubi.create.content.contraptions.processing.burner.BlazeBurnerBlock.HeatLevel;
|
import com.simibubi.create.content.contraptions.processing.burner.BlazeBurnerBlock.HeatLevel;
|
||||||
|
import com.simibubi.create.content.contraptions.relays.belt.BeltData;
|
||||||
|
import com.simibubi.create.foundation.render.SuperByteBuffer;
|
||||||
|
import com.simibubi.create.foundation.render.backend.instancing.InstancedModel;
|
||||||
|
import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer;
|
||||||
import com.simibubi.create.foundation.utility.AngleHelper;
|
import com.simibubi.create.foundation.utility.AngleHelper;
|
||||||
import com.simibubi.create.foundation.utility.Iterate;
|
import com.simibubi.create.foundation.utility.Iterate;
|
||||||
import com.simibubi.create.foundation.utility.Lang;
|
import com.simibubi.create.foundation.utility.Lang;
|
||||||
import com.simibubi.create.foundation.utility.MatrixStacker;
|
import com.simibubi.create.foundation.utility.MatrixStacker;
|
||||||
import com.simibubi.create.foundation.utility.SuperByteBuffer;
|
|
||||||
|
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.client.renderer.model.IBakedModel;
|
import net.minecraft.client.renderer.model.IBakedModel;
|
||||||
|
@ -223,4 +229,30 @@ public class AllBlockPartials {
|
||||||
return CreateClient.bufferCache.renderDirectionalPartial(this, referenceState, facing, ms);
|
return CreateClient.bufferCache.renderDirectionalPartial(this, referenceState, facing, ms);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public InstancedModel<RotatingData> renderOnRotating(InstancedTileRenderer<?> ctx, BlockState referenceState) {
|
||||||
|
return ctx.getMaterial(KineticRenderMaterials.ROTATING).getModel(this, referenceState);
|
||||||
|
}
|
||||||
|
|
||||||
|
public InstancedModel<BeltData> renderOnBelt(InstancedTileRenderer<?> ctx, BlockState referenceState) {
|
||||||
|
return ctx.getMaterial(KineticRenderMaterials.BELTS).getModel(this, referenceState);
|
||||||
|
}
|
||||||
|
|
||||||
|
public InstancedModel<RotatingData> renderOnDirectionalSouthRotating(InstancedTileRenderer<?> dispatcher, BlockState referenceState) {
|
||||||
|
Direction facing = referenceState.get(FACING);
|
||||||
|
return renderOnDirectionalSouthRotating(dispatcher, referenceState, facing);
|
||||||
|
}
|
||||||
|
|
||||||
|
public InstancedModel<RotatingData> renderOnDirectionalSouthRotating(InstancedTileRenderer<?> dispatcher, BlockState referenceState, Direction facing) {
|
||||||
|
Supplier<MatrixStack> ms = () -> {
|
||||||
|
MatrixStack stack = new MatrixStack();
|
||||||
|
MatrixStacker.of(stack)
|
||||||
|
.centre()
|
||||||
|
.rotateY(AngleHelper.horizontalAngle(facing))
|
||||||
|
.rotateX(AngleHelper.verticalAngle(facing))
|
||||||
|
.unCentre();
|
||||||
|
return stack;
|
||||||
|
};
|
||||||
|
return dispatcher.getMaterial(KineticRenderMaterials.ROTATING).getModel(this, referenceState, facing, ms);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
package com.simibubi.create;
|
package com.simibubi.create;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
import com.simibubi.create.foundation.block.IBlockVertexColor;
|
import com.simibubi.create.foundation.block.IBlockVertexColor;
|
||||||
import com.simibubi.create.foundation.block.render.ColoredVertexModel;
|
import com.simibubi.create.foundation.block.render.ColoredVertexModel;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.block.RedstoneWireBlock;
|
import net.minecraft.block.RedstoneWireBlock;
|
||||||
|
@ -18,9 +22,6 @@ import net.minecraft.world.GrassColors;
|
||||||
import net.minecraft.world.ILightReader;
|
import net.minecraft.world.ILightReader;
|
||||||
import net.minecraft.world.biome.BiomeColors;
|
import net.minecraft.world.biome.BiomeColors;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public class AllColorHandlers {
|
public class AllColorHandlers {
|
||||||
|
|
||||||
private final Map<Block, IBlockVertexColor> coloredVertexBlocks = new HashMap<>();
|
private final Map<Block, IBlockVertexColor> coloredVertexBlocks = new HashMap<>();
|
||||||
|
|
|
@ -2,12 +2,11 @@ package com.simibubi.create;
|
||||||
|
|
||||||
import com.simibubi.create.content.contraptions.components.actors.SeatEntity;
|
import com.simibubi.create.content.contraptions.components.actors.SeatEntity;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.AbstractContraptionEntity;
|
import com.simibubi.create.content.contraptions.components.structureMovement.AbstractContraptionEntity;
|
||||||
|
import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionEntityRenderer;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.ControlledContraptionEntity;
|
import com.simibubi.create.content.contraptions.components.structureMovement.ControlledContraptionEntity;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.ControlledContraptionEntityRenderer;
|
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.OrientedContraptionEntity;
|
import com.simibubi.create.content.contraptions.components.structureMovement.OrientedContraptionEntity;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.OrientedContraptionEntityRenderer;
|
import com.simibubi.create.content.contraptions.components.structureMovement.OrientedContraptionEntityRenderer;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.gantry.GantryContraptionEntity;
|
import com.simibubi.create.content.contraptions.components.structureMovement.gantry.GantryContraptionEntity;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.gantry.GantryContraptionEntityRenderer;
|
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.glue.SuperGlueEntity;
|
import com.simibubi.create.content.contraptions.components.structureMovement.glue.SuperGlueEntity;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.glue.SuperGlueRenderer;
|
import com.simibubi.create.content.contraptions.components.structureMovement.glue.SuperGlueRenderer;
|
||||||
import com.simibubi.create.foundation.utility.Lang;
|
import com.simibubi.create.foundation.utility.Lang;
|
||||||
|
@ -62,11 +61,11 @@ public class AllEntityTypes {
|
||||||
@OnlyIn(value = Dist.CLIENT)
|
@OnlyIn(value = Dist.CLIENT)
|
||||||
public static void registerRenderers() {
|
public static void registerRenderers() {
|
||||||
RenderingRegistry.registerEntityRenderingHandler(CONTROLLED_CONTRAPTION.get(),
|
RenderingRegistry.registerEntityRenderingHandler(CONTROLLED_CONTRAPTION.get(),
|
||||||
ControlledContraptionEntityRenderer::new);
|
ContraptionEntityRenderer::new);
|
||||||
RenderingRegistry.registerEntityRenderingHandler(ORIENTED_CONTRAPTION.get(),
|
RenderingRegistry.registerEntityRenderingHandler(ORIENTED_CONTRAPTION.get(),
|
||||||
OrientedContraptionEntityRenderer::new);
|
OrientedContraptionEntityRenderer::new);
|
||||||
RenderingRegistry.registerEntityRenderingHandler(GANTRY_CONTRAPTION.get(),
|
RenderingRegistry.registerEntityRenderingHandler(GANTRY_CONTRAPTION.get(),
|
||||||
GantryContraptionEntityRenderer::new);
|
ContraptionEntityRenderer::new);
|
||||||
RenderingRegistry.registerEntityRenderingHandler(SUPER_GLUE.get(), SuperGlueRenderer::new);
|
RenderingRegistry.registerEntityRenderingHandler(SUPER_GLUE.get(), SuperGlueRenderer::new);
|
||||||
RenderingRegistry.registerEntityRenderingHandler(SEAT.get(), SeatEntity.Render::new);
|
RenderingRegistry.registerEntityRenderingHandler(SEAT.get(), SeatEntity.Render::new);
|
||||||
}
|
}
|
||||||
|
|
|
@ -284,6 +284,7 @@ public class AllItems {
|
||||||
.register();
|
.register();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unused")
|
||||||
private static ItemEntry<HiddenIngredientItem> hiddenIngredient(String name) {
|
private static ItemEntry<HiddenIngredientItem> hiddenIngredient(String name) {
|
||||||
return REGISTRATE.item(name, HiddenIngredientItem::new)
|
return REGISTRATE.item(name, HiddenIngredientItem::new)
|
||||||
.register();
|
.register();
|
||||||
|
|
|
@ -51,9 +51,9 @@ public class AllSpriteShifts {
|
||||||
FLUID_TANK = getCT(CTType.CROSS, "fluid_tank"),
|
FLUID_TANK = getCT(CTType.CROSS, "fluid_tank"),
|
||||||
CREATIVE_FLUID_TANK = getCT(CTType.CROSS, "creative_fluid_tank");
|
CREATIVE_FLUID_TANK = getCT(CTType.CROSS, "creative_fluid_tank");
|
||||||
|
|
||||||
public static final SpriteShiftEntry BELT = SpriteShifter.get("block/belt", "block/belt_animated"),
|
public static final SpriteShiftEntry BELT = SpriteShifter.get("block/belt", "block/belt_scroll"),
|
||||||
BELT_OFFSET = SpriteShifter.get("block/belt_offset", "block/belt_animated"),
|
BELT_OFFSET = SpriteShifter.get("block/belt_offset", "block/belt_scroll"),
|
||||||
BELT_DIAGONAL = SpriteShifter.get("block/belt_diagonal", "block/belt_diagonal_animated"),
|
BELT_DIAGONAL = SpriteShifter.get("block/belt_diagonal", "block/belt_diagonal_scroll"),
|
||||||
ANDESIDE_BELT_CASING = SpriteShifter.get("block/brass_casing_belt", "block/andesite_casing_belt"),
|
ANDESIDE_BELT_CASING = SpriteShifter.get("block/brass_casing_belt", "block/andesite_casing_belt"),
|
||||||
CRAFTER_THINGIES = SpriteShifter.get("block/crafter_thingies", "block/crafter_thingies");
|
CRAFTER_THINGIES = SpriteShifter.get("block/crafter_thingies", "block/crafter_thingies");
|
||||||
|
|
||||||
|
@ -92,9 +92,9 @@ public class AllSpriteShifts {
|
||||||
|
|
||||||
for (DyeColor color : DyeColor.values()) {
|
for (DyeColor color : DyeColor.values()) {
|
||||||
String id = color.getName();
|
String id = color.getName();
|
||||||
DYED_BELTS.put(color, SpriteShifter.get("block/belt", "block/belt/" + id));
|
DYED_BELTS.put(color, SpriteShifter.get("block/belt", "block/belt/" + id + "_scroll"));
|
||||||
DYED_OFFSET_BELTS.put(color, SpriteShifter.get("block/belt_offset", "block/belt/" + id));
|
DYED_OFFSET_BELTS.put(color, SpriteShifter.get("block/belt_offset", "block/belt/" + id + "_scroll"));
|
||||||
DYED_DIAGONAL_BELTS.put(color, SpriteShifter.get("block/belt_diagonal", "block/belt/" + id + "_diagonal"));
|
DYED_DIAGONAL_BELTS.put(color, SpriteShifter.get("block/belt_diagonal", "block/belt/" + id + "_diagonal_scroll"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,12 @@
|
||||||
package com.simibubi.create;
|
package com.simibubi.create;
|
||||||
|
|
||||||
|
import com.simibubi.create.content.contraptions.base.BackHalfShaftInstance;
|
||||||
|
import com.simibubi.create.content.contraptions.base.HalfShaftInstance;
|
||||||
|
import com.simibubi.create.content.contraptions.base.HorizontalHalfShaftInstance;
|
||||||
import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer;
|
import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer;
|
||||||
|
import com.simibubi.create.content.contraptions.base.ShaftlessCogInstance;
|
||||||
|
import com.simibubi.create.content.contraptions.base.SingleRotatingInstance;
|
||||||
|
import com.simibubi.create.content.contraptions.components.actors.DrillInstance;
|
||||||
import com.simibubi.create.content.contraptions.components.actors.DrillRenderer;
|
import com.simibubi.create.content.contraptions.components.actors.DrillRenderer;
|
||||||
import com.simibubi.create.content.contraptions.components.actors.DrillTileEntity;
|
import com.simibubi.create.content.contraptions.components.actors.DrillTileEntity;
|
||||||
import com.simibubi.create.content.contraptions.components.actors.HarvesterRenderer;
|
import com.simibubi.create.content.contraptions.components.actors.HarvesterRenderer;
|
||||||
|
@ -10,6 +16,7 @@ import com.simibubi.create.content.contraptions.components.actors.PortableItemIn
|
||||||
import com.simibubi.create.content.contraptions.components.actors.PortableStorageInterfaceRenderer;
|
import com.simibubi.create.content.contraptions.components.actors.PortableStorageInterfaceRenderer;
|
||||||
import com.simibubi.create.content.contraptions.components.clock.CuckooClockRenderer;
|
import com.simibubi.create.content.contraptions.components.clock.CuckooClockRenderer;
|
||||||
import com.simibubi.create.content.contraptions.components.clock.CuckooClockTileEntity;
|
import com.simibubi.create.content.contraptions.components.clock.CuckooClockTileEntity;
|
||||||
|
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.MechanicalCrafterRenderer;
|
||||||
import com.simibubi.create.content.contraptions.components.crafter.MechanicalCrafterTileEntity;
|
import com.simibubi.create.content.contraptions.components.crafter.MechanicalCrafterTileEntity;
|
||||||
import com.simibubi.create.content.contraptions.components.crank.HandCrankRenderer;
|
import com.simibubi.create.content.contraptions.components.crank.HandCrankRenderer;
|
||||||
|
@ -20,11 +27,14 @@ import com.simibubi.create.content.contraptions.components.deployer.DeployerRend
|
||||||
import com.simibubi.create.content.contraptions.components.deployer.DeployerTileEntity;
|
import com.simibubi.create.content.contraptions.components.deployer.DeployerTileEntity;
|
||||||
import com.simibubi.create.content.contraptions.components.fan.EncasedFanRenderer;
|
import com.simibubi.create.content.contraptions.components.fan.EncasedFanRenderer;
|
||||||
import com.simibubi.create.content.contraptions.components.fan.EncasedFanTileEntity;
|
import com.simibubi.create.content.contraptions.components.fan.EncasedFanTileEntity;
|
||||||
|
import com.simibubi.create.content.contraptions.components.fan.FanInstance;
|
||||||
import com.simibubi.create.content.contraptions.components.fan.NozzleTileEntity;
|
import com.simibubi.create.content.contraptions.components.fan.NozzleTileEntity;
|
||||||
|
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.flywheel.FlywheelRenderer;
|
||||||
import com.simibubi.create.content.contraptions.components.flywheel.FlywheelTileEntity;
|
import com.simibubi.create.content.contraptions.components.flywheel.FlywheelTileEntity;
|
||||||
import com.simibubi.create.content.contraptions.components.flywheel.engine.EngineRenderer;
|
import com.simibubi.create.content.contraptions.components.flywheel.engine.EngineRenderer;
|
||||||
import com.simibubi.create.content.contraptions.components.flywheel.engine.FurnaceEngineTileEntity;
|
import com.simibubi.create.content.contraptions.components.flywheel.engine.FurnaceEngineTileEntity;
|
||||||
|
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.millstone.MillstoneRenderer;
|
||||||
import com.simibubi.create.content.contraptions.components.millstone.MillstoneTileEntity;
|
import com.simibubi.create.content.contraptions.components.millstone.MillstoneTileEntity;
|
||||||
import com.simibubi.create.content.contraptions.components.mixer.MechanicalMixerRenderer;
|
import com.simibubi.create.content.contraptions.components.mixer.MechanicalMixerRenderer;
|
||||||
|
@ -33,6 +43,7 @@ import com.simibubi.create.content.contraptions.components.motor.CreativeMotorRe
|
||||||
import com.simibubi.create.content.contraptions.components.motor.CreativeMotorTileEntity;
|
import com.simibubi.create.content.contraptions.components.motor.CreativeMotorTileEntity;
|
||||||
import com.simibubi.create.content.contraptions.components.press.MechanicalPressRenderer;
|
import com.simibubi.create.content.contraptions.components.press.MechanicalPressRenderer;
|
||||||
import com.simibubi.create.content.contraptions.components.press.MechanicalPressTileEntity;
|
import com.simibubi.create.content.contraptions.components.press.MechanicalPressTileEntity;
|
||||||
|
import com.simibubi.create.content.contraptions.components.saw.SawInstance;
|
||||||
import com.simibubi.create.content.contraptions.components.saw.SawRenderer;
|
import com.simibubi.create.content.contraptions.components.saw.SawRenderer;
|
||||||
import com.simibubi.create.content.contraptions.components.saw.SawTileEntity;
|
import com.simibubi.create.content.contraptions.components.saw.SawTileEntity;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.bearing.BearingRenderer;
|
import com.simibubi.create.content.contraptions.components.structureMovement.bearing.BearingRenderer;
|
||||||
|
@ -49,6 +60,7 @@ import com.simibubi.create.content.contraptions.components.structureMovement.pul
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.pulley.PulleyTileEntity;
|
import com.simibubi.create.content.contraptions.components.structureMovement.pulley.PulleyTileEntity;
|
||||||
import com.simibubi.create.content.contraptions.components.turntable.TurntableTileEntity;
|
import com.simibubi.create.content.contraptions.components.turntable.TurntableTileEntity;
|
||||||
import com.simibubi.create.content.contraptions.components.waterwheel.WaterWheelTileEntity;
|
import com.simibubi.create.content.contraptions.components.waterwheel.WaterWheelTileEntity;
|
||||||
|
import com.simibubi.create.content.contraptions.fluids.PumpCogInstance;
|
||||||
import com.simibubi.create.content.contraptions.fluids.PumpRenderer;
|
import com.simibubi.create.content.contraptions.fluids.PumpRenderer;
|
||||||
import com.simibubi.create.content.contraptions.fluids.PumpTileEntity;
|
import com.simibubi.create.content.contraptions.fluids.PumpTileEntity;
|
||||||
import com.simibubi.create.content.contraptions.fluids.actors.HosePulleyRenderer;
|
import com.simibubi.create.content.contraptions.fluids.actors.HosePulleyRenderer;
|
||||||
|
@ -74,6 +86,7 @@ import com.simibubi.create.content.contraptions.relays.advanced.GantryShaftTileE
|
||||||
import com.simibubi.create.content.contraptions.relays.advanced.SpeedControllerRenderer;
|
import com.simibubi.create.content.contraptions.relays.advanced.SpeedControllerRenderer;
|
||||||
import com.simibubi.create.content.contraptions.relays.advanced.SpeedControllerTileEntity;
|
import com.simibubi.create.content.contraptions.relays.advanced.SpeedControllerTileEntity;
|
||||||
import com.simibubi.create.content.contraptions.relays.advanced.sequencer.SequencedGearshiftTileEntity;
|
import com.simibubi.create.content.contraptions.relays.advanced.sequencer.SequencedGearshiftTileEntity;
|
||||||
|
import com.simibubi.create.content.contraptions.relays.belt.BeltInstance;
|
||||||
import com.simibubi.create.content.contraptions.relays.belt.BeltRenderer;
|
import com.simibubi.create.content.contraptions.relays.belt.BeltRenderer;
|
||||||
import com.simibubi.create.content.contraptions.relays.belt.BeltTileEntity;
|
import com.simibubi.create.content.contraptions.relays.belt.BeltTileEntity;
|
||||||
import com.simibubi.create.content.contraptions.relays.elementary.SimpleKineticTileEntity;
|
import com.simibubi.create.content.contraptions.relays.elementary.SimpleKineticTileEntity;
|
||||||
|
@ -81,10 +94,13 @@ import com.simibubi.create.content.contraptions.relays.encased.AdjustablePulleyT
|
||||||
import com.simibubi.create.content.contraptions.relays.encased.ClutchTileEntity;
|
import com.simibubi.create.content.contraptions.relays.encased.ClutchTileEntity;
|
||||||
import com.simibubi.create.content.contraptions.relays.encased.EncasedShaftRenderer;
|
import com.simibubi.create.content.contraptions.relays.encased.EncasedShaftRenderer;
|
||||||
import com.simibubi.create.content.contraptions.relays.encased.EncasedShaftTileEntity;
|
import com.simibubi.create.content.contraptions.relays.encased.EncasedShaftTileEntity;
|
||||||
|
import com.simibubi.create.content.contraptions.relays.encased.ShaftInstance;
|
||||||
|
import com.simibubi.create.content.contraptions.relays.encased.SplitShaftInstance;
|
||||||
import com.simibubi.create.content.contraptions.relays.encased.SplitShaftRenderer;
|
import com.simibubi.create.content.contraptions.relays.encased.SplitShaftRenderer;
|
||||||
import com.simibubi.create.content.contraptions.relays.gauge.GaugeRenderer;
|
import com.simibubi.create.content.contraptions.relays.gauge.GaugeRenderer;
|
||||||
import com.simibubi.create.content.contraptions.relays.gauge.SpeedGaugeTileEntity;
|
import com.simibubi.create.content.contraptions.relays.gauge.SpeedGaugeTileEntity;
|
||||||
import com.simibubi.create.content.contraptions.relays.gauge.StressGaugeTileEntity;
|
import com.simibubi.create.content.contraptions.relays.gauge.StressGaugeTileEntity;
|
||||||
|
import com.simibubi.create.content.contraptions.relays.gearbox.GearboxInstance;
|
||||||
import com.simibubi.create.content.contraptions.relays.gearbox.GearboxRenderer;
|
import com.simibubi.create.content.contraptions.relays.gearbox.GearboxRenderer;
|
||||||
import com.simibubi.create.content.contraptions.relays.gearbox.GearboxTileEntity;
|
import com.simibubi.create.content.contraptions.relays.gearbox.GearboxTileEntity;
|
||||||
import com.simibubi.create.content.contraptions.relays.gearbox.GearshiftTileEntity;
|
import com.simibubi.create.content.contraptions.relays.gearbox.GearshiftTileEntity;
|
||||||
|
@ -104,6 +120,7 @@ import com.simibubi.create.content.logistics.block.funnel.FunnelRenderer;
|
||||||
import com.simibubi.create.content.logistics.block.funnel.FunnelTileEntity;
|
import com.simibubi.create.content.logistics.block.funnel.FunnelTileEntity;
|
||||||
import com.simibubi.create.content.logistics.block.inventories.AdjustableCrateTileEntity;
|
import com.simibubi.create.content.logistics.block.inventories.AdjustableCrateTileEntity;
|
||||||
import com.simibubi.create.content.logistics.block.inventories.CreativeCrateTileEntity;
|
import com.simibubi.create.content.logistics.block.inventories.CreativeCrateTileEntity;
|
||||||
|
import com.simibubi.create.content.logistics.block.mechanicalArm.ArmInstance;
|
||||||
import com.simibubi.create.content.logistics.block.mechanicalArm.ArmRenderer;
|
import com.simibubi.create.content.logistics.block.mechanicalArm.ArmRenderer;
|
||||||
import com.simibubi.create.content.logistics.block.mechanicalArm.ArmTileEntity;
|
import com.simibubi.create.content.logistics.block.mechanicalArm.ArmTileEntity;
|
||||||
import com.simibubi.create.content.logistics.block.redstone.AnalogLeverRenderer;
|
import com.simibubi.create.content.logistics.block.redstone.AnalogLeverRenderer;
|
||||||
|
@ -138,36 +155,42 @@ public class AllTileEntities {
|
||||||
.tileEntity("simple_kinetic", SimpleKineticTileEntity::new)
|
.tileEntity("simple_kinetic", SimpleKineticTileEntity::new)
|
||||||
.validBlocks(AllBlocks.SHAFT, AllBlocks.COGWHEEL, AllBlocks.LARGE_COGWHEEL)
|
.validBlocks(AllBlocks.SHAFT, AllBlocks.COGWHEEL, AllBlocks.LARGE_COGWHEEL)
|
||||||
.renderer(() -> KineticTileEntityRenderer::new)
|
.renderer(() -> KineticTileEntityRenderer::new)
|
||||||
|
.onRegister(SingleRotatingInstance::register)
|
||||||
.register();
|
.register();
|
||||||
|
|
||||||
public static final TileEntityEntry<CreativeMotorTileEntity> MOTOR = Create.registrate()
|
public static final TileEntityEntry<CreativeMotorTileEntity> MOTOR = Create.registrate()
|
||||||
.tileEntity("motor", CreativeMotorTileEntity::new)
|
.tileEntity("motor", CreativeMotorTileEntity::new)
|
||||||
.validBlocks(AllBlocks.CREATIVE_MOTOR)
|
.validBlocks(AllBlocks.CREATIVE_MOTOR)
|
||||||
.renderer(() -> CreativeMotorRenderer::new)
|
.renderer(() -> CreativeMotorRenderer::new)
|
||||||
|
.onRegister(HalfShaftInstance::register)
|
||||||
.register();
|
.register();
|
||||||
|
|
||||||
public static final TileEntityEntry<GearboxTileEntity> GEARBOX = Create.registrate()
|
public static final TileEntityEntry<GearboxTileEntity> GEARBOX = Create.registrate()
|
||||||
.tileEntity("gearbox", GearboxTileEntity::new)
|
.tileEntity("gearbox", GearboxTileEntity::new)
|
||||||
.validBlocks(AllBlocks.GEARBOX)
|
.validBlocks(AllBlocks.GEARBOX)
|
||||||
.renderer(() -> GearboxRenderer::new)
|
.renderer(() -> GearboxRenderer::new)
|
||||||
|
.onRegister(GearboxInstance::register)
|
||||||
.register();
|
.register();
|
||||||
|
|
||||||
public static final TileEntityEntry<EncasedShaftTileEntity> ENCASED_SHAFT = Create.registrate()
|
public static final TileEntityEntry<EncasedShaftTileEntity> ENCASED_SHAFT = Create.registrate()
|
||||||
.tileEntity("encased_shaft", EncasedShaftTileEntity::new)
|
.tileEntity("encased_shaft", EncasedShaftTileEntity::new)
|
||||||
.validBlocks(AllBlocks.ANDESITE_ENCASED_SHAFT, AllBlocks.BRASS_ENCASED_SHAFT, AllBlocks.ENCASED_CHAIN_DRIVE)
|
.validBlocks(AllBlocks.ANDESITE_ENCASED_SHAFT, AllBlocks.BRASS_ENCASED_SHAFT, AllBlocks.ENCASED_CHAIN_DRIVE)
|
||||||
.renderer(() -> EncasedShaftRenderer::new)
|
.renderer(() -> EncasedShaftRenderer::new)
|
||||||
|
.onRegister(ShaftInstance::register)
|
||||||
.register();
|
.register();
|
||||||
|
|
||||||
public static final TileEntityEntry<AdjustablePulleyTileEntity> ADJUSTABLE_PULLEY = Create.registrate()
|
public static final TileEntityEntry<AdjustablePulleyTileEntity> ADJUSTABLE_PULLEY = Create.registrate()
|
||||||
.tileEntity("adjustable_pulley", AdjustablePulleyTileEntity::new)
|
.tileEntity("adjustable_pulley", AdjustablePulleyTileEntity::new)
|
||||||
.validBlocks(AllBlocks.ADJUSTABLE_CHAIN_GEARSHIFT)
|
.validBlocks(AllBlocks.ADJUSTABLE_CHAIN_GEARSHIFT)
|
||||||
.renderer(() -> EncasedShaftRenderer::new)
|
.renderer(() -> EncasedShaftRenderer::new)
|
||||||
|
.onRegister(ShaftInstance::register)
|
||||||
.register();
|
.register();
|
||||||
|
|
||||||
public static final TileEntityEntry<EncasedFanTileEntity> ENCASED_FAN = Create.registrate()
|
public static final TileEntityEntry<EncasedFanTileEntity> ENCASED_FAN = Create.registrate()
|
||||||
.tileEntity("encased_fan", EncasedFanTileEntity::new)
|
.tileEntity("encased_fan", EncasedFanTileEntity::new)
|
||||||
.validBlocks(AllBlocks.ENCASED_FAN)
|
.validBlocks(AllBlocks.ENCASED_FAN)
|
||||||
.renderer(() -> EncasedFanRenderer::new)
|
.renderer(() -> EncasedFanRenderer::new)
|
||||||
|
.onRegister(FanInstance::register)
|
||||||
.register();
|
.register();
|
||||||
|
|
||||||
public static final TileEntityEntry<NozzleTileEntity> NOZZLE = Create.registrate()
|
public static final TileEntityEntry<NozzleTileEntity> NOZZLE = Create.registrate()
|
||||||
|
@ -180,18 +203,21 @@ public class AllTileEntities {
|
||||||
.tileEntity("clutch", ClutchTileEntity::new)
|
.tileEntity("clutch", ClutchTileEntity::new)
|
||||||
.validBlocks(AllBlocks.CLUTCH)
|
.validBlocks(AllBlocks.CLUTCH)
|
||||||
.renderer(() -> SplitShaftRenderer::new)
|
.renderer(() -> SplitShaftRenderer::new)
|
||||||
|
.onRegister(SplitShaftInstance::register)
|
||||||
.register();
|
.register();
|
||||||
|
|
||||||
public static final TileEntityEntry<GearshiftTileEntity> GEARSHIFT = Create.registrate()
|
public static final TileEntityEntry<GearshiftTileEntity> GEARSHIFT = Create.registrate()
|
||||||
.tileEntity("gearshift", GearshiftTileEntity::new)
|
.tileEntity("gearshift", GearshiftTileEntity::new)
|
||||||
.validBlocks(AllBlocks.GEARSHIFT)
|
.validBlocks(AllBlocks.GEARSHIFT)
|
||||||
.renderer(() -> SplitShaftRenderer::new)
|
.renderer(() -> SplitShaftRenderer::new)
|
||||||
|
.onRegister(SplitShaftInstance::register)
|
||||||
.register();
|
.register();
|
||||||
|
|
||||||
public static final TileEntityEntry<TurntableTileEntity> TURNTABLE = Create.registrate()
|
public static final TileEntityEntry<TurntableTileEntity> TURNTABLE = Create.registrate()
|
||||||
.tileEntity("turntable", TurntableTileEntity::new)
|
.tileEntity("turntable", TurntableTileEntity::new)
|
||||||
.validBlocks(AllBlocks.TURNTABLE)
|
.validBlocks(AllBlocks.TURNTABLE)
|
||||||
.renderer(() -> KineticTileEntityRenderer::new)
|
.renderer(() -> KineticTileEntityRenderer::new)
|
||||||
|
.onRegister(SingleRotatingInstance::register)
|
||||||
.register();
|
.register();
|
||||||
|
|
||||||
public static final TileEntityEntry<HandCrankTileEntity> HAND_CRANK = Create.registrate()
|
public static final TileEntityEntry<HandCrankTileEntity> HAND_CRANK = Create.registrate()
|
||||||
|
@ -199,30 +225,35 @@ public class AllTileEntities {
|
||||||
.validBlocks(AllBlocks.HAND_CRANK, AllBlocks.COPPER_VALVE_HANDLE)
|
.validBlocks(AllBlocks.HAND_CRANK, AllBlocks.COPPER_VALVE_HANDLE)
|
||||||
.validBlocks(AllBlocks.DYED_VALVE_HANDLES)
|
.validBlocks(AllBlocks.DYED_VALVE_HANDLES)
|
||||||
.renderer(() -> HandCrankRenderer::new)
|
.renderer(() -> HandCrankRenderer::new)
|
||||||
|
.onRegister(SingleRotatingInstance::register)
|
||||||
.register();
|
.register();
|
||||||
|
|
||||||
public static final TileEntityEntry<CuckooClockTileEntity> CUCKOO_CLOCK = Create.registrate()
|
public static final TileEntityEntry<CuckooClockTileEntity> CUCKOO_CLOCK = Create.registrate()
|
||||||
.tileEntity("cuckoo_clock", CuckooClockTileEntity::new)
|
.tileEntity("cuckoo_clock", CuckooClockTileEntity::new)
|
||||||
.validBlocks(AllBlocks.CUCKOO_CLOCK, AllBlocks.MYSTERIOUS_CUCKOO_CLOCK)
|
.validBlocks(AllBlocks.CUCKOO_CLOCK, AllBlocks.MYSTERIOUS_CUCKOO_CLOCK)
|
||||||
.renderer(() -> CuckooClockRenderer::new)
|
.renderer(() -> CuckooClockRenderer::new)
|
||||||
|
.onRegister(HorizontalHalfShaftInstance::register)
|
||||||
.register();
|
.register();
|
||||||
|
|
||||||
public static final TileEntityEntry<GantryShaftTileEntity> GANTRY_SHAFT = Create.registrate()
|
public static final TileEntityEntry<GantryShaftTileEntity> GANTRY_SHAFT = Create.registrate()
|
||||||
.tileEntity("gantry_shaft", GantryShaftTileEntity::new)
|
.tileEntity("gantry_shaft", GantryShaftTileEntity::new)
|
||||||
.validBlocks(AllBlocks.GANTRY_SHAFT)
|
.validBlocks(AllBlocks.GANTRY_SHAFT)
|
||||||
.renderer(() -> KineticTileEntityRenderer::new)
|
.renderer(() -> KineticTileEntityRenderer::new)
|
||||||
|
.onRegister(SingleRotatingInstance::register)
|
||||||
.register();
|
.register();
|
||||||
|
|
||||||
public static final TileEntityEntry<GantryPinionTileEntity> GANTRY_PINION = Create.registrate()
|
public static final TileEntityEntry<GantryPinionTileEntity> GANTRY_PINION = Create.registrate()
|
||||||
.tileEntity("gantry_pinion", GantryPinionTileEntity::new)
|
.tileEntity("gantry_pinion", GantryPinionTileEntity::new)
|
||||||
.validBlocks(AllBlocks.GANTRY_PINION)
|
.validBlocks(AllBlocks.GANTRY_PINION)
|
||||||
.renderer(() -> GantryPinionRenderer::new)
|
.renderer(() -> GantryPinionRenderer::new)
|
||||||
|
.onRegister(ShaftInstance::register)
|
||||||
.register();
|
.register();
|
||||||
|
|
||||||
public static final TileEntityEntry<PumpTileEntity> MECHANICAL_PUMP = Create.registrate()
|
public static final TileEntityEntry<PumpTileEntity> MECHANICAL_PUMP = Create.registrate()
|
||||||
.tileEntity("mechanical_pump", PumpTileEntity::new)
|
.tileEntity("mechanical_pump", PumpTileEntity::new)
|
||||||
.validBlocks(AllBlocks.MECHANICAL_PUMP)
|
.validBlocks(AllBlocks.MECHANICAL_PUMP)
|
||||||
.renderer(() -> PumpRenderer::new)
|
.renderer(() -> PumpRenderer::new)
|
||||||
|
.onRegister(PumpCogInstance::register)
|
||||||
.register();
|
.register();
|
||||||
|
|
||||||
public static final TileEntityEntry<SmartFluidPipeTileEntity> SMART_FLUID_PIPE = Create.registrate()
|
public static final TileEntityEntry<SmartFluidPipeTileEntity> SMART_FLUID_PIPE = Create.registrate()
|
||||||
|
@ -251,6 +282,7 @@ public class AllTileEntities {
|
||||||
.tileEntity("fluid_valve", FluidValveTileEntity::new)
|
.tileEntity("fluid_valve", FluidValveTileEntity::new)
|
||||||
.validBlocks(AllBlocks.FLUID_VALVE)
|
.validBlocks(AllBlocks.FLUID_VALVE)
|
||||||
.renderer(() -> FluidValveRenderer::new)
|
.renderer(() -> FluidValveRenderer::new)
|
||||||
|
.onRegister(ShaftInstance::register)
|
||||||
.register();
|
.register();
|
||||||
|
|
||||||
public static final TileEntityEntry<FluidTankTileEntity> FLUID_TANK = Create.registrate()
|
public static final TileEntityEntry<FluidTankTileEntity> FLUID_TANK = Create.registrate()
|
||||||
|
@ -269,6 +301,7 @@ public class AllTileEntities {
|
||||||
.tileEntity("hose_pulley", HosePulleyTileEntity::new)
|
.tileEntity("hose_pulley", HosePulleyTileEntity::new)
|
||||||
.validBlocks(AllBlocks.HOSE_PULLEY)
|
.validBlocks(AllBlocks.HOSE_PULLEY)
|
||||||
.renderer(() -> HosePulleyRenderer::new)
|
.renderer(() -> HosePulleyRenderer::new)
|
||||||
|
.onRegister(ShaftInstance::register)
|
||||||
.register();
|
.register();
|
||||||
|
|
||||||
public static final TileEntityEntry<SpoutTileEntity> SPOUT = Create.registrate()
|
public static final TileEntityEntry<SpoutTileEntity> SPOUT = Create.registrate()
|
||||||
|
@ -287,6 +320,7 @@ public class AllTileEntities {
|
||||||
.tileEntity("belt", BeltTileEntity::new)
|
.tileEntity("belt", BeltTileEntity::new)
|
||||||
.validBlocks(AllBlocks.BELT)
|
.validBlocks(AllBlocks.BELT)
|
||||||
.renderer(() -> BeltRenderer::new)
|
.renderer(() -> BeltRenderer::new)
|
||||||
|
.onRegister(BeltInstance::register)
|
||||||
.register();
|
.register();
|
||||||
|
|
||||||
public static final TileEntityEntry<ChuteTileEntity> CHUTE = Create.registrate()
|
public static final TileEntityEntry<ChuteTileEntity> CHUTE = Create.registrate()
|
||||||
|
@ -317,36 +351,42 @@ public class AllTileEntities {
|
||||||
.tileEntity("mechanical_arm", ArmTileEntity::new)
|
.tileEntity("mechanical_arm", ArmTileEntity::new)
|
||||||
.validBlocks(AllBlocks.MECHANICAL_ARM)
|
.validBlocks(AllBlocks.MECHANICAL_ARM)
|
||||||
.renderer(() -> ArmRenderer::new)
|
.renderer(() -> ArmRenderer::new)
|
||||||
|
.onRegister(ArmInstance::register)
|
||||||
.register();
|
.register();
|
||||||
|
|
||||||
public static final TileEntityEntry<MechanicalPistonTileEntity> MECHANICAL_PISTON = Create.registrate()
|
public static final TileEntityEntry<MechanicalPistonTileEntity> MECHANICAL_PISTON = Create.registrate()
|
||||||
.tileEntity("mechanical_piston", MechanicalPistonTileEntity::new)
|
.tileEntity("mechanical_piston", MechanicalPistonTileEntity::new)
|
||||||
.validBlocks(AllBlocks.MECHANICAL_PISTON, AllBlocks.STICKY_MECHANICAL_PISTON)
|
.validBlocks(AllBlocks.MECHANICAL_PISTON, AllBlocks.STICKY_MECHANICAL_PISTON)
|
||||||
.renderer(() -> MechanicalPistonRenderer::new)
|
.renderer(() -> MechanicalPistonRenderer::new)
|
||||||
|
.onRegister(ShaftInstance::register)
|
||||||
.register();
|
.register();
|
||||||
|
|
||||||
public static final TileEntityEntry<WindmillBearingTileEntity> WINDMILL_BEARING = Create.registrate()
|
public static final TileEntityEntry<WindmillBearingTileEntity> WINDMILL_BEARING = Create.registrate()
|
||||||
.tileEntity("windmill_bearing", WindmillBearingTileEntity::new)
|
.tileEntity("windmill_bearing", WindmillBearingTileEntity::new)
|
||||||
.validBlocks(AllBlocks.WINDMILL_BEARING)
|
.validBlocks(AllBlocks.WINDMILL_BEARING)
|
||||||
.renderer(() -> BearingRenderer::new)
|
.renderer(() -> BearingRenderer::new)
|
||||||
|
.onRegister(BackHalfShaftInstance::register)
|
||||||
.register();
|
.register();
|
||||||
|
|
||||||
public static final TileEntityEntry<MechanicalBearingTileEntity> MECHANICAL_BEARING = Create.registrate()
|
public static final TileEntityEntry<MechanicalBearingTileEntity> MECHANICAL_BEARING = Create.registrate()
|
||||||
.tileEntity("mechanical_bearing", MechanicalBearingTileEntity::new)
|
.tileEntity("mechanical_bearing", MechanicalBearingTileEntity::new)
|
||||||
.validBlocks(AllBlocks.MECHANICAL_BEARING)
|
.validBlocks(AllBlocks.MECHANICAL_BEARING)
|
||||||
.renderer(() -> BearingRenderer::new)
|
.renderer(() -> BearingRenderer::new)
|
||||||
|
.onRegister(BackHalfShaftInstance::register)
|
||||||
.register();
|
.register();
|
||||||
|
|
||||||
public static final TileEntityEntry<ClockworkBearingTileEntity> CLOCKWORK_BEARING = Create.registrate()
|
public static final TileEntityEntry<ClockworkBearingTileEntity> CLOCKWORK_BEARING = Create.registrate()
|
||||||
.tileEntity("clockwork_bearing", ClockworkBearingTileEntity::new)
|
.tileEntity("clockwork_bearing", ClockworkBearingTileEntity::new)
|
||||||
.validBlocks(AllBlocks.CLOCKWORK_BEARING)
|
.validBlocks(AllBlocks.CLOCKWORK_BEARING)
|
||||||
.renderer(() -> BearingRenderer::new)
|
.renderer(() -> BearingRenderer::new)
|
||||||
|
.onRegister(BackHalfShaftInstance::register)
|
||||||
.register();
|
.register();
|
||||||
|
|
||||||
public static final TileEntityEntry<PulleyTileEntity> ROPE_PULLEY = Create.registrate()
|
public static final TileEntityEntry<PulleyTileEntity> ROPE_PULLEY = Create.registrate()
|
||||||
.tileEntity("rope_pulley", PulleyTileEntity::new)
|
.tileEntity("rope_pulley", PulleyTileEntity::new)
|
||||||
.validBlocks(AllBlocks.ROPE_PULLEY)
|
.validBlocks(AllBlocks.ROPE_PULLEY)
|
||||||
.renderer(() -> PulleyRenderer::new)
|
.renderer(() -> PulleyRenderer::new)
|
||||||
|
.onRegister(ShaftInstance::register)
|
||||||
.register();
|
.register();
|
||||||
|
|
||||||
public static final TileEntityEntry<ChassisTileEntity> CHASSIS = Create.registrate()
|
public static final TileEntityEntry<ChassisTileEntity> CHASSIS = Create.registrate()
|
||||||
|
@ -359,12 +399,14 @@ public class AllTileEntities {
|
||||||
.tileEntity("drill", DrillTileEntity::new)
|
.tileEntity("drill", DrillTileEntity::new)
|
||||||
.validBlocks(AllBlocks.MECHANICAL_DRILL)
|
.validBlocks(AllBlocks.MECHANICAL_DRILL)
|
||||||
.renderer(() -> DrillRenderer::new)
|
.renderer(() -> DrillRenderer::new)
|
||||||
|
.onRegister(DrillInstance::register)
|
||||||
.register();
|
.register();
|
||||||
|
|
||||||
public static final TileEntityEntry<SawTileEntity> SAW = Create.registrate()
|
public static final TileEntityEntry<SawTileEntity> SAW = Create.registrate()
|
||||||
.tileEntity("saw", SawTileEntity::new)
|
.tileEntity("saw", SawTileEntity::new)
|
||||||
.validBlocks(AllBlocks.MECHANICAL_SAW)
|
.validBlocks(AllBlocks.MECHANICAL_SAW)
|
||||||
.renderer(() -> SawRenderer::new)
|
.renderer(() -> SawRenderer::new)
|
||||||
|
.onRegister(SawInstance::register)
|
||||||
.register();
|
.register();
|
||||||
|
|
||||||
public static final TileEntityEntry<HarvesterTileEntity> HARVESTER = Create.registrate()
|
public static final TileEntityEntry<HarvesterTileEntity> HARVESTER = Create.registrate()
|
||||||
|
@ -390,6 +432,7 @@ public class AllTileEntities {
|
||||||
.tileEntity("flywheel", FlywheelTileEntity::new)
|
.tileEntity("flywheel", FlywheelTileEntity::new)
|
||||||
.validBlocks(AllBlocks.FLYWHEEL)
|
.validBlocks(AllBlocks.FLYWHEEL)
|
||||||
.renderer(() -> FlywheelRenderer::new)
|
.renderer(() -> FlywheelRenderer::new)
|
||||||
|
.onRegister(FlyWheelInstance::register)
|
||||||
.register();
|
.register();
|
||||||
|
|
||||||
public static final TileEntityEntry<FurnaceEngineTileEntity> FURNACE_ENGINE = Create.registrate()
|
public static final TileEntityEntry<FurnaceEngineTileEntity> FURNACE_ENGINE = Create.registrate()
|
||||||
|
@ -402,12 +445,14 @@ public class AllTileEntities {
|
||||||
.tileEntity("millstone", MillstoneTileEntity::new)
|
.tileEntity("millstone", MillstoneTileEntity::new)
|
||||||
.validBlocks(AllBlocks.MILLSTONE)
|
.validBlocks(AllBlocks.MILLSTONE)
|
||||||
.renderer(() -> MillstoneRenderer::new)
|
.renderer(() -> MillstoneRenderer::new)
|
||||||
|
.onRegister(MillStoneCogInstance::register)
|
||||||
.register();
|
.register();
|
||||||
|
|
||||||
public static final TileEntityEntry<CrushingWheelTileEntity> CRUSHING_WHEEL = Create.registrate()
|
public static final TileEntityEntry<CrushingWheelTileEntity> CRUSHING_WHEEL = Create.registrate()
|
||||||
.tileEntity("crushing_wheel", CrushingWheelTileEntity::new)
|
.tileEntity("crushing_wheel", CrushingWheelTileEntity::new)
|
||||||
.validBlocks(AllBlocks.CRUSHING_WHEEL)
|
.validBlocks(AllBlocks.CRUSHING_WHEEL)
|
||||||
.renderer(() -> KineticTileEntityRenderer::new)
|
.renderer(() -> KineticTileEntityRenderer::new)
|
||||||
|
.onRegister(SingleRotatingInstance::register)
|
||||||
.register();
|
.register();
|
||||||
|
|
||||||
public static final TileEntityEntry<CrushingWheelControllerTileEntity> CRUSHING_WHEEL_CONTROLLER =
|
public static final TileEntityEntry<CrushingWheelControllerTileEntity> CRUSHING_WHEEL_CONTROLLER =
|
||||||
|
@ -421,24 +466,28 @@ public class AllTileEntities {
|
||||||
.tileEntity("water_wheel", WaterWheelTileEntity::new)
|
.tileEntity("water_wheel", WaterWheelTileEntity::new)
|
||||||
.validBlocks(AllBlocks.WATER_WHEEL)
|
.validBlocks(AllBlocks.WATER_WHEEL)
|
||||||
.renderer(() -> KineticTileEntityRenderer::new)
|
.renderer(() -> KineticTileEntityRenderer::new)
|
||||||
|
.onRegister(SingleRotatingInstance::register)
|
||||||
.register();
|
.register();
|
||||||
|
|
||||||
public static final TileEntityEntry<MechanicalPressTileEntity> MECHANICAL_PRESS = Create.registrate()
|
public static final TileEntityEntry<MechanicalPressTileEntity> MECHANICAL_PRESS = Create.registrate()
|
||||||
.tileEntity("mechanical_press", MechanicalPressTileEntity::new)
|
.tileEntity("mechanical_press", MechanicalPressTileEntity::new)
|
||||||
.validBlocks(AllBlocks.MECHANICAL_PRESS)
|
.validBlocks(AllBlocks.MECHANICAL_PRESS)
|
||||||
.renderer(() -> MechanicalPressRenderer::new)
|
.renderer(() -> MechanicalPressRenderer::new)
|
||||||
|
.onRegister(ShaftInstance::register)
|
||||||
.register();
|
.register();
|
||||||
|
|
||||||
public static final TileEntityEntry<MechanicalMixerTileEntity> MECHANICAL_MIXER = Create.registrate()
|
public static final TileEntityEntry<MechanicalMixerTileEntity> MECHANICAL_MIXER = Create.registrate()
|
||||||
.tileEntity("mechanical_mixer", MechanicalMixerTileEntity::new)
|
.tileEntity("mechanical_mixer", MechanicalMixerTileEntity::new)
|
||||||
.validBlocks(AllBlocks.MECHANICAL_MIXER)
|
.validBlocks(AllBlocks.MECHANICAL_MIXER)
|
||||||
.renderer(() -> MechanicalMixerRenderer::new)
|
.renderer(() -> MechanicalMixerRenderer::new)
|
||||||
|
.onRegister(ShaftlessCogInstance::register)
|
||||||
.register();
|
.register();
|
||||||
|
|
||||||
public static final TileEntityEntry<DeployerTileEntity> DEPLOYER = Create.registrate()
|
public static final TileEntityEntry<DeployerTileEntity> DEPLOYER = Create.registrate()
|
||||||
.tileEntity("deployer", DeployerTileEntity::new)
|
.tileEntity("deployer", DeployerTileEntity::new)
|
||||||
.validBlocks(AllBlocks.DEPLOYER)
|
.validBlocks(AllBlocks.DEPLOYER)
|
||||||
.renderer(() -> DeployerRenderer::new)
|
.renderer(() -> DeployerRenderer::new)
|
||||||
|
.onRegister(ShaftInstance::register)
|
||||||
.register();
|
.register();
|
||||||
|
|
||||||
public static final TileEntityEntry<BasinTileEntity> BASIN = Create.registrate()
|
public static final TileEntityEntry<BasinTileEntity> BASIN = Create.registrate()
|
||||||
|
@ -457,30 +506,35 @@ public class AllTileEntities {
|
||||||
.tileEntity("mechanical_crafter", MechanicalCrafterTileEntity::new)
|
.tileEntity("mechanical_crafter", MechanicalCrafterTileEntity::new)
|
||||||
.validBlocks(AllBlocks.MECHANICAL_CRAFTER)
|
.validBlocks(AllBlocks.MECHANICAL_CRAFTER)
|
||||||
.renderer(() -> MechanicalCrafterRenderer::new)
|
.renderer(() -> MechanicalCrafterRenderer::new)
|
||||||
|
.onRegister(MechanicalCrafterInstance::register)
|
||||||
.register();
|
.register();
|
||||||
|
|
||||||
public static final TileEntityEntry<SequencedGearshiftTileEntity> SEQUENCED_GEARSHIFT = Create.registrate()
|
public static final TileEntityEntry<SequencedGearshiftTileEntity> SEQUENCED_GEARSHIFT = Create.registrate()
|
||||||
.tileEntity("sequenced_gearshift", SequencedGearshiftTileEntity::new)
|
.tileEntity("sequenced_gearshift", SequencedGearshiftTileEntity::new)
|
||||||
.validBlocks(AllBlocks.SEQUENCED_GEARSHIFT)
|
.validBlocks(AllBlocks.SEQUENCED_GEARSHIFT)
|
||||||
.renderer(() -> SplitShaftRenderer::new)
|
.renderer(() -> SplitShaftRenderer::new)
|
||||||
|
.onRegister(SplitShaftInstance::register)
|
||||||
.register();
|
.register();
|
||||||
|
|
||||||
public static final TileEntityEntry<SpeedControllerTileEntity> ROTATION_SPEED_CONTROLLER = Create.registrate()
|
public static final TileEntityEntry<SpeedControllerTileEntity> ROTATION_SPEED_CONTROLLER = Create.registrate()
|
||||||
.tileEntity("rotation_speed_controller", SpeedControllerTileEntity::new)
|
.tileEntity("rotation_speed_controller", SpeedControllerTileEntity::new)
|
||||||
.validBlocks(AllBlocks.ROTATION_SPEED_CONTROLLER)
|
.validBlocks(AllBlocks.ROTATION_SPEED_CONTROLLER)
|
||||||
.renderer(() -> SpeedControllerRenderer::new)
|
.renderer(() -> SpeedControllerRenderer::new)
|
||||||
|
.onRegister(ShaftInstance::register)
|
||||||
.register();
|
.register();
|
||||||
|
|
||||||
public static final TileEntityEntry<SpeedGaugeTileEntity> SPEEDOMETER = Create.registrate()
|
public static final TileEntityEntry<SpeedGaugeTileEntity> SPEEDOMETER = Create.registrate()
|
||||||
.tileEntity("speedometer", SpeedGaugeTileEntity::new)
|
.tileEntity("speedometer", SpeedGaugeTileEntity::new)
|
||||||
.validBlocks(AllBlocks.SPEEDOMETER)
|
.validBlocks(AllBlocks.SPEEDOMETER)
|
||||||
.renderer(() -> GaugeRenderer::speed)
|
.renderer(() -> GaugeRenderer::speed)
|
||||||
|
.onRegister(ShaftInstance::register)
|
||||||
.register();
|
.register();
|
||||||
|
|
||||||
public static final TileEntityEntry<StressGaugeTileEntity> STRESSOMETER = Create.registrate()
|
public static final TileEntityEntry<StressGaugeTileEntity> STRESSOMETER = Create.registrate()
|
||||||
.tileEntity("stressometer", StressGaugeTileEntity::new)
|
.tileEntity("stressometer", StressGaugeTileEntity::new)
|
||||||
.validBlocks(AllBlocks.STRESSOMETER)
|
.validBlocks(AllBlocks.STRESSOMETER)
|
||||||
.renderer(() -> GaugeRenderer::stress)
|
.renderer(() -> GaugeRenderer::stress)
|
||||||
|
.onRegister(ShaftInstance::register)
|
||||||
.register();
|
.register();
|
||||||
|
|
||||||
public static final TileEntityEntry<AnalogLeverTileEntity> ANALOG_LEVER = Create.registrate()
|
public static final TileEntityEntry<AnalogLeverTileEntity> ANALOG_LEVER = Create.registrate()
|
||||||
|
|
|
@ -95,7 +95,7 @@ public class Create {
|
||||||
AllConfigs.register();
|
AllConfigs.register();
|
||||||
random = new Random();
|
random = new Random();
|
||||||
|
|
||||||
DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> CreateClient.addClientListeners(modEventBus));
|
DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> CreateClient.addClientListeners(modEventBus));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void init(final FMLCommonSetupEvent event) {
|
public static void init(final FMLCommonSetupEvent event) {
|
||||||
|
|
|
@ -6,7 +6,7 @@ import java.util.Map;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
|
|
||||||
import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer;
|
import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionRenderer;
|
import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionRenderDispatcher;
|
||||||
import com.simibubi.create.content.contraptions.relays.encased.CasingConnectivity;
|
import com.simibubi.create.content.contraptions.relays.encased.CasingConnectivity;
|
||||||
import com.simibubi.create.content.schematics.ClientSchematicLoader;
|
import com.simibubi.create.content.schematics.ClientSchematicLoader;
|
||||||
import com.simibubi.create.content.schematics.client.SchematicAndQuillHandler;
|
import com.simibubi.create.content.schematics.client.SchematicAndQuillHandler;
|
||||||
|
@ -16,7 +16,11 @@ import com.simibubi.create.foundation.block.render.CustomBlockModels;
|
||||||
import com.simibubi.create.foundation.block.render.SpriteShifter;
|
import com.simibubi.create.foundation.block.render.SpriteShifter;
|
||||||
import com.simibubi.create.foundation.item.CustomItemModels;
|
import com.simibubi.create.foundation.item.CustomItemModels;
|
||||||
import com.simibubi.create.foundation.item.CustomRenderedItems;
|
import com.simibubi.create.foundation.item.CustomRenderedItems;
|
||||||
import com.simibubi.create.foundation.utility.SuperByteBufferCache;
|
import com.simibubi.create.foundation.render.KineticRenderer;
|
||||||
|
import com.simibubi.create.foundation.render.SuperByteBufferCache;
|
||||||
|
import com.simibubi.create.foundation.render.backend.Backend;
|
||||||
|
import com.simibubi.create.foundation.render.backend.OptifineHandler;
|
||||||
|
import com.simibubi.create.foundation.utility.ghost.GhostBlocks;
|
||||||
import com.simibubi.create.foundation.utility.outliner.Outliner;
|
import com.simibubi.create.foundation.utility.outliner.Outliner;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
|
@ -42,7 +46,9 @@ public class CreateClient {
|
||||||
public static SchematicHandler schematicHandler;
|
public static SchematicHandler schematicHandler;
|
||||||
public static SchematicAndQuillHandler schematicAndQuillHandler;
|
public static SchematicAndQuillHandler schematicAndQuillHandler;
|
||||||
public static SuperByteBufferCache bufferCache;
|
public static SuperByteBufferCache bufferCache;
|
||||||
|
public static KineticRenderer kineticRenderer;
|
||||||
public static final Outliner outliner = new Outliner();
|
public static final Outliner outliner = new Outliner();
|
||||||
|
public static GhostBlocks ghostBlocks;
|
||||||
|
|
||||||
private static CustomBlockModels customBlockModels;
|
private static CustomBlockModels customBlockModels;
|
||||||
private static CustomItemModels customItemModels;
|
private static CustomItemModels customItemModels;
|
||||||
|
@ -56,16 +62,23 @@ public class CreateClient {
|
||||||
modEventBus.addListener(CreateClient::onModelRegistry);
|
modEventBus.addListener(CreateClient::onModelRegistry);
|
||||||
modEventBus.addListener(CreateClient::onTextureStitch);
|
modEventBus.addListener(CreateClient::onTextureStitch);
|
||||||
modEventBus.addListener(AllParticleTypes::registerFactories);
|
modEventBus.addListener(AllParticleTypes::registerFactories);
|
||||||
|
|
||||||
|
Backend.init();
|
||||||
|
OptifineHandler.init();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void clientInit(FMLClientSetupEvent event) {
|
public static void clientInit(FMLClientSetupEvent event) {
|
||||||
|
kineticRenderer = new KineticRenderer();
|
||||||
|
|
||||||
schematicSender = new ClientSchematicLoader();
|
schematicSender = new ClientSchematicLoader();
|
||||||
schematicHandler = new SchematicHandler();
|
schematicHandler = new SchematicHandler();
|
||||||
schematicAndQuillHandler = new SchematicAndQuillHandler();
|
schematicAndQuillHandler = new SchematicAndQuillHandler();
|
||||||
|
|
||||||
bufferCache = new SuperByteBufferCache();
|
bufferCache = new SuperByteBufferCache();
|
||||||
bufferCache.registerCompartment(KineticTileEntityRenderer.KINETIC_TILE);
|
bufferCache.registerCompartment(KineticTileEntityRenderer.KINETIC_TILE);
|
||||||
bufferCache.registerCompartment(ContraptionRenderer.CONTRAPTION, 20);
|
bufferCache.registerCompartment(ContraptionRenderDispatcher.CONTRAPTION, 20);
|
||||||
|
|
||||||
|
ghostBlocks = new GhostBlocks();
|
||||||
|
|
||||||
AllKeys.register();
|
AllKeys.register();
|
||||||
AllContainerTypes.registerScreenFactories();
|
AllContainerTypes.registerScreenFactories();
|
||||||
|
@ -171,4 +184,9 @@ public class CreateClient {
|
||||||
return casingConnectivity;
|
return casingConnectivity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void invalidateRenderers() {
|
||||||
|
CreateClient.bufferCache.invalidate();
|
||||||
|
CreateClient.kineticRenderer.invalidate();
|
||||||
|
ContraptionRenderDispatcher.invalidateAll();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,14 +6,13 @@ import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||||
|
|
||||||
import mezz.jei.api.gui.drawable.IDrawable;
|
import mezz.jei.api.gui.drawable.IDrawable;
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.client.Minecraft;
|
|
||||||
import net.minecraft.state.properties.BlockStateProperties;
|
import net.minecraft.state.properties.BlockStateProperties;
|
||||||
import net.minecraft.util.Direction.Axis;
|
import net.minecraft.util.Direction.Axis;
|
||||||
|
|
||||||
public abstract class AnimatedKinetics implements IDrawable {
|
public abstract class AnimatedKinetics implements IDrawable {
|
||||||
|
|
||||||
public static float getCurrentAngle() {
|
public static float getCurrentAngle() {
|
||||||
return ((AnimationTickHolder.ticks + Minecraft.getInstance().getRenderPartialTicks()) * 4f) % 360;
|
return ((AnimationTickHolder.getRenderTick()) * 4f) % 360;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected BlockState shaft(Axis axis) {
|
protected BlockState shaft(Axis axis) {
|
||||||
|
|
|
@ -1,13 +1,11 @@
|
||||||
package com.simibubi.create.compat.jei.category.animations;
|
package com.simibubi.create.compat.jei.category.animations;
|
||||||
|
|
||||||
import static com.simibubi.create.foundation.utility.AnimationTickHolder.ticks;
|
|
||||||
|
|
||||||
import com.mojang.blaze3d.systems.RenderSystem;
|
import com.mojang.blaze3d.systems.RenderSystem;
|
||||||
import com.simibubi.create.AllBlockPartials;
|
import com.simibubi.create.AllBlockPartials;
|
||||||
import com.simibubi.create.AllBlocks;
|
import com.simibubi.create.AllBlocks;
|
||||||
import com.simibubi.create.foundation.gui.GuiGameElement;
|
import com.simibubi.create.foundation.gui.GuiGameElement;
|
||||||
|
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||||
|
|
||||||
import net.minecraft.client.Minecraft;
|
|
||||||
import net.minecraft.util.Direction.Axis;
|
import net.minecraft.util.Direction.Axis;
|
||||||
|
|
||||||
public class AnimatedPress extends AnimatedKinetics {
|
public class AnimatedPress extends AnimatedKinetics {
|
||||||
|
@ -50,8 +48,7 @@ public class AnimatedPress extends AnimatedKinetics {
|
||||||
}
|
}
|
||||||
|
|
||||||
private float getAnimatedHeadOffset() {
|
private float getAnimatedHeadOffset() {
|
||||||
float cycle = (ticks + Minecraft.getInstance()
|
float cycle = (AnimationTickHolder.getRenderTick()) % 30;
|
||||||
.getRenderPartialTicks()) % 30;
|
|
||||||
if (cycle < 10) {
|
if (cycle < 10) {
|
||||||
float progress = cycle / 10;
|
float progress = cycle / 10;
|
||||||
return -(progress * progress * progress);
|
return -(progress * progress * progress);
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package com.simibubi.create.compat.jei.category.animations;
|
package com.simibubi.create.compat.jei.category.animations;
|
||||||
|
|
||||||
import static com.simibubi.create.foundation.utility.AnimationTickHolder.ticks;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||||
|
@ -10,8 +8,8 @@ import com.simibubi.create.AllBlockPartials;
|
||||||
import com.simibubi.create.AllBlocks;
|
import com.simibubi.create.AllBlocks;
|
||||||
import com.simibubi.create.foundation.fluid.FluidRenderer;
|
import com.simibubi.create.foundation.fluid.FluidRenderer;
|
||||||
import com.simibubi.create.foundation.gui.GuiGameElement;
|
import com.simibubi.create.foundation.gui.GuiGameElement;
|
||||||
|
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||||
|
|
||||||
import net.minecraft.client.Minecraft;
|
|
||||||
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
||||||
import net.minecraft.client.renderer.IRenderTypeBuffer.Impl;
|
import net.minecraft.client.renderer.IRenderTypeBuffer.Impl;
|
||||||
import net.minecraft.client.renderer.Tessellator;
|
import net.minecraft.client.renderer.Tessellator;
|
||||||
|
@ -39,8 +37,7 @@ public class AnimatedSpout extends AnimatedKinetics {
|
||||||
.scale(scale)
|
.scale(scale)
|
||||||
.render();
|
.render();
|
||||||
|
|
||||||
float cycle = (ticks + Minecraft.getInstance()
|
float cycle = AnimationTickHolder.getRenderTick() % 30;
|
||||||
.getRenderPartialTicks()) % 30;
|
|
||||||
float squeeze = cycle < 20 ? MathHelper.sin((float) (cycle / 20f * Math.PI)) : 0;
|
float squeeze = cycle < 20 ? MathHelper.sin((float) (cycle / 20f * Math.PI)) : 0;
|
||||||
squeeze *= 20;
|
squeeze *= 20;
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
package com.simibubi.create.content.contraptions.base;
|
||||||
|
|
||||||
|
import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderRegistry;
|
||||||
|
import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer;
|
||||||
|
|
||||||
|
import net.minecraft.state.properties.BlockStateProperties;
|
||||||
|
import net.minecraft.tileentity.TileEntityType;
|
||||||
|
import net.minecraft.util.Direction;
|
||||||
|
import net.minecraftforge.api.distmarker.Dist;
|
||||||
|
import net.minecraftforge.fml.DistExecutor;
|
||||||
|
|
||||||
|
public class BackHalfShaftInstance extends HalfShaftInstance {
|
||||||
|
public static void register(TileEntityType<? extends KineticTileEntity> type) {
|
||||||
|
DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () ->
|
||||||
|
InstancedTileRenderRegistry.instance.register(type, BackHalfShaftInstance::new));
|
||||||
|
}
|
||||||
|
|
||||||
|
public BackHalfShaftInstance(InstancedTileRenderer modelManager, KineticTileEntity tile) {
|
||||||
|
super(modelManager, tile);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Direction getShaftDirection() {
|
||||||
|
return tile.getBlockState().get(BlockStateProperties.FACING).getOpposite();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,33 @@
|
||||||
|
package com.simibubi.create.content.contraptions.base;
|
||||||
|
|
||||||
|
import com.simibubi.create.AllBlockPartials;
|
||||||
|
import com.simibubi.create.foundation.render.backend.instancing.InstancedModel;
|
||||||
|
import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderRegistry;
|
||||||
|
import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer;
|
||||||
|
|
||||||
|
import net.minecraft.state.properties.BlockStateProperties;
|
||||||
|
import net.minecraft.tileentity.TileEntityType;
|
||||||
|
import net.minecraft.util.Direction;
|
||||||
|
import net.minecraftforge.api.distmarker.Dist;
|
||||||
|
import net.minecraftforge.fml.DistExecutor;
|
||||||
|
|
||||||
|
public class HalfShaftInstance extends SingleRotatingInstance {
|
||||||
|
public static void register(TileEntityType<? extends KineticTileEntity> type) {
|
||||||
|
DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () ->
|
||||||
|
InstancedTileRenderRegistry.instance.register(type, HalfShaftInstance::new));
|
||||||
|
}
|
||||||
|
|
||||||
|
public HalfShaftInstance(InstancedTileRenderer<?> modelManager, KineticTileEntity tile) {
|
||||||
|
super(modelManager, tile);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected InstancedModel<RotatingData> getModel() {
|
||||||
|
Direction dir = getShaftDirection();
|
||||||
|
return AllBlockPartials.SHAFT_HALF.renderOnDirectionalSouthRotating(modelManager, lastState, dir);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Direction getShaftDirection() {
|
||||||
|
return lastState.get(BlockStateProperties.FACING);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,26 @@
|
||||||
|
package com.simibubi.create.content.contraptions.base;
|
||||||
|
|
||||||
|
import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderRegistry;
|
||||||
|
import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer;
|
||||||
|
|
||||||
|
import net.minecraft.state.properties.BlockStateProperties;
|
||||||
|
import net.minecraft.tileentity.TileEntityType;
|
||||||
|
import net.minecraft.util.Direction;
|
||||||
|
import net.minecraftforge.api.distmarker.Dist;
|
||||||
|
import net.minecraftforge.fml.DistExecutor;
|
||||||
|
|
||||||
|
public class HorizontalHalfShaftInstance extends HalfShaftInstance {
|
||||||
|
public static void register(TileEntityType<? extends KineticTileEntity> type) {
|
||||||
|
DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () ->
|
||||||
|
InstancedTileRenderRegistry.instance.register(type, HorizontalHalfShaftInstance::new));
|
||||||
|
}
|
||||||
|
|
||||||
|
public HorizontalHalfShaftInstance(InstancedTileRenderer<?> modelManager, KineticTileEntity tile) {
|
||||||
|
super(modelManager, tile);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Direction getShaftDirection() {
|
||||||
|
return lastState.get(BlockStateProperties.HORIZONTAL_FACING).getOpposite();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,116 @@
|
||||||
|
package com.simibubi.create.content.contraptions.base;
|
||||||
|
|
||||||
|
import java.nio.ByteBuffer;
|
||||||
|
|
||||||
|
import com.simibubi.create.foundation.render.backend.instancing.InstanceData;
|
||||||
|
import com.simibubi.create.foundation.render.backend.instancing.InstancedModel;
|
||||||
|
import com.simibubi.create.foundation.utility.ColorHelper;
|
||||||
|
|
||||||
|
import net.minecraft.client.renderer.Vector3f;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
|
||||||
|
public class KineticData<D extends KineticData<D>> extends InstanceData {
|
||||||
|
private float x;
|
||||||
|
private float y;
|
||||||
|
private float z;
|
||||||
|
private byte blockLight;
|
||||||
|
private byte skyLight;
|
||||||
|
private byte r;
|
||||||
|
private byte g;
|
||||||
|
private byte b;
|
||||||
|
private float rotationalSpeed;
|
||||||
|
private float rotationOffset;
|
||||||
|
|
||||||
|
protected KineticData(InstancedModel<?> owner) {
|
||||||
|
super(owner);
|
||||||
|
}
|
||||||
|
|
||||||
|
public D setTileEntity(KineticTileEntity te) {
|
||||||
|
setPosition(te.getPos());
|
||||||
|
if (te.hasSource()) {
|
||||||
|
setColor(te.network);
|
||||||
|
}else {
|
||||||
|
setColor(0xFF, 0xFF, 0x00);
|
||||||
|
}
|
||||||
|
return (D) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public D setPosition(BlockPos pos) {
|
||||||
|
return setPosition(pos.getX(), pos.getY(), pos.getZ());
|
||||||
|
}
|
||||||
|
|
||||||
|
public D setPosition(Vector3f pos) {
|
||||||
|
return setPosition(pos.getX(), pos.getY(), pos.getZ());
|
||||||
|
}
|
||||||
|
|
||||||
|
public D setPosition(int x, int y, int z) {
|
||||||
|
BlockPos origin = owner.renderer.getOriginCoordinate();
|
||||||
|
|
||||||
|
return setPosition((float) (x - origin.getX()),
|
||||||
|
(float) (y - origin.getY()),
|
||||||
|
(float) (z - origin.getZ()));
|
||||||
|
}
|
||||||
|
|
||||||
|
public D setPosition(float x, float y, float z) {
|
||||||
|
this.x = x;
|
||||||
|
this.y = y;
|
||||||
|
this.z = z;
|
||||||
|
return (D) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public D setBlockLight(int blockLight) {
|
||||||
|
this.blockLight = (byte) ((blockLight & 0xF) << 4);
|
||||||
|
return (D) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public D setSkyLight(int skyLight) {
|
||||||
|
this.skyLight = (byte) ((skyLight & 0xF) << 4);
|
||||||
|
return (D) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public D setColor(Long l) {
|
||||||
|
if (l != null)
|
||||||
|
return setColor(l.longValue());
|
||||||
|
else
|
||||||
|
return setColor(0xFF, 0xFF, 0xFF);
|
||||||
|
}
|
||||||
|
|
||||||
|
private D setColor(long l) {
|
||||||
|
int color = ColorHelper.colorFromLong(l);
|
||||||
|
byte r = (byte) ((color >> 16) & 0xFF);
|
||||||
|
byte g = (byte) ((color >> 8) & 0xFF);
|
||||||
|
byte b = (byte) (color & 0xFF);
|
||||||
|
return setColor(r, g, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
public D setColor(int r, int g, int b) {
|
||||||
|
return setColor((byte) r, (byte) g, (byte) b);
|
||||||
|
}
|
||||||
|
|
||||||
|
public D setColor(byte r, byte g, byte b) {
|
||||||
|
this.r = r;
|
||||||
|
this.g = g;
|
||||||
|
this.b = b;
|
||||||
|
return (D) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public D setRotationalSpeed(float rotationalSpeed) {
|
||||||
|
this.rotationalSpeed = rotationalSpeed;
|
||||||
|
return (D) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public D setRotationOffset(float rotationOffset) {
|
||||||
|
this.rotationOffset = rotationOffset;
|
||||||
|
return (D) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void write(ByteBuffer buf) {
|
||||||
|
putVec3(buf, x, y, z);
|
||||||
|
putVec2(buf, blockLight, skyLight);
|
||||||
|
putVec3(buf, r, g, b);
|
||||||
|
put(buf, rotationalSpeed);
|
||||||
|
put(buf, rotationOffset);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.simibubi.create.content.contraptions.base;
|
||||||
|
|
||||||
|
import com.simibubi.create.content.contraptions.components.actors.ContraptionActorData;
|
||||||
|
import com.simibubi.create.content.contraptions.relays.belt.BeltData;
|
||||||
|
import com.simibubi.create.foundation.render.backend.instancing.InstancedModel;
|
||||||
|
import com.simibubi.create.foundation.render.backend.instancing.MaterialType;
|
||||||
|
|
||||||
|
public class KineticRenderMaterials {
|
||||||
|
public static final MaterialType<InstancedModel<RotatingData>> ROTATING = new MaterialType<>();
|
||||||
|
public static final MaterialType<InstancedModel<BeltData>> BELTS = new MaterialType<>();
|
||||||
|
|
||||||
|
public static final MaterialType<InstancedModel<ContraptionActorData>> ACTORS = new MaterialType<>();
|
||||||
|
}
|
|
@ -8,6 +8,7 @@ import java.util.List;
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
import com.simibubi.create.Create;
|
import com.simibubi.create.Create;
|
||||||
|
import com.simibubi.create.CreateClient;
|
||||||
import com.simibubi.create.content.contraptions.KineticNetwork;
|
import com.simibubi.create.content.contraptions.KineticNetwork;
|
||||||
import com.simibubi.create.content.contraptions.RotationPropagator;
|
import com.simibubi.create.content.contraptions.RotationPropagator;
|
||||||
import com.simibubi.create.content.contraptions.base.IRotate.SpeedLevel;
|
import com.simibubi.create.content.contraptions.base.IRotate.SpeedLevel;
|
||||||
|
@ -17,6 +18,8 @@ import com.simibubi.create.content.contraptions.goggles.IHaveHoveringInformation
|
||||||
import com.simibubi.create.foundation.advancement.AllTriggers;
|
import com.simibubi.create.foundation.advancement.AllTriggers;
|
||||||
import com.simibubi.create.foundation.config.AllConfigs;
|
import com.simibubi.create.foundation.config.AllConfigs;
|
||||||
import com.simibubi.create.foundation.item.TooltipHelper;
|
import com.simibubi.create.foundation.item.TooltipHelper;
|
||||||
|
import com.simibubi.create.foundation.render.backend.FastRenderDispatcher;
|
||||||
|
import com.simibubi.create.foundation.render.backend.instancing.IInstanceRendered;
|
||||||
import com.simibubi.create.foundation.tileEntity.SmartTileEntity;
|
import com.simibubi.create.foundation.tileEntity.SmartTileEntity;
|
||||||
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
|
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
|
||||||
import com.simibubi.create.foundation.utility.Lang;
|
import com.simibubi.create.foundation.utility.Lang;
|
||||||
|
@ -32,12 +35,16 @@ import net.minecraft.tileentity.TileEntityType;
|
||||||
import net.minecraft.util.Direction;
|
import net.minecraft.util.Direction;
|
||||||
import net.minecraft.util.Direction.Axis;
|
import net.minecraft.util.Direction.Axis;
|
||||||
import net.minecraft.util.Direction.AxisDirection;
|
import net.minecraft.util.Direction.AxisDirection;
|
||||||
|
import net.minecraft.util.math.AxisAlignedBB;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.util.text.TextFormatting;
|
import net.minecraft.util.text.TextFormatting;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.api.distmarker.Dist;
|
||||||
|
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||||
|
import net.minecraftforge.fml.DistExecutor;
|
||||||
|
|
||||||
public abstract class KineticTileEntity extends SmartTileEntity
|
public abstract class KineticTileEntity extends SmartTileEntity
|
||||||
implements ITickableTileEntity, IHaveGoggleInformation, IHaveHoveringInformation {
|
implements ITickableTileEntity, IHaveGoggleInformation, IHaveHoveringInformation, IInstanceRendered {
|
||||||
|
|
||||||
public @Nullable Long network;
|
public @Nullable Long network;
|
||||||
public @Nullable BlockPos source;
|
public @Nullable BlockPos source;
|
||||||
|
@ -245,6 +252,9 @@ public abstract class KineticTileEntity extends SmartTileEntity
|
||||||
|
|
||||||
if (clientPacket && overStressedBefore != overStressed && speed != 0)
|
if (clientPacket && overStressedBefore != overStressed && speed != 0)
|
||||||
effects.triggerOverStressedEffect();
|
effects.triggerOverStressedEffect();
|
||||||
|
|
||||||
|
if (clientPacket)
|
||||||
|
FastRenderDispatcher.enqueueUpdate(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public float getGeneratedSpeed() {
|
public float getGeneratedSpeed() {
|
||||||
|
@ -528,4 +538,42 @@ public abstract class KineticTileEntity extends SmartTileEntity
|
||||||
return block.hasIntegratedCogwheel(world, pos, state);
|
return block.hasIntegratedCogwheel(world, pos, state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onLoad() {
|
||||||
|
super.onLoad();
|
||||||
|
if (world != null && world.isRemote)
|
||||||
|
DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> CreateClient.kineticRenderer.add(this));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onChunkUnloaded() {
|
||||||
|
if (world != null && world.isRemote)
|
||||||
|
DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> CreateClient.kineticRenderer.remove(this));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void requestModelDataUpdate() {
|
||||||
|
super.requestModelDataUpdate();
|
||||||
|
if (!this.removed) {
|
||||||
|
FastRenderDispatcher.enqueueUpdate(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onChunkLightUpdate() {
|
||||||
|
CreateClient.kineticRenderer.onLightUpdate(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected AxisAlignedBB cachedBoundingBox;
|
||||||
|
@OnlyIn(Dist.CLIENT)
|
||||||
|
public AxisAlignedBB getRenderBoundingBox() {
|
||||||
|
if (cachedBoundingBox == null) {
|
||||||
|
cachedBoundingBox = makeRenderBoundingBox();
|
||||||
|
}
|
||||||
|
return cachedBoundingBox;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected AxisAlignedBB makeRenderBoundingBox() {
|
||||||
|
return super.getRenderBoundingBox();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,11 +6,12 @@ import com.simibubi.create.AllBlocks;
|
||||||
import com.simibubi.create.CreateClient;
|
import com.simibubi.create.CreateClient;
|
||||||
import com.simibubi.create.content.contraptions.KineticDebugger;
|
import com.simibubi.create.content.contraptions.KineticDebugger;
|
||||||
import com.simibubi.create.content.contraptions.relays.elementary.CogWheelBlock;
|
import com.simibubi.create.content.contraptions.relays.elementary.CogWheelBlock;
|
||||||
|
import com.simibubi.create.foundation.render.Compartment;
|
||||||
|
import com.simibubi.create.foundation.render.SuperByteBuffer;
|
||||||
|
import com.simibubi.create.foundation.render.backend.FastRenderDispatcher;
|
||||||
import com.simibubi.create.foundation.tileEntity.renderer.SafeTileEntityRenderer;
|
import com.simibubi.create.foundation.tileEntity.renderer.SafeTileEntityRenderer;
|
||||||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||||
import com.simibubi.create.foundation.utility.ColorHelper;
|
import com.simibubi.create.foundation.utility.ColorHelper;
|
||||||
import com.simibubi.create.foundation.utility.SuperByteBuffer;
|
|
||||||
import com.simibubi.create.foundation.utility.SuperByteBufferCache.Compartment;
|
|
||||||
|
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
||||||
|
@ -38,6 +39,8 @@ public class KineticTileEntityRenderer extends SafeTileEntityRenderer<KineticTil
|
||||||
@Override
|
@Override
|
||||||
protected void renderSafe(KineticTileEntity te, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffer,
|
protected void renderSafe(KineticTileEntity te, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffer,
|
||||||
int light, int overlay) {
|
int light, int overlay) {
|
||||||
|
if (FastRenderDispatcher.available(te.getWorld())) return;
|
||||||
|
|
||||||
for (RenderType type : RenderType.getBlockLayers())
|
for (RenderType type : RenderType.getBlockLayers())
|
||||||
if (RenderTypeLookup.canRenderInLayer(te.getBlockState(), type))
|
if (RenderTypeLookup.canRenderInLayer(te.getBlockState(), type))
|
||||||
renderRotatingBuffer(te, getRotatedModel(te), ms, buffer.getBuffer(type), light);
|
renderRotatingBuffer(te, getRotatedModel(te), ms, buffer.getBuffer(type), light);
|
||||||
|
|
|
@ -0,0 +1,71 @@
|
||||||
|
package com.simibubi.create.content.contraptions.base;
|
||||||
|
|
||||||
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
|
import com.simibubi.create.AllBlocks;
|
||||||
|
import com.simibubi.create.content.contraptions.relays.elementary.CogWheelBlock;
|
||||||
|
import com.simibubi.create.content.contraptions.relays.elementary.ShaftBlock;
|
||||||
|
import com.simibubi.create.foundation.render.backend.instancing.InstanceKey;
|
||||||
|
import com.simibubi.create.foundation.render.backend.instancing.InstancedModel;
|
||||||
|
import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer;
|
||||||
|
import com.simibubi.create.foundation.render.backend.instancing.RenderMaterial;
|
||||||
|
import com.simibubi.create.foundation.render.backend.instancing.TileEntityInstance;
|
||||||
|
|
||||||
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.util.Direction;
|
||||||
|
import net.minecraft.world.LightType;
|
||||||
|
|
||||||
|
public abstract class KineticTileInstance<T extends KineticTileEntity> extends TileEntityInstance<T> {
|
||||||
|
|
||||||
|
public KineticTileInstance(InstancedTileRenderer<?> modelManager, T tile) {
|
||||||
|
super(modelManager, tile);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected final void updateRotation(InstanceKey<RotatingData> key, Direction.Axis axis) {
|
||||||
|
key.modifyInstance(data -> {
|
||||||
|
data.setColor(tile.network)
|
||||||
|
.setRotationalSpeed(tile.getSpeed())
|
||||||
|
.setRotationOffset(getRotationOffset(axis))
|
||||||
|
.setRotationAxis(axis);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
protected final Consumer<RotatingData> setupFunc(float speed, Direction.Axis axis) {
|
||||||
|
return data -> {
|
||||||
|
data.setBlockLight(world.getLightLevel(LightType.BLOCK, pos))
|
||||||
|
.setSkyLight(world.getLightLevel(LightType.SKY, pos))
|
||||||
|
.setTileEntity(tile)
|
||||||
|
.setRotationalSpeed(speed)
|
||||||
|
.setRotationOffset(getRotationOffset(axis))
|
||||||
|
.setRotationAxis(axis);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
protected final void relight(KineticData<?> data) {
|
||||||
|
data.setBlockLight(world.getLightLevel(LightType.BLOCK, pos))
|
||||||
|
.setSkyLight(world.getLightLevel(LightType.SKY, pos));
|
||||||
|
}
|
||||||
|
|
||||||
|
protected float getRotationOffset(final Direction.Axis axis) {
|
||||||
|
float offset = CogWheelBlock.isLargeCog(lastState) ? 11.25f : 0;
|
||||||
|
double d = (((axis == Direction.Axis.X) ? 0 : pos.getX()) + ((axis == Direction.Axis.Y) ? 0 : pos.getY())
|
||||||
|
+ ((axis == Direction.Axis.Z) ? 0 : pos.getZ())) % 2;
|
||||||
|
if (d == 0) {
|
||||||
|
offset = 22.5f;
|
||||||
|
}
|
||||||
|
return offset;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static BlockState shaft(Direction.Axis axis) {
|
||||||
|
return AllBlocks.SHAFT.getDefaultState()
|
||||||
|
.with(ShaftBlock.AXIS, axis);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Direction.Axis getRotationAxis() {
|
||||||
|
return ((IRotate) lastState.getBlock()).getRotationAxis(lastState);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected final RenderMaterial<?, InstancedModel<RotatingData>> rotatingMaterial() {
|
||||||
|
return modelManager.getMaterial(KineticRenderMaterials.ROTATING);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,42 @@
|
||||||
|
package com.simibubi.create.content.contraptions.base;
|
||||||
|
|
||||||
|
import com.simibubi.create.foundation.render.backend.gl.attrib.CommonAttributes;
|
||||||
|
import com.simibubi.create.foundation.render.backend.gl.attrib.IVertexAttrib;
|
||||||
|
import com.simibubi.create.foundation.render.backend.gl.attrib.VertexAttribSpec;
|
||||||
|
|
||||||
|
public enum KineticVertexAttributes implements IVertexAttrib {
|
||||||
|
INSTANCE_POSITION("aInstancePos", CommonAttributes.VEC3),
|
||||||
|
LIGHT("aLight", CommonAttributes.LIGHT),
|
||||||
|
NETWORK_COLOR("aNetworkTint", CommonAttributes.RGB),
|
||||||
|
SPEED("aSpeed", CommonAttributes.FLOAT),
|
||||||
|
OFFSET("aOffset", CommonAttributes.FLOAT),
|
||||||
|
;
|
||||||
|
|
||||||
|
private final String name;
|
||||||
|
private final VertexAttribSpec spec;
|
||||||
|
|
||||||
|
KineticVertexAttributes(String name, VertexAttribSpec spec) {
|
||||||
|
this.name = name;
|
||||||
|
this.spec = spec;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String attribName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public VertexAttribSpec attribSpec() {
|
||||||
|
return spec;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getDivisor() {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getBufferIndex() {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
|
@ -27,7 +27,7 @@ public abstract class RotatedPillarKineticBlock extends KineticBlock {
|
||||||
switch (rot) {
|
switch (rot) {
|
||||||
case COUNTERCLOCKWISE_90:
|
case COUNTERCLOCKWISE_90:
|
||||||
case CLOCKWISE_90:
|
case CLOCKWISE_90:
|
||||||
switch ((Direction.Axis) state.get(AXIS)) {
|
switch (state.get(AXIS)) {
|
||||||
case X:
|
case X:
|
||||||
return state.with(AXIS, Direction.Axis.Z);
|
return state.with(AXIS, Direction.Axis.Z);
|
||||||
case Z:
|
case Z:
|
||||||
|
|
|
@ -0,0 +1,49 @@
|
||||||
|
package com.simibubi.create.content.contraptions.base;
|
||||||
|
|
||||||
|
import java.nio.ByteBuffer;
|
||||||
|
|
||||||
|
import com.simibubi.create.foundation.render.backend.gl.attrib.VertexFormat;
|
||||||
|
import com.simibubi.create.foundation.render.backend.instancing.InstancedModel;
|
||||||
|
|
||||||
|
import net.minecraft.client.renderer.Vector3f;
|
||||||
|
import net.minecraft.util.Direction;
|
||||||
|
|
||||||
|
public class RotatingData extends KineticData<RotatingData> {
|
||||||
|
public static VertexFormat FORMAT = VertexFormat.builder()
|
||||||
|
.addAttributes(KineticVertexAttributes.class)
|
||||||
|
.addAttributes(RotatingVertexAttributes.class)
|
||||||
|
.build();
|
||||||
|
|
||||||
|
private byte rotationAxisX;
|
||||||
|
private byte rotationAxisY;
|
||||||
|
private byte rotationAxisZ;
|
||||||
|
|
||||||
|
protected RotatingData(InstancedModel<?> owner) {
|
||||||
|
super(owner);
|
||||||
|
}
|
||||||
|
|
||||||
|
public RotatingData setRotationAxis(Direction.Axis axis) {
|
||||||
|
Direction orientation = Direction.getFacingFromAxis(Direction.AxisDirection.POSITIVE, axis);
|
||||||
|
setRotationAxis(orientation.getUnitVector());
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RotatingData setRotationAxis(Vector3f axis) {
|
||||||
|
setRotationAxis(axis.getX(), axis.getY(), axis.getZ());
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RotatingData setRotationAxis(float rotationAxisX, float rotationAxisY, float rotationAxisZ) {
|
||||||
|
this.rotationAxisX = (byte) (rotationAxisX * 127);
|
||||||
|
this.rotationAxisY = (byte) (rotationAxisY * 127);
|
||||||
|
this.rotationAxisZ = (byte) (rotationAxisZ * 127);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void write(ByteBuffer buf) {
|
||||||
|
super.write(buf);
|
||||||
|
|
||||||
|
putVec3(buf, rotationAxisX, rotationAxisY, rotationAxisZ);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.simibubi.create.content.contraptions.base;
|
||||||
|
|
||||||
|
import com.simibubi.create.foundation.render.backend.gl.attrib.VertexFormat;
|
||||||
|
import com.simibubi.create.foundation.render.backend.instancing.InstancedModel;
|
||||||
|
import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer;
|
||||||
|
|
||||||
|
import net.minecraft.client.renderer.BufferBuilder;
|
||||||
|
|
||||||
|
public class RotatingInstancedModel extends InstancedModel<RotatingData> {
|
||||||
|
public RotatingInstancedModel(InstancedTileRenderer<?> renderer, BufferBuilder buf) {
|
||||||
|
super(renderer, buf);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected RotatingData newInstance() {
|
||||||
|
return new RotatingData(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected VertexFormat getInstanceFormat() {
|
||||||
|
return RotatingData.FORMAT;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,38 @@
|
||||||
|
package com.simibubi.create.content.contraptions.base;
|
||||||
|
|
||||||
|
import com.simibubi.create.foundation.render.backend.gl.attrib.CommonAttributes;
|
||||||
|
import com.simibubi.create.foundation.render.backend.gl.attrib.IVertexAttrib;
|
||||||
|
import com.simibubi.create.foundation.render.backend.gl.attrib.VertexAttribSpec;
|
||||||
|
|
||||||
|
public enum RotatingVertexAttributes implements IVertexAttrib {
|
||||||
|
AXIS("aAxis", CommonAttributes.NORMAL),
|
||||||
|
;
|
||||||
|
|
||||||
|
private final String name;
|
||||||
|
private final VertexAttribSpec spec;
|
||||||
|
|
||||||
|
RotatingVertexAttributes(String name, VertexAttribSpec spec) {
|
||||||
|
this.name = name;
|
||||||
|
this.spec = spec;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String attribName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public VertexAttribSpec attribSpec() {
|
||||||
|
return spec;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getDivisor() {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getBufferIndex() {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,26 @@
|
||||||
|
package com.simibubi.create.content.contraptions.base;
|
||||||
|
|
||||||
|
import com.simibubi.create.AllBlockPartials;
|
||||||
|
import com.simibubi.create.foundation.render.backend.instancing.InstancedModel;
|
||||||
|
import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderRegistry;
|
||||||
|
import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer;
|
||||||
|
|
||||||
|
import net.minecraft.tileentity.TileEntityType;
|
||||||
|
import net.minecraftforge.api.distmarker.Dist;
|
||||||
|
import net.minecraftforge.fml.DistExecutor;
|
||||||
|
|
||||||
|
public class ShaftlessCogInstance extends SingleRotatingInstance {
|
||||||
|
public static void register(TileEntityType<? extends KineticTileEntity> type) {
|
||||||
|
DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () ->
|
||||||
|
InstancedTileRenderRegistry.instance.register(type, ShaftlessCogInstance::new));
|
||||||
|
}
|
||||||
|
|
||||||
|
public ShaftlessCogInstance(InstancedTileRenderer modelManager, KineticTileEntity tile) {
|
||||||
|
super(modelManager, tile);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected InstancedModel<RotatingData> getModel() {
|
||||||
|
return AllBlockPartials.SHAFTLESS_COGWHEEL.renderOnRotating(modelManager, tile.getBlockState());
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,57 @@
|
||||||
|
package com.simibubi.create.content.contraptions.base;
|
||||||
|
|
||||||
|
import static com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer.KINETIC_TILE;
|
||||||
|
|
||||||
|
import com.simibubi.create.foundation.render.backend.instancing.InstanceKey;
|
||||||
|
import com.simibubi.create.foundation.render.backend.instancing.InstancedModel;
|
||||||
|
import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderRegistry;
|
||||||
|
import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer;
|
||||||
|
|
||||||
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.tileentity.TileEntityType;
|
||||||
|
import net.minecraft.util.Direction;
|
||||||
|
import net.minecraftforge.api.distmarker.Dist;
|
||||||
|
import net.minecraftforge.fml.DistExecutor;
|
||||||
|
|
||||||
|
public class SingleRotatingInstance extends KineticTileInstance<KineticTileEntity> {
|
||||||
|
public static void register(TileEntityType<? extends KineticTileEntity> type) {
|
||||||
|
DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () ->
|
||||||
|
InstancedTileRenderRegistry.instance.register(type, SingleRotatingInstance::new));
|
||||||
|
}
|
||||||
|
|
||||||
|
protected InstanceKey<RotatingData> rotatingModelKey;
|
||||||
|
|
||||||
|
public SingleRotatingInstance(InstancedTileRenderer modelManager, KineticTileEntity tile) {
|
||||||
|
super(modelManager, tile);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void init() {
|
||||||
|
Direction.Axis axis = ((IRotate) lastState.getBlock()).getRotationAxis(lastState);
|
||||||
|
rotatingModelKey = getModel().setupInstance(setupFunc(tile.getSpeed(), axis));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onUpdate() {
|
||||||
|
Direction.Axis axis = ((IRotate) lastState.getBlock()).getRotationAxis(lastState);
|
||||||
|
updateRotation(rotatingModelKey, axis);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateLight() {
|
||||||
|
rotatingModelKey.modifyInstance(this::relight);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void remove() {
|
||||||
|
rotatingModelKey.delete();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected BlockState getRenderedBlockState() {
|
||||||
|
return lastState;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected InstancedModel<RotatingData> getModel() {
|
||||||
|
return rotatingMaterial().getModel(KINETIC_TILE, getRenderedBlockState());
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,43 @@
|
||||||
|
package com.simibubi.create.content.contraptions.components.actors;
|
||||||
|
|
||||||
|
import com.simibubi.create.foundation.render.backend.gl.attrib.CommonAttributes;
|
||||||
|
import com.simibubi.create.foundation.render.backend.gl.attrib.IVertexAttrib;
|
||||||
|
import com.simibubi.create.foundation.render.backend.gl.attrib.VertexAttribSpec;
|
||||||
|
|
||||||
|
public enum ActorVertexAttributes implements IVertexAttrib {
|
||||||
|
INSTANCE_POSITION("aInstancePos", CommonAttributes.VEC3),
|
||||||
|
LIGHT("aModelLight", CommonAttributes.LIGHT),
|
||||||
|
OFFSET("aOffset", CommonAttributes.FLOAT),
|
||||||
|
AXIS("aAxis", CommonAttributes.NORMAL),
|
||||||
|
INSTANCE_ROTATION("aInstanceRot", CommonAttributes.VEC3),
|
||||||
|
ROTATION_CENTER("aRotationCenter", CommonAttributes.NORMAL),
|
||||||
|
;
|
||||||
|
|
||||||
|
private final String name;
|
||||||
|
private final VertexAttribSpec spec;
|
||||||
|
|
||||||
|
ActorVertexAttributes(String name, VertexAttribSpec spec) {
|
||||||
|
this.name = name;
|
||||||
|
this.spec = spec;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String attribName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public VertexAttribSpec attribSpec() {
|
||||||
|
return spec;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getDivisor() {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getBufferIndex() {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
|
@ -10,8 +10,8 @@ import net.minecraft.util.math.Vec3d;
|
||||||
|
|
||||||
public class BellMovementBehaviour extends MovementBehaviour {
|
public class BellMovementBehaviour extends MovementBehaviour {
|
||||||
@Override
|
@Override
|
||||||
public boolean hasSpecialMovementRenderer() {
|
public boolean renderAsNormalTileEntity() {
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -10,8 +10,8 @@ import net.minecraft.particles.ParticleTypes;
|
||||||
|
|
||||||
public class CampfireMovementBehaviour extends MovementBehaviour {
|
public class CampfireMovementBehaviour extends MovementBehaviour {
|
||||||
@Override
|
@Override
|
||||||
public boolean hasSpecialMovementRenderer() {
|
public boolean renderAsNormalTileEntity() {
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -0,0 +1,106 @@
|
||||||
|
package com.simibubi.create.content.contraptions.components.actors;
|
||||||
|
|
||||||
|
import java.nio.ByteBuffer;
|
||||||
|
|
||||||
|
import com.simibubi.create.foundation.render.backend.gl.attrib.VertexFormat;
|
||||||
|
import com.simibubi.create.foundation.render.backend.instancing.InstanceData;
|
||||||
|
import com.simibubi.create.foundation.render.backend.instancing.InstancedModel;
|
||||||
|
|
||||||
|
import net.minecraft.client.renderer.Vector3f;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
|
||||||
|
public class ContraptionActorData extends InstanceData {
|
||||||
|
public static VertexFormat FORMAT = VertexFormat.builder()
|
||||||
|
.addAttributes(ActorVertexAttributes.class)
|
||||||
|
.build();
|
||||||
|
|
||||||
|
private float x;
|
||||||
|
private float y;
|
||||||
|
private float z;
|
||||||
|
private byte blockLight;
|
||||||
|
private byte skyLight;
|
||||||
|
private float rotationOffset;
|
||||||
|
private byte rotationAxisX;
|
||||||
|
private byte rotationAxisY;
|
||||||
|
private byte rotationAxisZ;
|
||||||
|
private float localRotationX;
|
||||||
|
private float localRotationY;
|
||||||
|
private float localRotationZ;
|
||||||
|
private byte rotationCenterX = 64;
|
||||||
|
private byte rotationCenterY = 64;
|
||||||
|
private byte rotationCenterZ = 64;
|
||||||
|
|
||||||
|
protected ContraptionActorData(InstancedModel<?> owner) {
|
||||||
|
super(owner);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public ContraptionActorData setPosition(BlockPos pos) {
|
||||||
|
this.x = pos.getX();
|
||||||
|
this.y = pos.getY();
|
||||||
|
this.z = pos.getZ();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ContraptionActorData setBlockLight(int blockLight) {
|
||||||
|
this.blockLight = (byte) ((blockLight & 0xF) << 4);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ContraptionActorData setSkyLight(int skyLight) {
|
||||||
|
this.skyLight = (byte) ((skyLight & 0xF) << 4);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ContraptionActorData setRotationOffset(float rotationOffset) {
|
||||||
|
this.rotationOffset = rotationOffset;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ContraptionActorData setRotationAxis(Vector3f axis) {
|
||||||
|
setRotationAxis(axis.getX(), axis.getY(), axis.getZ());
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ContraptionActorData setRotationAxis(float rotationAxisX, float rotationAxisY, float rotationAxisZ) {
|
||||||
|
this.rotationAxisX = (byte) (rotationAxisX * 127);
|
||||||
|
this.rotationAxisY = (byte) (rotationAxisY * 127);
|
||||||
|
this.rotationAxisZ = (byte) (rotationAxisZ * 127);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ContraptionActorData setRotationCenter(Vector3f axis) {
|
||||||
|
setRotationCenter(axis.getX(), axis.getY(), axis.getZ());
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ContraptionActorData setRotationCenter(float rotationCenterX, float rotationCenterY, float rotationCenterZ) {
|
||||||
|
this.rotationCenterX = (byte) (rotationCenterX * 127);
|
||||||
|
this.rotationCenterY = (byte) (rotationCenterY * 127);
|
||||||
|
this.rotationCenterZ = (byte) (rotationCenterZ * 127);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ContraptionActorData setLocalRotation(Vector3f axis) {
|
||||||
|
setLocalRotation(axis.getX(), axis.getY(), axis.getZ());
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ContraptionActorData setLocalRotation(float localRotationX, float localRotationY, float localRotationZ) {
|
||||||
|
this.localRotationX = localRotationX;
|
||||||
|
this.localRotationY = localRotationY;
|
||||||
|
this.localRotationZ = localRotationZ;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void write(ByteBuffer buf) {
|
||||||
|
putVec3(buf, x, y, z);
|
||||||
|
putVec2(buf, blockLight, skyLight);
|
||||||
|
put(buf, rotationOffset);
|
||||||
|
putVec3(buf, rotationAxisX, rotationAxisY, rotationAxisZ);
|
||||||
|
putVec3(buf, localRotationX, localRotationY, localRotationZ);
|
||||||
|
putVec3(buf, rotationCenterX, rotationCenterY, rotationCenterZ);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,53 @@
|
||||||
|
package com.simibubi.create.content.contraptions.components.actors;
|
||||||
|
|
||||||
|
import com.simibubi.create.AllBlockPartials;
|
||||||
|
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
||||||
|
import com.simibubi.create.content.contraptions.base.RotatingData;
|
||||||
|
import com.simibubi.create.content.contraptions.base.SingleRotatingInstance;
|
||||||
|
import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext;
|
||||||
|
import com.simibubi.create.content.contraptions.components.structureMovement.render.RenderedContraption;
|
||||||
|
import com.simibubi.create.foundation.render.backend.instancing.InstancedModel;
|
||||||
|
import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderRegistry;
|
||||||
|
import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer;
|
||||||
|
import com.simibubi.create.foundation.render.backend.instancing.RenderMaterial;
|
||||||
|
import com.simibubi.create.foundation.utility.AngleHelper;
|
||||||
|
|
||||||
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.tileentity.TileEntityType;
|
||||||
|
import net.minecraft.util.Direction;
|
||||||
|
import net.minecraft.world.LightType;
|
||||||
|
import net.minecraftforge.api.distmarker.Dist;
|
||||||
|
import net.minecraftforge.fml.DistExecutor;
|
||||||
|
|
||||||
|
public class DrillInstance extends SingleRotatingInstance {
|
||||||
|
public static void register(TileEntityType<? extends KineticTileEntity> type) {
|
||||||
|
DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () ->
|
||||||
|
InstancedTileRenderRegistry.instance.register(type, DrillInstance::new)); }
|
||||||
|
|
||||||
|
public DrillInstance(InstancedTileRenderer modelManager, KineticTileEntity tile) {
|
||||||
|
super(modelManager, tile);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void addInstanceForContraption(RenderedContraption contraption, MovementContext context) {
|
||||||
|
RenderMaterial<?, InstancedModel<ContraptionActorData>> renderMaterial = contraption.getActorMaterial();
|
||||||
|
|
||||||
|
BlockState state = context.state;
|
||||||
|
InstancedModel<ContraptionActorData> model = renderMaterial.getModel(AllBlockPartials.DRILL_HEAD, state);
|
||||||
|
|
||||||
|
model.setupInstance(data -> {
|
||||||
|
Direction facing = state.get(DrillBlock.FACING);
|
||||||
|
float eulerX = AngleHelper.verticalAngle(facing) + ((facing.getAxis() == Direction.Axis.Y) ? 180 : 0);
|
||||||
|
float eulerY = facing.getHorizontalAngle();
|
||||||
|
data.setPosition(context.localPos)
|
||||||
|
.setBlockLight(contraption.renderWorld.getLightLevel(LightType.BLOCK, context.localPos))
|
||||||
|
.setRotationOffset(0)
|
||||||
|
.setRotationAxis(0, 0, 1)
|
||||||
|
.setLocalRotation(eulerX, eulerY, 0);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected InstancedModel<RotatingData> getModel() {
|
||||||
|
return AllBlockPartials.DRILL_HEAD.renderOnDirectionalSouthRotating(modelManager, tile.getBlockState());
|
||||||
|
}
|
||||||
|
}
|
|
@ -2,6 +2,8 @@ package com.simibubi.create.content.contraptions.components.actors;
|
||||||
|
|
||||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext;
|
import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext;
|
||||||
|
import com.simibubi.create.content.contraptions.components.structureMovement.render.RenderedContraption;
|
||||||
|
import com.simibubi.create.foundation.render.backend.FastRenderDispatcher;
|
||||||
import com.simibubi.create.foundation.utility.VecHelper;
|
import com.simibubi.create.foundation.utility.VecHelper;
|
||||||
|
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
|
@ -31,9 +33,20 @@ public class DrillMovementBehaviour extends BlockBreakingMovementBehaviour {
|
||||||
@OnlyIn(value = Dist.CLIENT)
|
@OnlyIn(value = Dist.CLIENT)
|
||||||
public void renderInContraption(MovementContext context, MatrixStack ms, MatrixStack msLocal,
|
public void renderInContraption(MovementContext context, MatrixStack ms, MatrixStack msLocal,
|
||||||
IRenderTypeBuffer buffer) {
|
IRenderTypeBuffer buffer) {
|
||||||
|
if (!FastRenderDispatcher.available())
|
||||||
DrillRenderer.renderInContraption(context, ms, msLocal, buffer);
|
DrillRenderer.renderInContraption(context, ms, msLocal, buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean hasSpecialInstancedRendering() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addInstance(RenderedContraption contraption, MovementContext context) {
|
||||||
|
DrillInstance.addInstanceForContraption(contraption, context);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected DamageSource getDamageSource() {
|
protected DamageSource getDamageSource() {
|
||||||
return DrillBlock.damageSourceDrill;
|
return DrillBlock.damageSourceDrill;
|
||||||
|
|
|
@ -7,10 +7,10 @@ import com.simibubi.create.AllBlockPartials;
|
||||||
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
||||||
import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer;
|
import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext;
|
import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext;
|
||||||
|
import com.simibubi.create.foundation.render.SuperByteBuffer;
|
||||||
import com.simibubi.create.foundation.utility.AngleHelper;
|
import com.simibubi.create.foundation.utility.AngleHelper;
|
||||||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||||
import com.simibubi.create.foundation.utility.MatrixStacker;
|
import com.simibubi.create.foundation.utility.MatrixStacker;
|
||||||
import com.simibubi.create.foundation.utility.SuperByteBuffer;
|
|
||||||
import com.simibubi.create.foundation.utility.VecHelper;
|
import com.simibubi.create.foundation.utility.VecHelper;
|
||||||
|
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
|
|
|
@ -7,6 +7,8 @@ import org.apache.commons.lang3.mutable.MutableBoolean;
|
||||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.MovementBehaviour;
|
import com.simibubi.create.content.contraptions.components.structureMovement.MovementBehaviour;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext;
|
import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext;
|
||||||
|
import com.simibubi.create.content.contraptions.components.structureMovement.render.RenderedContraption;
|
||||||
|
import com.simibubi.create.foundation.render.backend.FastRenderDispatcher;
|
||||||
import com.simibubi.create.foundation.utility.BlockHelper;
|
import com.simibubi.create.foundation.utility.BlockHelper;
|
||||||
import com.simibubi.create.foundation.utility.VecHelper;
|
import com.simibubi.create.foundation.utility.VecHelper;
|
||||||
|
|
||||||
|
@ -35,9 +37,20 @@ public class HarvesterMovementBehaviour extends MovementBehaviour {
|
||||||
.getOpposite());
|
.getOpposite());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean hasSpecialInstancedRendering() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addInstance(RenderedContraption contraption, MovementContext context) {
|
||||||
|
HarvesterRenderer.addInstanceForContraption(contraption, context);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void renderInContraption(MovementContext context, MatrixStack ms, MatrixStack msLocal,
|
public void renderInContraption(MovementContext context, MatrixStack ms, MatrixStack msLocal,
|
||||||
IRenderTypeBuffer buffers) {
|
IRenderTypeBuffer buffers) {
|
||||||
|
if (!FastRenderDispatcher.available())
|
||||||
HarvesterRenderer.renderInContraption(context, ms, msLocal, buffers);
|
HarvesterRenderer.renderInContraption(context, ms, msLocal, buffers);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,19 +5,25 @@ import static net.minecraft.state.properties.BlockStateProperties.HORIZONTAL_FAC
|
||||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||||
import com.simibubi.create.AllBlockPartials;
|
import com.simibubi.create.AllBlockPartials;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext;
|
import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext;
|
||||||
|
import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionRenderDispatcher;
|
||||||
|
import com.simibubi.create.content.contraptions.components.structureMovement.render.RenderedContraption;
|
||||||
|
import com.simibubi.create.foundation.render.SuperByteBuffer;
|
||||||
|
import com.simibubi.create.foundation.render.backend.instancing.InstancedModel;
|
||||||
|
import com.simibubi.create.foundation.render.backend.instancing.RenderMaterial;
|
||||||
import com.simibubi.create.foundation.tileEntity.renderer.SafeTileEntityRenderer;
|
import com.simibubi.create.foundation.tileEntity.renderer.SafeTileEntityRenderer;
|
||||||
import com.simibubi.create.foundation.utility.AngleHelper;
|
import com.simibubi.create.foundation.utility.AngleHelper;
|
||||||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||||
import com.simibubi.create.foundation.utility.SuperByteBuffer;
|
|
||||||
import com.simibubi.create.foundation.utility.VecHelper;
|
import com.simibubi.create.foundation.utility.VecHelper;
|
||||||
|
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
||||||
import net.minecraft.client.renderer.RenderType;
|
import net.minecraft.client.renderer.RenderType;
|
||||||
|
import net.minecraft.client.renderer.Vector3f;
|
||||||
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
|
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
|
||||||
import net.minecraft.util.Direction;
|
import net.minecraft.util.Direction;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.util.math.Vec3d;
|
import net.minecraft.util.math.Vec3d;
|
||||||
|
import net.minecraft.world.LightType;
|
||||||
|
|
||||||
public class HarvesterRenderer extends SafeTileEntityRenderer<HarvesterTileEntity> {
|
public class HarvesterRenderer extends SafeTileEntityRenderer<HarvesterTileEntity> {
|
||||||
|
|
||||||
|
@ -34,6 +40,25 @@ public class HarvesterRenderer extends SafeTileEntityRenderer<HarvesterTileEntit
|
||||||
.renderInto(ms, buffer.getBuffer(RenderType.getCutoutMipped()));
|
.renderInto(ms, buffer.getBuffer(RenderType.getCutoutMipped()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void addInstanceForContraption(RenderedContraption contraption, MovementContext context) {
|
||||||
|
RenderMaterial<?, InstancedModel<ContraptionActorData>> renderMaterial = contraption.getActorMaterial();
|
||||||
|
|
||||||
|
BlockState state = context.state;
|
||||||
|
InstancedModel<ContraptionActorData> model = renderMaterial.getModel(AllBlockPartials.HARVESTER_BLADE, state);
|
||||||
|
|
||||||
|
model.setupInstance(data -> {
|
||||||
|
Direction facing = state.get(HORIZONTAL_FACING);
|
||||||
|
float originOffset = 1 / 16f;
|
||||||
|
Vector3f rotOffset = new Vector3f(0.5f, -2 * originOffset + 0.5f, originOffset + 0.5f);
|
||||||
|
data.setPosition(context.localPos)
|
||||||
|
.setBlockLight(contraption.renderWorld.getLightLevel(LightType.BLOCK, context.localPos))
|
||||||
|
.setRotationOffset(0)
|
||||||
|
.setRotationCenter(rotOffset)
|
||||||
|
.setRotationAxis(-1, 0, 0)
|
||||||
|
.setLocalRotation(0, facing.getHorizontalAngle(), 0);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
public static void renderInContraption(MovementContext context, MatrixStack ms, MatrixStack msLocal,
|
public static void renderInContraption(MovementContext context, MatrixStack ms, MatrixStack msLocal,
|
||||||
IRenderTypeBuffer buffers) {
|
IRenderTypeBuffer buffers) {
|
||||||
BlockState blockState = context.state;
|
BlockState blockState = context.state;
|
||||||
|
@ -55,7 +80,7 @@ public class HarvesterRenderer extends SafeTileEntityRenderer<HarvesterTileEntit
|
||||||
.rotate(Direction.WEST, AngleHelper.rad(angle))
|
.rotate(Direction.WEST, AngleHelper.rad(angle))
|
||||||
.translate(-rotOffset.x, -rotOffset.y, -rotOffset.z)
|
.translate(-rotOffset.x, -rotOffset.y, -rotOffset.z)
|
||||||
.light(msLocal.peek()
|
.light(msLocal.peek()
|
||||||
.getModel())
|
.getModel(), ContraptionRenderDispatcher.getLightOnContraption(context))
|
||||||
.renderInto(ms, buffers.getBuffer(RenderType.getCutoutMipped()));
|
.renderInto(ms, buffers.getBuffer(RenderType.getCutoutMipped()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,13 +7,14 @@ import com.mojang.blaze3d.vertex.IVertexBuilder;
|
||||||
import com.simibubi.create.AllBlockPartials;
|
import com.simibubi.create.AllBlockPartials;
|
||||||
import com.simibubi.create.AllBlocks;
|
import com.simibubi.create.AllBlocks;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext;
|
import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext;
|
||||||
|
import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionRenderDispatcher;
|
||||||
|
import com.simibubi.create.foundation.render.SuperByteBuffer;
|
||||||
import com.simibubi.create.foundation.tileEntity.renderer.SafeTileEntityRenderer;
|
import com.simibubi.create.foundation.tileEntity.renderer.SafeTileEntityRenderer;
|
||||||
import com.simibubi.create.foundation.utility.AngleHelper;
|
import com.simibubi.create.foundation.utility.AngleHelper;
|
||||||
|
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||||
import com.simibubi.create.foundation.utility.MatrixStacker;
|
import com.simibubi.create.foundation.utility.MatrixStacker;
|
||||||
import com.simibubi.create.foundation.utility.SuperByteBuffer;
|
|
||||||
|
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.client.Minecraft;
|
|
||||||
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
||||||
import net.minecraft.client.renderer.RenderType;
|
import net.minecraft.client.renderer.RenderType;
|
||||||
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
|
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
|
||||||
|
@ -43,8 +44,7 @@ public class PortableStorageInterfaceRenderer extends SafeTileEntityRenderer<Por
|
||||||
BlockState blockState = context.state;
|
BlockState blockState = context.state;
|
||||||
PortableStorageInterfaceTileEntity te = getTargetPSI(context);
|
PortableStorageInterfaceTileEntity te = getTargetPSI(context);
|
||||||
IVertexBuilder vb = buffer.getBuffer(RenderType.getSolid());
|
IVertexBuilder vb = buffer.getBuffer(RenderType.getSolid());
|
||||||
float renderPartialTicks = Minecraft.getInstance()
|
float renderPartialTicks = AnimationTickHolder.getPartialTicks();
|
||||||
.getRenderPartialTicks();
|
|
||||||
|
|
||||||
float progress = 0;
|
float progress = 0;
|
||||||
boolean lit = false;
|
boolean lit = false;
|
||||||
|
@ -54,26 +54,10 @@ public class PortableStorageInterfaceRenderer extends SafeTileEntityRenderer<Por
|
||||||
}
|
}
|
||||||
|
|
||||||
render(blockState, progress, lit, sbb -> sbb.light(msLocal.peek()
|
render(blockState, progress, lit, sbb -> sbb.light(msLocal.peek()
|
||||||
.getModel())
|
.getModel(), ContraptionRenderDispatcher.getLightOnContraption(context))
|
||||||
.renderInto(ms, vb), ms, msLocal);
|
.renderInto(ms, vb), ms, msLocal);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static PortableStorageInterfaceTileEntity getTargetPSI(MovementContext context) {
|
|
||||||
String _workingPos_ = PortableStorageInterfaceMovement._workingPos_;
|
|
||||||
if (!context.contraption.stalled || !context.data.contains(_workingPos_))
|
|
||||||
return null;
|
|
||||||
|
|
||||||
BlockPos pos = NBTUtil.readBlockPos(context.data.getCompound(_workingPos_));
|
|
||||||
TileEntity tileEntity = context.world.getTileEntity(pos);
|
|
||||||
if (!(tileEntity instanceof PortableStorageInterfaceTileEntity))
|
|
||||||
return null;
|
|
||||||
|
|
||||||
PortableStorageInterfaceTileEntity psi = (PortableStorageInterfaceTileEntity) tileEntity;
|
|
||||||
if (!psi.isTransferring())
|
|
||||||
return null;
|
|
||||||
return psi;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void render(BlockState blockState, float progress, boolean lit,
|
private static void render(BlockState blockState, float progress, boolean lit,
|
||||||
Consumer<SuperByteBuffer> drawCallback, MatrixStack... matrixStacks) {
|
Consumer<SuperByteBuffer> drawCallback, MatrixStack... matrixStacks) {
|
||||||
for (MatrixStack ms : matrixStacks)
|
for (MatrixStack ms : matrixStacks)
|
||||||
|
@ -109,6 +93,22 @@ public class PortableStorageInterfaceRenderer extends SafeTileEntityRenderer<Por
|
||||||
ms.pop();
|
ms.pop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected static PortableStorageInterfaceTileEntity getTargetPSI(MovementContext context) {
|
||||||
|
String _workingPos_ = PortableStorageInterfaceMovement._workingPos_;
|
||||||
|
if (!context.contraption.stalled || !context.data.contains(_workingPos_))
|
||||||
|
return null;
|
||||||
|
|
||||||
|
BlockPos pos = NBTUtil.readBlockPos(context.data.getCompound(_workingPos_));
|
||||||
|
TileEntity tileEntity = context.world.getTileEntity(pos);
|
||||||
|
if (!(tileEntity instanceof PortableStorageInterfaceTileEntity))
|
||||||
|
return null;
|
||||||
|
|
||||||
|
PortableStorageInterfaceTileEntity psi = (PortableStorageInterfaceTileEntity) tileEntity;
|
||||||
|
if (!psi.isTransferring())
|
||||||
|
return null;
|
||||||
|
return psi;
|
||||||
|
}
|
||||||
|
|
||||||
static AllBlockPartials getMiddleForState(BlockState state, boolean lit) {
|
static AllBlockPartials getMiddleForState(BlockState state, boolean lit) {
|
||||||
if (AllBlocks.PORTABLE_FLUID_INTERFACE.has(state))
|
if (AllBlocks.PORTABLE_FLUID_INTERFACE.has(state))
|
||||||
return lit ? AllBlockPartials.PORTABLE_FLUID_INTERFACE_MIDDLE_POWERED
|
return lit ? AllBlockPartials.PORTABLE_FLUID_INTERFACE_MIDDLE_POWERED
|
||||||
|
|
|
@ -100,10 +100,14 @@ public abstract class PortableStorageInterfaceTileEntity extends SmartTileEntity
|
||||||
return powered;
|
return powered;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected AxisAlignedBB cachedBoundingBox;
|
||||||
@Override
|
@Override
|
||||||
@OnlyIn(Dist.CLIENT)
|
@OnlyIn(Dist.CLIENT)
|
||||||
public AxisAlignedBB getRenderBoundingBox() {
|
public AxisAlignedBB getRenderBoundingBox() {
|
||||||
return super.getRenderBoundingBox().grow(2);
|
if (cachedBoundingBox == null) {
|
||||||
|
cachedBoundingBox = super.getRenderBoundingBox().grow(2);
|
||||||
|
}
|
||||||
|
return cachedBoundingBox;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isTransferring() {
|
public boolean isTransferring() {
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
package com.simibubi.create.content.contraptions.components.actors;
|
||||||
|
|
||||||
|
import com.simibubi.create.foundation.render.backend.gl.attrib.VertexFormat;
|
||||||
|
import com.simibubi.create.foundation.render.backend.instancing.InstancedModel;
|
||||||
|
import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer;
|
||||||
|
|
||||||
|
import net.minecraft.client.renderer.BufferBuilder;
|
||||||
|
|
||||||
|
public class RotatingActorModel extends InstancedModel<ContraptionActorData> {
|
||||||
|
public RotatingActorModel(InstancedTileRenderer<?> renderer, BufferBuilder buf) {
|
||||||
|
super(renderer, buf);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected VertexFormat getInstanceFormat() {
|
||||||
|
return ContraptionActorData.FORMAT;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected ContraptionActorData newInstance() {
|
||||||
|
return new ContraptionActorData(this);
|
||||||
|
}
|
||||||
|
}
|
|
@ -6,8 +6,8 @@ import com.simibubi.create.AllBlockPartials;
|
||||||
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
||||||
import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer;
|
import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer;
|
||||||
import com.simibubi.create.content.contraptions.components.clock.CuckooClockTileEntity.Animation;
|
import com.simibubi.create.content.contraptions.components.clock.CuckooClockTileEntity.Animation;
|
||||||
|
import com.simibubi.create.foundation.render.SuperByteBuffer;
|
||||||
import com.simibubi.create.foundation.utility.AngleHelper;
|
import com.simibubi.create.foundation.utility.AngleHelper;
|
||||||
import com.simibubi.create.foundation.utility.SuperByteBuffer;
|
|
||||||
|
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
||||||
|
|
|
@ -95,9 +95,9 @@ public class CuckooClockTileEntity extends KineticTileEntity {
|
||||||
moveHands(hours, minutes);
|
moveHands(hours, minutes);
|
||||||
|
|
||||||
if (animationType == Animation.NONE) {
|
if (animationType == Animation.NONE) {
|
||||||
if (AnimationTickHolder.ticks % 32 == 0)
|
if (AnimationTickHolder.getTicks() % 32 == 0)
|
||||||
playSound(SoundEvents.BLOCK_NOTE_BLOCK_HAT, 1 / 16f, 2f);
|
playSound(SoundEvents.BLOCK_NOTE_BLOCK_HAT, 1 / 16f, 2f);
|
||||||
else if (AnimationTickHolder.ticks % 16 == 0)
|
else if (AnimationTickHolder.getTicks() % 16 == 0)
|
||||||
playSound(SoundEvents.BLOCK_NOTE_BLOCK_HAT, 1 / 16f, 1.5f);
|
playSound(SoundEvents.BLOCK_NOTE_BLOCK_HAT, 1 / 16f, 1.5f);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
@ -172,4 +172,8 @@ public class CuckooClockTileEntity extends KineticTileEntity {
|
||||||
world.playSound(vec.x, vec.y, vec.z, sound, SoundCategory.BLOCKS, volume, pitch, false);
|
world.playSound(vec.x, vec.y, vec.z, sound, SoundCategory.BLOCKS, volume, pitch, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean shouldRenderAsTE() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,48 @@
|
||||||
|
package com.simibubi.create.content.contraptions.components.crafter;
|
||||||
|
|
||||||
|
import java.util.function.Supplier;
|
||||||
|
|
||||||
|
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||||
|
import com.simibubi.create.AllBlockPartials;
|
||||||
|
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
||||||
|
import com.simibubi.create.content.contraptions.base.RotatingData;
|
||||||
|
import com.simibubi.create.content.contraptions.base.SingleRotatingInstance;
|
||||||
|
import com.simibubi.create.foundation.render.backend.instancing.InstancedModel;
|
||||||
|
import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderRegistry;
|
||||||
|
import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer;
|
||||||
|
import com.simibubi.create.foundation.utility.MatrixStacker;
|
||||||
|
|
||||||
|
import net.minecraft.tileentity.TileEntityType;
|
||||||
|
import net.minecraft.util.Direction;
|
||||||
|
import net.minecraftforge.api.distmarker.Dist;
|
||||||
|
import net.minecraftforge.fml.DistExecutor;
|
||||||
|
|
||||||
|
public class MechanicalCrafterInstance extends SingleRotatingInstance {
|
||||||
|
public static void register(TileEntityType<? extends KineticTileEntity> type) {
|
||||||
|
DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () ->
|
||||||
|
InstancedTileRenderRegistry.instance.register(type, MechanicalCrafterInstance::new));
|
||||||
|
}
|
||||||
|
|
||||||
|
public MechanicalCrafterInstance(InstancedTileRenderer<?> modelManager, KineticTileEntity tile) {
|
||||||
|
super(modelManager, tile);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected InstancedModel<RotatingData> getModel() {
|
||||||
|
Direction facing = lastState.get(MechanicalCrafterBlock.HORIZONTAL_FACING);
|
||||||
|
|
||||||
|
Supplier<MatrixStack> ms = () -> {
|
||||||
|
MatrixStack stack = new MatrixStack();
|
||||||
|
MatrixStacker stacker = MatrixStacker.of(stack).centre();
|
||||||
|
|
||||||
|
if (facing.getAxis() == Direction.Axis.X)
|
||||||
|
stacker.rotateZ(90);
|
||||||
|
else if (facing.getAxis() == Direction.Axis.Z)
|
||||||
|
stacker.rotateX(90);
|
||||||
|
|
||||||
|
stacker.unCentre();
|
||||||
|
return stack;
|
||||||
|
};
|
||||||
|
return rotatingMaterial().getModel(AllBlockPartials.SHAFTLESS_COGWHEEL, lastState, facing, ms);
|
||||||
|
}
|
||||||
|
}
|
|
@ -9,11 +9,12 @@ import com.simibubi.create.AllBlockPartials;
|
||||||
import com.simibubi.create.AllSpriteShifts;
|
import com.simibubi.create.AllSpriteShifts;
|
||||||
import com.simibubi.create.content.contraptions.components.crafter.MechanicalCrafterTileEntity.Phase;
|
import com.simibubi.create.content.contraptions.components.crafter.MechanicalCrafterTileEntity.Phase;
|
||||||
import com.simibubi.create.content.contraptions.components.crafter.RecipeGridHandler.GroupedItems;
|
import com.simibubi.create.content.contraptions.components.crafter.RecipeGridHandler.GroupedItems;
|
||||||
|
import com.simibubi.create.foundation.render.SuperByteBuffer;
|
||||||
|
import com.simibubi.create.foundation.render.backend.FastRenderDispatcher;
|
||||||
import com.simibubi.create.foundation.tileEntity.renderer.SafeTileEntityRenderer;
|
import com.simibubi.create.foundation.tileEntity.renderer.SafeTileEntityRenderer;
|
||||||
import com.simibubi.create.foundation.utility.AngleHelper;
|
import com.simibubi.create.foundation.utility.AngleHelper;
|
||||||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||||
import com.simibubi.create.foundation.utility.MatrixStacker;
|
import com.simibubi.create.foundation.utility.MatrixStacker;
|
||||||
import com.simibubi.create.foundation.utility.SuperByteBuffer;
|
|
||||||
|
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
|
@ -25,7 +26,6 @@ import net.minecraft.client.renderer.model.ItemCameraTransforms.TransformType;
|
||||||
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
|
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.Direction;
|
import net.minecraft.util.Direction;
|
||||||
import net.minecraft.util.Direction.Axis;
|
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.util.math.MathHelper;
|
import net.minecraft.util.math.MathHelper;
|
||||||
import net.minecraft.util.math.Vec3d;
|
import net.minecraft.util.math.Vec3d;
|
||||||
|
@ -154,12 +154,13 @@ public class MechanicalCrafterRenderer extends SafeTileEntityRenderer<Mechanical
|
||||||
BlockState blockState = te.getBlockState();
|
BlockState blockState = te.getBlockState();
|
||||||
IVertexBuilder vb = buffer.getBuffer(RenderType.getSolid());
|
IVertexBuilder vb = buffer.getBuffer(RenderType.getSolid());
|
||||||
|
|
||||||
|
if (!FastRenderDispatcher.available(te.getWorld())) {
|
||||||
SuperByteBuffer superBuffer = AllBlockPartials.SHAFTLESS_COGWHEEL.renderOn(blockState);
|
SuperByteBuffer superBuffer = AllBlockPartials.SHAFTLESS_COGWHEEL.renderOn(blockState);
|
||||||
standardKineticRotationTransform(superBuffer, te, light);
|
standardKineticRotationTransform(superBuffer, te, light);
|
||||||
superBuffer.rotateCentered(Direction.UP, (float) (blockState.get(HORIZONTAL_FACING)
|
superBuffer.rotateCentered(Direction.UP, (float) (blockState.get(HORIZONTAL_FACING).getAxis() != Direction.Axis.X ? 0 : Math.PI / 2));
|
||||||
.getAxis() != Axis.X ? 0 : Math.PI / 2));
|
|
||||||
superBuffer.rotateCentered(Direction.EAST, (float) (Math.PI / 2));
|
superBuffer.rotateCentered(Direction.EAST, (float) (Math.PI / 2));
|
||||||
superBuffer.renderInto(ms, vb);
|
superBuffer.renderInto(ms, vb);
|
||||||
|
}
|
||||||
|
|
||||||
Direction targetDirection = MechanicalCrafterBlock.getTargetDirection(blockState);
|
Direction targetDirection = MechanicalCrafterBlock.getTargetDirection(blockState);
|
||||||
BlockPos pos = te.getPos();
|
BlockPos pos = te.getPos();
|
||||||
|
@ -177,7 +178,7 @@ public class MechanicalCrafterRenderer extends SafeTileEntityRenderer<Mechanical
|
||||||
renderAndTransform(te, AllBlockPartials.MECHANICAL_CRAFTER_BELT_FRAME, blockState, pos);
|
renderAndTransform(te, AllBlockPartials.MECHANICAL_CRAFTER_BELT_FRAME, blockState, pos);
|
||||||
|
|
||||||
if (te.phase == Phase.EXPORTING) {
|
if (te.phase == Phase.EXPORTING) {
|
||||||
int textureIndex = (int) ((te.getCountDownSpeed() / 128f * AnimationTickHolder.ticks));
|
int textureIndex = (int) ((te.getCountDownSpeed() / 128f * AnimationTickHolder.getTicks()));
|
||||||
beltBuffer.shiftUVtoSheet(AllSpriteShifts.CRAFTER_THINGIES, (textureIndex % 4) / 4f, 0, 1);
|
beltBuffer.shiftUVtoSheet(AllSpriteShifts.CRAFTER_THINGIES, (textureIndex % 4) / 4f, 0, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -490,4 +490,9 @@ public class MechanicalCrafterTileEntity extends KineticTileEntity {
|
||||||
return inventory;
|
return inventory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean shouldRenderAsTE() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ import com.mojang.blaze3d.matrix.MatrixStack;
|
||||||
import com.simibubi.create.AllBlockPartials;
|
import com.simibubi.create.AllBlockPartials;
|
||||||
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
||||||
import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer;
|
import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer;
|
||||||
import com.simibubi.create.foundation.utility.SuperByteBuffer;
|
import com.simibubi.create.foundation.render.SuperByteBuffer;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
|
|
|
@ -73,4 +73,8 @@ public class HandCrankTileEntity extends GeneratingKineticTileEntity {
|
||||||
return AllBlocks.HAND_CRANK.get();
|
return AllBlocks.HAND_CRANK.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean shouldRenderAsTE() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,7 +36,7 @@ public class CrushingWheelTileEntity extends KineticTileEntity {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AxisAlignedBB getRenderBoundingBox() {
|
public AxisAlignedBB makeRenderBoundingBox() {
|
||||||
return new AxisAlignedBB(pos).grow(1);
|
return new AxisAlignedBB(pos).grow(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,12 +11,14 @@ import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer;
|
||||||
import com.simibubi.create.content.contraptions.components.deployer.DeployerTileEntity.Mode;
|
import com.simibubi.create.content.contraptions.components.deployer.DeployerTileEntity.Mode;
|
||||||
import com.simibubi.create.content.contraptions.components.deployer.DeployerTileEntity.State;
|
import com.simibubi.create.content.contraptions.components.deployer.DeployerTileEntity.State;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext;
|
import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext;
|
||||||
|
import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionRenderDispatcher;
|
||||||
|
import com.simibubi.create.foundation.render.SuperByteBuffer;
|
||||||
|
import com.simibubi.create.foundation.render.backend.FastRenderDispatcher;
|
||||||
import com.simibubi.create.foundation.tileEntity.behaviour.filtering.FilteringRenderer;
|
import com.simibubi.create.foundation.tileEntity.behaviour.filtering.FilteringRenderer;
|
||||||
import com.simibubi.create.foundation.tileEntity.renderer.SafeTileEntityRenderer;
|
import com.simibubi.create.foundation.tileEntity.renderer.SafeTileEntityRenderer;
|
||||||
import com.simibubi.create.foundation.utility.AngleHelper;
|
import com.simibubi.create.foundation.utility.AngleHelper;
|
||||||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||||
import com.simibubi.create.foundation.utility.NBTHelper;
|
import com.simibubi.create.foundation.utility.NBTHelper;
|
||||||
import com.simibubi.create.foundation.utility.SuperByteBuffer;
|
|
||||||
import com.simibubi.create.foundation.utility.VecHelper;
|
import com.simibubi.create.foundation.utility.VecHelper;
|
||||||
|
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
|
@ -102,7 +104,9 @@ public class DeployerRenderer extends SafeTileEntityRenderer<DeployerTileEntity>
|
||||||
protected void renderComponents(DeployerTileEntity te, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffer,
|
protected void renderComponents(DeployerTileEntity te, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffer,
|
||||||
int light, int overlay) {
|
int light, int overlay) {
|
||||||
IVertexBuilder vb = buffer.getBuffer(RenderType.getSolid());
|
IVertexBuilder vb = buffer.getBuffer(RenderType.getSolid());
|
||||||
|
if (!FastRenderDispatcher.available(te.getWorld())) {
|
||||||
KineticTileEntityRenderer.renderRotatingKineticBlock(te, getRenderedBlockState(te), ms, vb, light);
|
KineticTileEntityRenderer.renderRotatingKineticBlock(te, getRenderedBlockState(te), ms, vb, light);
|
||||||
|
}
|
||||||
|
|
||||||
BlockState blockState = te.getBlockState();
|
BlockState blockState = te.getBlockState();
|
||||||
BlockPos pos = te.getPos();
|
BlockPos pos = te.getPos();
|
||||||
|
@ -178,8 +182,7 @@ public class DeployerRenderer extends SafeTileEntityRenderer<DeployerTileEntity>
|
||||||
double distance = context.position.distanceTo(center);
|
double distance = context.position.distanceTo(center);
|
||||||
double nextDistance = context.position.add(context.motion)
|
double nextDistance = context.position.add(context.motion)
|
||||||
.distanceTo(center);
|
.distanceTo(center);
|
||||||
factor = .5f - MathHelper.clamp(MathHelper.lerp(Minecraft.getInstance()
|
factor = .5f - MathHelper.clamp(MathHelper.lerp(AnimationTickHolder.getPartialTicks(), distance, nextDistance), 0, 1);
|
||||||
.getRenderPartialTicks(), distance, nextDistance), 0, 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Vec3d offset = new Vec3d(blockState.get(FACING)
|
Vec3d offset = new Vec3d(blockState.get(FACING)
|
||||||
|
@ -189,9 +192,9 @@ public class DeployerRenderer extends SafeTileEntityRenderer<DeployerTileEntity>
|
||||||
.getModel();
|
.getModel();
|
||||||
for (MatrixStack m : matrixStacks)
|
for (MatrixStack m : matrixStacks)
|
||||||
m.translate(offset.x, offset.y, offset.z);
|
m.translate(offset.x, offset.y, offset.z);
|
||||||
pole.light(lighting)
|
pole.light(lighting, ContraptionRenderDispatcher.getLightOnContraption(context))
|
||||||
.renderInto(ms, builder);
|
.renderInto(ms, builder);
|
||||||
hand.light(lighting)
|
hand.light(lighting, ContraptionRenderDispatcher.getLightOnContraption(context))
|
||||||
.renderInto(ms, builder);
|
.renderInto(ms, builder);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -346,8 +346,8 @@ public class DeployerTileEntity extends KineticTileEntity {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AxisAlignedBB getRenderBoundingBox() {
|
public AxisAlignedBB makeRenderBoundingBox() {
|
||||||
return super.getRenderBoundingBox().grow(3);
|
return super.makeRenderBoundingBox().grow(3);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -382,4 +382,8 @@ public class DeployerTileEntity extends KineticTileEntity {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean shouldRenderAsTE() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,8 +7,9 @@ import com.mojang.blaze3d.vertex.IVertexBuilder;
|
||||||
import com.simibubi.create.AllBlockPartials;
|
import com.simibubi.create.AllBlockPartials;
|
||||||
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
||||||
import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer;
|
import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer;
|
||||||
|
import com.simibubi.create.foundation.render.SuperByteBuffer;
|
||||||
|
import com.simibubi.create.foundation.render.backend.FastRenderDispatcher;
|
||||||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||||
import com.simibubi.create.foundation.utility.SuperByteBuffer;
|
|
||||||
|
|
||||||
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
||||||
import net.minecraft.client.renderer.RenderType;
|
import net.minecraft.client.renderer.RenderType;
|
||||||
|
@ -26,6 +27,8 @@ public class EncasedFanRenderer extends KineticTileEntityRenderer {
|
||||||
@Override
|
@Override
|
||||||
protected void renderSafe(KineticTileEntity te, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffer,
|
protected void renderSafe(KineticTileEntity te, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffer,
|
||||||
int light, int overlay) {
|
int light, int overlay) {
|
||||||
|
if (FastRenderDispatcher.available(te.getWorld())) return;
|
||||||
|
|
||||||
Direction direction = te.getBlockState()
|
Direction direction = te.getBlockState()
|
||||||
.get(FACING);
|
.get(FACING);
|
||||||
IVertexBuilder vb = buffer.getBuffer(RenderType.getCutoutMipped());
|
IVertexBuilder vb = buffer.getBuffer(RenderType.getCutoutMipped());
|
||||||
|
|
|
@ -0,0 +1,118 @@
|
||||||
|
package com.simibubi.create.content.contraptions.components.fan;
|
||||||
|
|
||||||
|
import static net.minecraft.state.properties.BlockStateProperties.FACING;
|
||||||
|
|
||||||
|
import com.simibubi.create.AllBlockPartials;
|
||||||
|
import com.simibubi.create.content.contraptions.base.IRotate;
|
||||||
|
import com.simibubi.create.content.contraptions.base.KineticTileInstance;
|
||||||
|
import com.simibubi.create.content.contraptions.base.RotatingData;
|
||||||
|
import com.simibubi.create.foundation.render.backend.instancing.InstanceKey;
|
||||||
|
import com.simibubi.create.foundation.render.backend.instancing.InstancedModel;
|
||||||
|
import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderRegistry;
|
||||||
|
import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer;
|
||||||
|
|
||||||
|
import net.minecraft.tileentity.TileEntityType;
|
||||||
|
import net.minecraft.util.Direction;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.util.math.MathHelper;
|
||||||
|
import net.minecraft.world.LightType;
|
||||||
|
import net.minecraftforge.api.distmarker.Dist;
|
||||||
|
import net.minecraftforge.fml.DistExecutor;
|
||||||
|
|
||||||
|
public class FanInstance extends KineticTileInstance<EncasedFanTileEntity> {
|
||||||
|
public static void register(TileEntityType<? extends EncasedFanTileEntity> type) {
|
||||||
|
DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () ->
|
||||||
|
InstancedTileRenderRegistry.instance.register(type, FanInstance::new));
|
||||||
|
}
|
||||||
|
|
||||||
|
protected InstanceKey<RotatingData> shaft;
|
||||||
|
protected InstanceKey<RotatingData> fan;
|
||||||
|
|
||||||
|
public FanInstance(InstancedTileRenderer modelManager, EncasedFanTileEntity tile) {
|
||||||
|
super(modelManager, tile);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void init() {
|
||||||
|
final Direction direction = lastState.get(FACING);
|
||||||
|
final Direction.Axis axis = ((IRotate) lastState.getBlock()).getRotationAxis(lastState);
|
||||||
|
|
||||||
|
InstancedModel<RotatingData> shaftHalf =
|
||||||
|
AllBlockPartials.SHAFT_HALF.renderOnDirectionalSouthRotating(modelManager, lastState, direction.getOpposite());
|
||||||
|
InstancedModel<RotatingData> fanInner =
|
||||||
|
AllBlockPartials.ENCASED_FAN_INNER.renderOnDirectionalSouthRotating(modelManager, lastState, direction.getOpposite());
|
||||||
|
|
||||||
|
shaft = shaftHalf.setupInstance(data -> {
|
||||||
|
BlockPos behind = pos.offset(direction.getOpposite());
|
||||||
|
int blockLight = world.getLightLevel(LightType.BLOCK, behind);
|
||||||
|
int skyLight = world.getLightLevel(LightType.SKY, behind);
|
||||||
|
|
||||||
|
data.setRotationalSpeed(tile.getSpeed())
|
||||||
|
.setRotationOffset(getRotationOffset(axis))
|
||||||
|
.setRotationAxis(Direction.getFacingFromAxis(Direction.AxisDirection.POSITIVE, axis).getUnitVector())
|
||||||
|
.setTileEntity(tile)
|
||||||
|
.setBlockLight(blockLight)
|
||||||
|
.setSkyLight(skyLight);
|
||||||
|
});
|
||||||
|
fan = fanInner.setupInstance(data -> {
|
||||||
|
BlockPos inFront = pos.offset(direction);
|
||||||
|
int blockLight = world.getLightLevel(LightType.BLOCK, inFront);
|
||||||
|
int skyLight = world.getLightLevel(LightType.SKY, inFront);
|
||||||
|
|
||||||
|
data.setRotationalSpeed(getFanSpeed())
|
||||||
|
.setRotationOffset(getRotationOffset(axis))
|
||||||
|
.setRotationAxis(Direction.getFacingFromAxis(Direction.AxisDirection.POSITIVE, axis).getUnitVector())
|
||||||
|
.setTileEntity(tile)
|
||||||
|
.setBlockLight(blockLight)
|
||||||
|
.setSkyLight(skyLight);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private float getFanSpeed() {
|
||||||
|
float speed = tile.getSpeed() * 5;
|
||||||
|
if (speed > 0)
|
||||||
|
speed = MathHelper.clamp(speed, 80, 64 * 20);
|
||||||
|
if (speed < 0)
|
||||||
|
speed = MathHelper.clamp(speed, -64 * 20, -80);
|
||||||
|
return speed;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onUpdate() {
|
||||||
|
Direction.Axis axis = lastState.get(FACING).getAxis();
|
||||||
|
updateRotation(shaft, axis);
|
||||||
|
|
||||||
|
fan.modifyInstance(data -> {
|
||||||
|
data.setColor(tile.network)
|
||||||
|
.setRotationalSpeed(getFanSpeed())
|
||||||
|
.setRotationOffset(getRotationOffset(axis))
|
||||||
|
.setRotationAxis(Direction.getFacingFromAxis(Direction.AxisDirection.POSITIVE, axis).getUnitVector());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateLight() {
|
||||||
|
final Direction direction = lastState.get(FACING);
|
||||||
|
|
||||||
|
shaft.modifyInstance(data -> {
|
||||||
|
BlockPos behind = pos.offset(direction.getOpposite());
|
||||||
|
int blockLight = world.getLightLevel(LightType.BLOCK, behind);
|
||||||
|
int skyLight = world.getLightLevel(LightType.SKY, behind);
|
||||||
|
data.setBlockLight(blockLight)
|
||||||
|
.setSkyLight(skyLight);
|
||||||
|
});
|
||||||
|
fan.modifyInstance(data -> {
|
||||||
|
BlockPos inFront = pos.offset(direction);
|
||||||
|
int blockLight = world.getLightLevel(LightType.BLOCK, inFront);
|
||||||
|
int skyLight = world.getLightLevel(LightType.SKY, inFront);
|
||||||
|
data.setBlockLight(blockLight)
|
||||||
|
.setSkyLight(skyLight);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void remove() {
|
||||||
|
shaft.delete();
|
||||||
|
fan.delete();
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,8 +1,11 @@
|
||||||
package com.simibubi.create.content.contraptions.components.fan;
|
package com.simibubi.create.content.contraptions.components.fan;
|
||||||
|
|
||||||
|
import javax.annotation.ParametersAreNonnullByDefault;
|
||||||
|
|
||||||
import com.simibubi.create.AllShapes;
|
import com.simibubi.create.AllShapes;
|
||||||
import com.simibubi.create.AllTileEntities;
|
import com.simibubi.create.AllTileEntities;
|
||||||
import com.simibubi.create.foundation.block.ProperDirectionalBlock;
|
import com.simibubi.create.foundation.block.ProperDirectionalBlock;
|
||||||
|
|
||||||
import mcp.MethodsReturnNonnullByDefault;
|
import mcp.MethodsReturnNonnullByDefault;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
|
@ -18,8 +21,6 @@ import net.minecraft.world.IBlockReader;
|
||||||
import net.minecraft.world.IWorldReader;
|
import net.minecraft.world.IWorldReader;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import javax.annotation.ParametersAreNonnullByDefault;
|
|
||||||
|
|
||||||
@MethodsReturnNonnullByDefault
|
@MethodsReturnNonnullByDefault
|
||||||
@ParametersAreNonnullByDefault
|
@ParametersAreNonnullByDefault
|
||||||
public class NozzleBlock extends ProperDirectionalBlock {
|
public class NozzleBlock extends ProperDirectionalBlock {
|
||||||
|
|
|
@ -0,0 +1,76 @@
|
||||||
|
package com.simibubi.create.content.contraptions.components.flywheel;
|
||||||
|
|
||||||
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
|
import com.simibubi.create.AllBlockPartials;
|
||||||
|
import com.simibubi.create.content.contraptions.base.IRotate;
|
||||||
|
import com.simibubi.create.content.contraptions.base.KineticTileInstance;
|
||||||
|
import com.simibubi.create.content.contraptions.base.RotatingData;
|
||||||
|
import com.simibubi.create.foundation.render.backend.instancing.InstanceKey;
|
||||||
|
import com.simibubi.create.foundation.render.backend.instancing.InstancedModel;
|
||||||
|
import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderRegistry;
|
||||||
|
import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer;
|
||||||
|
|
||||||
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.state.properties.BlockStateProperties;
|
||||||
|
import net.minecraft.tileentity.TileEntityType;
|
||||||
|
import net.minecraft.util.Direction;
|
||||||
|
import net.minecraft.util.Rotation;
|
||||||
|
import net.minecraftforge.api.distmarker.Dist;
|
||||||
|
import net.minecraftforge.fml.DistExecutor;
|
||||||
|
|
||||||
|
public class FlyWheelInstance extends KineticTileInstance<FlywheelTileEntity> {
|
||||||
|
public static void register(TileEntityType<? extends FlywheelTileEntity> type) {
|
||||||
|
DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () ->
|
||||||
|
InstancedTileRenderRegistry.instance.register(type, FlyWheelInstance::new));
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Direction facing;
|
||||||
|
|
||||||
|
protected InstanceKey<RotatingData> shaft;
|
||||||
|
// protected InstanceKey<RotatingData> wheel;
|
||||||
|
|
||||||
|
public FlyWheelInstance(InstancedTileRenderer<?> modelManager, FlywheelTileEntity tile) {
|
||||||
|
super(modelManager, tile);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void init() {
|
||||||
|
facing = lastState.get(BlockStateProperties.HORIZONTAL_FACING);
|
||||||
|
|
||||||
|
Direction.Axis axis = ((IRotate) lastState.getBlock()).getRotationAxis(lastState);
|
||||||
|
Consumer<RotatingData> setup = setupFunc(tile.getSpeed(), axis);
|
||||||
|
shaft = shaftModel().setupInstance(setup);
|
||||||
|
// wheel = wheelModel().setupInstance(setup);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onUpdate() {
|
||||||
|
Direction.Axis axis = ((IRotate) lastState.getBlock()).getRotationAxis(lastState);
|
||||||
|
updateRotation(shaft, axis);
|
||||||
|
// updateRotation(wheel, axis);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateLight() {
|
||||||
|
shaft.modifyInstance(this::relight);
|
||||||
|
// wheel.modifyInstance(this::relight);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void remove() {
|
||||||
|
shaft.delete();
|
||||||
|
shaft = null;
|
||||||
|
// wheel.delete();
|
||||||
|
// wheel = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected InstancedModel<RotatingData> shaftModel() {
|
||||||
|
return AllBlockPartials.SHAFT_HALF.renderOnDirectionalSouthRotating(modelManager, lastState, facing.getOpposite());
|
||||||
|
}
|
||||||
|
|
||||||
|
protected InstancedModel<RotatingData> wheelModel() {
|
||||||
|
BlockState rotate = lastState.rotate(Rotation.CLOCKWISE_90);
|
||||||
|
return AllBlockPartials.FLYWHEEL.renderOnDirectionalSouthRotating(modelManager, rotate, rotate.get(BlockStateProperties.HORIZONTAL_FACING));
|
||||||
|
}
|
||||||
|
}
|
|
@ -8,8 +8,8 @@ import com.simibubi.create.AllBlockPartials;
|
||||||
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
||||||
import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer;
|
import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer;
|
||||||
import com.simibubi.create.content.contraptions.components.flywheel.FlywheelBlock.ConnectionState;
|
import com.simibubi.create.content.contraptions.components.flywheel.FlywheelBlock.ConnectionState;
|
||||||
|
import com.simibubi.create.foundation.render.SuperByteBuffer;
|
||||||
import com.simibubi.create.foundation.utility.AngleHelper;
|
import com.simibubi.create.foundation.utility.AngleHelper;
|
||||||
import com.simibubi.create.foundation.utility.SuperByteBuffer;
|
|
||||||
|
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
||||||
|
|
|
@ -48,8 +48,8 @@ public class FlywheelTileEntity extends GeneratingKineticTileEntity {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AxisAlignedBB getRenderBoundingBox() {
|
public AxisAlignedBB makeRenderBoundingBox() {
|
||||||
return super.getRenderBoundingBox().grow(2);
|
return super.makeRenderBoundingBox().grow(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -101,4 +101,8 @@ public class FlywheelTileEntity extends GeneratingKineticTileEntity {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean shouldRenderAsTE() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,8 @@ import net.minecraft.tileentity.TileEntityType;
|
||||||
import net.minecraft.util.Direction;
|
import net.minecraft.util.Direction;
|
||||||
import net.minecraft.util.math.AxisAlignedBB;
|
import net.minecraft.util.math.AxisAlignedBB;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraftforge.api.distmarker.Dist;
|
||||||
|
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||||
|
|
||||||
public class EngineTileEntity extends SmartTileEntity {
|
public class EngineTileEntity extends SmartTileEntity {
|
||||||
|
|
||||||
|
@ -34,9 +36,14 @@ public class EngineTileEntity extends SmartTileEntity {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected AxisAlignedBB cachedBoundingBox;
|
||||||
@Override
|
@Override
|
||||||
|
@OnlyIn(Dist.CLIENT)
|
||||||
public AxisAlignedBB getRenderBoundingBox() {
|
public AxisAlignedBB getRenderBoundingBox() {
|
||||||
return super.getRenderBoundingBox().grow(1.5f);
|
if (cachedBoundingBox == null) {
|
||||||
|
cachedBoundingBox = super.getRenderBoundingBox().grow(1.5f);
|
||||||
|
}
|
||||||
|
return cachedBoundingBox;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
package com.simibubi.create.content.contraptions.components.millstone;
|
||||||
|
|
||||||
|
import com.simibubi.create.AllBlockPartials;
|
||||||
|
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
||||||
|
import com.simibubi.create.content.contraptions.base.RotatingData;
|
||||||
|
import com.simibubi.create.content.contraptions.base.SingleRotatingInstance;
|
||||||
|
import com.simibubi.create.foundation.render.backend.instancing.InstancedModel;
|
||||||
|
import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderRegistry;
|
||||||
|
import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer;
|
||||||
|
|
||||||
|
import net.minecraft.tileentity.TileEntityType;
|
||||||
|
import net.minecraftforge.api.distmarker.Dist;
|
||||||
|
import net.minecraftforge.fml.DistExecutor;
|
||||||
|
|
||||||
|
public class MillStoneCogInstance extends SingleRotatingInstance {
|
||||||
|
public static void register(TileEntityType<? extends KineticTileEntity> type) {
|
||||||
|
DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () ->
|
||||||
|
InstancedTileRenderRegistry.instance.register(type, MillStoneCogInstance::new)); }
|
||||||
|
|
||||||
|
public MillStoneCogInstance(InstancedTileRenderer modelManager, KineticTileEntity tile) {
|
||||||
|
super(modelManager, tile);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected InstancedModel<RotatingData> getModel() {
|
||||||
|
return AllBlockPartials.MILLSTONE_COG.renderOnRotating(modelManager, tile.getBlockState());
|
||||||
|
}
|
||||||
|
}
|
|
@ -4,7 +4,7 @@ import com.simibubi.create.AllBlockPartials;
|
||||||
import com.simibubi.create.CreateClient;
|
import com.simibubi.create.CreateClient;
|
||||||
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
||||||
import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer;
|
import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer;
|
||||||
import com.simibubi.create.foundation.utility.SuperByteBuffer;
|
import com.simibubi.create.foundation.render.SuperByteBuffer;
|
||||||
|
|
||||||
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
|
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
|
||||||
|
|
||||||
|
|
|
@ -5,8 +5,9 @@ import com.mojang.blaze3d.vertex.IVertexBuilder;
|
||||||
import com.simibubi.create.AllBlockPartials;
|
import com.simibubi.create.AllBlockPartials;
|
||||||
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
||||||
import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer;
|
import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer;
|
||||||
|
import com.simibubi.create.foundation.render.SuperByteBuffer;
|
||||||
|
import com.simibubi.create.foundation.render.backend.FastRenderDispatcher;
|
||||||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||||
import com.simibubi.create.foundation.utility.SuperByteBuffer;
|
|
||||||
|
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
||||||
|
@ -22,6 +23,11 @@ public class MechanicalMixerRenderer extends KineticTileEntityRenderer {
|
||||||
super(dispatcher);
|
super(dispatcher);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isGlobalRenderer(KineticTileEntity te) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void renderSafe(KineticTileEntity te, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffer,
|
protected void renderSafe(KineticTileEntity te, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffer,
|
||||||
int light, int overlay) {
|
int light, int overlay) {
|
||||||
|
@ -31,8 +37,10 @@ public class MechanicalMixerRenderer extends KineticTileEntityRenderer {
|
||||||
|
|
||||||
IVertexBuilder vb = buffer.getBuffer(RenderType.getSolid());
|
IVertexBuilder vb = buffer.getBuffer(RenderType.getSolid());
|
||||||
|
|
||||||
|
if (!FastRenderDispatcher.available(te.getWorld())) {
|
||||||
SuperByteBuffer superBuffer = AllBlockPartials.SHAFTLESS_COGWHEEL.renderOn(blockState);
|
SuperByteBuffer superBuffer = AllBlockPartials.SHAFTLESS_COGWHEEL.renderOn(blockState);
|
||||||
standardKineticRotationTransform(superBuffer, te, light).renderInto(ms, vb);
|
standardKineticRotationTransform(superBuffer, te, light).renderInto(ms, vb);
|
||||||
|
}
|
||||||
|
|
||||||
int packedLightmapCoords = WorldRenderer.getLightmapCoordinates(te.getWorld(), blockState, pos);
|
int packedLightmapCoords = WorldRenderer.getLightmapCoordinates(te.getWorld(), blockState, pos);
|
||||||
float renderedHeadOffset = mixer.getRenderedHeadOffset(partialTicks);
|
float renderedHeadOffset = mixer.getRenderedHeadOffset(partialTicks);
|
||||||
|
|
|
@ -80,7 +80,7 @@ public class MechanicalMixerTileEntity extends BasinOperatingTileEntity {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AxisAlignedBB getRenderBoundingBox() {
|
public AxisAlignedBB makeRenderBoundingBox() {
|
||||||
return new AxisAlignedBB(pos).expand(0, -1.5, 0);
|
return new AxisAlignedBB(pos).expand(0, -1.5, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ package com.simibubi.create.content.contraptions.components.motor;
|
||||||
import com.simibubi.create.AllBlockPartials;
|
import com.simibubi.create.AllBlockPartials;
|
||||||
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
||||||
import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer;
|
import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer;
|
||||||
import com.simibubi.create.foundation.utility.SuperByteBuffer;
|
import com.simibubi.create.foundation.render.SuperByteBuffer;
|
||||||
|
|
||||||
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
|
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ import com.mojang.blaze3d.matrix.MatrixStack;
|
||||||
import com.simibubi.create.AllBlockPartials;
|
import com.simibubi.create.AllBlockPartials;
|
||||||
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
||||||
import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer;
|
import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer;
|
||||||
import com.simibubi.create.foundation.utility.SuperByteBuffer;
|
import com.simibubi.create.foundation.render.SuperByteBuffer;
|
||||||
|
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
||||||
|
@ -19,6 +19,11 @@ public class MechanicalPressRenderer extends KineticTileEntityRenderer {
|
||||||
super(dispatcher);
|
super(dispatcher);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isGlobalRenderer(KineticTileEntity te) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void renderSafe(KineticTileEntity te, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffer,
|
protected void renderSafe(KineticTileEntity te, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffer,
|
||||||
int light, int overlay) {
|
int light, int overlay) {
|
||||||
|
|
|
@ -102,7 +102,7 @@ public class MechanicalPressTileEntity extends BasinOperatingTileEntity {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AxisAlignedBB getRenderBoundingBox() {
|
public AxisAlignedBB makeRenderBoundingBox() {
|
||||||
return new AxisAlignedBB(pos).expand(0, -1.5, 0)
|
return new AxisAlignedBB(pos).expand(0, -1.5, 0)
|
||||||
.expand(0, 1, 0);
|
.expand(0, 1, 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,36 @@
|
||||||
|
package com.simibubi.create.content.contraptions.components.saw;
|
||||||
|
|
||||||
|
import static net.minecraft.state.properties.BlockStateProperties.FACING;
|
||||||
|
|
||||||
|
import com.simibubi.create.AllBlockPartials;
|
||||||
|
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
||||||
|
import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer;
|
||||||
|
import com.simibubi.create.content.contraptions.base.RotatingData;
|
||||||
|
import com.simibubi.create.content.contraptions.base.SingleRotatingInstance;
|
||||||
|
import com.simibubi.create.foundation.render.backend.instancing.InstancedModel;
|
||||||
|
import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderRegistry;
|
||||||
|
import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer;
|
||||||
|
|
||||||
|
import net.minecraft.tileentity.TileEntityType;
|
||||||
|
import net.minecraft.util.Rotation;
|
||||||
|
import net.minecraftforge.api.distmarker.Dist;
|
||||||
|
import net.minecraftforge.fml.DistExecutor;
|
||||||
|
|
||||||
|
public class SawInstance extends SingleRotatingInstance {
|
||||||
|
public static void register(TileEntityType<? extends KineticTileEntity> type) {
|
||||||
|
DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () ->
|
||||||
|
InstancedTileRenderRegistry.instance.register(type, SawInstance::new));
|
||||||
|
}
|
||||||
|
|
||||||
|
public SawInstance(InstancedTileRenderer modelManager, KineticTileEntity tile) {
|
||||||
|
super(modelManager, tile);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected InstancedModel<RotatingData> getModel() {
|
||||||
|
if (lastState.get(FACING).getAxis().isHorizontal())
|
||||||
|
return AllBlockPartials.SHAFT_HALF.renderOnDirectionalSouthRotating(modelManager, lastState.rotate(tile.getWorld(), tile.getPos(), Rotation.CLOCKWISE_180));
|
||||||
|
else
|
||||||
|
return rotatingMaterial().getModel(KineticTileEntityRenderer.KINETIC_TILE, shaft(getRotationAxis()));
|
||||||
|
}
|
||||||
|
}
|
|
@ -8,11 +8,13 @@ import com.simibubi.create.CreateClient;
|
||||||
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
||||||
import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer;
|
import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext;
|
import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext;
|
||||||
|
import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionRenderDispatcher;
|
||||||
|
import com.simibubi.create.foundation.render.SuperByteBuffer;
|
||||||
|
import com.simibubi.create.foundation.render.backend.FastRenderDispatcher;
|
||||||
import com.simibubi.create.foundation.tileEntity.behaviour.filtering.FilteringRenderer;
|
import com.simibubi.create.foundation.tileEntity.behaviour.filtering.FilteringRenderer;
|
||||||
import com.simibubi.create.foundation.tileEntity.renderer.SafeTileEntityRenderer;
|
import com.simibubi.create.foundation.tileEntity.renderer.SafeTileEntityRenderer;
|
||||||
import com.simibubi.create.foundation.utility.AngleHelper;
|
import com.simibubi.create.foundation.utility.AngleHelper;
|
||||||
import com.simibubi.create.foundation.utility.MatrixStacker;
|
import com.simibubi.create.foundation.utility.MatrixStacker;
|
||||||
import com.simibubi.create.foundation.utility.SuperByteBuffer;
|
|
||||||
import com.simibubi.create.foundation.utility.VecHelper;
|
import com.simibubi.create.foundation.utility.VecHelper;
|
||||||
|
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
|
@ -42,6 +44,9 @@ public class SawRenderer extends SafeTileEntityRenderer<SawTileEntity> {
|
||||||
renderBlade(te, ms, buffer, light);
|
renderBlade(te, ms, buffer, light);
|
||||||
renderItems(te, partialTicks, ms, buffer, light, overlay);
|
renderItems(te, partialTicks, ms, buffer, light, overlay);
|
||||||
FilteringRenderer.renderOnTileEntity(te, partialTicks, ms, buffer, light, overlay);
|
FilteringRenderer.renderOnTileEntity(te, partialTicks, ms, buffer, light, overlay);
|
||||||
|
|
||||||
|
if (FastRenderDispatcher.available(te.getWorld())) return;
|
||||||
|
|
||||||
renderShaft(te, ms, buffer, light, overlay);
|
renderShaft(te, ms, buffer, light, overlay);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -179,7 +184,7 @@ public class SawRenderer extends SafeTileEntityRenderer<SawTileEntity> {
|
||||||
|
|
||||||
superBuffer
|
superBuffer
|
||||||
.light(msLocal.peek()
|
.light(msLocal.peek()
|
||||||
.getModel())
|
.getModel(), ContraptionRenderDispatcher.getLightOnContraption(context))
|
||||||
.renderInto(ms, buffer.getBuffer(RenderType.getCutoutMipped()));
|
.renderInto(ms, buffer.getBuffer(RenderType.getCutoutMipped()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -413,4 +413,9 @@ public class SawTileEntity extends BlockBreakingKineticTileEntity {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean shouldRenderAsTE() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,7 @@ import java.util.UUID;
|
||||||
import org.apache.commons.lang3.mutable.MutableInt;
|
import org.apache.commons.lang3.mutable.MutableInt;
|
||||||
import org.apache.commons.lang3.tuple.MutablePair;
|
import org.apache.commons.lang3.tuple.MutablePair;
|
||||||
|
|
||||||
|
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||||
import com.simibubi.create.AllMovementBehaviours;
|
import com.simibubi.create.AllMovementBehaviours;
|
||||||
import com.simibubi.create.content.contraptions.components.actors.SeatEntity;
|
import com.simibubi.create.content.contraptions.components.actors.SeatEntity;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.glue.SuperGlueEntity;
|
import com.simibubi.create.content.contraptions.components.structureMovement.glue.SuperGlueEntity;
|
||||||
|
@ -597,6 +598,9 @@ public abstract class AbstractContraptionEntity extends Entity implements IEntit
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@OnlyIn(Dist.CLIENT)
|
||||||
|
public abstract void doLocalTransforms(float partialTicks, MatrixStack[] matrixStacks);
|
||||||
|
|
||||||
public static class ContraptionRotationState {
|
public static class ContraptionRotationState {
|
||||||
public static final ContraptionRotationState NONE = new ContraptionRotationState();
|
public static final ContraptionRotationState NONE = new ContraptionRotationState();
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package com.simibubi.create.content.contraptions.components.structureMovement;
|
package com.simibubi.create.content.contraptions.components.structureMovement;
|
||||||
|
|
||||||
import com.simibubi.create.foundation.config.AllConfigs;
|
import com.simibubi.create.foundation.config.AllConfigs;
|
||||||
|
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.nbt.CompoundNBT;
|
import net.minecraft.nbt.CompoundNBT;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
@ -8,6 +9,8 @@ import net.minecraft.util.text.ITextComponent;
|
||||||
import net.minecraft.util.text.TranslationTextComponent;
|
import net.minecraft.util.text.TranslationTextComponent;
|
||||||
|
|
||||||
public class AssemblyException extends Exception {
|
public class AssemblyException extends Exception {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
public final ITextComponent component;
|
public final ITextComponent component;
|
||||||
private BlockPos position = null;
|
private BlockPos position = null;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,29 @@
|
||||||
package com.simibubi.create.content.contraptions.components.structureMovement;
|
package com.simibubi.create.content.contraptions.components.structureMovement;
|
||||||
|
|
||||||
|
import static com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonBlock.isExtensionPole;
|
||||||
|
import static com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonBlock.isPistonHead;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.Iterator;
|
||||||
|
import java.util.LinkedList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.Optional;
|
||||||
|
import java.util.Queue;
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.UUID;
|
||||||
|
import java.util.function.BiConsumer;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.tuple.MutablePair;
|
||||||
|
import org.apache.commons.lang3.tuple.Pair;
|
||||||
|
|
||||||
import com.simibubi.create.AllBlocks;
|
import com.simibubi.create.AllBlocks;
|
||||||
import com.simibubi.create.AllMovementBehaviours;
|
import com.simibubi.create.AllMovementBehaviours;
|
||||||
import com.simibubi.create.content.contraptions.base.IRotate;
|
import com.simibubi.create.content.contraptions.base.IRotate;
|
||||||
|
@ -28,19 +52,29 @@ import com.simibubi.create.content.logistics.block.inventories.AdjustableCrateBl
|
||||||
import com.simibubi.create.content.logistics.block.redstone.RedstoneContactBlock;
|
import com.simibubi.create.content.logistics.block.redstone.RedstoneContactBlock;
|
||||||
import com.simibubi.create.foundation.config.AllConfigs;
|
import com.simibubi.create.foundation.config.AllConfigs;
|
||||||
import com.simibubi.create.foundation.fluid.CombinedTankWrapper;
|
import com.simibubi.create.foundation.fluid.CombinedTankWrapper;
|
||||||
|
import com.simibubi.create.foundation.render.backend.light.EmptyLighter;
|
||||||
import com.simibubi.create.foundation.utility.BlockFace;
|
import com.simibubi.create.foundation.utility.BlockFace;
|
||||||
import com.simibubi.create.foundation.utility.Iterate;
|
import com.simibubi.create.foundation.utility.Iterate;
|
||||||
import com.simibubi.create.foundation.utility.NBTHelper;
|
import com.simibubi.create.foundation.utility.NBTHelper;
|
||||||
import com.simibubi.create.foundation.utility.NBTProcessors;
|
import com.simibubi.create.foundation.utility.NBTProcessors;
|
||||||
import com.simibubi.create.foundation.utility.VecHelper;
|
import com.simibubi.create.foundation.utility.VecHelper;
|
||||||
import com.simibubi.create.foundation.utility.worldWrappers.WrappedWorld;
|
import com.simibubi.create.foundation.utility.worldWrappers.WrappedWorld;
|
||||||
import net.minecraft.block.*;
|
|
||||||
|
import net.minecraft.block.AbstractButtonBlock;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.block.Blocks;
|
||||||
|
import net.minecraft.block.ChestBlock;
|
||||||
|
import net.minecraft.block.DoorBlock;
|
||||||
|
import net.minecraft.block.IWaterLoggable;
|
||||||
|
import net.minecraft.block.PressurePlateBlock;
|
||||||
import net.minecraft.block.material.PushReaction;
|
import net.minecraft.block.material.PushReaction;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.fluid.Fluids;
|
import net.minecraft.fluid.Fluids;
|
||||||
import net.minecraft.fluid.IFluidState;
|
import net.minecraft.fluid.IFluidState;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.CompoundNBT;
|
import net.minecraft.nbt.CompoundNBT;
|
||||||
|
import net.minecraft.nbt.INBT;
|
||||||
import net.minecraft.nbt.ListNBT;
|
import net.minecraft.nbt.ListNBT;
|
||||||
import net.minecraft.nbt.NBTUtil;
|
import net.minecraft.nbt.NBTUtil;
|
||||||
import net.minecraft.state.properties.BlockStateProperties;
|
import net.minecraft.state.properties.BlockStateProperties;
|
||||||
|
@ -55,9 +89,12 @@ import net.minecraft.util.Rotation;
|
||||||
import net.minecraft.util.math.AxisAlignedBB;
|
import net.minecraft.util.math.AxisAlignedBB;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.util.math.Vec3d;
|
import net.minecraft.util.math.Vec3d;
|
||||||
|
import net.minecraft.util.palette.PaletteHashMap;
|
||||||
import net.minecraft.world.IWorld;
|
import net.minecraft.world.IWorld;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraft.world.gen.feature.template.Template.BlockInfo;
|
import net.minecraft.world.gen.feature.template.Template.BlockInfo;
|
||||||
|
import net.minecraftforge.api.distmarker.Dist;
|
||||||
|
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||||
import net.minecraftforge.common.util.Constants.BlockFlags;
|
import net.minecraftforge.common.util.Constants.BlockFlags;
|
||||||
import net.minecraftforge.common.util.Constants.NBT;
|
import net.minecraftforge.common.util.Constants.NBT;
|
||||||
import net.minecraftforge.fluids.FluidStack;
|
import net.minecraftforge.fluids.FluidStack;
|
||||||
|
@ -67,16 +104,7 @@ import net.minecraftforge.fluids.capability.IFluidHandler.FluidAction;
|
||||||
import net.minecraftforge.fluids.capability.templates.FluidTank;
|
import net.minecraftforge.fluids.capability.templates.FluidTank;
|
||||||
import net.minecraftforge.items.IItemHandlerModifiable;
|
import net.minecraftforge.items.IItemHandlerModifiable;
|
||||||
import net.minecraftforge.items.wrapper.CombinedInvWrapper;
|
import net.minecraftforge.items.wrapper.CombinedInvWrapper;
|
||||||
import org.apache.commons.lang3.tuple.MutablePair;
|
import net.minecraftforge.registries.GameData;
|
||||||
import org.apache.commons.lang3.tuple.Pair;
|
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
|
||||||
import java.util.*;
|
|
||||||
import java.util.function.BiConsumer;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
import static com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonBlock.isExtensionPole;
|
|
||||||
import static com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonBlock.isPistonHead;
|
|
||||||
|
|
||||||
public abstract class Contraption {
|
public abstract class Contraption {
|
||||||
|
|
||||||
|
@ -102,7 +130,8 @@ public abstract class Contraption {
|
||||||
|
|
||||||
// Client
|
// Client
|
||||||
public Map<BlockPos, TileEntity> presentTileEntities;
|
public Map<BlockPos, TileEntity> presentTileEntities;
|
||||||
public List<TileEntity> renderedTileEntities;
|
public List<TileEntity> maybeInstancedTileEntities;
|
||||||
|
public List<TileEntity> specialRenderedTileEntities;
|
||||||
|
|
||||||
public Contraption() {
|
public Contraption() {
|
||||||
blocks = new HashMap<>();
|
blocks = new HashMap<>();
|
||||||
|
@ -115,7 +144,8 @@ public abstract class Contraption {
|
||||||
glueToRemove = new ArrayList<>();
|
glueToRemove = new ArrayList<>();
|
||||||
initialPassengers = new HashMap<>();
|
initialPassengers = new HashMap<>();
|
||||||
presentTileEntities = new HashMap<>();
|
presentTileEntities = new HashMap<>();
|
||||||
renderedTileEntities = new ArrayList<>();
|
maybeInstancedTileEntities = new ArrayList<>();
|
||||||
|
specialRenderedTileEntities = new ArrayList<>();
|
||||||
pendingSubContraptions = new ArrayList<>();
|
pendingSubContraptions = new ArrayList<>();
|
||||||
stabilizedSubContraptions = new HashMap<>();
|
stabilizedSubContraptions = new HashMap<>();
|
||||||
}
|
}
|
||||||
|
@ -474,7 +504,6 @@ public abstract class Contraption {
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean moveMechanicalPiston(World world, BlockPos pos, Queue<BlockPos> frontier, Set<BlockPos> visited, BlockState state) throws AssemblyException {
|
private boolean moveMechanicalPiston(World world, BlockPos pos, Queue<BlockPos> frontier, Set<BlockPos> visited, BlockState state) throws AssemblyException {
|
||||||
int limit = AllConfigs.SERVER.kinetics.maxPistonPoles.get();
|
|
||||||
Direction direction = state.get(MechanicalPistonBlock.FACING);
|
Direction direction = state.get(MechanicalPistonBlock.FACING);
|
||||||
PistonState pistonState = state.get(MechanicalPistonBlock.STATE);
|
PistonState pistonState = state.get(MechanicalPistonBlock.STATE);
|
||||||
if (pistonState == PistonState.MOVING)
|
if (pistonState == PistonState.MOVING)
|
||||||
|
@ -593,53 +622,18 @@ public abstract class Contraption {
|
||||||
public void readNBT(World world, CompoundNBT nbt, boolean spawnData) {
|
public void readNBT(World world, CompoundNBT nbt, boolean spawnData) {
|
||||||
blocks.clear();
|
blocks.clear();
|
||||||
presentTileEntities.clear();
|
presentTileEntities.clear();
|
||||||
renderedTileEntities.clear();
|
specialRenderedTileEntities.clear();
|
||||||
|
|
||||||
nbt.getList("Blocks", 10)
|
INBT blocks = nbt.get("Blocks");
|
||||||
.forEach(c -> {
|
//used to differentiate between the 'old' and the paletted serialization
|
||||||
CompoundNBT comp = (CompoundNBT) c;
|
boolean usePalettedDeserialization = blocks != null && blocks.getId() == 10 && ((CompoundNBT) blocks).contains("Palette");
|
||||||
BlockInfo info = new BlockInfo(NBTUtil.readBlockPos(comp.getCompound("Pos")),
|
readBlocksCompound(blocks, world, usePalettedDeserialization);
|
||||||
NBTUtil.readBlockState(comp.getCompound("Block")),
|
|
||||||
comp.contains("Data") ? comp.getCompound("Data") : null);
|
|
||||||
blocks.put(info.pos, info);
|
|
||||||
|
|
||||||
if (world.isRemote) {
|
|
||||||
Block block = info.state.getBlock();
|
|
||||||
CompoundNBT tag = info.nbt;
|
|
||||||
MovementBehaviour movementBehaviour = AllMovementBehaviours.of(block);
|
|
||||||
if (tag == null || (movementBehaviour != null && movementBehaviour.hasSpecialMovementRenderer()))
|
|
||||||
return;
|
|
||||||
|
|
||||||
tag.putInt("x", info.pos.getX());
|
|
||||||
tag.putInt("y", info.pos.getY());
|
|
||||||
tag.putInt("z", info.pos.getZ());
|
|
||||||
|
|
||||||
TileEntity te = TileEntity.create(tag);
|
|
||||||
if (te == null)
|
|
||||||
return;
|
|
||||||
te.setLocation(new WrappedWorld(world) {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BlockState getBlockState(BlockPos pos) {
|
|
||||||
if (!pos.equals(te.getPos()))
|
|
||||||
return Blocks.AIR.getDefaultState();
|
|
||||||
return info.state;
|
|
||||||
}
|
|
||||||
|
|
||||||
}, te.getPos());
|
|
||||||
if (te instanceof KineticTileEntity)
|
|
||||||
((KineticTileEntity) te).setSpeed(0);
|
|
||||||
te.getBlockState();
|
|
||||||
presentTileEntities.put(info.pos, te);
|
|
||||||
renderedTileEntities.add(te);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
actors.clear();
|
actors.clear();
|
||||||
nbt.getList("Actors", 10)
|
nbt.getList("Actors", 10)
|
||||||
.forEach(c -> {
|
.forEach(c -> {
|
||||||
CompoundNBT comp = (CompoundNBT) c;
|
CompoundNBT comp = (CompoundNBT) c;
|
||||||
BlockInfo info = blocks.get(NBTUtil.readBlockPos(comp.getCompound("Pos")));
|
BlockInfo info = this.blocks.get(NBTUtil.readBlockPos(comp.getCompound("Pos")));
|
||||||
MovementContext context = MovementContext.readNBT(world, info, comp, this);
|
MovementContext context = MovementContext.readNBT(world, info, comp, this);
|
||||||
getActors().add(MutablePair.of(info, context));
|
getActors().add(MutablePair.of(info, context));
|
||||||
});
|
});
|
||||||
|
@ -704,15 +698,8 @@ public abstract class Contraption {
|
||||||
public CompoundNBT writeNBT(boolean spawnPacket) {
|
public CompoundNBT writeNBT(boolean spawnPacket) {
|
||||||
CompoundNBT nbt = new CompoundNBT();
|
CompoundNBT nbt = new CompoundNBT();
|
||||||
nbt.putString("Type", getType().id);
|
nbt.putString("Type", getType().id);
|
||||||
ListNBT blocksNBT = new ListNBT();
|
|
||||||
for (BlockInfo block : this.blocks.values()) {
|
CompoundNBT blocksNBT = writeBlocksCompound();
|
||||||
CompoundNBT c = new CompoundNBT();
|
|
||||||
c.put("Block", NBTUtil.writeBlockState(block.state));
|
|
||||||
c.put("Pos", NBTUtil.writeBlockPos(block.pos));
|
|
||||||
if (block.nbt != null)
|
|
||||||
c.put("Data", block.nbt);
|
|
||||||
blocksNBT.add(c);
|
|
||||||
}
|
|
||||||
|
|
||||||
ListNBT actorsNBT = new ListNBT();
|
ListNBT actorsNBT = new ListNBT();
|
||||||
for (MutablePair<BlockInfo, MovementContext> actor : getActors()) {
|
for (MutablePair<BlockInfo, MovementContext> actor : getActors()) {
|
||||||
|
@ -789,6 +776,107 @@ public abstract class Contraption {
|
||||||
return nbt;
|
return nbt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private CompoundNBT writeBlocksCompound() {
|
||||||
|
CompoundNBT compound = new CompoundNBT();
|
||||||
|
PaletteHashMap<BlockState> palette = new PaletteHashMap<>(GameData.getBlockStateIDMap(), 16, (i, s) -> {throw new IllegalStateException("Palette Map index exceeded maximum");}, NBTUtil::readBlockState, NBTUtil::writeBlockState);
|
||||||
|
ListNBT blockList = new ListNBT();
|
||||||
|
|
||||||
|
for (BlockInfo block : this.blocks.values()) {
|
||||||
|
int id = palette.idFor(block.state);
|
||||||
|
CompoundNBT c = new CompoundNBT();
|
||||||
|
c.putLong("Pos", block.pos.toLong());
|
||||||
|
c.putInt("State", id);
|
||||||
|
if (block.nbt != null)
|
||||||
|
c.put("Data", block.nbt);
|
||||||
|
blockList.add(c);
|
||||||
|
}
|
||||||
|
|
||||||
|
ListNBT paletteNBT = new ListNBT();
|
||||||
|
palette.writePaletteToList(paletteNBT);
|
||||||
|
compound.put("Palette", paletteNBT);
|
||||||
|
compound.put("BlockList", blockList);
|
||||||
|
|
||||||
|
return compound;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void readBlocksCompound(INBT compound, World world, boolean usePalettedDeserialization) {
|
||||||
|
PaletteHashMap<BlockState> palette = null;
|
||||||
|
ListNBT blockList;
|
||||||
|
if (usePalettedDeserialization) {
|
||||||
|
CompoundNBT c = ((CompoundNBT) compound);
|
||||||
|
palette = new PaletteHashMap<>(GameData.getBlockStateIDMap(), 16, (i, s) -> {throw new IllegalStateException("Palette Map index exceeded maximum");}, NBTUtil::readBlockState, NBTUtil::writeBlockState);
|
||||||
|
palette.read(c.getList("Palette", 10));
|
||||||
|
|
||||||
|
blockList = c.getList("BlockList", 10);
|
||||||
|
} else {
|
||||||
|
blockList = (ListNBT) compound;
|
||||||
|
}
|
||||||
|
|
||||||
|
PaletteHashMap<BlockState> finalPalette = palette;
|
||||||
|
blockList.forEach(e -> {
|
||||||
|
CompoundNBT c = (CompoundNBT) e;
|
||||||
|
|
||||||
|
BlockInfo info = usePalettedDeserialization ? readBlockInfo(c, finalPalette) : legacyReadBlockInfo(c);
|
||||||
|
|
||||||
|
this.blocks.put(info.pos, info);
|
||||||
|
|
||||||
|
if (world.isRemote) {
|
||||||
|
Block block = info.state.getBlock();
|
||||||
|
CompoundNBT tag = info.nbt;
|
||||||
|
MovementBehaviour movementBehaviour = AllMovementBehaviours.of(block);
|
||||||
|
if (tag == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
tag.putInt("x", info.pos.getX());
|
||||||
|
tag.putInt("y", info.pos.getY());
|
||||||
|
tag.putInt("z", info.pos.getZ());
|
||||||
|
|
||||||
|
TileEntity te = TileEntity.create(tag);
|
||||||
|
if (te == null)
|
||||||
|
return;
|
||||||
|
te.setLocation(new WrappedWorld(world) {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BlockState getBlockState(BlockPos pos) {
|
||||||
|
if (!pos.equals(te.getPos()))
|
||||||
|
return Blocks.AIR.getDefaultState();
|
||||||
|
return info.state;
|
||||||
|
}
|
||||||
|
|
||||||
|
}, te.getPos());
|
||||||
|
if (te instanceof KineticTileEntity)
|
||||||
|
((KineticTileEntity) te).setSpeed(0);
|
||||||
|
te.getBlockState();
|
||||||
|
|
||||||
|
if (movementBehaviour == null || !movementBehaviour.hasSpecialInstancedRendering())
|
||||||
|
maybeInstancedTileEntities.add(te);
|
||||||
|
|
||||||
|
if (movementBehaviour != null && !movementBehaviour.renderAsNormalTileEntity())
|
||||||
|
return;
|
||||||
|
|
||||||
|
presentTileEntities.put(info.pos, te);
|
||||||
|
specialRenderedTileEntities.add(te);
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private static BlockInfo readBlockInfo(CompoundNBT blockListEntry, PaletteHashMap<BlockState> palette) {
|
||||||
|
return new BlockInfo(
|
||||||
|
BlockPos.fromLong(blockListEntry.getLong("Pos")),
|
||||||
|
Objects.requireNonNull(palette.get(blockListEntry.getInt("State"))),
|
||||||
|
blockListEntry.contains("Data") ? blockListEntry.getCompound("Data") : null
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static BlockInfo legacyReadBlockInfo(CompoundNBT blockListEntry) {
|
||||||
|
return new BlockInfo(
|
||||||
|
NBTUtil.readBlockPos(blockListEntry.getCompound("Pos")),
|
||||||
|
NBTUtil.readBlockState(blockListEntry.getCompound("Block")),
|
||||||
|
blockListEntry.contains("Data") ? blockListEntry.getCompound("Data") : null
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
public void removeBlocksFromWorld(World world, BlockPos offset) {
|
public void removeBlocksFromWorld(World world, BlockPos offset) {
|
||||||
storage.values()
|
storage.values()
|
||||||
.forEach(MountedStorage::removeStorageFromWorld);
|
.forEach(MountedStorage::removeStorageFromWorld);
|
||||||
|
@ -915,7 +1003,6 @@ public abstract class Contraption {
|
||||||
if (!shouldUpdateAfterMovement(block))
|
if (!shouldUpdateAfterMovement(block))
|
||||||
continue;
|
continue;
|
||||||
BlockPos targetPos = transform.apply(block.pos);
|
BlockPos targetPos = transform.apply(block.pos);
|
||||||
BlockState state = world.getBlockState(targetPos);
|
|
||||||
world.markAndNotifyBlock(targetPos, null, block.state, block.state,
|
world.markAndNotifyBlock(targetPos, null, block.state, block.state,
|
||||||
BlockFlags.IS_MOVING | BlockFlags.DEFAULT);
|
BlockFlags.IS_MOVING | BlockFlags.DEFAULT);
|
||||||
}
|
}
|
||||||
|
@ -1049,4 +1136,9 @@ public abstract class Contraption {
|
||||||
mountedFluidStorage.updateFluid(containedFluid);
|
mountedFluidStorage.updateFluid(containedFluid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@OnlyIn(Dist.CLIENT)
|
||||||
|
public ContraptionLighter<?> makeLighter() {
|
||||||
|
return new EmptyLighter(this);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -311,7 +311,7 @@ public class ContraptionCollider {
|
||||||
if (!entity.world.isRemote)
|
if (!entity.world.isRemote)
|
||||||
return PlayerType.SERVER;
|
return PlayerType.SERVER;
|
||||||
MutableBoolean isClient = new MutableBoolean(false);
|
MutableBoolean isClient = new MutableBoolean(false);
|
||||||
DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> isClient.setValue(isClientPlayerEntity(entity)));
|
DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> isClient.setValue(isClientPlayerEntity(entity)));
|
||||||
return isClient.booleanValue() ? PlayerType.CLIENT : PlayerType.REMOTE;
|
return isClient.booleanValue() ? PlayerType.CLIENT : PlayerType.REMOTE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ public class ContraptionDisassemblyPacket extends SimplePacketBase {
|
||||||
@Override
|
@Override
|
||||||
public void handle(Supplier<Context> context) {
|
public void handle(Supplier<Context> context) {
|
||||||
context.get()
|
context.get()
|
||||||
.enqueueWork(() -> DistExecutor.runWhenOn(Dist.CLIENT,
|
.enqueueWork(() -> DistExecutor.unsafeRunWhenOn(Dist.CLIENT,
|
||||||
() -> () -> AbstractContraptionEntity.handleDisassemblyPacket(this)));
|
() -> () -> AbstractContraptionEntity.handleDisassemblyPacket(this)));
|
||||||
context.get()
|
context.get()
|
||||||
.setPacketHandled(true);
|
.setPacketHandled(true);
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
package com.simibubi.create.content.contraptions.components.structureMovement;
|
package com.simibubi.create.content.contraptions.components.structureMovement;
|
||||||
|
|
||||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||||
|
import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionRenderDispatcher;
|
||||||
|
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||||
|
|
||||||
import net.minecraft.client.Minecraft;
|
|
||||||
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
||||||
import net.minecraft.client.renderer.culling.ClippingHelperImpl;
|
import net.minecraft.client.renderer.culling.ClippingHelperImpl;
|
||||||
import net.minecraft.client.renderer.entity.EntityRenderer;
|
import net.minecraft.client.renderer.entity.EntityRenderer;
|
||||||
|
@ -10,29 +11,26 @@ import net.minecraft.client.renderer.entity.EntityRendererManager;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraft.util.math.MathHelper;
|
import net.minecraft.util.math.MathHelper;
|
||||||
|
|
||||||
public abstract class AbstractContraptionEntityRenderer<C extends AbstractContraptionEntity> extends EntityRenderer<C> {
|
public class ContraptionEntityRenderer<C extends AbstractContraptionEntity> extends EntityRenderer<C> {
|
||||||
|
|
||||||
protected AbstractContraptionEntityRenderer(EntityRendererManager p_i46179_1_) {
|
public ContraptionEntityRenderer(EntityRendererManager p_i46179_1_) {
|
||||||
super(p_i46179_1_);
|
super(p_i46179_1_);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ResourceLocation getEntityTexture(C p_110775_1_) {
|
public ResourceLocation getEntityTexture(C entity) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected abstract void transform(C contraptionEntity, float partialTicks, MatrixStack[] matrixStacks);
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean shouldRender(C entity, ClippingHelperImpl p_225626_2_, double p_225626_3_, double p_225626_5_,
|
public boolean shouldRender(C entity, ClippingHelperImpl clippingHelper, double p_225626_3_, double p_225626_5_,
|
||||||
double p_225626_7_) {
|
double p_225626_7_) {
|
||||||
if (!super.shouldRender(entity, p_225626_2_, p_225626_3_, p_225626_5_, p_225626_7_))
|
if (entity.getContraption() == null)
|
||||||
return false;
|
return false;
|
||||||
if (!entity.isAlive())
|
if (!entity.isAlive())
|
||||||
return false;
|
return false;
|
||||||
if (entity.getContraption() == null)
|
|
||||||
return false;
|
return super.shouldRender(entity, clippingHelper, p_225626_3_, p_225626_5_, p_225626_7_);
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -41,21 +39,20 @@ public abstract class AbstractContraptionEntityRenderer<C extends AbstractContra
|
||||||
super.render(entity, yaw, partialTicks, ms, buffers, overlay);
|
super.render(entity, yaw, partialTicks, ms, buffers, overlay);
|
||||||
|
|
||||||
// Keep a copy of the transforms in order to determine correct lighting
|
// Keep a copy of the transforms in order to determine correct lighting
|
||||||
MatrixStack msLocal = getLocalTransform(entity);
|
MatrixStack msLocal = translateTo(entity, AnimationTickHolder.getRenderTick());
|
||||||
MatrixStack[] matrixStacks = new MatrixStack[] { ms, msLocal };
|
MatrixStack[] matrixStacks = new MatrixStack[] { ms, msLocal };
|
||||||
|
|
||||||
ms.push();
|
ms.push();
|
||||||
transform(entity, partialTicks, matrixStacks);
|
entity.doLocalTransforms(partialTicks, matrixStacks);
|
||||||
Contraption contraption = entity.getContraption();
|
Contraption contraption = entity.getContraption();
|
||||||
if (contraption != null)
|
if (contraption != null) {
|
||||||
ContraptionRenderer.render(entity.world, contraption, ms, msLocal, buffers);
|
ContraptionRenderDispatcher.render(entity, ms, buffers, msLocal, contraption);
|
||||||
|
}
|
||||||
ms.pop();
|
ms.pop();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected MatrixStack getLocalTransform(AbstractContraptionEntity entity) {
|
protected MatrixStack translateTo(AbstractContraptionEntity entity, float pt) {
|
||||||
double pt = Minecraft.getInstance()
|
|
||||||
.getRenderPartialTicks();
|
|
||||||
MatrixStack matrixStack = new MatrixStack();
|
MatrixStack matrixStack = new MatrixStack();
|
||||||
double x = MathHelper.lerp(pt, entity.lastTickPosX, entity.getX());
|
double x = MathHelper.lerp(pt, entity.lastTickPosX, entity.getX());
|
||||||
double y = MathHelper.lerp(pt, entity.lastTickPosY, entity.getY());
|
double y = MathHelper.lerp(pt, entity.lastTickPosY, entity.getY());
|
|
@ -0,0 +1,42 @@
|
||||||
|
package com.simibubi.create.content.contraptions.components.structureMovement;
|
||||||
|
|
||||||
|
import com.simibubi.create.content.contraptions.components.structureMovement.render.RenderedContraption;
|
||||||
|
import com.simibubi.create.foundation.render.backend.light.GridAlignedBB;
|
||||||
|
import com.simibubi.create.foundation.render.backend.light.LightVolume;
|
||||||
|
|
||||||
|
public abstract class ContraptionLighter<C extends Contraption> {
|
||||||
|
protected final C contraption;
|
||||||
|
public final LightVolume lightVolume;
|
||||||
|
|
||||||
|
protected GridAlignedBB bounds;
|
||||||
|
|
||||||
|
protected boolean scheduleRebuild;
|
||||||
|
|
||||||
|
protected ContraptionLighter(C contraption) {
|
||||||
|
this.contraption = contraption;
|
||||||
|
|
||||||
|
bounds = getContraptionBounds();
|
||||||
|
|
||||||
|
lightVolume = new LightVolume(contraptionBoundsToVolume(bounds.copy()));
|
||||||
|
|
||||||
|
lightVolume.initialize(contraption.entity.world);
|
||||||
|
scheduleRebuild = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected GridAlignedBB contraptionBoundsToVolume(GridAlignedBB bounds) {
|
||||||
|
bounds.grow(1); // so we have at least enough data on the edges to avoid artifacts and have smooth lighting
|
||||||
|
bounds.minY = Math.max(bounds.minY, 0);
|
||||||
|
bounds.maxY = Math.min(bounds.maxY, 255);
|
||||||
|
|
||||||
|
return bounds;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void tick(RenderedContraption owner) {
|
||||||
|
if (scheduleRebuild) {
|
||||||
|
lightVolume.initialize(owner.contraption.entity.world);
|
||||||
|
scheduleRebuild = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public abstract GridAlignedBB getContraptionBounds();
|
||||||
|
}
|
|
@ -1,157 +0,0 @@
|
||||||
package com.simibubi.create.content.contraptions.components.structureMovement;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import org.apache.commons.lang3.tuple.Pair;
|
|
||||||
import org.lwjgl.opengl.GL11;
|
|
||||||
|
|
||||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
|
||||||
import com.simibubi.create.AllMovementBehaviours;
|
|
||||||
import com.simibubi.create.CreateClient;
|
|
||||||
import com.simibubi.create.foundation.utility.MatrixStacker;
|
|
||||||
import com.simibubi.create.foundation.utility.SuperByteBuffer;
|
|
||||||
import com.simibubi.create.foundation.utility.SuperByteBufferCache;
|
|
||||||
import com.simibubi.create.foundation.utility.SuperByteBufferCache.Compartment;
|
|
||||||
import com.simibubi.create.foundation.utility.TileEntityRenderHelper;
|
|
||||||
import com.simibubi.create.foundation.utility.worldWrappers.PlacementSimulationWorld;
|
|
||||||
|
|
||||||
import net.minecraft.block.BlockRenderType;
|
|
||||||
import net.minecraft.block.BlockState;
|
|
||||||
import net.minecraft.client.Minecraft;
|
|
||||||
import net.minecraft.client.renderer.BlockModelRenderer;
|
|
||||||
import net.minecraft.client.renderer.BlockRendererDispatcher;
|
|
||||||
import net.minecraft.client.renderer.BufferBuilder;
|
|
||||||
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
|
||||||
import net.minecraft.client.renderer.Matrix4f;
|
|
||||||
import net.minecraft.client.renderer.RenderType;
|
|
||||||
import net.minecraft.client.renderer.RenderTypeLookup;
|
|
||||||
import net.minecraft.client.renderer.model.IBakedModel;
|
|
||||||
import net.minecraft.client.renderer.texture.OverlayTexture;
|
|
||||||
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
|
||||||
import net.minecraft.util.math.BlockPos;
|
|
||||||
import net.minecraft.world.LightType;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import net.minecraft.world.gen.feature.template.Template.BlockInfo;
|
|
||||||
import net.minecraftforge.client.ForgeHooksClient;
|
|
||||||
import net.minecraftforge.client.model.data.EmptyModelData;
|
|
||||||
|
|
||||||
public class ContraptionRenderer {
|
|
||||||
|
|
||||||
public static final Compartment<Pair<Contraption, Integer>> CONTRAPTION = new Compartment<>();
|
|
||||||
protected static PlacementSimulationWorld renderWorld;
|
|
||||||
|
|
||||||
public static void render(World world, Contraption c, MatrixStack ms, MatrixStack msLocal,
|
|
||||||
IRenderTypeBuffer buffer) {
|
|
||||||
renderTileEntities(world, c, ms, msLocal, buffer);
|
|
||||||
if (buffer instanceof IRenderTypeBuffer.Impl)
|
|
||||||
((IRenderTypeBuffer.Impl) buffer).draw();
|
|
||||||
renderStructure(world, c, ms, msLocal, buffer);
|
|
||||||
renderActors(world, c, ms, msLocal, buffer);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected static void renderStructure(World world, Contraption c, MatrixStack ms, MatrixStack msLocal,
|
|
||||||
IRenderTypeBuffer buffer) {
|
|
||||||
SuperByteBufferCache bufferCache = CreateClient.bufferCache;
|
|
||||||
List<RenderType> blockLayers = RenderType.getBlockLayers();
|
|
||||||
|
|
||||||
buffer.getBuffer(RenderType.getSolid());
|
|
||||||
for (int i = 0; i < blockLayers.size(); i++) {
|
|
||||||
RenderType layer = blockLayers.get(i);
|
|
||||||
Pair<Contraption, Integer> key = Pair.of(c, i);
|
|
||||||
SuperByteBuffer contraptionBuffer = bufferCache.get(CONTRAPTION, key, () -> buildStructureBuffer(c, layer));
|
|
||||||
if (contraptionBuffer.isEmpty())
|
|
||||||
continue;
|
|
||||||
Matrix4f model = msLocal.peek()
|
|
||||||
.getModel();
|
|
||||||
contraptionBuffer.light(model)
|
|
||||||
.renderInto(ms, buffer.getBuffer(layer));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void renderTileEntities(World world, Contraption c, MatrixStack ms, MatrixStack msLocal,
|
|
||||||
IRenderTypeBuffer buffer) {
|
|
||||||
TileEntityRenderHelper.renderTileEntities(world, c.renderedTileEntities, ms, msLocal, buffer);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static SuperByteBuffer buildStructureBuffer(Contraption c, RenderType layer) {
|
|
||||||
if (renderWorld == null || renderWorld.getWorld() != Minecraft.getInstance().world)
|
|
||||||
renderWorld = new PlacementSimulationWorld(Minecraft.getInstance().world);
|
|
||||||
|
|
||||||
ForgeHooksClient.setRenderLayer(layer);
|
|
||||||
MatrixStack ms = new MatrixStack();
|
|
||||||
BlockRendererDispatcher dispatcher = Minecraft.getInstance()
|
|
||||||
.getBlockRendererDispatcher();
|
|
||||||
BlockModelRenderer blockRenderer = dispatcher.getBlockModelRenderer();
|
|
||||||
Random random = new Random();
|
|
||||||
BufferBuilder builder = new BufferBuilder(DefaultVertexFormats.BLOCK.getIntegerSize());
|
|
||||||
builder.begin(GL11.GL_QUADS, DefaultVertexFormats.BLOCK);
|
|
||||||
renderWorld.setTileEntities(c.presentTileEntities.values());
|
|
||||||
|
|
||||||
for (BlockInfo info : c.getBlocks()
|
|
||||||
.values())
|
|
||||||
renderWorld.setBlockState(info.pos, info.state);
|
|
||||||
for (BlockInfo info : c.getBlocks()
|
|
||||||
.values()) {
|
|
||||||
BlockState state = info.state;
|
|
||||||
|
|
||||||
if (state.getRenderType() == BlockRenderType.ENTITYBLOCK_ANIMATED)
|
|
||||||
continue;
|
|
||||||
if (!RenderTypeLookup.canRenderInLayer(state, layer))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
IBakedModel originalModel = dispatcher.getModelForState(state);
|
|
||||||
ms.push();
|
|
||||||
ms.translate(info.pos.getX(), info.pos.getY(), info.pos.getZ());
|
|
||||||
blockRenderer.renderModel(renderWorld, originalModel, state, info.pos, ms, builder, true, random, 42,
|
|
||||||
OverlayTexture.DEFAULT_UV, EmptyModelData.INSTANCE);
|
|
||||||
ms.pop();
|
|
||||||
}
|
|
||||||
|
|
||||||
builder.finishDrawing();
|
|
||||||
renderWorld.clear();
|
|
||||||
return new SuperByteBuffer(builder);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void renderActors(World world, Contraption c, MatrixStack ms, MatrixStack msLocal,
|
|
||||||
IRenderTypeBuffer buffer) {
|
|
||||||
MatrixStack[] matrixStacks = new MatrixStack[] { ms, msLocal };
|
|
||||||
for (Pair<BlockInfo, MovementContext> actor : c.getActors()) {
|
|
||||||
MovementContext context = actor.getRight();
|
|
||||||
if (context == null)
|
|
||||||
continue;
|
|
||||||
if (context.world == null)
|
|
||||||
context.world = world;
|
|
||||||
BlockInfo blockInfo = actor.getLeft();
|
|
||||||
for (MatrixStack m : matrixStacks) {
|
|
||||||
m.push();
|
|
||||||
MatrixStacker.of(m)
|
|
||||||
.translate(blockInfo.pos);
|
|
||||||
}
|
|
||||||
|
|
||||||
MovementBehaviour movementBehaviour = AllMovementBehaviours.of(blockInfo.state);
|
|
||||||
if (movementBehaviour != null)
|
|
||||||
movementBehaviour.renderInContraption(context, ms, msLocal, buffer);
|
|
||||||
|
|
||||||
for (MatrixStack m : matrixStacks)
|
|
||||||
m.pop();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static int getLight(World world, float lx, float ly, float lz) {
|
|
||||||
BlockPos.Mutable pos = new BlockPos.Mutable();
|
|
||||||
float sky = 0, block = 0;
|
|
||||||
float offset = 1 / 8f;
|
|
||||||
|
|
||||||
for (float zOffset = offset; zOffset >= -offset; zOffset -= 2 * offset)
|
|
||||||
for (float yOffset = offset; yOffset >= -offset; yOffset -= 2 * offset)
|
|
||||||
for (float xOffset = offset; xOffset >= -offset; xOffset -= 2 * offset) {
|
|
||||||
pos.setPos(lx + xOffset, ly + yOffset, lz + zOffset);
|
|
||||||
sky += world.getLightLevel(LightType.SKY, pos) / 8f;
|
|
||||||
block += world.getLightLevel(LightType.BLOCK, pos) / 8f;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ((int) sky) << 20 | ((int) block) << 4;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -42,7 +42,7 @@ public class ContraptionStallPacket extends SimplePacketBase {
|
||||||
@Override
|
@Override
|
||||||
public void handle(Supplier<Context> context) {
|
public void handle(Supplier<Context> context) {
|
||||||
context.get().enqueueWork(
|
context.get().enqueueWork(
|
||||||
() -> DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> AbstractContraptionEntity.handleStallPacket(this)));
|
() -> DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> AbstractContraptionEntity.handleStallPacket(this)));
|
||||||
context.get().setPacketHandled(true);
|
context.get().setPacketHandled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,10 @@ package com.simibubi.create.content.contraptions.components.structureMovement;
|
||||||
|
|
||||||
import static com.simibubi.create.foundation.utility.AngleHelper.angleLerp;
|
import static com.simibubi.create.foundation.utility.AngleHelper.angleLerp;
|
||||||
|
|
||||||
|
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||||
import com.simibubi.create.AllEntityTypes;
|
import com.simibubi.create.AllEntityTypes;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.bearing.BearingContraption;
|
import com.simibubi.create.content.contraptions.components.structureMovement.bearing.BearingContraption;
|
||||||
|
import com.simibubi.create.foundation.utility.MatrixStacker;
|
||||||
import com.simibubi.create.foundation.utility.NBTHelper;
|
import com.simibubi.create.foundation.utility.NBTHelper;
|
||||||
import com.simibubi.create.foundation.utility.VecHelper;
|
import com.simibubi.create.foundation.utility.VecHelper;
|
||||||
|
|
||||||
|
@ -219,4 +221,18 @@ public class ControlledContraptionEntity extends AbstractContraptionEntity {
|
||||||
setPos(x, y, z);
|
setPos(x, y, z);
|
||||||
this.angle = angle;
|
this.angle = angle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@OnlyIn(Dist.CLIENT)
|
||||||
|
public void doLocalTransforms(float partialTicks, MatrixStack[] matrixStacks) {
|
||||||
|
float angle = getAngle(partialTicks);
|
||||||
|
Axis axis = getRotationAxis();
|
||||||
|
|
||||||
|
for (MatrixStack stack : matrixStacks)
|
||||||
|
MatrixStacker.of(stack)
|
||||||
|
.nudge(getEntityId())
|
||||||
|
.centre()
|
||||||
|
.rotate(angle, axis)
|
||||||
|
.unCentre();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,29 +0,0 @@
|
||||||
package com.simibubi.create.content.contraptions.components.structureMovement;
|
|
||||||
|
|
||||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
|
||||||
import com.simibubi.create.foundation.utility.MatrixStacker;
|
|
||||||
|
|
||||||
import net.minecraft.client.renderer.entity.EntityRendererManager;
|
|
||||||
import net.minecraft.util.Direction.Axis;
|
|
||||||
|
|
||||||
public class ControlledContraptionEntityRenderer extends AbstractContraptionEntityRenderer<ControlledContraptionEntity> {
|
|
||||||
|
|
||||||
public ControlledContraptionEntityRenderer(EntityRendererManager p_i46179_1_) {
|
|
||||||
super(p_i46179_1_);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void transform(ControlledContraptionEntity entity, float partialTicks,
|
|
||||||
MatrixStack[] matrixStacks) {
|
|
||||||
float angle = entity.getAngle(partialTicks);
|
|
||||||
Axis axis = entity.getRotationAxis();
|
|
||||||
|
|
||||||
for (MatrixStack stack : matrixStacks)
|
|
||||||
MatrixStacker.of(stack)
|
|
||||||
.nudge(entity.getEntityId())
|
|
||||||
.centre()
|
|
||||||
.rotate(angle, axis)
|
|
||||||
.unCentre();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,12 +1,13 @@
|
||||||
package com.simibubi.create.content.contraptions.components.structureMovement;
|
package com.simibubi.create.content.contraptions.components.structureMovement;
|
||||||
|
|
||||||
import com.simibubi.create.content.contraptions.goggles.IHaveGoggleInformation;
|
|
||||||
import com.simibubi.create.foundation.utility.Lang;
|
|
||||||
import net.minecraft.util.text.TextFormatting;
|
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.simibubi.create.content.contraptions.goggles.IHaveGoggleInformation;
|
||||||
|
import com.simibubi.create.foundation.utility.Lang;
|
||||||
|
|
||||||
|
import net.minecraft.util.text.TextFormatting;
|
||||||
|
|
||||||
public interface IDisplayAssemblyExceptions {
|
public interface IDisplayAssemblyExceptions {
|
||||||
|
|
||||||
default boolean addExceptionToTooltip(List<String> tooltip) {
|
default boolean addExceptionToTooltip(List<String> tooltip) {
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package com.simibubi.create.content.contraptions.components.structureMovement;
|
package com.simibubi.create.content.contraptions.components.structureMovement;
|
||||||
|
|
||||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||||
|
import com.simibubi.create.content.contraptions.components.structureMovement.render.RenderedContraption;
|
||||||
|
|
||||||
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
||||||
import net.minecraft.entity.item.ItemEntity;
|
import net.minecraft.entity.item.ItemEntity;
|
||||||
|
@ -47,14 +48,21 @@ public abstract class MovementBehaviour {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean hasSpecialMovementRenderer() {
|
public boolean renderAsNormalTileEntity() {
|
||||||
return true;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean hasSpecialInstancedRendering() {
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@OnlyIn(Dist.CLIENT)
|
@OnlyIn(Dist.CLIENT)
|
||||||
public void renderInContraption(MovementContext context, MatrixStack ms, MatrixStack msLocal,
|
public void renderInContraption(MovementContext context, MatrixStack ms, MatrixStack msLocal,
|
||||||
IRenderTypeBuffer buffer) {}
|
IRenderTypeBuffer buffer) {}
|
||||||
|
|
||||||
|
@OnlyIn(Dist.CLIENT)
|
||||||
|
public void addInstance(RenderedContraption contraption, MovementContext context) {}
|
||||||
|
|
||||||
public void onSpeedChanged(MovementContext context, Vec3d oldMotion, Vec3d motion) {
|
public void onSpeedChanged(MovementContext context, Vec3d oldMotion, Vec3d motion) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
package com.simibubi.create.content.contraptions.components.structureMovement;
|
||||||
|
|
||||||
|
import com.simibubi.create.content.contraptions.components.structureMovement.render.RenderedContraption;
|
||||||
|
import com.simibubi.create.foundation.render.backend.light.GridAlignedBB;
|
||||||
|
|
||||||
|
public class NonStationaryLighter<C extends Contraption> extends ContraptionLighter<C> {
|
||||||
|
public NonStationaryLighter(C contraption) {
|
||||||
|
super(contraption);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected GridAlignedBB contraptionBoundsToVolume(GridAlignedBB bounds) {
|
||||||
|
bounds.grow(2); // so we have at least enough data on the edges to avoid artifacts and have smooth lighting
|
||||||
|
bounds.minY = Math.max(bounds.minY, 0);
|
||||||
|
bounds.maxY = Math.min(bounds.maxY, 255);
|
||||||
|
|
||||||
|
return bounds;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void tick(RenderedContraption owner) {
|
||||||
|
super.tick(owner);
|
||||||
|
GridAlignedBB contraptionBounds = getContraptionBounds();
|
||||||
|
|
||||||
|
if (!contraptionBounds.sameAs(bounds)) {
|
||||||
|
lightVolume.move(contraption.entity.world, contraptionBoundsToVolume(contraptionBounds));
|
||||||
|
bounds = contraptionBounds;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public GridAlignedBB getContraptionBounds() {
|
||||||
|
GridAlignedBB bb = GridAlignedBB.fromAABB(contraption.bounds);
|
||||||
|
|
||||||
|
bb.translate(contraption.entity.getPosition());
|
||||||
|
|
||||||
|
return bb;
|
||||||
|
}
|
||||||
|
}
|
|
@ -7,6 +7,7 @@ import java.util.UUID;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
|
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||||
import com.simibubi.create.AllEntityTypes;
|
import com.simibubi.create.AllEntityTypes;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.bearing.StabilizedContraption;
|
import com.simibubi.create.content.contraptions.components.structureMovement.bearing.StabilizedContraption;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.mounted.CartAssemblerTileEntity.CartMovementMode;
|
import com.simibubi.create.content.contraptions.components.structureMovement.mounted.CartAssemblerTileEntity.CartMovementMode;
|
||||||
|
@ -16,6 +17,7 @@ import com.simibubi.create.content.contraptions.components.structureMovement.tra
|
||||||
import com.simibubi.create.foundation.item.ItemHelper;
|
import com.simibubi.create.foundation.item.ItemHelper;
|
||||||
import com.simibubi.create.foundation.utility.AngleHelper;
|
import com.simibubi.create.foundation.utility.AngleHelper;
|
||||||
import com.simibubi.create.foundation.utility.Couple;
|
import com.simibubi.create.foundation.utility.Couple;
|
||||||
|
import com.simibubi.create.foundation.utility.MatrixStacker;
|
||||||
import com.simibubi.create.foundation.utility.NBTHelper;
|
import com.simibubi.create.foundation.utility.NBTHelper;
|
||||||
import com.simibubi.create.foundation.utility.VecHelper;
|
import com.simibubi.create.foundation.utility.VecHelper;
|
||||||
|
|
||||||
|
@ -40,6 +42,8 @@ import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.util.math.MathHelper;
|
import net.minecraft.util.math.MathHelper;
|
||||||
import net.minecraft.util.math.Vec3d;
|
import net.minecraft.util.math.Vec3d;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.api.distmarker.Dist;
|
||||||
|
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||||
import net.minecraftforge.common.util.LazyOptional;
|
import net.minecraftforge.common.util.LazyOptional;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -494,4 +498,89 @@ public class OrientedContraptionEntity extends AbstractContraptionEntity {
|
||||||
yaw = angle;
|
yaw = angle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@OnlyIn(Dist.CLIENT)
|
||||||
|
public void doLocalTransforms(float partialTicks, MatrixStack[] matrixStacks) {
|
||||||
|
float angleInitialYaw = getInitialYaw();
|
||||||
|
float angleYaw = getYaw(partialTicks);
|
||||||
|
float anglePitch = getPitch(partialTicks);
|
||||||
|
|
||||||
|
for (MatrixStack stack : matrixStacks)
|
||||||
|
stack.translate(-.5f, 0, -.5f);
|
||||||
|
|
||||||
|
Entity ridingEntity = getRidingEntity();
|
||||||
|
if (ridingEntity instanceof AbstractMinecartEntity)
|
||||||
|
repositionOnCart(partialTicks, matrixStacks, ridingEntity);
|
||||||
|
else if (ridingEntity instanceof AbstractContraptionEntity) {
|
||||||
|
if (ridingEntity.getRidingEntity() instanceof AbstractMinecartEntity)
|
||||||
|
repositionOnCart(partialTicks, matrixStacks, ridingEntity.getRidingEntity());
|
||||||
|
else
|
||||||
|
repositionOnContraption(partialTicks, matrixStacks, ridingEntity);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (MatrixStack stack : matrixStacks)
|
||||||
|
MatrixStacker.of(stack)
|
||||||
|
.nudge(getEntityId())
|
||||||
|
.centre()
|
||||||
|
.rotateY(angleYaw)
|
||||||
|
.rotateZ(anglePitch)
|
||||||
|
.rotateY(angleInitialYaw)
|
||||||
|
.unCentre();
|
||||||
|
}
|
||||||
|
|
||||||
|
@OnlyIn(Dist.CLIENT)
|
||||||
|
private void repositionOnContraption(float partialTicks, MatrixStack[] matrixStacks, Entity ridingEntity) {
|
||||||
|
Vec3d pos = getContraptionOffset(partialTicks, ridingEntity);
|
||||||
|
for (MatrixStack stack : matrixStacks)
|
||||||
|
stack.translate(pos.x, pos.y, pos.z);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Minecarts do not always render at their exact location, so the contraption
|
||||||
|
// has to adjust aswell
|
||||||
|
@OnlyIn(Dist.CLIENT)
|
||||||
|
private void repositionOnCart(float partialTicks, MatrixStack[] matrixStacks, Entity ridingEntity) {
|
||||||
|
Vec3d cartPos = getCartOffset(partialTicks, ridingEntity);
|
||||||
|
|
||||||
|
if (cartPos == Vec3d.ZERO) return;
|
||||||
|
|
||||||
|
for (MatrixStack stack : matrixStacks)
|
||||||
|
stack.translate(cartPos.x, cartPos.y, cartPos.z);
|
||||||
|
}
|
||||||
|
|
||||||
|
@OnlyIn(Dist.CLIENT)
|
||||||
|
private Vec3d getContraptionOffset(float partialTicks, Entity ridingEntity) {
|
||||||
|
AbstractContraptionEntity parent = (AbstractContraptionEntity) ridingEntity;
|
||||||
|
Vec3d passengerPosition = parent.getPassengerPosition(this, partialTicks);
|
||||||
|
double x = passengerPosition.x - MathHelper.lerp(partialTicks, this.lastTickPosX, this.getX());
|
||||||
|
double y = passengerPosition.y - MathHelper.lerp(partialTicks, this.lastTickPosY, this.getY());
|
||||||
|
double z = passengerPosition.z - MathHelper.lerp(partialTicks, this.lastTickPosZ, this.getZ());
|
||||||
|
|
||||||
|
return new Vec3d(x, y, z);
|
||||||
|
}
|
||||||
|
|
||||||
|
@OnlyIn(Dist.CLIENT)
|
||||||
|
private Vec3d getCartOffset(float partialTicks, Entity ridingEntity) {
|
||||||
|
AbstractMinecartEntity cart = (AbstractMinecartEntity) ridingEntity;
|
||||||
|
double cartX = MathHelper.lerp(partialTicks, cart.lastTickPosX, cart.getX());
|
||||||
|
double cartY = MathHelper.lerp(partialTicks, cart.lastTickPosY, cart.getY());
|
||||||
|
double cartZ = MathHelper.lerp(partialTicks, cart.lastTickPosZ, cart.getZ());
|
||||||
|
Vec3d cartPos = cart.getPos(cartX, cartY, cartZ);
|
||||||
|
|
||||||
|
if (cartPos != null) {
|
||||||
|
Vec3d cartPosFront = cart.getPosOffset(cartX, cartY, cartZ, (double) 0.3F);
|
||||||
|
Vec3d cartPosBack = cart.getPosOffset(cartX, cartY, cartZ, (double) -0.3F);
|
||||||
|
if (cartPosFront == null)
|
||||||
|
cartPosFront = cartPos;
|
||||||
|
if (cartPosBack == null)
|
||||||
|
cartPosBack = cartPos;
|
||||||
|
|
||||||
|
cartX = cartPos.x - cartX;
|
||||||
|
cartY = (cartPosFront.y + cartPosBack.y) / 2.0D - cartY;
|
||||||
|
cartZ = cartPos.z - cartZ;
|
||||||
|
|
||||||
|
return new Vec3d(cartX, cartY, cartZ);
|
||||||
|
}
|
||||||
|
|
||||||
|
return Vec3d.ZERO;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,16 +1,9 @@
|
||||||
package com.simibubi.create.content.contraptions.components.structureMovement;
|
package com.simibubi.create.content.contraptions.components.structureMovement;
|
||||||
|
|
||||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
|
||||||
import com.simibubi.create.foundation.utility.MatrixStacker;
|
|
||||||
|
|
||||||
import net.minecraft.client.renderer.culling.ClippingHelperImpl;
|
import net.minecraft.client.renderer.culling.ClippingHelperImpl;
|
||||||
import net.minecraft.client.renderer.entity.EntityRendererManager;
|
import net.minecraft.client.renderer.entity.EntityRendererManager;
|
||||||
import net.minecraft.entity.Entity;
|
|
||||||
import net.minecraft.entity.item.minecart.AbstractMinecartEntity;
|
|
||||||
import net.minecraft.util.math.MathHelper;
|
|
||||||
import net.minecraft.util.math.Vec3d;
|
|
||||||
|
|
||||||
public class OrientedContraptionEntityRenderer extends AbstractContraptionEntityRenderer<OrientedContraptionEntity> {
|
public class OrientedContraptionEntityRenderer extends ContraptionEntityRenderer<OrientedContraptionEntity> {
|
||||||
|
|
||||||
public OrientedContraptionEntityRenderer(EntityRendererManager p_i46179_1_) {
|
public OrientedContraptionEntityRenderer(EntityRendererManager p_i46179_1_) {
|
||||||
super(p_i46179_1_);
|
super(p_i46179_1_);
|
||||||
|
@ -26,71 +19,4 @@ public class OrientedContraptionEntityRenderer extends AbstractContraptionEntity
|
||||||
return false;
|
return false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void transform(OrientedContraptionEntity entity, float partialTicks, MatrixStack[] matrixStacks) {
|
|
||||||
float angleInitialYaw = entity.getInitialYaw();
|
|
||||||
float angleYaw = entity.getYaw(partialTicks);
|
|
||||||
float anglePitch = entity.getPitch(partialTicks);
|
|
||||||
|
|
||||||
for (MatrixStack stack : matrixStacks)
|
|
||||||
stack.translate(-.5f, 0, -.5f);
|
|
||||||
|
|
||||||
Entity ridingEntity = entity.getRidingEntity();
|
|
||||||
if (ridingEntity instanceof AbstractMinecartEntity)
|
|
||||||
repositionOnCart(partialTicks, matrixStacks, ridingEntity);
|
|
||||||
if (ridingEntity instanceof AbstractContraptionEntity) {
|
|
||||||
if (ridingEntity.getRidingEntity() instanceof AbstractMinecartEntity)
|
|
||||||
repositionOnCart(partialTicks, matrixStacks, ridingEntity.getRidingEntity());
|
|
||||||
else
|
|
||||||
repositionOnContraption(entity, partialTicks, matrixStacks, ridingEntity);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (MatrixStack stack : matrixStacks)
|
|
||||||
MatrixStacker.of(stack)
|
|
||||||
.nudge(entity.getEntityId())
|
|
||||||
.centre()
|
|
||||||
.rotateY(angleYaw)
|
|
||||||
.rotateZ(anglePitch)
|
|
||||||
.rotateY(angleInitialYaw)
|
|
||||||
.unCentre();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void repositionOnContraption(OrientedContraptionEntity entity, float partialTicks,
|
|
||||||
MatrixStack[] matrixStacks, Entity ridingEntity) {
|
|
||||||
AbstractContraptionEntity parent = (AbstractContraptionEntity) ridingEntity;
|
|
||||||
Vec3d passengerPosition = parent.getPassengerPosition(entity, partialTicks);
|
|
||||||
double x = passengerPosition.x - MathHelper.lerp(partialTicks, entity.lastTickPosX, entity.getX());
|
|
||||||
double y = passengerPosition.y - MathHelper.lerp(partialTicks, entity.lastTickPosY, entity.getY());
|
|
||||||
double z = passengerPosition.z - MathHelper.lerp(partialTicks, entity.lastTickPosZ, entity.getZ());
|
|
||||||
for (MatrixStack stack : matrixStacks)
|
|
||||||
stack.translate(x, y, z);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Minecarts do not always render at their exact location, so the contraption
|
|
||||||
// has to adjust aswell
|
|
||||||
private void repositionOnCart(float partialTicks, MatrixStack[] matrixStacks, Entity ridingEntity) {
|
|
||||||
AbstractMinecartEntity cart = (AbstractMinecartEntity) ridingEntity;
|
|
||||||
double cartX = MathHelper.lerp(partialTicks, cart.lastTickPosX, cart.getX());
|
|
||||||
double cartY = MathHelper.lerp(partialTicks, cart.lastTickPosY, cart.getY());
|
|
||||||
double cartZ = MathHelper.lerp(partialTicks, cart.lastTickPosZ, cart.getZ());
|
|
||||||
Vec3d cartPos = cart.getPos(cartX, cartY, cartZ);
|
|
||||||
|
|
||||||
if (cartPos != null) {
|
|
||||||
Vec3d cartPosFront = cart.getPosOffset(cartX, cartY, cartZ, (double) 0.3F);
|
|
||||||
Vec3d cartPosBack = cart.getPosOffset(cartX, cartY, cartZ, (double) -0.3F);
|
|
||||||
if (cartPosFront == null)
|
|
||||||
cartPosFront = cartPos;
|
|
||||||
if (cartPosBack == null)
|
|
||||||
cartPosBack = cartPos;
|
|
||||||
|
|
||||||
cartX = cartPos.x - cartX;
|
|
||||||
cartY = (cartPosFront.y + cartPosBack.y) / 2.0D - cartY;
|
|
||||||
cartZ = cartPos.z - cartZ;
|
|
||||||
|
|
||||||
for (MatrixStack stack : matrixStacks)
|
|
||||||
stack.translate(cartX, cartY, cartZ);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,9 +3,10 @@ package com.simibubi.create.content.contraptions.components.structureMovement.be
|
||||||
import org.apache.commons.lang3.tuple.Pair;
|
import org.apache.commons.lang3.tuple.Pair;
|
||||||
|
|
||||||
import com.simibubi.create.AllTags.AllBlockTags;
|
import com.simibubi.create.AllTags.AllBlockTags;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionType;
|
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.AssemblyException;
|
import com.simibubi.create.content.contraptions.components.structureMovement.AssemblyException;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.Contraption;
|
import com.simibubi.create.content.contraptions.components.structureMovement.Contraption;
|
||||||
|
import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionLighter;
|
||||||
|
import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionType;
|
||||||
|
|
||||||
import net.minecraft.nbt.CompoundNBT;
|
import net.minecraft.nbt.CompoundNBT;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
@ -13,6 +14,8 @@ import net.minecraft.util.Direction;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraft.world.gen.feature.template.Template.BlockInfo;
|
import net.minecraft.world.gen.feature.template.Template.BlockInfo;
|
||||||
|
import net.minecraftforge.api.distmarker.Dist;
|
||||||
|
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||||
|
|
||||||
public class BearingContraption extends Contraption {
|
public class BearingContraption extends Contraption {
|
||||||
|
|
||||||
|
@ -90,4 +93,9 @@ public class BearingContraption extends Contraption {
|
||||||
return facing.getAxis() == this.facing.getAxis();
|
return facing.getAxis() == this.facing.getAxis();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@OnlyIn(Dist.CLIENT)
|
||||||
|
@Override
|
||||||
|
public ContraptionLighter<?> makeLighter() {
|
||||||
|
return new BearingLighter(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,55 @@
|
||||||
|
package com.simibubi.create.content.contraptions.components.structureMovement.bearing;
|
||||||
|
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionLighter;
|
||||||
|
import com.simibubi.create.foundation.render.backend.light.GridAlignedBB;
|
||||||
|
|
||||||
|
import net.minecraft.util.Direction;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
|
||||||
|
public class BearingLighter extends ContraptionLighter<BearingContraption> {
|
||||||
|
|
||||||
|
public BearingLighter(BearingContraption contraption) {
|
||||||
|
super(contraption);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public GridAlignedBB getContraptionBounds() {
|
||||||
|
Set<BlockPos> blocks = contraption.getBlocks().keySet();
|
||||||
|
|
||||||
|
Direction orientation = contraption.facing;
|
||||||
|
|
||||||
|
float maxDistanceSq = -1;
|
||||||
|
for (BlockPos pos : blocks) {
|
||||||
|
float x = pos.getX();
|
||||||
|
float y = pos.getY();
|
||||||
|
float z = pos.getZ();
|
||||||
|
|
||||||
|
float distSq = x * x + y * y + z * z;
|
||||||
|
|
||||||
|
if (distSq > maxDistanceSq) maxDistanceSq = distSq;
|
||||||
|
}
|
||||||
|
|
||||||
|
int radius = (int) (Math.ceil(Math.sqrt(maxDistanceSq)));
|
||||||
|
|
||||||
|
GridAlignedBB betterBounds = GridAlignedBB.ofRadius(radius);
|
||||||
|
GridAlignedBB contraptionBounds = GridAlignedBB.fromAABB(contraption.bounds);
|
||||||
|
|
||||||
|
Direction.Axis axis = orientation.getAxis();
|
||||||
|
|
||||||
|
if (axis == Direction.Axis.X) {
|
||||||
|
betterBounds.maxX = contraptionBounds.maxX;
|
||||||
|
betterBounds.minX = contraptionBounds.minX;
|
||||||
|
} else if (axis == Direction.Axis.Y) {
|
||||||
|
betterBounds.maxY = contraptionBounds.maxY;
|
||||||
|
betterBounds.minY = contraptionBounds.minY;
|
||||||
|
} else if (axis == Direction.Axis.Z) {
|
||||||
|
betterBounds.maxZ = contraptionBounds.maxZ;
|
||||||
|
betterBounds.minZ = contraptionBounds.minZ;
|
||||||
|
}
|
||||||
|
|
||||||
|
betterBounds.translate(contraption.anchor);
|
||||||
|
return betterBounds;
|
||||||
|
}
|
||||||
|
}
|
|
@ -4,8 +4,8 @@ import com.mojang.blaze3d.matrix.MatrixStack;
|
||||||
import com.simibubi.create.AllBlockPartials;
|
import com.simibubi.create.AllBlockPartials;
|
||||||
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
||||||
import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer;
|
import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer;
|
||||||
|
import com.simibubi.create.foundation.render.SuperByteBuffer;
|
||||||
import com.simibubi.create.foundation.utility.AngleHelper;
|
import com.simibubi.create.foundation.utility.AngleHelper;
|
||||||
import com.simibubi.create.foundation.utility.SuperByteBuffer;
|
|
||||||
|
|
||||||
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
||||||
import net.minecraft.client.renderer.RenderType;
|
import net.minecraft.client.renderer.RenderType;
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
package com.simibubi.create.content.contraptions.components.structureMovement.bearing;
|
package com.simibubi.create.content.contraptions.components.structureMovement.bearing;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.tuple.Pair;
|
||||||
|
|
||||||
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.AbstractContraptionEntity;
|
import com.simibubi.create.content.contraptions.components.structureMovement.AbstractContraptionEntity;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.AssemblyException;
|
import com.simibubi.create.content.contraptions.components.structureMovement.AssemblyException;
|
||||||
|
@ -14,6 +18,7 @@ import com.simibubi.create.foundation.tileEntity.behaviour.scrollvalue.ScrollOpt
|
||||||
import com.simibubi.create.foundation.utility.AngleHelper;
|
import com.simibubi.create.foundation.utility.AngleHelper;
|
||||||
import com.simibubi.create.foundation.utility.Lang;
|
import com.simibubi.create.foundation.utility.Lang;
|
||||||
import com.simibubi.create.foundation.utility.ServerSpeedProvider;
|
import com.simibubi.create.foundation.utility.ServerSpeedProvider;
|
||||||
|
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.nbt.CompoundNBT;
|
import net.minecraft.nbt.CompoundNBT;
|
||||||
import net.minecraft.state.properties.BlockStateProperties;
|
import net.minecraft.state.properties.BlockStateProperties;
|
||||||
|
@ -22,9 +27,6 @@ import net.minecraft.util.Direction;
|
||||||
import net.minecraft.util.Direction.Axis;
|
import net.minecraft.util.Direction.Axis;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.util.math.MathHelper;
|
import net.minecraft.util.math.MathHelper;
|
||||||
import org.apache.commons.lang3.tuple.Pair;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class ClockworkBearingTileEntity extends KineticTileEntity implements IBearingTileEntity, IDisplayAssemblyExceptions {
|
public class ClockworkBearingTileEntity extends KineticTileEntity implements IBearingTileEntity, IDisplayAssemblyExceptions {
|
||||||
|
|
||||||
|
@ -408,4 +410,8 @@ public class ClockworkBearingTileEntity extends KineticTileEntity implements IBe
|
||||||
return pos;
|
return pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean shouldRenderAsTE() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue