Fixed hopper & dropper pedestal iteraction, added comparator ouytput for pedestals
This commit is contained in:
parent
d9aa50fe1c
commit
0180fcf11e
3 changed files with 33 additions and 9 deletions
|
@ -109,7 +109,7 @@ public class BlockPedestal extends BlockBaseNotFull implements BlockEntityProvid
|
|||
if (pedestal.isEmpty()) {
|
||||
ItemStack itemStack = player.getStackInHand(hand);
|
||||
if (itemStack.isEmpty()) return ActionResult.CONSUME;
|
||||
pedestal.setStack(world, state, itemStack.split(1));
|
||||
pedestal.setStack(0, itemStack.split(1));
|
||||
return ActionResult.SUCCESS;
|
||||
} else {
|
||||
ItemStack itemStack = pedestal.getStack(0);
|
||||
|
@ -305,6 +305,17 @@ public class BlockPedestal extends BlockBaseNotFull implements BlockEntityProvid
|
|||
return new PedestalBlockEntity();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasComparatorOutput(BlockState state) {
|
||||
return state.getBlock() instanceof BlockPedestal;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getComparatorOutput(BlockState state, World world, BlockPos pos) {
|
||||
System.out.println(state.get(HAS_ITEM));
|
||||
return state.get(HAS_ITEM) ? 15 : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getStatesPattern(Reader data) {
|
||||
String texture = Registry.BLOCK.getId(this).getPath();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue