Updated onUse for better client handling
This commit is contained in:
parent
9bf8b8f5d9
commit
563d579aab
|
@ -215,7 +215,10 @@ public class WDWireBlock extends Block{
|
||||||
@Override // For each link, set to break and update the blocks around me (above and below)
|
@Override // For each link, set to break and update the blocks around me (above and below)
|
||||||
public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit){
|
public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit){
|
||||||
if(world.isClient)
|
if(world.isClient)
|
||||||
return ActionResult.SUCCESS;
|
if(hasConnection(state) && !player.hasStackEquipped(EquipmentSlot.MAINHAND))
|
||||||
|
return ActionResult.SUCCESS;
|
||||||
|
else
|
||||||
|
return ActionResult.PASS;
|
||||||
if(player.abilities.allowModifyWorld)
|
if(player.abilities.allowModifyWorld)
|
||||||
if(hasConnection(state) && !player.hasStackEquipped(EquipmentSlot.MAINHAND)) {
|
if(hasConnection(state) && !player.hasStackEquipped(EquipmentSlot.MAINHAND)) {
|
||||||
Iterator<Direction> dirItr = Direction.Type.HORIZONTAL.iterator();
|
Iterator<Direction> dirItr = Direction.Type.HORIZONTAL.iterator();
|
||||||
|
|
Loading…
Reference in New Issue