mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2024-12-14 04:00:30 +00:00
Replace magic values with Forge constants
Gonna have to replace these in 1.17 as Minecraft exposes these by default!
This commit is contained in:
parent
d9b3f17b52
commit
603119e1e6
@ -16,6 +16,7 @@ import net.minecraft.util.ActionResultType;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.BlockRayTraceResult;
|
||||
import net.minecraftforge.common.util.Constants;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
@ -35,7 +36,7 @@ public abstract class TileGeneric extends TileEntity
|
||||
setChanged();
|
||||
BlockPos pos = getBlockPos();
|
||||
BlockState state = getBlockState();
|
||||
getLevel().sendBlockUpdated( pos, state, state, 3 );
|
||||
getLevel().sendBlockUpdated( pos, state, state, Constants.BlockFlags.DEFAULT );
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
|
@ -33,6 +33,7 @@ import net.minecraft.util.text.StringTextComponent;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.common.util.Constants;
|
||||
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
import net.minecraftforge.items.wrapper.InvWrapper;
|
||||
@ -324,7 +325,7 @@ public class TurtlePlaceCommand implements ITurtleCommand
|
||||
}
|
||||
}
|
||||
signTile.setChanged();
|
||||
world.sendBlockUpdated( tile.getBlockPos(), tile.getBlockState(), tile.getBlockState(), 3 );
|
||||
world.sendBlockUpdated( tile.getBlockPos(), tile.getBlockState(), tile.getBlockState(), Constants.BlockFlags.DEFAULT );
|
||||
}
|
||||
|
||||
private static class ErrorMessage
|
||||
|
Loading…
Reference in New Issue
Block a user