Added Nixie Tubes

This commit is contained in:
simibubi 2020-06-05 23:26:22 +02:00
parent 9005eae338
commit e669bb3b27
21 changed files with 736 additions and 168 deletions

View File

@ -192,6 +192,7 @@ a3ae5fb61cb07ae6fcb78ba68435bda8c31d4430 assets\create\blockstates\mossy_granite
3feafb33a6ba03687a521c1b196536c0427fff77 assets\create\blockstates\mossy_weathered_limestone.json 3feafb33a6ba03687a521c1b196536c0427fff77 assets\create\blockstates\mossy_weathered_limestone.json
b1126c191877cff86b4e2de83e1fcbd151451cb7 assets\create\blockstates\mysterious_cuckoo_clock.json b1126c191877cff86b4e2de83e1fcbd151451cb7 assets\create\blockstates\mysterious_cuckoo_clock.json
8d56251190c94204fa238ff32734a0761273669f assets\create\blockstates\natural_scoria.json 8d56251190c94204fa238ff32734a0761273669f assets\create\blockstates\natural_scoria.json
0f7635a4fec6961ec09788b3c5e3992ed1fdfde7 assets\create\blockstates\nixie_tube.json
36e46e65003a8d0b8555fe5e8f8dc980d6559bc5 assets\create\blockstates\nozzle.json 36e46e65003a8d0b8555fe5e8f8dc980d6559bc5 assets\create\blockstates\nozzle.json
cf60989f63f02067fc4e4ad25033ac83167cdeb0 assets\create\blockstates\oak_window.json cf60989f63f02067fc4e4ad25033ac83167cdeb0 assets\create\blockstates\oak_window.json
4a796509c3953171f04f957351282205840b3760 assets\create\blockstates\oak_window_pane.json 4a796509c3953171f04f957351282205840b3760 assets\create\blockstates\oak_window_pane.json
@ -272,7 +273,7 @@ b7829c2ef2c47188713f8cab21b2c9bc7f9c5b79 assets\create\blockstates\portable_stor
e8b0a401c10d1ba67ed71ba31bd5f9bc28571b65 assets\create\blockstates\powered_toggle_latch.json e8b0a401c10d1ba67ed71ba31bd5f9bc28571b65 assets\create\blockstates\powered_toggle_latch.json
3a739f9d4276828d83f2d2750bf3227c87bcd438 assets\create\blockstates\pulley_magnet.json 3a739f9d4276828d83f2d2750bf3227c87bcd438 assets\create\blockstates\pulley_magnet.json
469e430d96cb0a5e1aaf6b7cc5d401d488c9e600 assets\create\blockstates\pulse_repeater.json 469e430d96cb0a5e1aaf6b7cc5d401d488c9e600 assets\create\blockstates\pulse_repeater.json
4e1fb033316e9230d2f024d67c27940ea731643a assets\create\blockstates\radial_chassis.json 5c1df061eb5efe49beee7219e113206fc31a4733 assets\create\blockstates\radial_chassis.json
8929677f2cc5354aa19ef182af69f9f0b41eb242 assets\create\blockstates\redstone_contact.json 8929677f2cc5354aa19ef182af69f9f0b41eb242 assets\create\blockstates\redstone_contact.json
c29213b77ac0c78d8979c5f6188d2b265696f9b9 assets\create\blockstates\redstone_link.json c29213b77ac0c78d8979c5f6188d2b265696f9b9 assets\create\blockstates\redstone_link.json
e2990fe70ad5d10437a376e70e167d1856277cc1 assets\create\blockstates\rope.json e2990fe70ad5d10437a376e70e167d1856277cc1 assets\create\blockstates\rope.json
@ -323,8 +324,8 @@ c60c3115fd6eeaa3a696428a87a74d184ab7d62d assets\create\blockstates\weathered_lim
c77b46d8b459e5c7cc495393546f3fcca8a1fa1d assets\create\blockstates\weathered_limestone_pillar.json c77b46d8b459e5c7cc495393546f3fcca8a1fa1d assets\create\blockstates\weathered_limestone_pillar.json
7f39521b211441f5c3e06d60c5978cebe16cacfb assets\create\blockstates\zinc_block.json 7f39521b211441f5c3e06d60c5978cebe16cacfb assets\create\blockstates\zinc_block.json
b7181bcd8182b2f17088e5aa881f374c9c65470c assets\create\blockstates\zinc_ore.json b7181bcd8182b2f17088e5aa881f374c9c65470c assets\create\blockstates\zinc_ore.json
bf385ee965d828085374a6a31614cf0fc04c0c0c assets\create\lang\en_ud.json 32c39a2fb42bb9ca9c6d51ca521ea36791b32448 assets\create\lang\en_ud.json
4524b8b3180676a54234d5c97c2bbda0f239b1d1 assets\create\lang\en_us.json 00207f0dea9dd779d33cb1ddd2690d1185caeb94 assets\create\lang\en_us.json
846200eb548d3bfa2e77b41039de159b4b6cfb45 assets\create\models\block\acacia_window.json 846200eb548d3bfa2e77b41039de159b4b6cfb45 assets\create\models\block\acacia_window.json
1930fa3a3c98d53dd19e4ee7f55bc27fd47aa281 assets\create\models\block\acacia_window_pane_noside.json 1930fa3a3c98d53dd19e4ee7f55bc27fd47aa281 assets\create\models\block\acacia_window_pane_noside.json
1763ea2c9b981d187f5031ba608f3d5d3be3986a assets\create\models\block\acacia_window_pane_noside_alt.json 1763ea2c9b981d187f5031ba608f3d5d3be3986a assets\create\models\block\acacia_window_pane_noside_alt.json
@ -1110,6 +1111,7 @@ ec459f0f04f75e5c2c27bdad0375adb9768d1ba1 assets\create\models\item\mossy_gabbro.
f384d2e28309c54207bd1c33abff99d015d698bd assets\create\models\item\mossy_weathered_limestone.json f384d2e28309c54207bd1c33abff99d015d698bd assets\create\models\item\mossy_weathered_limestone.json
dae5cffa4e1263d6a113469f79fba8695fa8232a assets\create\models\item\mysterious_cuckoo_clock.json dae5cffa4e1263d6a113469f79fba8695fa8232a assets\create\models\item\mysterious_cuckoo_clock.json
b5c73d353fbe1d073f6a2901f221f178b858e385 assets\create\models\item\natural_scoria.json b5c73d353fbe1d073f6a2901f221f178b858e385 assets\create\models\item\natural_scoria.json
bafe601f186e868819da3d29f7be7dc96f9ba790 assets\create\models\item\nixie_tube.json
366a60447bbbd61eb25aecf191a01e8d9417ad61 assets\create\models\item\nozzle.json 366a60447bbbd61eb25aecf191a01e8d9417ad61 assets\create\models\item\nozzle.json
7a336a340f3e4927d7a35f9d79e8a03693b802aa assets\create\models\item\oak_window.json 7a336a340f3e4927d7a35f9d79e8a03693b802aa assets\create\models\item\oak_window.json
f274fe391ac584656c9817a5650b1c1e38e44c58 assets\create\models\item\oak_window_pane.json f274fe391ac584656c9817a5650b1c1e38e44c58 assets\create\models\item\oak_window_pane.json
@ -1861,6 +1863,7 @@ bd4ff2a38643d53cdc63e1af08af90e9adadcc0f data\create\loot_tables\blocks\mossy_gr
fdff3d59c214ecbcc2ddcaef778ea661df128b56 data\create\loot_tables\blocks\mossy_weathered_limestone.json fdff3d59c214ecbcc2ddcaef778ea661df128b56 data\create\loot_tables\blocks\mossy_weathered_limestone.json
fedbee3e023d469c9f3aba9d11d5be6cdae77083 data\create\loot_tables\blocks\mysterious_cuckoo_clock.json fedbee3e023d469c9f3aba9d11d5be6cdae77083 data\create\loot_tables\blocks\mysterious_cuckoo_clock.json
ecd7afac9eb0989075fced6626e1061d5487c2f4 data\create\loot_tables\blocks\natural_scoria.json ecd7afac9eb0989075fced6626e1061d5487c2f4 data\create\loot_tables\blocks\natural_scoria.json
d3ea271bb5774c73d44ab2e73195c9d5a4ff9c92 data\create\loot_tables\blocks\nixie_tube.json
6237eb3999181f1db09ca01b08e7785b70722d3b data\create\loot_tables\blocks\nozzle.json 6237eb3999181f1db09ca01b08e7785b70722d3b data\create\loot_tables\blocks\nozzle.json
0b2b142cfb3ebe9d4506e498a8e31f48d00db58d data\create\loot_tables\blocks\oak_window.json 0b2b142cfb3ebe9d4506e498a8e31f48d00db58d data\create\loot_tables\blocks\oak_window.json
90cc4d5857f47c48e2b82f394de9567023c5c8ce data\create\loot_tables\blocks\oak_window_pane.json 90cc4d5857f47c48e2b82f394de9567023c5c8ce data\create\loot_tables\blocks\oak_window_pane.json

