hash code and stump of map
This commit is contained in:
1 parent
b6fe264a76
commit
8b7b285503
12 files changed
+125
-5
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