minecraft-source/src/net/minecraft/world/item/GameMasterBlockItem.java

20 lines
636 B
Java
Raw Normal View History

2020-07-22 06:23:34 +01:00
package net.minecraft.world.item;
import javax.annotation.Nullable;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.Block;
public class GameMasterBlockItem extends BlockItem {
2020-07-22 06:25:47 +01:00
public GameMasterBlockItem(final Block bpe, final Properties a) {
super(bpe, a);
2020-07-22 06:23:34 +01:00
}
@Nullable
@Override
2020-07-22 06:25:47 +01:00
protected BlockState getPlacementState(final BlockPlaceContext bcn) {
final Player ayg3 = bcn.getPlayer();
return (ayg3 == null || ayg3.canUseGameMasterBlocks()) ? super.getPlacementState(bcn) : null;
2020-07-22 06:23:34 +01:00
}
}