mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-11-13 05:54:17 +01:00
Prevent Spectators from interacting with some create blocks/items (#5414)
- Spectators can no longer interact with Super Glue and Valve Handles
This commit is contained in:
parent
07883a588d
commit
cfee3aff76
@ -189,6 +189,8 @@ public class SuperGlueSelectionHandler {
|
||||
|
||||
if (!isGlue(player.getMainHandItem()))
|
||||
return false;
|
||||
if(!player.mayBuild())
|
||||
return false;
|
||||
|
||||
if (attack) {
|
||||
if (selected == null)
|
||||
|
@ -64,6 +64,8 @@ public class ValveHandleBlock extends HandCrankBlock {
|
||||
|
||||
if (!(blockState.getBlock() instanceof ValveHandleBlock vhb))
|
||||
return;
|
||||
if (!player.mayBuild())
|
||||
return;
|
||||
if (AllItems.WRENCH.isIn(player.getItemInHand(event.getHand())) && player.isSteppingCarefully())
|
||||
return;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user