This repository has been archived on 2023-11-26. You can view files and clone it, but cannot push or open issues or pull requests.
EnergonRelics/src/main/java/com/thebrokenrail/energonrelics/util/BlockPosWithDimension.java

27 lines
786 B
Java
Raw Normal View History

2020-07-21 02:39:30 +00:00
package com.thebrokenrail.energonrelics.util;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.registry.RegistryKey;
import net.minecraft.world.World;
public class BlockPosWithDimension {
public final BlockPos pos;
public final RegistryKey<World> dimension;
public BlockPosWithDimension(BlockPos pos, RegistryKey<World> dimension) {
this.pos = pos;
this.dimension = dimension;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
} else if (obj instanceof BlockPosWithDimension) {
return pos.equals(((BlockPosWithDimension) obj).pos) && dimension.equals(((BlockPosWithDimension) obj).dimension);
} else {
return false;
}
}
}