mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-15 02:13:43 +01:00
Registrate Progress
- Started moving over a few kinetic blocks from AllBlocks to registrate - Changed runData to only run client data tasks for now - Added missing bind to the ContraptionRenderer for Stationary Contraptions
This commit is contained in:
parent
e27927de15
commit
0c2a33861e
53 changed files with 398 additions and 215 deletions
|
@ -53,7 +53,7 @@ minecraft {
|
||||||
property 'forge.logging.markers', 'REGISTRIES,REGISTRYDUMP'
|
property 'forge.logging.markers', 'REGISTRIES,REGISTRYDUMP'
|
||||||
property 'forge.logging.console.level', 'debug'
|
property 'forge.logging.console.level', 'debug'
|
||||||
property 'fml.earlyprogresswindow', 'false'
|
property 'fml.earlyprogresswindow', 'false'
|
||||||
args '--mod', 'create', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources')
|
args '--mod', 'create', '--client', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources')
|
||||||
mods {
|
mods {
|
||||||
create {
|
create {
|
||||||
source sourceSets.main
|
source sourceSets.main
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
{
|
||||||
|
"variants": {
|
||||||
|
"axis=x": {
|
||||||
|
"model": "create:block/cogwheel",
|
||||||
|
"x": 90,
|
||||||
|
"y": 90
|
||||||
|
},
|
||||||
|
"axis=y": {
|
||||||
|
"model": "create:block/cogwheel"
|
||||||
|
},
|
||||||
|
"axis=z": {
|
||||||
|
"model": "create:block/cogwheel",
|
||||||
|
"x": 90
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,16 @@
|
||||||
|
{
|
||||||
|
"variants": {
|
||||||
|
"axis=x": {
|
||||||
|
"model": "create:block/encased_shaft/block",
|
||||||
|
"x": 90,
|
||||||
|
"y": 90
|
||||||
|
},
|
||||||
|
"axis=y": {
|
||||||
|
"model": "create:block/encased_shaft/block"
|
||||||
|
},
|
||||||
|
"axis=z": {
|
||||||
|
"model": "create:block/encased_shaft/block",
|
||||||
|
"x": 90
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,16 @@
|
||||||
|
{
|
||||||
|
"variants": {
|
||||||
|
"axis=x": {
|
||||||
|
"model": "create:block/large_cogwheel",
|
||||||
|
"x": 90,
|
||||||
|
"y": 90
|
||||||
|
},
|
||||||
|
"axis=y": {
|
||||||
|
"model": "create:block/large_cogwheel"
|
||||||
|
},
|
||||||
|
"axis=z": {
|
||||||
|
"model": "create:block/large_cogwheel",
|
||||||
|
"x": 90
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"variants": {
|
"variants": {
|
||||||
"": {
|
"": {
|
||||||
"model": "create:block/schematicannon/base"
|
"model": "create:block/schematicannon/block"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
16
src/generated/resources/assets/create/blockstates/shaft.json
Normal file
16
src/generated/resources/assets/create/blockstates/shaft.json
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
{
|
||||||
|
"variants": {
|
||||||
|
"axis=x": {
|
||||||
|
"model": "create:block/shaft",
|
||||||
|
"x": 90,
|
||||||
|
"y": 90
|
||||||
|
},
|
||||||
|
"axis=y": {
|
||||||
|
"model": "create:block/shaft"
|
||||||
|
},
|
||||||
|
"axis=z": {
|
||||||
|
"model": "create:block/shaft",
|
||||||
|
"x": 90
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,4 +1,5 @@
|
||||||
{
|
{
|
||||||
|
"block.create.cogwheel": "\u05DF\u01DD\u01DD\u0265\u028Dbo\u0186",
|
||||||
"block.create.creative_crate": "\u01DD\u0287\u0250\u0279\u0186 \u01DD\u028C\u0131\u0287\u0250\u01DD\u0279\u0186",
|
"block.create.creative_crate": "\u01DD\u0287\u0250\u0279\u0186 \u01DD\u028C\u0131\u0287\u0250\u01DD\u0279\u0186",
|
||||||
"block.create.dark_scoria_bricks_slab": "q\u0250\u05DFS s\u029E\u0254\u0131\u0279\u15FA \u0250\u0131\u0279o\u0254S \u029E\u0279\u0250\u15E1",
|
"block.create.dark_scoria_bricks_slab": "q\u0250\u05DFS s\u029E\u0254\u0131\u0279\u15FA \u0250\u0131\u0279o\u0254S \u029E\u0279\u0250\u15E1",
|
||||||
"block.create.dark_scoria_bricks_stairs": "s\u0279\u0131\u0250\u0287S s\u029E\u0254\u0131\u0279\u15FA \u0250\u0131\u0279o\u0254S \u029E\u0279\u0250\u15E1",
|
"block.create.dark_scoria_bricks_stairs": "s\u0279\u0131\u0250\u0287S s\u029E\u0254\u0131\u0279\u15FA \u0250\u0131\u0279o\u0254S \u029E\u0279\u0250\u15E1",
|
||||||
|
@ -8,12 +9,14 @@
|
||||||
"block.create.dolomite_slab": "q\u0250\u05DFS \u01DD\u0287\u0131\u026Fo\u05DFo\u15E1",
|
"block.create.dolomite_slab": "q\u0250\u05DFS \u01DD\u0287\u0131\u026Fo\u05DFo\u15E1",
|
||||||
"block.create.dolomite_stairs": "s\u0279\u0131\u0250\u0287S \u01DD\u0287\u0131\u026Fo\u05DFo\u15E1",
|
"block.create.dolomite_stairs": "s\u0279\u0131\u0250\u0287S \u01DD\u0287\u0131\u026Fo\u05DFo\u15E1",
|
||||||
"block.create.dolomite_wall": "\u05DF\u05DF\u0250M \u01DD\u0287\u0131\u026Fo\u05DFo\u15E1",
|
"block.create.dolomite_wall": "\u05DF\u05DF\u0250M \u01DD\u0287\u0131\u026Fo\u05DFo\u15E1",
|
||||||
|
"block.create.encased_shaft": "\u0287\u025F\u0250\u0265S p\u01DDs\u0250\u0254u\u018E",
|
||||||
"block.create.gabbro_bricks_stairs": "s\u0279\u0131\u0250\u0287S s\u029E\u0254\u0131\u0279\u15FA o\u0279qq\u0250\u2141",
|
"block.create.gabbro_bricks_stairs": "s\u0279\u0131\u0250\u0287S s\u029E\u0254\u0131\u0279\u15FA o\u0279qq\u0250\u2141",
|
||||||
"block.create.gabbro_bricks_wall": "\u05DF\u05DF\u0250M s\u029E\u0254\u0131\u0279\u15FA o\u0279qq\u0250\u2141",
|
"block.create.gabbro_bricks_wall": "\u05DF\u05DF\u0250M s\u029E\u0254\u0131\u0279\u15FA o\u0279qq\u0250\u2141",
|
||||||
"block.create.gabbro_slab": "q\u0250\u05DFS o\u0279qq\u0250\u2141",
|
"block.create.gabbro_slab": "q\u0250\u05DFS o\u0279qq\u0250\u2141",
|
||||||
"block.create.gabbro_stairs": "s\u0279\u0131\u0250\u0287S o\u0279qq\u0250\u2141",
|
"block.create.gabbro_stairs": "s\u0279\u0131\u0250\u0287S o\u0279qq\u0250\u2141",
|
||||||
"block.create.gabbro_wall": "\u05DF\u05DF\u0250M o\u0279qq\u0250\u2141",
|
"block.create.gabbro_wall": "\u05DF\u05DF\u0250M o\u0279qq\u0250\u2141",
|
||||||
"block.create.indented_gabbro_slab": "q\u0250\u05DFS o\u0279qq\u0250\u2141 p\u01DD\u0287u\u01DDpuI",
|
"block.create.indented_gabbro_slab": "q\u0250\u05DFS o\u0279qq\u0250\u2141 p\u01DD\u0287u\u01DDpuI",
|
||||||
|
"block.create.large_cogwheel": "\u05DF\u01DD\u01DD\u0265\u028Dbo\u0186 \u01DDb\u0279\u0250\uA780",
|
||||||
"block.create.limestone_bricks_slab": "q\u0250\u05DFS s\u029E\u0254\u0131\u0279\u15FA \u01DDuo\u0287s\u01DD\u026F\u0131\uA780",
|
"block.create.limestone_bricks_slab": "q\u0250\u05DFS s\u029E\u0254\u0131\u0279\u15FA \u01DDuo\u0287s\u01DD\u026F\u0131\uA780",
|
||||||
"block.create.limestone_bricks_stairs": "s\u0279\u0131\u0250\u0287S s\u029E\u0254\u0131\u0279\u15FA \u01DDuo\u0287s\u01DD\u026F\u0131\uA780",
|
"block.create.limestone_bricks_stairs": "s\u0279\u0131\u0250\u0287S s\u029E\u0254\u0131\u0279\u15FA \u01DDuo\u0287s\u01DD\u026F\u0131\uA780",
|
||||||
"block.create.limestone_bricks_wall": "\u05DF\u05DF\u0250M s\u029E\u0254\u0131\u0279\u15FA \u01DDuo\u0287s\u01DD\u026F\u0131\uA780",
|
"block.create.limestone_bricks_wall": "\u05DF\u05DF\u0250M s\u029E\u0254\u0131\u0279\u15FA \u01DDuo\u0287s\u01DD\u026F\u0131\uA780",
|
||||||
|
@ -29,6 +32,7 @@
|
||||||
"block.create.scoria_slab": "q\u0250\u05DFS \u0250\u0131\u0279o\u0254S",
|
"block.create.scoria_slab": "q\u0250\u05DFS \u0250\u0131\u0279o\u0254S",
|
||||||
"block.create.scoria_stairs": "s\u0279\u0131\u0250\u0287S \u0250\u0131\u0279o\u0254S",
|
"block.create.scoria_stairs": "s\u0279\u0131\u0250\u0287S \u0250\u0131\u0279o\u0254S",
|
||||||
"block.create.scoria_wall": "\u05DF\u05DF\u0250M \u0250\u0131\u0279o\u0254S",
|
"block.create.scoria_wall": "\u05DF\u05DF\u0250M \u0250\u0131\u0279o\u0254S",
|
||||||
|
"block.create.shaft": "\u0287\u025F\u0250\u0265S",
|
||||||
"block.create.weathered_limestone_bricks_slab": "q\u0250\u05DFS s\u029E\u0254\u0131\u0279\u15FA \u01DDuo\u0287s\u01DD\u026F\u0131\uA780 p\u01DD\u0279\u01DD\u0265\u0287\u0250\u01DDM",
|
"block.create.weathered_limestone_bricks_slab": "q\u0250\u05DFS s\u029E\u0254\u0131\u0279\u15FA \u01DDuo\u0287s\u01DD\u026F\u0131\uA780 p\u01DD\u0279\u01DD\u0265\u0287\u0250\u01DDM",
|
||||||
"block.create.weathered_limestone_bricks_stairs": "s\u0279\u0131\u0250\u0287S s\u029E\u0254\u0131\u0279\u15FA \u01DDuo\u0287s\u01DD\u026F\u0131\uA780 p\u01DD\u0279\u01DD\u0265\u0287\u0250\u01DDM",
|
"block.create.weathered_limestone_bricks_stairs": "s\u0279\u0131\u0250\u0287S s\u029E\u0254\u0131\u0279\u15FA \u01DDuo\u0287s\u01DD\u026F\u0131\uA780 p\u01DD\u0279\u01DD\u0265\u0287\u0250\u01DDM",
|
||||||
"block.create.weathered_limestone_bricks_wall": "\u05DF\u05DF\u0250M s\u029E\u0254\u0131\u0279\u15FA \u01DDuo\u0287s\u01DD\u026F\u0131\uA780 p\u01DD\u0279\u01DD\u0265\u0287\u0250\u01DDM",
|
"block.create.weathered_limestone_bricks_wall": "\u05DF\u05DF\u0250M s\u029E\u0254\u0131\u0279\u15FA \u01DDuo\u0287s\u01DD\u026F\u0131\uA780 p\u01DD\u0279\u01DD\u0265\u0287\u0250\u01DDM",
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{
|
{
|
||||||
|
"block.create.cogwheel": "Cogwheel",
|
||||||
"block.create.creative_crate": "Creative Crate",
|
"block.create.creative_crate": "Creative Crate",
|
||||||
"block.create.dark_scoria_bricks_slab": "Dark Scoria Bricks Slab",
|
"block.create.dark_scoria_bricks_slab": "Dark Scoria Bricks Slab",
|
||||||
"block.create.dark_scoria_bricks_stairs": "Dark Scoria Bricks Stairs",
|
"block.create.dark_scoria_bricks_stairs": "Dark Scoria Bricks Stairs",
|
||||||
|
@ -8,12 +9,14 @@
|
||||||
"block.create.dolomite_slab": "Dolomite Slab",
|
"block.create.dolomite_slab": "Dolomite Slab",
|
||||||
"block.create.dolomite_stairs": "Dolomite Stairs",
|
"block.create.dolomite_stairs": "Dolomite Stairs",
|
||||||
"block.create.dolomite_wall": "Dolomite Wall",
|
"block.create.dolomite_wall": "Dolomite Wall",
|
||||||
|
"block.create.encased_shaft": "Encased Shaft",
|
||||||
"block.create.gabbro_bricks_stairs": "Gabbro Bricks Stairs",
|
"block.create.gabbro_bricks_stairs": "Gabbro Bricks Stairs",
|
||||||
"block.create.gabbro_bricks_wall": "Gabbro Bricks Wall",
|
"block.create.gabbro_bricks_wall": "Gabbro Bricks Wall",
|
||||||
"block.create.gabbro_slab": "Gabbro Slab",
|
"block.create.gabbro_slab": "Gabbro Slab",
|
||||||
"block.create.gabbro_stairs": "Gabbro Stairs",
|
"block.create.gabbro_stairs": "Gabbro Stairs",
|
||||||
"block.create.gabbro_wall": "Gabbro Wall",
|
"block.create.gabbro_wall": "Gabbro Wall",
|
||||||
"block.create.indented_gabbro_slab": "Indented Gabbro Slab",
|
"block.create.indented_gabbro_slab": "Indented Gabbro Slab",
|
||||||
|
"block.create.large_cogwheel": "Large Cogwheel",
|
||||||
"block.create.limestone_bricks_slab": "Limestone Bricks Slab",
|
"block.create.limestone_bricks_slab": "Limestone Bricks Slab",
|
||||||
"block.create.limestone_bricks_stairs": "Limestone Bricks Stairs",
|
"block.create.limestone_bricks_stairs": "Limestone Bricks Stairs",
|
||||||
"block.create.limestone_bricks_wall": "Limestone Bricks Wall",
|
"block.create.limestone_bricks_wall": "Limestone Bricks Wall",
|
||||||
|
@ -29,6 +32,7 @@
|
||||||
"block.create.scoria_slab": "Scoria Slab",
|
"block.create.scoria_slab": "Scoria Slab",
|
||||||
"block.create.scoria_stairs": "Scoria Stairs",
|
"block.create.scoria_stairs": "Scoria Stairs",
|
||||||
"block.create.scoria_wall": "Scoria Wall",
|
"block.create.scoria_wall": "Scoria Wall",
|
||||||
|
"block.create.shaft": "Shaft",
|
||||||
"block.create.weathered_limestone_bricks_slab": "Weathered Limestone Bricks Slab",
|
"block.create.weathered_limestone_bricks_slab": "Weathered Limestone Bricks Slab",
|
||||||
"block.create.weathered_limestone_bricks_stairs": "Weathered Limestone Bricks Stairs",
|
"block.create.weathered_limestone_bricks_stairs": "Weathered Limestone Bricks Stairs",
|
||||||
"block.create.weathered_limestone_bricks_wall": "Weathered Limestone Bricks Wall",
|
"block.create.weathered_limestone_bricks_wall": "Weathered Limestone Bricks Wall",
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"parent": "create:block/cogwheel"
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"parent": "create:block/encased_shaft/item"
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"parent": "create:block/large_cogwheel"
|
||||||
|
}
|
|
@ -1,3 +1,3 @@
|
||||||
{
|
{
|
||||||
"parent": "create:block/schematicannon/base"
|
"parent": "create:block/schematicannon/item"
|
||||||
}
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"parent": "create:block/shaft"
|
||||||
|
}
|
|
@ -50,13 +50,9 @@ import com.simibubi.create.modules.contraptions.redstone.ContactBlock;
|
||||||
import com.simibubi.create.modules.contraptions.relays.advanced.SpeedControllerBlock;
|
import com.simibubi.create.modules.contraptions.relays.advanced.SpeedControllerBlock;
|
||||||
import com.simibubi.create.modules.contraptions.relays.advanced.sequencer.SequencedGearshiftBlock;
|
import com.simibubi.create.modules.contraptions.relays.advanced.sequencer.SequencedGearshiftBlock;
|
||||||
import com.simibubi.create.modules.contraptions.relays.belt.BeltBlock;
|
import com.simibubi.create.modules.contraptions.relays.belt.BeltBlock;
|
||||||
import com.simibubi.create.modules.contraptions.relays.elementary.CogWheelBlock;
|
|
||||||
import com.simibubi.create.modules.contraptions.relays.elementary.CogwheelBlockItem;
|
|
||||||
import com.simibubi.create.modules.contraptions.relays.elementary.ShaftBlock;
|
|
||||||
import com.simibubi.create.modules.contraptions.relays.encased.AdjustablePulleyBlock;
|
import com.simibubi.create.modules.contraptions.relays.encased.AdjustablePulleyBlock;
|
||||||
import com.simibubi.create.modules.contraptions.relays.encased.ClutchBlock;
|
import com.simibubi.create.modules.contraptions.relays.encased.ClutchBlock;
|
||||||
import com.simibubi.create.modules.contraptions.relays.encased.EncasedBeltBlock;
|
import com.simibubi.create.modules.contraptions.relays.encased.EncasedBeltBlock;
|
||||||
import com.simibubi.create.modules.contraptions.relays.encased.EncasedShaftBlock;
|
|
||||||
import com.simibubi.create.modules.contraptions.relays.encased.GearshiftBlock;
|
import com.simibubi.create.modules.contraptions.relays.encased.GearshiftBlock;
|
||||||
import com.simibubi.create.modules.contraptions.relays.gauge.GaugeBlock;
|
import com.simibubi.create.modules.contraptions.relays.gauge.GaugeBlock;
|
||||||
import com.simibubi.create.modules.contraptions.relays.gearbox.GearboxBlock;
|
import com.simibubi.create.modules.contraptions.relays.gearbox.GearboxBlock;
|
||||||
|
@ -122,13 +118,14 @@ public enum AllBlocks implements NonNullSupplier<Block> {
|
||||||
|
|
||||||
_1_(Sections.KINETICS),
|
_1_(Sections.KINETICS),
|
||||||
|
|
||||||
SHAFT(() -> new ShaftBlock(Properties.from(Blocks.ANDESITE))),
|
// SHAFT(() -> new ShaftBlock(Properties.from(Blocks.ANDESITE))),
|
||||||
COGWHEEL(() -> new CogWheelBlock(false), (b, p) -> new CogwheelBlockItem(b, p, false)),
|
// COGWHEEL(() -> new CogWheelBlock(false), (b, p) -> new CogwheelBlockItem(b, p, false)),
|
||||||
LARGE_COGWHEEL(() -> new CogWheelBlock(true), (b, p) -> new CogwheelBlockItem(b, p, true)),
|
// LARGE_COGWHEEL(() -> new CogWheelBlock(true), (b, p) -> new CogwheelBlockItem(b, p, true)),
|
||||||
ENCASED_SHAFT(EncasedShaftBlock::new),
|
// ENCASED_SHAFT(EncasedShaftBlock::new),
|
||||||
GEARBOX(GearboxBlock::new),
|
GEARBOX(GearboxBlock::new),
|
||||||
CLUTCH(ClutchBlock::new),
|
CLUTCH(ClutchBlock::new),
|
||||||
GEARSHIFT(GearshiftBlock::new),
|
GEARSHIFT(GearshiftBlock::new),
|
||||||
|
|
||||||
ENCASED_BELT(EncasedBeltBlock::new),
|
ENCASED_BELT(EncasedBeltBlock::new),
|
||||||
ADJUSTABLE_PULLEY(AdjustablePulleyBlock::new),
|
ADJUSTABLE_PULLEY(AdjustablePulleyBlock::new),
|
||||||
BELT(BeltBlock::new, ComesWith.NO_BLOCKITEM),
|
BELT(BeltBlock::new, ComesWith.NO_BLOCKITEM),
|
||||||
|
|
|
@ -2,28 +2,39 @@ package com.simibubi.create;
|
||||||
|
|
||||||
import static com.simibubi.create.modules.Sections.SCHEMATICS;
|
import static com.simibubi.create.modules.Sections.SCHEMATICS;
|
||||||
|
|
||||||
|
import com.simibubi.create.foundation.utility.data.BlockStateGen;
|
||||||
|
import com.simibubi.create.modules.Sections;
|
||||||
|
import com.simibubi.create.modules.contraptions.relays.elementary.CogWheelBlock;
|
||||||
|
import com.simibubi.create.modules.contraptions.relays.elementary.CogwheelBlockItem;
|
||||||
|
import com.simibubi.create.modules.contraptions.relays.elementary.ShaftBlock;
|
||||||
|
import com.simibubi.create.modules.contraptions.relays.encased.EncasedShaftBlock;
|
||||||
import com.simibubi.create.modules.schematics.block.CreativeCrateBlock;
|
import com.simibubi.create.modules.schematics.block.CreativeCrateBlock;
|
||||||
import com.simibubi.create.modules.schematics.block.SchematicTableBlock;
|
import com.simibubi.create.modules.schematics.block.SchematicTableBlock;
|
||||||
import com.simibubi.create.modules.schematics.block.SchematicannonBlock;
|
import com.simibubi.create.modules.schematics.block.SchematicannonBlock;
|
||||||
import com.tterrag.registrate.util.RegistryEntry;
|
import com.tterrag.registrate.util.RegistryEntry;
|
||||||
|
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.block.Blocks;
|
import net.minecraft.block.Blocks;
|
||||||
|
import net.minecraft.block.SoundType;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraftforge.registries.IForgeRegistryEntry;
|
||||||
|
|
||||||
public class AllBlocksNew {
|
public class AllBlocksNew {
|
||||||
|
|
||||||
private static final CreateRegistrate REGISTRATE = Create.registrate();
|
private static final CreateRegistrate REGISTRATE = Create.registrate();
|
||||||
|
|
||||||
// Tools for strucuture movement and replication
|
|
||||||
static { REGISTRATE.startSection(SCHEMATICS); }
|
static { REGISTRATE.startSection(SCHEMATICS); }
|
||||||
|
|
||||||
public static final RegistryEntry<SchematicannonBlock> SCHEMATICANNON = REGISTRATE.block("schematicannon", SchematicannonBlock::new)
|
public static final RegistryEntry<SchematicannonBlock> SCHEMATICANNON = REGISTRATE.block("schematicannon", SchematicannonBlock::new)
|
||||||
.initialProperties(() -> Blocks.DISPENSER)
|
.initialProperties(() -> Blocks.DISPENSER)
|
||||||
.blockstate((ctx, prov) -> prov.simpleBlock(ctx.getEntry(), prov.models().getExistingFile(prov.modLoc("block/" + ctx.getName() + "/base"))))
|
.blockstate((ctx, prov) -> prov.simpleBlock(ctx.getEntry(), BlockStateGen.partialBaseModel(ctx, prov)))
|
||||||
.item()
|
.item()
|
||||||
.model((ctx, prov) -> prov.blockItem(ctx.getEntry()::getBlock, "/item"))
|
.model(BlockStateGen::customItemModel)
|
||||||
.build()
|
.build()
|
||||||
.register();
|
.register();
|
||||||
|
|
||||||
|
|
||||||
public static final RegistryEntry<CreativeCrateBlock> CREATIVE_CRATE = REGISTRATE.block("creative_crate", CreativeCrateBlock::new)
|
public static final RegistryEntry<CreativeCrateBlock> CREATIVE_CRATE = REGISTRATE.block("creative_crate", CreativeCrateBlock::new)
|
||||||
.initialProperties(() -> Blocks.CHEST)
|
.initialProperties(() -> Blocks.CHEST)
|
||||||
.blockstate((ctx, prov) -> prov.simpleBlock(ctx.getEntry(), prov.models().getExistingFile(ctx.getId())))
|
.blockstate((ctx, prov) -> prov.simpleBlock(ctx.getEntry(), prov.models().getExistingFile(ctx.getId())))
|
||||||
|
@ -35,6 +46,51 @@ public class AllBlocksNew {
|
||||||
.blockstate((ctx, prov) -> prov.horizontalBlock(ctx.getEntry(), prov.models().getExistingFile(ctx.getId()), 0))
|
.blockstate((ctx, prov) -> prov.horizontalBlock(ctx.getEntry(), prov.models().getExistingFile(ctx.getId()), 0))
|
||||||
.simpleItem()
|
.simpleItem()
|
||||||
.register();
|
.register();
|
||||||
|
|
||||||
|
static { REGISTRATE.startSection(Sections.KINETICS); }
|
||||||
|
|
||||||
|
public static final RegistryEntry<ShaftBlock> SHAFT = REGISTRATE.block("shaft", ShaftBlock::new)
|
||||||
|
.initialProperties(SharedProperties::kinetic)
|
||||||
|
.blockstate((c, p) -> BlockStateGen.axisKineticBlock(c, p, BlockStateGen.standardModel(c, p)))
|
||||||
|
.simpleItem()
|
||||||
|
.register();
|
||||||
|
|
||||||
|
public static final RegistryEntry<CogWheelBlock> COGWHEEL = REGISTRATE.block("cogwheel", CogWheelBlock::small)
|
||||||
|
.initialProperties(SharedProperties::kinetic)
|
||||||
|
.properties(p -> p.sound(SoundType.WOOD))
|
||||||
|
.blockstate((c, p) -> BlockStateGen.axisKineticBlock(c, p, BlockStateGen.standardModel(c, p)))
|
||||||
|
.item(CogwheelBlockItem::new).build()
|
||||||
|
.register();
|
||||||
|
|
||||||
|
public static final RegistryEntry<CogWheelBlock> LARGE_COGWHEEL = REGISTRATE.block("large_cogwheel", CogWheelBlock::large)
|
||||||
|
.initialProperties(SharedProperties::kinetic)
|
||||||
|
.properties(p -> p.sound(SoundType.WOOD))
|
||||||
|
.blockstate((c, p) -> BlockStateGen.axisKineticBlock(c, p, BlockStateGen.standardModel(c, p)))
|
||||||
|
.item(CogwheelBlockItem::new).build()
|
||||||
|
.register();
|
||||||
|
|
||||||
|
public static final RegistryEntry<EncasedShaftBlock> ENCASED_SHAFT = REGISTRATE.block("encased_shaft", EncasedShaftBlock::new)
|
||||||
|
.initialProperties(SharedProperties::kinetic)
|
||||||
|
.blockstate((c, p) -> BlockStateGen.axisKineticBlock(c, p, BlockStateGen.partialBaseModel(c, p)))
|
||||||
|
.item()
|
||||||
|
.model(BlockStateGen::customItemModel)
|
||||||
|
.build()
|
||||||
|
.register();
|
||||||
|
|
||||||
public static void register() {}
|
public static void register() {}
|
||||||
|
|
||||||
|
// Ideally these following three methods would be part of the RegistryEntry instances
|
||||||
|
|
||||||
|
public static <T extends Block & IForgeRegistryEntry<Block>> boolean equals(RegistryEntry<T> entry, BlockState state) {
|
||||||
|
return entry.map(state.getBlock()::equals).get();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ItemStack asStack(RegistryEntry<? extends Block> entry) {
|
||||||
|
return new ItemStack(entry.get());
|
||||||
|
}
|
||||||
|
|
||||||
|
public static BlockState getDefault(RegistryEntry<? extends Block> entry) {
|
||||||
|
return entry.get().getDefaultState();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,6 +67,7 @@ public enum AllEntities {
|
||||||
@SuppressWarnings("unchecked") // TODO 1.15 this generic stuff is incompatible with the enum system - need strong types
|
@SuppressWarnings("unchecked") // TODO 1.15 this generic stuff is incompatible with the enum system - need strong types
|
||||||
@OnlyIn(value = Dist.CLIENT)
|
@OnlyIn(value = Dist.CLIENT)
|
||||||
public static void registerRenderers() {
|
public static void registerRenderers() {
|
||||||
|
RenderingRegistry.registerEntityRenderingHandler((EntityType<ContraptionEntity>) STATIONARY_CONTRAPTION.type, ContraptionEntityRenderer::new);
|
||||||
RenderingRegistry.registerEntityRenderingHandler((EntityType<ContraptionEntity>) CONTRAPTION.type, ContraptionEntityRenderer::new);
|
RenderingRegistry.registerEntityRenderingHandler((EntityType<ContraptionEntity>) CONTRAPTION.type, ContraptionEntityRenderer::new);
|
||||||
RenderingRegistry.registerEntityRenderingHandler((EntityType<SuperGlueEntity>) SUPER_GLUE.type, SuperGlueRenderer::new);
|
RenderingRegistry.registerEntityRenderingHandler((EntityType<SuperGlueEntity>) SUPER_GLUE.type, SuperGlueRenderer::new);
|
||||||
}
|
}
|
||||||
|
|
|
@ -108,11 +108,11 @@ public enum AllTileEntities {
|
||||||
SCHEMATICTABLE(SchematicTableTileEntity::new, AllBlocksNew.SCHEMATIC_TABLE),
|
SCHEMATICTABLE(SchematicTableTileEntity::new, AllBlocksNew.SCHEMATIC_TABLE),
|
||||||
|
|
||||||
// Kinetics
|
// Kinetics
|
||||||
SHAFT(ShaftTileEntity::new, AllBlocks.SHAFT, AllBlocks.COGWHEEL, AllBlocks.LARGE_COGWHEEL, AllBlocks.ENCASED_SHAFT),
|
SHAFT(ShaftTileEntity::new, AllBlocksNew.SHAFT, AllBlocksNew.COGWHEEL, AllBlocksNew.LARGE_COGWHEEL, AllBlocksNew.ENCASED_SHAFT),
|
||||||
MOTOR(MotorTileEntity::new, AllBlocks.CREATIVE_MOTOR),
|
MOTOR(MotorTileEntity::new, AllBlocks.CREATIVE_MOTOR),
|
||||||
GEARBOX(GearboxTileEntity::new, AllBlocks.GEARBOX),
|
GEARBOX(GearboxTileEntity::new, AllBlocks.GEARBOX),
|
||||||
TURNTABLE(TurntableTileEntity::new, AllBlocks.TURNTABLE),
|
TURNTABLE(TurntableTileEntity::new, AllBlocks.TURNTABLE),
|
||||||
ENCASED_SHAFT(EncasedShaftTileEntity::new, AllBlocks.ENCASED_SHAFT, AllBlocks.ENCASED_BELT),
|
ENCASED_SHAFT(EncasedShaftTileEntity::new, AllBlocksNew.ENCASED_SHAFT, AllBlocks.ENCASED_BELT),
|
||||||
ADJUSTABLE_PULLEY(AdjustablePulleyTileEntity::new, AllBlocks.ADJUSTABLE_PULLEY),
|
ADJUSTABLE_PULLEY(AdjustablePulleyTileEntity::new, AllBlocks.ADJUSTABLE_PULLEY),
|
||||||
ENCASED_FAN(EncasedFanTileEntity::new, AllBlocks.ENCASED_FAN),
|
ENCASED_FAN(EncasedFanTileEntity::new, AllBlocks.ENCASED_FAN),
|
||||||
NOZZLE(NozzleTileEntity::new, AllBlocks.NOZZLE),
|
NOZZLE(NozzleTileEntity::new, AllBlocks.NOZZLE),
|
||||||
|
|
|
@ -23,7 +23,7 @@ public final class CreateItemGroup extends ItemGroup {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ItemStack createIcon() {
|
public ItemStack createIcon() {
|
||||||
return new ItemStack(AllBlocks.COGWHEEL.get());
|
return AllBlocksNew.asStack(AllBlocksNew.COGWHEEL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
12
src/main/java/com/simibubi/create/SharedProperties.java
Normal file
12
src/main/java/com/simibubi/create/SharedProperties.java
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
package com.simibubi.create;
|
||||||
|
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.block.Blocks;
|
||||||
|
|
||||||
|
public class SharedProperties {
|
||||||
|
|
||||||
|
static Block kinetic() {
|
||||||
|
return Blocks.ANDESITE;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -1,14 +1,22 @@
|
||||||
package com.simibubi.create.compat.jei.category.animations;
|
package com.simibubi.create.compat.jei.category.animations;
|
||||||
|
|
||||||
|
import com.simibubi.create.AllBlocksNew;
|
||||||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||||
|
|
||||||
import mezz.jei.api.gui.drawable.IDrawable;
|
import mezz.jei.api.gui.drawable.IDrawable;
|
||||||
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.minecraft.state.properties.BlockStateProperties;
|
||||||
|
import net.minecraft.util.Direction.Axis;
|
||||||
|
|
||||||
public abstract class AnimatedKinetics implements IDrawable {
|
public abstract class AnimatedKinetics implements IDrawable {
|
||||||
|
|
||||||
public static float getCurrentAngle() {
|
public static float getCurrentAngle() {
|
||||||
return ((AnimationTickHolder.ticks + Minecraft.getInstance().getRenderPartialTicks()) * 4f) % 360;
|
return ((AnimationTickHolder.ticks + Minecraft.getInstance().getRenderPartialTicks()) * 4f) % 360;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected BlockState shaft(Axis axis) {
|
||||||
|
return AllBlocksNew.getDefault(AllBlocksNew.SHAFT).with(BlockStateProperties.AXIS, axis);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,7 @@ import static com.simibubi.create.foundation.utility.AnimationTickHolder.ticks;
|
||||||
import com.mojang.blaze3d.systems.RenderSystem;
|
import com.mojang.blaze3d.systems.RenderSystem;
|
||||||
import com.simibubi.create.AllBlockPartials;
|
import com.simibubi.create.AllBlockPartials;
|
||||||
import com.simibubi.create.AllBlocks;
|
import com.simibubi.create.AllBlocks;
|
||||||
|
import com.simibubi.create.AllBlocksNew;
|
||||||
import com.simibubi.create.foundation.gui.ScreenElementRenderer;
|
import com.simibubi.create.foundation.gui.ScreenElementRenderer;
|
||||||
|
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
|
@ -17,11 +18,11 @@ import net.minecraft.util.Direction.Axis;
|
||||||
public class AnimatedPress extends AnimatedKinetics {
|
public class AnimatedPress extends AnimatedKinetics {
|
||||||
|
|
||||||
private boolean basin;
|
private boolean basin;
|
||||||
|
|
||||||
public AnimatedPress(boolean basin) {
|
public AnimatedPress(boolean basin) {
|
||||||
this.basin = basin;
|
this.basin = basin;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getWidth() {
|
public int getWidth() {
|
||||||
return 50;
|
return 50;
|
||||||
|
@ -53,7 +54,7 @@ public class AnimatedPress extends AnimatedKinetics {
|
||||||
RenderSystem.pushMatrix();
|
RenderSystem.pushMatrix();
|
||||||
ScreenElementRenderer.renderModel(this::head);
|
ScreenElementRenderer.renderModel(this::head);
|
||||||
RenderSystem.popMatrix();
|
RenderSystem.popMatrix();
|
||||||
|
|
||||||
if (basin) {
|
if (basin) {
|
||||||
RenderSystem.pushMatrix();
|
RenderSystem.pushMatrix();
|
||||||
ScreenElementRenderer.renderBlock(this::basin);
|
ScreenElementRenderer.renderBlock(this::basin);
|
||||||
|
@ -68,7 +69,7 @@ public class AnimatedPress extends AnimatedKinetics {
|
||||||
RenderSystem.translatef(t, -t, -t);
|
RenderSystem.translatef(t, -t, -t);
|
||||||
RenderSystem.rotatef(getCurrentAngle() * 2, 1, 0, 0);
|
RenderSystem.rotatef(getCurrentAngle() * 2, 1, 0, 0);
|
||||||
RenderSystem.translatef(-t, t, t);
|
RenderSystem.translatef(-t, t, t);
|
||||||
return AllBlocks.SHAFT.get().getDefaultState().with(BlockStateProperties.AXIS, Axis.Z);
|
return AllBlocksNew.getDefault(AllBlocksNew.SHAFT).with(BlockStateProperties.AXIS, Axis.Z);
|
||||||
}
|
}
|
||||||
|
|
||||||
private BlockState body() {
|
private BlockState body() {
|
||||||
|
@ -92,7 +93,7 @@ public class AnimatedPress extends AnimatedKinetics {
|
||||||
RenderSystem.translated(0, -verticalOffset * 50, 0);
|
RenderSystem.translated(0, -verticalOffset * 50, 0);
|
||||||
return AllBlockPartials.MECHANICAL_PRESS_HEAD.get();
|
return AllBlockPartials.MECHANICAL_PRESS_HEAD.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
private BlockState basin() {
|
private BlockState basin() {
|
||||||
RenderSystem.translatef(0, 85, 0);
|
RenderSystem.translatef(0, 85, 0);
|
||||||
return AllBlocks.BASIN.get().getDefaultState();
|
return AllBlocks.BASIN.get().getDefaultState();
|
||||||
|
|
|
@ -48,7 +48,7 @@ public class AnimatedSaw extends AnimatedKinetics {
|
||||||
RenderSystem.translatef(t, -t, t);
|
RenderSystem.translatef(t, -t, t);
|
||||||
RenderSystem.rotatef(-getCurrentAngle() * 2, 0, 0, 1);
|
RenderSystem.rotatef(-getCurrentAngle() * 2, 0, 0, 1);
|
||||||
RenderSystem.translatef(-t, t, -t);
|
RenderSystem.translatef(-t, t, -t);
|
||||||
return AllBlocks.SHAFT.get().getDefaultState().with(BlockStateProperties.AXIS, Axis.X);
|
return shaft(Axis.X);
|
||||||
}
|
}
|
||||||
|
|
||||||
private BlockState block() {
|
private BlockState block() {
|
||||||
|
|
|
@ -0,0 +1,60 @@
|
||||||
|
|
||||||
|
package com.simibubi.create.foundation.utility.data;
|
||||||
|
|
||||||
|
import com.simibubi.create.modules.contraptions.base.RotatedPillarKineticBlock;
|
||||||
|
import com.tterrag.registrate.providers.DataGenContext;
|
||||||
|
import com.tterrag.registrate.providers.RegistrateBlockstateProvider;
|
||||||
|
import com.tterrag.registrate.providers.RegistrateItemModelProvider;
|
||||||
|
import com.tterrag.registrate.util.nullness.NonnullType;
|
||||||
|
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.block.RotatedPillarBlock;
|
||||||
|
import net.minecraft.item.BlockItem;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.util.Direction.Axis;
|
||||||
|
import net.minecraftforge.client.model.generators.ItemModelBuilder;
|
||||||
|
import net.minecraftforge.client.model.generators.ModelFile.ExistingModelFile;
|
||||||
|
import net.minecraftforge.client.model.generators.VariantBlockStateBuilder;
|
||||||
|
|
||||||
|
public class BlockStateGen {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Equivalent to BlockStateProvider#axisBlock without the need for a
|
||||||
|
* RotatedPillarBlock instance
|
||||||
|
*/
|
||||||
|
public static <T extends RotatedPillarKineticBlock> VariantBlockStateBuilder axisKineticBlock(
|
||||||
|
DataGenContext<Block, T> ctx, RegistrateBlockstateProvider prov, ExistingModelFile model) {
|
||||||
|
RotatedPillarKineticBlock block = ctx.getEntry();
|
||||||
|
return prov.getVariantBuilder(block).partialState().with(RotatedPillarBlock.AXIS, Axis.Y).modelForState()
|
||||||
|
.modelFile(model).addModel().partialState().with(RotatedPillarBlock.AXIS, Axis.Z).modelForState()
|
||||||
|
.modelFile(model).rotationX(90).addModel().partialState().with(RotatedPillarBlock.AXIS, Axis.X)
|
||||||
|
.modelForState().modelFile(model).rotationX(90).rotationY(90).addModel();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Custom block models packaged with other partials. Example:
|
||||||
|
* models/block/schematicannon/block.json
|
||||||
|
*/
|
||||||
|
public static ExistingModelFile partialBaseModel(@NonnullType DataGenContext<?, ?> ctx,
|
||||||
|
@NonnullType RegistrateBlockstateProvider prov) {
|
||||||
|
return prov.models().getExistingFile(prov.modLoc("block/" + ctx.getName() + "/block"));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Custom block model from models/block/x.json
|
||||||
|
*/
|
||||||
|
public static ExistingModelFile standardModel(@NonnullType DataGenContext<?, ?> ctx,
|
||||||
|
@NonnullType RegistrateBlockstateProvider prov) {
|
||||||
|
return prov.models().getExistingFile(prov.modLoc("block/" + ctx.getName()));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generate item model inheriting from a seperate model in
|
||||||
|
* models/block/x/item.json
|
||||||
|
*/
|
||||||
|
public static ItemModelBuilder customItemModel(@NonnullType DataGenContext<Item, ? extends BlockItem> ctx,
|
||||||
|
@NonnullType RegistrateItemModelProvider prov) {
|
||||||
|
return prov.blockItem(ctx.getEntry()::getBlock, "/item");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
package com.simibubi.create.modules.contraptions;
|
package com.simibubi.create.modules.contraptions;
|
||||||
|
|
||||||
import static com.simibubi.create.AllBlocks.BELT;
|
import static com.simibubi.create.AllBlocks.BELT;
|
||||||
import static com.simibubi.create.AllBlocks.LARGE_COGWHEEL;
|
import static com.simibubi.create.modules.contraptions.relays.elementary.CogWheelBlock.isLargeCog;
|
||||||
import static net.minecraft.state.properties.BlockStateProperties.AXIS;
|
import static net.minecraft.state.properties.BlockStateProperties.AXIS;
|
||||||
|
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
|
@ -90,18 +90,18 @@ public class RotationPropagator {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Gear <-> Large Gear
|
// Gear <-> Large Gear
|
||||||
if (LARGE_COGWHEEL.typeOf(stateFrom) && definitionTo.hasIntegratedCogwheel(world, to.getPos(), stateTo))
|
if (isLargeCog(stateFrom) && definitionTo.hasIntegratedCogwheel(world, to.getPos(), stateTo))
|
||||||
if (isLargeToSmallGear(stateFrom, stateTo, definitionTo, diff))
|
if (isLargeToSmallCog(stateFrom, stateTo, definitionTo, diff))
|
||||||
return -2f;
|
return -2f;
|
||||||
if (LARGE_COGWHEEL.typeOf(stateTo) && definitionFrom.hasIntegratedCogwheel(world, from.getPos(), stateFrom))
|
if (isLargeCog(stateTo) && definitionFrom.hasIntegratedCogwheel(world, from.getPos(), stateFrom))
|
||||||
if (isLargeToSmallGear(stateTo, stateFrom, definitionFrom, diff))
|
if (isLargeToSmallCog(stateTo, stateFrom, definitionFrom, diff))
|
||||||
return -.5f;
|
return -.5f;
|
||||||
|
|
||||||
// Gear <-> Gear
|
// Gear <-> Gear
|
||||||
if (connectedByGears) {
|
if (connectedByGears) {
|
||||||
if (diff.manhattanDistance(BlockPos.ZERO) != 1)
|
if (diff.manhattanDistance(BlockPos.ZERO) != 1)
|
||||||
return 0;
|
return 0;
|
||||||
if (LARGE_COGWHEEL.typeOf(stateTo))
|
if (isLargeCog(stateTo))
|
||||||
return 0;
|
return 0;
|
||||||
if (direction.getAxis() == definitionFrom.getRotationAxis(stateFrom))
|
if (direction.getAxis() == definitionFrom.getRotationAxis(stateFrom))
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -118,9 +118,9 @@ public class RotationPropagator {
|
||||||
final BlockPos diff = to.getPos().subtract(from.getPos());
|
final BlockPos diff = to.getPos().subtract(from.getPos());
|
||||||
|
|
||||||
// Rotation Speed Controller <-> Large Gear
|
// Rotation Speed Controller <-> Large Gear
|
||||||
if (isLargeGearToSpeedController(stateFrom, stateTo, diff))
|
if (isLargeCogToSpeedController(stateFrom, stateTo, diff))
|
||||||
return SpeedControllerTileEntity.getConveyedSpeed(from, to, true);
|
return SpeedControllerTileEntity.getConveyedSpeed(from, to, true);
|
||||||
if (isLargeGearToSpeedController(stateTo, stateFrom, diff))
|
if (isLargeCogToSpeedController(stateTo, stateFrom, diff))
|
||||||
return SpeedControllerTileEntity.getConveyedSpeed(to, from, false);
|
return SpeedControllerTileEntity.getConveyedSpeed(to, from, false);
|
||||||
|
|
||||||
float rotationSpeedModifier = getRotationSpeedModifier(from, to);
|
float rotationSpeedModifier = getRotationSpeedModifier(from, to);
|
||||||
|
@ -128,7 +128,7 @@ public class RotationPropagator {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean isLargeToLargeGear(BlockState from, BlockState to, BlockPos diff) {
|
private static boolean isLargeToLargeGear(BlockState from, BlockState to, BlockPos diff) {
|
||||||
if (!LARGE_COGWHEEL.typeOf(from) || !LARGE_COGWHEEL.typeOf(to))
|
if (!isLargeCog(from) || !isLargeCog(to))
|
||||||
return false;
|
return false;
|
||||||
Axis fromAxis = from.get(AXIS);
|
Axis fromAxis = from.get(AXIS);
|
||||||
Axis toAxis = to.get(AXIS);
|
Axis toAxis = to.get(AXIS);
|
||||||
|
@ -161,7 +161,7 @@ public class RotationPropagator {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean isLargeToSmallGear(BlockState from, BlockState to, IRotate defTo, BlockPos diff) {
|
private static boolean isLargeToSmallCog(BlockState from, BlockState to, IRotate defTo, BlockPos diff) {
|
||||||
Axis axisFrom = from.get(AXIS);
|
Axis axisFrom = from.get(AXIS);
|
||||||
if (axisFrom != defTo.getRotationAxis(to))
|
if (axisFrom != defTo.getRotationAxis(to))
|
||||||
return false;
|
return false;
|
||||||
|
@ -176,8 +176,8 @@ public class RotationPropagator {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean isLargeGearToSpeedController(BlockState from, BlockState to, BlockPos diff) {
|
private static boolean isLargeCogToSpeedController(BlockState from, BlockState to, BlockPos diff) {
|
||||||
if (!LARGE_COGWHEEL.typeOf(from) || !AllBlocks.ROTATION_SPEED_CONTROLLER.typeOf(to))
|
if (!isLargeCog(from) || !AllBlocks.ROTATION_SPEED_CONTROLLER.typeOf(to))
|
||||||
return false;
|
return false;
|
||||||
if (!diff.equals(BlockPos.ZERO.up()) && !diff.equals(BlockPos.ZERO.down()))
|
if (!diff.equals(BlockPos.ZERO.up()) && !diff.equals(BlockPos.ZERO.down()))
|
||||||
return false;
|
return false;
|
||||||
|
@ -301,7 +301,7 @@ public class RotationPropagator {
|
||||||
TileEntity tileEntity = worldIn.getTileEntity(neighbourPos);
|
TileEntity tileEntity = worldIn.getTileEntity(neighbourPos);
|
||||||
if (!(tileEntity instanceof KineticTileEntity))
|
if (!(tileEntity instanceof KineticTileEntity))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
final KineticTileEntity neighbourTE = (KineticTileEntity) tileEntity;
|
final KineticTileEntity neighbourTE = (KineticTileEntity) tileEntity;
|
||||||
if (!neighbourTE.hasSource() || !neighbourTE.source.equals(pos))
|
if (!neighbourTE.hasSource() || !neighbourTE.source.equals(pos))
|
||||||
continue;
|
continue;
|
||||||
|
@ -383,9 +383,9 @@ public class RotationPropagator {
|
||||||
final BlockState stateTo = to.getBlockState();
|
final BlockState stateTo = to.getBlockState();
|
||||||
final BlockPos diff = to.getPos().subtract(from.getPos());
|
final BlockPos diff = to.getPos().subtract(from.getPos());
|
||||||
|
|
||||||
if (isLargeGearToSpeedController(stateFrom, stateTo, diff))
|
if (isLargeCogToSpeedController(stateFrom, stateTo, diff))
|
||||||
return true;
|
return true;
|
||||||
if (isLargeGearToSpeedController(stateTo, stateFrom, diff))
|
if (isLargeCogToSpeedController(stateTo, stateFrom, diff))
|
||||||
return true;
|
return true;
|
||||||
return getRotationSpeedModifier(from, to) != 0;
|
return getRotationSpeedModifier(from, to) != 0;
|
||||||
}
|
}
|
||||||
|
@ -413,7 +413,7 @@ public class RotationPropagator {
|
||||||
|
|
||||||
// Some Blocks can interface diagonally
|
// Some Blocks can interface diagonally
|
||||||
BlockState blockState = te.getBlockState();
|
BlockState blockState = te.getBlockState();
|
||||||
boolean isLargeWheel = LARGE_COGWHEEL.typeOf(blockState);
|
boolean isLargeWheel = isLargeCog(blockState);
|
||||||
|
|
||||||
if (!(blockState.getBlock() instanceof IRotate))
|
if (!(blockState.getBlock() instanceof IRotate))
|
||||||
return neighbours;
|
return neighbours;
|
||||||
|
|
|
@ -2,7 +2,6 @@ package com.simibubi.create.modules.contraptions.base;
|
||||||
|
|
||||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||||
import com.mojang.blaze3d.vertex.IVertexBuilder;
|
import com.mojang.blaze3d.vertex.IVertexBuilder;
|
||||||
import com.simibubi.create.AllBlocks;
|
|
||||||
import com.simibubi.create.CreateClient;
|
import com.simibubi.create.CreateClient;
|
||||||
import com.simibubi.create.foundation.block.SafeTileEntityRenderer;
|
import com.simibubi.create.foundation.block.SafeTileEntityRenderer;
|
||||||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||||
|
@ -10,6 +9,7 @@ import com.simibubi.create.foundation.utility.ColorHelper;
|
||||||
import com.simibubi.create.foundation.utility.SuperByteBuffer;
|
import com.simibubi.create.foundation.utility.SuperByteBuffer;
|
||||||
import com.simibubi.create.foundation.utility.SuperByteBufferCache.Compartment;
|
import com.simibubi.create.foundation.utility.SuperByteBufferCache.Compartment;
|
||||||
import com.simibubi.create.modules.contraptions.KineticDebugger;
|
import com.simibubi.create.modules.contraptions.KineticDebugger;
|
||||||
|
import com.simibubi.create.modules.contraptions.relays.elementary.CogWheelBlock;
|
||||||
|
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
||||||
|
@ -83,7 +83,7 @@ public class KineticTileEntityRenderer extends SafeTileEntityRenderer<KineticTil
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static float getRotationOffsetForPosition(KineticTileEntity te, final BlockPos pos, final Axis axis) {
|
protected static float getRotationOffsetForPosition(KineticTileEntity te, final BlockPos pos, final Axis axis) {
|
||||||
float offset = AllBlocks.LARGE_COGWHEEL.typeOf(te.getBlockState()) ? 11.25f : 0;
|
float offset = CogWheelBlock.isLargeCog(te.getBlockState()) ? 11.25f : 0;
|
||||||
double d = (((axis == Axis.X) ? 0 : pos.getX()) + ((axis == Axis.Y) ? 0 : pos.getY())
|
double d = (((axis == Axis.X) ? 0 : pos.getX()) + ((axis == Axis.Y) ? 0 : pos.getY())
|
||||||
+ ((axis == Axis.Z) ? 0 : pos.getZ())) % 2;
|
+ ((axis == Axis.Z) ? 0 : pos.getZ())) % 2;
|
||||||
if (d == 0) {
|
if (d == 0) {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package com.simibubi.create.modules.contraptions.components.contraptions.piston;
|
package com.simibubi.create.modules.contraptions.components.contraptions.piston;
|
||||||
|
|
||||||
import com.simibubi.create.AllBlocks;
|
import com.simibubi.create.AllBlocksNew;
|
||||||
import com.simibubi.create.modules.contraptions.base.IRotate;
|
import com.simibubi.create.modules.contraptions.base.IRotate;
|
||||||
import com.simibubi.create.modules.contraptions.base.KineticTileEntity;
|
import com.simibubi.create.modules.contraptions.base.KineticTileEntity;
|
||||||
import com.simibubi.create.modules.contraptions.base.KineticTileEntityRenderer;
|
import com.simibubi.create.modules.contraptions.base.KineticTileEntityRenderer;
|
||||||
|
@ -17,7 +17,7 @@ public class MechanicalPistonTileEntityRenderer extends KineticTileEntityRendere
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected BlockState getRenderedBlockState(KineticTileEntity te) {
|
protected BlockState getRenderedBlockState(KineticTileEntity te) {
|
||||||
return AllBlocks.SHAFT.get().getDefaultState().with(BlockStateProperties.AXIS,
|
return AllBlocksNew.getDefault(AllBlocksNew.SHAFT).with(BlockStateProperties.AXIS,
|
||||||
((IRotate) te.getBlockState().getBlock()).getRotationAxis(te.getBlockState()));
|
((IRotate) te.getBlockState().getBlock()).getRotationAxis(te.getBlockState()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
package com.simibubi.create.modules.contraptions.components.crank;
|
package com.simibubi.create.modules.contraptions.components.crank;
|
||||||
|
|
||||||
import com.simibubi.create.AllBlocks;
|
|
||||||
import com.simibubi.create.foundation.block.ITE;
|
import com.simibubi.create.foundation.block.ITE;
|
||||||
import com.simibubi.create.foundation.utility.AllShapes;
|
import com.simibubi.create.foundation.utility.AllShapes;
|
||||||
import com.simibubi.create.modules.contraptions.base.DirectionalKineticBlock;
|
import com.simibubi.create.modules.contraptions.base.DirectionalKineticBlock;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.block.Blocks;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.item.BlockItemUseContext;
|
import net.minecraft.item.BlockItemUseContext;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
@ -25,7 +25,7 @@ import net.minecraft.world.World;
|
||||||
public class HandCrankBlock extends DirectionalKineticBlock implements ITE<HandCrankTileEntity> {
|
public class HandCrankBlock extends DirectionalKineticBlock implements ITE<HandCrankTileEntity> {
|
||||||
|
|
||||||
public HandCrankBlock() {
|
public HandCrankBlock() {
|
||||||
super(Properties.from(AllBlocks.COGWHEEL.get()));
|
super(Properties.from(Blocks.OAK_PLANKS));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -11,6 +11,7 @@ import com.mojang.blaze3d.matrix.MatrixStack;
|
||||||
import com.mojang.blaze3d.vertex.IVertexBuilder;
|
import com.mojang.blaze3d.vertex.IVertexBuilder;
|
||||||
import com.simibubi.create.AllBlockPartials;
|
import com.simibubi.create.AllBlockPartials;
|
||||||
import com.simibubi.create.AllBlocks;
|
import com.simibubi.create.AllBlocks;
|
||||||
|
import com.simibubi.create.AllBlocksNew;
|
||||||
import com.simibubi.create.foundation.behaviour.filtering.FilteringRenderer;
|
import com.simibubi.create.foundation.behaviour.filtering.FilteringRenderer;
|
||||||
import com.simibubi.create.foundation.block.SafeTileEntityRenderer;
|
import com.simibubi.create.foundation.block.SafeTileEntityRenderer;
|
||||||
import com.simibubi.create.foundation.utility.AngleHelper;
|
import com.simibubi.create.foundation.utility.AngleHelper;
|
||||||
|
@ -138,7 +139,7 @@ public class DeployerTileEntityRenderer extends SafeTileEntityRenderer<DeployerT
|
||||||
BlockState state = te.getBlockState();
|
BlockState state = te.getBlockState();
|
||||||
if (!AllBlocks.DEPLOYER.typeOf(state))
|
if (!AllBlocks.DEPLOYER.typeOf(state))
|
||||||
return Blocks.AIR.getDefaultState();
|
return Blocks.AIR.getDefaultState();
|
||||||
return AllBlocks.SHAFT.get().getDefaultState().with(AXIS, ((IRotate) state.getBlock()).getRotationAxis(state));
|
return AllBlocksNew.getDefault(AllBlocksNew.SHAFT).with(AXIS, ((IRotate) state.getBlock()).getRotationAxis(state));
|
||||||
}
|
}
|
||||||
|
|
||||||
private static SuperByteBuffer renderAndTransform(World world, AllBlockPartials renderBlock,
|
private static SuperByteBuffer renderAndTransform(World world, AllBlockPartials renderBlock,
|
||||||
|
|
|
@ -4,7 +4,7 @@ import static net.minecraft.state.properties.BlockStateProperties.HORIZONTAL_FAC
|
||||||
|
|
||||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||||
import com.simibubi.create.AllBlockPartials;
|
import com.simibubi.create.AllBlockPartials;
|
||||||
import com.simibubi.create.AllBlocks;
|
import com.simibubi.create.AllBlocksNew;
|
||||||
import com.simibubi.create.foundation.utility.SuperByteBuffer;
|
import com.simibubi.create.foundation.utility.SuperByteBuffer;
|
||||||
import com.simibubi.create.modules.contraptions.base.KineticTileEntity;
|
import com.simibubi.create.modules.contraptions.base.KineticTileEntity;
|
||||||
import com.simibubi.create.modules.contraptions.base.KineticTileEntityRenderer;
|
import com.simibubi.create.modules.contraptions.base.KineticTileEntityRenderer;
|
||||||
|
@ -39,7 +39,7 @@ public class MechanicalPressTileEntityRenderer extends KineticTileEntityRenderer
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected BlockState getRenderedBlockState(KineticTileEntity te) {
|
protected BlockState getRenderedBlockState(KineticTileEntity te) {
|
||||||
return AllBlocks.SHAFT.get().getDefaultState().with(BlockStateProperties.AXIS,
|
return AllBlocksNew.getDefault(AllBlocksNew.SHAFT).with(BlockStateProperties.AXIS,
|
||||||
te.getBlockState().get(HORIZONTAL_FACING).getAxis());
|
te.getBlockState().get(HORIZONTAL_FACING).getAxis());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ import static net.minecraft.state.properties.BlockStateProperties.FACING;
|
||||||
|
|
||||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||||
import com.simibubi.create.AllBlockPartials;
|
import com.simibubi.create.AllBlockPartials;
|
||||||
import com.simibubi.create.AllBlocks;
|
import com.simibubi.create.AllBlocksNew;
|
||||||
import com.simibubi.create.CreateClient;
|
import com.simibubi.create.CreateClient;
|
||||||
import com.simibubi.create.foundation.behaviour.filtering.FilteringRenderer;
|
import com.simibubi.create.foundation.behaviour.filtering.FilteringRenderer;
|
||||||
import com.simibubi.create.foundation.block.SafeTileEntityRenderer;
|
import com.simibubi.create.foundation.block.SafeTileEntityRenderer;
|
||||||
|
@ -91,7 +91,7 @@ public class SawTileEntityRenderer extends SafeTileEntityRenderer<SawTileEntity>
|
||||||
|
|
||||||
protected BlockState getRenderedBlockState(KineticTileEntity te) {
|
protected BlockState getRenderedBlockState(KineticTileEntity te) {
|
||||||
BlockState state = te.getBlockState();
|
BlockState state = te.getBlockState();
|
||||||
return AllBlocks.SHAFT.get().getDefaultState().with(AXIS, ((IRotate) state.getBlock()).getRotationAxis(state));
|
return AllBlocksNew.getDefault(AllBlocksNew.SHAFT).with(AXIS, ((IRotate) state.getBlock()).getRotationAxis(state));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package com.simibubi.create.modules.contraptions.relays.advanced;
|
package com.simibubi.create.modules.contraptions.relays.advanced;
|
||||||
|
|
||||||
import com.simibubi.create.AllBlocks;
|
|
||||||
import com.simibubi.create.foundation.utility.AllShapes;
|
import com.simibubi.create.foundation.utility.AllShapes;
|
||||||
import com.simibubi.create.modules.contraptions.base.HorizontalAxisKineticBlock;
|
import com.simibubi.create.modules.contraptions.base.HorizontalAxisKineticBlock;
|
||||||
import com.simibubi.create.modules.contraptions.relays.elementary.CogWheelBlock;
|
import com.simibubi.create.modules.contraptions.relays.elementary.CogWheelBlock;
|
||||||
|
@ -34,7 +33,7 @@ public class SpeedControllerBlock extends HorizontalAxisKineticBlock {
|
||||||
@Override
|
@Override
|
||||||
public BlockState getStateForPlacement(BlockItemUseContext context) {
|
public BlockState getStateForPlacement(BlockItemUseContext context) {
|
||||||
BlockState above = context.getWorld().getBlockState(context.getPos().up());
|
BlockState above = context.getWorld().getBlockState(context.getPos().up());
|
||||||
if (AllBlocks.LARGE_COGWHEEL.typeOf(above) && above.get(CogWheelBlock.AXIS).isHorizontal())
|
if (CogWheelBlock.isLargeCog(above) && above.get(CogWheelBlock.AXIS).isHorizontal())
|
||||||
return getDefaultState().with(HORIZONTAL_AXIS, above.get(CogWheelBlock.AXIS) == Axis.X ? Axis.Z : Axis.X);
|
return getDefaultState().with(HORIZONTAL_AXIS, above.get(CogWheelBlock.AXIS) == Axis.X ? Axis.Z : Axis.X);
|
||||||
return super.getStateForPlacement(context);
|
return super.getStateForPlacement(context);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package com.simibubi.create.modules.contraptions.relays.advanced;
|
package com.simibubi.create.modules.contraptions.relays.advanced;
|
||||||
|
|
||||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||||
import com.simibubi.create.AllBlocks;
|
import com.simibubi.create.AllBlocksNew;
|
||||||
import com.simibubi.create.CreateClient;
|
import com.simibubi.create.CreateClient;
|
||||||
import com.simibubi.create.foundation.behaviour.base.SmartTileEntityRenderer;
|
import com.simibubi.create.foundation.behaviour.base.SmartTileEntityRenderer;
|
||||||
import com.simibubi.create.foundation.utility.SuperByteBuffer;
|
import com.simibubi.create.foundation.utility.SuperByteBuffer;
|
||||||
|
@ -30,7 +30,7 @@ public class SpeedControllerRenderer extends SmartTileEntityRenderer<SpeedContro
|
||||||
private SuperByteBuffer getRotatedModel(SpeedControllerTileEntity te) {
|
private SuperByteBuffer getRotatedModel(SpeedControllerTileEntity te) {
|
||||||
BlockState state = te.getBlockState();
|
BlockState state = te.getBlockState();
|
||||||
return CreateClient.bufferCache.renderBlockIn(KineticTileEntityRenderer.KINETIC_TILE,
|
return CreateClient.bufferCache.renderBlockIn(KineticTileEntityRenderer.KINETIC_TILE,
|
||||||
AllBlocks.SHAFT.getDefault().with(ShaftBlock.AXIS, state.get(SpeedControllerBlock.HORIZONTAL_AXIS)));
|
AllBlocksNew.getDefault(AllBlocksNew.SHAFT).with(ShaftBlock.AXIS, state.get(SpeedControllerBlock.HORIZONTAL_AXIS)));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,7 @@ import java.util.List;
|
||||||
import org.apache.commons.lang3.mutable.MutableInt;
|
import org.apache.commons.lang3.mutable.MutableInt;
|
||||||
|
|
||||||
import com.simibubi.create.AllBlocks;
|
import com.simibubi.create.AllBlocks;
|
||||||
|
import com.simibubi.create.AllBlocksNew;
|
||||||
import com.simibubi.create.AllItems;
|
import com.simibubi.create.AllItems;
|
||||||
import com.simibubi.create.foundation.block.IHaveColorHandler;
|
import com.simibubi.create.foundation.block.IHaveColorHandler;
|
||||||
import com.simibubi.create.foundation.block.ITE;
|
import com.simibubi.create.foundation.block.ITE;
|
||||||
|
@ -60,8 +61,7 @@ import net.minecraftforge.common.Tags;
|
||||||
import net.minecraftforge.items.CapabilityItemHandler;
|
import net.minecraftforge.items.CapabilityItemHandler;
|
||||||
import net.minecraftforge.items.IItemHandler;
|
import net.minecraftforge.items.IItemHandler;
|
||||||
|
|
||||||
public class BeltBlock extends HorizontalKineticBlock
|
public class BeltBlock extends HorizontalKineticBlock implements ITE<BeltTileEntity>, IHaveColorHandler {
|
||||||
implements ITE<BeltTileEntity>, IHaveColorHandler {
|
|
||||||
|
|
||||||
public static final IProperty<Slope> SLOPE = EnumProperty.create("slope", Slope.class);
|
public static final IProperty<Slope> SLOPE = EnumProperty.create("slope", Slope.class);
|
||||||
public static final IProperty<Part> PART = EnumProperty.create("part", Part.class);
|
public static final IProperty<Part> PART = EnumProperty.create("part", Part.class);
|
||||||
|
@ -78,7 +78,8 @@ public class BeltBlock extends HorizontalKineticBlock
|
||||||
return false;
|
return false;
|
||||||
try {
|
try {
|
||||||
return getTileEntity(world, pos).hasPulley();
|
return getTileEntity(world, pos).hasPulley();
|
||||||
} catch (TileEntityException e) {}
|
} catch (TileEntityException e) {
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -106,7 +107,7 @@ public class BeltBlock extends HorizontalKineticBlock
|
||||||
drops.addAll(AllBlocks.BRASS_CASING.getDefault().getDrops(builder));
|
drops.addAll(AllBlocks.BRASS_CASING.getDefault().getDrops(builder));
|
||||||
TileEntity tileEntity = builder.get(LootParameters.BLOCK_ENTITY);
|
TileEntity tileEntity = builder.get(LootParameters.BLOCK_ENTITY);
|
||||||
if (tileEntity instanceof BeltTileEntity && ((BeltTileEntity) tileEntity).hasPulley())
|
if (tileEntity instanceof BeltTileEntity && ((BeltTileEntity) tileEntity).hasPulley())
|
||||||
drops.addAll(AllBlocks.SHAFT.getDefault().getDrops(builder));
|
drops.addAll(AllBlocksNew.getDefault(AllBlocksNew.SHAFT).getDrops(builder));
|
||||||
return drops;
|
return drops;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -199,7 +200,7 @@ public class BeltBlock extends HorizontalKineticBlock
|
||||||
if (player.isSneaking() || !player.isAllowEdit())
|
if (player.isSneaking() || !player.isAllowEdit())
|
||||||
return ActionResultType.PASS;
|
return ActionResultType.PASS;
|
||||||
ItemStack heldItem = player.getHeldItem(handIn);
|
ItemStack heldItem = player.getHeldItem(handIn);
|
||||||
boolean isShaft = heldItem.getItem() == AllBlocks.SHAFT.get().asItem();
|
boolean isShaft = heldItem.getItem() == AllBlocksNew.SHAFT.get().asItem();
|
||||||
boolean isCasing = heldItem.getItem() == AllBlocks.BRASS_CASING.get().asItem();
|
boolean isCasing = heldItem.getItem() == AllBlocks.BRASS_CASING.get().asItem();
|
||||||
boolean isDye = Tags.Items.DYES.contains(heldItem.getItem());
|
boolean isDye = Tags.Items.DYES.contains(heldItem.getItem());
|
||||||
boolean isHand = heldItem.isEmpty() && handIn == Hand.MAIN_HAND;
|
boolean isHand = heldItem.isEmpty() && handIn == Hand.MAIN_HAND;
|
||||||
|
@ -284,7 +285,7 @@ public class BeltBlock extends HorizontalKineticBlock
|
||||||
belt.attachKinetics();
|
belt.attachKinetics();
|
||||||
}
|
}
|
||||||
if (!player.isCreative())
|
if (!player.isCreative())
|
||||||
player.inventory.placeItemBackInInventory(world, new ItemStack(AllBlocks.SHAFT.get()));
|
player.inventory.placeItemBackInInventory(world, AllBlocksNew.asStack(AllBlocksNew.SHAFT));
|
||||||
return ActionResultType.SUCCESS;
|
return ActionResultType.SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -370,7 +371,8 @@ public class BeltBlock extends HorizontalKineticBlock
|
||||||
return BeltShapes.getCollisionShape(state);
|
return BeltShapes.getCollisionShape(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (TileEntityException e) {}
|
} catch (TileEntityException e) {
|
||||||
|
}
|
||||||
return shape;
|
return shape;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -490,7 +492,7 @@ public class BeltBlock extends HorizontalKineticBlock
|
||||||
}
|
}
|
||||||
|
|
||||||
BlockState shaftState =
|
BlockState shaftState =
|
||||||
AllBlocks.SHAFT.get().getDefaultState().with(BlockStateProperties.AXIS, getRotationAxis(currentState));
|
AllBlocksNew.getDefault(AllBlocksNew.SHAFT).with(BlockStateProperties.AXIS, getRotationAxis(currentState));
|
||||||
world.setBlockState(currentPos, hasPulley ? shaftState : Blocks.AIR.getDefaultState(), 3);
|
world.setBlockState(currentPos, hasPulley ? shaftState : Blocks.AIR.getDefaultState(), 3);
|
||||||
world.playEvent(2001, currentPos, Block.getStateId(currentState));
|
world.playEvent(2001, currentPos, Block.getStateId(currentState));
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,9 +4,9 @@ import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
import com.simibubi.create.AllBlocks;
|
|
||||||
import com.simibubi.create.AllItems;
|
import com.simibubi.create.AllItems;
|
||||||
import com.simibubi.create.config.AllConfigs;
|
import com.simibubi.create.config.AllConfigs;
|
||||||
|
import com.simibubi.create.modules.contraptions.relays.elementary.ShaftBlock;
|
||||||
|
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
|
@ -68,7 +68,7 @@ public class BeltConnectorHandler {
|
||||||
|
|
||||||
if (world.getBlockState(selected).getMaterial().isReplaceable())
|
if (world.getBlockState(selected).getMaterial().isReplaceable())
|
||||||
return;
|
return;
|
||||||
if (!AllBlocks.SHAFT.typeOf(world.getBlockState(selected)))
|
if (!ShaftBlock.isShaft(world.getBlockState(selected)))
|
||||||
selected = selected.offset(((BlockRayTraceResult) rayTrace).getFace());
|
selected = selected.offset(((BlockRayTraceResult) rayTrace).getFace());
|
||||||
if (!selected.withinDistance(first, AllConfigs.SERVER.kinetics.maxBeltLength.get()))
|
if (!selected.withinDistance(first, AllConfigs.SERVER.kinetics.maxBeltLength.get()))
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -106,7 +106,7 @@ public class BeltConnectorItem extends BlockItem implements IAddedByOther {
|
||||||
|
|
||||||
for (BlockPos pos : beltsToCreate) {
|
for (BlockPos pos : beltsToCreate) {
|
||||||
BeltBlock.Part part = pos.equals(start) ? Part.START : pos.equals(end) ? Part.END : Part.MIDDLE;
|
BeltBlock.Part part = pos.equals(start) ? Part.START : pos.equals(end) ? Part.END : Part.MIDDLE;
|
||||||
boolean pulley = AllBlocks.SHAFT.typeOf(world.getBlockState(pos));
|
boolean pulley = ShaftBlock.isShaft(world.getBlockState(pos));
|
||||||
if (part == Part.MIDDLE && pulley)
|
if (part == Part.MIDDLE && pulley)
|
||||||
part = Part.PULLEY;
|
part = Part.PULLEY;
|
||||||
world.setBlockState(pos, beltBlock.with(BeltBlock.SLOPE, slope).with(BeltBlock.PART, part)
|
world.setBlockState(pos, beltBlock.with(BeltBlock.SLOPE, slope).with(BeltBlock.PART, part)
|
||||||
|
@ -204,7 +204,7 @@ public class BeltConnectorItem extends BlockItem implements IAddedByOther {
|
||||||
for (BlockPos currentPos = first.add(step); !currentPos.equals(second) && limit-- > 0; currentPos =
|
for (BlockPos currentPos = first.add(step); !currentPos.equals(second) && limit-- > 0; currentPos =
|
||||||
currentPos.add(step)) {
|
currentPos.add(step)) {
|
||||||
BlockState blockState = world.getBlockState(currentPos);
|
BlockState blockState = world.getBlockState(currentPos);
|
||||||
if (AllBlocks.SHAFT.typeOf(blockState) && blockState.get(ShaftBlock.AXIS) == axis)
|
if (ShaftBlock.isShaft(blockState) && blockState.get(ShaftBlock.AXIS) == axis)
|
||||||
continue;
|
continue;
|
||||||
if (!blockState.getMaterial().isReplaceable())
|
if (!blockState.getMaterial().isReplaceable())
|
||||||
return false;
|
return false;
|
||||||
|
@ -217,7 +217,7 @@ public class BeltConnectorItem extends BlockItem implements IAddedByOther {
|
||||||
public static boolean validateAxis(World world, BlockPos pos) {
|
public static boolean validateAxis(World world, BlockPos pos) {
|
||||||
if (!world.isAreaLoaded(pos, 1))
|
if (!world.isAreaLoaded(pos, 1))
|
||||||
return false;
|
return false;
|
||||||
if (!AllBlocks.SHAFT.typeOf(world.getBlockState(pos)))
|
if (!ShaftBlock.isShaft(world.getBlockState(pos)))
|
||||||
return false;
|
return false;
|
||||||
if (world.getBlockState(pos).get(BlockStateProperties.AXIS) == Axis.Y)
|
if (world.getBlockState(pos).get(BlockStateProperties.AXIS) == Axis.Y)
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
package com.simibubi.create.modules.contraptions.relays.elementary;
|
package com.simibubi.create.modules.contraptions.relays.elementary;
|
||||||
|
|
||||||
import com.simibubi.create.AllBlocks;
|
import com.simibubi.create.AllBlocks;
|
||||||
|
import com.simibubi.create.AllBlocksNew;
|
||||||
import com.simibubi.create.foundation.utility.AllShapes;
|
import com.simibubi.create.foundation.utility.AllShapes;
|
||||||
import com.simibubi.create.modules.contraptions.base.IRotate;
|
import com.simibubi.create.modules.contraptions.base.IRotate;
|
||||||
import com.simibubi.create.modules.contraptions.relays.advanced.SpeedControllerBlock;
|
import com.simibubi.create.modules.contraptions.relays.advanced.SpeedControllerBlock;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.block.Blocks;
|
|
||||||
import net.minecraft.item.BlockItemUseContext;
|
import net.minecraft.item.BlockItemUseContext;
|
||||||
import net.minecraft.item.ItemGroup;
|
import net.minecraft.item.ItemGroup;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
@ -23,10 +23,18 @@ import net.minecraft.world.World;
|
||||||
|
|
||||||
public class CogWheelBlock extends ShaftBlock {
|
public class CogWheelBlock extends ShaftBlock {
|
||||||
|
|
||||||
private boolean isLarge;
|
boolean isLarge;
|
||||||
|
|
||||||
public CogWheelBlock(boolean large) {
|
public static CogWheelBlock small(Properties properties) {
|
||||||
super(Properties.from(Blocks.GRANITE));
|
return new CogWheelBlock(false, properties);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static CogWheelBlock large(Properties properties) {
|
||||||
|
return new CogWheelBlock(true, properties);
|
||||||
|
}
|
||||||
|
|
||||||
|
private CogWheelBlock(boolean large, Properties properties) {
|
||||||
|
super(properties);
|
||||||
isLarge = large;
|
isLarge = large;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,7 +50,7 @@ public class CogWheelBlock extends ShaftBlock {
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
BlockState blockState = worldIn.getBlockState(pos.offset(facing));
|
BlockState blockState = worldIn.getBlockState(pos.offset(facing));
|
||||||
if (AllBlocks.LARGE_COGWHEEL.typeOf(blockState) || isLarge && AllBlocks.COGWHEEL.typeOf(blockState))
|
if (isLargeCog(blockState) || isLarge && isSmallCog(blockState))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -81,6 +89,14 @@ public class CogWheelBlock extends ShaftBlock {
|
||||||
public float getParticleInitialRadius() {
|
public float getParticleInitialRadius() {
|
||||||
return isLarge ? 1f : .75f;
|
return isLarge ? 1f : .75f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean isSmallCog(BlockState state) {
|
||||||
|
return AllBlocksNew.equals(AllBlocksNew.COGWHEEL, state);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean isLargeCog(BlockState state) {
|
||||||
|
return AllBlocksNew.equals(AllBlocksNew.LARGE_COGWHEEL, state);
|
||||||
|
}
|
||||||
|
|
||||||
public void fillItemGroup(ItemGroup group, NonNullList<ItemStack> items) {
|
public void fillItemGroup(ItemGroup group, NonNullList<ItemStack> items) {
|
||||||
items.add(new ItemStack(this));
|
items.add(new ItemStack(this));
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
package com.simibubi.create.modules.contraptions.relays.elementary;
|
package com.simibubi.create.modules.contraptions.relays.elementary;
|
||||||
|
|
||||||
import com.simibubi.create.AllBlocks;
|
|
||||||
import com.simibubi.create.foundation.utility.VecHelper;
|
import com.simibubi.create.foundation.utility.VecHelper;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.item.BlockItem;
|
import net.minecraft.item.BlockItem;
|
||||||
import net.minecraft.item.BlockItemUseContext;
|
import net.minecraft.item.BlockItemUseContext;
|
||||||
|
@ -18,9 +16,9 @@ public class CogwheelBlockItem extends BlockItem {
|
||||||
|
|
||||||
boolean large;
|
boolean large;
|
||||||
|
|
||||||
public CogwheelBlockItem(Block block, Properties builder, boolean isLarge) {
|
public CogwheelBlockItem(CogWheelBlock block, Properties builder) {
|
||||||
super(block, builder);
|
super(block, builder);
|
||||||
large = isLarge;
|
large = block.isLarge;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -34,7 +32,7 @@ public class CogwheelBlockItem extends BlockItem {
|
||||||
if (face.getAxis() == placedOnState.get(CogWheelBlock.AXIS))
|
if (face.getAxis() == placedOnState.get(CogWheelBlock.AXIS))
|
||||||
return super.tryPlace(context);
|
return super.tryPlace(context);
|
||||||
|
|
||||||
boolean placedOnLarge = AllBlocks.LARGE_COGWHEEL.typeOf(placedOnState);
|
boolean placedOnLarge = CogWheelBlock.isLargeCog(placedOnState);
|
||||||
if (placedOnLarge || large) {
|
if (placedOnLarge || large) {
|
||||||
|
|
||||||
boolean largeOnLarge = placedOnLarge && large;
|
boolean largeOnLarge = placedOnLarge && large;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.simibubi.create.modules.contraptions.relays.elementary;
|
package com.simibubi.create.modules.contraptions.relays.elementary;
|
||||||
|
|
||||||
|
import com.simibubi.create.AllBlocksNew;
|
||||||
import com.simibubi.create.AllItems;
|
import com.simibubi.create.AllItems;
|
||||||
import com.simibubi.create.foundation.utility.AllShapes;
|
import com.simibubi.create.foundation.utility.AllShapes;
|
||||||
import com.simibubi.create.modules.contraptions.base.RotatedPillarKineticBlock;
|
import com.simibubi.create.modules.contraptions.base.RotatedPillarKineticBlock;
|
||||||
|
@ -65,6 +66,10 @@ public class ShaftBlock extends RotatedPillarKineticBlock {
|
||||||
super.fillItemGroup(group, items);
|
super.fillItemGroup(group, items);
|
||||||
AllItems.BELT_CONNECTOR.get().fillItemGroup(group, items);
|
AllItems.BELT_CONNECTOR.get().fillItemGroup(group, items);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean isShaft(BlockState state) {
|
||||||
|
return AllBlocksNew.equals(AllBlocksNew.SHAFT, state);
|
||||||
|
}
|
||||||
|
|
||||||
// IRotate:
|
// IRotate:
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,6 @@ package com.simibubi.create.modules.contraptions.relays.encased;
|
||||||
import com.simibubi.create.modules.contraptions.base.RotatedPillarKineticBlock;
|
import com.simibubi.create.modules.contraptions.base.RotatedPillarKineticBlock;
|
||||||
|
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.block.Blocks;
|
|
||||||
import net.minecraft.block.material.PushReaction;
|
import net.minecraft.block.material.PushReaction;
|
||||||
import net.minecraft.item.BlockItemUseContext;
|
import net.minecraft.item.BlockItemUseContext;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
@ -15,8 +14,8 @@ import net.minecraft.world.IWorldReader;
|
||||||
|
|
||||||
public class EncasedShaftBlock extends RotatedPillarKineticBlock {
|
public class EncasedShaftBlock extends RotatedPillarKineticBlock {
|
||||||
|
|
||||||
public EncasedShaftBlock() {
|
public EncasedShaftBlock(Properties properties) {
|
||||||
super(Properties.from(Blocks.ANDESITE));
|
super(properties);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package com.simibubi.create.modules.contraptions.relays.encased;
|
package com.simibubi.create.modules.contraptions.relays.encased;
|
||||||
|
|
||||||
import com.simibubi.create.AllBlocks;
|
import com.simibubi.create.AllBlocksNew;
|
||||||
import com.simibubi.create.modules.contraptions.base.KineticTileEntity;
|
import com.simibubi.create.modules.contraptions.base.KineticTileEntity;
|
||||||
import com.simibubi.create.modules.contraptions.base.KineticTileEntityRenderer;
|
import com.simibubi.create.modules.contraptions.base.KineticTileEntityRenderer;
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ public class EncasedShaftTileEntityRenderer extends KineticTileEntityRenderer {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected BlockState getRenderedBlockState(KineticTileEntity te) {
|
protected BlockState getRenderedBlockState(KineticTileEntity te) {
|
||||||
return AllBlocks.SHAFT.get().getDefaultState().with(BlockStateProperties.AXIS,
|
return AllBlocksNew.getDefault(AllBlocksNew.SHAFT).with(BlockStateProperties.AXIS,
|
||||||
te.getBlockState().get(BlockStateProperties.AXIS));
|
te.getBlockState().get(BlockStateProperties.AXIS));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,7 @@ import com.simibubi.create.modules.contraptions.relays.gearbox.GearshiftTileEnti
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.block.Blocks;
|
||||||
import net.minecraft.item.BlockItemUseContext;
|
import net.minecraft.item.BlockItemUseContext;
|
||||||
import net.minecraft.state.BooleanProperty;
|
import net.minecraft.state.BooleanProperty;
|
||||||
import net.minecraft.state.StateContainer.Builder;
|
import net.minecraft.state.StateContainer.Builder;
|
||||||
|
@ -27,7 +28,7 @@ public class GearshiftBlock extends EncasedShaftBlock implements ITE<GearshiftTi
|
||||||
public static final BooleanProperty POWERED = BlockStateProperties.POWERED;
|
public static final BooleanProperty POWERED = BlockStateProperties.POWERED;
|
||||||
|
|
||||||
public GearshiftBlock() {
|
public GearshiftBlock() {
|
||||||
super();
|
super(Properties.from(Blocks.ANDESITE));
|
||||||
setDefaultState(getDefaultState().with(POWERED, false));
|
setDefaultState(getDefaultState().with(POWERED, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ package com.simibubi.create.modules.contraptions.relays.gauge;
|
||||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||||
import com.mojang.blaze3d.vertex.IVertexBuilder;
|
import com.mojang.blaze3d.vertex.IVertexBuilder;
|
||||||
import com.simibubi.create.AllBlockPartials;
|
import com.simibubi.create.AllBlockPartials;
|
||||||
import com.simibubi.create.AllBlocks;
|
import com.simibubi.create.AllBlocksNew;
|
||||||
import com.simibubi.create.foundation.utility.SuperByteBuffer;
|
import com.simibubi.create.foundation.utility.SuperByteBuffer;
|
||||||
import com.simibubi.create.modules.contraptions.base.IRotate;
|
import com.simibubi.create.modules.contraptions.base.IRotate;
|
||||||
import com.simibubi.create.modules.contraptions.base.KineticTileEntity;
|
import com.simibubi.create.modules.contraptions.base.KineticTileEntity;
|
||||||
|
@ -60,7 +60,7 @@ public class GaugeTileEntityRenderer extends KineticTileEntityRenderer {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected BlockState getRenderedBlockState(KineticTileEntity te) {
|
protected BlockState getRenderedBlockState(KineticTileEntity te) {
|
||||||
return AllBlocks.SHAFT.get().getDefaultState().with(BlockStateProperties.AXIS,
|
return AllBlocksNew.getDefault(AllBlocksNew.SHAFT).with(BlockStateProperties.AXIS,
|
||||||
((IRotate) te.getBlockState().getBlock()).getRotationAxis(te.getBlockState()));
|
((IRotate) te.getBlockState().getBlock()).getRotationAxis(te.getBlockState()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
{
|
|
||||||
"variants": {
|
|
||||||
"axis=x" : { "model": "create:block/cogwheel", "x": 90, "y": 90 },
|
|
||||||
"axis=y" : { "model": "create:block/cogwheel" },
|
|
||||||
"axis=z" : { "model": "create:block/cogwheel", "x": 90 }
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,13 +0,0 @@
|
||||||
{
|
|
||||||
"forge_marker": 1,
|
|
||||||
"defaults": {
|
|
||||||
"model": "create:block/encased_shaft"
|
|
||||||
},
|
|
||||||
"variants": {
|
|
||||||
"axis" : {
|
|
||||||
"x": { "y": 90 },
|
|
||||||
"y": { "x": 90 },
|
|
||||||
"z": { }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,7 +0,0 @@
|
||||||
{
|
|
||||||
"variants": {
|
|
||||||
"axis=x" : { "model": "create:block/large_cogwheel", "x": 90, "y": 90 },
|
|
||||||
"axis=y" : { "model": "create:block/large_cogwheel" },
|
|
||||||
"axis=z" : { "model": "create:block/large_cogwheel", "x": 90 }
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,7 +0,0 @@
|
||||||
{
|
|
||||||
"variants": {
|
|
||||||
"axis=x" : { "model": "create:block/shaft", "x": 90, "y": 90 },
|
|
||||||
"axis=y" : { "model": "create:block/shaft" },
|
|
||||||
"axis=z" : { "model": "create:block/shaft", "x": 90 }
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,68 +0,0 @@
|
||||||
{
|
|
||||||
"__comment": "Model generated using MrCrayfish's Model Creator (http://mrcrayfish.com/modelcreator/)",
|
|
||||||
"parent": "block/block",
|
|
||||||
"textures": {
|
|
||||||
"0": "create:block/gearbox_top",
|
|
||||||
"1": "create:block/gearbox",
|
|
||||||
"particle": "create:block/gearbox_top"
|
|
||||||
},
|
|
||||||
"elements": [
|
|
||||||
{
|
|
||||||
"name": "Bottom",
|
|
||||||
"from": [ 0.0, 0.0, 0.0 ],
|
|
||||||
"to": [ 16.0, 2.0, 16.0 ],
|
|
||||||
"faces": {
|
|
||||||
"north": { "texture": "#0", "uv": [ 0.0, 14.0, 16.0, 16.0 ] },
|
|
||||||
"east": { "texture": "#0", "uv": [ 0.0, 14.0, 16.0, 16.0 ] },
|
|
||||||
"south": { "texture": "#0", "uv": [ 0.0, 14.0, 16.0, 16.0 ] },
|
|
||||||
"west": { "texture": "#0", "uv": [ 0.0, 14.0, 16.0, 16.0 ] },
|
|
||||||
"up": { "texture": "#0", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
|
|
||||||
"down": { "texture": "#0", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Core",
|
|
||||||
"from": [ 1.0, 2.0, 1.0 ],
|
|
||||||
"to": [ 15.0, 14.0, 15.0 ],
|
|
||||||
"faces": {
|
|
||||||
"north": { "texture": "#1", "uv": [ 1.0, 2.0, 15.0, 14.0 ] },
|
|
||||||
"south": { "texture": "#1", "uv": [ 1.0, 2.0, 15.0, 14.0 ] }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Top",
|
|
||||||
"from": [ 0.0, 14.0, 0.0 ],
|
|
||||||
"to": [ 16.0, 16.0, 16.0 ],
|
|
||||||
"faces": {
|
|
||||||
"north": { "texture": "#0", "uv": [ 0.0, 0.0, 16.0, 2.0 ] },
|
|
||||||
"east": { "texture": "#0", "uv": [ 0.0, 0.0, 16.0, 2.0 ] },
|
|
||||||
"south": { "texture": "#0", "uv": [ 0.0, 0.0, 16.0, 2.0 ] },
|
|
||||||
"west": { "texture": "#0", "uv": [ 0.0, 0.0, 16.0, 2.0 ] },
|
|
||||||
"up": { "texture": "#0", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
|
|
||||||
"down": { "texture": "#0", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "SideWest",
|
|
||||||
"from": [ 0.0, 2.0, 0.0 ],
|
|
||||||
"to": [ 2.0, 14.0, 16.0 ],
|
|
||||||
"faces": {
|
|
||||||
"north": { "texture": "#0", "uv": [ 14.0, 2.0, 16.0, 14.0 ] },
|
|
||||||
"east": { "texture": "#0", "uv": [ 0.0, 2.0, 16.0, 14.0 ] },
|
|
||||||
"south": { "texture": "#0", "uv": [ 0.0, 2.0, 2.0, 14.0 ] },
|
|
||||||
"west": { "texture": "#0", "uv": [ 0.0, 2.0, 16.0, 14.0 ] }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "SideEast",
|
|
||||||
"from": [ 14.0, 2.0, 0.0 ],
|
|
||||||
"to": [ 16.0, 14.0, 16.0 ],
|
|
||||||
"faces": {
|
|
||||||
"north": { "texture": "#0", "uv": [ 0.0, 2.0, 2.0, 14.0 ] },
|
|
||||||
"east": { "texture": "#0", "uv": [ 0.0, 2.0, 16.0, 14.0 ] },
|
|
||||||
"south": { "texture": "#0", "uv": [ 14.0, 2.0, 16.0, 14.0 ] },
|
|
||||||
"west": { "texture": "#0", "uv": [ 0.0, 2.0, 16.0, 14.0 ] }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
|
@ -0,0 +1,68 @@
|
||||||
|
{
|
||||||
|
"credit": "Made with Blockbench",
|
||||||
|
"parent": "block/block",
|
||||||
|
"textures": {
|
||||||
|
"0": "create:block/andesite_casing",
|
||||||
|
"1": "create:block/gearbox",
|
||||||
|
"particle": "create:block/andesite_casing"
|
||||||
|
},
|
||||||
|
"elements": [
|
||||||
|
{
|
||||||
|
"name": "Bottom",
|
||||||
|
"from": [0, 0, 0],
|
||||||
|
"to": [16, 16, 2],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 14, 16, 16], "rotation": 270, "texture": "#0"},
|
||||||
|
"south": {"uv": [0, 0, 16, 16], "texture": "#0"},
|
||||||
|
"west": {"uv": [0, 14, 16, 16], "rotation": 90, "texture": "#0"},
|
||||||
|
"up": {"uv": [0, 14, 16, 16], "rotation": 180, "texture": "#0"},
|
||||||
|
"down": {"uv": [0, 14, 16, 16], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Core",
|
||||||
|
"from": [1, 1, 2],
|
||||||
|
"to": [15, 15, 14],
|
||||||
|
"faces": {
|
||||||
|
"up": {"uv": [1, 2, 15, 14], "rotation": 180, "texture": "#1"},
|
||||||
|
"down": {"uv": [1, 2, 15, 14], "texture": "#1"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Top",
|
||||||
|
"from": [0, 0, 14],
|
||||||
|
"to": [16, 16, 16],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 16, 16], "rotation": 180, "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 0, 16, 2], "rotation": 270, "texture": "#0"},
|
||||||
|
"south": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#0"},
|
||||||
|
"west": {"uv": [0, 0, 16, 2], "rotation": 90, "texture": "#0"},
|
||||||
|
"up": {"uv": [0, 0, 16, 2], "rotation": 180, "texture": "#0"},
|
||||||
|
"down": {"uv": [0, 0, 16, 2], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "SideWest",
|
||||||
|
"from": [0, 0, 2],
|
||||||
|
"to": [2, 16, 14],
|
||||||
|
"faces": {
|
||||||
|
"east": {"uv": [0, 2, 16, 14], "rotation": 270, "texture": "#0"},
|
||||||
|
"west": {"uv": [0, 2, 16, 14], "rotation": 90, "texture": "#0"},
|
||||||
|
"up": {"uv": [14, 2, 16, 14], "rotation": 180, "texture": "#0"},
|
||||||
|
"down": {"uv": [0, 2, 2, 14], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "SideEast",
|
||||||
|
"from": [14, 0, 2],
|
||||||
|
"to": [16, 16, 14],
|
||||||
|
"faces": {
|
||||||
|
"east": {"uv": [0, 2, 16, 14], "rotation": 270, "texture": "#0"},
|
||||||
|
"west": {"uv": [0, 2, 16, 14], "rotation": 90, "texture": "#0"},
|
||||||
|
"up": {"uv": [0, 2, 2, 14], "rotation": 180, "texture": "#0"},
|
||||||
|
"down": {"uv": [14, 2, 16, 14], "texture": "#0"}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -2,7 +2,7 @@
|
||||||
"credit": "Made with Blockbench",
|
"credit": "Made with Blockbench",
|
||||||
"parent": "block/block",
|
"parent": "block/block",
|
||||||
"textures": {
|
"textures": {
|
||||||
"0": "create:block/gearbox_top",
|
"0": "create:block/andesite_casing",
|
||||||
"1": "create:block/gearbox",
|
"1": "create:block/gearbox",
|
||||||
"particle": "create:block/axis",
|
"particle": "create:block/axis",
|
||||||
"1_0": "create:block/axis",
|
"1_0": "create:block/axis",
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
"south": {"uv": [0, 14, 16, 16], "texture": "#0"},
|
"south": {"uv": [0, 14, 16, 16], "texture": "#0"},
|
||||||
"west": {"uv": [0, 14, 16, 16], "texture": "#0"},
|
"west": {"uv": [0, 14, 16, 16], "texture": "#0"},
|
||||||
"up": {"uv": [0, 0, 16, 16], "texture": "#0"},
|
"up": {"uv": [0, 0, 16, 16], "texture": "#0"},
|
||||||
"down": {"uv": [0, 0, 16, 16], "texture": "#0"}
|
"down": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#0"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -40,7 +40,7 @@
|
||||||
"east": {"uv": [0, 0, 16, 2], "texture": "#0"},
|
"east": {"uv": [0, 0, 16, 2], "texture": "#0"},
|
||||||
"south": {"uv": [0, 0, 16, 2], "texture": "#0"},
|
"south": {"uv": [0, 0, 16, 2], "texture": "#0"},
|
||||||
"west": {"uv": [0, 0, 16, 2], "texture": "#0"},
|
"west": {"uv": [0, 0, 16, 2], "texture": "#0"},
|
||||||
"up": {"uv": [0, 0, 16, 16], "texture": "#0"},
|
"up": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#0"},
|
||||||
"down": {"uv": [0, 0, 16, 16], "texture": "#0"}
|
"down": {"uv": [0, 0, 16, 16], "texture": "#0"}
|
||||||
}
|
}
|
||||||
},
|
},
|
|
@ -1,10 +0,0 @@
|
||||||
{
|
|
||||||
"parent": "create:block/cogwheel",
|
|
||||||
"display": {
|
|
||||||
"fixed": {
|
|
||||||
"rotation": [ 90, 0, 0 ],
|
|
||||||
"translation": [ 0, 0, 0],
|
|
||||||
"scale":[ 0.5, 0.5, 0.5 ]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,10 +0,0 @@
|
||||||
{
|
|
||||||
"parent": "create:block/large_cogwheel",
|
|
||||||
"display": {
|
|
||||||
"fixed": {
|
|
||||||
"rotation": [ 90, 0, 0 ],
|
|
||||||
"translation": [ 0, 0, 0],
|
|
||||||
"scale":[ 0.5, 0.5, 0.5 ]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,3 +0,0 @@
|
||||||
{
|
|
||||||
"parent": "create:block/shaft"
|
|
||||||
}
|
|
Loading…
Reference in a new issue