mirror of
https://github.com/dragonruler1000/hdm-mod.git
synced 2025-06-29 08:29:33 -05:00
Fix incorrect remote check in Window block activation
Previously, the remote check in the `onBlockActivated` method was reversed, causing improper behavior. This update corrects the logic to handle block activation appropriately on the client side. Additionally, an unused import line was cleaned up for clarity. Signed-off-by: dragonruler1000 <github@me.minecraftchest2.us>
This commit is contained in:
parent
a540f3bf60
commit
9cad3a926e
1 changed files with 2 additions and 1 deletions
|
@ -22,6 +22,7 @@ import net.minecraft.util.text.StringTextComponent;
|
||||||
import net.minecraft.world.IBlockReader;
|
import net.minecraft.world.IBlockReader;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraft.world.server.ServerWorld;
|
import net.minecraft.world.server.ServerWorld;
|
||||||
|
//import us.minecraftchest2.hdm_mod.world.dimension.ModDimensions;
|
||||||
import us.minecraftchest2.hdm_mod.world.dimension.ModDimensions;
|
import us.minecraftchest2.hdm_mod.world.dimension.ModDimensions;
|
||||||
import us.minecraftchest2.hdm_mod.world.dimension.SimpleTeleporter;
|
import us.minecraftchest2.hdm_mod.world.dimension.SimpleTeleporter;
|
||||||
|
|
||||||
|
@ -101,7 +102,7 @@ public class Window extends HorizontalBlock {
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
@Override
|
@Override
|
||||||
public ActionResultType onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) {
|
public ActionResultType onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) {
|
||||||
if (!worldIn.isRemote()) return super.onBlockActivated(state, worldIn, pos, player, handIn, hit);
|
if (worldIn.isRemote()) return super.onBlockActivated(state, worldIn, pos, player, handIn, hit);
|
||||||
if (player.isCrouching()) return super.onBlockActivated(state, worldIn, pos, player, handIn, hit);
|
if (player.isCrouching()) return super.onBlockActivated(state, worldIn, pos, player, handIn, hit);
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue