mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-11-10 12:33:57 +01:00
Merge branch 'mc1.15/dev' into mc1.16/dev
This commit is contained in:
commit
4ee9dd8a8a
22
build.gradle
22
build.gradle
@ -3,9 +3,11 @@ buildscript {
|
||||
maven { url = 'https://files.minecraftforge.net/maven' }
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
maven { url='https://dist.creeper.host/Sponge/maven' }
|
||||
}
|
||||
dependencies {
|
||||
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true
|
||||
classpath group: 'org.spongepowered', name: 'mixingradle', version: '0.7-SNAPSHOT'
|
||||
}
|
||||
}
|
||||
plugins {
|
||||
@ -35,6 +37,9 @@ minecraft {
|
||||
runs {
|
||||
client {
|
||||
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 'fml.earlyprogresswindow', 'false'
|
||||
mods {
|
||||
@ -46,6 +51,8 @@ minecraft {
|
||||
|
||||
server {
|
||||
workingDirectory project.file('run/server')
|
||||
// property 'mixin.env.disableRefMap', 'true'
|
||||
arg '-mixin.config=create.mixins.json'
|
||||
property 'forge.logging.console.level', 'info'
|
||||
mods {
|
||||
create {
|
||||
@ -113,15 +120,17 @@ dependencies {
|
||||
shade registrate
|
||||
|
||||
// compile against the JEI API but do not include it at runtime
|
||||
compileOnly fg.deobf("mezz.jei:jei-${minecraft_version}:${jei_version}:api")
|
||||
compileOnly fg.deobf("mezz.jei:jei-1.16.4:${jei_version}:api")
|
||||
// at runtime, use the full JEI jar
|
||||
runtimeOnly fg.deobf("mezz.jei:jei-${minecraft_version}:${jei_version}")
|
||||
runtimeOnly fg.deobf("mezz.jei:jei-1.16.4:${jei_version}")
|
||||
|
||||
// i'll leave this here commented for easier testing
|
||||
//runtimeOnly fg.deobf("vazkii.arl:AutoRegLib:1.4-35.69")
|
||||
//runtimeOnly fg.deobf("vazkii.quark:Quark:r2.0-212.984")
|
||||
// runtimeOnly fg.deobf("slimeknights.mantle:Mantle:1.16.3-1.6.40")
|
||||
// runtimeOnly fg.deobf("slimeknights.tconstruct:TConstruct:1.16.3-3.0.1.24")
|
||||
|
||||
annotationProcessor 'org.spongepowered:mixin:0.8:processor'
|
||||
}
|
||||
|
||||
jar {
|
||||
@ -134,7 +143,8 @@ jar {
|
||||
"Implementation-Title": project.name,
|
||||
"Implementation-Version": "${version}",
|
||||
"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"
|
||||
])
|
||||
}
|
||||
}
|
||||
@ -203,3 +213,9 @@ curseforge {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: 'org.spongepowered.mixin'
|
||||
|
||||
mixin {
|
||||
add sourceSets.main, "create.refmap.json"
|
||||
}
|
@ -5,12 +5,12 @@ org.gradle.daemon=false
|
||||
|
||||
# mod version info
|
||||
mod_version=0.3.1
|
||||
minecraft_version=1.16.3
|
||||
forge_version=34.1.17
|
||||
minecraft_version=1.16.5
|
||||
forge_version=36.0.42
|
||||
|
||||
# dependency versions
|
||||
registrate_version=1.0.0-beta.33
|
||||
jei_version=7.6.0.45
|
||||
jei_version=7.6.1.71
|
||||
|
||||
# curseforge information
|
||||
projectId=328085
|
||||
|
@ -16,7 +16,7 @@ da63a8be3191d6d72afef6c79e3aea3f607631f9 assets/create/blockstates/andesite_bric
|
||||
96b5284693da168ab8e0809d86515b5f1a7e763f assets/create/blockstates/andesite_cobblestone_stairs.json
|
||||
a92c395c57209141d4cf78ad62facbaf3878a120 assets/create/blockstates/andesite_cobblestone_wall.json
|
||||
9639b901ffdd2ecccab5575c5c9e6c7b5c901e02 assets/create/blockstates/andesite_encased_shaft.json
|
||||
7187eba21a32e6954261cc71008ec1834a2e8af7 assets/create/blockstates/andesite_funnel.json
|
||||
1ecbef2322e05c8f3e0fb9842edf3abfbf4bff78 assets/create/blockstates/andesite_funnel.json
|
||||
398922758a6219544e5b85c91c9cf8a543b437e5 assets/create/blockstates/andesite_pillar.json
|
||||
1d2d8081581e07d9be4b382aede4f2de4401cc6b assets/create/blockstates/andesite_tunnel.json
|
||||
e555e3c2b2d3f01440e48db4ba88f7e00fd99b6f assets/create/blockstates/basin.json
|
||||
@ -34,7 +34,7 @@ ee1299a15fca849eb42bf81507f85a54c167bbfe assets/create/blockstates/brass_belt_fu
|
||||
8b1dd00adcc7e74c5a9feed069e2610b15a338cb assets/create/blockstates/brass_block.json
|
||||
b8dd6e505943e06706d0718ece620ab3cf943650 assets/create/blockstates/brass_casing.json
|
||||
288bad07593a8a2c8efaf44bba0ffb0011d36cd3 assets/create/blockstates/brass_encased_shaft.json
|
||||
8b5e88dea4e10ba3c74f0f161e49fed31a376ea1 assets/create/blockstates/brass_funnel.json
|
||||
94ffc190ae017e9401f7966e8b2f6a643406af9d assets/create/blockstates/brass_funnel.json
|
||||
672eedcd3520c6d39603449165a23be9c612c620 assets/create/blockstates/brass_tunnel.json
|
||||
11ebdd9bd0815833e62ec1bea03a4cdd86ce00f3 assets/create/blockstates/brown_sail.json
|
||||
e81608346d43406ee72cae0f78b8bcfb37ba2d75 assets/create/blockstates/brown_seat.json
|
||||
@ -142,7 +142,7 @@ fc652317e03b57c76e23a805da16a28d15254029 assets/create/blockstates/fancy_scoria_
|
||||
fc9ac0a7e7191b93516719455a17177fa6524ecc assets/create/blockstates/fancy_weathered_limestone_bricks_slab.json
|
||||
b2a7c321b1795f20e7433f81a55ce4683de081b8 assets/create/blockstates/fancy_weathered_limestone_bricks_stairs.json
|
||||
8e532856c3c2b4e4e59c65a2a81a694e35d14658 assets/create/blockstates/fancy_weathered_limestone_bricks_wall.json
|
||||
5ba9fc9e7b29c76040329367cfb45affdd473404 assets/create/blockstates/fluid_pipe.json
|
||||
65f5fa4b779af5150993b20174404ec93bfc4303 assets/create/blockstates/fluid_pipe.json
|
||||
f0eaab18e16c4f3f65ebf3b55b08f0dc445720fe assets/create/blockstates/fluid_tank.json
|
||||
5408d92ab02af86539ac42971d4033545970bb3a assets/create/blockstates/fluid_valve.json
|
||||
e9da1794b6ece7f9aa8bcb43d42c23a55446133b assets/create/blockstates/flywheel.json
|
||||
@ -339,7 +339,7 @@ e8b0a401c10d1ba67ed71ba31bd5f9bc28571b65 assets/create/blockstates/powered_toggl
|
||||
d06cd9a1101b18d306a786320aab12018b1325d6 assets/create/blockstates/purple_sail.json
|
||||
92957119abd5fbcca36a113b2a80255fd70fc303 assets/create/blockstates/purple_seat.json
|
||||
61035f8afe75ff7bbd291da5d8690bcbebe679eb assets/create/blockstates/purple_valve_handle.json
|
||||
5d1b30c2bab556f57c78e7780fd445b08f541a50 assets/create/blockstates/radial_chassis.json
|
||||
4439fc83a8c7370ab44b211a3fd48abde20a4728 assets/create/blockstates/radial_chassis.json
|
||||
45877c4d90a7185c2f304edbd67379d800920439 assets/create/blockstates/red_sail.json
|
||||
da1b08387af7afa0855ee8d040f620c01f20660a assets/create/blockstates/red_seat.json
|
||||
722fc77bbf387af8a4016e42cbf9501d2b968881 assets/create/blockstates/red_valve_handle.json
|
||||
@ -405,18 +405,18 @@ a3a11524cd3515fc01d905767b4b7ea782adaf03 assets/create/blockstates/yellow_seat.j
|
||||
7f39521b211441f5c3e06d60c5978cebe16cacfb assets/create/blockstates/zinc_block.json
|
||||
b7181bcd8182b2f17088e5aa881f374c9c65470c assets/create/blockstates/zinc_ore.json
|
||||
374efe0548d096c895b0159c0a3895e5f66d50c9 assets/create/lang/en_ud.json
|
||||
f16ca476b8e175891d79944ad15458a12e4cba93 assets/create/lang/en_us.json
|
||||
79e21ff764d265feeaac732cdf46d8e4535a21b5 assets/create/lang/unfinished/de_de.json
|
||||
2bc6cdad04781583f19cf6cc7cd96877695d2273 assets/create/lang/unfinished/es_mx.json
|
||||
f38e6245d630ff903f8d041fb7429ead4656a336 assets/create/lang/unfinished/fr_fr.json
|
||||
cfafdaa6fdeff8aac5b87e87d14351a20424d067 assets/create/lang/unfinished/it_it.json
|
||||
ff045c3f6a3cbf18bdb0fded17277f91a17b70b1 assets/create/lang/unfinished/ja_jp.json
|
||||
b2bc58d0ff53b8cd0299d6924ee6fb93ceef5f49 assets/create/lang/unfinished/ko_kr.json
|
||||
f07eb26e8a9a832cf0ec5dff5aac90f7e1749bee assets/create/lang/unfinished/nl_nl.json
|
||||
8a6279c519748eb8655feac560d38b489afa3c95 assets/create/lang/unfinished/pt_br.json
|
||||
8b205c62a096d9c0bf2c00a9df145cb2ad90337f assets/create/lang/unfinished/ru_ru.json
|
||||
8ed959c95b3b4313112be130453bab6c98bb7e48 assets/create/lang/unfinished/zh_cn.json
|
||||
cc65257838f023b117430a7649821508647a5e23 assets/create/lang/unfinished/zh_tw.json
|
||||
d12a253f7b828645559de9240703048cc6205a8b assets/create/lang/en_us.json
|
||||
7e08b3b4ea68459c27387deafd011e080e2fa0f0 assets/create/lang/unfinished/de_de.json
|
||||
87612bc564ee9daa055bdc8c6e7256832570bccc assets/create/lang/unfinished/es_mx.json
|
||||
09c3469383b62aa6b0d9b04155ec800692a1f9c2 assets/create/lang/unfinished/fr_fr.json
|
||||
007832c1a178891b72b932139d4fb41d287304df assets/create/lang/unfinished/it_it.json
|
||||
e1c39fdb6dfeebb95cb10203b354c8388c39e950 assets/create/lang/unfinished/ja_jp.json
|
||||
7b2a218cda590a40c71500535df2ecb287a60a01 assets/create/lang/unfinished/ko_kr.json
|
||||
1854826cd956a671655bda7d445ace733a9b24f5 assets/create/lang/unfinished/nl_nl.json
|
||||
a624826a11d5cc0534499dd52ecbdc41d390e8b3 assets/create/lang/unfinished/pt_br.json
|
||||
97b47bc6ad8906b07f4058c7af377b229c2f2750 assets/create/lang/unfinished/ru_ru.json
|
||||
3d2f594bd2043045b12f8944eac9913273186115 assets/create/lang/unfinished/zh_cn.json
|
||||
95e01c10891fa6d779c4a52adf9d5d5461435dbe assets/create/lang/unfinished/zh_tw.json
|
||||
487a511a01b2a4531fb672f917922312db78f958 assets/create/models/block/acacia_window.json
|
||||
b48060cba1a382f373a05bf0039054053eccf076 assets/create/models/block/acacia_window_pane_noside.json
|
||||
3066db1bf03cffa1a9c7fbacf47ae586632f4eb3 assets/create/models/block/acacia_window_pane_noside_alt.json
|
||||
|
@ -61,9 +61,9 @@
|
||||
{
|
||||
"when": {
|
||||
"up": "true",
|
||||
"down": "false",
|
||||
"north": "true",
|
||||
"south": "false",
|
||||
"north": "true"
|
||||
"down": "false"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/lu_x"
|
||||
@ -72,9 +72,9 @@
|
||||
{
|
||||
"when": {
|
||||
"up": "true",
|
||||
"down": "false",
|
||||
"north": "false",
|
||||
"south": "true",
|
||||
"north": "false"
|
||||
"down": "false"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/ru_x"
|
||||
@ -83,9 +83,9 @@
|
||||
{
|
||||
"when": {
|
||||
"up": "false",
|
||||
"down": "true",
|
||||
"north": "true",
|
||||
"south": "false",
|
||||
"north": "true"
|
||||
"down": "true"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/ld_x"
|
||||
@ -94,9 +94,9 @@
|
||||
{
|
||||
"when": {
|
||||
"up": "false",
|
||||
"down": "true",
|
||||
"north": "false",
|
||||
"south": "true",
|
||||
"north": "false"
|
||||
"down": "true"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/rd_x"
|
||||
@ -105,9 +105,9 @@
|
||||
{
|
||||
"when": {
|
||||
"up": "true",
|
||||
"down": "true",
|
||||
"north": "false",
|
||||
"south": "false",
|
||||
"north": "false"
|
||||
"down": "true"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/ud_x"
|
||||
@ -116,9 +116,9 @@
|
||||
{
|
||||
"when": {
|
||||
"up": "true",
|
||||
"down": "false",
|
||||
"north": "false",
|
||||
"south": "false",
|
||||
"north": "false"
|
||||
"down": "false"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/ud_x"
|
||||
@ -127,9 +127,9 @@
|
||||
{
|
||||
"when": {
|
||||
"up": "false",
|
||||
"down": "true",
|
||||
"north": "false",
|
||||
"south": "false",
|
||||
"north": "false"
|
||||
"down": "true"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/ud_x"
|
||||
@ -138,9 +138,9 @@
|
||||
{
|
||||
"when": {
|
||||
"up": "false",
|
||||
"down": "false",
|
||||
"north": "true",
|
||||
"south": "true",
|
||||
"north": "true"
|
||||
"down": "false"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/lr_x"
|
||||
@ -149,9 +149,9 @@
|
||||
{
|
||||
"when": {
|
||||
"up": "false",
|
||||
"down": "false",
|
||||
"north": "true",
|
||||
"south": "false",
|
||||
"north": "true"
|
||||
"down": "false"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/lr_x"
|
||||
@ -160,9 +160,9 @@
|
||||
{
|
||||
"when": {
|
||||
"up": "false",
|
||||
"down": "false",
|
||||
"north": "false",
|
||||
"south": "true",
|
||||
"north": "false"
|
||||
"down": "false"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/lr_x"
|
||||
@ -171,9 +171,9 @@
|
||||
{
|
||||
"when": {
|
||||
"up": "false",
|
||||
"down": "false",
|
||||
"north": "false",
|
||||
"south": "false",
|
||||
"north": "false"
|
||||
"down": "false"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/none_x"
|
||||
@ -181,10 +181,10 @@
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"west": "true",
|
||||
"south": "true",
|
||||
"north": "false",
|
||||
"east": "false"
|
||||
"west": "true",
|
||||
"east": "false",
|
||||
"north": "false"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/lu_y"
|
||||
@ -192,10 +192,10 @@
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"west": "false",
|
||||
"south": "true",
|
||||
"north": "false",
|
||||
"east": "true"
|
||||
"west": "false",
|
||||
"east": "true",
|
||||
"north": "false"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/ru_y"
|
||||
@ -203,10 +203,10 @@
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"west": "true",
|
||||
"south": "false",
|
||||
"north": "true",
|
||||
"east": "false"
|
||||
"west": "true",
|
||||
"east": "false",
|
||||
"north": "true"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/ld_y"
|
||||
@ -214,10 +214,10 @@
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"west": "false",
|
||||
"south": "false",
|
||||
"north": "true",
|
||||
"east": "true"
|
||||
"west": "false",
|
||||
"east": "true",
|
||||
"north": "true"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/rd_y"
|
||||
@ -225,10 +225,10 @@
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"west": "false",
|
||||
"south": "true",
|
||||
"north": "true",
|
||||
"east": "false"
|
||||
"west": "false",
|
||||
"east": "false",
|
||||
"north": "true"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/ud_y"
|
||||
@ -236,10 +236,10 @@
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"west": "false",
|
||||
"south": "true",
|
||||
"north": "false",
|
||||
"east": "false"
|
||||
"west": "false",
|
||||
"east": "false",
|
||||
"north": "false"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/ud_y"
|
||||
@ -247,10 +247,10 @@
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"west": "false",
|
||||
"south": "false",
|
||||
"north": "true",
|
||||
"east": "false"
|
||||
"west": "false",
|
||||
"east": "false",
|
||||
"north": "true"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/ud_y"
|
||||
@ -258,10 +258,10 @@
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"south": "false",
|
||||
"west": "true",
|
||||
"south": "false",
|
||||
"north": "false",
|
||||
"east": "true"
|
||||
"east": "true",
|
||||
"north": "false"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/lr_y"
|
||||
@ -269,10 +269,10 @@
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"south": "false",
|
||||
"west": "true",
|
||||
"south": "false",
|
||||
"north": "false",
|
||||
"east": "false"
|
||||
"east": "false",
|
||||
"north": "false"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/lr_y"
|
||||
@ -280,10 +280,10 @@
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"west": "false",
|
||||
"south": "false",
|
||||
"north": "false",
|
||||
"east": "true"
|
||||
"west": "false",
|
||||
"east": "true",
|
||||
"north": "false"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/lr_y"
|
||||
@ -291,10 +291,10 @@
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"west": "false",
|
||||
"south": "false",
|
||||
"north": "false",
|
||||
"east": "false"
|
||||
"west": "false",
|
||||
"east": "false",
|
||||
"north": "false"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/none_y"
|
||||
@ -303,9 +303,9 @@
|
||||
{
|
||||
"when": {
|
||||
"up": "true",
|
||||
"east": "true",
|
||||
"west": "false",
|
||||
"down": "false",
|
||||
"east": "true"
|
||||
"down": "false"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/lu_z"
|
||||
@ -314,9 +314,9 @@
|
||||
{
|
||||
"when": {
|
||||
"up": "true",
|
||||
"east": "false",
|
||||
"west": "true",
|
||||
"down": "false",
|
||||
"east": "false"
|
||||
"down": "false"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/ru_z"
|
||||
@ -325,9 +325,9 @@
|
||||
{
|
||||
"when": {
|
||||
"up": "false",
|
||||
"east": "true",
|
||||
"west": "false",
|
||||
"down": "true",
|
||||
"east": "true"
|
||||
"down": "true"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/ld_z"
|
||||
@ -336,9 +336,9 @@
|
||||
{
|
||||
"when": {
|
||||
"up": "false",
|
||||
"east": "false",
|
||||
"west": "true",
|
||||
"down": "true",
|
||||
"east": "false"
|
||||
"down": "true"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/rd_z"
|
||||
@ -347,9 +347,9 @@
|
||||
{
|
||||
"when": {
|
||||
"up": "true",
|
||||
"east": "false",
|
||||
"west": "false",
|
||||
"down": "true",
|
||||
"east": "false"
|
||||
"down": "true"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/ud_z"
|
||||
@ -358,9 +358,9 @@
|
||||
{
|
||||
"when": {
|
||||
"up": "true",
|
||||
"east": "false",
|
||||
"west": "false",
|
||||
"down": "false",
|
||||
"east": "false"
|
||||
"down": "false"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/ud_z"
|
||||
@ -369,9 +369,9 @@
|
||||
{
|
||||
"when": {
|
||||
"up": "false",
|
||||
"east": "false",
|
||||
"west": "false",
|
||||
"down": "true",
|
||||
"east": "false"
|
||||
"down": "true"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/ud_z"
|
||||
@ -380,9 +380,9 @@
|
||||
{
|
||||
"when": {
|
||||
"up": "false",
|
||||
"east": "true",
|
||||
"west": "true",
|
||||
"down": "false",
|
||||
"east": "true"
|
||||
"down": "false"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/lr_z"
|
||||
@ -391,9 +391,9 @@
|
||||
{
|
||||
"when": {
|
||||
"up": "false",
|
||||
"east": "true",
|
||||
"west": "false",
|
||||
"down": "false",
|
||||
"east": "true"
|
||||
"down": "false"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/lr_z"
|
||||
@ -402,9 +402,9 @@
|
||||
{
|
||||
"when": {
|
||||
"up": "false",
|
||||
"east": "false",
|
||||
"west": "true",
|
||||
"down": "false",
|
||||
"east": "false"
|
||||
"down": "false"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/lr_z"
|
||||
@ -413,9 +413,9 @@
|
||||
{
|
||||
"when": {
|
||||
"up": "false",
|
||||
"east": "false",
|
||||
"west": "false",
|
||||
"down": "false",
|
||||
"east": "false"
|
||||
"down": "false"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/none_z"
|
||||
|
@ -89,8 +89,8 @@
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"axis": "x",
|
||||
"sticky_west": "true"
|
||||
"sticky_west": "true",
|
||||
"axis": "x"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/radial_chassis_side_x_sticky",
|
||||
@ -99,8 +99,8 @@
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"axis": "y",
|
||||
"sticky_west": "true"
|
||||
"sticky_west": "true",
|
||||
"axis": "y"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/radial_chassis_side_y_sticky",
|
||||
@ -109,8 +109,8 @@
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"axis": "z",
|
||||
"sticky_west": "true"
|
||||
"sticky_west": "true",
|
||||
"axis": "z"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/radial_chassis_side_z_sticky",
|
||||
@ -119,8 +119,8 @@
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"axis": "x",
|
||||
"sticky_west": "false"
|
||||
"sticky_west": "false",
|
||||
"axis": "x"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/radial_chassis_side_x",
|
||||
@ -129,8 +129,8 @@
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"axis": "y",
|
||||
"sticky_west": "false"
|
||||
"sticky_west": "false",
|
||||
"axis": "y"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/radial_chassis_side_y",
|
||||
@ -139,8 +139,8 @@
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"axis": "z",
|
||||
"sticky_west": "false"
|
||||
"sticky_west": "false",
|
||||
"axis": "z"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/radial_chassis_side_z",
|
||||
@ -149,8 +149,8 @@
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"axis": "x",
|
||||
"sticky_north": "true"
|
||||
"sticky_north": "true",
|
||||
"axis": "x"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/radial_chassis_side_x_sticky"
|
||||
@ -158,8 +158,8 @@
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"axis": "y",
|
||||
"sticky_north": "true"
|
||||
"sticky_north": "true",
|
||||
"axis": "y"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/radial_chassis_side_y_sticky",
|
||||
@ -168,8 +168,8 @@
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"axis": "z",
|
||||
"sticky_north": "true"
|
||||
"sticky_north": "true",
|
||||
"axis": "z"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/radial_chassis_side_x_sticky",
|
||||
@ -178,8 +178,8 @@
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"axis": "x",
|
||||
"sticky_north": "false"
|
||||
"sticky_north": "false",
|
||||
"axis": "x"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/radial_chassis_side_x"
|
||||
@ -187,8 +187,8 @@
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"axis": "y",
|
||||
"sticky_north": "false"
|
||||
"sticky_north": "false",
|
||||
"axis": "y"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/radial_chassis_side_y",
|
||||
@ -197,8 +197,8 @@
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"axis": "z",
|
||||
"sticky_north": "false"
|
||||
"sticky_north": "false",
|
||||
"axis": "z"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/radial_chassis_side_x",
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"_": "Missing Localizations: 1099",
|
||||
"_": "Missing Localizations: 1105",
|
||||
|
||||
"_": "->------------------------] Game Elements [------------------------<-",
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"_": "Missing Localizations: 886",
|
||||
"_": "Missing Localizations: 892",
|
||||
|
||||
"_": "->------------------------] Game Elements [------------------------<-",
|
||||
|
||||
@ -827,6 +827,12 @@
|
||||
"create.gui.goggles.kinetic_stats": "UNLOCALIZED: Kinetic Stats:",
|
||||
"create.gui.goggles.at_current_speed": "UNLOCALIZED: at current speed",
|
||||
"create.gui.goggles.pole_length": "UNLOCALIZED: Pole Length:",
|
||||
"create.gui.assembly.exception": "UNLOCALIZED: This Contraption was unable to assemble:",
|
||||
"create.gui.assembly.exception.unmovableBlock": "UNLOCALIZED: Unmovable Block (%4$s) at [%1$s %2$s %3$s]",
|
||||
"create.gui.assembly.exception.chunkNotLoaded": "UNLOCALIZED: The Block at [%1$s %2$s %3$s] was not in a loaded chunk",
|
||||
"create.gui.assembly.exception.structureTooLarge": "UNLOCALIZED: There are too many Blocks included in the contraption.\nThe configured maximum is: %1$s",
|
||||
"create.gui.assembly.exception.tooManyPistonPoles": "UNLOCALIZED: There are too many extension Poles attached to this Piston.\nThe configured maximum is: %1$s",
|
||||
"create.gui.assembly.exception.noPistonPoles": "UNLOCALIZED: The Piston is missing some extension Poles",
|
||||
"create.gui.gauge.info_header": "UNLOCALIZED: Gauge Information:",
|
||||
"create.gui.speedometer.title": "UNLOCALIZED: Rotation Speed",
|
||||
"create.gui.stressometer.title": "UNLOCALIZED: Network Stress",
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"_": "Missing Localizations: 670",
|
||||
"_": "Missing Localizations: 676",
|
||||
|
||||
"_": "->------------------------] Game Elements [------------------------<-",
|
||||
|
||||
@ -827,6 +827,12 @@
|
||||
"create.gui.goggles.kinetic_stats": "Statistiques cinétiques:",
|
||||
"create.gui.goggles.at_current_speed": "À la vitesse actuelle",
|
||||
"create.gui.goggles.pole_length": "Longueur de la barre",
|
||||
"create.gui.assembly.exception": "UNLOCALIZED: This Contraption was unable to assemble:",
|
||||
"create.gui.assembly.exception.unmovableBlock": "UNLOCALIZED: Unmovable Block (%4$s) at [%1$s %2$s %3$s]",
|
||||
"create.gui.assembly.exception.chunkNotLoaded": "UNLOCALIZED: The Block at [%1$s %2$s %3$s] was not in a loaded chunk",
|
||||
"create.gui.assembly.exception.structureTooLarge": "UNLOCALIZED: There are too many Blocks included in the contraption.\nThe configured maximum is: %1$s",
|
||||
"create.gui.assembly.exception.tooManyPistonPoles": "UNLOCALIZED: There are too many extension Poles attached to this Piston.\nThe configured maximum is: %1$s",
|
||||
"create.gui.assembly.exception.noPistonPoles": "UNLOCALIZED: The Piston is missing some extension Poles",
|
||||
"create.gui.gauge.info_header": "Informations sur la jauge:",
|
||||
"create.gui.speedometer.title": "Vitesse de rotation",
|
||||
"create.gui.stressometer.title": "Stress du réseau",
|
||||
|
@ -164,8 +164,8 @@
|
||||
"block.create.gabbro_cobblestone_stairs": "Scalini di pietrisco di gabbro",
|
||||
"block.create.gabbro_cobblestone_wall": "Muretto di pietrisco di gabbro",
|
||||
"block.create.gabbro_pillar": "Pilastro di gabbro",
|
||||
"block.create.gantry_pinion": "UNLOCALIZED: Gantry Pinion",
|
||||
"block.create.gantry_shaft": "UNLOCALIZED: Gantry Shaft",
|
||||
"block.create.gantry_pinion": "Pignone a portale",
|
||||
"block.create.gantry_shaft": "Albero a portale",
|
||||
"block.create.gearbox": "Riduttore",
|
||||
"block.create.gearshift": "Cambio",
|
||||
"block.create.glass_fluid_pipe": "Tubo per fluidi con vetrata",
|
||||
@ -827,6 +827,12 @@
|
||||
"create.gui.goggles.kinetic_stats": "Statistiche cinetiche:",
|
||||
"create.gui.goggles.at_current_speed": "Alla velocità attuale",
|
||||
"create.gui.goggles.pole_length": "Lunghezza palo:",
|
||||
"create.gui.assembly.exception": "UNLOCALIZED: This Contraption was unable to assemble:",
|
||||
"create.gui.assembly.exception.unmovableBlock": "UNLOCALIZED: Unmovable Block (%4$s) at [%1$s %2$s %3$s]",
|
||||
"create.gui.assembly.exception.chunkNotLoaded": "UNLOCALIZED: The Block at [%1$s %2$s %3$s] was not in a loaded chunk",
|
||||
"create.gui.assembly.exception.structureTooLarge": "UNLOCALIZED: There are too many Blocks included in the contraption.\nThe configured maximum is: %1$s",
|
||||
"create.gui.assembly.exception.tooManyPistonPoles": "UNLOCALIZED: There are too many extension Poles attached to this Piston.\nThe configured maximum is: %1$s",
|
||||
"create.gui.assembly.exception.noPistonPoles": "UNLOCALIZED: The Piston is missing some extension Poles",
|
||||
"create.gui.gauge.info_header": "Informazioni sul calibro:",
|
||||
"create.gui.speedometer.title": "Velocità di rotazione",
|
||||
"create.gui.stressometer.title": "Stress della rete",
|
||||
@ -1371,7 +1377,7 @@
|
||||
"item.create.schematic_and_quill.tooltip.condition1": "Passo 1",
|
||||
"item.create.schematic_and_quill.tooltip.behaviour1": "Seleziona due punti d'angolo usando il clic destro.",
|
||||
"item.create.schematic_and_quill.tooltip.condition2": "Passo 2",
|
||||
"item.create.schematic_and_quill.tooltip.behaviour2": "Premi _Ctrl_ e _scorri_ sui volti per regolare le dimensioni. Clic destro di nuovo per salvare.",
|
||||
"item.create.schematic_and_quill.tooltip.behaviour2": "Premi _Ctrl_ e _scorri_ sulle facciate per regolare le dimensioni. Clic destro di nuovo per salvare.",
|
||||
"item.create.schematic_and_quill.tooltip.control1": "Clic-Destro",
|
||||
"item.create.schematic_and_quill.tooltip.action1": "Seleziona un punto d'angolo / conferma il salvataggio.",
|
||||
"item.create.schematic_and_quill.tooltip.control2": "Ctrl premuto",
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"_": "Missing Localizations: 16",
|
||||
"_": "Missing Localizations: 18",
|
||||
|
||||
"_": "->------------------------] Game Elements [------------------------<-",
|
||||
|
||||
@ -151,8 +151,8 @@
|
||||
"block.create.fluid_tank": "液体タンク",
|
||||
"block.create.fluid_valve": "液体バルブ",
|
||||
"block.create.flywheel": "勢車",
|
||||
"block.create.framed_glass": "大きなガラス窓",
|
||||
"block.create.framed_glass_pane": "大きなガラス窓板",
|
||||
"block.create.framed_glass": "ガラス窓",
|
||||
"block.create.framed_glass_pane": "ガラス窓板",
|
||||
"block.create.furnace_engine": "かまどエンジン",
|
||||
"block.create.gabbro": "斑れい岩",
|
||||
"block.create.gabbro_bricks": "斑れい岩レンガ",
|
||||
@ -164,8 +164,8 @@
|
||||
"block.create.gabbro_cobblestone_stairs": "斑れい岩の丸石の階段",
|
||||
"block.create.gabbro_cobblestone_wall": "斑れい岩の丸石の壁",
|
||||
"block.create.gabbro_pillar": "斑れい岩の柱",
|
||||
"block.create.gantry_pinion": "UNLOCALIZED: Gantry Pinion",
|
||||
"block.create.gantry_shaft": "UNLOCALIZED: Gantry Shaft",
|
||||
"block.create.gantry_pinion": "ガントリーピニオン",
|
||||
"block.create.gantry_shaft": "ガントリーシャフト",
|
||||
"block.create.gearbox": "ギアボックス",
|
||||
"block.create.gearshift": "ギアシフト",
|
||||
"block.create.glass_fluid_pipe": "ガラスの液体パイプ",
|
||||
@ -374,13 +374,13 @@
|
||||
"block.create.shaft": "シャフト",
|
||||
"block.create.smart_chute": "スマートシュート",
|
||||
"block.create.smart_fluid_pipe": "スマート液体パイプ",
|
||||
"block.create.speedometer": "スピードメーター",
|
||||
"block.create.speedometer": "速度メーター",
|
||||
"block.create.spout": "アイテム注液口",
|
||||
"block.create.spruce_window": "マツの窓",
|
||||
"block.create.spruce_window_pane": "マツの窓パネル",
|
||||
"block.create.sticky_mechanical_piston": "粘着メカニカルピストン",
|
||||
"block.create.stockpile_switch": "在庫スイッチ",
|
||||
"block.create.stressometer": "ストレスメーター",
|
||||
"block.create.stressometer": "応力メーター",
|
||||
"block.create.tiled_glass": "タイルガラス",
|
||||
"block.create.tiled_glass_pane": "タイルガラス板",
|
||||
"block.create.turntable": "ターンテーブル",
|
||||
@ -411,7 +411,7 @@
|
||||
"block.create.zinc_ore": "亜鉛鉱石",
|
||||
|
||||
"entity.create.contraption": "からくり",
|
||||
"entity.create.gantry_contraption": "UNLOCALIZED: Gantry Contraption",
|
||||
"entity.create.gantry_contraption": "ガントリーからくり",
|
||||
"entity.create.seat": "シート",
|
||||
"entity.create.stationary_contraption": "付設からくり",
|
||||
"entity.create.super_glue": "接着剤",
|
||||
@ -531,9 +531,9 @@
|
||||
"advancement.create.goggles": "応力をこの目で",
|
||||
"advancement.create.goggles.desc": "機械からより多くの情報を手に入れるために、エンジニアのゴーグルを作る",
|
||||
"advancement.create.speedometer": "正確な速度は?",
|
||||
"advancement.create.speedometer.desc": "動作中のスピードメーターをゴーグルで見て、正確な値を読み取る",
|
||||
"advancement.create.speedometer.desc": "動作中の速度メーターをゴーグルで見て、正確な値を読み取る",
|
||||
"advancement.create.stressometer": "正確な応力は?",
|
||||
"advancement.create.stressometer.desc": "動作中のストレスメーターをゴーグルを通して見て、正確な値を読み取る",
|
||||
"advancement.create.stressometer.desc": "動作中の応力メーターをゴーグルを通して見て、正確な値を読み取る",
|
||||
"advancement.create.aesthetics": "装飾ブーム!",
|
||||
"advancement.create.aesthetics.desc": "シャフト、パイプ、歯車に腕木や腕金を取り付ける",
|
||||
"advancement.create.reinforced": "補強ブーム!",
|
||||
@ -595,7 +595,7 @@
|
||||
"advancement.create.pipe_spill": "漏れてる!",
|
||||
"advancement.create.pipe_spill.desc": "パイプの端を露出させて液体が吹き出しているところを見る",
|
||||
"advancement.create.hose_pulley": "工業排水",
|
||||
"advancement.create.hose_pulley.desc": "ホースプーリーを下げて、液体の排出や吸引を見る",
|
||||
"advancement.create.hose_pulley.desc": "ホースプーリーを下げて、液体の放出や吸引を見る",
|
||||
"advancement.create.infinite_water": "海の水ぜんぶ抜く大作戦",
|
||||
"advancement.create.infinite_water.desc": "無限と言えるほどの大量の水を吸引する",
|
||||
"advancement.create.infinite_lava": "星の核ぜんぶ抜く大作戦",
|
||||
@ -606,7 +606,7 @@
|
||||
"advancement.create.crafter.desc": "メカニカルクラフターを設置して、回転力を与える",
|
||||
"advancement.create.clockwork_bearing": "時計仕掛け",
|
||||
"advancement.create.clockwork_bearing.desc": "時計仕掛けのベアリングの上に構造物を組み立てる",
|
||||
"advancement.create.nixie_tube": "派手な看板",
|
||||
"advancement.create.nixie_tube": "イカした看板",
|
||||
"advancement.create.nixie_tube.desc": "ニキシー管を手に入れて、設置する",
|
||||
"advancement.create.deployer": "突く、置く、殴る!",
|
||||
"advancement.create.deployer.desc": "自分の手と全く同じ動きをするデプロイヤーを設置して、稼働させる",
|
||||
@ -614,7 +614,7 @@
|
||||
"advancement.create.speed_controller.desc": "究極の伝動機、回転速度コントローラーを設置する",
|
||||
"advancement.create.flywheel": "工場の心臓部",
|
||||
"advancement.create.flywheel.desc": "かまどエンジンを勢車に繋ぐ",
|
||||
"advancement.create.overstress_flywheel": "高レベル応力",
|
||||
"advancement.create.overstress_flywheel": "ハイレベル応力",
|
||||
"advancement.create.overstress_flywheel.desc": "かまどエンジンに超過応力をかける",
|
||||
"advancement.create.integrated_circuit": "複素数の計算",
|
||||
"advancement.create.integrated_circuit.desc": "集積回路を組み立てる",
|
||||
@ -684,7 +684,7 @@
|
||||
"create.recipe.automatic_shapeless": "自動不定形クラフト",
|
||||
"create.recipe.automatic_brewing": "自動醸造",
|
||||
"create.recipe.packing": "圧縮",
|
||||
"create.recipe.automatic_packing": "自動包装",
|
||||
"create.recipe.automatic_packing": "自動圧縮クラフト",
|
||||
"create.recipe.sawing": "製材",
|
||||
"create.recipe.mechanical_crafting": "メカニカルクラフト",
|
||||
"create.recipe.automatic_shaped": "自動定形クラフト",
|
||||
@ -827,6 +827,12 @@
|
||||
"create.gui.goggles.kinetic_stats": "動力の統計:",
|
||||
"create.gui.goggles.at_current_speed": "現在の速度",
|
||||
"create.gui.goggles.pole_length": "ポールの長さ:",
|
||||
"create.gui.assembly.exception": "UNLOCALIZED: This Contraption was unable to assemble:",
|
||||
"create.gui.assembly.exception.unmovableBlock": "UNLOCALIZED: Unmovable Block (%4$s) at [%1$s %2$s %3$s]",
|
||||
"create.gui.assembly.exception.chunkNotLoaded": "UNLOCALIZED: The Block at [%1$s %2$s %3$s] was not in a loaded chunk",
|
||||
"create.gui.assembly.exception.structureTooLarge": "UNLOCALIZED: There are too many Blocks included in the contraption.\nThe configured maximum is: %1$s",
|
||||
"create.gui.assembly.exception.tooManyPistonPoles": "UNLOCALIZED: There are too many extension Poles attached to this Piston.\nThe configured maximum is: %1$s",
|
||||
"create.gui.assembly.exception.noPistonPoles": "UNLOCALIZED: The Piston is missing some extension Poles",
|
||||
"create.gui.gauge.info_header": "計器の情報:",
|
||||
"create.gui.speedometer.title": "回転速度",
|
||||
"create.gui.stressometer.title": "ネットワークの応力",
|
||||
@ -834,7 +840,7 @@
|
||||
"create.gui.stressometer.overstressed": "超過応力",
|
||||
"create.gui.stressometer.no_rotation": "回転なし",
|
||||
"create.gui.contraptions.not_fast_enough": "この %1$s は_十分な_回転を_していない_ようです。",
|
||||
"create.gui.contraptions.network_overstressed": "この仕掛けは_超過応力_のようです。さらに原動機を追加するか、_応力_の影響が大きい機械のスピードを_下げて_ください。",
|
||||
"create.gui.contraptions.network_overstressed": "この仕掛けは_超過応力_のようです。さらに原動機を追加するか、_応力_の影響が大きい機械の速度を_下げて_ください。",
|
||||
"create.gui.adjustable_crate.title": "可変クレート",
|
||||
"create.gui.adjustable_crate.storageSpace": "収納スペース",
|
||||
"create.gui.stockpile_switch.title": "在庫スイッチ",
|
||||
@ -965,9 +971,9 @@
|
||||
"create.materialChecklist.blocksNotLoaded": "*免責事項*\n\n素材チェックリストは関連するチャンクがロードされていないため、不正確な場合があります。",
|
||||
|
||||
"create.gui.filter.deny_list": "ブラックリスト",
|
||||
"create.gui.filter.deny_list.description": "上記のいずれにも一致しない場合、アイテムは通り抜けます。 空のブラックリストはすべてを受け入れます。",
|
||||
"create.gui.filter.deny_list.description": "上記のいずれにも一致しない場合、アイテムは通り抜けます。空のブラックリストはすべてを受け入れます。",
|
||||
"create.gui.filter.allow_list": "ホワイトリスト",
|
||||
"create.gui.filter.allow_list.description": "上記のいずれかに一致した場合、アイテムは通り抜けます。 空のホワイトリストはすべてを拒否します。",
|
||||
"create.gui.filter.allow_list.description": "上記のいずれかに一致した場合、アイテムは通り抜けます。空のホワイトリストはすべてを拒否します。",
|
||||
"create.gui.filter.respect_data": "データを重視",
|
||||
"create.gui.filter.respect_data.description": "アイテムは、耐久性、エンチャント、その他の属性も一致する場合にのみ一致します。",
|
||||
"create.gui.filter.ignore_data": "データを無視",
|
||||
@ -1034,7 +1040,7 @@
|
||||
"create.gui.attribute_filter.selected_attributes": "選択された属性:",
|
||||
"create.gui.attribute_filter.add_attribute": "属性をリストに追加する",
|
||||
"create.gui.attribute_filter.add_inverted_attribute": "反属性をリストに追加する",
|
||||
"create.gui.attribute_filter.allow_list_disjunctive": "ホワイトリスト(どれか)",
|
||||
"create.gui.attribute_filter.allow_list_disjunctive": "ホワイトリスト(いずれか)",
|
||||
"create.gui.attribute_filter.allow_list_disjunctive.description": "選択した属性のいずれかを持っている場合、アイテムは通り抜けます。",
|
||||
"create.gui.attribute_filter.allow_list_conjunctive": "ホワイトリスト(全て)",
|
||||
"create.gui.attribute_filter.allow_list_conjunctive.description": "選択した属性をすべてを持っている場合、アイテムは通り抜けます。",
|
||||
@ -1050,12 +1056,12 @@
|
||||
"create.tooltip.speedRequirement.none": "無し",
|
||||
"create.tooltip.speedRequirement.medium": "中速",
|
||||
"create.tooltip.speedRequirement.high": "高速",
|
||||
"create.tooltip.stressImpact": "応力への影響: %1$s",
|
||||
"create.tooltip.stressImpact": "応力の影響: %1$s",
|
||||
"create.tooltip.stressImpact.low": "低",
|
||||
"create.tooltip.stressImpact.medium": "中",
|
||||
"create.tooltip.stressImpact.high": "高",
|
||||
"create.tooltip.stressImpact.overstressed": "超過応力",
|
||||
"create.tooltip.capacityProvided": "応力許容量: %1$s",
|
||||
"create.tooltip.capacityProvided": "応力の容量: %1$s",
|
||||
"create.tooltip.capacityProvided.low": "小",
|
||||
"create.tooltip.capacityProvided.medium": "中",
|
||||
"create.tooltip.capacityProvided.high": "大",
|
||||
@ -1123,7 +1129,7 @@
|
||||
"create.command.killTPSCommand.argument.tickTime": "tickTime",
|
||||
|
||||
"create.subtitle.schematicannon_launch_block": "概略図砲が発射する",
|
||||
"create.subtitle.schematicannon_finish": "概略図砲が完了する",
|
||||
"create.subtitle.schematicannon_finish": "概略図砲が作業を終える",
|
||||
"create.subtitle.slime_added": "スライムがぐしゃっとつぶれる",
|
||||
"create.subtitle.mechanical_press_activation": "メカニカルプレスが作動する",
|
||||
"create.subtitle.mechanical_press_item_break": "金属がガチャンと鳴る",
|
||||
@ -1184,11 +1190,11 @@
|
||||
"block.create.brass_funnel.tooltip.behaviour3": "下向きホッパーのように、_アイテム_を_下方向_に_移動_させます。",
|
||||
|
||||
"block.create.brass_tunnel.tooltip": "真鍮トンネル",
|
||||
"block.create.brass_tunnel.tooltip.summary": "派手な_メカニカルベルト_の保護カバー!_真鍮トンネル_にはアイテムの_フィルター機能_や、_分割機能_の設定項目も多数用意されています。",
|
||||
"block.create.brass_tunnel.tooltip.summary": "オシャレな_メカニカルベルト_の保護カバー!_真鍮トンネル_にはアイテムの_フィルター機能_や、_分割機能_の設定項目も多数用意されています。",
|
||||
"block.create.brass_tunnel.tooltip.condition1": "並べて設置したとき",
|
||||
"block.create.brass_tunnel.tooltip.behaviour1": "_真鍮トンネル_は相互に接続し、ある_メカニカルベルト_のアイテムを別の_メカニカルベルト_に送ったりできるようにします。",
|
||||
"block.create.brass_tunnel.tooltip.condition2": "フィルター機能",
|
||||
"block.create.brass_tunnel.tooltip.behaviour2": "_真鍮トンネル_は_搬入_と_搬出_、両方のフィルターを搭載しています。 _トンネル_のフィルター付き出力から_アイテム_が出てくることが許可されていない場合、並べて設置された_トンネル_の出力に送られます。",
|
||||
"block.create.brass_tunnel.tooltip.behaviour2": "_真鍮トンネル_は_搬入_と_搬出_、両方のフィルターを搭載しています。_トンネル_のフィルター付き出力から_アイテム_が出てくることが許可されていない場合、並べて設置された_トンネル_の出力に送られます。",
|
||||
"block.create.brass_tunnel.tooltip.condition3": "分割機能",
|
||||
"block.create.brass_tunnel.tooltip.behaviour3": "_真鍮トンネル_は、_アイテム_が接続された_メカニカルベルト_に分類して並べる方法を変更するように設定できます。",
|
||||
"block.create.brass_tunnel.tooltip.control1": "側面をレンチで右クリックしたとき。",
|
||||
@ -1242,14 +1248,14 @@
|
||||
"block.create.hose_pulley.tooltip": "ホースプーリー",
|
||||
"block.create.hose_pulley.tooltip.summary": "ワールドの大量の_液体_を_吸引_したり、_放出_したりするのに使います。",
|
||||
"block.create.hose_pulley.tooltip.condition1": "回転したとき",
|
||||
"block.create.hose_pulley.tooltip.behaviour1": "ホースを_上げ下げ_して、どの程度の_高さ_まで_吸引_や_排出_を行うか決めます。",
|
||||
"block.create.hose_pulley.tooltip.behaviour1": "ホースを_上げ下げ_して、どの程度の_高さ_まで_吸引_や_放出_を行うか決めます。",
|
||||
"block.create.hose_pulley.tooltip.condition2": "プーリーから液体が吸い込まれたとき",
|
||||
"block.create.hose_pulley.tooltip.behaviour2": "ホースの端がおろされた本体から_液体_ブロックを_吸引_し始めます。非常に_大量_の液体は_無限_と_みなされます_。",
|
||||
"block.create.hose_pulley.tooltip.condition3": "液体がプーリーに押しこまれたとき",
|
||||
"block.create.hose_pulley.tooltip.behaviour3": "ホースの端の_高さ_まで、_液体_の_放出_を始めます。",
|
||||
|
||||
"block.create.fluid_tank.tooltip": "液体タンク",
|
||||
"block.create.fluid_tank.tooltip.summary": "あなたのお気に入りの_液体_をすべて_貯蔵_します。縦横に並べて大きさを調整できます。",
|
||||
"block.create.fluid_tank.tooltip.summary": "あなたのお気に入りのあらゆる_液体_を_貯蔵_できます。縦横に並べて大きさを調整できます。",
|
||||
"block.create.fluid_tank.tooltip.condition1": "レンチで右クリックしたとき",
|
||||
"block.create.fluid_tank.tooltip.behaviour1": "窓の設定を変更します。",
|
||||
|
||||
@ -1288,7 +1294,7 @@
|
||||
|
||||
"block.create.item_drain.tooltip": "アイテム排液口",
|
||||
"block.create.item_drain.tooltip.summary": "_液体アイテム_を空にする格子付きデポ。",
|
||||
"block.create.item_drain.tooltip.condition1": "液体排液 ",
|
||||
"block.create.item_drain.tooltip.condition1": "液体排液",
|
||||
"block.create.item_drain.tooltip.behaviour1": "_バケツ_や_ボトル_などの_液体入り容器_を横から搬入すると、アイテム排液口はその_液体入り容器_に空にしようとします。その後、アイテムは反対側に排出されます。",
|
||||
|
||||
"block.create.mechanical_arm.tooltip": "メカニカルアーム",
|
||||
@ -1314,7 +1320,7 @@
|
||||
"item.create.handheld_blockzapper.tooltip": "携帯ブロックザッパー",
|
||||
"item.create.handheld_blockzapper.tooltip.summary": "離れた場所にブロックを設置または交換する新しいガジェット。",
|
||||
"item.create.handheld_blockzapper.tooltip.control1": "ブロックを左クリックしたとき",
|
||||
"item.create.handheld_blockzapper.tooltip.action1": "UNLOCALIZED: Sets blocks placed by the tool to the targeted block.",
|
||||
"item.create.handheld_blockzapper.tooltip.action1": "ターゲットのブロックをこのツールに設定します。",
|
||||
"item.create.handheld_blockzapper.tooltip.control2": "ブロックを右クリックしたとき",
|
||||
"item.create.handheld_blockzapper.tooltip.action2": "ターゲットブロックを_配置_または_置換_します。",
|
||||
"item.create.handheld_blockzapper.tooltip.control3": "スニークしながら右クリックしたとき。",
|
||||
@ -1360,7 +1366,7 @@
|
||||
"item.create.empty_schematic.tooltip.summary": "レシピの材料、および_概略図テーブル_での書き込みに使用されます。",
|
||||
|
||||
"item.create.schematic.tooltip": "概略図",
|
||||
"item.create.schematic.tooltip.summary": "ワールドに設置できる構造物を保持します。 ホログラムを必要に応じて配置し、_概略図砲_を使用して建築します。",
|
||||
"item.create.schematic.tooltip.summary": "ワールドに設置できる構造物を保持します。ホログラムを必要に応じて配置し、_概略図砲_を使用して建築します。",
|
||||
"item.create.schematic.tooltip.condition1": "持ったとき",
|
||||
"item.create.schematic.tooltip.behaviour1": "画面上のツールを使用して配置できます。",
|
||||
"item.create.schematic.tooltip.control1": "スニークしながら右クリックしたとき",
|
||||
@ -1371,11 +1377,11 @@
|
||||
"item.create.schematic_and_quill.tooltip.condition1": "ステップ1",
|
||||
"item.create.schematic_and_quill.tooltip.behaviour1": "右クリックして2つのコーナーポイントを選択します。",
|
||||
"item.create.schematic_and_quill.tooltip.condition2": "ステップ2",
|
||||
"item.create.schematic_and_quill.tooltip.behaviour2": "_Ctrlキーを押しながらスクロール_して、サイズを調整します。 もう一度右クリックして保存します。",
|
||||
"item.create.schematic_and_quill.tooltip.behaviour2": "_Ctrlキーを押しながらスクロール_して、サイズを調整します。もう一度右クリックして保存します。",
|
||||
"item.create.schematic_and_quill.tooltip.control1": "右クリックしたとき",
|
||||
"item.create.schematic_and_quill.tooltip.action1": "コーナーポイントを選択/保存を確認します。",
|
||||
"item.create.schematic_and_quill.tooltip.control2": "Ctrlを長押してるとき",
|
||||
"item.create.schematic_and_quill.tooltip.action2": "_空中_でポイントを選択します。 _スクロール_して距離を調整します。",
|
||||
"item.create.schematic_and_quill.tooltip.action2": "_空中_でポイントを選択します。_スクロール_して距離を調整します。",
|
||||
"item.create.schematic_and_quill.tooltip.control3": "スニークしながら右クリックしたとき",
|
||||
"item.create.schematic_and_quill.tooltip.action3": "選択を_リセット_して削除します。",
|
||||
|
||||
@ -1395,11 +1401,11 @@
|
||||
"block.create.cogwheel.tooltip": "歯車",
|
||||
"block.create.cogwheel.tooltip.summary": "_回転_を直線で、または隣接する_歯車_に_伝達_します。",
|
||||
|
||||
"block.create.large_cogwheel.tooltip": "大型歯車",
|
||||
"block.create.large_cogwheel.tooltip": "大きな歯車",
|
||||
"block.create.large_cogwheel.tooltip.summary": "小さな歯車に接続したときに_回転速度_を_変更_できる歯車の大型バージョン。",
|
||||
|
||||
"block.create.encased_shaft.tooltip": "ケース入りシャフト",
|
||||
"block.create.encased_shaft.tooltip.summary": "_回転_を直線で_伝達_します。 壁を通過する回転の伝達に適しています。",
|
||||
"block.create.encased_shaft.tooltip.summary": "_回転_を直線で_伝達_します。壁を通過する回転の伝達に適しています。",
|
||||
|
||||
"block.create.gearbox.tooltip": "ギアボックス",
|
||||
"block.create.gearbox.tooltip.summary": "接続された_4方向_の_回転_方向を逆にして_伝達_します。",
|
||||
@ -1425,9 +1431,9 @@
|
||||
"block.create.adjustable_chain_gearshift.tooltip.behaviour1": "レッドストーン信号を受けて_いない_ときは、隣接するチェーンドライブと_同じ速度_で回転を伝達します。_レッドストーン信号強度が最大_のときは隣接するチェーンドライブは_その2倍_の速度で伝達します。その間にあるものは1-2倍の速度で伝達されます。",
|
||||
|
||||
"item.create.belt_connector.tooltip": "メカニカルベルト",
|
||||
"item.create.belt_connector.tooltip.summary": "2本以上の_シャフト_を_メカニカルベルト_で接続します。接続されたシャフトは全く同じ速度と方向で回転します。 メカニカルベルトは_アイテム_と_エンティティ_を_運搬_するベルトコンベアとして使えます。",
|
||||
"item.create.belt_connector.tooltip.summary": "2本以上の_シャフト_を_メカニカルベルト_で接続します。接続されたシャフトは全く同じ速度と方向で回転します。メカニカルベルトは_アイテム_と_エンティティ_を_運搬_するベルトコンベアとして使えます。",
|
||||
"item.create.belt_connector.tooltip.control1": "シャフトを右クリックしたとき",
|
||||
"item.create.belt_connector.tooltip.action1": "ベルトの片端のシャフトを選択します。 選択する2つのシャフトは_ベルトの方向_に向かって_縦_、_横_、または_斜め_に_並べる_必要があります。",
|
||||
"item.create.belt_connector.tooltip.action1": "ベルトの片端のシャフトを選択します。選択する2つのシャフトは_ベルトの方向_に向かって_縦_、_横_、または_斜め_に_並べる_必要があります。",
|
||||
"item.create.belt_connector.tooltip.control2": "スニークしながら右クリックしたとき",
|
||||
"item.create.belt_connector.tooltip.action2": "ベルトの最初に選択した位置を_リセット_します。",
|
||||
|
||||
@ -1439,7 +1445,7 @@
|
||||
"item.create.goggles.tooltip.behaviour2": "計器が接続されているネットワークの_速度_または_応力_に関する詳細情報を表示します。",
|
||||
|
||||
"item.create.wrench.tooltip": "レンチ",
|
||||
"item.create.wrench.tooltip.summary": "動的からくりに取り組むための便利なツール。 コンポーネントの_回転_、_解体_、_設定_に使用できます。",
|
||||
"item.create.wrench.tooltip.summary": "動的からくりに取り組むための便利なツール。コンポーネントの_回転_、_解体_、_設定_に使用できます。",
|
||||
"item.create.wrench.tooltip.control1": "機械を右クリックしたとき",
|
||||
"item.create.wrench.tooltip.action1": "操作した面に向かって、または面から離れるように機械を_回転_させます。",
|
||||
"item.create.wrench.tooltip.control2": "スニークしながら右クリックしたとき",
|
||||
@ -1454,7 +1460,7 @@
|
||||
"block.create.encased_fan.tooltip": "ケース入りファン",
|
||||
"block.create.encased_fan.tooltip.summary": "_回転力_を_気流_に変換し往復させます。色んな使い方があります。",
|
||||
"block.create.encased_fan.tooltip.condition1": "レッドストーン信号を受けたとき",
|
||||
"block.create.encased_fan.tooltip.behaviour1": "真下の_熱源_から_回転力_を供給します。 ファンは下向きにする必要があります。",
|
||||
"block.create.encased_fan.tooltip.behaviour1": "真下の_熱源_から_回転力_を供給します。ファンは下向きにする必要があります。",
|
||||
"block.create.encased_fan.tooltip.condition2": "回転したとき",
|
||||
"block.create.encased_fan.tooltip.behaviour2": "回転速度に応じてエンティティを_押し_たり、_吸い戻し_たりします。",
|
||||
"block.create.encased_fan.tooltip.condition3": "特別なブロックを吹き抜けるとき",
|
||||
@ -1466,18 +1472,18 @@
|
||||
"block.create.hand_crank.tooltip": "ハンドクランク",
|
||||
"block.create.hand_crank.tooltip.summary": "プレイヤーの相互作用を必要とする_シンプル_な_原動機_。",
|
||||
"block.create.hand_crank.tooltip.condition1": "使っているとき",
|
||||
"block.create.hand_crank.tooltip.behaviour1": "接続したに_回転力_を供給します。 _スニークで回転を逆_にできます。",
|
||||
"block.create.hand_crank.tooltip.behaviour1": "接続したに_回転力_を供給します。_スニークで回転を逆_にできます。",
|
||||
|
||||
"block.create.cuckoo_clock.tooltip": "鳩時計",
|
||||
"block.create.cuckoo_clock.tooltip.summary": "空間を_彩り_、_時間を刻む_素晴らしい細工。",
|
||||
"block.create.cuckoo_clock.tooltip.condition1": "回転したとき",
|
||||
"block.create.cuckoo_clock.tooltip.behaviour1": "_現在の時刻_を表示し、1日に2回曲を再生します。 、_正午_と夕暮れにプレイヤーが_眠れるようになるとすぐ_に_アクティブ_になります。",
|
||||
"block.create.cuckoo_clock.tooltip.behaviour1": "_現在の時刻_を表示し、1日に2回曲を再生します。、_正午_と夕暮れにプレイヤーが_眠れるようになるとすぐ_に_アクティブ_になります。",
|
||||
|
||||
"block.create.turntable.tooltip": "ターンテーブル",
|
||||
"block.create.turntable.tooltip.summary": "_回転力_を洗練された乗り物酔いに変えます。",
|
||||
|
||||
"block.create.millstone.tooltip": "石臼",
|
||||
"block.create.millstone.tooltip.summary": "搬入された_材料_の_研削_に適した機械。 隣接する歯車によって、または下部のシャフトに接続することによって、回転力を供給できます。 完成品は機械から搬出する必要があります。",
|
||||
"block.create.millstone.tooltip.summary": "搬入された_材料_の_研削_に適した機械。隣接する歯車によって、または下部のシャフトに接続することによって、回転力を供給できます。完成品は機械から搬出する必要があります。",
|
||||
"block.create.millstone.tooltip.condition1": "回転したとき",
|
||||
"block.create.millstone.tooltip.behaviour1": "ブロックの側面または上面から搬入されたアイテムを_粉砕_を開始します。",
|
||||
"block.create.millstone.tooltip.condition2": "右クリックしたとき",
|
||||
@ -1486,10 +1492,10 @@
|
||||
"block.create.crushing_wheel.tooltip": "破砕ホイール",
|
||||
"block.create.crushing_wheel.tooltip.summary": "何かを_破砕_する大きな回転させられるホイール。",
|
||||
"block.create.crushing_wheel.tooltip.condition1": "他の破砕ホイールに取り付けたとき",
|
||||
"block.create.crushing_wheel.tooltip.behaviour1": "様々な物を処理する破砕機を形成します。 ホイールの歯は、_同じ速度_で_反対方向_に回る必要があります。",
|
||||
"block.create.crushing_wheel.tooltip.behaviour1": "様々な物を処理する破砕機を形成します。ホイールの歯は、_同じ速度_で_反対方向_に回る必要があります。",
|
||||
|
||||
"block.create.mechanical_press.tooltip": "メカニカルプレス",
|
||||
"block.create.mechanical_press.tooltip.summary": "その下のアイテムを圧縮する強力なピストン。 一定の_回転力_が必要です。",
|
||||
"block.create.mechanical_press.tooltip.summary": "その下のアイテムを圧縮する強力なピストン。一定の_回転力_が必要です。",
|
||||
"block.create.mechanical_press.tooltip.condition1": "レッドストーン信号を受けたとき",
|
||||
"block.create.mechanical_press.tooltip.behaviour1": "その下にドロップされたアイテムの圧縮を_開始_します。",
|
||||
"block.create.mechanical_press.tooltip.condition2": "メカニカルベルトの上にあるとき",
|
||||
@ -1524,9 +1530,9 @@
|
||||
"block.create.mechanical_crafter.tooltip.condition2": "レッドストーンパルスがオンの時",
|
||||
"block.create.mechanical_crafter.tooltip.behaviour2": "現在与えられているすべての_アイテム_を使って、_強制的_に_クラフト_を開始します。",
|
||||
"block.create.mechanical_crafter.tooltip.control1": "正面をレンチで使ったとき",
|
||||
"block.create.mechanical_crafter.tooltip.action1": "_個々のクラフターが_アイテムを移動_させる_方向_を循環させます。 クラフトグリッドを形成するには、すべてのアイテムを最後のクラフターに向かって_移動させる流れ_を作るように_ベルト_を設置する必要があります。最後のクラフターはグリッドから_離れる_方向を指す必要があります。",
|
||||
"block.create.mechanical_crafter.tooltip.action1": "_個々のクラフターが_アイテムを移動_させる_方向_を循環させます。クラフトグリッドを形成するには、すべてのアイテムを最後のクラフターに向かって_移動させる流れ_を作るように_ベルト_を設置する必要があります。最後のクラフターはグリッドから_離れる_方向を指す必要があります。",
|
||||
"block.create.mechanical_crafter.tooltip.control2": "背面をレンチで使ったとき",
|
||||
"block.create.mechanical_crafter.tooltip.action2": "隣接するクラフターの_搬入インベントリ_を_接続_します。 これを使用してクラフトグリッドの_スロットを_結合_し、_搬入作業_を_簡略化_できます。",
|
||||
"block.create.mechanical_crafter.tooltip.action2": "隣接するクラフターの_搬入インベントリ_を_接続_します。これを使用してクラフトグリッドの_スロットを_結合_し、_搬入作業_を_簡略化_できます。",
|
||||
|
||||
"block.create.furnace_engine.tooltip": "かまどエンジン",
|
||||
"block.create.furnace_engine.tooltip.summary": "_稼動しているかまど_で動く強力な_原動機_。",
|
||||
@ -1553,14 +1559,14 @@
|
||||
"block.create.portable_fluid_interface.tooltip.behaviour2": "アクティブな接続を即座に_切断_します。",
|
||||
|
||||
"block.create.rotation_speed_controller.tooltip": "回転速度コントローラー",
|
||||
"block.create.rotation_speed_controller.tooltip.summary": "回転を任意の速度にスピードアップまたはスローダウンさせることができる_設定_可能な_伝達機_。",
|
||||
"block.create.rotation_speed_controller.tooltip.summary": "回転を任意の速度に上げたり下げたりさせることができる_設定_可能な_伝達機_。",
|
||||
"block.create.rotation_speed_controller.tooltip.condition1": "大きな歯車を取り付けたとき",
|
||||
"block.create.rotation_speed_controller.tooltip.behaviour1": "入ってくる回転力を歯車に伝達して、目標とする_速度_に_合わせ_ようとします。_歯車_はコントローラの_上_に_取り付ける_必要があります。",
|
||||
|
||||
"block.create.mechanical_piston.tooltip": "メカニカルピストン",
|
||||
"block.create.mechanical_piston.tooltip.summary": "ピストンのさらに進化したバージョン。回転力を利用して前にある構造物を正確に移動させます。後部にあるピストン延長ポールは、このの稼働範囲を決めます。延長ポールがないと、ピストンは動きません。_シャーシ_や_スライムボール_、_接着剤_を使用して、1列以上のブロックを移動させることができます。",
|
||||
"block.create.mechanical_piston.tooltip.condition1": "回転したとき",
|
||||
"block.create.mechanical_piston.tooltip.behaviour1": "取り付けられた構造物の移動を開始します。 速度と方向は、入力される回転速度と相関します。",
|
||||
"block.create.mechanical_piston.tooltip.behaviour1": "取り付けられた構造物の移動を開始します。速度と方向は、入力される回転速度と相関します。",
|
||||
|
||||
"block.create.piston_extension_pole.tooltip": "ピストン延長ポール",
|
||||
"block.create.piston_extension_pole.tooltip.summary": "メカニカルピストンの範囲を拡張します。",
|
||||
@ -1588,7 +1594,7 @@
|
||||
"block.create.clockwork_bearing.tooltip": "時計仕掛けのベアリング",
|
||||
"block.create.clockwork_bearing.tooltip.summary": "現在の_ゲーム内時間_に応じて最大2つの_時計の針_を回転させる、_メカニカルベアリング_の進化版。",
|
||||
"block.create.clockwork_bearing.tooltip.condition1": "回転したとき",
|
||||
"block.create.clockwork_bearing.tooltip.behaviour1": "現在の時間に向かって取り付けた構造物の回転を開始します。 2番目の構造物が存在する場合、それは分針として機能します。",
|
||||
"block.create.clockwork_bearing.tooltip.behaviour1": "現在の時間に向かって取り付けた構造物の回転を開始します。2番目の構造物が存在する場合、それは分針として機能します。",
|
||||
|
||||
"block.create.sequenced_gearshift.tooltip": "シーケンスギアシフト",
|
||||
"block.create.sequenced_gearshift.tooltip.summary": "_プログラミング_できる_便利_な伝達機械。最大_5つ_の_連続_した_命令_に従って_回転処理_を変更することができます。高速になると精度が悪くなる可能性があります。",
|
||||
@ -1615,7 +1621,7 @@
|
||||
"block.create.rope_pulley.tooltip": "ローププーリー",
|
||||
"block.create.rope_pulley.tooltip.summary": "_取り付けられたブロック_や_構造物_を_垂直_方向に移動させます。_シャーシ_、_スライムボール_、_接着剤_を使用して、1つ以上のブロックを移動させることもできます。",
|
||||
"block.create.rope_pulley.tooltip.condition1": "回転したとき",
|
||||
"block.create.rope_pulley.tooltip.behaviour1": "取り付けた構造物の移動を開始します。 速度と方向は、回転速度に相関します。",
|
||||
"block.create.rope_pulley.tooltip.behaviour1": "取り付けた構造物の移動を開始します。速度と方向は、回転速度に相関します。",
|
||||
|
||||
"block.create.linear_chassis.tooltip": "線形シャーシ",
|
||||
"block.create.linear_chassis.tooltip.summary": "移動用の構造物を接続する設定可能な土台ブロック。",
|
||||
@ -1634,19 +1640,19 @@
|
||||
"block.create.radial_chassis.tooltip.condition1": "動かしたとき",
|
||||
"block.create.radial_chassis.tooltip.behaviour1": "柱状に_接続_したすべての_シャーシ_と、周囲のブロックを_移動_させます。周囲のブロックは、範囲内にあり、かつ粘着面に面している場合にのみ_引っ張られ_ます([Ctrl]を参照)。",
|
||||
"block.create.radial_chassis.tooltip.condition2": "レンチを持ったとき",
|
||||
"block.create.radial_chassis.tooltip.behaviour2": "このシャーシブロックの有効_範囲_を設定します。 Ctrlキーを押したままにすると、接続されているすべてのシャーシブロックの範囲も同時に変更できます。",
|
||||
"block.create.radial_chassis.tooltip.behaviour2": "このシャーシブロックの有効_範囲_を設定します。Ctrlキーを押したままにすると、接続されているすべてのシャーシブロックの範囲も同時に変更できます。",
|
||||
"block.create.radial_chassis.tooltip.control1": "スライムボールで右クリックしたとき",
|
||||
"block.create.radial_chassis.tooltip.action1": "クリックした面を_粘着面_にします。 シャーシが移動すると、粘着面に接続されているすべての指定のブロックも一緒に移動します。",
|
||||
"block.create.radial_chassis.tooltip.action1": "クリックした面を_粘着面_にします。シャーシが移動すると、粘着面に接続されているすべての指定のブロックも一緒に移動します。",
|
||||
|
||||
"block.create.mechanical_drill.tooltip": "メカニカルドリル",
|
||||
"block.create.mechanical_drill.tooltip.summary": "_ブロックを壊す_のに適した作業機。 _メカニカルピストン_や_ベアリング_等で移動できます。",
|
||||
"block.create.mechanical_drill.tooltip.summary": "_ブロックを壊す_のに適した作業機。_メカニカルピストン_や_ベアリング_等で移動できます。",
|
||||
"block.create.mechanical_drill.tooltip.condition1": "回転したとき",
|
||||
"block.create.mechanical_drill.tooltip.behaviour1": "_固定式_のブロック破壊機として機能します。 また、有効範囲の_エンティティを傷つけます_。",
|
||||
"block.create.mechanical_drill.tooltip.behaviour1": "_固定式_のブロック破壊機として機能します。また、有効範囲の_エンティティを傷つけます_。",
|
||||
"block.create.mechanical_drill.tooltip.condition2": "動かしたとき",
|
||||
"block.create.mechanical_drill.tooltip.behaviour2": "ドリルが衝突するブロックを壊します。",
|
||||
|
||||
"block.create.mechanical_harvester.tooltip": "メカニカルハーベスター",
|
||||
"block.create.mechanical_harvester.tooltip.summary": "中規模の作物の自動化に適した機械式植物カッター。 _メカニカルピストン_や_ベアリング_等で移動できます。",
|
||||
"block.create.mechanical_harvester.tooltip.summary": "中規模の作物の自動化に適した機械式植物カッター。_メカニカルピストン_や_ベアリング_等で移動できます。",
|
||||
"block.create.mechanical_harvester.tooltip.condition1": "動かしたとき",
|
||||
"block.create.mechanical_harvester.tooltip.behaviour1": "ブレードが衝突する_すべての成熟した作物を収穫_し、それらを初期の成長状態にリセットします。",
|
||||
|
||||
@ -1656,9 +1662,9 @@
|
||||
"block.create.mechanical_plough.tooltip.behaviour1": "松明や雪など、当たり判定がないブロックを壊します。エンティティを傷付けることはありません。また、クワを使うように土を耕します。",
|
||||
|
||||
"block.create.mechanical_saw.tooltip": "メカニカルノコギリ",
|
||||
"block.create.mechanical_saw.tooltip.summary": "_木_を効率的に_切り倒したり_、_ブロック_を_加工_したりするのに適しています。 _メカニカルピストン_や_ベアリング_等で移動できます。",
|
||||
"block.create.mechanical_saw.tooltip.summary": "_木_を効率的に_切り倒したり_、_ブロック_を_加工_したりするのに適しています。_メカニカルピストン_や_ベアリング_等で移動できます。",
|
||||
"block.create.mechanical_saw.tooltip.condition1": "上向きのとき",
|
||||
"block.create.mechanical_saw.tooltip.behaviour1": "そこにドロップまたは搬入されたアイテムに_製材_および石工レシピを適用します。 複数の出力が可能な場合、フィルターが割り当てられていない限り、出力が循環します。",
|
||||
"block.create.mechanical_saw.tooltip.behaviour1": "そこにドロップまたは搬入されたアイテムに_製材_および石工レシピを適用します。複数の出力が可能な場合、フィルターが割り当てられていない限り、出力が循環します。",
|
||||
"block.create.mechanical_saw.tooltip.condition2": "横向きの場合",
|
||||
"block.create.mechanical_saw.tooltip.behaviour2": "その前の_原木_を_切り倒す_。その原木が木を支えていた場合、_木_は_崩壊_します。",
|
||||
"block.create.mechanical_saw.tooltip.condition3": "動かしたとき",
|
||||
@ -1673,30 +1679,30 @@
|
||||
"block.create.content_observer.tooltip.summary": "設定された_フィルター_に一致する_コンテナ_や_メカニカルベルト_内の_アイテム_を検出します。観察している_インベントリ_、_ベルト_、または_シュート_に一致するアイテムが含まれている場合、このは_レッドストーン信号_を発します。観察された_ファンネル_が一致するアイテムを_輸送_すると、このコンポーネントは_レッドストーンパルス_を発します。",
|
||||
|
||||
"block.create.redstone_link.tooltip": "レッドストーンリンク",
|
||||
"block.create.redstone_link.tooltip.summary": "_ワイヤレスレッドストーン_接続の終点。 任意のアイテムを使用して_周波数_を割り当てることができます。 通信距離は限られていますが、かなり離れても通信することができます。",
|
||||
"block.create.redstone_link.tooltip.summary": "_ワイヤレスレッドストーン_接続の終点。任意のアイテムを使用して_周波数_を割り当てることができます。通信距離は限られていますが、かなり離れても通信することができます。",
|
||||
"block.create.redstone_link.tooltip.condition1": "信号を受信したとき",
|
||||
"block.create.redstone_link.tooltip.behaviour1": "同じ周波数のリンクから信号を受信すると、レッドストーン信号を出力します。",
|
||||
"block.create.redstone_link.tooltip.control1": "アイテムで右クリックしたとき",
|
||||
"block.create.redstone_link.tooltip.action1": "_周波数_をそのアイテムに設定します。 周波数を定義するために、_合計2つの異なるアイテム_を組み合わせて使えます。",
|
||||
"block.create.redstone_link.tooltip.action1": "_周波数_をそのアイテムに設定します。周波数を定義するために、_合計2つの異なるアイテム_を組み合わせて使えます。",
|
||||
"block.create.redstone_link.tooltip.control2": "スニークしながら右クリックしたとき",
|
||||
"block.create.redstone_link.tooltip.action2": "_受信_モードと_送信_モードを切り替えます。",
|
||||
|
||||
"block.create.nixie_tube.tooltip": "ニキシー管",
|
||||
"block.create.nixie_tube.tooltip.summary": "派手にレッドストーン強度と文字を表示します。",
|
||||
"block.create.nixie_tube.tooltip.summary": "オシャレにレッドストーン強度と文字を表示します。",
|
||||
"block.create.nixie_tube.tooltip.condition1": "レッドストーン信号を受けたとき",
|
||||
"block.create.nixie_tube.tooltip.behaviour1": "現在のレッドストーンの_信号強度_を表示します。",
|
||||
"block.create.nixie_tube.tooltip.condition2": "名札を使ったとき",
|
||||
"block.create.nixie_tube.tooltip.behaviour2": "_名札_の_内容_を複数のニキシー管を並べて表示します。",
|
||||
|
||||
"block.create.redstone_contact.tooltip": "レッドストーンコンタクト",
|
||||
"block.create.redstone_contact.tooltip.summary": "レッドストーン信号をペアで出力します。 _メカニカルピストン_や_ベアリング_等で移動できます。",
|
||||
"block.create.redstone_contact.tooltip.summary": "レッドストーン信号をペアで出力します。_メカニカルピストン_や_ベアリング_等で移動できます。",
|
||||
"block.create.redstone_contact.tooltip.condition1": "他のコンタクトと向かい合ったとき",
|
||||
"block.create.redstone_contact.tooltip.behaviour1": "レッドストーン信号を出力します。",
|
||||
"block.create.redstone_contact.tooltip.condition2": "動かしたとき",
|
||||
"block.create.redstone_contact.tooltip.behaviour2": "通過するすべての固定したレッドストーンコンタクトに反応します。",
|
||||
|
||||
"block.create.adjustable_crate.tooltip": "可変クレート",
|
||||
"block.create.adjustable_crate.tooltip.summary": "この_収納ブロック_は、容量を手動で制御できます。任意のアイテムを_16スタック_まで収納できます。 _レッドストーンコンパレーター_に対応しています。",
|
||||
"block.create.adjustable_crate.tooltip.summary": "この_収納ブロック_は、容量を手動で制御できます。任意のアイテムを_16スタック_まで収納できます。_レッドストーンコンパレーター_に対応しています。",
|
||||
"block.create.adjustable_crate.tooltip.control1": "右クリックしたとき",
|
||||
"block.create.adjustable_crate.tooltip.action1": "_インターフェース_を開きます。",
|
||||
|
||||
@ -1706,7 +1712,7 @@
|
||||
"block.create.creative_crate.tooltip.behaviour1": "このクレートから何かを_搬出_すると、指定されたアイテムが_無限_に_搬出_されます。このクレートに_搬入_されたアイテムは_消滅_します。",
|
||||
|
||||
"block.create.deployer.tooltip": "デプロイヤー",
|
||||
"block.create.deployer.tooltip.summary": "_殴る_、_使う_、_起動する_。この機械は、_プレイヤー_をできるだけ_真似_しようとします。_アイテムを自分のインベントリに入れたり_、_預けたり_できます。 持っているアイテムはブロックから直接搬入・搬出する必要があります。",
|
||||
"block.create.deployer.tooltip.summary": "_殴る_、_使う_、_起動する_。この機械は、_プレイヤー_をできるだけ_真似_しようとします。_アイテムを自分のインベントリに入れたり_、_預けたり_できます。持っているアイテムはブロックから直接搬入・搬出する必要があります。",
|
||||
"block.create.deployer.tooltip.condition1": "回転したとき",
|
||||
"block.create.deployer.tooltip.behaviour1": "腕を機械の2m先まで伸ばし、アイテムを_発動_する。",
|
||||
"block.create.deployer.tooltip.condition2": "レンチで右クリックしたとき",
|
||||
@ -1715,7 +1721,7 @@
|
||||
"block.create.deployer.tooltip.behaviour3": "合わないアイテムは搬入できません。逆に合うアイテムは搬出できません。",
|
||||
|
||||
"block.create.brass_casing.tooltip": "真ちゅうのケーシング",
|
||||
"block.create.brass_casing.tooltip.summary": "さまざまな用途に使用できる頑丈な機械ケーシング。 装飾にも安心してお使いいただけます。",
|
||||
"block.create.brass_casing.tooltip.summary": "さまざまな用途に使用できる頑丈な機械ケーシング。装飾にも安心してお使いいただけます。",
|
||||
|
||||
"block.create.pulse_repeater.tooltip": "パルスリピーター",
|
||||
"block.create.pulse_repeater.tooltip.summary": "通過するレッドストーン信号を_1ティック_の長さにカットする簡単な回路。",
|
||||
@ -1733,22 +1739,22 @@
|
||||
"block.create.powered_toggle_latch.tooltip.summary": "レッドストーンパルスによって切替できるレバー。",
|
||||
|
||||
"block.create.powered_latch.tooltip": "パワードラッチ",
|
||||
"block.create.powered_latch.tooltip.summary": "_レッドストーン信号_で制御できるレバー。 _背面のレッドストーン信号_でオンになり、_側面からのレッドストーン信号_でリセットされます。",
|
||||
"block.create.powered_latch.tooltip.summary": "_レッドストーン信号_で制御できるレバー。_背面のレッドストーン信号_でオンになり、_側面からのレッドストーン信号_でリセットされます。",
|
||||
|
||||
"block.create.controller_rail.tooltip": "コントローラーレール",
|
||||
"block.create.controller_rail.tooltip.summary": "トロッコの_移動速度_を_細かく制御_できる一方通行の_パワード_レール",
|
||||
"block.create.controller_rail.tooltip.condition1": "レッドストーン信号を受けたとき",
|
||||
"block.create.controller_rail.tooltip.behaviour1": "通過する_トロッコ_を_信号の強度_に対応した速度に_加速_または_減速_します。また、隣接するコントローラレールにレッドストーン信号を伝達します。強度の異なる2つのコントローラレールにレッドストーン信号を供給すると、それらの間のレールはその信号の変化を補間します。",
|
||||
|
||||
"block.create.speedometer.tooltip": "スピードメーター",
|
||||
"block.create.speedometer.tooltip.summary": "接続された機械の_回転速度_を測定して表示します。 _レッドストーンコンパレーター_に対応しています。",
|
||||
"block.create.speedometer.tooltip": "速度メーター",
|
||||
"block.create.speedometer.tooltip.summary": "接続された機械の_回転速度_を測定して表示します。_レッドストーンコンパレーター_に対応しています。",
|
||||
"block.create.speedometer.tooltip.condition1": "回転したとき",
|
||||
"block.create.speedometer.tooltip.behaviour1": "速度レベルに対応する色を表示します。 _緑_は低速、_青_は中速、_紫_は高速を示します。 一部の機械は、稼働に十分なレベルの速度を必要とします。",
|
||||
"block.create.speedometer.tooltip.behaviour1": "速度レベルに対応する色を表示します。_緑_は低速、_青_は中速、_紫_は高速を示します。一部の機械は、稼働に十分なレベルの速度を必要とします。",
|
||||
|
||||
"block.create.stressometer.tooltip": "ストレスメーター",
|
||||
"block.create.stressometer.tooltip.summary": "接続された動力ネットワーク全体の応力を測定して表示します。 _レッドストーンコンパレーター_に対応しています。",
|
||||
"block.create.stressometer.tooltip": "速度メーター",
|
||||
"block.create.stressometer.tooltip.summary": "接続された動力ネットワーク全体の応力を測定して表示します。_レッドストーンコンパレーター_に対応しています。",
|
||||
"block.create.stressometer.tooltip.condition1": "回転したとき",
|
||||
"block.create.stressometer.tooltip.behaviour1": "応力レベルに対応する色を表示します。 _過度に応力がかかった(超過応力)ネットワーク_の機械は全て停止します。応力は動力ネットワークに_原動機_を追加することで緩和することができます。",
|
||||
"block.create.stressometer.tooltip.behaviour1": "応力レベルに対応する色を表示します。_過度に応力がかかった(超過応力)ネットワーク_の機械は全て停止します。応力は動力ネットワークに_原動機_を追加することで緩和することができます。",
|
||||
|
||||
"item.create.sand_paper.tooltip": "紙やすり",
|
||||
"item.create.sand_paper.tooltip.summary": "_素材_を_磨く_のに使える荒い紙。デプロイヤーに自動的で磨かせることもできます。",
|
||||
@ -1766,7 +1772,7 @@
|
||||
"item.create.builders_tea.tooltip.summary": "_やる気_がみなぎる、一日の始まりに最適な飲み物。",
|
||||
|
||||
"item.create.refined_radiance.tooltip": "洗練された輝き",
|
||||
"item.create.refined_radiance.tooltip.summary": "_吸収した光_から鍛造した色彩素材。",
|
||||
"item.create.refined_radiance.tooltip.summary": "_吸収した輝き_から鍛造した色彩素材。",
|
||||
|
||||
"item.create.shadow_steel.tooltip": "シャドウスチール",
|
||||
"item.create.shadow_steel.tooltip.summary": "_奈落の虚無_から鍛造した色彩素材。",
|
||||
@ -1777,7 +1783,7 @@
|
||||
"item.create.minecart_coupling.tooltip.behaviour1": "2台のトロッコを連結します。それらは移動中に一定の距離を保とうします。",
|
||||
|
||||
"item.create.crafter_slot_cover.tooltip": "スロットカバー",
|
||||
"item.create.crafter_slot_cover.tooltip.summary": "取り付けた_メカニカルクラフター_をレシピの空のスロットとして示します。 クラフターは必ずしも正方形である必要はありません。 これは、_同じアイテムが離れた場所にある_レシピに便利です。",
|
||||
"item.create.crafter_slot_cover.tooltip.summary": "取り付けた_メカニカルクラフター_をレシピの空のスロットとして示します。クラフターは必ずしも正方形である必要はありません。これは、_同じアイテムが離れた場所にある_レシピに便利です。",
|
||||
|
||||
"create.tooltip.wip": "WIP",
|
||||
"create.tooltip.workInProgress": "作業中です!",
|
||||
@ -1785,10 +1791,10 @@
|
||||
"create.tooltip.randomWipDescription1": "赤ちゃんパンダは、このアイテムを使用するたびに死にます。そう、いつでもね。",
|
||||
"create.tooltip.randomWipDescription2": "自己責任。",
|
||||
"create.tooltip.randomWipDescription3": "これはあなたが探しているアイテムではありません。*人差し指を振って*ちっちっちっ、解散!",
|
||||
"create.tooltip.randomWipDescription4": "このアイテムは10秒で自爆します。 10、9、8 ...",
|
||||
"create.tooltip.randomWipDescription4": "このアイテムは10秒で自爆します。10、9、8 ...",
|
||||
"create.tooltip.randomWipDescription5": "私を信じて、それは無駄だ。",
|
||||
"create.tooltip.randomWipDescription6": "このアイテムを使用することにより、お客様はここに免責事項に同意し、その条件に同意するものとします。",
|
||||
"create.tooltip.randomWipDescription7": "これは君に向いていないかもしれない。 あれはどう??",
|
||||
"create.tooltip.randomWipDescription7": "これは君に向いていないかもしれない。あれはどう??",
|
||||
"create.tooltip.randomWipDescription8": "それを使ったことをすぐ後悔する。",
|
||||
|
||||
"_": "Thank you for translating Create!"
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"_": "Missing Localizations: 59",
|
||||
"_": "Missing Localizations: 65",
|
||||
|
||||
"_": "->------------------------] Game Elements [------------------------<-",
|
||||
|
||||
@ -827,6 +827,12 @@
|
||||
"create.gui.goggles.kinetic_stats": "가동 상태:",
|
||||
"create.gui.goggles.at_current_speed": "현재 에너지량",
|
||||
"create.gui.goggles.pole_length": "UNLOCALIZED: Pole Length:",
|
||||
"create.gui.assembly.exception": "UNLOCALIZED: This Contraption was unable to assemble:",
|
||||
"create.gui.assembly.exception.unmovableBlock": "UNLOCALIZED: Unmovable Block (%4$s) at [%1$s %2$s %3$s]",
|
||||
"create.gui.assembly.exception.chunkNotLoaded": "UNLOCALIZED: The Block at [%1$s %2$s %3$s] was not in a loaded chunk",
|
||||
"create.gui.assembly.exception.structureTooLarge": "UNLOCALIZED: There are too many Blocks included in the contraption.\nThe configured maximum is: %1$s",
|
||||
"create.gui.assembly.exception.tooManyPistonPoles": "UNLOCALIZED: There are too many extension Poles attached to this Piston.\nThe configured maximum is: %1$s",
|
||||
"create.gui.assembly.exception.noPistonPoles": "UNLOCALIZED: The Piston is missing some extension Poles",
|
||||
"create.gui.gauge.info_header": "게이지 정보:",
|
||||
"create.gui.speedometer.title": "회전 속도",
|
||||
"create.gui.stressometer.title": "네트워크 부하",
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"_": "Missing Localizations: 1159",
|
||||
"_": "Missing Localizations: 1165",
|
||||
|
||||
"_": "->------------------------] Game Elements [------------------------<-",
|
||||
|
||||
@ -827,6 +827,12 @@
|
||||
"create.gui.goggles.kinetic_stats": "UNLOCALIZED: Kinetic Stats:",
|
||||
"create.gui.goggles.at_current_speed": "UNLOCALIZED: at current speed",
|
||||
"create.gui.goggles.pole_length": "UNLOCALIZED: Pole Length:",
|
||||
"create.gui.assembly.exception": "UNLOCALIZED: This Contraption was unable to assemble:",
|
||||
"create.gui.assembly.exception.unmovableBlock": "UNLOCALIZED: Unmovable Block (%4$s) at [%1$s %2$s %3$s]",
|
||||
"create.gui.assembly.exception.chunkNotLoaded": "UNLOCALIZED: The Block at [%1$s %2$s %3$s] was not in a loaded chunk",
|
||||
"create.gui.assembly.exception.structureTooLarge": "UNLOCALIZED: There are too many Blocks included in the contraption.\nThe configured maximum is: %1$s",
|
||||
"create.gui.assembly.exception.tooManyPistonPoles": "UNLOCALIZED: There are too many extension Poles attached to this Piston.\nThe configured maximum is: %1$s",
|
||||
"create.gui.assembly.exception.noPistonPoles": "UNLOCALIZED: The Piston is missing some extension Poles",
|
||||
"create.gui.gauge.info_header": "UNLOCALIZED: Gauge Information:",
|
||||
"create.gui.speedometer.title": "UNLOCALIZED: Rotation Speed",
|
||||
"create.gui.stressometer.title": "UNLOCALIZED: Network Stress",
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"_": "Missing Localizations: 1225",
|
||||
"_": "Missing Localizations: 1231",
|
||||
|
||||
"_": "->------------------------] Game Elements [------------------------<-",
|
||||
|
||||
@ -827,6 +827,12 @@
|
||||
"create.gui.goggles.kinetic_stats": "UNLOCALIZED: Kinetic Stats:",
|
||||
"create.gui.goggles.at_current_speed": "UNLOCALIZED: at current speed",
|
||||
"create.gui.goggles.pole_length": "UNLOCALIZED: Pole Length:",
|
||||
"create.gui.assembly.exception": "UNLOCALIZED: This Contraption was unable to assemble:",
|
||||
"create.gui.assembly.exception.unmovableBlock": "UNLOCALIZED: Unmovable Block (%4$s) at [%1$s %2$s %3$s]",
|
||||
"create.gui.assembly.exception.chunkNotLoaded": "UNLOCALIZED: The Block at [%1$s %2$s %3$s] was not in a loaded chunk",
|
||||
"create.gui.assembly.exception.structureTooLarge": "UNLOCALIZED: There are too many Blocks included in the contraption.\nThe configured maximum is: %1$s",
|
||||
"create.gui.assembly.exception.tooManyPistonPoles": "UNLOCALIZED: There are too many extension Poles attached to this Piston.\nThe configured maximum is: %1$s",
|
||||
"create.gui.assembly.exception.noPistonPoles": "UNLOCALIZED: The Piston is missing some extension Poles",
|
||||
"create.gui.gauge.info_header": "UNLOCALIZED: Gauge Information:",
|
||||
"create.gui.speedometer.title": "UNLOCALIZED: Rotation Speed",
|
||||
"create.gui.stressometer.title": "UNLOCALIZED: Network Stress",
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"_": "Missing Localizations: 5",
|
||||
"_": "Missing Localizations: 11",
|
||||
|
||||
"_": "->------------------------] Game Elements [------------------------<-",
|
||||
|
||||
@ -827,6 +827,12 @@
|
||||
"create.gui.goggles.kinetic_stats": "Кинетическая статистика:",
|
||||
"create.gui.goggles.at_current_speed": "На текущей скорости",
|
||||
"create.gui.goggles.pole_length": "Длина поршня",
|
||||
"create.gui.assembly.exception": "UNLOCALIZED: This Contraption was unable to assemble:",
|
||||
"create.gui.assembly.exception.unmovableBlock": "UNLOCALIZED: Unmovable Block (%4$s) at [%1$s %2$s %3$s]",
|
||||
"create.gui.assembly.exception.chunkNotLoaded": "UNLOCALIZED: The Block at [%1$s %2$s %3$s] was not in a loaded chunk",
|
||||
"create.gui.assembly.exception.structureTooLarge": "UNLOCALIZED: There are too many Blocks included in the contraption.\nThe configured maximum is: %1$s",
|
||||
"create.gui.assembly.exception.tooManyPistonPoles": "UNLOCALIZED: There are too many extension Poles attached to this Piston.\nThe configured maximum is: %1$s",
|
||||
"create.gui.assembly.exception.noPistonPoles": "UNLOCALIZED: The Piston is missing some extension Poles",
|
||||
"create.gui.gauge.info_header": "Калибровочная информация:",
|
||||
"create.gui.speedometer.title": "Скорость вращения",
|
||||
"create.gui.stressometer.title": "Сетевой момент",
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"_": "Missing Localizations: 3",
|
||||
"_": "Missing Localizations: 9",
|
||||
|
||||
"_": "->------------------------] Game Elements [------------------------<-",
|
||||
|
||||
@ -827,6 +827,12 @@
|
||||
"create.gui.goggles.kinetic_stats": "动力学状态:",
|
||||
"create.gui.goggles.at_current_speed": "当前速度应力值",
|
||||
"create.gui.goggles.pole_length": "活塞杆长度:",
|
||||
"create.gui.assembly.exception": "UNLOCALIZED: This Contraption was unable to assemble:",
|
||||
"create.gui.assembly.exception.unmovableBlock": "UNLOCALIZED: Unmovable Block (%4$s) at [%1$s %2$s %3$s]",
|
||||
"create.gui.assembly.exception.chunkNotLoaded": "UNLOCALIZED: The Block at [%1$s %2$s %3$s] was not in a loaded chunk",
|
||||
"create.gui.assembly.exception.structureTooLarge": "UNLOCALIZED: There are too many Blocks included in the contraption.\nThe configured maximum is: %1$s",
|
||||
"create.gui.assembly.exception.tooManyPistonPoles": "UNLOCALIZED: There are too many extension Poles attached to this Piston.\nThe configured maximum is: %1$s",
|
||||
"create.gui.assembly.exception.noPistonPoles": "UNLOCALIZED: The Piston is missing some extension Poles",
|
||||
"create.gui.gauge.info_header": "仪表信息:",
|
||||
"create.gui.speedometer.title": "旋转速度",
|
||||
"create.gui.stressometer.title": "网络应力",
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"_": "Missing Localizations: 8",
|
||||
"_": "Missing Localizations: 14",
|
||||
|
||||
"_": "->------------------------] Game Elements [------------------------<-",
|
||||
|
||||
@ -827,6 +827,12 @@
|
||||
"create.gui.goggles.kinetic_stats": "機械學狀態:",
|
||||
"create.gui.goggles.at_current_speed": "現在速度動能值",
|
||||
"create.gui.goggles.pole_length": "UNLOCALIZED: Pole Length:",
|
||||
"create.gui.assembly.exception": "UNLOCALIZED: This Contraption was unable to assemble:",
|
||||
"create.gui.assembly.exception.unmovableBlock": "UNLOCALIZED: Unmovable Block (%4$s) at [%1$s %2$s %3$s]",
|
||||
"create.gui.assembly.exception.chunkNotLoaded": "UNLOCALIZED: The Block at [%1$s %2$s %3$s] was not in a loaded chunk",
|
||||
"create.gui.assembly.exception.structureTooLarge": "UNLOCALIZED: There are too many Blocks included in the contraption.\nThe configured maximum is: %1$s",
|
||||
"create.gui.assembly.exception.tooManyPistonPoles": "UNLOCALIZED: There are too many extension Poles attached to this Piston.\nThe configured maximum is: %1$s",
|
||||
"create.gui.assembly.exception.noPistonPoles": "UNLOCALIZED: The Piston is missing some extension Poles",
|
||||
"create.gui.gauge.info_header": "儀表訊息:",
|
||||
"create.gui.speedometer.title": "旋轉速度",
|
||||
"create.gui.stressometer.title": "網路動能",
|
||||
|
@ -7,15 +7,21 @@ import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import com.simibubi.create.content.contraptions.base.KineticRenderMaterials;
|
||||
import com.simibubi.create.content.contraptions.base.RotatingData;
|
||||
import com.simibubi.create.content.contraptions.fluids.FluidTransportBehaviour.AttachmentTypes;
|
||||
import com.simibubi.create.content.contraptions.processing.burner.BlazeBurnerBlock.HeatLevel;
|
||||
import com.simibubi.create.content.contraptions.relays.belt.BeltData;
|
||||
import com.simibubi.create.foundation.render.SuperByteBuffer;
|
||||
import com.simibubi.create.foundation.render.backend.instancing.InstancedModel;
|
||||
import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer;
|
||||
import com.simibubi.create.foundation.utility.AngleHelper;
|
||||
import com.simibubi.create.foundation.utility.Iterate;
|
||||
import com.simibubi.create.foundation.utility.Lang;
|
||||
import com.simibubi.create.foundation.utility.MatrixStacker;
|
||||
import com.simibubi.create.foundation.utility.SuperByteBuffer;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.renderer.model.IBakedModel;
|
||||
@ -223,4 +229,30 @@ public class AllBlockPartials {
|
||||
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;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import com.simibubi.create.foundation.block.IBlockVertexColor;
|
||||
import com.simibubi.create.foundation.block.render.ColoredVertexModel;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.RedstoneWireBlock;
|
||||
@ -18,9 +22,6 @@ import net.minecraft.world.GrassColors;
|
||||
import net.minecraft.world.IBlockDisplayReader;
|
||||
import net.minecraft.world.biome.BiomeColors;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class AllColorHandlers {
|
||||
|
||||
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.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.ControlledContraptionEntityRenderer;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.OrientedContraptionEntity;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.OrientedContraptionEntityRenderer;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.gantry.GantryContraptionEntity;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.gantry.GantryContraptionEntityRenderer;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.glue.SuperGlueEntity;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.glue.SuperGlueRenderer;
|
||||
import com.simibubi.create.foundation.utility.Lang;
|
||||
@ -62,11 +61,11 @@ public class AllEntityTypes {
|
||||
@OnlyIn(value = Dist.CLIENT)
|
||||
public static void registerRenderers() {
|
||||
RenderingRegistry.registerEntityRenderingHandler(CONTROLLED_CONTRAPTION.get(),
|
||||
ControlledContraptionEntityRenderer::new);
|
||||
ContraptionEntityRenderer::new);
|
||||
RenderingRegistry.registerEntityRenderingHandler(ORIENTED_CONTRAPTION.get(),
|
||||
OrientedContraptionEntityRenderer::new);
|
||||
RenderingRegistry.registerEntityRenderingHandler(GANTRY_CONTRAPTION.get(),
|
||||
GantryContraptionEntityRenderer::new);
|
||||
ContraptionEntityRenderer::new);
|
||||
RenderingRegistry.registerEntityRenderingHandler(SUPER_GLUE.get(), SuperGlueRenderer::new);
|
||||
RenderingRegistry.registerEntityRenderingHandler(SEAT.get(), SeatEntity.Render::new);
|
||||
}
|
||||
|
@ -284,6 +284,7 @@ public class AllItems {
|
||||
.register();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private static ItemEntry<HiddenIngredientItem> hiddenIngredient(String name) {
|
||||
return REGISTRATE.item(name, HiddenIngredientItem::new)
|
||||
.register();
|
||||
|
@ -51,9 +51,9 @@ public class AllSpriteShifts {
|
||||
FLUID_TANK = getCT(CTType.CROSS, "fluid_tank"),
|
||||
CREATIVE_FLUID_TANK = getCT(CTType.CROSS, "creative_fluid_tank");
|
||||
|
||||
public static final SpriteShiftEntry BELT = SpriteShifter.get("block/belt", "block/belt_animated"),
|
||||
BELT_OFFSET = SpriteShifter.get("block/belt_offset", "block/belt_animated"),
|
||||
BELT_DIAGONAL = SpriteShifter.get("block/belt_diagonal", "block/belt_diagonal_animated"),
|
||||
public static final SpriteShiftEntry BELT = SpriteShifter.get("block/belt", "block/belt_scroll"),
|
||||
BELT_OFFSET = SpriteShifter.get("block/belt_offset", "block/belt_scroll"),
|
||||
BELT_DIAGONAL = SpriteShifter.get("block/belt_diagonal", "block/belt_diagonal_scroll"),
|
||||
ANDESIDE_BELT_CASING = SpriteShifter.get("block/brass_casing_belt", "block/andesite_casing_belt"),
|
||||
CRAFTER_THINGIES = SpriteShifter.get("block/crafter_thingies", "block/crafter_thingies");
|
||||
|
||||
@ -92,9 +92,9 @@ public class AllSpriteShifts {
|
||||
|
||||
for (DyeColor color : DyeColor.values()) {
|
||||
String id = color.getString();
|
||||
DYED_BELTS.put(color, SpriteShifter.get("block/belt", "block/belt/" + id));
|
||||
DYED_OFFSET_BELTS.put(color, SpriteShifter.get("block/belt_offset", "block/belt/" + id));
|
||||
DYED_DIAGONAL_BELTS.put(color, SpriteShifter.get("block/belt_diagonal", "block/belt/" + id + "_diagonal"));
|
||||
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 + "_scroll"));
|
||||
DYED_DIAGONAL_BELTS.put(color, SpriteShifter.get("block/belt_diagonal", "block/belt/" + id + "_diagonal_scroll"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,12 @@
|
||||
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.ShaftlessCogInstance;
|
||||
import com.simibubi.create.content.contraptions.base.SingleRotatingInstance;
|
||||
import com.simibubi.create.content.contraptions.components.actors.DrillInstance;
|
||||
import com.simibubi.create.content.contraptions.components.actors.DrillRenderer;
|
||||
import com.simibubi.create.content.contraptions.components.actors.DrillTileEntity;
|
||||
import com.simibubi.create.content.contraptions.components.actors.HarvesterRenderer;
|
||||
@ -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.clock.CuckooClockRenderer;
|
||||
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.MechanicalCrafterTileEntity;
|
||||
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.fan.EncasedFanRenderer;
|
||||
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.flywheel.FlyWheelInstance;
|
||||
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.engine.EngineRenderer;
|
||||
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.MillstoneTileEntity;
|
||||
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.press.MechanicalPressRenderer;
|
||||
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.SawTileEntity;
|
||||
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.turntable.TurntableTileEntity;
|
||||
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.PumpTileEntity;
|
||||
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.SpeedControllerTileEntity;
|
||||
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.BeltTileEntity;
|
||||
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.EncasedShaftRenderer;
|
||||
import com.simibubi.create.content.contraptions.relays.encased.EncasedShaftTileEntity;
|
||||
import com.simibubi.create.content.contraptions.relays.encased.ShaftInstance;
|
||||
import com.simibubi.create.content.contraptions.relays.encased.SplitShaftInstance;
|
||||
import com.simibubi.create.content.contraptions.relays.encased.SplitShaftRenderer;
|
||||
import com.simibubi.create.content.contraptions.relays.gauge.GaugeRenderer;
|
||||
import com.simibubi.create.content.contraptions.relays.gauge.SpeedGaugeTileEntity;
|
||||
import com.simibubi.create.content.contraptions.relays.gauge.StressGaugeTileEntity;
|
||||
import com.simibubi.create.content.contraptions.relays.gearbox.GearboxInstance;
|
||||
import com.simibubi.create.content.contraptions.relays.gearbox.GearboxRenderer;
|
||||
import com.simibubi.create.content.contraptions.relays.gearbox.GearboxTileEntity;
|
||||
import com.simibubi.create.content.contraptions.relays.gearbox.GearshiftTileEntity;
|
||||
@ -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.inventories.AdjustableCrateTileEntity;
|
||||
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.ArmTileEntity;
|
||||
import com.simibubi.create.content.logistics.block.redstone.AnalogLeverRenderer;
|
||||
@ -138,36 +155,42 @@ public class AllTileEntities {
|
||||
.tileEntity("simple_kinetic", SimpleKineticTileEntity::new)
|
||||
.validBlocks(AllBlocks.SHAFT, AllBlocks.COGWHEEL, AllBlocks.LARGE_COGWHEEL)
|
||||
.renderer(() -> KineticTileEntityRenderer::new)
|
||||
.onRegister(SingleRotatingInstance::register)
|
||||
.register();
|
||||
|
||||
public static final TileEntityEntry<CreativeMotorTileEntity> MOTOR = Create.registrate()
|
||||
.tileEntity("motor", CreativeMotorTileEntity::new)
|
||||
.validBlocks(AllBlocks.CREATIVE_MOTOR)
|
||||
.renderer(() -> CreativeMotorRenderer::new)
|
||||
.onRegister(HalfShaftInstance::register)
|
||||
.register();
|
||||
|
||||
public static final TileEntityEntry<GearboxTileEntity> GEARBOX = Create.registrate()
|
||||
.tileEntity("gearbox", GearboxTileEntity::new)
|
||||
.validBlocks(AllBlocks.GEARBOX)
|
||||
.renderer(() -> GearboxRenderer::new)
|
||||
.onRegister(GearboxInstance::register)
|
||||
.register();
|
||||
|
||||
public static final TileEntityEntry<EncasedShaftTileEntity> ENCASED_SHAFT = Create.registrate()
|
||||
.tileEntity("encased_shaft", EncasedShaftTileEntity::new)
|
||||
.validBlocks(AllBlocks.ANDESITE_ENCASED_SHAFT, AllBlocks.BRASS_ENCASED_SHAFT, AllBlocks.ENCASED_CHAIN_DRIVE)
|
||||
.renderer(() -> EncasedShaftRenderer::new)
|
||||
.onRegister(ShaftInstance::register)
|
||||
.register();
|
||||
|
||||
public static final TileEntityEntry<AdjustablePulleyTileEntity> ADJUSTABLE_PULLEY = Create.registrate()
|
||||
.tileEntity("adjustable_pulley", AdjustablePulleyTileEntity::new)
|
||||
.validBlocks(AllBlocks.ADJUSTABLE_CHAIN_GEARSHIFT)
|
||||
.renderer(() -> EncasedShaftRenderer::new)
|
||||
.onRegister(ShaftInstance::register)
|
||||
.register();
|
||||
|
||||
public static final TileEntityEntry<EncasedFanTileEntity> ENCASED_FAN = Create.registrate()
|
||||
.tileEntity("encased_fan", EncasedFanTileEntity::new)
|
||||
.validBlocks(AllBlocks.ENCASED_FAN)
|
||||
.renderer(() -> EncasedFanRenderer::new)
|
||||
.onRegister(FanInstance::register)
|
||||
.register();
|
||||
|
||||
public static final TileEntityEntry<NozzleTileEntity> NOZZLE = Create.registrate()
|
||||
@ -180,18 +203,21 @@ public class AllTileEntities {
|
||||
.tileEntity("clutch", ClutchTileEntity::new)
|
||||
.validBlocks(AllBlocks.CLUTCH)
|
||||
.renderer(() -> SplitShaftRenderer::new)
|
||||
.onRegister(SplitShaftInstance::register)
|
||||
.register();
|
||||
|
||||
public static final TileEntityEntry<GearshiftTileEntity> GEARSHIFT = Create.registrate()
|
||||
.tileEntity("gearshift", GearshiftTileEntity::new)
|
||||
.validBlocks(AllBlocks.GEARSHIFT)
|
||||
.renderer(() -> SplitShaftRenderer::new)
|
||||
.onRegister(SplitShaftInstance::register)
|
||||
.register();
|
||||
|
||||
public static final TileEntityEntry<TurntableTileEntity> TURNTABLE = Create.registrate()
|
||||
.tileEntity("turntable", TurntableTileEntity::new)
|
||||
.validBlocks(AllBlocks.TURNTABLE)
|
||||
.renderer(() -> KineticTileEntityRenderer::new)
|
||||
.onRegister(SingleRotatingInstance::register)
|
||||
.register();
|
||||
|
||||
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.DYED_VALVE_HANDLES)
|
||||
.renderer(() -> HandCrankRenderer::new)
|
||||
.onRegister(SingleRotatingInstance::register)
|
||||
.register();
|
||||
|
||||
public static final TileEntityEntry<CuckooClockTileEntity> CUCKOO_CLOCK = Create.registrate()
|
||||
.tileEntity("cuckoo_clock", CuckooClockTileEntity::new)
|
||||
.validBlocks(AllBlocks.CUCKOO_CLOCK, AllBlocks.MYSTERIOUS_CUCKOO_CLOCK)
|
||||
.renderer(() -> CuckooClockRenderer::new)
|
||||
.onRegister(HorizontalHalfShaftInstance::register)
|
||||
.register();
|
||||
|
||||
public static final TileEntityEntry<GantryShaftTileEntity> GANTRY_SHAFT = Create.registrate()
|
||||
.tileEntity("gantry_shaft", GantryShaftTileEntity::new)
|
||||
.validBlocks(AllBlocks.GANTRY_SHAFT)
|
||||
.renderer(() -> KineticTileEntityRenderer::new)
|
||||
.onRegister(SingleRotatingInstance::register)
|
||||
.register();
|
||||
|
||||
public static final TileEntityEntry<GantryPinionTileEntity> GANTRY_PINION = Create.registrate()
|
||||
.tileEntity("gantry_pinion", GantryPinionTileEntity::new)
|
||||
.validBlocks(AllBlocks.GANTRY_PINION)
|
||||
.renderer(() -> GantryPinionRenderer::new)
|
||||
.onRegister(ShaftInstance::register)
|
||||
.register();
|
||||
|
||||
public static final TileEntityEntry<PumpTileEntity> MECHANICAL_PUMP = Create.registrate()
|
||||
.tileEntity("mechanical_pump", PumpTileEntity::new)
|
||||
.validBlocks(AllBlocks.MECHANICAL_PUMP)
|
||||
.renderer(() -> PumpRenderer::new)
|
||||
.onRegister(PumpCogInstance::register)
|
||||
.register();
|
||||
|
||||
public static final TileEntityEntry<SmartFluidPipeTileEntity> SMART_FLUID_PIPE = Create.registrate()
|
||||
@ -251,6 +282,7 @@ public class AllTileEntities {
|
||||
.tileEntity("fluid_valve", FluidValveTileEntity::new)
|
||||
.validBlocks(AllBlocks.FLUID_VALVE)
|
||||
.renderer(() -> FluidValveRenderer::new)
|
||||
.onRegister(ShaftInstance::register)
|
||||
.register();
|
||||
|
||||
public static final TileEntityEntry<FluidTankTileEntity> FLUID_TANK = Create.registrate()
|
||||
@ -269,6 +301,7 @@ public class AllTileEntities {
|
||||
.tileEntity("hose_pulley", HosePulleyTileEntity::new)
|
||||
.validBlocks(AllBlocks.HOSE_PULLEY)
|
||||
.renderer(() -> HosePulleyRenderer::new)
|
||||
.onRegister(ShaftInstance::register)
|
||||
.register();
|
||||
|
||||
public static final TileEntityEntry<SpoutTileEntity> SPOUT = Create.registrate()
|
||||
@ -287,6 +320,7 @@ public class AllTileEntities {
|
||||
.tileEntity("belt", BeltTileEntity::new)
|
||||
.validBlocks(AllBlocks.BELT)
|
||||
.renderer(() -> BeltRenderer::new)
|
||||
.onRegister(BeltInstance::register)
|
||||
.register();
|
||||
|
||||
public static final TileEntityEntry<ChuteTileEntity> CHUTE = Create.registrate()
|
||||
@ -317,36 +351,42 @@ public class AllTileEntities {
|
||||
.tileEntity("mechanical_arm", ArmTileEntity::new)
|
||||
.validBlocks(AllBlocks.MECHANICAL_ARM)
|
||||
.renderer(() -> ArmRenderer::new)
|
||||
.onRegister(ArmInstance::register)
|
||||
.register();
|
||||
|
||||
public static final TileEntityEntry<MechanicalPistonTileEntity> MECHANICAL_PISTON = Create.registrate()
|
||||
.tileEntity("mechanical_piston", MechanicalPistonTileEntity::new)
|
||||
.validBlocks(AllBlocks.MECHANICAL_PISTON, AllBlocks.STICKY_MECHANICAL_PISTON)
|
||||
.renderer(() -> MechanicalPistonRenderer::new)
|
||||
.onRegister(ShaftInstance::register)
|
||||
.register();
|
||||
|
||||
public static final TileEntityEntry<WindmillBearingTileEntity> WINDMILL_BEARING = Create.registrate()
|
||||
.tileEntity("windmill_bearing", WindmillBearingTileEntity::new)
|
||||
.validBlocks(AllBlocks.WINDMILL_BEARING)
|
||||
.renderer(() -> BearingRenderer::new)
|
||||
.onRegister(BackHalfShaftInstance::register)
|
||||
.register();
|
||||
|
||||
public static final TileEntityEntry<MechanicalBearingTileEntity> MECHANICAL_BEARING = Create.registrate()
|
||||
.tileEntity("mechanical_bearing", MechanicalBearingTileEntity::new)
|
||||
.validBlocks(AllBlocks.MECHANICAL_BEARING)
|
||||
.renderer(() -> BearingRenderer::new)
|
||||
.onRegister(BackHalfShaftInstance::register)
|
||||
.register();
|
||||
|
||||
public static final TileEntityEntry<ClockworkBearingTileEntity> CLOCKWORK_BEARING = Create.registrate()
|
||||
.tileEntity("clockwork_bearing", ClockworkBearingTileEntity::new)
|
||||
.validBlocks(AllBlocks.CLOCKWORK_BEARING)
|
||||
.renderer(() -> BearingRenderer::new)
|
||||
.onRegister(BackHalfShaftInstance::register)
|
||||
.register();
|
||||
|
||||
public static final TileEntityEntry<PulleyTileEntity> ROPE_PULLEY = Create.registrate()
|
||||
.tileEntity("rope_pulley", PulleyTileEntity::new)
|
||||
.validBlocks(AllBlocks.ROPE_PULLEY)
|
||||
.renderer(() -> PulleyRenderer::new)
|
||||
.onRegister(ShaftInstance::register)
|
||||
.register();
|
||||
|
||||
public static final TileEntityEntry<ChassisTileEntity> CHASSIS = Create.registrate()
|
||||
@ -359,12 +399,14 @@ public class AllTileEntities {
|
||||
.tileEntity("drill", DrillTileEntity::new)
|
||||
.validBlocks(AllBlocks.MECHANICAL_DRILL)
|
||||
.renderer(() -> DrillRenderer::new)
|
||||
.onRegister(DrillInstance::register)
|
||||
.register();
|
||||
|
||||
public static final TileEntityEntry<SawTileEntity> SAW = Create.registrate()
|
||||
.tileEntity("saw", SawTileEntity::new)
|
||||
.validBlocks(AllBlocks.MECHANICAL_SAW)
|
||||
.renderer(() -> SawRenderer::new)
|
||||
.onRegister(SawInstance::register)
|
||||
.register();
|
||||
|
||||
public static final TileEntityEntry<HarvesterTileEntity> HARVESTER = Create.registrate()
|
||||
@ -390,6 +432,7 @@ public class AllTileEntities {
|
||||
.tileEntity("flywheel", FlywheelTileEntity::new)
|
||||
.validBlocks(AllBlocks.FLYWHEEL)
|
||||
.renderer(() -> FlywheelRenderer::new)
|
||||
.onRegister(FlyWheelInstance::register)
|
||||
.register();
|
||||
|
||||
public static final TileEntityEntry<FurnaceEngineTileEntity> FURNACE_ENGINE = Create.registrate()
|
||||
@ -402,12 +445,14 @@ public class AllTileEntities {
|
||||
.tileEntity("millstone", MillstoneTileEntity::new)
|
||||
.validBlocks(AllBlocks.MILLSTONE)
|
||||
.renderer(() -> MillstoneRenderer::new)
|
||||
.onRegister(MillStoneCogInstance::register)
|
||||
.register();
|
||||
|
||||
public static final TileEntityEntry<CrushingWheelTileEntity> CRUSHING_WHEEL = Create.registrate()
|
||||
.tileEntity("crushing_wheel", CrushingWheelTileEntity::new)
|
||||
.validBlocks(AllBlocks.CRUSHING_WHEEL)
|
||||
.renderer(() -> KineticTileEntityRenderer::new)
|
||||
.onRegister(SingleRotatingInstance::register)
|
||||
.register();
|
||||
|
||||
public static final TileEntityEntry<CrushingWheelControllerTileEntity> CRUSHING_WHEEL_CONTROLLER =
|
||||
@ -421,24 +466,28 @@ public class AllTileEntities {
|
||||
.tileEntity("water_wheel", WaterWheelTileEntity::new)
|
||||
.validBlocks(AllBlocks.WATER_WHEEL)
|
||||
.renderer(() -> KineticTileEntityRenderer::new)
|
||||
.onRegister(SingleRotatingInstance::register)
|
||||
.register();
|
||||
|
||||
public static final TileEntityEntry<MechanicalPressTileEntity> MECHANICAL_PRESS = Create.registrate()
|
||||
.tileEntity("mechanical_press", MechanicalPressTileEntity::new)
|
||||
.validBlocks(AllBlocks.MECHANICAL_PRESS)
|
||||
.renderer(() -> MechanicalPressRenderer::new)
|
||||
.onRegister(ShaftInstance::register)
|
||||
.register();
|
||||
|
||||
public static final TileEntityEntry<MechanicalMixerTileEntity> MECHANICAL_MIXER = Create.registrate()
|
||||
.tileEntity("mechanical_mixer", MechanicalMixerTileEntity::new)
|
||||
.validBlocks(AllBlocks.MECHANICAL_MIXER)
|
||||
.renderer(() -> MechanicalMixerRenderer::new)
|
||||
.onRegister(ShaftlessCogInstance::register)
|
||||
.register();
|
||||
|
||||
public static final TileEntityEntry<DeployerTileEntity> DEPLOYER = Create.registrate()
|
||||
.tileEntity("deployer", DeployerTileEntity::new)
|
||||
.validBlocks(AllBlocks.DEPLOYER)
|
||||
.renderer(() -> DeployerRenderer::new)
|
||||
.onRegister(ShaftInstance::register)
|
||||
.register();
|
||||
|
||||
public static final TileEntityEntry<BasinTileEntity> BASIN = Create.registrate()
|
||||
@ -457,30 +506,35 @@ public class AllTileEntities {
|
||||
.tileEntity("mechanical_crafter", MechanicalCrafterTileEntity::new)
|
||||
.validBlocks(AllBlocks.MECHANICAL_CRAFTER)
|
||||
.renderer(() -> MechanicalCrafterRenderer::new)
|
||||
.onRegister(MechanicalCrafterInstance::register)
|
||||
.register();
|
||||
|
||||
public static final TileEntityEntry<SequencedGearshiftTileEntity> SEQUENCED_GEARSHIFT = Create.registrate()
|
||||
.tileEntity("sequenced_gearshift", SequencedGearshiftTileEntity::new)
|
||||
.validBlocks(AllBlocks.SEQUENCED_GEARSHIFT)
|
||||
.renderer(() -> SplitShaftRenderer::new)
|
||||
.onRegister(SplitShaftInstance::register)
|
||||
.register();
|
||||
|
||||
public static final TileEntityEntry<SpeedControllerTileEntity> ROTATION_SPEED_CONTROLLER = Create.registrate()
|
||||
.tileEntity("rotation_speed_controller", SpeedControllerTileEntity::new)
|
||||
.validBlocks(AllBlocks.ROTATION_SPEED_CONTROLLER)
|
||||
.renderer(() -> SpeedControllerRenderer::new)
|
||||
.onRegister(ShaftInstance::register)
|
||||
.register();
|
||||
|
||||
public static final TileEntityEntry<SpeedGaugeTileEntity> SPEEDOMETER = Create.registrate()
|
||||
.tileEntity("speedometer", SpeedGaugeTileEntity::new)
|
||||
.validBlocks(AllBlocks.SPEEDOMETER)
|
||||
.renderer(() -> GaugeRenderer::speed)
|
||||
.onRegister(ShaftInstance::register)
|
||||
.register();
|
||||
|
||||
public static final TileEntityEntry<StressGaugeTileEntity> STRESSOMETER = Create.registrate()
|
||||
.tileEntity("stressometer", StressGaugeTileEntity::new)
|
||||
.validBlocks(AllBlocks.STRESSOMETER)
|
||||
.renderer(() -> GaugeRenderer::stress)
|
||||
.onRegister(ShaftInstance::register)
|
||||
.register();
|
||||
|
||||
public static final TileEntityEntry<AnalogLeverTileEntity> ANALOG_LEVER = Create.registrate()
|
||||
|
@ -99,7 +99,7 @@ public class Create {
|
||||
AllConfigs.register();
|
||||
random = new Random();
|
||||
|
||||
DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> CreateClient.addClientListeners(modEventBus));
|
||||
DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> CreateClient.addClientListeners(modEventBus));
|
||||
}
|
||||
|
||||
public static void init(final FMLCommonSetupEvent event) {
|
||||
|
@ -6,7 +6,7 @@ import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
|
||||
import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.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.schematics.ClientSchematicLoader;
|
||||
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.item.CustomItemModels;
|
||||
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 net.minecraft.block.Block;
|
||||
@ -42,7 +46,9 @@ public class CreateClient {
|
||||
public static SchematicHandler schematicHandler;
|
||||
public static SchematicAndQuillHandler schematicAndQuillHandler;
|
||||
public static SuperByteBufferCache bufferCache;
|
||||
public static KineticRenderer kineticRenderer;
|
||||
public static final Outliner outliner = new Outliner();
|
||||
public static GhostBlocks ghostBlocks;
|
||||
|
||||
private static CustomBlockModels customBlockModels;
|
||||
private static CustomItemModels customItemModels;
|
||||
@ -56,16 +62,23 @@ public class CreateClient {
|
||||
modEventBus.addListener(CreateClient::onModelRegistry);
|
||||
modEventBus.addListener(CreateClient::onTextureStitch);
|
||||
modEventBus.addListener(AllParticleTypes::registerFactories);
|
||||
|
||||
Backend.init();
|
||||
OptifineHandler.init();
|
||||
}
|
||||
|
||||
public static void clientInit(FMLClientSetupEvent event) {
|
||||
kineticRenderer = new KineticRenderer();
|
||||
|
||||
schematicSender = new ClientSchematicLoader();
|
||||
schematicHandler = new SchematicHandler();
|
||||
schematicAndQuillHandler = new SchematicAndQuillHandler();
|
||||
|
||||
bufferCache = new SuperByteBufferCache();
|
||||
bufferCache.registerCompartment(KineticTileEntityRenderer.KINETIC_TILE);
|
||||
bufferCache.registerCompartment(ContraptionRenderer.CONTRAPTION, 20);
|
||||
bufferCache.registerCompartment(ContraptionRenderDispatcher.CONTRAPTION, 20);
|
||||
|
||||
ghostBlocks = new GhostBlocks();
|
||||
|
||||
AllKeys.register();
|
||||
AllContainerTypes.registerScreenFactories();
|
||||
@ -171,4 +184,9 @@ public class CreateClient {
|
||||
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 net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.state.properties.BlockStateProperties;
|
||||
import net.minecraft.util.Direction.Axis;
|
||||
|
||||
public abstract class AnimatedKinetics implements IDrawable {
|
||||
|
||||
public static float getCurrentAngle() {
|
||||
return ((AnimationTickHolder.ticks + Minecraft.getInstance().getRenderPartialTicks()) * 4f) % 360;
|
||||
return ((AnimationTickHolder.getRenderTick()) * 4f) % 360;
|
||||
}
|
||||
|
||||
protected BlockState shaft(Axis axis) {
|
||||
|
@ -1,13 +1,11 @@
|
||||
package com.simibubi.create.compat.jei.category.animations;
|
||||
|
||||
import static com.simibubi.create.foundation.utility.AnimationTickHolder.ticks;
|
||||
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import com.simibubi.create.AllBlockPartials;
|
||||
import com.simibubi.create.AllBlocks;
|
||||
import com.simibubi.create.foundation.gui.GuiGameElement;
|
||||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.util.Direction.Axis;
|
||||
import net.minecraft.util.math.vector.Vector3f;
|
||||
|
||||
@ -51,8 +49,7 @@ public class AnimatedPress extends AnimatedKinetics {
|
||||
}
|
||||
|
||||
private float getAnimatedHeadOffset() {
|
||||
float cycle = (ticks + Minecraft.getInstance()
|
||||
.getRenderPartialTicks()) % 30;
|
||||
float cycle = (AnimationTickHolder.getRenderTick()) % 30;
|
||||
if (cycle < 10) {
|
||||
float progress = cycle / 10;
|
||||
return -(progress * progress * progress);
|
||||
|
@ -1,7 +1,5 @@
|
||||
package com.simibubi.create.compat.jei.category.animations;
|
||||
|
||||
import static com.simibubi.create.foundation.utility.AnimationTickHolder.ticks;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
@ -9,8 +7,8 @@ import com.simibubi.create.AllBlockPartials;
|
||||
import com.simibubi.create.AllBlocks;
|
||||
import com.simibubi.create.foundation.fluid.FluidRenderer;
|
||||
import com.simibubi.create.foundation.gui.GuiGameElement;
|
||||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
||||
import net.minecraft.client.renderer.IRenderTypeBuffer.Impl;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
@ -39,8 +37,7 @@ public class AnimatedSpout extends AnimatedKinetics {
|
||||
.scale(scale)
|
||||
.render(matrixStack);
|
||||
|
||||
float cycle = (ticks + Minecraft.getInstance()
|
||||
.getRenderPartialTicks()) % 30;
|
||||
float cycle = AnimationTickHolder.getRenderTick() % 30;
|
||||
float squeeze = cycle < 20 ? MathHelper.sin((float) (cycle / 20f * Math.PI)) : 0;
|
||||
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 com.simibubi.create.Create;
|
||||
import com.simibubi.create.CreateClient;
|
||||
import com.simibubi.create.content.contraptions.KineticNetwork;
|
||||
import com.simibubi.create.content.contraptions.RotationPropagator;
|
||||
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.config.AllConfigs;
|
||||
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.TileEntityBehaviour;
|
||||
import com.simibubi.create.foundation.utility.Lang;
|
||||
@ -32,14 +35,18 @@ import net.minecraft.tileentity.TileEntityType;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.Direction.Axis;
|
||||
import net.minecraft.util.Direction.AxisDirection;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.util.text.StringTextComponent;
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
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
|
||||
implements ITickableTileEntity, IHaveGoggleInformation, IHaveHoveringInformation {
|
||||
implements ITickableTileEntity, IHaveGoggleInformation, IHaveHoveringInformation, IInstanceRendered {
|
||||
|
||||
public @Nullable Long network;
|
||||
public @Nullable BlockPos source;
|
||||
@ -247,6 +254,9 @@ public abstract class KineticTileEntity extends SmartTileEntity
|
||||
|
||||
if (clientPacket && overStressedBefore != overStressed && speed != 0)
|
||||
effects.triggerOverStressedEffect();
|
||||
|
||||
if (clientPacket)
|
||||
FastRenderDispatcher.enqueueUpdate(this);
|
||||
}
|
||||
|
||||
public float getGeneratedSpeed() {
|
||||
@ -459,7 +469,7 @@ public abstract class KineticTileEntity extends SmartTileEntity
|
||||
/**
|
||||
* Specify ratio of transferred rotation from this kinetic component to a
|
||||
* specific other.
|
||||
*
|
||||
*
|
||||
* @param target other Kinetic TE to transfer to
|
||||
* @param stateFrom this TE's blockstate
|
||||
* @param stateTo other TE's blockstate
|
||||
@ -480,7 +490,7 @@ public abstract class KineticTileEntity extends SmartTileEntity
|
||||
* Specify additional locations the rotation propagator should look for
|
||||
* potentially connected components. Neighbour list contains offset positions in
|
||||
* all 6 directions by default.
|
||||
*
|
||||
*
|
||||
* @param block
|
||||
* @param state
|
||||
* @param neighbours
|
||||
@ -507,7 +517,7 @@ public abstract class KineticTileEntity extends SmartTileEntity
|
||||
* circumstance. Shaft and cogwheel connections are already handled by internal
|
||||
* logic. Does not have to be specified on both ends, it is assumed that this
|
||||
* relation is symmetrical.
|
||||
*
|
||||
*
|
||||
* @param other
|
||||
* @param state
|
||||
* @param otherState
|
||||
@ -522,4 +532,42 @@ public abstract class KineticTileEntity extends SmartTileEntity
|
||||
return block.hasIntegratedCogwheel(world, pos, state);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoad() {
|
||||
super.onLoad();
|
||||
if (world != null && world.isRemote)
|
||||
DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> CreateClient.kineticRenderer.add(this));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onChunkUnloaded() {
|
||||
if (world != null && world.isRemote)
|
||||
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.content.contraptions.KineticDebugger;
|
||||
import com.simibubi.create.content.contraptions.relays.elementary.CogWheelBlock;
|
||||
import com.simibubi.create.foundation.render.Compartment;
|
||||
import com.simibubi.create.foundation.render.SuperByteBuffer;
|
||||
import com.simibubi.create.foundation.render.backend.FastRenderDispatcher;
|
||||
import com.simibubi.create.foundation.tileEntity.renderer.SafeTileEntityRenderer;
|
||||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||
import com.simibubi.create.foundation.utility.ColorHelper;
|
||||
import com.simibubi.create.foundation.utility.SuperByteBuffer;
|
||||
import com.simibubi.create.foundation.utility.SuperByteBufferCache.Compartment;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
||||
@ -38,6 +39,8 @@ public class KineticTileEntityRenderer extends SafeTileEntityRenderer<KineticTil
|
||||
@Override
|
||||
protected void renderSafe(KineticTileEntity te, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffer,
|
||||
int light, int overlay) {
|
||||
if (FastRenderDispatcher.available(te.getWorld())) return;
|
||||
|
||||
for (RenderType type : RenderType.getBlockLayers())
|
||||
if (RenderTypeLookup.canRenderInLayer(te.getBlockState(), type))
|
||||
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) {
|
||||
case COUNTERCLOCKWISE_90:
|
||||
case CLOCKWISE_90:
|
||||
switch ((Direction.Axis) state.get(AXIS)) {
|
||||
switch (state.get(AXIS)) {
|
||||
case X:
|
||||
return state.with(AXIS, Direction.Axis.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.vector.Vector3d;
|
||||
|
||||
public class BellMovementBehaviour extends MovementBehaviour {
|
||||
@Override
|
||||
public boolean hasSpecialMovementRenderer() {
|
||||
return false;
|
||||
public boolean renderAsNormalTileEntity() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -10,8 +10,8 @@ import net.minecraft.particles.ParticleTypes;
|
||||
|
||||
public class CampfireMovementBehaviour extends MovementBehaviour {
|
||||
@Override
|
||||
public boolean hasSpecialMovementRenderer() {
|
||||
return false;
|
||||
public boolean renderAsNormalTileEntity() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@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.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 net.minecraft.block.BlockState;
|
||||
@ -31,7 +33,18 @@ public class DrillMovementBehaviour extends BlockBreakingMovementBehaviour {
|
||||
@OnlyIn(value = Dist.CLIENT)
|
||||
public void renderInContraption(MovementContext context, MatrixStack ms, MatrixStack msLocal,
|
||||
IRenderTypeBuffer buffer) {
|
||||
DrillRenderer.renderInContraption(context, ms, msLocal, buffer);
|
||||
if (!FastRenderDispatcher.available())
|
||||
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
|
||||
|
@ -7,10 +7,10 @@ import com.simibubi.create.AllBlockPartials;
|
||||
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
||||
import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext;
|
||||
import com.simibubi.create.foundation.render.SuperByteBuffer;
|
||||
import com.simibubi.create.foundation.utility.AngleHelper;
|
||||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||
import com.simibubi.create.foundation.utility.MatrixStacker;
|
||||
import com.simibubi.create.foundation.utility.SuperByteBuffer;
|
||||
import com.simibubi.create.foundation.utility.VecHelper;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
|
@ -7,6 +7,8 @@ import org.apache.commons.lang3.mutable.MutableBoolean;
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.MovementBehaviour;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.render.RenderedContraption;
|
||||
import com.simibubi.create.foundation.render.backend.FastRenderDispatcher;
|
||||
import com.simibubi.create.foundation.utility.BlockHelper;
|
||||
import com.simibubi.create.foundation.utility.VecHelper;
|
||||
|
||||
@ -35,10 +37,21 @@ public class HarvesterMovementBehaviour extends MovementBehaviour {
|
||||
.getOpposite());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasSpecialInstancedRendering() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInstance(RenderedContraption contraption, MovementContext context) {
|
||||
HarvesterRenderer.addInstanceForContraption(contraption, context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderInContraption(MovementContext context, MatrixStack ms, MatrixStack msLocal,
|
||||
IRenderTypeBuffer buffers) {
|
||||
HarvesterRenderer.renderInContraption(context, ms, msLocal, buffers);
|
||||
if (!FastRenderDispatcher.available())
|
||||
HarvesterRenderer.renderInContraption(context, ms, msLocal, buffers);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -5,10 +5,14 @@ import static net.minecraft.state.properties.BlockStateProperties.HORIZONTAL_FAC
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import com.simibubi.create.AllBlockPartials;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionRenderDispatcher;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.render.RenderedContraption;
|
||||
import com.simibubi.create.foundation.render.SuperByteBuffer;
|
||||
import com.simibubi.create.foundation.render.backend.instancing.InstancedModel;
|
||||
import com.simibubi.create.foundation.render.backend.instancing.RenderMaterial;
|
||||
import com.simibubi.create.foundation.tileEntity.renderer.SafeTileEntityRenderer;
|
||||
import com.simibubi.create.foundation.utility.AngleHelper;
|
||||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||
import com.simibubi.create.foundation.utility.SuperByteBuffer;
|
||||
import com.simibubi.create.foundation.utility.VecHelper;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
@ -18,6 +22,8 @@ import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.vector.Vector3d;
|
||||
import net.minecraft.util.math.vector.Vector3f;
|
||||
import net.minecraft.world.LightType;
|
||||
|
||||
public class HarvesterRenderer extends SafeTileEntityRenderer<HarvesterTileEntity> {
|
||||
|
||||
@ -34,6 +40,25 @@ public class HarvesterRenderer extends SafeTileEntityRenderer<HarvesterTileEntit
|
||||
.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,
|
||||
IRenderTypeBuffer buffers) {
|
||||
BlockState blockState = context.state;
|
||||
@ -55,7 +80,7 @@ public class HarvesterRenderer extends SafeTileEntityRenderer<HarvesterTileEntit
|
||||
.rotate(Direction.WEST, AngleHelper.rad(angle))
|
||||
.translate(-rotOffset.x, -rotOffset.y, -rotOffset.z)
|
||||
.light(msLocal.peek()
|
||||
.getModel())
|
||||
.getModel(), ContraptionRenderDispatcher.getLightOnContraption(context))
|
||||
.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.AllBlocks;
|
||||
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.utility.AngleHelper;
|
||||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||
import com.simibubi.create.foundation.utility.MatrixStacker;
|
||||
import com.simibubi.create.foundation.utility.SuperByteBuffer;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
||||
import net.minecraft.client.renderer.RenderType;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
|
||||
@ -43,8 +44,7 @@ public class PortableStorageInterfaceRenderer extends SafeTileEntityRenderer<Por
|
||||
BlockState blockState = context.state;
|
||||
PortableStorageInterfaceTileEntity te = getTargetPSI(context);
|
||||
IVertexBuilder vb = buffer.getBuffer(RenderType.getSolid());
|
||||
float renderPartialTicks = Minecraft.getInstance()
|
||||
.getRenderPartialTicks();
|
||||
float renderPartialTicks = AnimationTickHolder.getPartialTicks();
|
||||
|
||||
float progress = 0;
|
||||
boolean lit = false;
|
||||
@ -54,26 +54,10 @@ public class PortableStorageInterfaceRenderer extends SafeTileEntityRenderer<Por
|
||||
}
|
||||
|
||||
render(blockState, progress, lit, sbb -> sbb.light(msLocal.peek()
|
||||
.getModel())
|
||||
.getModel(), ContraptionRenderDispatcher.getLightOnContraption(context))
|
||||
.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,
|
||||
Consumer<SuperByteBuffer> drawCallback, MatrixStack... matrixStacks) {
|
||||
for (MatrixStack ms : matrixStacks)
|
||||
@ -109,6 +93,22 @@ public class PortableStorageInterfaceRenderer extends SafeTileEntityRenderer<Por
|
||||
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) {
|
||||
if (AllBlocks.PORTABLE_FLUID_INTERFACE.has(state))
|
||||
return lit ? AllBlockPartials.PORTABLE_FLUID_INTERFACE_MIDDLE_POWERED
|
||||
|
@ -101,10 +101,14 @@ public abstract class PortableStorageInterfaceTileEntity extends SmartTileEntity
|
||||
return powered;
|
||||
}
|
||||
|
||||
protected AxisAlignedBB cachedBoundingBox;
|
||||
@Override
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
return super.getRenderBoundingBox().grow(2);
|
||||
if (cachedBoundingBox == null) {
|
||||
cachedBoundingBox = super.getRenderBoundingBox().grow(2);
|
||||
}
|
||||
return cachedBoundingBox;
|
||||
}
|
||||
|
||||
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.KineticTileEntityRenderer;
|
||||
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.SuperByteBuffer;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
||||
|
@ -96,9 +96,9 @@ public class CuckooClockTileEntity extends KineticTileEntity {
|
||||
moveHands(hours, minutes);
|
||||
|
||||
if (animationType == Animation.NONE) {
|
||||
if (AnimationTickHolder.ticks % 32 == 0)
|
||||
if (AnimationTickHolder.getTicks() % 32 == 0)
|
||||
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);
|
||||
} else {
|
||||
|
||||
@ -173,4 +173,8 @@ public class CuckooClockTileEntity extends KineticTileEntity {
|
||||
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.content.contraptions.components.crafter.MechanicalCrafterTileEntity.Phase;
|
||||
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.utility.AngleHelper;
|
||||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||
import com.simibubi.create.foundation.utility.MatrixStacker;
|
||||
import com.simibubi.create.foundation.utility.SuperByteBuffer;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
@ -24,7 +25,6 @@ import net.minecraft.client.renderer.model.ItemCameraTransforms.TransformType;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.Direction.Axis;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.util.math.vector.Vector3d;
|
||||
@ -154,12 +154,13 @@ public class MechanicalCrafterRenderer extends SafeTileEntityRenderer<Mechanical
|
||||
BlockState blockState = te.getBlockState();
|
||||
IVertexBuilder vb = buffer.getBuffer(RenderType.getSolid());
|
||||
|
||||
SuperByteBuffer superBuffer = AllBlockPartials.SHAFTLESS_COGWHEEL.renderOn(blockState);
|
||||
standardKineticRotationTransform(superBuffer, te, light);
|
||||
superBuffer.rotateCentered(Direction.UP, (float) (blockState.get(HORIZONTAL_FACING)
|
||||
.getAxis() != Axis.X ? 0 : Math.PI / 2));
|
||||
superBuffer.rotateCentered(Direction.EAST, (float) (Math.PI / 2));
|
||||
superBuffer.renderInto(ms, vb);
|
||||
if (!FastRenderDispatcher.available(te.getWorld())) {
|
||||
SuperByteBuffer superBuffer = AllBlockPartials.SHAFTLESS_COGWHEEL.renderOn(blockState);
|
||||
standardKineticRotationTransform(superBuffer, te, light);
|
||||
superBuffer.rotateCentered(Direction.UP, (float) (blockState.get(HORIZONTAL_FACING).getAxis() != Direction.Axis.X ? 0 : Math.PI / 2));
|
||||
superBuffer.rotateCentered(Direction.EAST, (float) (Math.PI / 2));
|
||||
superBuffer.renderInto(ms, vb);
|
||||
}
|
||||
|
||||
Direction targetDirection = MechanicalCrafterBlock.getTargetDirection(blockState);
|
||||
BlockPos pos = te.getPos();
|
||||
@ -177,7 +178,7 @@ public class MechanicalCrafterRenderer extends SafeTileEntityRenderer<Mechanical
|
||||
renderAndTransform(te, AllBlockPartials.MECHANICAL_CRAFTER_BELT_FRAME, blockState, pos);
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -485,4 +485,9 @@ public class MechanicalCrafterTileEntity extends KineticTileEntity {
|
||||
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.content.contraptions.base.KineticTileEntity;
|
||||
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.BlockState;
|
||||
|
@ -74,4 +74,8 @@ public class HandCrankTileEntity extends GeneratingKineticTileEntity {
|
||||
return AllBlocks.HAND_CRANK.get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldRenderAsTE() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ public class CrushingWheelTileEntity extends KineticTileEntity {
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
public AxisAlignedBB makeRenderBoundingBox() {
|
||||
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.State;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionRenderDispatcher;
|
||||
import com.simibubi.create.foundation.render.SuperByteBuffer;
|
||||
import com.simibubi.create.foundation.render.backend.FastRenderDispatcher;
|
||||
import com.simibubi.create.foundation.tileEntity.behaviour.filtering.FilteringRenderer;
|
||||
import com.simibubi.create.foundation.tileEntity.renderer.SafeTileEntityRenderer;
|
||||
import com.simibubi.create.foundation.utility.AngleHelper;
|
||||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||
import com.simibubi.create.foundation.utility.NBTHelper;
|
||||
import com.simibubi.create.foundation.utility.SuperByteBuffer;
|
||||
import com.simibubi.create.foundation.utility.VecHelper;
|
||||
|
||||
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,
|
||||
int light, int overlay) {
|
||||
IVertexBuilder vb = buffer.getBuffer(RenderType.getSolid());
|
||||
KineticTileEntityRenderer.renderRotatingKineticBlock(te, getRenderedBlockState(te), ms, vb, light);
|
||||
if (!FastRenderDispatcher.available(te.getWorld())) {
|
||||
KineticTileEntityRenderer.renderRotatingKineticBlock(te, getRenderedBlockState(te), ms, vb, light);
|
||||
}
|
||||
|
||||
BlockState blockState = te.getBlockState();
|
||||
BlockPos pos = te.getPos();
|
||||
@ -178,8 +182,7 @@ public class DeployerRenderer extends SafeTileEntityRenderer<DeployerTileEntity>
|
||||
double distance = context.position.distanceTo(center);
|
||||
double nextDistance = context.position.add(context.motion)
|
||||
.distanceTo(center);
|
||||
factor = .5f - MathHelper.clamp(MathHelper.lerp(Minecraft.getInstance()
|
||||
.getRenderPartialTicks(), distance, nextDistance), 0, 1);
|
||||
factor = .5f - MathHelper.clamp(MathHelper.lerp(AnimationTickHolder.getPartialTicks(), distance, nextDistance), 0, 1);
|
||||
}
|
||||
|
||||
Vector3d offset = Vector3d.of(blockState.get(FACING)
|
||||
@ -189,9 +192,9 @@ public class DeployerRenderer extends SafeTileEntityRenderer<DeployerTileEntity>
|
||||
.getModel();
|
||||
for (MatrixStack m : matrixStacks)
|
||||
m.translate(offset.x, offset.y, offset.z);
|
||||
pole.light(lighting)
|
||||
pole.light(lighting, ContraptionRenderDispatcher.getLightOnContraption(context))
|
||||
.renderInto(ms, builder);
|
||||
hand.light(lighting)
|
||||
hand.light(lighting, ContraptionRenderDispatcher.getLightOnContraption(context))
|
||||
.renderInto(ms, builder);
|
||||
}
|
||||
|
||||
|
@ -343,8 +343,8 @@ public class DeployerTileEntity extends KineticTileEntity {
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
return super.getRenderBoundingBox().grow(3);
|
||||
public AxisAlignedBB makeRenderBoundingBox() {
|
||||
return super.makeRenderBoundingBox().grow(3);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -379,4 +379,8 @@ public class DeployerTileEntity extends KineticTileEntity {
|
||||
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.content.contraptions.base.KineticTileEntity;
|
||||
import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer;
|
||||
import com.simibubi.create.foundation.render.SuperByteBuffer;
|
||||
import com.simibubi.create.foundation.render.backend.FastRenderDispatcher;
|
||||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||
import com.simibubi.create.foundation.utility.SuperByteBuffer;
|
||||
|
||||
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
||||
import net.minecraft.client.renderer.RenderType;
|
||||
@ -26,6 +27,8 @@ public class EncasedFanRenderer extends KineticTileEntityRenderer {
|
||||
@Override
|
||||
protected void renderSafe(KineticTileEntity te, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffer,
|
||||
int light, int overlay) {
|
||||
if (FastRenderDispatcher.available(te.getWorld())) return;
|
||||
|
||||
Direction direction = te.getBlockState()
|
||||
.get(FACING);
|
||||
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;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
|
||||
import com.simibubi.create.AllShapes;
|
||||
import com.simibubi.create.AllTileEntities;
|
||||
import com.simibubi.create.foundation.block.ProperDirectionalBlock;
|
||||
|
||||
import mcp.MethodsReturnNonnullByDefault;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
@ -18,8 +21,6 @@ import net.minecraft.world.IBlockReader;
|
||||
import net.minecraft.world.IWorldReader;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
|
||||
@MethodsReturnNonnullByDefault
|
||||
@ParametersAreNonnullByDefault
|
||||
public class NozzleBlock extends ProperDirectionalBlock {
|
||||
|
@ -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.KineticTileEntityRenderer;
|
||||
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.SuperByteBuffer;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
||||
|
@ -49,8 +49,8 @@ public class FlywheelTileEntity extends GeneratingKineticTileEntity {
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
return super.getRenderBoundingBox().grow(2);
|
||||
public AxisAlignedBB makeRenderBoundingBox() {
|
||||
return super.makeRenderBoundingBox().grow(2);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -102,4 +102,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.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
||||
public class EngineTileEntity extends SmartTileEntity {
|
||||
|
||||
@ -29,9 +31,14 @@ public class EngineTileEntity extends SmartTileEntity {
|
||||
public void addBehaviours(List<TileEntityBehaviour> behaviours) {
|
||||
}
|
||||
|
||||
protected AxisAlignedBB cachedBoundingBox;
|
||||
@Override
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
return super.getRenderBoundingBox().grow(1.5f);
|
||||
if (cachedBoundingBox == null) {
|
||||
cachedBoundingBox = super.getRenderBoundingBox().grow(1.5f);
|
||||
}
|
||||
return cachedBoundingBox;
|
||||
}
|
||||
|
||||
@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.content.contraptions.base.KineticTileEntity;
|
||||
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;
|
||||
|
||||
|
@ -5,8 +5,9 @@ import com.mojang.blaze3d.vertex.IVertexBuilder;
|
||||
import com.simibubi.create.AllBlockPartials;
|
||||
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
||||
import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer;
|
||||
import com.simibubi.create.foundation.render.SuperByteBuffer;
|
||||
import com.simibubi.create.foundation.render.backend.FastRenderDispatcher;
|
||||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||
import com.simibubi.create.foundation.utility.SuperByteBuffer;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
||||
@ -22,6 +23,11 @@ public class MechanicalMixerRenderer extends KineticTileEntityRenderer {
|
||||
super(dispatcher);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isGlobalRenderer(KineticTileEntity te) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void renderSafe(KineticTileEntity te, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffer,
|
||||
int light, int overlay) {
|
||||
@ -31,8 +37,10 @@ public class MechanicalMixerRenderer extends KineticTileEntityRenderer {
|
||||
|
||||
IVertexBuilder vb = buffer.getBuffer(RenderType.getSolid());
|
||||
|
||||
SuperByteBuffer superBuffer = AllBlockPartials.SHAFTLESS_COGWHEEL.renderOn(blockState);
|
||||
standardKineticRotationTransform(superBuffer, te, light).renderInto(ms, vb);
|
||||
if (!FastRenderDispatcher.available(te.getWorld())) {
|
||||
SuperByteBuffer superBuffer = AllBlockPartials.SHAFTLESS_COGWHEEL.renderOn(blockState);
|
||||
standardKineticRotationTransform(superBuffer, te, light).renderInto(ms, vb);
|
||||
}
|
||||
|
||||
int packedLightmapCoords = WorldRenderer.getLightmapCoordinates(te.getWorld(), blockState, pos);
|
||||
float renderedHeadOffset = mixer.getRenderedHeadOffset(partialTicks);
|
||||
|
@ -81,7 +81,7 @@ public class MechanicalMixerTileEntity extends BasinOperatingTileEntity {
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
public AxisAlignedBB makeRenderBoundingBox() {
|
||||
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.content.contraptions.base.KineticTileEntity;
|
||||
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;
|
||||
|
||||
|
@ -4,7 +4,7 @@ import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import com.simibubi.create.AllBlockPartials;
|
||||
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
||||
import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer;
|
||||
import com.simibubi.create.foundation.utility.SuperByteBuffer;
|
||||
import com.simibubi.create.foundation.render.SuperByteBuffer;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
||||
@ -19,6 +19,11 @@ public class MechanicalPressRenderer extends KineticTileEntityRenderer {
|
||||
super(dispatcher);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isGlobalRenderer(KineticTileEntity te) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void renderSafe(KineticTileEntity te, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffer,
|
||||
int light, int overlay) {
|
||||
|
@ -103,7 +103,7 @@ public class MechanicalPressTileEntity extends BasinOperatingTileEntity {
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
public AxisAlignedBB makeRenderBoundingBox() {
|
||||
return new AxisAlignedBB(pos).expand(0, -1.5, 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.KineticTileEntityRenderer;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionRenderDispatcher;
|
||||
import com.simibubi.create.foundation.render.SuperByteBuffer;
|
||||
import com.simibubi.create.foundation.render.backend.FastRenderDispatcher;
|
||||
import com.simibubi.create.foundation.tileEntity.behaviour.filtering.FilteringRenderer;
|
||||
import com.simibubi.create.foundation.tileEntity.renderer.SafeTileEntityRenderer;
|
||||
import com.simibubi.create.foundation.utility.AngleHelper;
|
||||
import com.simibubi.create.foundation.utility.MatrixStacker;
|
||||
import com.simibubi.create.foundation.utility.SuperByteBuffer;
|
||||
import com.simibubi.create.foundation.utility.VecHelper;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
@ -42,6 +44,9 @@ public class SawRenderer extends SafeTileEntityRenderer<SawTileEntity> {
|
||||
renderBlade(te, ms, buffer, light);
|
||||
renderItems(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);
|
||||
}
|
||||
|
||||
@ -188,8 +193,9 @@ public class SawRenderer extends SafeTileEntityRenderer<SawTileEntity> {
|
||||
.unCentre();
|
||||
}
|
||||
|
||||
superBuffer.light(msLocal.peek()
|
||||
.getModel())
|
||||
superBuffer
|
||||
.light(msLocal.peek()
|
||||
.getModel(), ContraptionRenderDispatcher.getLightOnContraption(context))
|
||||
.renderInto(ms, buffer.getBuffer(RenderType.getCutoutMipped()));
|
||||
}
|
||||
|
||||
|
@ -389,4 +389,9 @@ public class SawTileEntity extends BlockBreakingKineticTileEntity {
|
||||
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.tuple.MutablePair;
|
||||
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import com.simibubi.create.AllMovementBehaviours;
|
||||
import com.simibubi.create.content.contraptions.components.actors.SeatEntity;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.glue.SuperGlueEntity;
|
||||
@ -597,6 +598,9 @@ public abstract class AbstractContraptionEntity extends Entity implements IEntit
|
||||
return false;
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public abstract void doLocalTransforms(float partialTicks, MatrixStack[] matrixStacks);
|
||||
|
||||
public static class ContraptionRotationState {
|
||||
public static final ContraptionRotationState NONE = new ContraptionRotationState();
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.simibubi.create.content.contraptions.components.structureMovement;
|
||||
|
||||
import com.simibubi.create.foundation.config.AllConfigs;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
@ -8,6 +9,8 @@ import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.util.text.TranslationTextComponent;
|
||||
|
||||
public class AssemblyException extends Exception {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
public final ITextComponent component;
|
||||
private BlockPos position = null;
|
||||
|
||||
|
@ -1,5 +1,29 @@
|
||||
package com.simibubi.create.content.contraptions.components.structureMovement;
|
||||
|
||||
import static com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonBlock.isExtensionPole;
|
||||
import static com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonBlock.isPistonHead;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.Queue;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import java.util.function.BiConsumer;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import org.apache.commons.lang3.tuple.MutablePair;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
|
||||
import com.simibubi.create.AllBlocks;
|
||||
import com.simibubi.create.AllMovementBehaviours;
|
||||
import com.simibubi.create.content.contraptions.base.IRotate;
|
||||
@ -28,6 +52,7 @@ import com.simibubi.create.content.logistics.block.inventories.AdjustableCrateBl
|
||||
import com.simibubi.create.content.logistics.block.redstone.RedstoneContactBlock;
|
||||
import com.simibubi.create.foundation.config.AllConfigs;
|
||||
import com.simibubi.create.foundation.fluid.CombinedTankWrapper;
|
||||
import com.simibubi.create.foundation.render.backend.light.EmptyLighter;
|
||||
import com.simibubi.create.foundation.utility.BlockFace;
|
||||
import com.simibubi.create.foundation.utility.BlockHelper;
|
||||
import com.simibubi.create.foundation.utility.Iterate;
|
||||
@ -35,13 +60,22 @@ import com.simibubi.create.foundation.utility.NBTHelper;
|
||||
import com.simibubi.create.foundation.utility.NBTProcessors;
|
||||
import com.simibubi.create.foundation.utility.VecHelper;
|
||||
import com.simibubi.create.foundation.utility.worldWrappers.WrappedWorld;
|
||||
import net.minecraft.block.*;
|
||||
|
||||
import net.minecraft.block.AbstractButtonBlock;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.block.ChestBlock;
|
||||
import net.minecraft.block.DoorBlock;
|
||||
import net.minecraft.block.IWaterLoggable;
|
||||
import net.minecraft.block.PressurePlateBlock;
|
||||
import net.minecraft.block.material.PushReaction;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.fluid.FluidState;
|
||||
import net.minecraft.fluid.Fluids;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.nbt.INBT;
|
||||
import net.minecraft.nbt.ListNBT;
|
||||
import net.minecraft.nbt.NBTUtil;
|
||||
import net.minecraft.state.properties.BlockStateProperties;
|
||||
@ -56,9 +90,12 @@ import net.minecraft.util.Rotation;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.vector.Vector3d;
|
||||
import net.minecraft.util.palette.HashMapPalette;
|
||||
import net.minecraft.world.IWorld;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.gen.feature.template.Template.BlockInfo;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import net.minecraftforge.common.util.Constants.BlockFlags;
|
||||
import net.minecraftforge.common.util.Constants.NBT;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
@ -68,16 +105,7 @@ import net.minecraftforge.fluids.capability.IFluidHandler.FluidAction;
|
||||
import net.minecraftforge.fluids.capability.templates.FluidTank;
|
||||
import net.minecraftforge.items.IItemHandlerModifiable;
|
||||
import net.minecraftforge.items.wrapper.CombinedInvWrapper;
|
||||
import org.apache.commons.lang3.tuple.MutablePair;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.*;
|
||||
import java.util.function.BiConsumer;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonBlock.isExtensionPole;
|
||||
import static com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonBlock.isPistonHead;
|
||||
import net.minecraftforge.registries.GameData;
|
||||
|
||||
public abstract class Contraption {
|
||||
|
||||
@ -103,7 +131,8 @@ public abstract class Contraption {
|
||||
|
||||
// Client
|
||||
public Map<BlockPos, TileEntity> presentTileEntities;
|
||||
public List<TileEntity> renderedTileEntities;
|
||||
public List<TileEntity> maybeInstancedTileEntities;
|
||||
public List<TileEntity> specialRenderedTileEntities;
|
||||
|
||||
public Contraption() {
|
||||
blocks = new HashMap<>();
|
||||
@ -116,7 +145,8 @@ public abstract class Contraption {
|
||||
glueToRemove = new ArrayList<>();
|
||||
initialPassengers = new HashMap<>();
|
||||
presentTileEntities = new HashMap<>();
|
||||
renderedTileEntities = new ArrayList<>();
|
||||
maybeInstancedTileEntities = new ArrayList<>();
|
||||
specialRenderedTileEntities = new ArrayList<>();
|
||||
pendingSubContraptions = new ArrayList<>();
|
||||
stabilizedSubContraptions = new HashMap<>();
|
||||
}
|
||||
@ -475,7 +505,6 @@ public abstract class Contraption {
|
||||
}
|
||||
|
||||
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);
|
||||
PistonState pistonState = state.get(MechanicalPistonBlock.STATE);
|
||||
if (pistonState == PistonState.MOVING)
|
||||
@ -594,53 +623,18 @@ public abstract class Contraption {
|
||||
public void readNBT(World world, CompoundNBT nbt, boolean spawnData) {
|
||||
blocks.clear();
|
||||
presentTileEntities.clear();
|
||||
renderedTileEntities.clear();
|
||||
specialRenderedTileEntities.clear();
|
||||
|
||||
nbt.getList("Blocks", 10)
|
||||
.forEach(c -> {
|
||||
CompoundNBT comp = (CompoundNBT) c;
|
||||
BlockInfo info = new BlockInfo(NBTUtil.readBlockPos(comp.getCompound("Pos")),
|
||||
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.createFromTag(info.state, 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);
|
||||
}
|
||||
});
|
||||
INBT blocks = nbt.get("Blocks");
|
||||
//used to differentiate between the 'old' and the paletted serialization
|
||||
boolean usePalettedDeserialization = blocks != null && blocks.getId() == 10 && ((CompoundNBT) blocks).contains("Palette");
|
||||
readBlocksCompound(blocks, world, usePalettedDeserialization);
|
||||
|
||||
actors.clear();
|
||||
nbt.getList("Actors", 10)
|
||||
.forEach(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);
|
||||
getActors().add(MutablePair.of(info, context));
|
||||
});
|
||||
@ -705,15 +699,8 @@ public abstract class Contraption {
|
||||
public CompoundNBT writeNBT(boolean spawnPacket) {
|
||||
CompoundNBT nbt = new CompoundNBT();
|
||||
nbt.putString("Type", getType().id);
|
||||
ListNBT blocksNBT = new ListNBT();
|
||||
for (BlockInfo block : this.blocks.values()) {
|
||||
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);
|
||||
}
|
||||
|
||||
CompoundNBT blocksNBT = writeBlocksCompound();
|
||||
|
||||
ListNBT actorsNBT = new ListNBT();
|
||||
for (MutablePair<BlockInfo, MovementContext> actor : getActors()) {
|
||||
@ -790,6 +777,107 @@ public abstract class Contraption {
|
||||
return nbt;
|
||||
}
|
||||
|
||||
private CompoundNBT writeBlocksCompound() {
|
||||
CompoundNBT compound = new CompoundNBT();
|
||||
HashMapPalette<BlockState> palette = new HashMapPalette<>(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) {
|
||||
HashMapPalette<BlockState> palette = null;
|
||||
ListNBT blockList;
|
||||
if (usePalettedDeserialization) {
|
||||
CompoundNBT c = ((CompoundNBT) compound);
|
||||
palette = new HashMapPalette<>(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;
|
||||
}
|
||||
|
||||
HashMapPalette<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.createFromTag(info.state, 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, HashMapPalette<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) {
|
||||
storage.values()
|
||||
.forEach(MountedStorage::removeStorageFromWorld);
|
||||
@ -913,7 +1001,8 @@ public abstract class Contraption {
|
||||
if (!shouldUpdateAfterMovement(block))
|
||||
continue;
|
||||
BlockPos targetPos = transform.apply(block.pos);
|
||||
world.markAndNotifyBlock(targetPos, world.getChunkAt(targetPos), block.state, block.state, BlockFlags.IS_MOVING | BlockFlags.DEFAULT, 512);
|
||||
world.markAndNotifyBlock(targetPos, world.getChunkAt(targetPos), block.state, block.state,
|
||||
BlockFlags.IS_MOVING | BlockFlags.DEFAULT, 512);
|
||||
}
|
||||
|
||||
for (int i = 0; i < inventory.getSlots(); i++)
|
||||
@ -1045,4 +1134,9 @@ public abstract class Contraption {
|
||||
mountedFluidStorage.updateFluid(containedFluid);
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public ContraptionLighter<?> makeLighter() {
|
||||
return new EmptyLighter(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -310,7 +310,7 @@ public class ContraptionCollider {
|
||||
if (!entity.world.isRemote)
|
||||
return PlayerType.SERVER;
|
||||
MutableBoolean isClient = new MutableBoolean(false);
|
||||
DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> isClient.setValue(isClientPlayerEntity(entity)));
|
||||
DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> isClient.setValue(isClientPlayerEntity(entity)));
|
||||
return isClient.booleanValue() ? PlayerType.CLIENT : PlayerType.REMOTE;
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,7 @@ public class ContraptionDisassemblyPacket extends SimplePacketBase {
|
||||
@Override
|
||||
public void handle(Supplier<Context> context) {
|
||||
context.get()
|
||||
.enqueueWork(() -> DistExecutor.runWhenOn(Dist.CLIENT,
|
||||
.enqueueWork(() -> DistExecutor.unsafeRunWhenOn(Dist.CLIENT,
|
||||
() -> () -> AbstractContraptionEntity.handleDisassemblyPacket(this)));
|
||||
context.get()
|
||||
.setPacketHandled(true);
|
||||
|
@ -1,8 +1,9 @@
|
||||
package com.simibubi.create.content.contraptions.components.structureMovement;
|
||||
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionRenderDispatcher;
|
||||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
||||
import net.minecraft.client.renderer.culling.ClippingHelper;
|
||||
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.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_);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceLocation getEntityTexture(C p_110775_1_) {
|
||||
public ResourceLocation getEntityTexture(C entity) {
|
||||
return null;
|
||||
}
|
||||
|
||||
protected abstract void transform(C contraptionEntity, float partialTicks, MatrixStack[] matrixStacks);
|
||||
|
||||
@Override
|
||||
public boolean shouldRender(C entity, ClippingHelper p_225626_2_, double p_225626_3_, double p_225626_5_,
|
||||
public boolean shouldRender(C entity, ClippingHelper clippingHelper, double p_225626_3_, double p_225626_5_,
|
||||
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;
|
||||
if (!entity.isAlive())
|
||||
return false;
|
||||
if (entity.getContraption() == null)
|
||||
return false;
|
||||
return true;
|
||||
|
||||
return super.shouldRender(entity, clippingHelper, p_225626_3_, p_225626_5_, p_225626_7_);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -41,21 +39,20 @@ public abstract class AbstractContraptionEntityRenderer<C extends AbstractContra
|
||||
super.render(entity, yaw, partialTicks, ms, buffers, overlay);
|
||||
|
||||
// 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 };
|
||||
|
||||
ms.push();
|
||||
transform(entity, partialTicks, matrixStacks);
|
||||
entity.doLocalTransforms(partialTicks, matrixStacks);
|
||||
Contraption contraption = entity.getContraption();
|
||||
if (contraption != null)
|
||||
ContraptionRenderer.render(entity.world, contraption, ms, msLocal, buffers);
|
||||
if (contraption != null) {
|
||||
ContraptionRenderDispatcher.render(entity, ms, buffers, msLocal, contraption);
|
||||
}
|
||||
ms.pop();
|
||||
|
||||
}
|
||||
|
||||
protected MatrixStack getLocalTransform(AbstractContraptionEntity entity) {
|
||||
double pt = Minecraft.getInstance()
|
||||
.getRenderPartialTicks();
|
||||
protected MatrixStack translateTo(AbstractContraptionEntity entity, float pt) {
|
||||
MatrixStack matrixStack = new MatrixStack();
|
||||
double x = MathHelper.lerp(pt, entity.lastTickPosX, entity.getX());
|
||||
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.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.util.math.vector.Matrix4f;
|
||||
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.getWrappedWorld() != 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
|
||||
public void handle(Supplier<Context> context) {
|
||||
context.get().enqueueWork(
|
||||
() -> DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> AbstractContraptionEntity.handleStallPacket(this)));
|
||||
() -> DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> AbstractContraptionEntity.handleStallPacket(this)));
|
||||
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 com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import com.simibubi.create.AllEntityTypes;
|
||||
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.VecHelper;
|
||||
|
||||
@ -219,4 +221,18 @@ public class ControlledContraptionEntity extends AbstractContraptionEntity {
|
||||
setPos(x, y, z);
|
||||
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,15 +1,16 @@
|
||||
package com.simibubi.create.content.contraptions.components.structureMovement;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import com.simibubi.create.content.contraptions.goggles.IHaveGoggleInformation;
|
||||
import com.simibubi.create.foundation.item.TooltipHelper;
|
||||
import com.simibubi.create.foundation.utility.Lang;
|
||||
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.util.text.StringTextComponent;
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public interface IDisplayAssemblyExceptions {
|
||||
|
||||
default boolean addExceptionToTooltip(List<ITextComponent> tooltip) {
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.simibubi.create.content.contraptions.components.structureMovement;
|
||||
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.render.RenderedContraption;
|
||||
|
||||
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
||||
import net.minecraft.entity.item.ItemEntity;
|
||||
@ -47,15 +48,21 @@ public abstract class MovementBehaviour {
|
||||
|
||||
}
|
||||
|
||||
public boolean hasSpecialMovementRenderer() {
|
||||
return true;
|
||||
public boolean renderAsNormalTileEntity() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean hasSpecialInstancedRendering() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public void renderInContraption(MovementContext context, MatrixStack ms, MatrixStack msLocal,
|
||||
IRenderTypeBuffer buffer) {}
|
||||
|
||||
public void onSpeedChanged(MovementContext context, Vector3d oldMotion, Vector3d motion) {
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public void addInstance(RenderedContraption contraption, MovementContext context) {}
|
||||
|
||||
public void onSpeedChanged(MovementContext context, Vector3d oldMotion, Vector3d 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 com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import com.simibubi.create.AllEntityTypes;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.bearing.StabilizedContraption;
|
||||
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.utility.AngleHelper;
|
||||
import com.simibubi.create.foundation.utility.Couple;
|
||||
import com.simibubi.create.foundation.utility.MatrixStacker;
|
||||
import com.simibubi.create.foundation.utility.NBTHelper;
|
||||
import com.simibubi.create.foundation.utility.VecHelper;
|
||||
|
||||
@ -39,6 +41,8 @@ import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.util.math.vector.Vector3d;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import net.minecraftforge.common.util.LazyOptional;
|
||||
|
||||
/**
|
||||
@ -492,4 +496,89 @@ public class OrientedContraptionEntity extends AbstractContraptionEntity {
|
||||
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;
|
||||
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import com.simibubi.create.foundation.utility.MatrixStacker;
|
||||
|
||||
import net.minecraft.client.renderer.culling.ClippingHelper;
|
||||
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.vector.Vector3d;
|
||||
|
||||
public class OrientedContraptionEntityRenderer extends AbstractContraptionEntityRenderer<OrientedContraptionEntity> {
|
||||
public class OrientedContraptionEntityRenderer extends ContraptionEntityRenderer<OrientedContraptionEntity> {
|
||||
|
||||
public OrientedContraptionEntityRenderer(EntityRendererManager p_i46179_1_) {
|
||||
super(p_i46179_1_);
|
||||
@ -22,75 +15,9 @@ public class OrientedContraptionEntityRenderer extends AbstractContraptionEntity
|
||||
if (!super.shouldRender(entity, p_225626_2_, p_225626_3_, p_225626_5_, p_225626_7_))
|
||||
return false;
|
||||
if (entity.getContraption()
|
||||
.getType() == ContraptionType.MOUNTED && entity.getRidingEntity() == null)
|
||||
.getType() == ContraptionType.MOUNTED && entity.getRidingEntity() == null)
|
||||
return false;
|
||||
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;
|
||||
Vector3d 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());
|
||||
Vector3d cartPos = cart.getPos(cartX, cartY, cartZ);
|
||||
|
||||
if (cartPos != null) {
|
||||
Vector3d cartPosFront = cart.getPosOffset(cartX, cartY, cartZ, (double) 0.3F);
|
||||
Vector3d 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 com.simibubi.create.AllTags.AllBlockTags;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionType;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.AssemblyException;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.Contraption;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionLighter;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionType;
|
||||
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@ -13,6 +14,8 @@ import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.gen.feature.template.Template.BlockInfo;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
||||
public class BearingContraption extends Contraption {
|
||||
|
||||
@ -90,4 +93,9 @@ public class BearingContraption extends Contraption {
|
||||
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.content.contraptions.base.KineticTileEntity;
|
||||
import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer;
|
||||
import com.simibubi.create.foundation.render.SuperByteBuffer;
|
||||
import com.simibubi.create.foundation.utility.AngleHelper;
|
||||
import com.simibubi.create.foundation.utility.SuperByteBuffer;
|
||||
|
||||
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
||||
import net.minecraft.client.renderer.RenderType;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user