mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-26 06:53:24 +00:00
Begin telepad. Has multiblock functionality, nothing else just yet.
Also externalize teleport API
This commit is contained in:
1 parent
204b600424
commit
35835e2fe4
28 files changed
+307
-40
No files matched your search
@@ -21,6 +21,7 @@ import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import com.google.common.base.Charsets;
|
||||
@@ -498,6 +499,19 @@ public class Util {
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public static ForgeDirection getDirFromOffset(int xOff, int yOff, int zOff) {
|
||||
if(xOff != 0 && yOff == 0 && zOff == 0) {
|
||||
return xOff < 0 ? ForgeDirection.WEST : ForgeDirection.EAST;
|
||||
}
|
||||
if(zOff != 0 && yOff == 0 && xOff == 0) {
|
||||
return zOff < 0 ? ForgeDirection.NORTH : ForgeDirection.SOUTH;
|
||||
}
|
||||
if(yOff != 0 && xOff == 0 && zOff == 0) {
|
||||
return yOff < 0 ? ForgeDirection.DOWN : ForgeDirection.UP;
|
||||
}
|
||||
return ForgeDirection.UNKNOWN;
|
||||
}
|
||||
|
||||
// copied from WAILA source to avoid API dependency
|
||||
public static String WailaStyle = "\u00A4";
|
||||
|
||||
Reference in new issue
Block a user