mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-22 04:52:25 +00:00
Of course, the issue isn't on Minecraft's end, it has to do with Coord4D hashing. Coord4D no longer extends BlockPos to prevent hash issues
This commit is contained in:
1 parent
c6f3c162f9
commit
ddfe83c495
70 files changed
+458
-1032
No files matched your search
@@ -511,16 +511,16 @@ public class ItemBlockMachine extends ItemBlock implements IEnergizedItem, ISpec
|
||||
else {
|
||||
if(pos.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK)
|
||||
{
|
||||
Coord4D coord = new Coord4D(pos.getBlockPos(), world.provider.getDimensionId());
|
||||
Coord4D coord = new Coord4D(pos.getBlockPos(), world);
|
||||
|
||||
if(!world.provider.canMineBlock(entityplayer, coord))
|
||||
if(!world.provider.canMineBlock(entityplayer, coord.getPos()))
|
||||
{
|
||||
return itemstack;
|
||||
}
|
||||
|
||||
if(!entityplayer.isSneaking())
|
||||
{
|
||||
if(!entityplayer.canPlayerEdit(coord, pos.sideHit, itemstack))
|
||||
if(!entityplayer.canPlayerEdit(coord.getPos(), pos.sideHit, itemstack))
|
||||
{
|
||||
return itemstack;
|
||||
}
|
||||
@@ -546,7 +546,7 @@ public class ItemBlockMachine extends ItemBlock implements IEnergizedItem, ISpec
|
||||
setFluidStack(newStack, itemstack);
|
||||
}
|
||||
|
||||
world.setBlockToAir(coord);
|
||||
world.setBlockToAir(coord.getPos());
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -559,12 +559,12 @@ public class ItemBlockMachine extends ItemBlock implements IEnergizedItem, ISpec
|
||||
|
||||
Coord4D trans = coord.offset(pos.sideHit);
|
||||
|
||||
if(!entityplayer.canPlayerEdit(trans, pos.sideHit, itemstack))
|
||||
if(!entityplayer.canPlayerEdit(trans.getPos(), pos.sideHit, itemstack))
|
||||
{
|
||||
return itemstack;
|
||||
}
|
||||
|
||||
if(tryPlaceContainedLiquid(world, itemstack, trans) && !entityplayer.capabilities.isCreativeMode)
|
||||
if(tryPlaceContainedLiquid(world, itemstack, trans.getPos()) && !entityplayer.capabilities.isCreativeMode)
|
||||
{
|
||||
FluidStack newStack = stored.copy();
|
||||
newStack.amount -= FluidContainerRegistry.BUCKET_VOLUME;
|
||||
|
||||
Reference in new issue
Block a user