Merge branch 'master' into 1.15
# Conflicts: # src/main/java/carpet/mixins/ServerPlayNetworkHandler_scarpetEventsMixin.java # src/main/java/carpet/script/CarpetExpression.java
This commit is contained in:
commit
dc9532cf05
24 files changed
+1695
-655
No files matched your search
@@ -13,6 +13,7 @@ import net.minecraft.item.ItemPlacementContext;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.server.world.ServerWorld;
|
||||
import net.minecraft.util.GlobalPos;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.hit.BlockHitResult;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
@@ -254,6 +255,14 @@ public class BlockValue extends Value
|
||||
return new BlockValue(blockState, world, pos);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode()
|
||||
{
|
||||
if (world != null && pos != null )
|
||||
return GlobalPos.create(world.getDimension().getType(), pos).hashCode();
|
||||
return ("b"+getString()).hashCode();
|
||||
}
|
||||
|
||||
public BlockPos getPos()
|
||||
{
|
||||
return pos;
|
||||
|
||||
Reference in new issue
Block a user