mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-17 02:45:13 +00:00
Fix dispensers checking valid cocoa directions on own pos, closes #3159
This commit is contained in:
1 parent
12e67ab394
commit
4f5adbe992
1 file changed
+1
-1
@@ -33,7 +33,7 @@ public class BehaviourCocoaBeans extends DefaultDispenseItemBehavior {
|
||||
Direction facing = source.getBlockState().get(DispenserBlock.FACING);
|
||||
BlockPos pos = source.getBlockPos().offset(facing);
|
||||
World world = source.getWorld();
|
||||
BlockItemUseContext ctx = new DirectionalPlaceContext(source.getWorld(), source.getBlockPos(), facing, new ItemStack(block), facing.getOpposite());
|
||||
BlockItemUseContext ctx = new DirectionalPlaceContext(source.getWorld(), source.getBlockPos().offset(facing), facing, new ItemStack(block), facing.getOpposite());
|
||||
BlockState cocoa = block.getStateForPlacement(ctx);
|
||||
if(cocoa != null && world.isAirBlock(pos)) {
|
||||
world.setBlockState(pos, cocoa);
|
||||
|
||||
Reference in new issue
Block a user