From 047129eefe39f6cd42261a4f7e734a7ec431b536 Mon Sep 17 00:00:00 2001 From: simibubi <31564874+simibubi@users.noreply.github.com> Date: Sun, 22 May 2022 18:17:31 +0200 Subject: [PATCH] Merge artifacts --- .../components/steam/SteamEngineTileEntity.java | 8 +++----- .../components/steam/whistle/WhistleTileEntity.java | 9 ++++----- .../content/contraptions/fluids/tank/FluidTankBlock.java | 4 ++-- .../contraptions/fluids/tank/FluidTankTileEntity.java | 1 + .../block/mechanicalArm/AllArmInteractionPointTypes.java | 3 ++- 5 files changed, 12 insertions(+), 13 deletions(-) diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/steam/SteamEngineTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/steam/SteamEngineTileEntity.java index 0610f799a..4440c0ba3 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/steam/SteamEngineTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/steam/SteamEngineTileEntity.java @@ -9,7 +9,6 @@ import com.simibubi.create.AllBlocks; import com.simibubi.create.content.contraptions.base.GeneratingKineticTileEntity; import com.simibubi.create.content.contraptions.base.IRotate; import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer; -import com.simibubi.create.content.contraptions.fluids.tank.FluidTankConnectivityHandler; import com.simibubi.create.content.contraptions.fluids.tank.FluidTankTileEntity; import com.simibubi.create.content.contraptions.goggles.IHaveGoggleInformation; import com.simibubi.create.foundation.tileEntity.SmartTileEntity; @@ -114,10 +113,9 @@ public class SteamEngineTileEntity extends SmartTileEntity implements IHaveGoggl if (tank != null) source = new WeakReference<>(null); Direction facing = SteamEngineBlock.getFacing(getBlockState()); - FluidTankTileEntity anyTankAt = - FluidTankConnectivityHandler.anyTankAt(level, worldPosition.relative(facing.getOpposite())); - if (anyTankAt != null) - source = new WeakReference<>(tank = anyTankAt); + BlockEntity be = level.getBlockEntity(worldPosition.relative(facing.getOpposite())); + if (be instanceof FluidTankTileEntity tankTe) + source = new WeakReference<>(tank = tankTe); } if (tank == null) return null; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/steam/whistle/WhistleTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/steam/whistle/WhistleTileEntity.java index 4e2dbfa1d..3e16007f7 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/steam/whistle/WhistleTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/steam/whistle/WhistleTileEntity.java @@ -8,7 +8,6 @@ import com.simibubi.create.AllSoundEvents; import com.simibubi.create.content.contraptions.components.steam.SteamJetParticleData; import com.simibubi.create.content.contraptions.components.steam.whistle.WhistleBlock.WhistleSize; import com.simibubi.create.content.contraptions.components.steam.whistle.WhistleExtenderBlock.WhistleExtenderShape; -import com.simibubi.create.content.contraptions.fluids.tank.FluidTankConnectivityHandler; import com.simibubi.create.content.contraptions.fluids.tank.FluidTankTileEntity; import com.simibubi.create.content.contraptions.goggles.IHaveGoggleInformation; import com.simibubi.create.foundation.tileEntity.SmartTileEntity; @@ -26,6 +25,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.TextComponent; import net.minecraft.util.Mth; +import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.Vec3; @@ -161,10 +161,9 @@ public class WhistleTileEntity extends SmartTileEntity implements IHaveGoggleInf if (tank != null) source = new WeakReference<>(null); Direction facing = WhistleBlock.getAttachedDirection(getBlockState()); - FluidTankTileEntity anyTankAt = - FluidTankConnectivityHandler.anyTankAt(level, worldPosition.relative(facing)); - if (anyTankAt != null) - source = new WeakReference<>(tank = anyTankAt); + BlockEntity be = level.getBlockEntity(worldPosition.relative(facing)); + if (be instanceof FluidTankTileEntity tankTe) + source = new WeakReference<>(tank = tankTe); } if (tank == null) return null; diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/tank/FluidTankBlock.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/tank/FluidTankBlock.java index fb2784836..c8cde9367 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/fluids/tank/FluidTankBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/tank/FluidTankBlock.java @@ -333,9 +333,9 @@ public class FluidTankBlock extends Block implements IWrenchable, ITE