Brass Tunnel connectivity and filtering
- Brass tunnels now visually connect for upcoming splitter functionality - Added a tileentity behaviour that allows separate filtering for each face - Added filtering to brass tunnels
@ -395,13 +395,13 @@ a033fbac3129bba9211c6c4a0e16c905643afa39 assets\create\models\block\andesite_cob
|
|||||||
0ed983628e8868f77301bea1111570d3631f24fb assets\create\models\block\andesite_cobblestone_wall_side.json
|
0ed983628e8868f77301bea1111570d3631f24fb assets\create\models\block\andesite_cobblestone_wall_side.json
|
||||||
9febbf6fb88e726a89573c3788bd8348ba805b6d assets\create\models\block\andesite_funnel.json
|
9febbf6fb88e726a89573c3788bd8348ba805b6d assets\create\models\block\andesite_funnel.json
|
||||||
b1d0bb538fc8285b7d3fd77a977d78a104b83b62 assets\create\models\block\andesite_pillar.json
|
b1d0bb538fc8285b7d3fd77a977d78a104b83b62 assets\create\models\block\andesite_pillar.json
|
||||||
cb644bda777d361ddf1255644641086d82df8480 assets\create\models\block\andesite_tunnel\cross.json
|
01ad35140f53b2c7d3c36ce148629351ab91412b assets\create\models\block\andesite_tunnel\cross.json
|
||||||
99e33c403e907dc3febdb6a0a8b183fe454c2448 assets\create\models\block\andesite_tunnel\fullshade.json
|
cdfd39b052f0f606abfd34d9330d536d7f0f1281 assets\create\models\block\andesite_tunnel\fullshade.json
|
||||||
c1d4392677fe3871fd6948f29bdf427abc9910ed assets\create\models\block\andesite_tunnel\halfshade.json
|
4425b48e65cc855cee37abd6c7ec1356c703e87c assets\create\models\block\andesite_tunnel\halfshade.json
|
||||||
8e5c47a028ec674048c208e380152bb4f817a406 assets\create\models\block\andesite_tunnel\straight.json
|
1ee32dacef1840d526579ac93560f85869053e6d assets\create\models\block\andesite_tunnel\straight.json
|
||||||
a814c9aaa2cd44c8035124cd8f87ea4ad368701e assets\create\models\block\andesite_tunnel\t_left.json
|
4cf6628da4d000ef84497781853f8df31ac91d93 assets\create\models\block\andesite_tunnel\t_left.json
|
||||||
64f63d63b7682c4237bf04faf51f68b3d0122de9 assets\create\models\block\andesite_tunnel\t_right.json
|
fc94e50b17588232db29f917e90f9659e36ec967 assets\create\models\block\andesite_tunnel\t_right.json
|
||||||
b121b55494785695b03bf7971fb0cc77503d857f assets\create\models\block\andesite_tunnel\window.json
|
1405be1d4ca1aeced9a287f0d1fca5ba3cc722d2 assets\create\models\block\andesite_tunnel\window.json
|
||||||
e8bfb63e0a4426f9d95cd111640169b218dead1b assets\create\models\block\belt_observer\detect.json
|
e8bfb63e0a4426f9d95cd111640169b218dead1b assets\create\models\block\belt_observer\detect.json
|
||||||
a2e63810eceb028484b193ddf4315e1811950dc8 assets\create\models\block\belt_observer\detect_belt.json
|
a2e63810eceb028484b193ddf4315e1811950dc8 assets\create\models\block\belt_observer\detect_belt.json
|
||||||
034c308d46def892e6638ac0b3374849a6a88a26 assets\create\models\block\belt_observer\detect_belt_powered.json
|
034c308d46def892e6638ac0b3374849a6a88a26 assets\create\models\block\belt_observer\detect_belt_powered.json
|
||||||
@ -440,13 +440,13 @@ ee79efc65b05d953784b00e573d37602629eb9e8 assets\create\models\block\brass_belt_f
|
|||||||
7edf6b5c95f61071d8a9243a63e786765d6104a3 assets\create\models\block\brass_chute_funnel_push_powered.json
|
7edf6b5c95f61071d8a9243a63e786765d6104a3 assets\create\models\block\brass_chute_funnel_push_powered.json
|
||||||
6c617fc504cb2259263d24fc56c4735e455aac6d assets\create\models\block\brass_funnel.json
|
6c617fc504cb2259263d24fc56c4735e455aac6d assets\create\models\block\brass_funnel.json
|
||||||
2f152b82291b7fc994191b1ffb8ec6d65aec748b assets\create\models\block\brass_funnel_powered.json
|
2f152b82291b7fc994191b1ffb8ec6d65aec748b assets\create\models\block\brass_funnel_powered.json
|
||||||
5544ab512bdfe6acb9b14f8e6576ffcca097f18f assets\create\models\block\brass_tunnel\cross.json
|
eed69194b5b53e285d39bf2d794e67300497bf6f assets\create\models\block\brass_tunnel\cross.json
|
||||||
fd2fec2a7699b54516c79d3e554c4fc10c331be1 assets\create\models\block\brass_tunnel\fullshade.json
|
06efb094dd1ca296614d2a15c74d2aca63503b97 assets\create\models\block\brass_tunnel\fullshade.json
|
||||||
816aa7593ce220dd7c0dab9eef48eef13be289e3 assets\create\models\block\brass_tunnel\halfshade.json
|
da066edd238414610a14fd092f7e06705d36fd9e assets\create\models\block\brass_tunnel\halfshade.json
|
||||||
e65fac8652f201891b25067b922efdd2d9309cc7 assets\create\models\block\brass_tunnel\straight.json
|
77fc3e676e25d84d88dc2b452b2263b366a408f6 assets\create\models\block\brass_tunnel\straight.json
|
||||||
7a85b21c40c659c93c2c41f5edd2227e4ee56614 assets\create\models\block\brass_tunnel\t_left.json
|
11bfe6b44bbf5f5af88295317f20a91dbf6ebfcd assets\create\models\block\brass_tunnel\t_left.json
|
||||||
881d97c0b7ee57695dea157bfeeaad212c98766a assets\create\models\block\brass_tunnel\t_right.json
|
fb1a38ee7e4a58711f2f2d90edc13c8a5aedd31c assets\create\models\block\brass_tunnel\t_right.json
|
||||||
fddfb12eae701af4b84b6e9c1a4cdaceb848fb43 assets\create\models\block\brass_tunnel\window.json
|
67d96d75e9c2b3d9e0c781c514efb85486fce0ad assets\create\models\block\brass_tunnel\window.json
|
||||||
028a07b49c05fe8a93f1d8c229d81e73d887c2df assets\create\models\block\chiseled_dark_scoria.json
|
028a07b49c05fe8a93f1d8c229d81e73d887c2df assets\create\models\block\chiseled_dark_scoria.json
|
||||||
b1f9ee4867373dd8f976625bab744a1c72c7fd16 assets\create\models\block\chiseled_dolomite.json
|
b1f9ee4867373dd8f976625bab744a1c72c7fd16 assets\create\models\block\chiseled_dolomite.json
|
||||||
cd7751090cf3d55296b8e415d0af9b6f18d69770 assets\create\models\block\chiseled_gabbro.json
|
cd7751090cf3d55296b8e415d0af9b6f18d69770 assets\create\models\block\chiseled_gabbro.json
|
||||||
@ -991,7 +991,7 @@ b0f664dd6de3d0ee9afcb6223fbcd53b97fa0d65 assets\create\models\item\andesite_cobb
|
|||||||
4856d13a72ec0af9f10226b4a4bf0567eb580b9a assets\create\models\item\andesite_cobblestone_wall.json
|
4856d13a72ec0af9f10226b4a4bf0567eb580b9a assets\create\models\item\andesite_cobblestone_wall.json
|
||||||
0a9f5f6d552813029474dbbfa31e8443ed91adcd assets\create\models\item\andesite_funnel.json
|
0a9f5f6d552813029474dbbfa31e8443ed91adcd assets\create\models\item\andesite_funnel.json
|
||||||
75b8b00c2418b9660d35a7fabd0774925cf1c02f assets\create\models\item\andesite_pillar.json
|
75b8b00c2418b9660d35a7fabd0774925cf1c02f assets\create\models\item\andesite_pillar.json
|
||||||
c259e28f971a736af10b1fd7393118d5d31c51b2 assets\create\models\item\andesite_tunnel.json
|
5889a1d445c576dc23cef8ab42c76f1d6cc4bfd3 assets\create\models\item\andesite_tunnel.json
|
||||||
bf1fc6bdf7fca6f1958a2d3e96202c1cecb50669 assets\create\models\item\basin.json
|
bf1fc6bdf7fca6f1958a2d3e96202c1cecb50669 assets\create\models\item\basin.json
|
||||||
1da382e7e58eaa9788f5b1d92221ccac573e068f assets\create\models\item\belt_connector.json
|
1da382e7e58eaa9788f5b1d92221ccac573e068f assets\create\models\item\belt_connector.json
|
||||||
695a69d5854e2eb134b55d855bd2b7b18808a01d assets\create\models\item\belt_observer.json
|
695a69d5854e2eb134b55d855bd2b7b18808a01d assets\create\models\item\belt_observer.json
|
||||||
@ -1004,7 +1004,7 @@ ab045c951352806c3f632dda7b71573f93f60ac4 assets\create\models\item\brass_funnel.
|
|||||||
1786bdffa2ab5a07c88d2797db3d7b54461323c4 assets\create\models\item\brass_ingot.json
|
1786bdffa2ab5a07c88d2797db3d7b54461323c4 assets\create\models\item\brass_ingot.json
|
||||||
a37be4a0ec9bf6c381527403c57ced4f81abd67c assets\create\models\item\brass_nugget.json
|
a37be4a0ec9bf6c381527403c57ced4f81abd67c assets\create\models\item\brass_nugget.json
|
||||||
14ea6ee4db6e7e76446e331a70b6b6bec31e8eb7 assets\create\models\item\brass_sheet.json
|
14ea6ee4db6e7e76446e331a70b6b6bec31e8eb7 assets\create\models\item\brass_sheet.json
|
||||||
2c71c36d0b987d5a5e07da4f23f3eaa88f806edf assets\create\models\item\brass_tunnel.json
|
7b231b9401ff151fa6b0e1361b64774b3a2051cf assets\create\models\item\brass_tunnel.json
|
||||||
3e232a103f7f916fc11edb4d541ca99fe7b44181 assets\create\models\item\cart_assembler.json
|
3e232a103f7f916fc11edb4d541ca99fe7b44181 assets\create\models\item\cart_assembler.json
|
||||||
99d64b76b3baa84c3bd4b96ccd3376ca12425950 assets\create\models\item\chiseled_dark_scoria.json
|
99d64b76b3baa84c3bd4b96ccd3376ca12425950 assets\create\models\item\chiseled_dark_scoria.json
|
||||||
83d3571eacde52568786802b268f24c6578c1e5d assets\create\models\item\chiseled_dolomite.json
|
83d3571eacde52568786802b268f24c6578c1e5d assets\create\models\item\chiseled_dolomite.json
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
"parent": "create:block/belt_tunnel/cross",
|
"parent": "create:block/belt_tunnel/cross",
|
||||||
"textures": {
|
"textures": {
|
||||||
"0": "create:block/andesite_tunnel",
|
"0": "create:block/andesite_tunnel",
|
||||||
|
"1": "create:block/andesite_tunnel_top",
|
||||||
"particle": "block/polished_andesite"
|
"particle": "block/polished_andesite"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -2,6 +2,7 @@
|
|||||||
"parent": "create:block/belt_tunnel/fullshade",
|
"parent": "create:block/belt_tunnel/fullshade",
|
||||||
"textures": {
|
"textures": {
|
||||||
"0": "create:block/andesite_tunnel",
|
"0": "create:block/andesite_tunnel",
|
||||||
|
"1": "create:block/andesite_tunnel_top",
|
||||||
"particle": "block/polished_andesite"
|
"particle": "block/polished_andesite"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -2,6 +2,7 @@
|
|||||||
"parent": "create:block/belt_tunnel/halfshade",
|
"parent": "create:block/belt_tunnel/halfshade",
|
||||||
"textures": {
|
"textures": {
|
||||||
"0": "create:block/andesite_tunnel",
|
"0": "create:block/andesite_tunnel",
|
||||||
|
"1": "create:block/andesite_tunnel_top",
|
||||||
"particle": "block/polished_andesite"
|
"particle": "block/polished_andesite"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -2,6 +2,7 @@
|
|||||||
"parent": "create:block/belt_tunnel/straight",
|
"parent": "create:block/belt_tunnel/straight",
|
||||||
"textures": {
|
"textures": {
|
||||||
"0": "create:block/andesite_tunnel",
|
"0": "create:block/andesite_tunnel",
|
||||||
|
"1": "create:block/andesite_tunnel_top",
|
||||||
"particle": "block/polished_andesite"
|
"particle": "block/polished_andesite"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -2,6 +2,7 @@
|
|||||||
"parent": "create:block/belt_tunnel/t_left",
|
"parent": "create:block/belt_tunnel/t_left",
|
||||||
"textures": {
|
"textures": {
|
||||||
"0": "create:block/andesite_tunnel",
|
"0": "create:block/andesite_tunnel",
|
||||||
|
"1": "create:block/andesite_tunnel_top",
|
||||||
"particle": "block/polished_andesite"
|
"particle": "block/polished_andesite"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -2,6 +2,7 @@
|
|||||||
"parent": "create:block/belt_tunnel/t_right",
|
"parent": "create:block/belt_tunnel/t_right",
|
||||||
"textures": {
|
"textures": {
|
||||||
"0": "create:block/andesite_tunnel",
|
"0": "create:block/andesite_tunnel",
|
||||||
|
"1": "create:block/andesite_tunnel_top",
|
||||||
"particle": "block/polished_andesite"
|
"particle": "block/polished_andesite"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -2,6 +2,7 @@
|
|||||||
"parent": "create:block/belt_tunnel/window",
|
"parent": "create:block/belt_tunnel/window",
|
||||||
"textures": {
|
"textures": {
|
||||||
"0": "create:block/andesite_tunnel",
|
"0": "create:block/andesite_tunnel",
|
||||||
|
"1": "create:block/andesite_tunnel_top",
|
||||||
"particle": "block/polished_andesite"
|
"particle": "block/polished_andesite"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -2,6 +2,7 @@
|
|||||||
"parent": "create:block/belt_tunnel/cross",
|
"parent": "create:block/belt_tunnel/cross",
|
||||||
"textures": {
|
"textures": {
|
||||||
"0": "create:block/brass_tunnel",
|
"0": "create:block/brass_tunnel",
|
||||||
|
"1": "create:block/brass_tunnel_top",
|
||||||
"particle": "create:block/brass_block"
|
"particle": "create:block/brass_block"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -2,6 +2,7 @@
|
|||||||
"parent": "create:block/belt_tunnel/fullshade",
|
"parent": "create:block/belt_tunnel/fullshade",
|
||||||
"textures": {
|
"textures": {
|
||||||
"0": "create:block/brass_tunnel",
|
"0": "create:block/brass_tunnel",
|
||||||
|
"1": "create:block/brass_tunnel_top",
|
||||||
"particle": "create:block/brass_block"
|
"particle": "create:block/brass_block"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -2,6 +2,7 @@
|
|||||||
"parent": "create:block/belt_tunnel/halfshade",
|
"parent": "create:block/belt_tunnel/halfshade",
|
||||||
"textures": {
|
"textures": {
|
||||||
"0": "create:block/brass_tunnel",
|
"0": "create:block/brass_tunnel",
|
||||||
|
"1": "create:block/brass_tunnel_top",
|
||||||
"particle": "create:block/brass_block"
|
"particle": "create:block/brass_block"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -2,6 +2,7 @@
|
|||||||
"parent": "create:block/belt_tunnel/straight",
|
"parent": "create:block/belt_tunnel/straight",
|
||||||
"textures": {
|
"textures": {
|
||||||
"0": "create:block/brass_tunnel",
|
"0": "create:block/brass_tunnel",
|
||||||
|
"1": "create:block/brass_tunnel_top",
|
||||||
"particle": "create:block/brass_block"
|
"particle": "create:block/brass_block"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -2,6 +2,7 @@
|
|||||||
"parent": "create:block/belt_tunnel/t_left",
|
"parent": "create:block/belt_tunnel/t_left",
|
||||||
"textures": {
|
"textures": {
|
||||||
"0": "create:block/brass_tunnel",
|
"0": "create:block/brass_tunnel",
|
||||||
|
"1": "create:block/brass_tunnel_top",
|
||||||
"particle": "create:block/brass_block"
|
"particle": "create:block/brass_block"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -2,6 +2,7 @@
|
|||||||
"parent": "create:block/belt_tunnel/t_right",
|
"parent": "create:block/belt_tunnel/t_right",
|
||||||
"textures": {
|
"textures": {
|
||||||
"0": "create:block/brass_tunnel",
|
"0": "create:block/brass_tunnel",
|
||||||
|
"1": "create:block/brass_tunnel_top",
|
||||||
"particle": "create:block/brass_block"
|
"particle": "create:block/brass_block"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -2,6 +2,7 @@
|
|||||||
"parent": "create:block/belt_tunnel/window",
|
"parent": "create:block/belt_tunnel/window",
|
||||||
"textures": {
|
"textures": {
|
||||||
"0": "create:block/brass_tunnel",
|
"0": "create:block/brass_tunnel",
|
||||||
|
"1": "create:block/brass_tunnel_top",
|
||||||
"particle": "create:block/brass_block"
|
"particle": "create:block/brass_block"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -2,6 +2,7 @@
|
|||||||
"parent": "create:block/belt_tunnel/item",
|
"parent": "create:block/belt_tunnel/item",
|
||||||
"textures": {
|
"textures": {
|
||||||
"0": "create:block/andesite_tunnel",
|
"0": "create:block/andesite_tunnel",
|
||||||
|
"1": "create:block/andesite_tunnel_top",
|
||||||
"particle": "block/polished_andesite"
|
"particle": "block/polished_andesite"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -2,6 +2,7 @@
|
|||||||
"parent": "create:block/belt_tunnel/item",
|
"parent": "create:block/belt_tunnel/item",
|
||||||
"textures": {
|
"textures": {
|
||||||
"0": "create:block/brass_tunnel",
|
"0": "create:block/brass_tunnel",
|
||||||
|
"1": "create:block/brass_tunnel_top",
|
||||||
"particle": "create:block/brass_block"
|
"particle": "create:block/brass_block"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -60,7 +60,6 @@ public class AllBlockPartials {
|
|||||||
ANALOG_LEVER_INDICATOR = get("analog_lever/indicator"),
|
ANALOG_LEVER_INDICATOR = get("analog_lever/indicator"),
|
||||||
BELT_FUNNEL_FLAP = get("belt_funnel/flap"),
|
BELT_FUNNEL_FLAP = get("belt_funnel/flap"),
|
||||||
BELT_TUNNEL_FLAP = get("belt_tunnel/flap"),
|
BELT_TUNNEL_FLAP = get("belt_tunnel/flap"),
|
||||||
BELT_TUNNEL_INDICATOR = get("belt_tunnel/indicator"),
|
|
||||||
FLEXPEATER_INDICATOR = get("diodes/indicator"),
|
FLEXPEATER_INDICATOR = get("diodes/indicator"),
|
||||||
FLYWHEEL = get("flywheel/wheel"),
|
FLYWHEEL = get("flywheel/wheel"),
|
||||||
FLYWHEEL_UPPER_ROTATING = get("flywheel/upper_rotating_connector"),
|
FLYWHEEL_UPPER_ROTATING = get("flywheel/upper_rotating_connector"),
|
||||||
|
@ -77,6 +77,8 @@ import com.simibubi.create.content.contraptions.relays.gauge.GaugeGenerator;
|
|||||||
import com.simibubi.create.content.contraptions.relays.gearbox.GearboxBlock;
|
import com.simibubi.create.content.contraptions.relays.gearbox.GearboxBlock;
|
||||||
import com.simibubi.create.content.logistics.block.belts.observer.BeltObserverBlock;
|
import com.simibubi.create.content.logistics.block.belts.observer.BeltObserverBlock;
|
||||||
import com.simibubi.create.content.logistics.block.belts.tunnel.BeltTunnelBlock;
|
import com.simibubi.create.content.logistics.block.belts.tunnel.BeltTunnelBlock;
|
||||||
|
import com.simibubi.create.content.logistics.block.belts.tunnel.BrassTunnelBlock;
|
||||||
|
import com.simibubi.create.content.logistics.block.belts.tunnel.BrassTunnelCTBehaviour;
|
||||||
import com.simibubi.create.content.logistics.block.chute.ChuteBlock;
|
import com.simibubi.create.content.logistics.block.chute.ChuteBlock;
|
||||||
import com.simibubi.create.content.logistics.block.chute.ChuteGenerator;
|
import com.simibubi.create.content.logistics.block.chute.ChuteGenerator;
|
||||||
import com.simibubi.create.content.logistics.block.chute.ChuteItem;
|
import com.simibubi.create.content.logistics.block.chute.ChuteItem;
|
||||||
@ -749,9 +751,10 @@ public class AllBlocks {
|
|||||||
.transform(BuilderTransformers.beltTunnel("andesite", new ResourceLocation("block/polished_andesite")))
|
.transform(BuilderTransformers.beltTunnel("andesite", new ResourceLocation("block/polished_andesite")))
|
||||||
.register();
|
.register();
|
||||||
|
|
||||||
public static final BlockEntry<BeltTunnelBlock> BRASS_TUNNEL =
|
public static final BlockEntry<BrassTunnelBlock> BRASS_TUNNEL =
|
||||||
REGISTRATE.block("brass_tunnel", BeltTunnelBlock::new)
|
REGISTRATE.block("brass_tunnel", BrassTunnelBlock::new)
|
||||||
.transform(BuilderTransformers.beltTunnel("brass", Create.asResource("block/brass_block")))
|
.transform(BuilderTransformers.beltTunnel("brass", Create.asResource("block/brass_block")))
|
||||||
|
.onRegister(connectedTextures(new BrassTunnelCTBehaviour()))
|
||||||
.register();
|
.register();
|
||||||
|
|
||||||
public static final BlockEntry<RedstoneContactBlock> REDSTONE_CONTACT =
|
public static final BlockEntry<RedstoneContactBlock> REDSTONE_CONTACT =
|
||||||
|
@ -47,6 +47,7 @@ public class AllSpriteShifts {
|
|||||||
CHASSIS_STICKY = getCT(CTType.OMNIDIRECTIONAL, "linear_chassis_end_sticky");
|
CHASSIS_STICKY = getCT(CTType.OMNIDIRECTIONAL, "linear_chassis_end_sticky");
|
||||||
|
|
||||||
public static final CTSpriteShiftEntry
|
public static final CTSpriteShiftEntry
|
||||||
|
BRASS_TUNNEL_TOP = vertical("brass_tunnel_top"),
|
||||||
FLUID_TANK = getCT(CTType.OMNIDIRECTIONAL, "fluid_tank");
|
FLUID_TANK = getCT(CTType.OMNIDIRECTIONAL, "fluid_tank");
|
||||||
|
|
||||||
public static final SpriteShiftEntry
|
public static final SpriteShiftEntry
|
||||||
|
@ -72,6 +72,7 @@ import com.simibubi.create.content.logistics.block.belts.observer.BeltObserverRe
|
|||||||
import com.simibubi.create.content.logistics.block.belts.observer.BeltObserverTileEntity;
|
import com.simibubi.create.content.logistics.block.belts.observer.BeltObserverTileEntity;
|
||||||
import com.simibubi.create.content.logistics.block.belts.tunnel.BeltTunnelRenderer;
|
import com.simibubi.create.content.logistics.block.belts.tunnel.BeltTunnelRenderer;
|
||||||
import com.simibubi.create.content.logistics.block.belts.tunnel.BeltTunnelTileEntity;
|
import com.simibubi.create.content.logistics.block.belts.tunnel.BeltTunnelTileEntity;
|
||||||
|
import com.simibubi.create.content.logistics.block.belts.tunnel.BrassTunnelTileEntity;
|
||||||
import com.simibubi.create.content.logistics.block.chute.ChuteRenderer;
|
import com.simibubi.create.content.logistics.block.chute.ChuteRenderer;
|
||||||
import com.simibubi.create.content.logistics.block.chute.ChuteTileEntity;
|
import com.simibubi.create.content.logistics.block.chute.ChuteTileEntity;
|
||||||
import com.simibubi.create.content.logistics.block.depot.DepotRenderer;
|
import com.simibubi.create.content.logistics.block.depot.DepotRenderer;
|
||||||
@ -157,8 +158,10 @@ public class AllTileEntities {
|
|||||||
public static final TileEntityEntry<BeltTileEntity> BELT = register("belt", BeltTileEntity::new, AllBlocks.BELT);
|
public static final TileEntityEntry<BeltTileEntity> BELT = register("belt", BeltTileEntity::new, AllBlocks.BELT);
|
||||||
public static final TileEntityEntry<ChuteTileEntity> CHUTE =
|
public static final TileEntityEntry<ChuteTileEntity> CHUTE =
|
||||||
register("chute", ChuteTileEntity::new, AllBlocks.CHUTE);
|
register("chute", ChuteTileEntity::new, AllBlocks.CHUTE);
|
||||||
public static final TileEntityEntry<BeltTunnelTileEntity> BELT_TUNNEL =
|
public static final TileEntityEntry<BeltTunnelTileEntity> ANDESITE_TUNNEL =
|
||||||
register("belt_tunnel", BeltTunnelTileEntity::new, AllBlocks.ANDESITE_TUNNEL, AllBlocks.BRASS_TUNNEL);
|
register("andesite_tunnel", BeltTunnelTileEntity::new, AllBlocks.ANDESITE_TUNNEL);
|
||||||
|
public static final TileEntityEntry<BrassTunnelTileEntity> BRASS_TUNNEL =
|
||||||
|
register("brass_tunnel", BrassTunnelTileEntity::new, AllBlocks.BRASS_TUNNEL);
|
||||||
public static final TileEntityEntry<ArmTileEntity> MECHANICAL_ARM =
|
public static final TileEntityEntry<ArmTileEntity> MECHANICAL_ARM =
|
||||||
register("mechanical_arm", ArmTileEntity::new, AllBlocks.MECHANICAL_ARM);
|
register("mechanical_arm", ArmTileEntity::new, AllBlocks.MECHANICAL_ARM);
|
||||||
public static final TileEntityEntry<MechanicalPistonTileEntity> MECHANICAL_PISTON = register("mechanical_piston",
|
public static final TileEntityEntry<MechanicalPistonTileEntity> MECHANICAL_PISTON = register("mechanical_piston",
|
||||||
@ -227,9 +230,9 @@ public class AllTileEntities {
|
|||||||
|
|
||||||
public static final TileEntityEntry<DepotTileEntity> DEPOT =
|
public static final TileEntityEntry<DepotTileEntity> DEPOT =
|
||||||
register("depot", DepotTileEntity::new, AllBlocks.DEPOT);
|
register("depot", DepotTileEntity::new, AllBlocks.DEPOT);
|
||||||
public static final TileEntityEntry<FunnelTileEntity> FUNNEL = register("funnel",
|
public static final TileEntityEntry<FunnelTileEntity> FUNNEL = register("funnel", FunnelTileEntity::new,
|
||||||
FunnelTileEntity::new, AllBlocks.BRASS_FUNNEL, AllBlocks.BRASS_BELT_FUNNEL, AllBlocks.BRASS_CHUTE_FUNNEL,
|
AllBlocks.BRASS_FUNNEL, AllBlocks.BRASS_BELT_FUNNEL, AllBlocks.BRASS_CHUTE_FUNNEL, AllBlocks.ANDESITE_FUNNEL,
|
||||||
AllBlocks.ANDESITE_FUNNEL, AllBlocks.ANDESITE_BELT_FUNNEL, AllBlocks.ANDESITE_CHUTE_FUNNEL);
|
AllBlocks.ANDESITE_BELT_FUNNEL, AllBlocks.ANDESITE_CHUTE_FUNNEL);
|
||||||
public static final TileEntityEntry<PackagerTileEntity> PACKAGER =
|
public static final TileEntityEntry<PackagerTileEntity> PACKAGER =
|
||||||
register("packager", PackagerTileEntity::new, AllBlocks.PACKAGER);
|
register("packager", PackagerTileEntity::new, AllBlocks.PACKAGER);
|
||||||
|
|
||||||
@ -313,7 +316,8 @@ public class AllTileEntities {
|
|||||||
bind(TRANSPOSER, SmartTileEntityRenderer::new);
|
bind(TRANSPOSER, SmartTileEntityRenderer::new);
|
||||||
bind(LINKED_TRANSPOSER, SmartTileEntityRenderer::new);
|
bind(LINKED_TRANSPOSER, SmartTileEntityRenderer::new);
|
||||||
bind(FUNNEL, FunnelRenderer::new);
|
bind(FUNNEL, FunnelRenderer::new);
|
||||||
bind(BELT_TUNNEL, BeltTunnelRenderer::new);
|
bind(ANDESITE_TUNNEL, BeltTunnelRenderer::new);
|
||||||
|
bind(BRASS_TUNNEL, BeltTunnelRenderer::new);
|
||||||
bind(MECHANICAL_ARM, ArmRenderer::new);
|
bind(MECHANICAL_ARM, ArmRenderer::new);
|
||||||
bind(BELT_OBSERVER, BeltObserverRenderer::new);
|
bind(BELT_OBSERVER, BeltObserverRenderer::new);
|
||||||
bind(ADJUSTABLE_REPEATER, AdjustableRepeaterRenderer::new);
|
bind(ADJUSTABLE_REPEATER, AdjustableRepeaterRenderer::new);
|
||||||
|
@ -6,6 +6,8 @@ import com.simibubi.create.content.contraptions.relays.belt.BeltHelper;
|
|||||||
import com.simibubi.create.content.contraptions.relays.belt.BeltTileEntity;
|
import com.simibubi.create.content.contraptions.relays.belt.BeltTileEntity;
|
||||||
import com.simibubi.create.content.logistics.block.belts.tunnel.BeltTunnelBlock;
|
import com.simibubi.create.content.logistics.block.belts.tunnel.BeltTunnelBlock;
|
||||||
import com.simibubi.create.content.logistics.block.belts.tunnel.BeltTunnelTileEntity;
|
import com.simibubi.create.content.logistics.block.belts.tunnel.BeltTunnelTileEntity;
|
||||||
|
import com.simibubi.create.content.logistics.block.belts.tunnel.BrassTunnelBlock;
|
||||||
|
import com.simibubi.create.content.logistics.block.belts.tunnel.BrassTunnelTileEntity;
|
||||||
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
@ -45,16 +47,14 @@ public class BeltTunnelInteractionHandler {
|
|||||||
.up();
|
.up();
|
||||||
if (!(belt.getWorld()
|
if (!(belt.getWorld()
|
||||||
.getBlockState(pos)
|
.getBlockState(pos)
|
||||||
.getBlock() instanceof BeltTunnelBlock))
|
.getBlock() instanceof BrassTunnelBlock))
|
||||||
return false;
|
return false;
|
||||||
TileEntity te = belt.getWorld()
|
TileEntity te = belt.getWorld()
|
||||||
.getTileEntity(pos);
|
.getTileEntity(pos);
|
||||||
if (te == null || !(te instanceof BeltTunnelTileEntity))
|
if (te == null || !(te instanceof BrassTunnelTileEntity))
|
||||||
return false;
|
|
||||||
|
|
||||||
// TODO: ask TE if item can be inserted
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
BrassTunnelTileEntity tunnel = (BrassTunnelTileEntity) te;
|
||||||
|
return !tunnel.canInsert(movementDirection.getOpposite(), stack);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void flapTunnel(BeltInventory beltInventory, int offset, Direction side, boolean inward) {
|
public static void flapTunnel(BeltInventory beltInventory, int offset, Direction side, boolean inward) {
|
||||||
|
@ -63,7 +63,7 @@ public class BeltTunnelBlock extends Block implements ITE<BeltTunnelTileEntity>,
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TileEntity createTileEntity(BlockState state, IBlockReader world) {
|
public TileEntity createTileEntity(BlockState state, IBlockReader world) {
|
||||||
return AllTileEntities.BELT_TUNNEL.create();
|
return AllTileEntities.ANDESITE_TUNNEL.create();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -99,14 +99,20 @@ public class BeltTunnelBlock extends Block implements ITE<BeltTunnelTileEntity>,
|
|||||||
return getTunnelState(context.getWorld(), context.getPos());
|
return getTunnelState(context.getWorld(), context.getPos());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBlockAdded(BlockState state, World world, BlockPos pos, BlockState p_220082_4_, boolean p_220082_5_) {
|
||||||
|
if (!(world instanceof WrappedWorld) && !world.isRemote())
|
||||||
|
withTileEntityDo(world, pos, BeltTunnelTileEntity::updateTunnelConnections);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BlockState updatePostPlacement(BlockState state, Direction facing, BlockState facingState, IWorld worldIn,
|
public BlockState updatePostPlacement(BlockState state, Direction facing, BlockState facingState, IWorld worldIn,
|
||||||
BlockPos currentPos, BlockPos facingPos) {
|
BlockPos currentPos, BlockPos facingPos) {
|
||||||
if (facing.getAxis()
|
if (facing.getAxis()
|
||||||
.isVertical())
|
.isVertical())
|
||||||
return state;
|
return state;
|
||||||
if (!(worldIn instanceof WrappedWorld))
|
if (!(worldIn instanceof WrappedWorld) && !worldIn.isRemote())
|
||||||
withTileEntityDo(worldIn, currentPos, BeltTunnelTileEntity::initFlaps);
|
withTileEntityDo(worldIn, currentPos, BeltTunnelTileEntity::updateTunnelConnections);
|
||||||
BlockState tunnelState = getTunnelState(worldIn, currentPos);
|
BlockState tunnelState = getTunnelState(worldIn, currentPos);
|
||||||
if (tunnelState.get(HORIZONTAL_AXIS) == state.get(HORIZONTAL_AXIS)) {
|
if (tunnelState.get(HORIZONTAL_AXIS) == state.get(HORIZONTAL_AXIS)) {
|
||||||
if (hasWindow(tunnelState) == hasWindow(state))
|
if (hasWindow(tunnelState) == hasWindow(state))
|
||||||
@ -123,7 +129,7 @@ public class BeltTunnelBlock extends Block implements ITE<BeltTunnelTileEntity>,
|
|||||||
world.setBlockState(pos, newTunnel, 3);
|
world.setBlockState(pos, newTunnel, 3);
|
||||||
TileEntity te = world.getTileEntity(pos);
|
TileEntity te = world.getTileEntity(pos);
|
||||||
if (te != null && (te instanceof BeltTunnelTileEntity))
|
if (te != null && (te instanceof BeltTunnelTileEntity))
|
||||||
((BeltTunnelTileEntity) te).initFlaps();
|
((BeltTunnelTileEntity) te).updateTunnelConnections();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -158,13 +164,14 @@ public class BeltTunnelBlock extends Block implements ITE<BeltTunnelTileEntity>,
|
|||||||
Direction fw = Direction.getFacingFromAxis(AxisDirection.POSITIVE, axis);
|
Direction fw = Direction.getFacingFromAxis(AxisDirection.POSITIVE, axis);
|
||||||
BlockState blockState1 = reader.getBlockState(pos.offset(fw));
|
BlockState blockState1 = reader.getBlockState(pos.offset(fw));
|
||||||
BlockState blockState2 = reader.getBlockState(pos.offset(fw.getOpposite()));
|
BlockState blockState2 = reader.getBlockState(pos.offset(fw.getOpposite()));
|
||||||
boolean valid1 =
|
boolean funnel1 = blockState1.getBlock() instanceof BeltFunnelBlock
|
||||||
blockState1.getBlock() instanceof BeltTunnelBlock || blockState1.getBlock() instanceof BeltFunnelBlock
|
|
||||||
&& blockState1.get(BeltFunnelBlock.HORIZONTAL_FACING) == fw.getOpposite();
|
&& blockState1.get(BeltFunnelBlock.HORIZONTAL_FACING) == fw.getOpposite();
|
||||||
boolean valid2 =
|
boolean funnel2 = blockState2.getBlock() instanceof BeltFunnelBlock
|
||||||
blockState2.getBlock() instanceof BeltTunnelBlock || blockState2.getBlock() instanceof BeltFunnelBlock
|
|
||||||
&& blockState2.get(BeltFunnelBlock.HORIZONTAL_FACING) == fw;
|
&& blockState2.get(BeltFunnelBlock.HORIZONTAL_FACING) == fw;
|
||||||
if (valid1 && valid2)
|
boolean valid1 = blockState1.getBlock() instanceof BeltTunnelBlock || funnel1;
|
||||||
|
boolean valid2 = blockState2.getBlock() instanceof BeltTunnelBlock || funnel2;
|
||||||
|
|
||||||
|
if (valid1 && valid2 && !(funnel1 && funnel2))
|
||||||
state = state.with(SHAPE, Shape.WINDOW);
|
state = state.with(SHAPE, Shape.WINDOW);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -173,10 +180,10 @@ public class BeltTunnelBlock extends Block implements ITE<BeltTunnelTileEntity>,
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ActionResultType onWrenched(BlockState state, ItemUseContext context) {
|
public ActionResultType onWrenched(BlockState state, ItemUseContext context) {
|
||||||
|
if (!hasWindow(state))
|
||||||
|
return ActionResultType.PASS;
|
||||||
|
|
||||||
// Toggle windows
|
// Toggle windows
|
||||||
if (!hasWindow(state))
|
|
||||||
return IWrenchable.super.onWrenched(state, context);
|
|
||||||
Shape next = state.get(SHAPE);
|
Shape next = state.get(SHAPE);
|
||||||
switch (state.get(SHAPE)) {
|
switch (state.get(SHAPE)) {
|
||||||
case FULLSHADE:
|
case FULLSHADE:
|
||||||
|
@ -3,7 +3,7 @@ package com.simibubi.create.content.logistics.block.belts.tunnel;
|
|||||||
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.foundation.tileEntity.renderer.SafeTileEntityRenderer;
|
import com.simibubi.create.foundation.tileEntity.renderer.SmartTileEntityRenderer;
|
||||||
import com.simibubi.create.foundation.utility.SuperByteBuffer;
|
import com.simibubi.create.foundation.utility.SuperByteBuffer;
|
||||||
|
|
||||||
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
||||||
@ -16,7 +16,7 @@ import net.minecraft.util.math.BlockPos;
|
|||||||
import net.minecraft.util.math.MathHelper;
|
import net.minecraft.util.math.MathHelper;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
public class BeltTunnelRenderer extends SafeTileEntityRenderer<BeltTunnelTileEntity> {
|
public class BeltTunnelRenderer extends SmartTileEntityRenderer<BeltTunnelTileEntity> {
|
||||||
|
|
||||||
public BeltTunnelRenderer(TileEntityRendererDispatcher dispatcher) {
|
public BeltTunnelRenderer(TileEntityRendererDispatcher dispatcher) {
|
||||||
super(dispatcher);
|
super(dispatcher);
|
||||||
@ -25,6 +25,7 @@ public class BeltTunnelRenderer extends SafeTileEntityRenderer<BeltTunnelTileEnt
|
|||||||
@Override
|
@Override
|
||||||
protected void renderSafe(BeltTunnelTileEntity te, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffer,
|
protected void renderSafe(BeltTunnelTileEntity te, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffer,
|
||||||
int light, int overlay) {
|
int light, int overlay) {
|
||||||
|
super.renderSafe(te, partialTicks, ms, buffer, light, overlay);
|
||||||
SuperByteBuffer flapBuffer = AllBlockPartials.BELT_TUNNEL_FLAP.renderOn(te.getBlockState());
|
SuperByteBuffer flapBuffer = AllBlockPartials.BELT_TUNNEL_FLAP.renderOn(te.getBlockState());
|
||||||
BlockPos pos = te.getPos();
|
BlockPos pos = te.getPos();
|
||||||
World world = te.getWorld();
|
World world = te.getWorld();
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
package com.simibubi.create.content.logistics.block.belts.tunnel;
|
package com.simibubi.create.content.logistics.block.belts.tunnel;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.HashSet;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
import org.apache.commons.lang3.tuple.Pair;
|
import org.apache.commons.lang3.tuple.Pair;
|
||||||
|
|
||||||
@ -11,10 +13,12 @@ import com.simibubi.create.content.logistics.block.belts.tunnel.BeltTunnelBlock.
|
|||||||
import com.simibubi.create.foundation.gui.widgets.InterpolatedChasingValue;
|
import com.simibubi.create.foundation.gui.widgets.InterpolatedChasingValue;
|
||||||
import com.simibubi.create.foundation.tileEntity.SmartTileEntity;
|
import com.simibubi.create.foundation.tileEntity.SmartTileEntity;
|
||||||
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
|
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
|
||||||
|
import com.simibubi.create.foundation.utility.Iterate;
|
||||||
|
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.nbt.CompoundNBT;
|
import net.minecraft.nbt.CompoundNBT;
|
||||||
import net.minecraft.nbt.INBT;
|
import net.minecraft.nbt.INBT;
|
||||||
|
import net.minecraft.nbt.IntNBT;
|
||||||
import net.minecraft.nbt.ListNBT;
|
import net.minecraft.nbt.ListNBT;
|
||||||
import net.minecraft.state.properties.BlockStateProperties;
|
import net.minecraft.state.properties.BlockStateProperties;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
@ -31,8 +35,8 @@ import net.minecraftforge.items.IItemHandler;
|
|||||||
public class BeltTunnelTileEntity extends SmartTileEntity {
|
public class BeltTunnelTileEntity extends SmartTileEntity {
|
||||||
|
|
||||||
public HashMap<Direction, InterpolatedChasingValue> flaps;
|
public HashMap<Direction, InterpolatedChasingValue> flaps;
|
||||||
private LazyOptional<IItemHandler> cap = LazyOptional.empty();
|
protected LazyOptional<IItemHandler> cap = LazyOptional.empty();
|
||||||
private List<Pair<Direction, Boolean>> flapsToSend;
|
protected List<Pair<Direction, Boolean>> flapsToSend;
|
||||||
|
|
||||||
public BeltTunnelTileEntity(TileEntityType<? extends BeltTunnelTileEntity> type) {
|
public BeltTunnelTileEntity(TileEntityType<? extends BeltTunnelTileEntity> type) {
|
||||||
super(type);
|
super(type);
|
||||||
@ -48,11 +52,29 @@ public class BeltTunnelTileEntity extends SmartTileEntity {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CompoundNBT write(CompoundNBT compound) {
|
public CompoundNBT write(CompoundNBT compound) {
|
||||||
|
ListNBT flapsNBT = new ListNBT();
|
||||||
|
for (Direction direction : flaps.keySet())
|
||||||
|
flapsNBT.add(IntNBT.of(direction.getIndex()));
|
||||||
|
compound.put("Flaps", flapsNBT);
|
||||||
return super.write(compound);
|
return super.write(compound);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void read(CompoundNBT compound) {
|
public void read(CompoundNBT compound) {
|
||||||
|
Set<Direction> newFlaps = new HashSet<>(6);
|
||||||
|
ListNBT flapsNBT = compound.getList("Flaps", NBT.TAG_INT);
|
||||||
|
for (INBT inbt : flapsNBT)
|
||||||
|
if (inbt instanceof IntNBT)
|
||||||
|
newFlaps.add(Direction.byIndex(((IntNBT) inbt).getInt()));
|
||||||
|
|
||||||
|
for (Direction d : Iterate.directions)
|
||||||
|
if (!newFlaps.contains(d))
|
||||||
|
flaps.remove(d);
|
||||||
|
else if (!flaps.containsKey(d))
|
||||||
|
flaps.put(d, new InterpolatedChasingValue().start(.25f)
|
||||||
|
.target(0)
|
||||||
|
.withSpeed(.05f));
|
||||||
|
|
||||||
super.read(compound);
|
super.read(compound);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -68,7 +90,7 @@ public class BeltTunnelTileEntity extends SmartTileEntity {
|
|||||||
flap.putBoolean("FlapInward", pair.getValue());
|
flap.putBoolean("FlapInward", pair.getValue());
|
||||||
flapsNBT.add(flap);
|
flapsNBT.add(flap);
|
||||||
}
|
}
|
||||||
writeToClient.put("Flaps", flapsNBT);
|
writeToClient.put("TriggerFlaps", flapsNBT);
|
||||||
flapsToSend.clear();
|
flapsToSend.clear();
|
||||||
}
|
}
|
||||||
return writeToClient;
|
return writeToClient;
|
||||||
@ -77,21 +99,17 @@ public class BeltTunnelTileEntity extends SmartTileEntity {
|
|||||||
@Override
|
@Override
|
||||||
public void readClientUpdate(CompoundNBT tag) {
|
public void readClientUpdate(CompoundNBT tag) {
|
||||||
super.readClientUpdate(tag);
|
super.readClientUpdate(tag);
|
||||||
if (tag.contains("Flaps")) {
|
if (tag.contains("TriggerFlaps")) {
|
||||||
ListNBT flapsNBT = tag.getList("Flaps", NBT.TAG_COMPOUND);
|
ListNBT flapsNBT = tag.getList("TriggerFlaps", NBT.TAG_COMPOUND);
|
||||||
for (INBT inbt : flapsNBT) {
|
for (INBT inbt : flapsNBT) {
|
||||||
CompoundNBT flap = (CompoundNBT) inbt;
|
CompoundNBT flap = (CompoundNBT) inbt;
|
||||||
Direction side = Direction.byIndex(flap.getInt("Flap"));
|
Direction side = Direction.byIndex(flap.getInt("Flap"));
|
||||||
flap(side, flap.getBoolean("FlapInward"));
|
flap(side, flap.getBoolean("FlapInward"));
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
initFlaps();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void initFlaps() {
|
public void updateTunnelConnections() {
|
||||||
if (!world.isRemote)
|
|
||||||
sendData();
|
|
||||||
flaps.clear();
|
flaps.clear();
|
||||||
BlockState tunnelState = getBlockState();
|
BlockState tunnelState = getBlockState();
|
||||||
for (Direction direction : Direction.values()) {
|
for (Direction direction : Direction.values()) {
|
||||||
@ -116,6 +134,7 @@ public class BeltTunnelTileEntity extends SmartTileEntity {
|
|||||||
.target(0)
|
.target(0)
|
||||||
.withSpeed(.05f));
|
.withSpeed(.05f));
|
||||||
}
|
}
|
||||||
|
sendData();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void flap(Direction side, boolean inward) {
|
public void flap(Direction side, boolean inward) {
|
||||||
@ -132,7 +151,7 @@ public class BeltTunnelTileEntity extends SmartTileEntity {
|
|||||||
@Override
|
@Override
|
||||||
public void initialize() {
|
public void initialize() {
|
||||||
super.initialize();
|
super.initialize();
|
||||||
initFlaps();
|
// updateTunnelConnections();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -0,0 +1,42 @@
|
|||||||
|
package com.simibubi.create.content.logistics.block.belts.tunnel;
|
||||||
|
|
||||||
|
import com.simibubi.create.AllTileEntities;
|
||||||
|
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
|
||||||
|
import com.simibubi.create.foundation.tileEntity.behaviour.filtering.FilteringBehaviour;
|
||||||
|
|
||||||
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.util.Direction;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.world.IBlockReader;
|
||||||
|
import net.minecraft.world.IWorld;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class BrassTunnelBlock extends BeltTunnelBlock {
|
||||||
|
|
||||||
|
public BrassTunnelBlock(Properties properties) {
|
||||||
|
super(properties);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TileEntity createTileEntity(BlockState state, IBlockReader world) {
|
||||||
|
return AllTileEntities.BRASS_TUNNEL.create();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BlockState updatePostPlacement(BlockState state, Direction facing, BlockState facingState, IWorld worldIn,
|
||||||
|
BlockPos currentPos, BlockPos facingPos) {
|
||||||
|
return super.updatePostPlacement(state, facing, facingState, worldIn, currentPos, facingPos);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onReplaced(BlockState p_196243_1_, World p_196243_2_, BlockPos p_196243_3_, BlockState p_196243_4_,
|
||||||
|
boolean p_196243_5_) {
|
||||||
|
if (p_196243_1_.hasTileEntity()
|
||||||
|
&& (p_196243_1_.getBlock() != p_196243_4_.getBlock() || !p_196243_4_.hasTileEntity())) {
|
||||||
|
TileEntityBehaviour.destroy(p_196243_2_, p_196243_3_, FilteringBehaviour.TYPE);
|
||||||
|
p_196243_2_.removeTileEntity(p_196243_3_);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,56 @@
|
|||||||
|
package com.simibubi.create.content.logistics.block.belts.tunnel;
|
||||||
|
|
||||||
|
import com.simibubi.create.AllSpriteShifts;
|
||||||
|
import com.simibubi.create.foundation.block.connected.CTSpriteShiftEntry;
|
||||||
|
import com.simibubi.create.foundation.block.connected.ConnectedTextureBehaviour;
|
||||||
|
|
||||||
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.util.Direction;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.world.ILightReader;
|
||||||
|
|
||||||
|
public class BrassTunnelCTBehaviour extends ConnectedTextureBehaviour {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CTSpriteShiftEntry get(BlockState state, Direction direction) {
|
||||||
|
return direction == Direction.UP ? AllSpriteShifts.BRASS_TUNNEL_TOP : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean connectsTo(BlockState state, BlockState other, ILightReader reader, BlockPos pos, BlockPos otherPos,
|
||||||
|
Direction face) {
|
||||||
|
int yDiff = otherPos.getY() - pos.getY();
|
||||||
|
int zDiff = otherPos.getZ() - pos.getZ();
|
||||||
|
if (yDiff != 0)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
TileEntity te = reader.getTileEntity(pos);
|
||||||
|
if (!(te instanceof BrassTunnelTileEntity))
|
||||||
|
return false;
|
||||||
|
BrassTunnelTileEntity tunnelTE = (BrassTunnelTileEntity) te;
|
||||||
|
boolean leftSide = zDiff > 0;
|
||||||
|
return tunnelTE.isConnected(leftSide);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CTContext buildContext(ILightReader reader, BlockPos pos, BlockState state, Direction face) {
|
||||||
|
return super.buildContext(reader, pos, state, face);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean reverseUVs(BlockState state, Direction face) {
|
||||||
|
return super.reverseUVs(state, face);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean reverseUVsHorizontally(BlockState state, Direction face) {
|
||||||
|
return super.reverseUVsHorizontally(state, face);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean reverseUVsVertically(BlockState state, Direction face) {
|
||||||
|
return super.reverseUVsVertically(state, face);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
package com.simibubi.create.content.logistics.block.belts.tunnel;
|
||||||
|
|
||||||
|
import com.simibubi.create.foundation.tileEntity.behaviour.ValueBoxTransform;
|
||||||
|
import com.simibubi.create.foundation.utility.VecHelper;
|
||||||
|
|
||||||
|
import net.minecraft.util.math.Vec3d;
|
||||||
|
|
||||||
|
public class BrassTunnelFilterSlot extends ValueBoxTransform.Sided {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Vec3d getSouthLocation() {
|
||||||
|
return VecHelper.voxelSpace(8, 12, 15.5f);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,201 @@
|
|||||||
|
package com.simibubi.create.content.logistics.block.belts.tunnel;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.tuple.Pair;
|
||||||
|
|
||||||
|
import com.simibubi.create.AllBlocks;
|
||||||
|
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
|
||||||
|
import com.simibubi.create.foundation.tileEntity.behaviour.filtering.FilteringBehaviour;
|
||||||
|
import com.simibubi.create.foundation.tileEntity.behaviour.filtering.SidedFilteringBehaviour;
|
||||||
|
import com.simibubi.create.foundation.utility.NBTHelper;
|
||||||
|
|
||||||
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.nbt.CompoundNBT;
|
||||||
|
import net.minecraft.nbt.NBTUtil;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.tileentity.TileEntityType;
|
||||||
|
import net.minecraft.util.Direction;
|
||||||
|
import net.minecraft.util.Direction.Axis;
|
||||||
|
import net.minecraft.util.Direction.AxisDirection;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraftforge.common.util.Constants.NBT;
|
||||||
|
|
||||||
|
public class BrassTunnelTileEntity extends BeltTunnelTileEntity {
|
||||||
|
|
||||||
|
SidedFilteringBehaviour filtering;
|
||||||
|
|
||||||
|
boolean connectedLeft;
|
||||||
|
boolean connectedRight;
|
||||||
|
|
||||||
|
ItemStack stackToDistribute;
|
||||||
|
float distributionProgress;
|
||||||
|
List<Pair<BlockPos, Direction>> distributionTargets;
|
||||||
|
int distributionDistanceLeft;
|
||||||
|
int distributionDistanceRight;
|
||||||
|
|
||||||
|
public BrassTunnelTileEntity(TileEntityType<? extends BeltTunnelTileEntity> type) {
|
||||||
|
super(type);
|
||||||
|
distributionTargets = new ArrayList<>();
|
||||||
|
stackToDistribute = ItemStack.EMPTY;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void initialize() {
|
||||||
|
if (filtering == null) {
|
||||||
|
filtering = createSidedFilter();
|
||||||
|
putBehaviour(filtering);
|
||||||
|
}
|
||||||
|
super.initialize();
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean canInsert(Direction side, ItemStack stack) {
|
||||||
|
if (filtering != null && !filtering.test(side, stack))
|
||||||
|
return false;
|
||||||
|
if (!connectedLeft && !connectedRight)
|
||||||
|
return true;
|
||||||
|
if (!stackToDistribute.isEmpty())
|
||||||
|
return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addBehavioursDeferred(List<TileEntityBehaviour> behaviours) {
|
||||||
|
super.addBehavioursDeferred(behaviours);
|
||||||
|
filtering = createSidedFilter();
|
||||||
|
behaviours.add(filtering);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected SidedFilteringBehaviour createSidedFilter() {
|
||||||
|
return new SidedFilteringBehaviour(this, new BrassTunnelFilterSlot(), this::makeFilter,
|
||||||
|
this::isValidFaceForFilter);
|
||||||
|
}
|
||||||
|
|
||||||
|
private FilteringBehaviour makeFilter(Direction side, FilteringBehaviour filter) {
|
||||||
|
return filter;
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isValidFaceForFilter(Direction side) {
|
||||||
|
return flaps.containsKey(side);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CompoundNBT write(CompoundNBT compound) {
|
||||||
|
compound.putBoolean("ConnectedLeft", connectedLeft);
|
||||||
|
compound.putBoolean("ConnectedRight", connectedRight);
|
||||||
|
|
||||||
|
compound.put("StackToDistribute", stackToDistribute.serializeNBT());
|
||||||
|
compound.putFloat("DistributionProgress", distributionProgress);
|
||||||
|
compound.putInt("DistanceLeft", distributionDistanceLeft);
|
||||||
|
compound.putInt("DistanceRight", distributionDistanceRight);
|
||||||
|
compound.put("Targets", NBTHelper.writeCompoundList(distributionTargets, pair -> {
|
||||||
|
CompoundNBT nbt = new CompoundNBT();
|
||||||
|
nbt.put("Pos", NBTUtil.writeBlockPos(pair.getKey()));
|
||||||
|
nbt.putInt("Face", pair.getValue()
|
||||||
|
.getIndex());
|
||||||
|
return nbt;
|
||||||
|
}));
|
||||||
|
|
||||||
|
return super.write(compound);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void read(CompoundNBT compound) {
|
||||||
|
connectedLeft = compound.getBoolean("ConnectedLeft");
|
||||||
|
connectedRight = compound.getBoolean("ConnectedRight");
|
||||||
|
|
||||||
|
stackToDistribute = ItemStack.read(compound.getCompound("StackToDistribute"));
|
||||||
|
distributionProgress = compound.getFloat("DistributionProgress");
|
||||||
|
distributionDistanceLeft = compound.getInt("DistanceLeft");
|
||||||
|
distributionDistanceRight = compound.getInt("DistanceRight");
|
||||||
|
distributionTargets = NBTHelper.readCompoundList(compound.getList("Targets", NBT.TAG_COMPOUND), nbt -> {
|
||||||
|
BlockPos pos = NBTUtil.readBlockPos(nbt.getCompound("Pos"));
|
||||||
|
Direction face = Direction.byIndex(nbt.getInt("Face"));
|
||||||
|
return Pair.of(pos, face);
|
||||||
|
});
|
||||||
|
|
||||||
|
super.read(compound);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void readClientUpdate(CompoundNBT tag) {
|
||||||
|
boolean wasConnectedLeft = connectedLeft;
|
||||||
|
boolean wasConnectedRight = connectedRight;
|
||||||
|
super.readClientUpdate(tag);
|
||||||
|
if (wasConnectedLeft != connectedLeft || wasConnectedRight != connectedRight) {
|
||||||
|
requestModelDataUpdate();
|
||||||
|
if (hasWorld())
|
||||||
|
world.notifyBlockUpdate(getPos(), getBlockState(), getBlockState(), 16);
|
||||||
|
}
|
||||||
|
filtering.updateFilterPresence();
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isConnected(boolean leftSide) {
|
||||||
|
return leftSide ? connectedLeft : connectedRight;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateTunnelConnections() {
|
||||||
|
super.updateTunnelConnections();
|
||||||
|
boolean connectivityChanged = false;
|
||||||
|
boolean nowConnectedLeft = determineIfConnected(true);
|
||||||
|
boolean nowConnectedRight = determineIfConnected(false);
|
||||||
|
|
||||||
|
if (connectedLeft != nowConnectedLeft) {
|
||||||
|
connectedLeft = nowConnectedLeft;
|
||||||
|
connectivityChanged = true;
|
||||||
|
BrassTunnelTileEntity adjacent = getAdjacent(true);
|
||||||
|
if (adjacent != null && !world.isRemote)
|
||||||
|
adjacent.updateTunnelConnections();
|
||||||
|
}
|
||||||
|
if (connectedRight != nowConnectedRight) {
|
||||||
|
connectedRight = nowConnectedRight;
|
||||||
|
connectivityChanged = true;
|
||||||
|
BrassTunnelTileEntity adjacent = getAdjacent(false);
|
||||||
|
if (adjacent != null && !world.isRemote)
|
||||||
|
adjacent.updateTunnelConnections();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (filtering != null)
|
||||||
|
filtering.updateFilterPresence();
|
||||||
|
if (connectivityChanged)
|
||||||
|
sendData();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected boolean determineIfConnected(boolean leftSide) {
|
||||||
|
if (flaps.isEmpty())
|
||||||
|
return false;
|
||||||
|
BrassTunnelTileEntity adjacentTunnelTE = getAdjacent(leftSide);
|
||||||
|
return adjacentTunnelTE != null && !adjacentTunnelTE.flaps.isEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
protected BrassTunnelTileEntity getAdjacent(boolean leftSide) {
|
||||||
|
if (!hasWorld())
|
||||||
|
return null;
|
||||||
|
|
||||||
|
BlockState blockState = getBlockState();
|
||||||
|
if (!AllBlocks.BRASS_TUNNEL.has(blockState))
|
||||||
|
return null;
|
||||||
|
|
||||||
|
Axis axis = blockState.get(BrassTunnelBlock.HORIZONTAL_AXIS);
|
||||||
|
Direction baseDirection = Direction.getFacingFromAxis(AxisDirection.POSITIVE, axis);
|
||||||
|
Direction direction = leftSide ? baseDirection.rotateYCCW() : baseDirection.rotateY();
|
||||||
|
|
||||||
|
BlockPos adjacentPos = pos.offset(direction);
|
||||||
|
BlockState adjacentBlockState = world.getBlockState(adjacentPos);
|
||||||
|
if (!AllBlocks.BRASS_TUNNEL.has(adjacentBlockState))
|
||||||
|
return null;
|
||||||
|
if (adjacentBlockState.get(BrassTunnelBlock.HORIZONTAL_AXIS) != axis)
|
||||||
|
return null;
|
||||||
|
TileEntity adjacentTE = world.getTileEntity(adjacentPos);
|
||||||
|
if (!(adjacentTE instanceof BrassTunnelTileEntity))
|
||||||
|
return null;
|
||||||
|
return (BrassTunnelTileEntity) adjacentTE;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -188,6 +188,7 @@ public abstract class FunnelBlock extends ProperDirectionalBlock implements ITE<
|
|||||||
boolean p_196243_5_) {
|
boolean p_196243_5_) {
|
||||||
if (p_196243_1_.hasTileEntity() && (p_196243_1_.getBlock() != p_196243_4_.getBlock() && !isFunnel(p_196243_4_)
|
if (p_196243_1_.hasTileEntity() && (p_196243_1_.getBlock() != p_196243_4_.getBlock() && !isFunnel(p_196243_4_)
|
||||||
|| !p_196243_4_.hasTileEntity())) {
|
|| !p_196243_4_.hasTileEntity())) {
|
||||||
|
TileEntityBehaviour.destroy(p_196243_2_, p_196243_3_, FilteringBehaviour.TYPE);
|
||||||
p_196243_2_.removeTileEntity(p_196243_3_);
|
p_196243_2_.removeTileEntity(p_196243_3_);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@ import net.minecraft.world.ILightReader;
|
|||||||
|
|
||||||
public abstract class ConnectedTextureBehaviour {
|
public abstract class ConnectedTextureBehaviour {
|
||||||
|
|
||||||
class CTContext {
|
public class CTContext {
|
||||||
boolean up, down, left, right;
|
boolean up, down, left, right;
|
||||||
boolean topLeft, topRight, bottomLeft, bottomRight;
|
boolean topLeft, topRight, bottomLeft, bottomRight;
|
||||||
}
|
}
|
||||||
@ -47,7 +47,7 @@ public abstract class ConnectedTextureBehaviour {
|
|||||||
return state.getBlock() == other.getBlock();
|
return state.getBlock() == other.getBlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
CTContext buildContext(ILightReader reader, BlockPos pos, BlockState state, Direction face) {
|
public CTContext buildContext(ILightReader reader, BlockPos pos, BlockState state, Direction face) {
|
||||||
CTContext context = new CTContext();
|
CTContext context = new CTContext();
|
||||||
CTSpriteShiftEntry textureEntry = get(state, face);
|
CTSpriteShiftEntry textureEntry = get(state, face);
|
||||||
|
|
||||||
|
@ -92,6 +92,7 @@ public class BuilderTransformers {
|
|||||||
.modelFile(p.models()
|
.modelFile(p.models()
|
||||||
.withExistingParent(id + "/" + shapeName, p.modLoc("block/belt_tunnel/" + shapeName))
|
.withExistingParent(id + "/" + shapeName, p.modLoc("block/belt_tunnel/" + shapeName))
|
||||||
.texture("0", p.modLoc(id))
|
.texture("0", p.modLoc(id))
|
||||||
|
.texture("1", p.modLoc(id + "_top"))
|
||||||
.texture("particle", particleTexture))
|
.texture("particle", particleTexture))
|
||||||
.rotationY(state.get(BeltTunnelBlock.HORIZONTAL_AXIS) == Axis.X ? 0 : 90)
|
.rotationY(state.get(BeltTunnelBlock.HORIZONTAL_AXIS) == Axis.X ? 0 : 90)
|
||||||
.build();
|
.build();
|
||||||
@ -101,6 +102,7 @@ public class BuilderTransformers {
|
|||||||
String id = type + "_tunnel";
|
String id = type + "_tunnel";
|
||||||
p.withExistingParent("item/" + id, p.modLoc("block/belt_tunnel/item"))
|
p.withExistingParent("item/" + id, p.modLoc("block/belt_tunnel/item"))
|
||||||
.texture("0", p.modLoc("block/" + id))
|
.texture("0", p.modLoc("block/" + id))
|
||||||
|
.texture("1", p.modLoc("block/" + id + "_top"))
|
||||||
.texture("particle", particleTexture);
|
.texture("particle", particleTexture);
|
||||||
})
|
})
|
||||||
.build();
|
.build();
|
||||||
|
@ -15,6 +15,7 @@ import net.minecraft.block.BlockState;
|
|||||||
import net.minecraft.entity.item.ItemEntity;
|
import net.minecraft.entity.item.ItemEntity;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.CompoundNBT;
|
import net.minecraft.nbt.CompoundNBT;
|
||||||
|
import net.minecraft.util.Direction;
|
||||||
import net.minecraft.util.math.Vec3d;
|
import net.minecraft.util.math.Vec3d;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
@ -125,6 +126,10 @@ public class FilteringBehaviour extends TileEntityBehaviour {
|
|||||||
scrollableValue = count;
|
scrollableValue = count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setFilter(Direction face, ItemStack stack) {
|
||||||
|
setFilter(stack);
|
||||||
|
}
|
||||||
|
|
||||||
public void setFilter(ItemStack stack) {
|
public void setFilter(ItemStack stack) {
|
||||||
filter = stack.copy();
|
filter = stack.copy();
|
||||||
callback.accept(filter);
|
callback.accept(filter);
|
||||||
@ -146,6 +151,10 @@ public class FilteringBehaviour extends TileEntityBehaviour {
|
|||||||
super.destroy();
|
super.destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ItemStack getFilter(Direction side) {
|
||||||
|
return getFilter();
|
||||||
|
}
|
||||||
|
|
||||||
public ItemStack getFilter() {
|
public ItemStack getFilter() {
|
||||||
return filter.copy();
|
return filter.copy();
|
||||||
}
|
}
|
||||||
|
@ -43,12 +43,17 @@ public class FilteringHandler {
|
|||||||
FilteringBehaviour behaviour = TileEntityBehaviour.get(world, pos, FilteringBehaviour.TYPE);
|
FilteringBehaviour behaviour = TileEntityBehaviour.get(world, pos, FilteringBehaviour.TYPE);
|
||||||
if (behaviour == null)
|
if (behaviour == null)
|
||||||
return;
|
return;
|
||||||
if (!behaviour.isActive())
|
|
||||||
return;
|
|
||||||
|
|
||||||
BlockRayTraceResult ray = RaycastHelper.rayTraceRange(world, player, 10);
|
BlockRayTraceResult ray = RaycastHelper.rayTraceRange(world, player, 10);
|
||||||
if (ray == null)
|
if (ray == null)
|
||||||
return;
|
return;
|
||||||
|
if (behaviour instanceof SidedFilteringBehaviour) {
|
||||||
|
behaviour = ((SidedFilteringBehaviour) behaviour).get(ray.getFace());
|
||||||
|
if (behaviour == null)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!behaviour.isActive())
|
||||||
|
return;
|
||||||
if (behaviour.slotPositioning instanceof ValueBoxTransform.Sided)
|
if (behaviour.slotPositioning instanceof ValueBoxTransform.Sided)
|
||||||
((Sided) behaviour.slotPositioning).fromSide(ray.getFace());
|
((Sided) behaviour.slotPositioning).fromSide(ray.getFace());
|
||||||
|
|
||||||
|
@ -40,11 +40,16 @@ public class FilteringRenderer {
|
|||||||
BlockState state = world.getBlockState(pos);
|
BlockState state = world.getBlockState(pos);
|
||||||
|
|
||||||
FilteringBehaviour behaviour = TileEntityBehaviour.get(world, pos, FilteringBehaviour.TYPE);
|
FilteringBehaviour behaviour = TileEntityBehaviour.get(world, pos, FilteringBehaviour.TYPE);
|
||||||
|
if (mc.player.isSneaking())
|
||||||
|
return;
|
||||||
if (behaviour == null)
|
if (behaviour == null)
|
||||||
return;
|
return;
|
||||||
if (!behaviour.isActive())
|
if (behaviour instanceof SidedFilteringBehaviour) {
|
||||||
|
behaviour = ((SidedFilteringBehaviour) behaviour).get(result.getFace());
|
||||||
|
if (behaviour == null)
|
||||||
return;
|
return;
|
||||||
if (mc.player.isSneaking())
|
}
|
||||||
|
if (!behaviour.isActive())
|
||||||
return;
|
return;
|
||||||
if (behaviour.slotPositioning instanceof ValueBoxTransform.Sided)
|
if (behaviour.slotPositioning instanceof ValueBoxTransform.Sided)
|
||||||
((Sided) behaviour.slotPositioning).fromSide(result.getFace());
|
((Sided) behaviour.slotPositioning).fromSide(result.getFace());
|
||||||
@ -86,7 +91,7 @@ public class FilteringRenderer {
|
|||||||
if (!behaviour.isActive())
|
if (!behaviour.isActive())
|
||||||
return;
|
return;
|
||||||
if (behaviour.getFilter()
|
if (behaviour.getFilter()
|
||||||
.isEmpty())
|
.isEmpty() && !(behaviour instanceof SidedFilteringBehaviour))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ValueBoxTransform slotPositioning = behaviour.slotPositioning;
|
ValueBoxTransform slotPositioning = behaviour.slotPositioning;
|
||||||
@ -96,13 +101,17 @@ public class FilteringRenderer {
|
|||||||
ValueBoxTransform.Sided sided = (ValueBoxTransform.Sided) slotPositioning;
|
ValueBoxTransform.Sided sided = (ValueBoxTransform.Sided) slotPositioning;
|
||||||
Direction side = sided.getSide();
|
Direction side = sided.getSide();
|
||||||
for (Direction d : Iterate.directions) {
|
for (Direction d : Iterate.directions) {
|
||||||
|
ItemStack filter = behaviour.getFilter(d);
|
||||||
|
if (filter.isEmpty())
|
||||||
|
continue;
|
||||||
|
|
||||||
sided.fromSide(d);
|
sided.fromSide(d);
|
||||||
if (!slotPositioning.shouldRender(blockState))
|
if (!slotPositioning.shouldRender(blockState))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
ms.push();
|
ms.push();
|
||||||
slotPositioning.transform(blockState, ms);
|
slotPositioning.transform(blockState, ms);
|
||||||
ValueBoxRenderer.renderItemIntoValueBox(behaviour.getFilter(), ms, buffer, light, overlay);
|
ValueBoxRenderer.renderItemIntoValueBox(filter, ms, buffer, light, overlay);
|
||||||
ms.pop();
|
ms.pop();
|
||||||
}
|
}
|
||||||
sided.fromSide(side);
|
sided.fromSide(side);
|
||||||
|
@ -0,0 +1,150 @@
|
|||||||
|
package com.simibubi.create.foundation.tileEntity.behaviour.filtering;
|
||||||
|
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.IdentityHashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.function.BiFunction;
|
||||||
|
import java.util.function.Predicate;
|
||||||
|
|
||||||
|
import com.simibubi.create.foundation.tileEntity.SmartTileEntity;
|
||||||
|
import com.simibubi.create.foundation.tileEntity.behaviour.ValueBoxTransform;
|
||||||
|
import com.simibubi.create.foundation.tileEntity.behaviour.ValueBoxTransform.Sided;
|
||||||
|
import com.simibubi.create.foundation.utility.Iterate;
|
||||||
|
import com.simibubi.create.foundation.utility.NBTHelper;
|
||||||
|
|
||||||
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.nbt.CompoundNBT;
|
||||||
|
import net.minecraft.util.Direction;
|
||||||
|
import net.minecraft.util.math.Vec3d;
|
||||||
|
import net.minecraftforge.common.util.Constants.NBT;
|
||||||
|
|
||||||
|
public class SidedFilteringBehaviour extends FilteringBehaviour {
|
||||||
|
|
||||||
|
Map<Direction, FilteringBehaviour> sidedFilters;
|
||||||
|
private BiFunction<Direction, FilteringBehaviour, FilteringBehaviour> filterFactory;
|
||||||
|
private Predicate<Direction> validDirections;
|
||||||
|
|
||||||
|
public SidedFilteringBehaviour(SmartTileEntity te, ValueBoxTransform.Sided sidedSlot,
|
||||||
|
BiFunction<Direction, FilteringBehaviour, FilteringBehaviour> filterFactory,
|
||||||
|
Predicate<Direction> validDirections) {
|
||||||
|
super(te, sidedSlot);
|
||||||
|
this.filterFactory = filterFactory;
|
||||||
|
this.validDirections = validDirections;
|
||||||
|
sidedFilters = new IdentityHashMap<>();
|
||||||
|
updateFilterPresence();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void initialize() {
|
||||||
|
super.initialize();
|
||||||
|
}
|
||||||
|
|
||||||
|
public FilteringBehaviour get(Direction side) {
|
||||||
|
return sidedFilters.get(side);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void updateFilterPresence() {
|
||||||
|
Set<Direction> valid = new HashSet<>();
|
||||||
|
for (Direction d : Iterate.directions)
|
||||||
|
if (validDirections.test(d))
|
||||||
|
valid.add(d);
|
||||||
|
for (Direction d : Iterate.directions)
|
||||||
|
if (valid.contains(d)) {
|
||||||
|
if (!sidedFilters.containsKey(d))
|
||||||
|
sidedFilters.put(d, filterFactory.apply(d, new FilteringBehaviour(tileEntity, slotPositioning)));
|
||||||
|
} else if (sidedFilters.containsKey(d))
|
||||||
|
removeFilter(d);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void writeNBT(CompoundNBT nbt) {
|
||||||
|
nbt.put("Filters", NBTHelper.writeCompoundList(sidedFilters.entrySet(), entry -> {
|
||||||
|
CompoundNBT compound = new CompoundNBT();
|
||||||
|
compound.putInt("Side", entry.getKey()
|
||||||
|
.getIndex());
|
||||||
|
entry.getValue()
|
||||||
|
.writeNBT(compound);
|
||||||
|
return compound;
|
||||||
|
}));
|
||||||
|
super.writeNBT(nbt);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void readNBT(CompoundNBT nbt) {
|
||||||
|
NBTHelper.iterateCompoundList(nbt.getList("Filters", NBT.TAG_COMPOUND), compound -> {
|
||||||
|
Direction face = Direction.byIndex(compound.getInt("Side"));
|
||||||
|
if (sidedFilters.containsKey(face))
|
||||||
|
sidedFilters.get(face)
|
||||||
|
.readNBT(compound);
|
||||||
|
});
|
||||||
|
super.readNBT(nbt);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CompoundNBT writeToClient(CompoundNBT nbt) {
|
||||||
|
nbt.put("Filters", NBTHelper.writeCompoundList(sidedFilters.entrySet(), entry -> {
|
||||||
|
CompoundNBT compound = new CompoundNBT();
|
||||||
|
compound.putInt("Side", entry.getKey()
|
||||||
|
.getIndex());
|
||||||
|
entry.getValue()
|
||||||
|
.writeToClient(compound);
|
||||||
|
return compound;
|
||||||
|
}));
|
||||||
|
return super.writeToClient(nbt);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void tick() {
|
||||||
|
super.tick();
|
||||||
|
sidedFilters.values()
|
||||||
|
.forEach(FilteringBehaviour::tick);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setFilter(Direction side, ItemStack stack) {
|
||||||
|
if (!sidedFilters.containsKey(side))
|
||||||
|
return;
|
||||||
|
sidedFilters.get(side)
|
||||||
|
.setFilter(stack);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ItemStack getFilter(Direction side) {
|
||||||
|
if (!sidedFilters.containsKey(side))
|
||||||
|
return ItemStack.EMPTY;
|
||||||
|
return sidedFilters.get(side)
|
||||||
|
.getFilter();
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean test(Direction side, ItemStack stack) {
|
||||||
|
if (!sidedFilters.containsKey(side))
|
||||||
|
return true;
|
||||||
|
return sidedFilters.get(side)
|
||||||
|
.test(stack);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void destroy() {
|
||||||
|
sidedFilters.values()
|
||||||
|
.forEach(FilteringBehaviour::destroy);
|
||||||
|
super.destroy();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void removeFilter(Direction side) {
|
||||||
|
if (!sidedFilters.containsKey(side))
|
||||||
|
return;
|
||||||
|
sidedFilters.remove(side)
|
||||||
|
.destroy();
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean testHit(Direction direction, Vec3d hit) {
|
||||||
|
ValueBoxTransform.Sided sidedPositioning = (Sided) slotPositioning;
|
||||||
|
BlockState state = tileEntity.getBlockState();
|
||||||
|
Vec3d localHit = hit.subtract(new Vec3d(tileEntity.getPos()));
|
||||||
|
return sidedPositioning.fromSide(direction)
|
||||||
|
.testHit(state, localHit);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -2,6 +2,7 @@ package com.simibubi.create.foundation.utility;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.function.Consumer;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
@ -28,7 +29,7 @@ public class NBTHelper {
|
|||||||
nbt.putString(key, enumConstant.name());
|
nbt.putString(key, enumConstant.name());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static <T> ListNBT writeCompoundList(List<T> list, Function<T, CompoundNBT> serializer) {
|
public static <T> ListNBT writeCompoundList(Iterable<T> list, Function<T, CompoundNBT> serializer) {
|
||||||
ListNBT listNBT = new ListNBT();
|
ListNBT listNBT = new ListNBT();
|
||||||
list.forEach(t -> listNBT.add(serializer.apply(t)));
|
list.forEach(t -> listNBT.add(serializer.apply(t)));
|
||||||
return listNBT;
|
return listNBT;
|
||||||
@ -40,6 +41,10 @@ public class NBTHelper {
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static <T> void iterateCompoundList(ListNBT listNBT, Consumer<CompoundNBT> consumer) {
|
||||||
|
listNBT.forEach(inbt -> consumer.accept((CompoundNBT) inbt));
|
||||||
|
}
|
||||||
|
|
||||||
public static ListNBT writeItemList(List<ItemStack> stacks) {
|
public static ListNBT writeItemList(List<ItemStack> stacks) {
|
||||||
return writeCompoundList(stacks, ItemStack::serializeNBT);
|
return writeCompoundList(stacks, ItemStack::serializeNBT);
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
"parent": "block/block",
|
"parent": "block/block",
|
||||||
"textures": {
|
"textures": {
|
||||||
"0": "create:block/brass_tunnel",
|
"0": "create:block/brass_tunnel",
|
||||||
|
"1": "create:block/brass_tunnel_top",
|
||||||
"particle": "create:block/brass_tunnel"
|
"particle": "create:block/brass_tunnel"
|
||||||
},
|
},
|
||||||
"elements": [
|
"elements": [
|
||||||
@ -16,7 +17,7 @@
|
|||||||
"east": {"uv": [3.5, 4, 4, 6], "texture": "#0"},
|
"east": {"uv": [3.5, 4, 4, 6], "texture": "#0"},
|
||||||
"south": {"uv": [0.5, 6, 3.5, 8], "texture": "#0"},
|
"south": {"uv": [0.5, 6, 3.5, 8], "texture": "#0"},
|
||||||
"west": {"uv": [0, 4, 0.5, 6], "texture": "#0"},
|
"west": {"uv": [0, 4, 0.5, 6], "texture": "#0"},
|
||||||
"up": {"uv": [0.5, 3.5, 3.5, 4], "rotation": 180, "texture": "#0"},
|
"up": {"uv": [2, 14, 14, 16], "rotation": 180, "texture": "#1"},
|
||||||
"down": {"uv": [0.75, 4, 3.5, 4.5], "texture": "#0"}
|
"down": {"uv": [0.75, 4, 3.5, 4.5], "texture": "#0"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -26,8 +27,8 @@
|
|||||||
"to": [14, 16, 14],
|
"to": [14, 16, 14],
|
||||||
"rotation": {"angle": 0, "axis": "y", "origin": [7, -24, 8]},
|
"rotation": {"angle": 0, "axis": "y", "origin": [7, -24, 8]},
|
||||||
"faces": {
|
"faces": {
|
||||||
"up": {"uv": [0.5, 0.5, 3.5, 3.5], "rotation": 180, "texture": "#0"},
|
"up": {"uv": [2, 2, 14, 14], "rotation": 180, "texture": "#1"},
|
||||||
"down": {"uv": [0.5, 0.5, 3.5, 3.5], "rotation": 270, "texture": "#0"}
|
"down": {"uv": [2, 2, 14, 14], "rotation": 270, "texture": "#1"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -40,7 +41,7 @@
|
|||||||
"east": {"uv": [0, 4, 0.5, 8.75], "texture": "#0"},
|
"east": {"uv": [0, 4, 0.5, 8.75], "texture": "#0"},
|
||||||
"south": {"uv": [0, 4, 0.5, 8.75], "texture": "#0"},
|
"south": {"uv": [0, 4, 0.5, 8.75], "texture": "#0"},
|
||||||
"west": {"uv": [3.5, 4, 4, 8.75], "texture": "#0"},
|
"west": {"uv": [3.5, 4, 4, 8.75], "texture": "#0"},
|
||||||
"up": {"uv": [0, 3.5, 0.5, 4], "texture": "#0"}
|
"up": {"uv": [14, 0, 16, 2], "rotation": 180, "texture": "#1"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -53,7 +54,7 @@
|
|||||||
"east": {"uv": [3.5, 4, 4, 8.75], "texture": "#0"},
|
"east": {"uv": [3.5, 4, 4, 8.75], "texture": "#0"},
|
||||||
"south": {"uv": [0, 4, 0.5, 8.75], "texture": "#0"},
|
"south": {"uv": [0, 4, 0.5, 8.75], "texture": "#0"},
|
||||||
"west": {"uv": [0, 4, 0.5, 8.75], "texture": "#0"},
|
"west": {"uv": [0, 4, 0.5, 8.75], "texture": "#0"},
|
||||||
"up": {"uv": [0, 3.5, 0.5, 4], "texture": "#0"}
|
"up": {"uv": [14, 14, 16, 16], "rotation": 180, "texture": "#1"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -66,7 +67,7 @@
|
|||||||
"east": {"uv": [0, 4, 0.5, 8.75], "texture": "#0"},
|
"east": {"uv": [0, 4, 0.5, 8.75], "texture": "#0"},
|
||||||
"south": {"uv": [3.5, 4, 4, 8.75], "texture": "#0"},
|
"south": {"uv": [3.5, 4, 4, 8.75], "texture": "#0"},
|
||||||
"west": {"uv": [3.5, 4, 4, 8.75], "texture": "#0"},
|
"west": {"uv": [3.5, 4, 4, 8.75], "texture": "#0"},
|
||||||
"up": {"uv": [3.5, 3.5, 4, 4], "texture": "#0"}
|
"up": {"uv": [0, 0, 2, 2], "rotation": 180, "texture": "#1"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -79,7 +80,7 @@
|
|||||||
"east": {"uv": [3.5, 4, 4, 8.75], "texture": "#0"},
|
"east": {"uv": [3.5, 4, 4, 8.75], "texture": "#0"},
|
||||||
"south": {"uv": [3.5, 4, 4, 8.75], "texture": "#0"},
|
"south": {"uv": [3.5, 4, 4, 8.75], "texture": "#0"},
|
||||||
"west": {"uv": [0, 4, 0.5, 8.75], "texture": "#0"},
|
"west": {"uv": [0, 4, 0.5, 8.75], "texture": "#0"},
|
||||||
"up": {"uv": [3.5, 3.5, 4, 4], "texture": "#0"}
|
"up": {"uv": [0, 14, 2, 16], "rotation": 180, "texture": "#1"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -138,7 +139,7 @@
|
|||||||
"faces": {
|
"faces": {
|
||||||
"east": {"uv": [0.5, 6, 3.5, 8], "texture": "#0"},
|
"east": {"uv": [0.5, 6, 3.5, 8], "texture": "#0"},
|
||||||
"west": {"uv": [0.5, 4, 3.5, 6], "texture": "#0"},
|
"west": {"uv": [0.5, 4, 3.5, 6], "texture": "#0"},
|
||||||
"up": {"uv": [3.5, 0.5, 4, 3.5], "rotation": 180, "texture": "#0"},
|
"up": {"uv": [14, 2, 16, 14], "rotation": 180, "texture": "#1"},
|
||||||
"down": {"uv": [0.5, 5.5, 3.5, 6], "rotation": 270, "texture": "#0"}
|
"down": {"uv": [0.5, 5.5, 3.5, 6], "rotation": 270, "texture": "#0"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -150,7 +151,7 @@
|
|||||||
"faces": {
|
"faces": {
|
||||||
"north": {"uv": [0.5, 6, 3.5, 8], "texture": "#0"},
|
"north": {"uv": [0.5, 6, 3.5, 8], "texture": "#0"},
|
||||||
"south": {"uv": [0.5, 4, 3.5, 6], "texture": "#0"},
|
"south": {"uv": [0.5, 4, 3.5, 6], "texture": "#0"},
|
||||||
"up": {"uv": [0.5, 3.5, 3.5, 4], "texture": "#0"},
|
"up": {"uv": [2, 0, 14, 2], "rotation": 180, "texture": "#1"},
|
||||||
"down": {"uv": [0.5, 5.5, 3.5, 6], "texture": "#0"}
|
"down": {"uv": [0.5, 5.5, 3.5, 6], "texture": "#0"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -162,7 +163,7 @@
|
|||||||
"faces": {
|
"faces": {
|
||||||
"east": {"uv": [0.5, 4, 3.5, 6], "texture": "#0"},
|
"east": {"uv": [0.5, 4, 3.5, 6], "texture": "#0"},
|
||||||
"west": {"uv": [0.5, 6, 3.5, 8], "texture": "#0"},
|
"west": {"uv": [0.5, 6, 3.5, 8], "texture": "#0"},
|
||||||
"up": {"uv": [0, 0.5, 0.5, 3.5], "rotation": 180, "texture": "#0"},
|
"up": {"uv": [0, 2, 2, 14], "rotation": 180, "texture": "#1"},
|
||||||
"down": {"uv": [0.5, 4, 3.5, 4.5], "rotation": 270, "texture": "#0"}
|
"down": {"uv": [0.5, 4, 3.5, 4.5], "rotation": 270, "texture": "#0"}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
"parent": "block/block",
|
"parent": "block/block",
|
||||||
"textures": {
|
"textures": {
|
||||||
"0": "create:block/brass_tunnel",
|
"0": "create:block/brass_tunnel",
|
||||||
|
"1": "create:block/brass_tunnel_top",
|
||||||
"particle": "create:block/brass_tunnel"
|
"particle": "create:block/brass_tunnel"
|
||||||
},
|
},
|
||||||
"elements": [
|
"elements": [
|
||||||
@ -16,7 +17,7 @@
|
|||||||
"east": {"uv": [3.5, 4, 4, 8.75], "texture": "#0"},
|
"east": {"uv": [3.5, 4, 4, 8.75], "texture": "#0"},
|
||||||
"south": {"uv": [12, 8.25, 16, 13], "texture": "#0"},
|
"south": {"uv": [12, 8.25, 16, 13], "texture": "#0"},
|
||||||
"west": {"uv": [0, 4, 0.5, 8.75], "texture": "#0"},
|
"west": {"uv": [0, 4, 0.5, 8.75], "texture": "#0"},
|
||||||
"up": {"uv": [0, 3.5, 4, 4], "rotation": 180, "texture": "#0"}
|
"up": {"uv": [0, 14, 16, 16], "rotation": 180, "texture": "#1"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -25,8 +26,8 @@
|
|||||||
"to": [14, 16, 14],
|
"to": [14, 16, 14],
|
||||||
"rotation": {"angle": 0, "axis": "y", "origin": [7, -24, 8]},
|
"rotation": {"angle": 0, "axis": "y", "origin": [7, -24, 8]},
|
||||||
"faces": {
|
"faces": {
|
||||||
"up": {"uv": [8.5, 0.25, 11.5, 3.25], "rotation": 180, "texture": "#0"},
|
"up": {"uv": [12.5, 0.25, 15.5, 3.25], "rotation": 180, "texture": "#0"},
|
||||||
"down": {"uv": [0.5, 0.5, 3.5, 3.5], "rotation": 270, "texture": "#0"}
|
"down": {"uv": [12.5, 0.25, 15.5, 3.25], "rotation": 180, "texture": "#0"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -39,7 +40,7 @@
|
|||||||
"east": {"uv": [0, 4, 0.5, 8.75], "texture": "#0"},
|
"east": {"uv": [0, 4, 0.5, 8.75], "texture": "#0"},
|
||||||
"south": {"uv": [12, 8.25, 16, 13], "texture": "#0"},
|
"south": {"uv": [12, 8.25, 16, 13], "texture": "#0"},
|
||||||
"west": {"uv": [3.5, 4, 4, 8.75], "texture": "#0"},
|
"west": {"uv": [3.5, 4, 4, 8.75], "texture": "#0"},
|
||||||
"up": {"uv": [0, 0, 4, 0.5], "rotation": 180, "texture": "#0"}
|
"up": {"uv": [0, 0, 16, 2], "rotation": 180, "texture": "#1"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -74,7 +75,7 @@
|
|||||||
"faces": {
|
"faces": {
|
||||||
"east": {"uv": [0.5, 6, 3.5, 8], "texture": "#0"},
|
"east": {"uv": [0.5, 6, 3.5, 8], "texture": "#0"},
|
||||||
"west": {"uv": [0.5, 4, 3.5, 6], "texture": "#0"},
|
"west": {"uv": [0.5, 4, 3.5, 6], "texture": "#0"},
|
||||||
"up": {"uv": [3.5, 0.5, 4, 3.5], "rotation": 180, "texture": "#0"},
|
"up": {"uv": [14, 2, 16, 14], "rotation": 180, "texture": "#1"},
|
||||||
"down": {"uv": [0.5, 5.5, 3.5, 6], "rotation": 270, "texture": "#0"}
|
"down": {"uv": [0.5, 5.5, 3.5, 6], "rotation": 270, "texture": "#0"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -86,7 +87,7 @@
|
|||||||
"faces": {
|
"faces": {
|
||||||
"east": {"uv": [0.5, 4, 3.5, 6], "texture": "#0"},
|
"east": {"uv": [0.5, 4, 3.5, 6], "texture": "#0"},
|
||||||
"west": {"uv": [0.5, 6, 3.5, 8], "texture": "#0"},
|
"west": {"uv": [0.5, 6, 3.5, 8], "texture": "#0"},
|
||||||
"up": {"uv": [0, 0.5, 0.5, 3.5], "rotation": 180, "texture": "#0"},
|
"up": {"uv": [0, 2, 2, 14], "rotation": 180, "texture": "#1"},
|
||||||
"down": {"uv": [0.5, 4, 3.5, 4.5], "rotation": 270, "texture": "#0"}
|
"down": {"uv": [0.5, 4, 3.5, 4.5], "rotation": 270, "texture": "#0"}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
"parent": "block/block",
|
"parent": "block/block",
|
||||||
"textures": {
|
"textures": {
|
||||||
"0": "create:block/brass_tunnel",
|
"0": "create:block/brass_tunnel",
|
||||||
|
"1": "create:block/brass_tunnel_top",
|
||||||
"particle": "create:block/brass_tunnel"
|
"particle": "create:block/brass_tunnel"
|
||||||
},
|
},
|
||||||
"elements": [
|
"elements": [
|
||||||
@ -16,7 +17,7 @@
|
|||||||
"east": {"uv": [3.5, 4, 4, 8.75], "texture": "#0"},
|
"east": {"uv": [3.5, 4, 4, 8.75], "texture": "#0"},
|
||||||
"south": {"uv": [8, 3.5, 12, 8.25], "texture": "#0"},
|
"south": {"uv": [8, 3.5, 12, 8.25], "texture": "#0"},
|
||||||
"west": {"uv": [0, 4, 0.5, 8.75], "texture": "#0"},
|
"west": {"uv": [0, 4, 0.5, 8.75], "texture": "#0"},
|
||||||
"up": {"uv": [0, 3.5, 4, 4], "rotation": 180, "texture": "#0"}
|
"up": {"uv": [0, 14, 16, 16], "rotation": 180, "texture": "#1"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -26,7 +27,7 @@
|
|||||||
"rotation": {"angle": 0, "axis": "y", "origin": [7, -24, 8]},
|
"rotation": {"angle": 0, "axis": "y", "origin": [7, -24, 8]},
|
||||||
"faces": {
|
"faces": {
|
||||||
"up": {"uv": [8.5, 0.25, 11.5, 3.25], "rotation": 180, "texture": "#0"},
|
"up": {"uv": [8.5, 0.25, 11.5, 3.25], "rotation": 180, "texture": "#0"},
|
||||||
"down": {"uv": [0.5, 0.5, 3.5, 3.5], "rotation": 270, "texture": "#0"}
|
"down": {"uv": [8.5, 0.25, 11.5, 3.25], "rotation": 270, "texture": "#0"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -39,7 +40,7 @@
|
|||||||
"east": {"uv": [0, 4, 0.5, 8.75], "texture": "#0"},
|
"east": {"uv": [0, 4, 0.5, 8.75], "texture": "#0"},
|
||||||
"south": {"uv": [8, 3.5, 12, 8.25], "texture": "#0"},
|
"south": {"uv": [8, 3.5, 12, 8.25], "texture": "#0"},
|
||||||
"west": {"uv": [3.5, 4, 4, 8.75], "texture": "#0"},
|
"west": {"uv": [3.5, 4, 4, 8.75], "texture": "#0"},
|
||||||
"up": {"uv": [0, 0, 4, 0.5], "rotation": 180, "texture": "#0"}
|
"up": {"uv": [0, 0, 16, 2], "rotation": 180, "texture": "#1"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -74,7 +75,7 @@
|
|||||||
"faces": {
|
"faces": {
|
||||||
"east": {"uv": [0.5, 6, 3.5, 8], "texture": "#0"},
|
"east": {"uv": [0.5, 6, 3.5, 8], "texture": "#0"},
|
||||||
"west": {"uv": [0.5, 4, 3.5, 6], "texture": "#0"},
|
"west": {"uv": [0.5, 4, 3.5, 6], "texture": "#0"},
|
||||||
"up": {"uv": [3.5, 0.5, 4, 3.5], "rotation": 180, "texture": "#0"},
|
"up": {"uv": [14, 2, 16, 14], "rotation": 180, "texture": "#1"},
|
||||||
"down": {"uv": [0.5, 5.5, 3.5, 6], "rotation": 270, "texture": "#0"}
|
"down": {"uv": [0.5, 5.5, 3.5, 6], "rotation": 270, "texture": "#0"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -86,7 +87,7 @@
|
|||||||
"faces": {
|
"faces": {
|
||||||
"east": {"uv": [0.5, 4, 3.5, 6], "texture": "#0"},
|
"east": {"uv": [0.5, 4, 3.5, 6], "texture": "#0"},
|
||||||
"west": {"uv": [0.5, 6, 3.5, 8], "texture": "#0"},
|
"west": {"uv": [0.5, 6, 3.5, 8], "texture": "#0"},
|
||||||
"up": {"uv": [0, 0.5, 0.5, 3.5], "rotation": 180, "texture": "#0"},
|
"up": {"uv": [0, 2, 2, 14], "rotation": 180, "texture": "#1"},
|
||||||
"down": {"uv": [0.5, 4, 3.5, 4.5], "rotation": 270, "texture": "#0"}
|
"down": {"uv": [0.5, 4, 3.5, 4.5], "rotation": 270, "texture": "#0"}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,22 +0,0 @@
|
|||||||
{
|
|
||||||
"credit": "Made with Blockbench",
|
|
||||||
"parent": "block/block",
|
|
||||||
"textures": {
|
|
||||||
"0": "create:block/brass_tunnel",
|
|
||||||
"particle": "create:block/brass_tunnel"
|
|
||||||
},
|
|
||||||
"elements": [
|
|
||||||
{
|
|
||||||
"from": [6, 10, 16],
|
|
||||||
"to": [10, 14, 17],
|
|
||||||
"faces": {
|
|
||||||
"north": {"uv": [4.75, 0, 5.75, 1], "texture": "#0"},
|
|
||||||
"east": {"uv": [5.5, 0, 5.75, 1], "texture": "#0"},
|
|
||||||
"south": {"uv": [4.75, 0, 5.75, 1], "texture": "#0"},
|
|
||||||
"west": {"uv": [4.75, 0, 5, 1], "texture": "#0"},
|
|
||||||
"up": {"uv": [4.75, 0, 5, 1], "rotation": 270, "texture": "#0"},
|
|
||||||
"down": {"uv": [4.75, 0, 5, 1], "rotation": 90, "texture": "#0"}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
@ -3,6 +3,7 @@
|
|||||||
"parent": "block/block",
|
"parent": "block/block",
|
||||||
"textures": {
|
"textures": {
|
||||||
"0": "create:block/brass_tunnel",
|
"0": "create:block/brass_tunnel",
|
||||||
|
"1": "create:block/brass_tunnel_top",
|
||||||
"particle": "create:block/brass_tunnel"
|
"particle": "create:block/brass_tunnel"
|
||||||
},
|
},
|
||||||
"elements": [
|
"elements": [
|
||||||
@ -16,7 +17,7 @@
|
|||||||
"east": {"uv": [3.5, 4, 4, 8.75], "texture": "#0"},
|
"east": {"uv": [3.5, 4, 4, 8.75], "texture": "#0"},
|
||||||
"south": {"uv": [4, 3.5, 8, 8.25], "texture": "#0"},
|
"south": {"uv": [4, 3.5, 8, 8.25], "texture": "#0"},
|
||||||
"west": {"uv": [0, 4, 0.5, 8.75], "texture": "#0"},
|
"west": {"uv": [0, 4, 0.5, 8.75], "texture": "#0"},
|
||||||
"up": {"uv": [0, 3.5, 4, 4], "rotation": 180, "texture": "#0"}
|
"up": {"uv": [0, 14, 16, 16], "rotation": 180, "texture": "#1"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -25,8 +26,8 @@
|
|||||||
"to": [14, 16, 14],
|
"to": [14, 16, 14],
|
||||||
"rotation": {"angle": 0, "axis": "y", "origin": [7, -24, 8]},
|
"rotation": {"angle": 0, "axis": "y", "origin": [7, -24, 8]},
|
||||||
"faces": {
|
"faces": {
|
||||||
"up": {"uv": [0.5, 0.5, 3.5, 3.5], "rotation": 180, "texture": "#0"},
|
"up": {"uv": [2, 2, 14, 14], "rotation": 180, "texture": "#1"},
|
||||||
"down": {"uv": [0.5, 0.5, 3.5, 3.5], "rotation": 270, "texture": "#0"}
|
"down": {"uv": [2, 2, 14, 14], "rotation": 270, "texture": "#1"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -39,7 +40,7 @@
|
|||||||
"east": {"uv": [0, 4, 0.5, 8.75], "texture": "#0"},
|
"east": {"uv": [0, 4, 0.5, 8.75], "texture": "#0"},
|
||||||
"south": {"uv": [4, 3.5, 8, 8.25], "texture": "#0"},
|
"south": {"uv": [4, 3.5, 8, 8.25], "texture": "#0"},
|
||||||
"west": {"uv": [3.5, 4, 4, 8.75], "texture": "#0"},
|
"west": {"uv": [3.5, 4, 4, 8.75], "texture": "#0"},
|
||||||
"up": {"uv": [0, 0, 4, 0.5], "rotation": 180, "texture": "#0"}
|
"up": {"uv": [0, 0, 16, 2], "rotation": 180, "texture": "#1"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -74,7 +75,7 @@
|
|||||||
"faces": {
|
"faces": {
|
||||||
"east": {"uv": [0.5, 6, 3.5, 8], "texture": "#0"},
|
"east": {"uv": [0.5, 6, 3.5, 8], "texture": "#0"},
|
||||||
"west": {"uv": [0.5, 4, 3.5, 6], "texture": "#0"},
|
"west": {"uv": [0.5, 4, 3.5, 6], "texture": "#0"},
|
||||||
"up": {"uv": [3.5, 0.5, 4, 3.5], "rotation": 180, "texture": "#0"},
|
"up": {"uv": [14, 2, 16, 14], "rotation": 180, "texture": "#1"},
|
||||||
"down": {"uv": [0.5, 5.5, 3.5, 6], "rotation": 270, "texture": "#0"}
|
"down": {"uv": [0.5, 5.5, 3.5, 6], "rotation": 270, "texture": "#0"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -86,7 +87,7 @@
|
|||||||
"faces": {
|
"faces": {
|
||||||
"east": {"uv": [0.5, 4, 3.5, 6], "texture": "#0"},
|
"east": {"uv": [0.5, 4, 3.5, 6], "texture": "#0"},
|
||||||
"west": {"uv": [0.5, 6, 3.5, 8], "texture": "#0"},
|
"west": {"uv": [0.5, 6, 3.5, 8], "texture": "#0"},
|
||||||
"up": {"uv": [0, 0.5, 0.5, 3.5], "rotation": 180, "texture": "#0"},
|
"up": {"uv": [0, 2, 2, 14], "rotation": 180, "texture": "#1"},
|
||||||
"down": {"uv": [0.5, 4, 3.5, 4.5], "rotation": 270, "texture": "#0"}
|
"down": {"uv": [0.5, 4, 3.5, 4.5], "rotation": 270, "texture": "#0"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -3,7 +3,8 @@
|
|||||||
"parent": "block/block",
|
"parent": "block/block",
|
||||||
"textures": {
|
"textures": {
|
||||||
"0": "create:block/brass_tunnel",
|
"0": "create:block/brass_tunnel",
|
||||||
"particle": "create:block/brass_tunnel"
|
"1": "create:block/brass_tunnel_top",
|
||||||
|
"particle": "create:block/brass_tunnel_top"
|
||||||
},
|
},
|
||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
@ -16,7 +17,7 @@
|
|||||||
"east": {"uv": [3.5, 4, 4, 8.75], "texture": "#0"},
|
"east": {"uv": [3.5, 4, 4, 8.75], "texture": "#0"},
|
||||||
"south": {"uv": [4, 3.5, 8, 8.25], "texture": "#0"},
|
"south": {"uv": [4, 3.5, 8, 8.25], "texture": "#0"},
|
||||||
"west": {"uv": [0, 4, 0.5, 8.75], "texture": "#0"},
|
"west": {"uv": [0, 4, 0.5, 8.75], "texture": "#0"},
|
||||||
"up": {"uv": [0, 3.5, 4, 4], "rotation": 180, "texture": "#0"}
|
"up": {"uv": [0, 14, 16, 16], "rotation": 180, "texture": "#1"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -25,8 +26,8 @@
|
|||||||
"to": [14, 16, 14],
|
"to": [14, 16, 14],
|
||||||
"rotation": {"angle": 0, "axis": "y", "origin": [7, -24, 8]},
|
"rotation": {"angle": 0, "axis": "y", "origin": [7, -24, 8]},
|
||||||
"faces": {
|
"faces": {
|
||||||
"up": {"uv": [0.5, 0.5, 3.5, 3.5], "rotation": 180, "texture": "#0"},
|
"up": {"uv": [2, 2, 14, 14], "rotation": 180, "texture": "#1"},
|
||||||
"down": {"uv": [0.5, 0.5, 3.5, 3.5], "rotation": 270, "texture": "#0"}
|
"down": {"uv": [2, 2, 14, 14], "rotation": 270, "texture": "#1"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -39,7 +40,7 @@
|
|||||||
"east": {"uv": [0, 4, 0.5, 8.75], "texture": "#0"},
|
"east": {"uv": [0, 4, 0.5, 8.75], "texture": "#0"},
|
||||||
"south": {"uv": [4, 3.5, 8, 8.25], "texture": "#0"},
|
"south": {"uv": [4, 3.5, 8, 8.25], "texture": "#0"},
|
||||||
"west": {"uv": [3.5, 4, 4, 8.75], "texture": "#0"},
|
"west": {"uv": [3.5, 4, 4, 8.75], "texture": "#0"},
|
||||||
"up": {"uv": [0, 0, 4, 0.5], "rotation": 180, "texture": "#0"}
|
"up": {"uv": [0, 0, 16, 2], "rotation": 180, "texture": "#1"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -74,7 +75,7 @@
|
|||||||
"faces": {
|
"faces": {
|
||||||
"east": {"uv": [0.5, 6, 3.5, 8], "texture": "#0"},
|
"east": {"uv": [0.5, 6, 3.5, 8], "texture": "#0"},
|
||||||
"west": {"uv": [0.5, 4, 3.5, 6], "texture": "#0"},
|
"west": {"uv": [0.5, 4, 3.5, 6], "texture": "#0"},
|
||||||
"up": {"uv": [3.5, 0.5, 4, 3.5], "rotation": 180, "texture": "#0"},
|
"up": {"uv": [14, 2, 16, 14], "rotation": 180, "texture": "#1"},
|
||||||
"down": {"uv": [0.5, 5.5, 3.5, 6], "rotation": 270, "texture": "#0"}
|
"down": {"uv": [0.5, 5.5, 3.5, 6], "rotation": 270, "texture": "#0"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -86,7 +87,7 @@
|
|||||||
"faces": {
|
"faces": {
|
||||||
"east": {"uv": [0.5, 4, 3.5, 6], "texture": "#0"},
|
"east": {"uv": [0.5, 4, 3.5, 6], "texture": "#0"},
|
||||||
"west": {"uv": [0.5, 6, 3.5, 8], "texture": "#0"},
|
"west": {"uv": [0.5, 6, 3.5, 8], "texture": "#0"},
|
||||||
"up": {"uv": [0, 0.5, 0.5, 3.5], "rotation": 180, "texture": "#0"},
|
"up": {"uv": [0, 2, 2, 14], "rotation": 180, "texture": "#1"},
|
||||||
"down": {"uv": [0.5, 4, 3.5, 4.5], "rotation": 270, "texture": "#0"}
|
"down": {"uv": [0.5, 4, 3.5, 4.5], "rotation": 270, "texture": "#0"}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
"parent": "block/block",
|
"parent": "block/block",
|
||||||
"textures": {
|
"textures": {
|
||||||
"0": "create:block/brass_tunnel",
|
"0": "create:block/brass_tunnel",
|
||||||
|
"1": "create:block/brass_tunnel_top",
|
||||||
"particle": "create:block/brass_tunnel"
|
"particle": "create:block/brass_tunnel"
|
||||||
},
|
},
|
||||||
"elements": [
|
"elements": [
|
||||||
@ -16,7 +17,7 @@
|
|||||||
"east": {"uv": [3.5, 4, 4, 8.75], "texture": "#0"},
|
"east": {"uv": [3.5, 4, 4, 8.75], "texture": "#0"},
|
||||||
"south": {"uv": [4, 3.5, 8, 8.25], "texture": "#0"},
|
"south": {"uv": [4, 3.5, 8, 8.25], "texture": "#0"},
|
||||||
"west": {"uv": [0, 4, 0.5, 8.75], "texture": "#0"},
|
"west": {"uv": [0, 4, 0.5, 8.75], "texture": "#0"},
|
||||||
"up": {"uv": [0, 3.5, 4, 4], "rotation": 180, "texture": "#0"}
|
"up": {"uv": [0, 14, 16, 16], "rotation": 180, "texture": "#1"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -25,8 +26,8 @@
|
|||||||
"to": [14, 16, 14],
|
"to": [14, 16, 14],
|
||||||
"rotation": {"angle": 0, "axis": "y", "origin": [7, -24, 8]},
|
"rotation": {"angle": 0, "axis": "y", "origin": [7, -24, 8]},
|
||||||
"faces": {
|
"faces": {
|
||||||
"up": {"uv": [0.5, 0.5, 3.5, 3.5], "rotation": 180, "texture": "#0"},
|
"up": {"uv": [2, 2, 14, 14], "rotation": 180, "texture": "#1"},
|
||||||
"down": {"uv": [0.5, 0.5, 3.5, 3.5], "rotation": 270, "texture": "#0"}
|
"down": {"uv": [2, 2, 14, 14], "rotation": 270, "texture": "#1"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -39,7 +40,7 @@
|
|||||||
"east": {"uv": [0, 4, 0.5, 8.75], "texture": "#0"},
|
"east": {"uv": [0, 4, 0.5, 8.75], "texture": "#0"},
|
||||||
"south": {"uv": [0, 4, 0.5, 8.75], "texture": "#0"},
|
"south": {"uv": [0, 4, 0.5, 8.75], "texture": "#0"},
|
||||||
"west": {"uv": [3.5, 4, 4, 8.75], "texture": "#0"},
|
"west": {"uv": [3.5, 4, 4, 8.75], "texture": "#0"},
|
||||||
"up": {"uv": [0, 3.5, 0.5, 4], "texture": "#0"}
|
"up": {"uv": [14, 0, 16, 2], "rotation": 180, "texture": "#1"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -52,7 +53,7 @@
|
|||||||
"east": {"uv": [0, 4, 0.5, 8.75], "texture": "#0"},
|
"east": {"uv": [0, 4, 0.5, 8.75], "texture": "#0"},
|
||||||
"south": {"uv": [3.5, 4, 4, 8.75], "texture": "#0"},
|
"south": {"uv": [3.5, 4, 4, 8.75], "texture": "#0"},
|
||||||
"west": {"uv": [3.5, 4, 4, 8.75], "texture": "#0"},
|
"west": {"uv": [3.5, 4, 4, 8.75], "texture": "#0"},
|
||||||
"up": {"uv": [3.5, 3.5, 4, 4], "texture": "#0"}
|
"up": {"uv": [0, 0, 2, 2], "rotation": 180, "texture": "#1"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -99,7 +100,7 @@
|
|||||||
"faces": {
|
"faces": {
|
||||||
"east": {"uv": [0.5, 6, 3.5, 8], "texture": "#0"},
|
"east": {"uv": [0.5, 6, 3.5, 8], "texture": "#0"},
|
||||||
"west": {"uv": [0.5, 4, 3.5, 6], "texture": "#0"},
|
"west": {"uv": [0.5, 4, 3.5, 6], "texture": "#0"},
|
||||||
"up": {"uv": [3.5, 0.5, 4, 3.5], "rotation": 180, "texture": "#0"},
|
"up": {"uv": [14, 2, 16, 14], "rotation": 180, "texture": "#1"},
|
||||||
"down": {"uv": [0.5, 5.5, 3.5, 6], "rotation": 270, "texture": "#0"}
|
"down": {"uv": [0.5, 5.5, 3.5, 6], "rotation": 270, "texture": "#0"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -111,7 +112,7 @@
|
|||||||
"faces": {
|
"faces": {
|
||||||
"north": {"uv": [0.5, 6, 3.5, 8], "texture": "#0"},
|
"north": {"uv": [0.5, 6, 3.5, 8], "texture": "#0"},
|
||||||
"south": {"uv": [0.5, 4, 3.5, 6], "texture": "#0"},
|
"south": {"uv": [0.5, 4, 3.5, 6], "texture": "#0"},
|
||||||
"up": {"uv": [0.5, 3.5, 3.5, 4], "texture": "#0"},
|
"up": {"uv": [2, 0, 14, 2], "rotation": 180, "texture": "#1"},
|
||||||
"down": {"uv": [0.5, 5.5, 3.5, 6], "texture": "#0"}
|
"down": {"uv": [0.5, 5.5, 3.5, 6], "texture": "#0"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -123,7 +124,7 @@
|
|||||||
"faces": {
|
"faces": {
|
||||||
"east": {"uv": [0.5, 4, 3.5, 6], "texture": "#0"},
|
"east": {"uv": [0.5, 4, 3.5, 6], "texture": "#0"},
|
||||||
"west": {"uv": [0.5, 6, 3.5, 8], "texture": "#0"},
|
"west": {"uv": [0.5, 6, 3.5, 8], "texture": "#0"},
|
||||||
"up": {"uv": [0, 0.5, 0.5, 3.5], "rotation": 180, "texture": "#0"},
|
"up": {"uv": [0, 2, 2, 14], "rotation": 180, "texture": "#1"},
|
||||||
"down": {"uv": [0.5, 4, 3.5, 4.5], "rotation": 270, "texture": "#0"}
|
"down": {"uv": [0.5, 4, 3.5, 4.5], "rotation": 270, "texture": "#0"}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
"parent": "block/block",
|
"parent": "block/block",
|
||||||
"textures": {
|
"textures": {
|
||||||
"0": "create:block/brass_tunnel",
|
"0": "create:block/brass_tunnel",
|
||||||
|
"1": "create:block/brass_tunnel_top",
|
||||||
"particle": "create:block/brass_tunnel"
|
"particle": "create:block/brass_tunnel"
|
||||||
},
|
},
|
||||||
"elements": [
|
"elements": [
|
||||||
@ -16,7 +17,7 @@
|
|||||||
"east": {"uv": [0, 4, 0.5, 8.75], "texture": "#0"},
|
"east": {"uv": [0, 4, 0.5, 8.75], "texture": "#0"},
|
||||||
"south": {"uv": [4, 3.5, 8, 8.25], "texture": "#0"},
|
"south": {"uv": [4, 3.5, 8, 8.25], "texture": "#0"},
|
||||||
"west": {"uv": [3.5, 4, 4, 8.75], "texture": "#0"},
|
"west": {"uv": [3.5, 4, 4, 8.75], "texture": "#0"},
|
||||||
"up": {"uv": [0, 3.5, 4, 4], "texture": "#0"}
|
"up": {"uv": [0, 0, 16, 2], "rotation": 180, "texture": "#1"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -25,8 +26,8 @@
|
|||||||
"to": [14, 16, 14],
|
"to": [14, 16, 14],
|
||||||
"rotation": {"angle": 0, "axis": "y", "origin": [9, -24, 8]},
|
"rotation": {"angle": 0, "axis": "y", "origin": [9, -24, 8]},
|
||||||
"faces": {
|
"faces": {
|
||||||
"up": {"uv": [0.5, 0.5, 3.5, 3.5], "texture": "#0"},
|
"up": {"uv": [2, 2, 14, 14], "rotation": 180, "texture": "#1"},
|
||||||
"down": {"uv": [0.5, 0.5, 3.5, 3.5], "rotation": 90, "texture": "#0"}
|
"down": {"uv": [2, 2, 14, 14], "rotation": 90, "texture": "#1"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -39,7 +40,7 @@
|
|||||||
"east": {"uv": [3.5, 4, 4, 8.75], "texture": "#0"},
|
"east": {"uv": [3.5, 4, 4, 8.75], "texture": "#0"},
|
||||||
"south": {"uv": [7.5, 3.5, 8, 8.25], "texture": "#0"},
|
"south": {"uv": [7.5, 3.5, 8, 8.25], "texture": "#0"},
|
||||||
"west": {"uv": [0, 4, 0.5, 8.75], "texture": "#0"},
|
"west": {"uv": [0, 4, 0.5, 8.75], "texture": "#0"},
|
||||||
"up": {"uv": [0, 3.5, 0.5, 4], "rotation": 180, "texture": "#0"}
|
"up": {"uv": [0, 14, 2, 16], "rotation": 180, "texture": "#1"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -52,7 +53,7 @@
|
|||||||
"east": {"uv": [3.5, 4, 4, 8.75], "texture": "#0"},
|
"east": {"uv": [3.5, 4, 4, 8.75], "texture": "#0"},
|
||||||
"south": {"uv": [4, 3.5, 4.5, 8.25], "texture": "#0"},
|
"south": {"uv": [4, 3.5, 4.5, 8.25], "texture": "#0"},
|
||||||
"west": {"uv": [0, 4, 0.5, 8.75], "texture": "#0"},
|
"west": {"uv": [0, 4, 0.5, 8.75], "texture": "#0"},
|
||||||
"up": {"uv": [3.5, 3.5, 4, 4], "rotation": 180, "texture": "#0"}
|
"up": {"uv": [14, 14, 16, 16], "rotation": 180, "texture": "#1"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -99,7 +100,7 @@
|
|||||||
"faces": {
|
"faces": {
|
||||||
"east": {"uv": [0.5, 4, 3.5, 6], "texture": "#0"},
|
"east": {"uv": [0.5, 4, 3.5, 6], "texture": "#0"},
|
||||||
"west": {"uv": [0.5, 6, 3.5, 8], "texture": "#0"},
|
"west": {"uv": [0.5, 6, 3.5, 8], "texture": "#0"},
|
||||||
"up": {"uv": [3.5, 0.5, 4, 3.5], "texture": "#0"},
|
"up": {"uv": [0, 2, 2, 14], "rotation": 180, "texture": "#1"},
|
||||||
"down": {"uv": [0.5, 5.5, 3.5, 6], "rotation": 90, "texture": "#0"}
|
"down": {"uv": [0.5, 5.5, 3.5, 6], "rotation": 90, "texture": "#0"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -111,7 +112,7 @@
|
|||||||
"faces": {
|
"faces": {
|
||||||
"north": {"uv": [0.5, 4, 3.5, 6], "texture": "#0"},
|
"north": {"uv": [0.5, 4, 3.5, 6], "texture": "#0"},
|
||||||
"south": {"uv": [0.5, 6, 3.5, 8], "texture": "#0"},
|
"south": {"uv": [0.5, 6, 3.5, 8], "texture": "#0"},
|
||||||
"up": {"uv": [0.5, 3.5, 3.5, 4], "rotation": 180, "texture": "#0"},
|
"up": {"uv": [2, 14, 14, 16], "rotation": 180, "texture": "#1"},
|
||||||
"down": {"uv": [0.5, 5.5, 3.5, 6], "rotation": 180, "texture": "#0"}
|
"down": {"uv": [0.5, 5.5, 3.5, 6], "rotation": 180, "texture": "#0"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -123,7 +124,7 @@
|
|||||||
"faces": {
|
"faces": {
|
||||||
"east": {"uv": [0.5, 6, 3.5, 8], "texture": "#0"},
|
"east": {"uv": [0.5, 6, 3.5, 8], "texture": "#0"},
|
||||||
"west": {"uv": [0.5, 4, 3.5, 6], "texture": "#0"},
|
"west": {"uv": [0.5, 4, 3.5, 6], "texture": "#0"},
|
||||||
"up": {"uv": [0, 0.5, 0.5, 3.5], "texture": "#0"},
|
"up": {"uv": [14, 2, 16, 14], "rotation": 180, "texture": "#1"},
|
||||||
"down": {"uv": [0.5, 4, 3.5, 4.5], "rotation": 90, "texture": "#0"}
|
"down": {"uv": [0.5, 4, 3.5, 4.5], "rotation": 90, "texture": "#0"}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
"parent": "block/block",
|
"parent": "block/block",
|
||||||
"textures": {
|
"textures": {
|
||||||
"0": "create:block/brass_tunnel",
|
"0": "create:block/brass_tunnel",
|
||||||
|
"1": "create:block/brass_tunnel_top",
|
||||||
"particle": "create:block/brass_tunnel"
|
"particle": "create:block/brass_tunnel"
|
||||||
},
|
},
|
||||||
"elements": [
|
"elements": [
|
||||||
@ -16,7 +17,7 @@
|
|||||||
"east": {"uv": [3.5, 4, 4, 8.75], "texture": "#0"},
|
"east": {"uv": [3.5, 4, 4, 8.75], "texture": "#0"},
|
||||||
"south": {"uv": [12, 3.5, 16, 8.25], "texture": "#0"},
|
"south": {"uv": [12, 3.5, 16, 8.25], "texture": "#0"},
|
||||||
"west": {"uv": [0, 4, 0.5, 8.75], "texture": "#0"},
|
"west": {"uv": [0, 4, 0.5, 8.75], "texture": "#0"},
|
||||||
"up": {"uv": [0, 3.5, 4, 4], "rotation": 180, "texture": "#0"}
|
"up": {"uv": [0, 14, 16, 16], "rotation": 180, "texture": "#1"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -26,7 +27,7 @@
|
|||||||
"rotation": {"angle": 0, "axis": "y", "origin": [7, -24, 8]},
|
"rotation": {"angle": 0, "axis": "y", "origin": [7, -24, 8]},
|
||||||
"faces": {
|
"faces": {
|
||||||
"up": {"uv": [8.5, 0.25, 11.5, 3.25], "rotation": 180, "texture": "#0"},
|
"up": {"uv": [8.5, 0.25, 11.5, 3.25], "rotation": 180, "texture": "#0"},
|
||||||
"down": {"uv": [0.5, 0.5, 3.5, 3.5], "rotation": 270, "texture": "#0"}
|
"down": {"uv": [8.5, 0.25, 11.5, 3.25], "rotation": 270, "texture": "#0"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -39,7 +40,7 @@
|
|||||||
"east": {"uv": [0, 4, 0.5, 8.75], "texture": "#0"},
|
"east": {"uv": [0, 4, 0.5, 8.75], "texture": "#0"},
|
||||||
"south": {"uv": [12, 3.5, 16, 8.25], "texture": "#0"},
|
"south": {"uv": [12, 3.5, 16, 8.25], "texture": "#0"},
|
||||||
"west": {"uv": [3.5, 4, 4, 8.75], "texture": "#0"},
|
"west": {"uv": [3.5, 4, 4, 8.75], "texture": "#0"},
|
||||||
"up": {"uv": [0, 0, 4, 0.5], "rotation": 180, "texture": "#0"}
|
"up": {"uv": [0, 0, 16, 2], "rotation": 180, "texture": "#1"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -74,7 +75,7 @@
|
|||||||
"faces": {
|
"faces": {
|
||||||
"east": {"uv": [0.5, 6, 3.5, 8], "texture": "#0"},
|
"east": {"uv": [0.5, 6, 3.5, 8], "texture": "#0"},
|
||||||
"west": {"uv": [0.5, 4, 3.5, 6], "texture": "#0"},
|
"west": {"uv": [0.5, 4, 3.5, 6], "texture": "#0"},
|
||||||
"up": {"uv": [3.5, 0.5, 4, 3.5], "rotation": 180, "texture": "#0"},
|
"up": {"uv": [14, 2, 16, 14], "rotation": 180, "texture": "#1"},
|
||||||
"down": {"uv": [0.5, 5.5, 3.5, 6], "rotation": 270, "texture": "#0"}
|
"down": {"uv": [0.5, 5.5, 3.5, 6], "rotation": 270, "texture": "#0"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -86,7 +87,7 @@
|
|||||||
"faces": {
|
"faces": {
|
||||||
"east": {"uv": [0.5, 4, 3.5, 6], "texture": "#0"},
|
"east": {"uv": [0.5, 4, 3.5, 6], "texture": "#0"},
|
||||||
"west": {"uv": [0.5, 6, 3.5, 8], "texture": "#0"},
|
"west": {"uv": [0.5, 6, 3.5, 8], "texture": "#0"},
|
||||||
"up": {"uv": [0, 0.5, 0.5, 3.5], "rotation": 180, "texture": "#0"},
|
"up": {"uv": [0, 2, 2, 14], "rotation": 180, "texture": "#1"},
|
||||||
"down": {"uv": [0.5, 4, 3.5, 4.5], "rotation": 270, "texture": "#0"}
|
"down": {"uv": [0.5, 4, 3.5, 4.5], "rotation": 270, "texture": "#0"}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 297 B |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 560 B |
After Width: | Height: | Size: 1.0 KiB |