View File

@ -0,0 +1,38 @@
{
"variants": {
"ceiling=false,facing=north": {
"model": "create:block/nixie_tube/block",
"y": 180
},
"ceiling=true,facing=north": {
"model": "create:block/nixie_tube/block",
"x": 180,
"y": 180
},
"ceiling=false,facing=south": {
"model": "create:block/nixie_tube/block"
},
"ceiling=true,facing=south": {
"model": "create:block/nixie_tube/block",
"x": 180
},
"ceiling=false,facing=west": {
"model": "create:block/nixie_tube/block",
"y": 90
},
"ceiling=true,facing=west": {
"model": "create:block/nixie_tube/block",
"x": 180,
"y": 90
},
"ceiling=false,facing=east": {
"model": "create:block/nixie_tube/block",
"y": 270
},
"ceiling=true,facing=east": {
"model": "create:block/nixie_tube/block",
"x": 180,
"y": 270
}
}
}

View File

@ -29,8 +29,8 @@
}, },
{ {
"when": { "when": {
"axis": "x", "sticky_south": "true",
"sticky_south": "true" "axis": "x"
}, },
"apply": { "apply": {
"model": "create:block/radial_chassis_side_x_sticky", "model": "create:block/radial_chassis_side_x_sticky",
@ -39,8 +39,8 @@
}, },
{ {
"when": { "when": {
"axis": "y", "sticky_south": "true",
"sticky_south": "true" "axis": "y"
}, },
"apply": { "apply": {
"model": "create:block/radial_chassis_side_y_sticky" "model": "create:block/radial_chassis_side_y_sticky"
@ -48,8 +48,8 @@
}, },
{ {
"when": { "when": {
"axis": "z", "sticky_south": "true",
"sticky_south": "true" "axis": "z"
}, },
"apply": { "apply": {
"model": "create:block/radial_chassis_side_x_sticky", "model": "create:block/radial_chassis_side_x_sticky",
@ -59,8 +59,8 @@
}, },
{ {
"when": { "when": {
"axis": "x", "sticky_south": "false",
"sticky_south": "false" "axis": "x"
}, },
"apply": { "apply": {
"model": "create:block/radial_chassis_side_x", "model": "create:block/radial_chassis_side_x",
@ -69,8 +69,8 @@
}, },
{ {
"when": { "when": {
"axis": "y", "sticky_south": "false",
"sticky_south": "false" "axis": "y"
}, },
"apply": { "apply": {
"model": "create:block/radial_chassis_side_y" "model": "create:block/radial_chassis_side_y"
@ -78,8 +78,8 @@
}, },
{ {
"when": { "when": {
"axis": "z", "sticky_south": "false",
"sticky_south": "false" "axis": "z"
}, },
"apply": { "apply": {
"model": "create:block/radial_chassis_side_x", "model": "create:block/radial_chassis_side_x",

View File

@ -193,6 +193,7 @@
"block.create.mossy_weathered_limestone": "\u01DDuo\u0287s\u01DD\u026F\u0131\uA780 p\u01DD\u0279\u01DD\u0265\u0287\u0250\u01DDM \u028EssoW", "block.create.mossy_weathered_limestone": "\u01DDuo\u0287s\u01DD\u026F\u0131\uA780 p\u01DD\u0279\u01DD\u0265\u0287\u0250\u01DDM \u028EssoW",
"block.create.mysterious_cuckoo_clock": "\u029E\u0254o\u05DF\u0186 oo\u029E\u0254n\u0186", "block.create.mysterious_cuckoo_clock": "\u029E\u0254o\u05DF\u0186 oo\u029E\u0254n\u0186",
"block.create.natural_scoria": "\u0250\u0131\u0279o\u0254S \u05DF\u0250\u0279n\u0287\u0250N", "block.create.natural_scoria": "\u0250\u0131\u0279o\u0254S \u05DF\u0250\u0279n\u0287\u0250N",
"block.create.nixie_tube": "\u01DDqn\u27D8 \u01DD\u0131x\u0131N",
"block.create.nozzle": "\u01DD\u05DFzzoN", "block.create.nozzle": "\u01DD\u05DFzzoN",
"block.create.oak_window": "\u028Dopu\u0131M \u029E\u0250O", "block.create.oak_window": "\u028Dopu\u0131M \u029E\u0250O",
"block.create.oak_window_pane": "\u01DDu\u0250\u0500 \u028Dopu\u0131M \u029E\u0250O", "block.create.oak_window_pane": "\u01DDu\u0250\u0500 \u028Dopu\u0131M \u029E\u0250O",

View File

@ -196,6 +196,7 @@
"block.create.mossy_weathered_limestone": "Mossy Weathered Limestone", "block.create.mossy_weathered_limestone": "Mossy Weathered Limestone",
"block.create.mysterious_cuckoo_clock": "Cuckoo Clock", "block.create.mysterious_cuckoo_clock": "Cuckoo Clock",
"block.create.natural_scoria": "Natural Scoria", "block.create.natural_scoria": "Natural Scoria",
"block.create.nixie_tube": "Nixie Tube",
"block.create.nozzle": "Nozzle", "block.create.nozzle": "Nozzle",
"block.create.oak_window": "Oak Window", "block.create.oak_window": "Oak Window",
"block.create.oak_window_pane": "Oak Window Pane", "block.create.oak_window_pane": "Oak Window Pane",
@ -1167,7 +1168,12 @@
"block.create.redstone_link.tooltip.control2": "When R-Clicked while Sneaking", "block.create.redstone_link.tooltip.control2": "When R-Clicked while Sneaking",
"block.create.redstone_link.tooltip.action2": "Toggles between _Receiver_ and _Transmitter_ Mode.", "block.create.redstone_link.tooltip.action2": "Toggles between _Receiver_ and _Transmitter_ Mode.",
"block.create.redstone_contact.tooltip": "REDSTONE redstone_contact", "block.create.nixie_tube.tooltip": "NIXIE TUBE",
"block.create.nixie_tube.tooltip.summary": "A fancy redstone-powered _Number_ _Display_ ranging from 0 to 15.",
"block.create.nixie_tube.tooltip.condition1": "When Powered",
"block.create.nixie_tube.tooltip.behaviour1": "Shows the current redstone _Signal_ _Strength_ as its displayed value.",
"block.create.redstone_contact.tooltip": "REDSTONE CONTACT",
"block.create.redstone_contact.tooltip.summary": "Only emits redstone power in pairs. It is movable with _Mechanical_ _Pistons_, _Bearings_ or other controllers.", "block.create.redstone_contact.tooltip.summary": "Only emits redstone power in pairs. It is movable with _Mechanical_ _Pistons_, _Bearings_ or other controllers.",
"block.create.redstone_contact.tooltip.condition1": "When facing other redstone_contact", "block.create.redstone_contact.tooltip.condition1": "When facing other redstone_contact",
"block.create.redstone_contact.tooltip.behaviour1": "Provides a _Redstone_ _Signal_.", "block.create.redstone_contact.tooltip.behaviour1": "Provides a _Redstone_ _Signal_.",

View File

@ -0,0 +1,3 @@
{
"parent": "create:block/nixie_tube/item"
}

View File

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "create:nixie_tube"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View File

@ -85,6 +85,8 @@ import com.simibubi.create.content.logistics.block.funnel.VerticalFunnelGenerato
import com.simibubi.create.content.logistics.block.inventories.AdjustableCrateBlock; import com.simibubi.create.content.logistics.block.inventories.AdjustableCrateBlock;
import com.simibubi.create.content.logistics.block.inventories.CreativeCrateBlock; import com.simibubi.create.content.logistics.block.inventories.CreativeCrateBlock;
import com.simibubi.create.content.logistics.block.redstone.AnalogLeverBlock; import com.simibubi.create.content.logistics.block.redstone.AnalogLeverBlock;
import com.simibubi.create.content.logistics.block.redstone.NixieTubeBlock;
import com.simibubi.create.content.logistics.block.redstone.NixieTubeGenerator;
import com.simibubi.create.content.logistics.block.redstone.RedstoneContactBlock; import com.simibubi.create.content.logistics.block.redstone.RedstoneContactBlock;
import com.simibubi.create.content.logistics.block.redstone.RedstoneLinkBlock; import com.simibubi.create.content.logistics.block.redstone.RedstoneLinkBlock;
import com.simibubi.create.content.logistics.block.redstone.RedstoneLinkGenerator; import com.simibubi.create.content.logistics.block.redstone.RedstoneLinkGenerator;
@ -248,7 +250,8 @@ public class AllBlocks {
.blockstate(new BeltGenerator()::generate) .blockstate(new BeltGenerator()::generate)
.register(); .register();
public static final BlockEntry<CreativeMotorBlock> CREATIVE_MOTOR = REGISTRATE.block("creative_motor", CreativeMotorBlock::new) public static final BlockEntry<CreativeMotorBlock> CREATIVE_MOTOR =
REGISTRATE.block("creative_motor", CreativeMotorBlock::new)
.initialProperties(SharedProperties::stone) .initialProperties(SharedProperties::stone)
.blockstate(new CreativeMotorGenerator()::generate) .blockstate(new CreativeMotorGenerator()::generate)
.transform(StressConfigDefaults.setCapacity(16384.0)) .transform(StressConfigDefaults.setCapacity(16384.0))
@ -523,7 +526,8 @@ public class AllBlocks {
.simpleItem() .simpleItem()
.register(); .register();
public static final BlockEntry<HarvesterBlock> MECHANICAL_HARVESTER = REGISTRATE.block("mechanical_harvester", HarvesterBlock::new) public static final BlockEntry<HarvesterBlock> MECHANICAL_HARVESTER =
REGISTRATE.block("mechanical_harvester", HarvesterBlock::new)
.initialProperties(SharedProperties::stone) .initialProperties(SharedProperties::stone)
.blockstate(BlockStateGen.horizontalBlockProvider(true)) .blockstate(BlockStateGen.horizontalBlockProvider(true))
.addLayer(() -> RenderType::getCutoutMipped) .addLayer(() -> RenderType::getCutoutMipped)
@ -531,7 +535,8 @@ public class AllBlocks {
.transform(customItemModel()) .transform(customItemModel())
.register(); .register();
public static final BlockEntry<PloughBlock> MECHANICAL_PLOUGH = REGISTRATE.block("mechanical_plough", PloughBlock::new) public static final BlockEntry<PloughBlock> MECHANICAL_PLOUGH =
REGISTRATE.block("mechanical_plough", PloughBlock::new)
.initialProperties(SharedProperties::stone) .initialProperties(SharedProperties::stone)
.blockstate(BlockStateGen.horizontalBlockProvider(false)) .blockstate(BlockStateGen.horizontalBlockProvider(false))
.simpleItem() .simpleItem()
@ -621,6 +626,15 @@ public class AllBlocks {
.transform(customItemModel("_", "transmitter")) .transform(customItemModel("_", "transmitter"))
.register(); .register();
public static final BlockEntry<NixieTubeBlock> NIXIE_TUBE = REGISTRATE.block("nixie_tube", NixieTubeBlock::new)
.initialProperties(SharedProperties::softMetal)
.properties(p -> p.lightValue(5))
.blockstate(new NixieTubeGenerator()::generate)
.addLayer(() -> RenderType::getTranslucent)
.item()
.transform(customItemModel())
.register();
public static final BlockEntry<StockpileSwitchBlock> STOCKPILE_SWITCH = public static final BlockEntry<StockpileSwitchBlock> STOCKPILE_SWITCH =
REGISTRATE.block("stockpile_switch", StockpileSwitchBlock::new) REGISTRATE.block("stockpile_switch", StockpileSwitchBlock::new)
.initialProperties(SharedProperties::stone) .initialProperties(SharedProperties::stone)
@ -675,12 +689,11 @@ public class AllBlocks {
.loot((p, b) -> p.registerDropping(b, EXTRACTOR.get())) .loot((p, b) -> p.registerDropping(b, EXTRACTOR.get()))
.register(); .register();
public static final BlockEntry<LinkedExtractorBlock> LINKED_EXTRACTOR = public static final BlockEntry<LinkedExtractorBlock> LINKED_EXTRACTOR = REGISTRATE
REGISTRATE.block("linked_extractor", LinkedExtractorBlock::new) .block("linked_extractor", LinkedExtractorBlock::new)
.initialProperties(SharedProperties::softMetal) .initialProperties(SharedProperties::softMetal)
.addLayer(() -> RenderType::getCutoutMipped) .addLayer(() -> RenderType::getCutoutMipped)
.blockstate( .blockstate((c, p) -> p.horizontalBlock(c.get(), AssetLookup.forPowered(c, p, "extractor/horizontal_linked")))
(c, p) -> p.horizontalBlock(c.get(), AssetLookup.forPowered(c, p, "extractor/horizontal_linked")))
.item() .item()
.transform(customItemModel("extractor", "horizontal_linked")) .transform(customItemModel("extractor", "horizontal_linked"))
.register(); .register();
@ -722,8 +735,8 @@ public class AllBlocks {
.loot((p, b) -> p.registerDropping(b, TRANSPOSER.get())) .loot((p, b) -> p.registerDropping(b, TRANSPOSER.get()))
.register(); .register();
public static final BlockEntry<LinkedTransposerBlock> LINKED_TRANSPOSER = REGISTRATE public static final BlockEntry<LinkedTransposerBlock> LINKED_TRANSPOSER =
.block("linked_transposer", LinkedTransposerBlock::new) REGISTRATE.block("linked_transposer", LinkedTransposerBlock::new)
.initialProperties(SharedProperties::softMetal) .initialProperties(SharedProperties::softMetal)
.addLayer(() -> RenderType::getCutoutMipped) .addLayer(() -> RenderType::getCutoutMipped)
.blockstate( .blockstate(

View File

@ -58,7 +58,13 @@ public class AllShapes {
STOCKPILE_SWITCH = shape(0, 0, 0, 16, 2, 16).add(1, 0, 1, 15, 16, 15) STOCKPILE_SWITCH = shape(0, 0, 0, 16, 2, 16).add(1, 0, 1, 15, 16, 15)
.add(0, 14, 0, 16, 16, 16) .add(0, 14, 0, 16, 16, 16)
.add(3, 3, -1, 13, 13, 2) .add(3, 3, -1, 13, 13, 2)
.forHorizontal(NORTH) .forHorizontal(NORTH),
NIXIE_TUBE = shape(0, 0, 0, 16, 4, 16).add(9, 0, 5, 15, 15, 11)
.add(1, 0, 5, 7, 15, 11)
.forHorizontalAxis(),
NIXIE_TUBE_CEILING = shape(0, 12, 0, 16, 16, 16).add(9, 1, 5, 15, 16, 11)
.add(1, 1, 5, 7, 16, 11)
.forHorizontalAxis()
; ;

View File

@ -78,6 +78,8 @@ import com.simibubi.create.content.logistics.block.inventories.AdjustableCrateTi
import com.simibubi.create.content.logistics.block.inventories.CreativeCrateTileEntity; import com.simibubi.create.content.logistics.block.inventories.CreativeCrateTileEntity;
import com.simibubi.create.content.logistics.block.redstone.AnalogLeverRenderer; import com.simibubi.create.content.logistics.block.redstone.AnalogLeverRenderer;
import com.simibubi.create.content.logistics.block.redstone.AnalogLeverTileEntity; import com.simibubi.create.content.logistics.block.redstone.AnalogLeverTileEntity;
import com.simibubi.create.content.logistics.block.redstone.NixieTubeRenderer;
import com.simibubi.create.content.logistics.block.redstone.NixieTubeTileEntity;
import com.simibubi.create.content.logistics.block.redstone.RedstoneLinkTileEntity; import com.simibubi.create.content.logistics.block.redstone.RedstoneLinkTileEntity;
import com.simibubi.create.content.logistics.block.redstone.StockpileSwitchTileEntity; import com.simibubi.create.content.logistics.block.redstone.StockpileSwitchTileEntity;
import com.simibubi.create.content.logistics.block.transposer.LinkedTransposerTileEntity; import com.simibubi.create.content.logistics.block.transposer.LinkedTransposerTileEntity;
@ -102,124 +104,126 @@ import net.minecraftforge.fml.client.registry.ClientRegistry;
public class AllTileEntities { public class AllTileEntities {
// Schematics // Schematics
public static final TileEntityEntry<SchematicannonTileEntity> SCHEMATICANNON = register( public static final TileEntityEntry<SchematicannonTileEntity> SCHEMATICANNON =
"schematicannon", SchematicannonTileEntity::new, AllBlocks.SCHEMATICANNON); register("schematicannon", SchematicannonTileEntity::new, AllBlocks.SCHEMATICANNON);
public static final TileEntityEntry<SchematicTableTileEntity> SCHEMATIC_TABLE = register( public static final TileEntityEntry<SchematicTableTileEntity> SCHEMATIC_TABLE =
"schematic_table", SchematicTableTileEntity::new, AllBlocks.SCHEMATIC_TABLE); register("schematic_table", SchematicTableTileEntity::new, AllBlocks.SCHEMATIC_TABLE);
// Kinetics // Kinetics
public static final TileEntityEntry<SimpleKineticTileEntity> SIMPLE_KINETIC = register( public static final TileEntityEntry<SimpleKineticTileEntity> SIMPLE_KINETIC =
"simple_kinetic", SimpleKineticTileEntity::new, AllBlocks.SHAFT, AllBlocks.COGWHEEL, register("simple_kinetic", SimpleKineticTileEntity::new, AllBlocks.SHAFT, AllBlocks.COGWHEEL,
AllBlocks.LARGE_COGWHEEL, AllBlocks.ENCASED_SHAFT); AllBlocks.LARGE_COGWHEEL, AllBlocks.ENCASED_SHAFT);
public static final TileEntityEntry<CreativeMotorTileEntity> MOTOR = register( public static final TileEntityEntry<CreativeMotorTileEntity> MOTOR =
"motor", CreativeMotorTileEntity::new, AllBlocks.CREATIVE_MOTOR); register("motor", CreativeMotorTileEntity::new, AllBlocks.CREATIVE_MOTOR);
public static final TileEntityEntry<GearboxTileEntity> GEARBOX = register( public static final TileEntityEntry<GearboxTileEntity> GEARBOX =
"gearbox", GearboxTileEntity::new, AllBlocks.GEARBOX); register("gearbox", GearboxTileEntity::new, AllBlocks.GEARBOX);
public static final TileEntityEntry<EncasedShaftTileEntity> ENCASED_SHAFT = register( public static final TileEntityEntry<EncasedShaftTileEntity> ENCASED_SHAFT =
"encased_shaft", EncasedShaftTileEntity::new, AllBlocks.ENCASED_SHAFT, AllBlocks.ENCASED_BELT); register("encased_shaft", EncasedShaftTileEntity::new, AllBlocks.ENCASED_SHAFT, AllBlocks.ENCASED_BELT);
public static final TileEntityEntry<AdjustablePulleyTileEntity> ADJUSTABLE_PULLEY = register( public static final TileEntityEntry<AdjustablePulleyTileEntity> ADJUSTABLE_PULLEY =
"adjustable_pulley", AdjustablePulleyTileEntity::new, AllBlocks.ADJUSTABLE_PULLEY); register("adjustable_pulley", AdjustablePulleyTileEntity::new, AllBlocks.ADJUSTABLE_PULLEY);
public static final TileEntityEntry<EncasedFanTileEntity> ENCASED_FAN = register( public static final TileEntityEntry<EncasedFanTileEntity> ENCASED_FAN =
"encased_fan", EncasedFanTileEntity::new, AllBlocks.ENCASED_FAN); register("encased_fan", EncasedFanTileEntity::new, AllBlocks.ENCASED_FAN);
public static final TileEntityEntry<NozzleTileEntity> NOZZLE = register( public static final TileEntityEntry<NozzleTileEntity> NOZZLE =
"nozzle", NozzleTileEntity::new, AllBlocks.NOZZLE); register("nozzle", NozzleTileEntity::new, AllBlocks.NOZZLE);
public static final TileEntityEntry<ClutchTileEntity> CLUTCH = register( public static final TileEntityEntry<ClutchTileEntity> CLUTCH =
"clutch", ClutchTileEntity::new, AllBlocks.CLUTCH); register("clutch", ClutchTileEntity::new, AllBlocks.CLUTCH);
public static final TileEntityEntry<GearshiftTileEntity> GEARSHIFT = register( public static final TileEntityEntry<GearshiftTileEntity> GEARSHIFT =
"gearshift", GearshiftTileEntity::new, AllBlocks.GEARSHIFT); register("gearshift", GearshiftTileEntity::new, AllBlocks.GEARSHIFT);
public static final TileEntityEntry<TurntableTileEntity> TURNTABLE = register( public static final TileEntityEntry<TurntableTileEntity> TURNTABLE =
"turntable", TurntableTileEntity::new, AllBlocks.TURNTABLE); register("turntable", TurntableTileEntity::new, AllBlocks.TURNTABLE);
public static final TileEntityEntry<HandCrankTileEntity> HAND_CRANK = register( public static final TileEntityEntry<HandCrankTileEntity> HAND_CRANK =
"hand_crank", HandCrankTileEntity::new, AllBlocks.HAND_CRANK); register("hand_crank", HandCrankTileEntity::new, AllBlocks.HAND_CRANK);
public static final TileEntityEntry<CuckooClockTileEntity> CUCKOO_CLOCK = register( public static final TileEntityEntry<CuckooClockTileEntity> CUCKOO_CLOCK =
"cuckoo_clock", CuckooClockTileEntity::new, AllBlocks.CUCKOO_CLOCK, AllBlocks.MYSTERIOUS_CUCKOO_CLOCK); register("cuckoo_clock", CuckooClockTileEntity::new, AllBlocks.CUCKOO_CLOCK, AllBlocks.MYSTERIOUS_CUCKOO_CLOCK);
public static final TileEntityEntry<BeltTileEntity> BELT = register( public static final TileEntityEntry<BeltTileEntity> BELT = register("belt", BeltTileEntity::new, AllBlocks.BELT);
"belt", BeltTileEntity::new, AllBlocks.BELT); public static final TileEntityEntry<BeltTunnelTileEntity> BELT_TUNNEL =
public static final TileEntityEntry<BeltTunnelTileEntity> BELT_TUNNEL = register( register("belt_tunnel", BeltTunnelTileEntity::new, AllBlocks.BELT_TUNNEL);
"belt_tunnel", BeltTunnelTileEntity::new, AllBlocks.BELT_TUNNEL); public static final TileEntityEntry<MechanicalPistonTileEntity> MECHANICAL_PISTON = register("mechanical_piston",
public static final TileEntityEntry<MechanicalPistonTileEntity> MECHANICAL_PISTON = register( MechanicalPistonTileEntity::new, AllBlocks.MECHANICAL_PISTON, AllBlocks.STICKY_MECHANICAL_PISTON);
"mechanical_piston", MechanicalPistonTileEntity::new, AllBlocks.MECHANICAL_PISTON, public static final TileEntityEntry<MechanicalBearingTileEntity> MECHANICAL_BEARING =
AllBlocks.STICKY_MECHANICAL_PISTON); register("mechanical_bearing", MechanicalBearingTileEntity::new, AllBlocks.MECHANICAL_BEARING);
public static final TileEntityEntry<MechanicalBearingTileEntity> MECHANICAL_BEARING = register( public static final TileEntityEntry<ClockworkBearingTileEntity> CLOCKWORK_BEARING =
"mechanical_bearing", MechanicalBearingTileEntity::new, AllBlocks.MECHANICAL_BEARING); register("clockwork_bearing", ClockworkBearingTileEntity::new, AllBlocks.CLOCKWORK_BEARING);
public static final TileEntityEntry<ClockworkBearingTileEntity> CLOCKWORK_BEARING = register( public static final TileEntityEntry<PulleyTileEntity> ROPE_PULLEY =
"clockwork_bearing", ClockworkBearingTileEntity::new, AllBlocks.CLOCKWORK_BEARING); register("rope_pulley", PulleyTileEntity::new, AllBlocks.ROPE_PULLEY);
public static final TileEntityEntry<PulleyTileEntity> ROPE_PULLEY = register( public static final TileEntityEntry<ChassisTileEntity> CHASSIS = register("chassis", ChassisTileEntity::new,
"rope_pulley", PulleyTileEntity::new, AllBlocks.ROPE_PULLEY); AllBlocks.RADIAL_CHASSIS, AllBlocks.LINEAR_CHASSIS, AllBlocks.SECONDARY_LINEAR_CHASSIS);
public static final TileEntityEntry<ChassisTileEntity> CHASSIS = register( public static final TileEntityEntry<DrillTileEntity> DRILL =
"chassis", ChassisTileEntity::new, AllBlocks.RADIAL_CHASSIS, AllBlocks.LINEAR_CHASSIS, AllBlocks.SECONDARY_LINEAR_CHASSIS); register("drill", DrillTileEntity::new, AllBlocks.MECHANICAL_DRILL);
public static final TileEntityEntry<DrillTileEntity> DRILL = register( public static final TileEntityEntry<SawTileEntity> SAW =
"drill", DrillTileEntity::new, AllBlocks.MECHANICAL_DRILL); register("saw", SawTileEntity::new, AllBlocks.MECHANICAL_SAW);
public static final TileEntityEntry<SawTileEntity> SAW = register( public static final TileEntityEntry<HarvesterTileEntity> HARVESTER =
"saw", SawTileEntity::new, AllBlocks.MECHANICAL_SAW); register("harvester", HarvesterTileEntity::new, AllBlocks.MECHANICAL_HARVESTER);
public static final TileEntityEntry<HarvesterTileEntity> HARVESTER = register( public static final TileEntityEntry<FlywheelTileEntity> FLYWHEEL =
"harvester", HarvesterTileEntity::new, AllBlocks.MECHANICAL_HARVESTER); register("flywheel", FlywheelTileEntity::new, AllBlocks.FLYWHEEL);
public static final TileEntityEntry<FlywheelTileEntity> FLYWHEEL = register( public static final TileEntityEntry<FurnaceEngineTileEntity> FURNACE_ENGINE =
"flywheel", FlywheelTileEntity::new, AllBlocks.FLYWHEEL); register("furnace_engine", FurnaceEngineTileEntity::new, AllBlocks.FURNACE_ENGINE);
public static final TileEntityEntry<FurnaceEngineTileEntity> FURNACE_ENGINE = register(
"furnace_engine", FurnaceEngineTileEntity::new, AllBlocks.FURNACE_ENGINE);
public static final TileEntityEntry<MillstoneTileEntity> MILLSTONE = register( public static final TileEntityEntry<MillstoneTileEntity> MILLSTONE =
"millstone", MillstoneTileEntity::new, AllBlocks.MILLSTONE); register("millstone", MillstoneTileEntity::new, AllBlocks.MILLSTONE);
public static final TileEntityEntry<CrushingWheelTileEntity> CRUSHING_WHEEL = register( public static final TileEntityEntry<CrushingWheelTileEntity> CRUSHING_WHEEL =
"crushing_wheel", CrushingWheelTileEntity::new, AllBlocks.CRUSHING_WHEEL); register("crushing_wheel", CrushingWheelTileEntity::new, AllBlocks.CRUSHING_WHEEL);
public static final TileEntityEntry<CrushingWheelControllerTileEntity> CRUSHING_WHEEL_CONTROLLER = register( public static final TileEntityEntry<CrushingWheelControllerTileEntity> CRUSHING_WHEEL_CONTROLLER = register(
"crushing_wheel_controller", CrushingWheelControllerTileEntity::new, AllBlocks.CRUSHING_WHEEL_CONTROLLER); "crushing_wheel_controller", CrushingWheelControllerTileEntity::new, AllBlocks.CRUSHING_WHEEL_CONTROLLER);
public static final TileEntityEntry<WaterWheelTileEntity> WATER_WHEEL = register( public static final TileEntityEntry<WaterWheelTileEntity> WATER_WHEEL =
"water_wheel", WaterWheelTileEntity::new, AllBlocks.WATER_WHEEL); register("water_wheel", WaterWheelTileEntity::new, AllBlocks.WATER_WHEEL);
public static final TileEntityEntry<MechanicalPressTileEntity> MECHANICAL_PRESS = register( public static final TileEntityEntry<MechanicalPressTileEntity> MECHANICAL_PRESS =
"mechanical_press", MechanicalPressTileEntity::new, AllBlocks.MECHANICAL_PRESS); register("mechanical_press", MechanicalPressTileEntity::new, AllBlocks.MECHANICAL_PRESS);
public static final TileEntityEntry<MechanicalMixerTileEntity> MECHANICAL_MIXER = register( public static final TileEntityEntry<MechanicalMixerTileEntity> MECHANICAL_MIXER =
"mechanical_mixer", MechanicalMixerTileEntity::new, AllBlocks.MECHANICAL_MIXER); register("mechanical_mixer", MechanicalMixerTileEntity::new, AllBlocks.MECHANICAL_MIXER);
public static final TileEntityEntry<DeployerTileEntity> DEPLOYER = register( public static final TileEntityEntry<DeployerTileEntity> DEPLOYER =
"deployer", DeployerTileEntity::new, AllBlocks.DEPLOYER); register("deployer", DeployerTileEntity::new, AllBlocks.DEPLOYER);
public static final TileEntityEntry<BasinTileEntity> BASIN = register( public static final TileEntityEntry<BasinTileEntity> BASIN =
"basin", BasinTileEntity::new, AllBlocks.BASIN); register("basin", BasinTileEntity::new, AllBlocks.BASIN);
public static final TileEntityEntry<MechanicalCrafterTileEntity> MECHANICAL_CRAFTER = register( public static final TileEntityEntry<MechanicalCrafterTileEntity> MECHANICAL_CRAFTER =
"mechanical_crafter", MechanicalCrafterTileEntity::new, AllBlocks.MECHANICAL_CRAFTER); register("mechanical_crafter", MechanicalCrafterTileEntity::new, AllBlocks.MECHANICAL_CRAFTER);
public static final TileEntityEntry<SequencedGearshiftTileEntity> SEQUENCED_GEARSHIFT = register( public static final TileEntityEntry<SequencedGearshiftTileEntity> SEQUENCED_GEARSHIFT =
"sequenced_gearshift", SequencedGearshiftTileEntity::new, AllBlocks.SEQUENCED_GEARSHIFT); register("sequenced_gearshift", SequencedGearshiftTileEntity::new, AllBlocks.SEQUENCED_GEARSHIFT);
public static final TileEntityEntry<SpeedControllerTileEntity> ROTATION_SPEED_CONTROLLER = register( public static final TileEntityEntry<SpeedControllerTileEntity> ROTATION_SPEED_CONTROLLER =
"rotation_speed_controller", SpeedControllerTileEntity::new, AllBlocks.ROTATION_SPEED_CONTROLLER); register("rotation_speed_controller", SpeedControllerTileEntity::new, AllBlocks.ROTATION_SPEED_CONTROLLER);
public static final TileEntityEntry<SpeedGaugeTileEntity> SPEEDOMETER = register( public static final TileEntityEntry<SpeedGaugeTileEntity> SPEEDOMETER =
"speedometer", SpeedGaugeTileEntity::new, AllBlocks.SPEEDOMETER); register("speedometer", SpeedGaugeTileEntity::new, AllBlocks.SPEEDOMETER);
public static final TileEntityEntry<StressGaugeTileEntity> STRESSOMETER = register( public static final TileEntityEntry<StressGaugeTileEntity> STRESSOMETER =
"stressometer", StressGaugeTileEntity::new, AllBlocks.STRESSOMETER); register("stressometer", StressGaugeTileEntity::new, AllBlocks.STRESSOMETER);
public static final TileEntityEntry<AnalogLeverTileEntity> ANALOG_LEVER = register( public static final TileEntityEntry<AnalogLeverTileEntity> ANALOG_LEVER =
"analog_lever", AnalogLeverTileEntity::new, AllBlocks.ANALOG_LEVER); register("analog_lever", AnalogLeverTileEntity::new, AllBlocks.ANALOG_LEVER);
public static final TileEntityEntry<CartAssemblerTileEntity> CART_ASSEMBLER = register( public static final TileEntityEntry<CartAssemblerTileEntity> CART_ASSEMBLER =
"cart_assembler", CartAssemblerTileEntity::new, AllBlocks.CART_ASSEMBLER); register("cart_assembler", CartAssemblerTileEntity::new, AllBlocks.CART_ASSEMBLER);
// Logistics // Logistics
public static final TileEntityEntry<RedstoneLinkTileEntity> REDSTONE_LINK = register( public static final TileEntityEntry<RedstoneLinkTileEntity> REDSTONE_LINK =
"redstone_link", RedstoneLinkTileEntity::new, AllBlocks.REDSTONE_LINK); register("redstone_link", RedstoneLinkTileEntity::new, AllBlocks.REDSTONE_LINK);
public static final TileEntityEntry<StockpileSwitchTileEntity> STOCKPILE_SWITCH = register( public static final TileEntityEntry<NixieTubeTileEntity> NIXIE_TUBE =
"stockpile_switch", StockpileSwitchTileEntity::new, AllBlocks.STOCKPILE_SWITCH); register("nixie_tube", NixieTubeTileEntity::new, AllBlocks.NIXIE_TUBE);
public static final TileEntityEntry<AdjustableCrateTileEntity> ADJUSTABLE_CRATE = register( public static final TileEntityEntry<StockpileSwitchTileEntity> STOCKPILE_SWITCH =
"adjustable_crate", AdjustableCrateTileEntity::new, AllBlocks.ADJUSTABLE_CRATE); register("stockpile_switch", StockpileSwitchTileEntity::new, AllBlocks.STOCKPILE_SWITCH);
public static final TileEntityEntry<CreativeCrateTileEntity> CREATIVE_CRATE = register( public static final TileEntityEntry<AdjustableCrateTileEntity> ADJUSTABLE_CRATE =
"creative_crate", CreativeCrateTileEntity::new, AllBlocks.CREATIVE_CRATE); register("adjustable_crate", AdjustableCrateTileEntity::new, AllBlocks.ADJUSTABLE_CRATE);
public static final TileEntityEntry<ExtractorTileEntity> EXTRACTOR = register( public static final TileEntityEntry<CreativeCrateTileEntity> CREATIVE_CRATE =
"extractor", ExtractorTileEntity::new, AllBlocks.EXTRACTOR, AllBlocks.VERTICAL_EXTRACTOR); register("creative_crate", CreativeCrateTileEntity::new, AllBlocks.CREATIVE_CRATE);
public static final TileEntityEntry<LinkedExtractorTileEntity> LINKED_EXTRACTOR = register( public static final TileEntityEntry<ExtractorTileEntity> EXTRACTOR =
"linked_extractor", LinkedExtractorTileEntity::new, AllBlocks.LINKED_EXTRACTOR, AllBlocks.VERTICAL_LINKED_EXTRACTOR); register("extractor", ExtractorTileEntity::new, AllBlocks.EXTRACTOR, AllBlocks.VERTICAL_EXTRACTOR);
public static final TileEntityEntry<TransposerTileEntity> TRANSPOSER = register( public static final TileEntityEntry<LinkedExtractorTileEntity> LINKED_EXTRACTOR = register("linked_extractor",
"transposer", TransposerTileEntity::new, AllBlocks.TRANSPOSER, AllBlocks.VERTICAL_TRANSPOSER); LinkedExtractorTileEntity::new, AllBlocks.LINKED_EXTRACTOR, AllBlocks.VERTICAL_LINKED_EXTRACTOR);
public static final TileEntityEntry<LinkedTransposerTileEntity> LINKED_TRANSPOSER = register( public static final TileEntityEntry<TransposerTileEntity> TRANSPOSER =
"linked_transposer", LinkedTransposerTileEntity::new, AllBlocks.LINKED_TRANSPOSER, AllBlocks.VERTICAL_LINKED_TRANSPOSER); register("transposer", TransposerTileEntity::new, AllBlocks.TRANSPOSER, AllBlocks.VERTICAL_TRANSPOSER);
public static final TileEntityEntry<FunnelTileEntity> FUNNEL = register( public static final TileEntityEntry<LinkedTransposerTileEntity> LINKED_TRANSPOSER = register("linked_transposer",
"funnel", FunnelTileEntity::new, AllBlocks.FUNNEL, AllBlocks.VERTICAL_FUNNEL); LinkedTransposerTileEntity::new, AllBlocks.LINKED_TRANSPOSER, AllBlocks.VERTICAL_LINKED_TRANSPOSER);
public static final TileEntityEntry<BeltObserverTileEntity> BELT_OBSERVER = register( public static final TileEntityEntry<FunnelTileEntity> FUNNEL =
"belt_observer", BeltObserverTileEntity::new, AllBlocks.BELT_OBSERVER); register("funnel", FunnelTileEntity::new, AllBlocks.FUNNEL, AllBlocks.VERTICAL_FUNNEL);
public static final TileEntityEntry<AdjustableRepeaterTileEntity> ADJUSTABLE_REPEATER = register( public static final TileEntityEntry<BeltObserverTileEntity> BELT_OBSERVER =
"adjustable_repeater", AdjustableRepeaterTileEntity::new, AllBlocks.ADJUSTABLE_REPEATER); register("belt_observer", BeltObserverTileEntity::new, AllBlocks.BELT_OBSERVER);
public static final TileEntityEntry<AdjustableRepeaterTileEntity> ADJUSTABLE_REPEATER =
register("adjustable_repeater", AdjustableRepeaterTileEntity::new, AllBlocks.ADJUSTABLE_REPEATER);
public static final TileEntityEntry<AdjustablePulseRepeaterTileEntity> ADJUSTABLE_PULSE_REPEATER = register( public static final TileEntityEntry<AdjustablePulseRepeaterTileEntity> ADJUSTABLE_PULSE_REPEATER = register(
"adjustable_pulse_repeater", AdjustablePulseRepeaterTileEntity::new, AllBlocks.ADJUSTABLE_PULSE_REPEATER); "adjustable_pulse_repeater", AdjustablePulseRepeaterTileEntity::new, AllBlocks.ADJUSTABLE_PULSE_REPEATER);
@SafeVarargs @SafeVarargs
public static <T extends TileEntity> TileEntityEntry<T> register(String name, NonNullFunction<TileEntityType<T>, ? extends T> supplier, NonNullSupplier<? extends Block>... blocks) { public static <T extends TileEntity> TileEntityEntry<T> register(String name,
return Create.registrate().<T>tileEntity(name, supplier) NonNullFunction<TileEntityType<T>, ? extends T> supplier, NonNullSupplier<? extends Block>... blocks) {
return Create.registrate()
.<T>tileEntity(name, supplier)
.validBlocks(blocks) .validBlocks(blocks)
.register(); .register();
} }
@ -268,6 +272,7 @@ public class AllTileEntities {
bind(CREATIVE_CRATE, SmartTileEntityRenderer::new); bind(CREATIVE_CRATE, SmartTileEntityRenderer::new);
bind(REDSTONE_LINK, SmartTileEntityRenderer::new); bind(REDSTONE_LINK, SmartTileEntityRenderer::new);
bind(NIXIE_TUBE, NixieTubeRenderer::new);
bind(EXTRACTOR, SmartTileEntityRenderer::new); bind(EXTRACTOR, SmartTileEntityRenderer::new);
bind(LINKED_EXTRACTOR, SmartTileEntityRenderer::new); bind(LINKED_EXTRACTOR, SmartTileEntityRenderer::new);
bind(TRANSPOSER, SmartTileEntityRenderer::new); bind(TRANSPOSER, SmartTileEntityRenderer::new);

View File

@ -0,0 +1,111 @@
package com.simibubi.create.content.logistics.block.redstone;
import com.simibubi.create.AllShapes;
import com.simibubi.create.AllTileEntities;
import com.simibubi.create.foundation.block.ITE;
import com.simibubi.create.foundation.utility.Iterate;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.HorizontalBlock;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.state.BooleanProperty;
import net.minecraft.state.StateContainer.Builder;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Direction;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3d;
import net.minecraft.util.math.shapes.ISelectionContext;
import net.minecraft.util.math.shapes.VoxelShape;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
public class NixieTubeBlock extends HorizontalBlock implements ITE<NixieTubeTileEntity> {
public static final BooleanProperty CEILING = BooleanProperty.create("ceiling");
public NixieTubeBlock(Properties properties) {
super(properties);
setDefaultState(getDefaultState().with(CEILING, false));
}
@Override
protected void fillStateContainer(Builder<Block, BlockState> builder) {
super.fillStateContainer(builder.add(CEILING, HORIZONTAL_FACING));
}
@Override
public VoxelShape getShape(BlockState state, IBlockReader p_220053_2_, BlockPos p_220053_3_,
ISelectionContext p_220053_4_) {
return (state.get(CEILING) ? AllShapes.NIXIE_TUBE_CEILING : AllShapes.NIXIE_TUBE)
.get(state.get(HORIZONTAL_FACING)
.getAxis());
}
@Override
public BlockState getStateForPlacement(BlockItemUseContext context) {
BlockPos pos = context.getPos();
boolean ceiling = context.getFace() == Direction.DOWN;
Vec3d hitVec = context.getHitVec();
if (hitVec != null)
ceiling = hitVec.y - pos.getY() > .5f;
return getDefaultState().with(HORIZONTAL_FACING, context.getPlacementHorizontalFacing()
.getOpposite())
.with(CEILING, ceiling);
}
@Override
public void neighborChanged(BlockState p_220069_1_, World p_220069_2_, BlockPos p_220069_3_, Block p_220069_4_,
BlockPos p_220069_5_, boolean p_220069_6_) {
updateDisplayedValue(p_220069_1_, p_220069_2_, p_220069_3_);
}
@Override
public void onBlockAdded(BlockState state, World worldIn, BlockPos pos, BlockState oldState, boolean isMoving) {
updateDisplayedValue(state, worldIn, pos);
}
@Override
public TileEntity createTileEntity(BlockState state, IBlockReader world) {
return new NixieTubeTileEntity(AllTileEntities.NIXIE_TUBE.get());
}
@Override
public boolean hasTileEntity(BlockState state) {
return true;
}
private void updateDisplayedValue(BlockState state, World worldIn, BlockPos pos) {
if (worldIn.isRemote)
return;
int power = getPower(worldIn, pos);
String display = (power < 10 ? "0" : "") + power;
withTileEntityDo(worldIn, pos, te -> te.display(display.charAt(0), display.charAt(1)));
}
static boolean isValidBlock(IBlockReader world, BlockPos pos, boolean above) {
BlockState state = world.getBlockState(pos.up(above ? 1 : -1));
return !state.getShape(world, pos)
.isEmpty();
}
private int getPower(World worldIn, BlockPos pos) {
int power = 0;
for (Direction direction : Iterate.directions)
power = Math.max(worldIn.getRedstonePower(pos.offset(direction), direction), power);
for (Direction direction : Iterate.directions)
power = Math.max(worldIn.getRedstonePower(pos.offset(direction), Direction.UP), power);
return power;
}
@Override
public boolean canConnectRedstone(BlockState state, IBlockReader world, BlockPos pos, Direction side) {
return side != null;
}
@Override
public Class<NixieTubeTileEntity> getTileEntityClass() {
return NixieTubeTileEntity.class;
}
}

View File

@ -0,0 +1,30 @@
package com.simibubi.create.content.logistics.block.redstone;
import com.simibubi.create.foundation.data.AssetLookup;
import com.simibubi.create.foundation.data.SpecialBlockStateGen;
import com.tterrag.registrate.providers.DataGenContext;
import com.tterrag.registrate.providers.RegistrateBlockstateProvider;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraftforge.client.model.generators.ModelFile;
public class NixieTubeGenerator extends SpecialBlockStateGen {
@Override
protected int getXRotation(BlockState state) {
return state.get(NixieTubeBlock.CEILING) ? 180 : 0;
}
@Override
protected int getYRotation(BlockState state) {
return horizontalAngle(state.get(NixieTubeBlock.HORIZONTAL_FACING));
}
@Override
public <T extends Block> ModelFile getModel(DataGenContext<Block, T> ctx, RegistrateBlockstateProvider prov,
BlockState state) {
return AssetLookup.partialBaseModel(ctx, prov);
}
}

View File

@ -0,0 +1,89 @@
package com.simibubi.create.content.logistics.block.redstone;
import java.util.Random;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.simibubi.create.foundation.tileEntity.renderer.SafeTileEntityRenderer;
import com.simibubi.create.foundation.utility.AngleHelper;
import com.simibubi.create.foundation.utility.ColorHelper;
import com.simibubi.create.foundation.utility.MatrixStacker;
import net.minecraft.block.BlockState;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.renderer.IRenderTypeBuffer;
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
public class NixieTubeRenderer extends SafeTileEntityRenderer<NixieTubeTileEntity> {
Random r = new Random();
public NixieTubeRenderer(TileEntityRendererDispatcher dispatcher) {
super(dispatcher);
}
@Override
protected void renderSafe(NixieTubeTileEntity te, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffer,
int light, int overlay) {
ms.push();
BlockState blockState = te.getBlockState();
MatrixStacker.of(ms)
.centre()
.rotateY(AngleHelper.horizontalAngle(blockState
.get(NixieTubeBlock.HORIZONTAL_FACING)));
float height = blockState.get(NixieTubeBlock.CEILING) ? 2 : 6;
float scale = 1 / 20f;
ms.push();
ms.translate(-4/16f, 0, 0);
ms.scale(scale, -scale, scale);
drawTube(ms, buffer, te.tube1, height);
ms.pop();
ms.push();
ms.translate(4/16f, 0, 0);
ms.scale(scale, -scale, scale);
drawTube(ms, buffer, te.tube2, height);
ms.pop();
ms.pop();
}
private void drawTube(MatrixStack ms, IRenderTypeBuffer buffer, char c, float height) {
FontRenderer fontRenderer = Minecraft.getInstance().fontRenderer;
float charWidth = fontRenderer.getCharWidth(c);
float shadowOffset = .5f;
float flicker = r.nextFloat();
int brightColor = 0xFF982B;
int darkColor = 0xE03221;
int flickeringBrightColor = ColorHelper.mixColors(brightColor, darkColor, flicker / 4);
ms.push();
ms.translate((charWidth - shadowOffset) / -2f, -height, 0);
drawChar(ms, buffer, c, flickeringBrightColor);
ms.push();
ms.translate(shadowOffset, shadowOffset, -1/16f);
drawChar(ms, buffer, c, darkColor);
ms.pop();
ms.pop();
ms.push();
ms.scale(-1, 1, 1);
ms.translate((charWidth - shadowOffset) / -2f, -height, 0);
drawChar(ms, buffer, c, darkColor);
ms.push();
ms.translate(-shadowOffset, shadowOffset, -1/16f);
drawChar(ms, buffer, c, 0x99180F);
ms.pop();
ms.pop();
}
private static void drawChar(MatrixStack ms, IRenderTypeBuffer buffer, char c, int color) {
FontRenderer fontRenderer = Minecraft.getInstance().fontRenderer;
fontRenderer.draw(String.valueOf(c), 0, 0, color, false, ms.peek()
.getModel(), buffer, false, 0, 15728880);
}
}

View File

@ -0,0 +1,41 @@
package com.simibubi.create.content.logistics.block.redstone;
import com.simibubi.create.foundation.tileEntity.SyncedTileEntity;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.tileentity.TileEntityType;
public class NixieTubeTileEntity extends SyncedTileEntity {
char tube1;
char tube2;
public NixieTubeTileEntity(TileEntityType<?> tileEntityTypeIn) {
super(tileEntityTypeIn);
tube1 = '0';
tube2 = '0';
}
@Override
public CompoundNBT write(CompoundNBT nbt) {
super.write(nbt);
nbt.putInt("tube1", tube1);
nbt.putInt("tube2", tube2);
return nbt;
}
public void display(char tube1, char tube2) {
this.tube1 = tube1;
this.tube2 = tube2;
markDirty();
sendData();
}
@Override
public void read(CompoundNBT nbt) {
tube1 = (char) nbt.getInt("tube1");
tube2 = (char) nbt.getInt("tube2");
super.read(nbt);
}
}

View File

@ -0,0 +1,16 @@
package com.simibubi.create.foundation.block.render;
import net.minecraft.client.renderer.model.IBakedModel;
public class BakedModelBuiltInRenderer extends WrappedBakedModel {
public BakedModelBuiltInRenderer(IBakedModel template) {
super(template);
}
@Override
public boolean isBuiltInRenderer() {
return true;
}
}

View File

@ -12,7 +12,6 @@ import net.minecraft.client.renderer.IRenderTypeBuffer;
import net.minecraft.client.renderer.ItemRenderer; import net.minecraft.client.renderer.ItemRenderer;
import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.RenderType;
import net.minecraft.client.renderer.model.IBakedModel; import net.minecraft.client.renderer.model.IBakedModel;
import net.minecraft.client.renderer.model.ItemCameraTransforms.TransformType;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.Direction; import net.minecraft.util.Direction;
import net.minecraftforge.client.model.data.EmptyModelData; import net.minecraftforge.client.model.data.EmptyModelData;
@ -63,7 +62,6 @@ public class PartialItemModelRenderer {
return; return;
ms.push(); ms.push();
model = net.minecraftforge.client.ForgeHooksClient.handleCameraTransforms(ms, model, TransformType.NONE, false);
ms.translate(-0.5D, -0.5D, -0.5D); ms.translate(-0.5D, -0.5D, -0.5D);
if (!model.isBuiltInRenderer()) if (!model.isBuiltInRenderer())

View File

@ -349,7 +349,12 @@
"block.create.redstone_link.tooltip.control2": "When R-Clicked while Sneaking", "block.create.redstone_link.tooltip.control2": "When R-Clicked while Sneaking",
"block.create.redstone_link.tooltip.action2": "Toggles between _Receiver_ and _Transmitter_ Mode.", "block.create.redstone_link.tooltip.action2": "Toggles between _Receiver_ and _Transmitter_ Mode.",
"block.create.redstone_contact.tooltip": "REDSTONE redstone_contact", "block.create.nixie_tube.tooltip": "NIXIE TUBE",
"block.create.nixie_tube.tooltip.summary": "A fancy redstone-powered _Number_ _Display_ ranging from 0 to 15.",
"block.create.nixie_tube.tooltip.condition1": "When Powered",
"block.create.nixie_tube.tooltip.behaviour1": "Shows the current redstone _Signal_ _Strength_ as its displayed value.",
"block.create.redstone_contact.tooltip": "REDSTONE CONTACT",
"block.create.redstone_contact.tooltip.summary": "Only emits redstone power in pairs. It is movable with _Mechanical_ _Pistons_, _Bearings_ or other controllers.", "block.create.redstone_contact.tooltip.summary": "Only emits redstone power in pairs. It is movable with _Mechanical_ _Pistons_, _Bearings_ or other controllers.",
"block.create.redstone_contact.tooltip.condition1": "When facing other redstone_contact", "block.create.redstone_contact.tooltip.condition1": "When facing other redstone_contact",
"block.create.redstone_contact.tooltip.behaviour1": "Provides a _Redstone_ _Signal_.", "block.create.redstone_contact.tooltip.behaviour1": "Provides a _Redstone_ _Signal_.",

View File

@ -0,0 +1,83 @@
{
"credit": "Made with Blockbench",
"parent": "block/block",
"textures": {
"0": "create:block/nixie_tube",
"1": "create:block/brass_casing",
"particle": "create:block/nixie_tube"
},
"elements": [
{
"name": "base",
"from": [0, 0, 0],
"to": [16, 4, 16],
"faces": {
"north": {"uv": [8, 0, 16, 2], "texture": "#0"},
"east": {"uv": [8, 0, 16, 2], "texture": "#0"},
"south": {"uv": [8, 0, 16, 2], "texture": "#0"},
"west": {"uv": [8, 0, 16, 2], "texture": "#0"},
"up": {"uv": [0, 0, 8, 8], "texture": "#0"},
"down": {"uv": [0, 0, 16, 16], "texture": "#1"}
}
},
{
"name": "connector1",
"from": [1, 4, 5],
"to": [7, 6, 11],
"rotation": {"angle": 0, "axis": "y", "origin": [9, 12, 13]},
"faces": {
"north": {"uv": [8, 7, 11, 8], "texture": "#0"},
"east": {"uv": [8, 7, 11, 8], "texture": "#0"},
"south": {"uv": [8, 7, 11, 8], "texture": "#0"},
"west": {"uv": [8, 7, 11, 8], "texture": "#0"},
"up": {"uv": [11, 5, 14, 8], "texture": "#0"}
}
},
{
"name": "connector2",
"from": [9, 4, 5],
"to": [15, 6, 11],
"rotation": {"angle": 0, "axis": "y", "origin": [17, 12, 13]},
"faces": {
"north": {"uv": [8, 7, 11, 8], "texture": "#0"},
"east": {"uv": [8, 7, 11, 8], "texture": "#0"},
"south": {"uv": [8, 7, 11, 8], "texture": "#0"},
"west": {"uv": [8, 7, 11, 8], "texture": "#0"},
"up": {"uv": [11, 5, 14, 8], "texture": "#0"}
}
},
{
"name": "tube1",
"from": [1, 6, 5],
"to": [7, 15, 11],
"rotation": {"angle": 0, "axis": "y", "origin": [9, 14, 13]},
"faces": {
"north": {"uv": [8, 2.5, 11, 7], "texture": "#0"},
"east": {"uv": [8, 2.5, 11, 7], "texture": "#0"},
"south": {"uv": [8, 2.5, 11, 7], "texture": "#0"},
"west": {"uv": [8, 2.5, 11, 7], "texture": "#0"},
"up": {"uv": [11, 2, 14, 5], "texture": "#0"}
}
},
{
"name": "tube2",
"from": [9, 6, 5],
"to": [15, 15, 11],
"rotation": {"angle": 0, "axis": "y", "origin": [17, 14, 13]},
"faces": {
"north": {"uv": [8, 2.5, 11, 7], "texture": "#0"},
"east": {"uv": [8, 2.5, 11, 7], "texture": "#0"},
"south": {"uv": [8, 2.5, 11, 7], "texture": "#0"},
"west": {"uv": [8, 2.5, 11, 7], "texture": "#0"},
"up": {"uv": [11, 2, 14, 5], "texture": "#0"}
}
}
],
"groups": [
{
"name": "nixie",
"origin": [8, 8, 8],
"children": [0, 1, 2, 3, 4]
}
]
}

View File

@ -0,0 +1,83 @@
{
"credit": "Made with Blockbench",
"parent": "block/block",
"textures": {
"0": "create:block/nixie_tube",
"1": "create:block/brass_casing",
"particle": "create:block/nixie_tube"
},
"elements": [
{
"name": "base",
"from": [0, 0, 0],
"to": [16, 4, 16],
"faces": {
"north": {"uv": [8, 0, 16, 2], "texture": "#0"},
"east": {"uv": [8, 0, 16, 2], "texture": "#0"},
"south": {"uv": [8, 0, 16, 2], "texture": "#0"},
"west": {"uv": [8, 0, 16, 2], "texture": "#0"},
"up": {"uv": [0, 0, 8, 8], "texture": "#0"},
"down": {"uv": [0, 0, 16, 16], "texture": "#1"}
}
},
{
"name": "connector1",
"from": [1, 4, 5],
"to": [7, 6, 11],
"rotation": {"angle": 0, "axis": "y", "origin": [9, 12, 13]},
"faces": {
"north": {"uv": [8, 7, 11, 8], "texture": "#0"},
"east": {"uv": [8, 7, 11, 8], "texture": "#0"},
"south": {"uv": [8, 7, 11, 8], "texture": "#0"},
"west": {"uv": [8, 7, 11, 8], "texture": "#0"},
"up": {"uv": [11, 5, 14, 8], "texture": "#0"}
}
},
{
"name": "connector2",
"from": [9, 4, 5],
"to": [15, 6, 11],
"rotation": {"angle": 0, "axis": "y", "origin": [17, 12, 13]},
"faces": {
"north": {"uv": [8, 7, 11, 8], "texture": "#0"},
"east": {"uv": [8, 7, 11, 8], "texture": "#0"},
"south": {"uv": [8, 7, 11, 8], "texture": "#0"},
"west": {"uv": [8, 7, 11, 8], "texture": "#0"},
"up": {"uv": [11, 5, 14, 8], "texture": "#0"}
}
},
{
"name": "tube1",
"from": [1, 6, 5],
"to": [7, 15, 11],
"rotation": {"angle": 0, "axis": "y", "origin": [9, 14, 13]},
"faces": {
"north": {"uv": [8, 2.5, 11, 7], "texture": "#0"},
"east": {"uv": [8, 2.5, 11, 7], "texture": "#0"},
"south": {"uv": [8, 2.5, 11, 7], "texture": "#0"},
"west": {"uv": [8, 2.5, 11, 7], "texture": "#0"},
"up": {"uv": [11, 2, 14, 5], "texture": "#0"}
}
},
{
"name": "tube2",
"from": [9, 6, 5],
"to": [15, 15, 11],
"rotation": {"angle": 0, "axis": "y", "origin": [17, 14, 13]},
"faces": {
"north": {"uv": [8, 2.5, 11, 7], "texture": "#0"},
"east": {"uv": [8, 2.5, 11, 7], "texture": "#0"},
"south": {"uv": [8, 2.5, 11, 7], "texture": "#0"},
"west": {"uv": [8, 2.5, 11, 7], "texture": "#0"},
"up": {"uv": [11, 2, 14, 5], "texture": "#0"}
}
}
],
"groups": [
{
"name": "nixie",
"origin": [8, 8, 8],
"children": [0, 1, 2, 3, 4, 5, 6]
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -0,0 +1,18 @@
{
"type": "create:mechanical_crafting",
"pattern": [
"EBE"
],
"key": {
"B": {
"item": "create:brass_casing"
},
"E": {
"item": "create:electron_tube"
}
},
"result": {
"item": "create:nixie_tube",
"count": 1
}
}