mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-11-10 12:33:57 +01:00
Fix-ups from testing I
- Fixed central block of waterwheels still able to catch fire - Fixed vertical belts accepting items
This commit is contained in:
parent
653b1e7909
commit
a92c08b1e1
@ -188,6 +188,8 @@ public class BeltBlockEntity extends KineticBlockEntity {
|
||||
public <T> LazyOptional<T> getCapability(Capability<T> cap, Direction side) {
|
||||
if (!isItemHandlerCap(cap))
|
||||
return super.getCapability(cap, side);
|
||||
if (!BeltBlock.canTransportObjects(getBlockState()))
|
||||
return super.getCapability(cap, side);
|
||||
if (!isRemoved() && !itemHandler.isPresent())
|
||||
initializeItemHandler();
|
||||
return itemHandler.cast();
|
||||
@ -489,6 +491,8 @@ public class BeltBlockEntity extends KineticBlockEntity {
|
||||
ItemStack inserted = transportedStack.stack;
|
||||
ItemStack empty = ItemStack.EMPTY;
|
||||
|
||||
if (!BeltBlock.canTransportObjects(getBlockState()))
|
||||
return inserted;
|
||||
if (nextBeltController == null)
|
||||
return inserted;
|
||||
BeltInventory nextInventory = nextBeltController.getInventory();
|
||||
|
@ -10,6 +10,7 @@ import org.apache.commons.lang3.mutable.MutableBoolean;
|
||||
import com.simibubi.create.AllBlocks;
|
||||
import com.simibubi.create.Create;
|
||||
import com.simibubi.create.content.kinetics.base.KineticBlockEntity;
|
||||
import com.simibubi.create.content.kinetics.belt.BeltBlock;
|
||||
import com.simibubi.create.content.kinetics.belt.BeltBlockEntity;
|
||||
import com.simibubi.create.content.kinetics.belt.BeltHelper;
|
||||
import com.simibubi.create.content.kinetics.belt.behaviour.TransportedItemStackHandlerBehaviour;
|
||||
@ -114,7 +115,7 @@ public class AllArmInteractionPointTypes {
|
||||
@Override
|
||||
public boolean canCreatePoint(Level level, BlockPos pos, BlockState state) {
|
||||
return AllBlocks.BELT.has(state) && !(level.getBlockState(pos.above())
|
||||
.getBlock() instanceof BeltTunnelBlock);
|
||||
.getBlock() instanceof BeltTunnelBlock) && BeltBlock.canTransportObjects(state);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -19,6 +19,7 @@ import net.minecraft.world.InteractionResult;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.context.BlockPlaceContext;
|
||||
import net.minecraft.world.item.context.UseOnContext;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.LevelAccessor;
|
||||
import net.minecraft.world.level.LevelReader;
|
||||
@ -170,4 +171,9 @@ public class LargeWaterWheelBlock extends RotatedPillarKineticBlock implements I
|
||||
return Couple.create(4, 4);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFlammable(BlockState state, BlockGetter level, BlockPos pos, Direction direction) {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -19,6 +19,7 @@ import net.minecraft.world.InteractionHand;
|
||||
import net.minecraft.world.InteractionResult;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.context.BlockPlaceContext;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.LevelAccessor;
|
||||
import net.minecraft.world.level.LevelReader;
|
||||
@ -131,4 +132,9 @@ public class WaterWheelBlock extends DirectionalKineticBlock implements IBE<Wate
|
||||
return Couple.create(8, 8);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFlammable(BlockState state, BlockGetter level, BlockPos pos, Direction direction) {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user