mirror of
https://github.com/GTNewHorizons/ForgeRelocation.git
synced 2026-11-12 00:17:58 +00:00
Rewrite of library and movement engine
This commit is contained in:
1 parent
ff3e4183d3
commit
d6731ef60b
62 files changed
+2265
-2197
No files matched your search
Executable
+39
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* Copyright (c) 2015.
|
||||
* Created by MrTJP.
|
||||
* All rights reserved.
|
||||
*/
|
||||
package mrtjp.relocation.api;
|
||||
|
||||
/**
|
||||
* Lightweight block position object used to keep dependencies confined
|
||||
* to the api package, used by some of the API's methods.
|
||||
*/
|
||||
public class BlockPos
|
||||
{
|
||||
public int x;
|
||||
public int y;
|
||||
public int z;
|
||||
|
||||
public BlockPos(int x, int y, int z)
|
||||
{
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
}
|
||||
|
||||
public boolean equals(Object obj)
|
||||
{
|
||||
if(!(obj instanceof BlockPos)) return false;
|
||||
else
|
||||
{
|
||||
BlockPos o2 = (BlockPos) obj;
|
||||
return this.x == o2.x && this.y == o2.y && this.z == o2.z;
|
||||
}
|
||||
}
|
||||
|
||||
public int hashCode()
|
||||
{
|
||||
return (this.x^this.z)*31+this.y;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user