mirror of
https://github.com/dragonruler1000/hdm-mod.git
synced 2025-06-29 08:29:33 -05:00
Adding a block activated check.
Signed-off-by: dragonruler1000 <github@me.minecraftchest2.us>
This commit is contained in:
parent
c06d73ebff
commit
6915d2ae90
1 changed files with 2 additions and 0 deletions
|
@ -77,6 +77,8 @@ public class Window extends HorizontalBlock {
|
||||||
@Override
|
@Override
|
||||||
public ActionResultType onBlockActivated(BlockState state, World worldIn, BlockPos pos,
|
public ActionResultType onBlockActivated(BlockState state, World worldIn, BlockPos pos,
|
||||||
PlayerEntity player, Hand handIn, BlockRayTraceResult hit) {
|
PlayerEntity player, Hand handIn, BlockRayTraceResult hit) {
|
||||||
|
player.sendMessage(new StringTextComponent("Block activated"), player.getUniqueID());
|
||||||
|
|
||||||
if (!worldIn.isRemote()) {
|
if (!worldIn.isRemote()) {
|
||||||
if (!player.isCrouching()) {
|
if (!player.isCrouching()) {
|
||||||
MinecraftServer server = worldIn.getServer();
|
MinecraftServer server = worldIn.getServer();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue