From 279504cccfa41e9afdc3f7becc2f0ea22d21a8a7 Mon Sep 17 00:00:00 2001 From: simibubi <31564874+simibubi@users.noreply.github.com> Date: Wed, 8 Jul 2020 13:41:55 +0200 Subject: [PATCH] Tunnel clean-up & QOL - Removed synchronization behaviour of belt tunnels - Belt tunnels can now be placed on non-reinforced belt segments, and will apply the missing casing automatically - Bunch more renames - Small tweaks to the andesite tunnel texture - Mechanical arms can no longer take from belts covered by a tunnel - Belt tunnels can now create a window when directly next to a funnel - Fixed tunnel flaps not being triggered when inserting into a covered belt --- .../java/com/simibubi/create/AllBlocks.java | 16 +-- .../java/com/simibubi/create/AllShapes.java | 6 +- .../com/simibubi/create/AllTileEntities.java | 10 +- .../relays/belt/BeltTileEntity.java | 4 + .../BeltFunnelInteractionHandler.java | 8 +- .../BeltTunnelInteractionHandler.java | 37 +------ .../block/belts/tunnel/BeltTunnelBlock.java | 63 ++++------- .../block/belts/tunnel/BeltTunnelItem.java | 47 ++++++++ .../belts/tunnel/BeltTunnelRenderer.java | 18 --- .../belts/tunnel/BeltTunnelTileEntity.java | 104 +++++++----------- .../block/chute/ChuteTileEntity.java | 12 +- .../AndesiteBeltFunnelBlock.java | 2 +- .../AndesiteChuteFunnelBlock.java | 2 +- .../AndesiteFunnelBlock.java | 4 +- .../BeltFunnelBlock.java | 4 +- .../BeltFunnelGenerator.java | 2 +- .../BrassBeltFunnelBlock.java | 2 +- .../BrassChuteFunnelBlock.java | 2 +- .../BrassFunnelBlock.java | 4 +- .../ChuteFunnelBlock.java | 4 +- .../ChuteFunnelGenerator.java | 2 +- .../FunnelBlock.java} | 34 +++--- .../FunnelFilterSlotPositioning.java | 8 +- .../{realityFunnel => funnel}/FunnelItem.java | 8 +- .../FunnelMovementBehaviour.java | 2 +- .../FunnelRenderer.java} | 10 +- .../FunnelTileEntity.java} | 18 +-- .../HorizontalInteractionFunnelBlock.java | 12 +- .../mechanicalArm/ArmInteractionPoint.java | 16 +-- .../block/redstone/RedstoneLinkBlock.java | 4 +- .../foundation/data/BuilderTransformers.java | 9 +- .../create/textures/block/andesite_tunnel.png | Bin 2738 -> 2735 bytes 32 files changed, 218 insertions(+), 256 deletions(-) create mode 100644 src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BeltTunnelItem.java rename src/main/java/com/simibubi/create/content/logistics/block/{realityFunnel => funnel}/AndesiteBeltFunnelBlock.java (81%) rename src/main/java/com/simibubi/create/content/logistics/block/{realityFunnel => funnel}/AndesiteChuteFunnelBlock.java (81%) rename src/main/java/com/simibubi/create/content/logistics/block/{realityFunnel => funnel}/AndesiteFunnelBlock.java (83%) rename src/main/java/com/simibubi/create/content/logistics/block/{realityFunnel => funnel}/BeltFunnelBlock.java (96%) rename src/main/java/com/simibubi/create/content/logistics/block/{realityFunnel => funnel}/BeltFunnelGenerator.java (96%) rename src/main/java/com/simibubi/create/content/logistics/block/{realityFunnel => funnel}/BrassBeltFunnelBlock.java (80%) rename src/main/java/com/simibubi/create/content/logistics/block/{realityFunnel => funnel}/BrassChuteFunnelBlock.java (80%) rename src/main/java/com/simibubi/create/content/logistics/block/{realityFunnel => funnel}/BrassFunnelBlock.java (94%) rename src/main/java/com/simibubi/create/content/logistics/block/{realityFunnel => funnel}/ChuteFunnelBlock.java (87%) rename src/main/java/com/simibubi/create/content/logistics/block/{realityFunnel => funnel}/ChuteFunnelGenerator.java (95%) rename src/main/java/com/simibubi/create/content/logistics/block/{realityFunnel/RealityFunnelBlock.java => funnel/FunnelBlock.java} (85%) rename src/main/java/com/simibubi/create/content/logistics/block/{realityFunnel => funnel}/FunnelFilterSlotPositioning.java (91%) rename src/main/java/com/simibubi/create/content/logistics/block/{realityFunnel => funnel}/FunnelItem.java (89%) rename src/main/java/com/simibubi/create/content/logistics/block/{realityFunnel => funnel}/FunnelMovementBehaviour.java (95%) rename src/main/java/com/simibubi/create/content/logistics/block/{realityFunnel/RealityFunnelRenderer.java => funnel/FunnelRenderer.java} (79%) rename src/main/java/com/simibubi/create/content/logistics/block/{realityFunnel/RealityFunnelTileEntity.java => funnel/FunnelTileEntity.java} (91%) rename src/main/java/com/simibubi/create/content/logistics/block/{realityFunnel => funnel}/HorizontalInteractionFunnelBlock.java (89%) diff --git a/src/main/java/com/simibubi/create/AllBlocks.java b/src/main/java/com/simibubi/create/AllBlocks.java index 4560fb109..67b0fd927 100644 --- a/src/main/java/com/simibubi/create/AllBlocks.java +++ b/src/main/java/com/simibubi/create/AllBlocks.java @@ -93,19 +93,19 @@ import com.simibubi.create.content.logistics.block.diodes.ToggleLatchGenerator; import com.simibubi.create.content.logistics.block.extractor.ExtractorBlock; import com.simibubi.create.content.logistics.block.extractor.LinkedExtractorBlock; import com.simibubi.create.content.logistics.block.extractor.VerticalExtractorGenerator; +import com.simibubi.create.content.logistics.block.funnel.AndesiteBeltFunnelBlock; +import com.simibubi.create.content.logistics.block.funnel.AndesiteChuteFunnelBlock; +import com.simibubi.create.content.logistics.block.funnel.AndesiteFunnelBlock; +import com.simibubi.create.content.logistics.block.funnel.BeltFunnelGenerator; +import com.simibubi.create.content.logistics.block.funnel.BrassBeltFunnelBlock; +import com.simibubi.create.content.logistics.block.funnel.BrassChuteFunnelBlock; +import com.simibubi.create.content.logistics.block.funnel.BrassFunnelBlock; +import com.simibubi.create.content.logistics.block.funnel.ChuteFunnelGenerator; import com.simibubi.create.content.logistics.block.inventories.AdjustableCrateBlock; import com.simibubi.create.content.logistics.block.inventories.CreativeCrateBlock; import com.simibubi.create.content.logistics.block.mechanicalArm.ArmBlock; import com.simibubi.create.content.logistics.block.mechanicalArm.ArmItem; import com.simibubi.create.content.logistics.block.packager.PackagerBlock; -import com.simibubi.create.content.logistics.block.realityFunnel.AndesiteBeltFunnelBlock; -import com.simibubi.create.content.logistics.block.realityFunnel.AndesiteChuteFunnelBlock; -import com.simibubi.create.content.logistics.block.realityFunnel.AndesiteFunnelBlock; -import com.simibubi.create.content.logistics.block.realityFunnel.BeltFunnelGenerator; -import com.simibubi.create.content.logistics.block.realityFunnel.BrassBeltFunnelBlock; -import com.simibubi.create.content.logistics.block.realityFunnel.BrassChuteFunnelBlock; -import com.simibubi.create.content.logistics.block.realityFunnel.BrassFunnelBlock; -import com.simibubi.create.content.logistics.block.realityFunnel.ChuteFunnelGenerator; import com.simibubi.create.content.logistics.block.redstone.AnalogLeverBlock; import com.simibubi.create.content.logistics.block.redstone.NixieTubeBlock; import com.simibubi.create.content.logistics.block.redstone.NixieTubeGenerator; diff --git a/src/main/java/com/simibubi/create/AllShapes.java b/src/main/java/com/simibubi/create/AllShapes.java index 53980cc8f..71626ae70 100644 --- a/src/main/java/com/simibubi/create/AllShapes.java +++ b/src/main/java/com/simibubi/create/AllShapes.java @@ -28,8 +28,6 @@ public class AllShapes { CASING_11PX = shape(0, 0, 0, 16, 11, 16).forDirectional(), MOTOR_BLOCK = shape(3, 0, 3, 13, 14, 13).forDirectional(), FOUR_VOXEL_POLE = shape(6, 0, 6, 10, 16, 10).forAxis(), SIX_VOXEL_POLE = shape(5, 0, 5, 11, 16, 11).forAxis(), - BELT_FUNNEL = shape(3, -4, 11, 13, 8, 17).forHorizontal(SOUTH), - FUNNEL = shape(1, 1, 13, 15, 15, 17).forDirectional(SOUTH), EXTRACTOR = shape(4, 2, 11, 12, 10, 17).forDirectional(SOUTH) .withVerticalShapes(cuboid(4, 11, 4, 12, 17, 12)), TRANSPOSER = shape(4, 4, -1, 12, 12, 1).add(5, 5, 0, 11, 11, 16) @@ -65,11 +63,11 @@ public class AllShapes { NIXIE_TUBE_CEILING = shape(0, 12, 0, 16, 16, 16).add(9, 1, 5, 15, 16, 11) .add(1, 1, 5, 7, 16, 11) .forHorizontalAxis(), - REALITY_FUNNEL = shape(3, -2, 3, 13, 2, 13).add(2, 2, 2, 14, 6, 14) + FUNNEL = shape(3, -2, 3, 13, 2, 13).add(2, 2, 2, 14, 6, 14) .add(1, 6, 1, 15, 10, 15) .add(0, 10, 0, 16, 16, 16) .forDirectional(UP), - REALITY_FUNNEL_COLLISION = shape(3, -2, 3, 13, 2, 13).add(2, 2, 2, 14, 6, 14) + FUNNEL_COLLISION = shape(3, -2, 3, 13, 2, 13).add(2, 2, 2, 14, 6, 14) .add(1, 6, 1, 15, 10, 15) .add(0, 10, 0, 16, 13, 16) .forDirectional(UP), diff --git a/src/main/java/com/simibubi/create/AllTileEntities.java b/src/main/java/com/simibubi/create/AllTileEntities.java index 044d4fa25..f7b0b865f 100644 --- a/src/main/java/com/simibubi/create/AllTileEntities.java +++ b/src/main/java/com/simibubi/create/AllTileEntities.java @@ -81,14 +81,14 @@ import com.simibubi.create.content.logistics.block.diodes.AdjustableRepeaterRend import com.simibubi.create.content.logistics.block.diodes.AdjustableRepeaterTileEntity; import com.simibubi.create.content.logistics.block.extractor.ExtractorTileEntity; import com.simibubi.create.content.logistics.block.extractor.LinkedExtractorTileEntity; +import com.simibubi.create.content.logistics.block.funnel.FunnelRenderer; +import com.simibubi.create.content.logistics.block.funnel.FunnelTileEntity; import com.simibubi.create.content.logistics.block.inventories.AdjustableCrateTileEntity; import com.simibubi.create.content.logistics.block.inventories.CreativeCrateTileEntity; import com.simibubi.create.content.logistics.block.mechanicalArm.ArmRenderer; import com.simibubi.create.content.logistics.block.mechanicalArm.ArmTileEntity; import com.simibubi.create.content.logistics.block.packager.PackagerRenderer; import com.simibubi.create.content.logistics.block.packager.PackagerTileEntity; -import com.simibubi.create.content.logistics.block.realityFunnel.RealityFunnelRenderer; -import com.simibubi.create.content.logistics.block.realityFunnel.RealityFunnelTileEntity; import com.simibubi.create.content.logistics.block.redstone.AnalogLeverRenderer; import com.simibubi.create.content.logistics.block.redstone.AnalogLeverTileEntity; import com.simibubi.create.content.logistics.block.redstone.NixieTubeRenderer; @@ -227,8 +227,8 @@ public class AllTileEntities { public static final TileEntityEntry DEPOT = register("depot", DepotTileEntity::new, AllBlocks.DEPOT); - public static final TileEntityEntry REALITY_FUNNEL = register("reality_funnel", - RealityFunnelTileEntity::new, AllBlocks.BRASS_FUNNEL, AllBlocks.BRASS_BELT_FUNNEL, AllBlocks.BRASS_CHUTE_FUNNEL, + public static final TileEntityEntry FUNNEL = register("funnel", + FunnelTileEntity::new, AllBlocks.BRASS_FUNNEL, AllBlocks.BRASS_BELT_FUNNEL, AllBlocks.BRASS_CHUTE_FUNNEL, AllBlocks.ANDESITE_FUNNEL, AllBlocks.ANDESITE_BELT_FUNNEL, AllBlocks.ANDESITE_CHUTE_FUNNEL); public static final TileEntityEntry PACKAGER = register("packager", PackagerTileEntity::new, AllBlocks.PACKAGER); @@ -312,7 +312,7 @@ public class AllTileEntities { bind(LINKED_EXTRACTOR, SmartTileEntityRenderer::new); bind(TRANSPOSER, SmartTileEntityRenderer::new); bind(LINKED_TRANSPOSER, SmartTileEntityRenderer::new); - bind(REALITY_FUNNEL, RealityFunnelRenderer::new); + bind(FUNNEL, FunnelRenderer::new); bind(BELT_TUNNEL, BeltTunnelRenderer::new); bind(MECHANICAL_ARM, ArmRenderer::new); bind(BELT_OBSERVER, BeltObserverRenderer::new); diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltTileEntity.java index 929863ac6..8d7b2347e 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltTileEntity.java @@ -21,6 +21,7 @@ import com.simibubi.create.content.contraptions.relays.belt.BeltBlock.Slope; import com.simibubi.create.content.contraptions.relays.belt.transport.BeltInventory; import com.simibubi.create.content.contraptions.relays.belt.transport.BeltMovementHandler; import com.simibubi.create.content.contraptions.relays.belt.transport.BeltMovementHandler.TransportedEntityInfo; +import com.simibubi.create.content.contraptions.relays.belt.transport.BeltTunnelInteractionHandler; import com.simibubi.create.content.contraptions.relays.belt.transport.ItemHandlerBeltSegment; import com.simibubi.create.content.contraptions.relays.belt.transport.TransportedItemStack; import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour; @@ -432,6 +433,9 @@ public class BeltTileEntity extends KineticTileEntity { transportedStack.insertedAt = index; transportedStack.insertedFrom = side; transportedStack.prevBeltPosition = transportedStack.beltPosition; + + BeltTunnelInteractionHandler.flapTunnel(nextInventory, index, side.getOpposite(), true); + nextInventory.addItem(transportedStack); nextBeltController.markDirty(); nextBeltController.sendData(); diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/belt/transport/BeltFunnelInteractionHandler.java b/src/main/java/com/simibubi/create/content/contraptions/relays/belt/transport/BeltFunnelInteractionHandler.java index a169ac0ac..7a5b372f4 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/belt/transport/BeltFunnelInteractionHandler.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/belt/transport/BeltFunnelInteractionHandler.java @@ -1,8 +1,8 @@ package com.simibubi.create.content.contraptions.relays.belt.transport; import com.simibubi.create.content.contraptions.relays.belt.BeltHelper; -import com.simibubi.create.content.logistics.block.realityFunnel.BeltFunnelBlock; -import com.simibubi.create.content.logistics.block.realityFunnel.RealityFunnelTileEntity; +import com.simibubi.create.content.logistics.block.funnel.BeltFunnelBlock; +import com.simibubi.create.content.logistics.block.funnel.FunnelTileEntity; import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour; import com.simibubi.create.foundation.tileEntity.behaviour.filtering.FilteringBehaviour; import com.simibubi.create.foundation.tileEntity.behaviour.inventory.InsertingBehaviour; @@ -45,10 +45,10 @@ public class BeltFunnelInteractionHandler { return true; TileEntity te = world.getTileEntity(funnelPos); - if (!(te instanceof RealityFunnelTileEntity)) + if (!(te instanceof FunnelTileEntity)) return true; - RealityFunnelTileEntity funnelTE = (RealityFunnelTileEntity) te; + FunnelTileEntity funnelTE = (FunnelTileEntity) te; InsertingBehaviour inserting = TileEntityBehaviour.get(funnelTE, InsertingBehaviour.TYPE); FilteringBehaviour filtering = TileEntityBehaviour.get(funnelTE, FilteringBehaviour.TYPE); diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/belt/transport/BeltTunnelInteractionHandler.java b/src/main/java/com/simibubi/create/content/contraptions/relays/belt/transport/BeltTunnelInteractionHandler.java index b476533e8..7e6102ef9 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/belt/transport/BeltTunnelInteractionHandler.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/belt/transport/BeltTunnelInteractionHandler.java @@ -1,8 +1,5 @@ package com.simibubi.create.content.contraptions.relays.belt.transport; -import java.util.List; - -import com.simibubi.create.AllBlocks; import com.simibubi.create.content.contraptions.relays.belt.BeltBlock; import com.simibubi.create.content.contraptions.relays.belt.BeltBlock.Slope; import com.simibubi.create.content.contraptions.relays.belt.BeltHelper; @@ -46,40 +43,18 @@ public class BeltTunnelInteractionHandler { BeltTileEntity belt = beltInventory.belt; BlockPos pos = BeltHelper.getPositionForOffset(belt, offset) .up(); - if (!AllBlocks.BRASS_TUNNEL.has(belt.getWorld() - .getBlockState(pos))) + if (!(belt.getWorld() + .getBlockState(pos) + .getBlock() instanceof BeltTunnelBlock)) return false; TileEntity te = belt.getWorld() .getTileEntity(pos); if (te == null || !(te instanceof BeltTunnelTileEntity)) return false; - Direction flapFacing = movementDirection.getOpposite(); - - BeltTunnelTileEntity tunnel = (BeltTunnelTileEntity) te; - if (!tunnel.flaps.containsKey(flapFacing)) - return false; - if (!tunnel.syncedFlaps.containsKey(flapFacing)) - return false; - ItemStack heldItem = tunnel.syncedFlaps.get(flapFacing); - if (heldItem == null) { - tunnel.syncedFlaps.put(flapFacing, ItemStack.EMPTY); - belt.sendData(); - return false; - } - if (heldItem == ItemStack.EMPTY) { - tunnel.syncedFlaps.put(flapFacing, stack); - return true; - } - - List group = BeltTunnelBlock.getSynchronizedGroup(belt.getWorld(), pos, flapFacing); - for (BeltTunnelTileEntity otherTunnel : group) - if (otherTunnel.syncedFlaps.get(flapFacing) == ItemStack.EMPTY) - return true; - for (BeltTunnelTileEntity otherTunnel : group) - otherTunnel.syncedFlaps.put(flapFacing, null); - - return true; + // TODO: ask TE if item can be inserted + + return false; } public static void flapTunnel(BeltInventory beltInventory, int offset, Direction side, boolean inward) { diff --git a/src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BeltTunnelBlock.java b/src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BeltTunnelBlock.java index 722a4789b..b5deacd05 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BeltTunnelBlock.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BeltTunnelBlock.java @@ -1,14 +1,11 @@ package com.simibubi.create.content.logistics.block.belts.tunnel; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - import com.simibubi.create.AllBlocks; import com.simibubi.create.AllTileEntities; import com.simibubi.create.content.contraptions.relays.belt.BeltBlock; import com.simibubi.create.content.contraptions.relays.belt.BeltBlock.Slope; import com.simibubi.create.content.contraptions.wrench.IWrenchable; +import com.simibubi.create.content.logistics.block.funnel.BeltFunnelBlock; import com.simibubi.create.foundation.block.ITE; import com.simibubi.create.foundation.utility.Lang; import com.simibubi.create.foundation.utility.worldWrappers.WrappedWorld; @@ -71,13 +68,20 @@ public class BeltTunnelBlock extends Block implements ITE, @Override public boolean isValidPosition(BlockState state, IWorldReader worldIn, BlockPos pos) { + BlockState blockState = worldIn.getBlockState(pos.down()); + if (!isValidPositionForPlacement(state, worldIn, pos)) + return false; + if (!blockState.get(BeltBlock.CASING)) + return false; + return true; + } + + public boolean isValidPositionForPlacement(BlockState state, IWorldReader worldIn, BlockPos pos) { BlockState blockState = worldIn.getBlockState(pos.down()); if (!AllBlocks.BELT.has(blockState)) return false; if (blockState.get(BeltBlock.SLOPE) != Slope.HORIZONTAL) return false; - if (!blockState.get(BeltBlock.CASING)) - return false; return true; } @@ -98,10 +102,12 @@ public class BeltTunnelBlock extends Block implements ITE, @Override public BlockState updatePostPlacement(BlockState state, Direction facing, BlockState facingState, IWorld worldIn, BlockPos currentPos, BlockPos facingPos) { + if (facing.getAxis() + .isVertical()) + return state; if (!(worldIn instanceof WrappedWorld)) withTileEntityDo(worldIn, currentPos, BeltTunnelTileEntity::initFlaps); BlockState tunnelState = getTunnelState(worldIn, currentPos); - if (tunnelState.get(HORIZONTAL_AXIS) == state.get(HORIZONTAL_AXIS)) { if (hasWindow(tunnelState) == hasWindow(state)) return state; @@ -121,29 +127,6 @@ public class BeltTunnelBlock extends Block implements ITE, } } - public static List getSynchronizedGroup(World world, BlockPos pos, Direction flapFacing) { - List group = new ArrayList<>(); - Direction searchDirection = flapFacing.rotateY(); - - for (Direction d : Arrays.asList(searchDirection, searchDirection.getOpposite())) { - BlockPos currentPos = pos; - while (true) { - if (!world.isBlockPresent(currentPos)) - break; - TileEntity te = world.getTileEntity(currentPos); - if (te == null || !(te instanceof BeltTunnelTileEntity)) - break; - BeltTunnelTileEntity tunnel = (BeltTunnelTileEntity) te; - if (!tunnel.syncedFlaps.containsKey(flapFacing)) - break; - group.add(tunnel); - currentPos = currentPos.offset(d); - } - } - - return group; - } - private BlockState getTunnelState(IBlockReader reader, BlockPos pos) { BlockState state = getDefaultState(); BlockState belt = reader.getBlockState(pos.down()); @@ -175,7 +158,13 @@ public class BeltTunnelBlock extends Block implements ITE, Direction fw = Direction.getFacingFromAxis(AxisDirection.POSITIVE, axis); BlockState blockState1 = reader.getBlockState(pos.offset(fw)); BlockState blockState2 = reader.getBlockState(pos.offset(fw.getOpposite())); - if (blockState1.getBlock() instanceof BeltTunnelBlock && blockState2.getBlock() instanceof BeltTunnelBlock) + boolean valid1 = + blockState1.getBlock() instanceof BeltTunnelBlock || blockState1.getBlock() instanceof BeltFunnelBlock + && blockState1.get(BeltFunnelBlock.HORIZONTAL_FACING) == fw.getOpposite(); + boolean valid2 = + blockState2.getBlock() instanceof BeltTunnelBlock || blockState2.getBlock() instanceof BeltFunnelBlock + && blockState2.get(BeltFunnelBlock.HORIZONTAL_FACING) == fw; + if (valid1 && valid2) state = state.with(SHAPE, Shape.WINDOW); } @@ -185,10 +174,6 @@ public class BeltTunnelBlock extends Block implements ITE, @Override public ActionResultType onWrenched(BlockState state, ItemUseContext context) { - // Toggle sync - if (toggleSync(context.getWorld(), context.getPos(), context.getFace())) - return ActionResultType.SUCCESS; - // Toggle windows if (!hasWindow(state)) return IWrenchable.super.onWrenched(state, context); @@ -212,14 +197,6 @@ public class BeltTunnelBlock extends Block implements ITE, return ActionResultType.SUCCESS; } - private boolean toggleSync(World world, BlockPos pos, Direction face) { - TileEntity te = world.getTileEntity(pos); - if (te == null || !(te instanceof BeltTunnelTileEntity)) - return false; - BeltTunnelTileEntity tunnel = (BeltTunnelTileEntity) te; - return tunnel.toggleSyncForFlap(face); - } - @Override public void neighborChanged(BlockState state, World worldIn, BlockPos pos, Block blockIn, BlockPos fromPos, boolean isMoving) { diff --git a/src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BeltTunnelItem.java b/src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BeltTunnelItem.java new file mode 100644 index 000000000..c083c15bc --- /dev/null +++ b/src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BeltTunnelItem.java @@ -0,0 +1,47 @@ +package com.simibubi.create.content.logistics.block.belts.tunnel; + +import com.simibubi.create.AllBlocks; +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.CasingType; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.BlockItem; +import net.minecraft.item.BlockItemUseContext; +import net.minecraft.item.ItemStack; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.shapes.ISelectionContext; +import net.minecraft.world.World; + +public class BeltTunnelItem extends BlockItem { + + public BeltTunnelItem(Block p_i48527_1_, Properties p_i48527_2_) { + super(p_i48527_1_, p_i48527_2_); + } + + @Override + protected boolean canPlace(BlockItemUseContext ctx, BlockState state) { + PlayerEntity playerentity = ctx.getPlayer(); + ISelectionContext iselectioncontext = + playerentity == null ? ISelectionContext.dummy() : ISelectionContext.forEntity(playerentity); + World world = ctx.getWorld(); + BlockPos pos = ctx.getPos(); + return (!this.checkPosition() || AllBlocks.ANDESITE_TUNNEL.get() + .isValidPositionForPlacement(state, world, pos)) && world.canPlace(state, pos, iselectioncontext); + } + + @Override + protected boolean onBlockPlaced(BlockPos pos, World world, PlayerEntity p_195943_3_, ItemStack p_195943_4_, + BlockState state) { + boolean flag = super.onBlockPlaced(pos, world, p_195943_3_, p_195943_4_, state); + if (!world.isRemote) { + BeltTileEntity belt = BeltHelper.getSegmentTE(world, pos.down()); + if (belt != null && belt.casing == CasingType.NONE) + belt.setCasingType(AllBlocks.ANDESITE_TUNNEL.has(state) ? CasingType.ANDESITE : CasingType.BRASS); + } + return flag; + } + +} diff --git a/src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BeltTunnelRenderer.java b/src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BeltTunnelRenderer.java index d728b837a..e87dbc1da 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BeltTunnelRenderer.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BeltTunnelRenderer.java @@ -4,11 +4,9 @@ import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.vertex.IVertexBuilder; import com.simibubi.create.AllBlockPartials; import com.simibubi.create.foundation.tileEntity.renderer.SafeTileEntityRenderer; -import com.simibubi.create.foundation.utility.ColorHelper; import com.simibubi.create.foundation.utility.SuperByteBuffer; import net.minecraft.client.renderer.IRenderTypeBuffer; -import net.minecraft.client.renderer.LightTexture; import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.WorldRenderer; import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; @@ -28,7 +26,6 @@ public class BeltTunnelRenderer extends SafeTileEntityRenderer flaps; - public HashMap syncedFlaps; private LazyOptional cap = LazyOptional.empty(); - private boolean initialize; - private List> flapsToSend; public BeltTunnelTileEntity(TileEntityType type) { super(type); flaps = new HashMap<>(); - syncedFlaps = new HashMap<>(); - initialize = true; flapsToSend = new LinkedList<>(); } - @Override - public LazyOptional getCapability(Capability capability, Direction side) { - - if (capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) { - if (!this.cap.isPresent()) { - if (AllBlocks.BELT.has(world.getBlockState(pos.down()))) { - TileEntity teBelow = world.getTileEntity(pos.down()); - if (teBelow != null) { - T capBelow = teBelow.getCapability(capability, Direction.UP) - .orElse(null); - if (capBelow != null) { - cap = LazyOptional.of(() -> capBelow) - .cast(); - } - } - } - } - return this.cap.cast(); - } - return super.getCapability(capability, side); - } - @Override public void remove() { super.remove(); @@ -76,40 +48,14 @@ public class BeltTunnelTileEntity extends SyncedTileEntity implements ITickableT @Override public CompoundNBT write(CompoundNBT compound) { - CompoundNBT dyedFlapsNBT = new CompoundNBT(); - syncedFlaps.forEach((direction, pair) -> { - dyedFlapsNBT.putBoolean(direction.name(), true); - }); - compound.put("syncedFlaps", dyedFlapsNBT); return super.write(compound); } @Override public void read(CompoundNBT compound) { - if (compound.contains("syncedFlaps")) { - syncedFlaps.clear(); - CompoundNBT dyedFlapsNBT = compound.getCompound("syncedFlaps"); - for (Direction direction : Direction.values()) { - if (dyedFlapsNBT.contains(direction.name())) - syncedFlaps.put(direction, ItemStack.EMPTY); - } - } super.read(compound); } - public boolean toggleSyncForFlap(Direction face) { - if (!flaps.containsKey(face)) - return false; - if (syncedFlaps.containsKey(face)) - syncedFlaps.remove(face); - else - syncedFlaps.put(face, ItemStack.EMPTY); - - markDirty(); - sendData(); - return true; - } - @Override public CompoundNBT writeToClient(CompoundNBT tag) { CompoundNBT writeToClient = super.writeToClient(tag); @@ -138,16 +84,14 @@ public class BeltTunnelTileEntity extends SyncedTileEntity implements ITickableT Direction side = Direction.byIndex(flap.getInt("Flap")); flap(side, flap.getBoolean("FlapInward")); } - } else + } else { initFlaps(); + } } public void initFlaps() { - if (!world.isRemote) { + if (!world.isRemote) sendData(); - } - - initialize = false; flaps.clear(); BlockState tunnelState = getBlockState(); for (Direction direction : Direction.values()) { @@ -168,7 +112,8 @@ public class BeltTunnelTileEntity extends SyncedTileEntity implements ITickableT if (!positive && shape == Shape.T_RIGHT) continue; } - flaps.put(direction, new InterpolatedChasingValue().target(0) + flaps.put(direction, new InterpolatedChasingValue().start(.25f) + .target(0) .withSpeed(.05f)); } } @@ -184,10 +129,15 @@ public class BeltTunnelTileEntity extends SyncedTileEntity implements ITickableT flapsToSend.add(Pair.of(side, inward)); } + @Override + public void initialize() { + super.initialize(); + initFlaps(); + } + @Override public void tick() { - if (initialize) - initFlaps(); + super.tick(); if (!world.isRemote) { if (!flapsToSend.isEmpty()) sendData(); @@ -196,4 +146,28 @@ public class BeltTunnelTileEntity extends SyncedTileEntity implements ITickableT flaps.forEach((d, value) -> value.tick()); } + @Override + public void addBehaviours(List behaviours) {} + + @Override + public LazyOptional getCapability(Capability capability, Direction side) { + if (capability != CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) + return super.getCapability(capability, side); + + if (!this.cap.isPresent()) { + if (AllBlocks.BELT.has(world.getBlockState(pos.down()))) { + TileEntity teBelow = world.getTileEntity(pos.down()); + if (teBelow != null) { + T capBelow = teBelow.getCapability(capability, Direction.UP) + .orElse(null); + if (capBelow != null) { + cap = LazyOptional.of(() -> capBelow) + .cast(); + } + } + } + } + return this.cap.cast(); + } + } diff --git a/src/main/java/com/simibubi/create/content/logistics/block/chute/ChuteTileEntity.java b/src/main/java/com/simibubi/create/content/logistics/block/chute/ChuteTileEntity.java index 4d8cfdfc0..d8ed5b570 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/chute/ChuteTileEntity.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/chute/ChuteTileEntity.java @@ -10,9 +10,9 @@ import com.simibubi.create.content.contraptions.components.fan.EncasedFanBlock; import com.simibubi.create.content.contraptions.components.fan.EncasedFanTileEntity; import com.simibubi.create.content.contraptions.goggles.IHaveGoggleInformation; import com.simibubi.create.content.logistics.block.chute.ChuteBlock.Shape; -import com.simibubi.create.content.logistics.block.realityFunnel.BrassFunnelBlock; -import com.simibubi.create.content.logistics.block.realityFunnel.ChuteFunnelBlock; -import com.simibubi.create.content.logistics.block.realityFunnel.RealityFunnelBlock; +import com.simibubi.create.content.logistics.block.funnel.BrassFunnelBlock; +import com.simibubi.create.content.logistics.block.funnel.ChuteFunnelBlock; +import com.simibubi.create.content.logistics.block.funnel.FunnelBlock; import com.simibubi.create.foundation.gui.widgets.InterpolatedValue; import com.simibubi.create.foundation.tileEntity.SmartTileEntity; import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour; @@ -152,7 +152,7 @@ public class ChuteTileEntity extends SmartTileEntity implements IHaveGoggleInfor return false; if (stateBelow.get(BrassFunnelBlock.FACING) != Direction.UP) return false; - ItemStack remainder = RealityFunnelBlock.tryInsert(world, pos.down(), item, simulate); + ItemStack remainder = FunnelBlock.tryInsert(world, pos.down(), item, simulate); if (!simulate) setItem(remainder); return remainder.isEmpty(); @@ -190,7 +190,7 @@ public class ChuteTileEntity extends SmartTileEntity implements IHaveGoggleInfor if (AllBlocks.BRASS_FUNNEL.has(stateAbove)) { if (!stateAbove.get(BrassFunnelBlock.POWERED) && stateAbove.get(BrassFunnelBlock.FACING) == Direction.DOWN) { - ItemStack remainder = RealityFunnelBlock.tryInsert(world, pos.up(), item, simulate); + ItemStack remainder = FunnelBlock.tryInsert(world, pos.up(), item, simulate); if (remainder.isEmpty()) { if (!simulate) setItem(remainder); @@ -250,7 +250,7 @@ public class ChuteTileEntity extends SmartTileEntity implements IHaveGoggleInfor continue; if (funnelState.get(ChuteFunnelBlock.PUSHING)) continue; - ItemStack remainder = RealityFunnelBlock.tryInsert(world, funnelPos, item.copy(), world.isRemote); + ItemStack remainder = FunnelBlock.tryInsert(world, funnelPos, item.copy(), world.isRemote); if (remainder.getCount() != item.getCount() && !world.isRemote) setItem(remainder); } diff --git a/src/main/java/com/simibubi/create/content/logistics/block/realityFunnel/AndesiteBeltFunnelBlock.java b/src/main/java/com/simibubi/create/content/logistics/block/funnel/AndesiteBeltFunnelBlock.java similarity index 81% rename from src/main/java/com/simibubi/create/content/logistics/block/realityFunnel/AndesiteBeltFunnelBlock.java rename to src/main/java/com/simibubi/create/content/logistics/block/funnel/AndesiteBeltFunnelBlock.java index cfb9d5d95..8ce624cd4 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/realityFunnel/AndesiteBeltFunnelBlock.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/funnel/AndesiteBeltFunnelBlock.java @@ -1,4 +1,4 @@ -package com.simibubi.create.content.logistics.block.realityFunnel; +package com.simibubi.create.content.logistics.block.funnel; import com.simibubi.create.AllBlocks; diff --git a/src/main/java/com/simibubi/create/content/logistics/block/realityFunnel/AndesiteChuteFunnelBlock.java b/src/main/java/com/simibubi/create/content/logistics/block/funnel/AndesiteChuteFunnelBlock.java similarity index 81% rename from src/main/java/com/simibubi/create/content/logistics/block/realityFunnel/AndesiteChuteFunnelBlock.java rename to src/main/java/com/simibubi/create/content/logistics/block/funnel/AndesiteChuteFunnelBlock.java index a6a6e3f62..80bfc2baf 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/realityFunnel/AndesiteChuteFunnelBlock.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/funnel/AndesiteChuteFunnelBlock.java @@ -1,4 +1,4 @@ -package com.simibubi.create.content.logistics.block.realityFunnel; +package com.simibubi.create.content.logistics.block.funnel; import com.simibubi.create.AllBlocks; diff --git a/src/main/java/com/simibubi/create/content/logistics/block/realityFunnel/AndesiteFunnelBlock.java b/src/main/java/com/simibubi/create/content/logistics/block/funnel/AndesiteFunnelBlock.java similarity index 83% rename from src/main/java/com/simibubi/create/content/logistics/block/realityFunnel/AndesiteFunnelBlock.java rename to src/main/java/com/simibubi/create/content/logistics/block/funnel/AndesiteFunnelBlock.java index e537e8799..6a128adc6 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/realityFunnel/AndesiteFunnelBlock.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/funnel/AndesiteFunnelBlock.java @@ -1,11 +1,11 @@ -package com.simibubi.create.content.logistics.block.realityFunnel; +package com.simibubi.create.content.logistics.block.funnel; import com.simibubi.create.AllBlocks; import net.minecraft.block.BlockState; import net.minecraft.util.Direction; -public class AndesiteFunnelBlock extends RealityFunnelBlock { +public class AndesiteFunnelBlock extends FunnelBlock { public AndesiteFunnelBlock(Properties p_i48415_1_) { super(p_i48415_1_); diff --git a/src/main/java/com/simibubi/create/content/logistics/block/realityFunnel/BeltFunnelBlock.java b/src/main/java/com/simibubi/create/content/logistics/block/funnel/BeltFunnelBlock.java similarity index 96% rename from src/main/java/com/simibubi/create/content/logistics/block/realityFunnel/BeltFunnelBlock.java rename to src/main/java/com/simibubi/create/content/logistics/block/funnel/BeltFunnelBlock.java index a71f67a72..52cdc6e72 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/realityFunnel/BeltFunnelBlock.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/funnel/BeltFunnelBlock.java @@ -1,4 +1,4 @@ -package com.simibubi.create.content.logistics.block.realityFunnel; +package com.simibubi.create.content.logistics.block.funnel; import com.simibubi.create.AllBlocks; import com.simibubi.create.AllShapes; @@ -47,7 +47,7 @@ public abstract class BeltFunnelBlock extends HorizontalInteractionFunnelBlock { } } - public BeltFunnelBlock(BlockEntry parent, Properties p_i48377_1_) { + public BeltFunnelBlock(BlockEntry parent, Properties p_i48377_1_) { super(parent, p_i48377_1_); setDefaultState(getDefaultState().with(SHAPE, Shape.RETRACTED)); } diff --git a/src/main/java/com/simibubi/create/content/logistics/block/realityFunnel/BeltFunnelGenerator.java b/src/main/java/com/simibubi/create/content/logistics/block/funnel/BeltFunnelGenerator.java similarity index 96% rename from src/main/java/com/simibubi/create/content/logistics/block/realityFunnel/BeltFunnelGenerator.java rename to src/main/java/com/simibubi/create/content/logistics/block/funnel/BeltFunnelGenerator.java index 3c494de97..05fb003b2 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/realityFunnel/BeltFunnelGenerator.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/funnel/BeltFunnelGenerator.java @@ -1,4 +1,4 @@ -package com.simibubi.create.content.logistics.block.realityFunnel; +package com.simibubi.create.content.logistics.block.funnel; import com.simibubi.create.foundation.data.SpecialBlockStateGen; import com.tterrag.registrate.providers.DataGenContext; diff --git a/src/main/java/com/simibubi/create/content/logistics/block/realityFunnel/BrassBeltFunnelBlock.java b/src/main/java/com/simibubi/create/content/logistics/block/funnel/BrassBeltFunnelBlock.java similarity index 80% rename from src/main/java/com/simibubi/create/content/logistics/block/realityFunnel/BrassBeltFunnelBlock.java rename to src/main/java/com/simibubi/create/content/logistics/block/funnel/BrassBeltFunnelBlock.java index cf0ae9ef3..17dae6807 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/realityFunnel/BrassBeltFunnelBlock.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/funnel/BrassBeltFunnelBlock.java @@ -1,4 +1,4 @@ -package com.simibubi.create.content.logistics.block.realityFunnel; +package com.simibubi.create.content.logistics.block.funnel; import com.simibubi.create.AllBlocks; diff --git a/src/main/java/com/simibubi/create/content/logistics/block/realityFunnel/BrassChuteFunnelBlock.java b/src/main/java/com/simibubi/create/content/logistics/block/funnel/BrassChuteFunnelBlock.java similarity index 80% rename from src/main/java/com/simibubi/create/content/logistics/block/realityFunnel/BrassChuteFunnelBlock.java rename to src/main/java/com/simibubi/create/content/logistics/block/funnel/BrassChuteFunnelBlock.java index ad584afd2..cba22d4e5 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/realityFunnel/BrassChuteFunnelBlock.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/funnel/BrassChuteFunnelBlock.java @@ -1,4 +1,4 @@ -package com.simibubi.create.content.logistics.block.realityFunnel; +package com.simibubi.create.content.logistics.block.funnel; import com.simibubi.create.AllBlocks; diff --git a/src/main/java/com/simibubi/create/content/logistics/block/realityFunnel/BrassFunnelBlock.java b/src/main/java/com/simibubi/create/content/logistics/block/funnel/BrassFunnelBlock.java similarity index 94% rename from src/main/java/com/simibubi/create/content/logistics/block/realityFunnel/BrassFunnelBlock.java rename to src/main/java/com/simibubi/create/content/logistics/block/funnel/BrassFunnelBlock.java index c036722bd..42eb7bdd3 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/realityFunnel/BrassFunnelBlock.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/funnel/BrassFunnelBlock.java @@ -1,4 +1,4 @@ -package com.simibubi.create.content.logistics.block.realityFunnel; +package com.simibubi.create.content.logistics.block.funnel; import com.simibubi.create.AllBlocks; @@ -12,7 +12,7 @@ import net.minecraft.util.Direction; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -public class BrassFunnelBlock extends RealityFunnelBlock { +public class BrassFunnelBlock extends FunnelBlock { public static final BooleanProperty POWERED = BlockStateProperties.POWERED; diff --git a/src/main/java/com/simibubi/create/content/logistics/block/realityFunnel/ChuteFunnelBlock.java b/src/main/java/com/simibubi/create/content/logistics/block/funnel/ChuteFunnelBlock.java similarity index 87% rename from src/main/java/com/simibubi/create/content/logistics/block/realityFunnel/ChuteFunnelBlock.java rename to src/main/java/com/simibubi/create/content/logistics/block/funnel/ChuteFunnelBlock.java index 596f94a81..f059f6861 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/realityFunnel/ChuteFunnelBlock.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/funnel/ChuteFunnelBlock.java @@ -1,4 +1,4 @@ -package com.simibubi.create.content.logistics.block.realityFunnel; +package com.simibubi.create.content.logistics.block.funnel; import com.simibubi.create.AllShapes; import com.simibubi.create.content.logistics.block.chute.ChuteBlock; @@ -14,7 +14,7 @@ import net.minecraft.world.IWorldReader; public abstract class ChuteFunnelBlock extends HorizontalInteractionFunnelBlock { - public ChuteFunnelBlock(BlockEntry parent, Properties p_i48377_1_) { + public ChuteFunnelBlock(BlockEntry parent, Properties p_i48377_1_) { super(parent, p_i48377_1_); } diff --git a/src/main/java/com/simibubi/create/content/logistics/block/realityFunnel/ChuteFunnelGenerator.java b/src/main/java/com/simibubi/create/content/logistics/block/funnel/ChuteFunnelGenerator.java similarity index 95% rename from src/main/java/com/simibubi/create/content/logistics/block/realityFunnel/ChuteFunnelGenerator.java rename to src/main/java/com/simibubi/create/content/logistics/block/funnel/ChuteFunnelGenerator.java index fb78f26e4..1bc7fa6c2 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/realityFunnel/ChuteFunnelGenerator.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/funnel/ChuteFunnelGenerator.java @@ -1,4 +1,4 @@ -package com.simibubi.create.content.logistics.block.realityFunnel; +package com.simibubi.create.content.logistics.block.funnel; import com.simibubi.create.foundation.data.SpecialBlockStateGen; import com.tterrag.registrate.providers.DataGenContext; diff --git a/src/main/java/com/simibubi/create/content/logistics/block/realityFunnel/RealityFunnelBlock.java b/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelBlock.java similarity index 85% rename from src/main/java/com/simibubi/create/content/logistics/block/realityFunnel/RealityFunnelBlock.java rename to src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelBlock.java index 640f49b02..31684566b 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/realityFunnel/RealityFunnelBlock.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelBlock.java @@ -1,7 +1,8 @@ -package com.simibubi.create.content.logistics.block.realityFunnel; +package com.simibubi.create.content.logistics.block.funnel; import javax.annotation.Nullable; +import com.simibubi.create.AllBlocks; import com.simibubi.create.AllShapes; import com.simibubi.create.AllTileEntities; import com.simibubi.create.content.logistics.block.chute.ChuteBlock; @@ -35,9 +36,9 @@ import net.minecraft.world.IWorld; import net.minecraft.world.IWorldReader; import net.minecraft.world.World; -public abstract class RealityFunnelBlock extends ProperDirectionalBlock implements ITE { +public abstract class FunnelBlock extends ProperDirectionalBlock implements ITE { - public RealityFunnelBlock(Properties p_i48415_1_) { + public FunnelBlock(Properties p_i48415_1_) { super(p_i48415_1_); } @@ -59,13 +60,15 @@ public abstract class RealityFunnelBlock extends ProperDirectionalBlock implemen public ActionResultType onUse(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) { - if (hit.getFace() == getFunnelFacing(state)) { + ItemStack heldItem = player.getHeldItem(handIn); + boolean shouldntInsertItem = AllBlocks.MECHANICAL_ARM.isIn(heldItem); + + if (hit.getFace() == getFunnelFacing(state) && !shouldntInsertItem) { if (!worldIn.isRemote) withTileEntityDo(worldIn, pos, te -> { - ItemStack heldItem = player.getHeldItem(handIn) - .copy(); - ItemStack remainder = tryInsert(worldIn, pos, heldItem, false); - if (!ItemStack.areItemStacksEqual(remainder, heldItem)) + ItemStack toInsert = heldItem.copy(); + ItemStack remainder = tryInsert(worldIn, pos, toInsert, false); + if (!ItemStack.areItemStacksEqual(remainder, toInsert)) player.setHeldItem(handIn, remainder); }); return ActionResultType.SUCCESS; @@ -119,18 +122,18 @@ public abstract class RealityFunnelBlock extends ProperDirectionalBlock implemen @Override public TileEntity createTileEntity(BlockState state, IBlockReader world) { - return AllTileEntities.REALITY_FUNNEL.create(); + return AllTileEntities.FUNNEL.create(); } @Override public VoxelShape getShape(BlockState state, IBlockReader world, BlockPos pos, ISelectionContext context) { - return AllShapes.REALITY_FUNNEL.get(state.get(FACING)); + return AllShapes.FUNNEL.get(state.get(FACING)); } @Override public VoxelShape getCollisionShape(BlockState state, IBlockReader world, BlockPos pos, ISelectionContext context) { if (context.getEntity() instanceof ItemEntity) - return AllShapes.REALITY_FUNNEL_COLLISION.get(state.get(FACING)); + return AllShapes.FUNNEL_COLLISION.get(state.get(FACING)); return getShape(state, world, pos, context); } @@ -168,7 +171,7 @@ public abstract class RealityFunnelBlock extends ProperDirectionalBlock implemen Block block = world.getBlockState(pos.offset(state.get(FACING) .getOpposite())) .getBlock(); - return !(block instanceof RealityFunnelBlock) && !(block instanceof HorizontalInteractionFunnelBlock); + return !(block instanceof FunnelBlock) && !(block instanceof HorizontalInteractionFunnelBlock); } @Nullable @@ -195,13 +198,12 @@ public abstract class RealityFunnelBlock extends ProperDirectionalBlock implemen @Nullable public static boolean isFunnel(BlockState state) { - return state.getBlock() instanceof RealityFunnelBlock - || state.getBlock() instanceof HorizontalInteractionFunnelBlock; + return state.getBlock() instanceof FunnelBlock || state.getBlock() instanceof HorizontalInteractionFunnelBlock; } @Override - public Class getTileEntityClass() { - return RealityFunnelTileEntity.class; + public Class getTileEntityClass() { + return FunnelTileEntity.class; } } diff --git a/src/main/java/com/simibubi/create/content/logistics/block/realityFunnel/FunnelFilterSlotPositioning.java b/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelFilterSlotPositioning.java similarity index 91% rename from src/main/java/com/simibubi/create/content/logistics/block/realityFunnel/FunnelFilterSlotPositioning.java rename to src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelFilterSlotPositioning.java index 281213b2a..add0d05e1 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/realityFunnel/FunnelFilterSlotPositioning.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelFilterSlotPositioning.java @@ -1,8 +1,8 @@ -package com.simibubi.create.content.logistics.block.realityFunnel; +package com.simibubi.create.content.logistics.block.funnel; import com.mojang.blaze3d.matrix.MatrixStack; import com.simibubi.create.AllBlocks; -import com.simibubi.create.content.logistics.block.realityFunnel.BeltFunnelBlock.Shape; +import com.simibubi.create.content.logistics.block.funnel.BeltFunnelBlock.Shape; import com.simibubi.create.foundation.tileEntity.behaviour.ValueBoxTransform; import com.simibubi.create.foundation.utility.AngleHelper; import com.simibubi.create.foundation.utility.DirectionHelper; @@ -43,7 +43,7 @@ public class FunnelFilterSlotPositioning extends ValueBoxTransform.Sided { @Override protected void rotate(BlockState state, MatrixStack ms) { - Direction facing = RealityFunnelBlock.getFunnelFacing(state); + Direction facing = FunnelBlock.getFunnelFacing(state); if (!facing.getAxis() .isVertical() @@ -76,7 +76,7 @@ public class FunnelFilterSlotPositioning extends ValueBoxTransform.Sided { @Override protected boolean isSideActive(BlockState state, Direction direction) { - Direction facing = RealityFunnelBlock.getFunnelFacing(state); + Direction facing = FunnelBlock.getFunnelFacing(state); if (facing == null) return false; diff --git a/src/main/java/com/simibubi/create/content/logistics/block/realityFunnel/FunnelItem.java b/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelItem.java similarity index 89% rename from src/main/java/com/simibubi/create/content/logistics/block/realityFunnel/FunnelItem.java rename to src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelItem.java index 5a276a35f..adb57c068 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/realityFunnel/FunnelItem.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelItem.java @@ -1,4 +1,4 @@ -package com.simibubi.create.content.logistics.block.realityFunnel; +package com.simibubi.create.content.logistics.block.funnel; import net.minecraft.block.Block; import net.minecraft.block.BlockState; @@ -32,14 +32,14 @@ public class FunnelItem extends BlockItem { BlockState state = super.getStateForPlacement(ctx); if (state == null) return state; - if (!(state.getBlock() instanceof RealityFunnelBlock)) + if (!(state.getBlock() instanceof FunnelBlock)) return state; - Direction direction = state.get(RealityFunnelBlock.FACING); + Direction direction = state.get(FunnelBlock.FACING); if (!direction.getAxis() .isHorizontal()) return state; - RealityFunnelBlock block = (RealityFunnelBlock) getBlock(); + FunnelBlock block = (FunnelBlock) getBlock(); Block beltFunnelBlock = block.getEquivalentBeltFunnel(state) .getBlock(); Block chuteFunnelBlock = block.getEquivalentChuteFunnel(state) diff --git a/src/main/java/com/simibubi/create/content/logistics/block/realityFunnel/FunnelMovementBehaviour.java b/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelMovementBehaviour.java similarity index 95% rename from src/main/java/com/simibubi/create/content/logistics/block/realityFunnel/FunnelMovementBehaviour.java rename to src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelMovementBehaviour.java index a4521ec6e..c0cc9deef 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/realityFunnel/FunnelMovementBehaviour.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelMovementBehaviour.java @@ -1,4 +1,4 @@ -package com.simibubi.create.content.logistics.block.realityFunnel; +package com.simibubi.create.content.logistics.block.funnel; import java.util.List; diff --git a/src/main/java/com/simibubi/create/content/logistics/block/realityFunnel/RealityFunnelRenderer.java b/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelRenderer.java similarity index 79% rename from src/main/java/com/simibubi/create/content/logistics/block/realityFunnel/RealityFunnelRenderer.java rename to src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelRenderer.java index 49955aeaf..2c49402db 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/realityFunnel/RealityFunnelRenderer.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelRenderer.java @@ -1,4 +1,4 @@ -package com.simibubi.create.content.logistics.block.realityFunnel; +package com.simibubi.create.content.logistics.block.funnel; import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.vertex.IVertexBuilder; @@ -15,14 +15,14 @@ import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.Vec3d; -public class RealityFunnelRenderer extends SmartTileEntityRenderer { +public class FunnelRenderer extends SmartTileEntityRenderer { - public RealityFunnelRenderer(TileEntityRendererDispatcher dispatcher) { + public FunnelRenderer(TileEntityRendererDispatcher dispatcher) { super(dispatcher); } @Override - protected void renderSafe(RealityFunnelTileEntity te, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffer, + protected void renderSafe(FunnelTileEntity te, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffer, int light, int overlay) { super.renderSafe(te, partialTicks, ms, buffer, light, overlay); @@ -34,7 +34,7 @@ public class RealityFunnelRenderer extends SmartTileEntityRenderer tileEntityTypeIn) { + public FunnelTileEntity(TileEntityType tileEntityTypeIn) { super(tileEntityTypeIn); flap = new InterpolatedChasingValue().start(.25f) .target(0) @@ -51,7 +51,7 @@ public class RealityFunnelTileEntity extends SmartTileEntity { public Mode determineCurrentMode() { BlockState state = getBlockState(); - if (!RealityFunnelBlock.isFunnel(state)) + if (!FunnelBlock.isFunnel(state)) return Mode.INVALID; if (state.has(BlockStateProperties.POWERED) && state.get(BlockStateProperties.POWERED)) return Mode.PAUSED; @@ -60,7 +60,7 @@ public class RealityFunnelTileEntity extends SmartTileEntity { if (state.getBlock() instanceof ChuteFunnelBlock) return Mode.CHUTE_SIDE; - Direction facing = RealityFunnelBlock.getFunnelFacing(state); + Direction facing = FunnelBlock.getFunnelFacing(state); BlockState input = world.getBlockState(pos.offset(facing)); if (AllBlocks.CHUTE.has(input)) @@ -85,7 +85,7 @@ public class RealityFunnelTileEntity extends SmartTileEntity { public void tickAsHorizontalChuteFunnel() { if (!getBlockState().get(ChuteFunnelBlock.PUSHING)) return; - BlockPos chutePos = pos.offset(RealityFunnelBlock.getFunnelFacing(getBlockState())); + BlockPos chutePos = pos.offset(FunnelBlock.getFunnelFacing(getBlockState())); TileEntity te = world.getTileEntity(chutePos); if (!(te instanceof ChuteTileEntity)) return; @@ -97,7 +97,7 @@ public class RealityFunnelTileEntity extends SmartTileEntity { } public void tickAsVerticalChuteFunnel() { - Direction funnelFacing = RealityFunnelBlock.getFunnelFacing(getBlockState()); + Direction funnelFacing = FunnelBlock.getFunnelFacing(getBlockState()); BlockPos chutePos = pos.offset(funnelFacing); TileEntity te = world.getTileEntity(chutePos); if (!(te instanceof ChuteTileEntity)) @@ -167,7 +167,7 @@ public class RealityFunnelTileEntity extends SmartTileEntity { @Override public void addBehaviours(List behaviours) { Supplier>> direction = - Attachments.toward(() -> RealityFunnelBlock.getFunnelFacing(getBlockState()) + Attachments.toward(() -> FunnelBlock.getFunnelFacing(getBlockState()) .getOpposite()); inserting = new InsertingBehaviour(this, direction); diff --git a/src/main/java/com/simibubi/create/content/logistics/block/realityFunnel/HorizontalInteractionFunnelBlock.java b/src/main/java/com/simibubi/create/content/logistics/block/funnel/HorizontalInteractionFunnelBlock.java similarity index 89% rename from src/main/java/com/simibubi/create/content/logistics/block/realityFunnel/HorizontalInteractionFunnelBlock.java rename to src/main/java/com/simibubi/create/content/logistics/block/funnel/HorizontalInteractionFunnelBlock.java index 0e284bb4d..276a04ee5 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/realityFunnel/HorizontalInteractionFunnelBlock.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/funnel/HorizontalInteractionFunnelBlock.java @@ -1,4 +1,4 @@ -package com.simibubi.create.content.logistics.block.realityFunnel; +package com.simibubi.create.content.logistics.block.funnel; import com.simibubi.create.AllTileEntities; import com.simibubi.create.content.contraptions.wrench.IWrenchable; @@ -28,9 +28,9 @@ public abstract class HorizontalInteractionFunnelBlock extends HorizontalBlock i public static final BooleanProperty POWERED = BlockStateProperties.POWERED; public static final BooleanProperty PUSHING = BooleanProperty.create("pushing"); - private BlockEntry parent; + private BlockEntry parent; - public HorizontalInteractionFunnelBlock(BlockEntry parent, Properties p_i48377_1_) { + public HorizontalInteractionFunnelBlock(BlockEntry parent, Properties p_i48377_1_) { super(p_i48377_1_); this.parent = parent; BlockState defaultState = getDefaultState().with(PUSHING, true); @@ -48,7 +48,7 @@ public abstract class HorizontalInteractionFunnelBlock extends HorizontalBlock i @Override public TileEntity createTileEntity(BlockState state, IBlockReader world) { - return AllTileEntities.REALITY_FUNNEL.create(); + return AllTileEntities.FUNNEL.create(); } @Override @@ -71,7 +71,7 @@ public abstract class HorizontalInteractionFunnelBlock extends HorizontalBlock i 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() && !RealityFunnelBlock.isFunnel(p_196243_4_) + && (p_196243_1_.getBlock() != p_196243_4_.getBlock() && !FunnelBlock.isFunnel(p_196243_4_) || !p_196243_4_.hasTileEntity())) { p_196243_2_.removeTileEntity(p_196243_3_); } @@ -88,7 +88,7 @@ public abstract class HorizontalInteractionFunnelBlock extends HorizontalBlock i BlockPos pos, BlockPos p_196271_6_) { if (!canStillInteract(state, world, pos)) return parent.getDefaultState() - .with(RealityFunnelBlock.FACING, state.get(HORIZONTAL_FACING)); + .with(FunnelBlock.FACING, state.get(HORIZONTAL_FACING)); return state; } diff --git a/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmInteractionPoint.java b/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmInteractionPoint.java index f9250cf2d..980057350 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmInteractionPoint.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmInteractionPoint.java @@ -5,7 +5,8 @@ import javax.annotation.Nullable; import com.mojang.blaze3d.matrix.MatrixStack; import com.simibubi.create.AllBlockPartials; import com.simibubi.create.AllBlocks; -import com.simibubi.create.content.logistics.block.realityFunnel.RealityFunnelBlock; +import com.simibubi.create.content.logistics.block.belts.tunnel.BeltTunnelBlock; +import com.simibubi.create.content.logistics.block.funnel.FunnelBlock; import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour; import com.simibubi.create.foundation.tileEntity.behaviour.filtering.FilteringBehaviour; import com.simibubi.create.foundation.tileEntity.behaviour.inventory.InsertingBehaviour; @@ -69,7 +70,7 @@ public abstract class ArmInteractionPoint { static boolean isInteractable(BlockState state) { return AllBlocks.DEPOT.has(state) || AllBlocks.BELT.has(state) || AllBlocks.CHUTE.has(state) - || state.getBlock() instanceof RealityFunnelBlock; + || state.getBlock() instanceof FunnelBlock; } ArmAngleTarget getTargetAngles(BlockPos armPos) { @@ -121,11 +122,12 @@ public abstract class ArmInteractionPoint { if (AllBlocks.DEPOT.has(state)) point = new Depot(); - if (AllBlocks.BELT.has(state)) + if (AllBlocks.BELT.has(state) && !(world.getBlockState(pos.up()) + .getBlock() instanceof BeltTunnelBlock)) point = new Belt(); if (AllBlocks.CHUTE.has(state)) point = new Chute(); - if (state.getBlock() instanceof RealityFunnelBlock) + if (state.getBlock() instanceof FunnelBlock) point = new Funnel(); if (point != null) { @@ -193,7 +195,7 @@ public abstract class ArmInteractionPoint { @Override Vec3d getInteractionPositionVector() { return VecHelper.getCenterOf(pos) - .add(new Vec3d(RealityFunnelBlock.getFunnelFacing(state) + .add(new Vec3d(FunnelBlock.getFunnelFacing(state) .getDirectionVec()).scale(.5f)); } @@ -209,7 +211,7 @@ public abstract class ArmInteractionPoint { @Override Direction getInteractionDirection() { - return RealityFunnelBlock.getFunnelFacing(state) + return FunnelBlock.getFunnelFacing(state) .getOpposite(); } @@ -226,7 +228,7 @@ public abstract class ArmInteractionPoint { @Override boolean isValid(BlockState state) { - return state.getBlock() instanceof RealityFunnelBlock; + return state.getBlock() instanceof FunnelBlock; } @Override diff --git a/src/main/java/com/simibubi/create/content/logistics/block/redstone/RedstoneLinkBlock.java b/src/main/java/com/simibubi/create/content/logistics/block/redstone/RedstoneLinkBlock.java index 1a48f106e..bedc6d494 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/redstone/RedstoneLinkBlock.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/redstone/RedstoneLinkBlock.java @@ -3,7 +3,7 @@ package com.simibubi.create.content.logistics.block.redstone; import com.simibubi.create.AllShapes; import com.simibubi.create.AllTileEntities; import com.simibubi.create.content.contraptions.wrench.IWrenchable; -import com.simibubi.create.content.logistics.block.realityFunnel.RealityFunnelBlock; +import com.simibubi.create.content.logistics.block.funnel.FunnelBlock; import com.simibubi.create.foundation.block.ITE; import com.simibubi.create.foundation.block.ProperDirectionalBlock; import com.simibubi.create.foundation.utility.Iterate; @@ -165,7 +165,7 @@ public class RedstoneLinkBlock extends ProperDirectionalBlock implements ITE NonNullUnaryOperator> funnel( + public static NonNullUnaryOperator> funnel( String type, ResourceLocation particleTexture) { return b -> { return b.blockstate((c, p) -> { @@ -95,7 +96,7 @@ public class BuilderTransformers { .rotationY(state.get(BeltTunnelBlock.HORIZONTAL_AXIS) == Axis.X ? 0 : 90) .build(); })) - .item() + .item(BeltTunnelItem::new) .model((c, p) -> { String id = type + "_tunnel"; p.withExistingParent("item/" + id, p.modLoc("block/belt_tunnel/item")) diff --git a/src/main/resources/assets/create/textures/block/andesite_tunnel.png b/src/main/resources/assets/create/textures/block/andesite_tunnel.png index 36f1f6a1400623881837506903e4974469bbe125..6c6c41b10f859dd455a3a91c0af04de3eac7750c 100644 GIT binary patch delta 2676 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 l0p6002ovPDHLkV1i6?3{wCA