From 49d0e480e184380869e7d61918a02289a8daee05 Mon Sep 17 00:00:00 2001 From: Modmuss50 Date: Mon, 20 Apr 2015 21:28:54 +0100 Subject: [PATCH] Removed modmussCore --- build.gradle | 1 - src/main/java/techreborn/lib/Functions.java | 45 ++ src/main/java/techreborn/lib/Location.java | 271 +++++++++++ .../java/techreborn/lib/vecmath/Vecs3d.java | 431 ++++++++++++++++++ .../techreborn/lib/vecmath/Vecs3dCube.java | 161 +++++++ .../partSystem/ICustomHighlight.java | 13 + .../java/techreborn/partSystem/IModPart.java | 4 +- .../techreborn/partSystem/IPartProvider.java | 4 +- .../java/techreborn/partSystem/ModPart.java | 2 +- .../techreborn/partSystem/ModPartUtils.java | 4 +- .../partSystem/QLib/ModLib2QLib.java | 4 +- .../techreborn/partSystem/QLib/QModPart.java | 4 +- .../partSystem/QLib/QModPartFactory.java | 10 +- .../partSystem/block/BlockModPart.java | 8 +- .../partSystem/block/RenderModPart.java | 4 +- .../partSystem/block/TileEntityModPart.java | 10 +- .../partSystem/block/WorldProvider.java | 4 +- .../client/PartPlacementRenderer.java | 8 +- .../techreborn/partSystem/fmp/FMPFactory.java | 4 +- .../techreborn/partSystem/fmp/FMPModPart.java | 8 +- .../partSystem/parts/CablePart.java | 6 +- .../techreborn/partSystem/parts/NullPart.java | 6 +- 22 files changed, 966 insertions(+), 46 deletions(-) create mode 100644 src/main/java/techreborn/lib/Functions.java create mode 100644 src/main/java/techreborn/lib/Location.java create mode 100644 src/main/java/techreborn/lib/vecmath/Vecs3d.java create mode 100644 src/main/java/techreborn/lib/vecmath/Vecs3dCube.java create mode 100644 src/main/java/techreborn/partSystem/ICustomHighlight.java diff --git a/build.gradle b/build.gradle index a2b739f18..c3168341a 100644 --- a/build.gradle +++ b/build.gradle @@ -85,7 +85,6 @@ dependencies { compile "codechicken:ForgeMultipart:1.7.10-1.1.2.331:dev" compile "mcp.mobius.waila:Waila:1.5.10_1.7.10:dev" compile 'com.mod-buildcraft:buildcraft:6.4.8:dev' - compile "ModmussCore-17:ModmussCore-1.7:1.1.+:dev" compile "qmunity:QmunityLib:0.1.+:deobf" grabDep('ThermalFoundation-[1.7.10]1.0.0-81.jar', 'http://addons-origin.cursecdn.com/files/2233/780/ThermalFoundation-[1.7.10]1.0.0-81.jar') grabDep('CoFHCore-[1.7.10]3.0.2-262.jar', 'http://addons-origin.cursecdn.com/files/2234/198/CoFHCore-[1.7.10]3.0.2-262.jar') diff --git a/src/main/java/techreborn/lib/Functions.java b/src/main/java/techreborn/lib/Functions.java new file mode 100644 index 000000000..a025d3576 --- /dev/null +++ b/src/main/java/techreborn/lib/Functions.java @@ -0,0 +1,45 @@ +package techreborn.lib; + +import net.minecraftforge.common.util.ForgeDirection; + +public class Functions { + public static int getIntDirFromDirection(ForgeDirection dir) { + switch (dir) { + case DOWN: + return 0; + case EAST: + return 5; + case NORTH: + return 2; + case SOUTH: + return 3; + case UNKNOWN: + return 0; + case UP: + return 1; + case WEST: + return 4; + default: + return 0; + } + } + + public static ForgeDirection getDirectionFromInt(int dir) { + int metaDataToSet = 0; + switch (dir) { + case 0: + metaDataToSet = 2; + break; + case 1: + metaDataToSet = 4; + break; + case 2: + metaDataToSet = 3; + break; + case 3: + metaDataToSet = 5; + break; + } + return ForgeDirection.getOrientation(metaDataToSet); + } +} diff --git a/src/main/java/techreborn/lib/Location.java b/src/main/java/techreborn/lib/Location.java new file mode 100644 index 000000000..a8b9401cc --- /dev/null +++ b/src/main/java/techreborn/lib/Location.java @@ -0,0 +1,271 @@ +package techreborn.lib; + +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.world.ChunkPosition; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; + +public class Location { + public int x; + public int y; + public int z; + public int depth; + + public Location(int x, int y, int z) { + this.x = x; + this.y = y; + this.z = z; + } + + public Location(int x, int y, int z, int depth) { + this.x = x; + this.y = y; + this.z = z; + this.depth = depth; + } + + + public Location(int xCoord, int yCoord, int zCoord, ForgeDirection dir) { + this.x = xCoord + dir.offsetX; + this.y = yCoord + dir.offsetY; + this.z = zCoord + dir.offsetZ; + } + + public Location(int[] coords) { + if (coords.length >= 2) { + this.x = coords[0]; + this.y = coords[1]; + this.z = coords[2]; + } + } + + public Location(ChunkPosition pos) { + if (pos != null) { + this.x = pos.chunkPosX; + this.y = pos.chunkPosY; + this.z = pos.chunkPosZ; + } + } + + public Location(MovingObjectPosition blockLookedAt) { + if (blockLookedAt != null) { + this.x = blockLookedAt.blockX; + this.y = blockLookedAt.blockY; + this.z = blockLookedAt.blockZ; + } + } + + public Location(TileEntity par1) + { + this.x = par1.xCoord; + this.y = par1.yCoord; + this.z = par1.zCoord; + } + + public boolean equals(Location toTest) { + if (this.x == toTest.x && this.y == toTest.y && this.z == toTest.z) { + return true; + } + return false; + } + + public void setLocation(int x, int y, int z) { + this.x = x; + this.y = y; + this.z = z; + } + + public int getX() { + return this.x; + } + + public void setX(int newX) { + this.x = newX; + } + + public int getY() { + return this.y; + } + + public void setY(int newY) { + this.y = newY; + } + + public int getZ() { + return this.z; + } + + public void setZ(int newZ) { + this.z = newZ; + } + + public int[] getLocation() { + int[] ret = new int[3]; + ret[0] = this.x; + ret[1] = this.y; + ret[2] = this.z; + return ret; + } + + public void setLocation(int[] coords) { + this.x = coords[0]; + this.y = coords[1]; + this.z = coords[2]; + } + + public int getDifference(Location otherLoc) { + return (int) Math.sqrt(Math.pow(this.x - otherLoc.x, 2) + Math.pow(this.y - otherLoc.y, 2) + Math.pow(this.z - otherLoc.z, 2)); + } + + public String printLocation() { + return "X: " + this.x + " Y: " + this.y + " Z: " + this.z; + } + + public String printCoords() { + return this.x + ", " + this.y + ", " + this.z; + } + + public boolean compare(int x, int y, int z) { + return (this.x == x && this.y == y && this.z == z); + } + + public Location getLocation(ForgeDirection dir) { + return new Location(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ); + } + + public Location modifyPositionFromSide(ForgeDirection side, int amount) + { + switch (side.ordinal()) + { + case 0: + this.y -= amount; + break; + case 1: + this.y += amount; + break; + case 2: + this.z -= amount; + break; + case 3: + this.z += amount; + break; + case 4: + this.x -= amount; + break; + case 5: + this.x += amount; + break; + } + return this; + } + + public Location modifyPositionFromSide(ForgeDirection side) + { + return this.modifyPositionFromSide(side, 1); + } + + /** + * This will load the chunk. + */ + public TileEntity getTileEntity(IBlockAccess world) + { + return world.getTileEntity(this.x, this.y, this.z); + } + + public final Location clone() + { + return new Location(this.x, this.y, this.z); + } + + /** + * No chunk load: returns null if chunk to side is unloaded + */ + public TileEntity getTileEntityOnSide(World world, ForgeDirection side) + { + int x = this.x; + int y = this.y; + int z = this.z; + switch (side.ordinal()) + { + case 0: + y--; + break; + case 1: + y++; + break; + case 2: + z--; + break; + case 3: + z++; + break; + case 4: + x--; + break; + case 5: + x++; + break; + default: + return null; + } + if (world.blockExists(x, y, z)) + { + return world.getTileEntity(x, y, z); + } + else + { + return null; + } + } + + /** + * No chunk load: returns null if chunk to side is unloaded + */ + public TileEntity getTileEntityOnSide(World world, int side) + { + int x = this.x; + int y = this.y; + int z = this.z; + switch (side) + { + case 0: + y--; + break; + case 1: + y++; + break; + case 2: + z--; + break; + case 3: + z++; + break; + case 4: + x--; + break; + case 5: + x++; + break; + default: + return null; + } + if (world.blockExists(x, y, z)) + { + return world.getTileEntity(x, y, z); + } + else + { + return null; + } + } + + public int getDepth() { + return depth; + } + + public int compareTo(Location o) { + return ((Integer)depth).compareTo(o.depth); + } +} diff --git a/src/main/java/techreborn/lib/vecmath/Vecs3d.java b/src/main/java/techreborn/lib/vecmath/Vecs3d.java new file mode 100644 index 000000000..9805c50b3 --- /dev/null +++ b/src/main/java/techreborn/lib/vecmath/Vecs3d.java @@ -0,0 +1,431 @@ +package techreborn.lib.vecmath; + +import cpw.mods.fml.common.FMLCommonHandler; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.client.Minecraft; +import net.minecraft.init.Blocks; +import net.minecraft.server.MinecraftServer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.Vec3; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; + +import java.util.StringTokenizer; + +public class Vecs3d { + protected double x, y, z; + protected World w = null; + + public Vecs3d(double x, double y, double z) { + + this.x = x; + this.y = y; + this.z = z; + } + + public Vecs3d(double x, double y, double z, World w) { + + this(x, y, z); + this.w = w; + } + + public Vecs3d(TileEntity te) { + + this(te.xCoord, te.yCoord, te.zCoord, te.getWorldObj()); + } + + public Vecs3d(Vec3 vec) { + + this(vec.xCoord, vec.yCoord, vec.zCoord); + } + + public Vecs3d(Vec3 vec, World w) { + + this(vec.xCoord, vec.yCoord, vec.zCoord); + this.w = w; + } + + public boolean hasWorld() { + + return w != null; + } + + public Vecs3d add(double x, double y, double z) { + + this.x += x; + this.y += y; + this.z += z; + return this; + } + + public Vecs3d add(ForgeDirection dir) { + + return add(dir.offsetX, dir.offsetY, dir.offsetZ); + } + + public Vecs3d add(Vecs3d vec) { + + return add(vec.x, vec.y, vec.z); + } + + public Vecs3d sub(double x, double y, double z) { + + this.x -= x; + this.y -= y; + this.z -= z; + return this; + } + + public Vecs3d sub(ForgeDirection dir) { + + return sub(dir.offsetX, dir.offsetY, dir.offsetZ); + } + + public Vecs3d sub(Vecs3d vec) { + + return sub(vec.x, vec.y, vec.z); + } + + public Vecs3d mul(double x, double y, double z) { + + this.x *= x; + this.y *= y; + this.z *= z; + return this; + } + + public Vecs3d mul(double multiplier) { + + return mul(multiplier, multiplier, multiplier); + } + + public Vecs3d mul(ForgeDirection direction) { + + return mul(direction.offsetX, direction.offsetY, direction.offsetZ); + } + + public Vecs3d multiply(Vecs3d v) { + + return mul(v.getX(), v.getY(), v.getZ()); + } + + public Vecs3d div(double x, double y, double z) { + + this.x /= x; + this.y /= y; + this.z /= z; + return this; + } + + public Vecs3d div(double multiplier) { + + return div(multiplier, multiplier, multiplier); + } + + public Vecs3d div(ForgeDirection direction) { + + return div(direction.offsetX, direction.offsetY, direction.offsetZ); + } + + public double length() { + + return Math.sqrt(x * x + y * y + z * z); + } + + public Vecs3d normalize() { + + Vecs3d v = clone(); + + double len = length(); + + if (len == 0) + return v; + + v.x /= len; + v.y /= len; + v.z /= len; + + return v; + } + + public Vecs3d abs() { + + return new Vecs3d(Math.abs(x), Math.abs(y), Math.abs(z)); + } + + public double dot(Vecs3d v) { + + return x * v.getX() + y * v.getY() + z * v.getZ(); + } + + public Vecs3d cross(Vecs3d v) { + + return new Vecs3d(y * v.getZ() - z * v.getY(), x * v.getZ() - z * v.getX(), x * v.getY() - y * v.getX()); + } + + public Vecs3d getRelative(double x, double y, double z) { + + return clone().add(x, y, z); + } + + public Vecs3d getRelative(ForgeDirection dir) { + + return getRelative(dir.offsetX, dir.offsetY, dir.offsetZ); + } + + public ForgeDirection getDirectionTo(Vecs3d vec) { + + for (ForgeDirection d : ForgeDirection.VALID_DIRECTIONS) + if (getBlockX() + d.offsetX == vec.getBlockX() && getBlockY() + d.offsetY == vec.getBlockY() + && getBlockZ() + d.offsetZ == vec.getBlockZ()) + return d; + return null; + } + + public boolean isZero() { + + return x == 0 && y == 0 && z == 0; + } + + @Override + public Vecs3d clone() { + + return new Vecs3d(x, y, z, w); + } + + public boolean hasTileEntity() { + + if (hasWorld()) { + return w.getTileEntity((int) x, (int) y, (int) z) != null; + } + return false; + } + + public TileEntity getTileEntity() { + + if (hasTileEntity()) { + return w.getTileEntity((int) x, (int) y, (int) z); + } + return null; + } + + public boolean isBlock(Block b) { + + return isBlock(b, false); + } + + public boolean isBlock(Block b, boolean checkAir) { + + if (hasWorld()) { + Block bl = w.getBlock((int) x, (int) y, (int) z); + + if (b == null && bl == Blocks.air) + return true; + if (b == null && checkAir && bl.getMaterial() == Material.air) + return true; + if (b == null && checkAir && bl.isAir(w, (int) x, (int) y, (int) z)) + return true; + + return bl.getClass().isInstance(b); + } + return false; + } + + public int getBlockMeta() { + + if (hasWorld()) { + return w.getBlockMetadata((int) x, (int) y, (int) z); + } + return -1; + } + + public Block getBlock() { + + return getBlock(false); + } + + public Block getBlock(boolean airIsNull) { + + if (hasWorld()) { + if (airIsNull && isBlock(null, true)) + return null; + return w.getBlock((int) x, (int) y, (int) z); + + } + return null; + } + + public World getWorld() { + + return w; + } + + public Vecs3d setWorld(World world) { + + w = world; + + return this; + } + + public double getX() { + + return x; + } + + public double getY() { + + return y; + } + + public double getZ() { + + return z; + } + + public int getBlockX() { + + return (int) Math.floor(x); + } + + public int getBlockY() { + + return (int) Math.floor(y); + } + + public int getBlockZ() { + + return (int) Math.floor(z); + } + + public double distanceTo(Vecs3d vec) { + + return distanceTo(vec.x, vec.y, vec.z); + } + + public double distanceTo(double x, double y, double z) { + + double dx = x - this.x; + double dy = y - this.y; + double dz = z - this.z; + return dx * dx + dy * dy + dz * dz; + } + + public void setX(double x) { + + this.x = x; + } + + public void setY(double y) { + + this.y = y; + } + + public void setZ(double z) { + + this.z = z; + } + + @Override + public boolean equals(Object obj) { + + if (obj instanceof Vecs3d) { + Vecs3d vec = (Vecs3d) obj; + return vec.w == w && vec.x == x && vec.y == y && vec.z == z; + } + return false; + } + + @Override + public int hashCode() { + + return new Double(x).hashCode() + new Double(y).hashCode() << 8 + new Double(z).hashCode() << 16; + } + + public Vec3 toVec3() { + + return Vec3.createVectorHelper(x, y, z); + } + + @Override + public String toString() { + + String s = "Vector3{"; + if (hasWorld()) + s += "w=" + w.provider.dimensionId + ";"; + s += "x=" + x + ";y=" + y + ";z=" + z + "}"; + return s; + } + + public ForgeDirection toForgeDirection() { + + if (z == 1) + return ForgeDirection.SOUTH; + if (z == -1) + return ForgeDirection.NORTH; + + if (x == 1) + return ForgeDirection.EAST; + if (x == -1) + return ForgeDirection.WEST; + + if (y == 1) + return ForgeDirection.UP; + if (y == -1) + return ForgeDirection.DOWN; + + return ForgeDirection.UNKNOWN; + } + + public static Vecs3d fromString(String s) { + + if (s.startsWith("Vector3{") && s.endsWith("}")) { + World w = null; + double x = 0, y = 0, z = 0; + String s2 = s.substring(s.indexOf("{") + 1, s.lastIndexOf("}")); + StringTokenizer st = new StringTokenizer(s2, ";"); + while (st.hasMoreTokens()) { + String t = st.nextToken(); + + if (t.toLowerCase().startsWith("w")) { + int world = Integer.parseInt(t.split("=")[1]); + if (FMLCommonHandler.instance().getEffectiveSide().isServer()) { + for (World wo : MinecraftServer.getServer().worldServers) { + if (wo.provider.dimensionId == world) { + w = wo; + break; + } + } + } else { + w = getClientWorld(world); + } + } + + if (t.toLowerCase().startsWith("x")) + x = Double.parseDouble(t.split("=")[1]); + if (t.toLowerCase().startsWith("y")) + y = Double.parseDouble(t.split("=")[1]); + if (t.toLowerCase().startsWith("z")) + z = Double.parseDouble(t.split("=")[1]); + } + + if (w != null) { + return new Vecs3d(x, y, z, w); + } else { + return new Vecs3d(x, y, z); + } + } + return null; + } + + @SideOnly(Side.CLIENT) + private static World getClientWorld(int world) { + + if (Minecraft.getMinecraft().theWorld.provider.dimensionId != world) + return null; + return Minecraft.getMinecraft().theWorld; + } + +} \ No newline at end of file diff --git a/src/main/java/techreborn/lib/vecmath/Vecs3dCube.java b/src/main/java/techreborn/lib/vecmath/Vecs3dCube.java new file mode 100644 index 000000000..a6eed9e1e --- /dev/null +++ b/src/main/java/techreborn/lib/vecmath/Vecs3dCube.java @@ -0,0 +1,161 @@ +package techreborn.lib.vecmath; + +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.world.World; + + +import java.util.List; + +public class Vecs3dCube { + + private Vecs3d min, max; + + public Vecs3dCube(double minX, double minY, double minZ, double maxX, double maxY, double maxZ) { + + this(minX, minY, minZ, maxX, maxY, maxZ, (World) null); + } + + public Vecs3dCube(double minX, double minY, double minZ, double maxX, double maxY, double maxZ, World world) { + + this(new Vecs3d(minX, minY, minZ, world), new Vecs3d(maxX, maxY, maxZ, world)); + } + + public Vecs3dCube(Vecs3d a, Vecs3d b) { + + World w = a.getWorld(); + if (w == null) + w = b.getWorld(); + + min = a; + max = b; + + fix(); + } + + + public Vecs3dCube(AxisAlignedBB aabb) { + + this(aabb.minX, aabb.minY, aabb.minZ, aabb.maxX, aabb.maxY, aabb.maxZ); + } + + public Vecs3d getMin() { + + return min; + } + + public Vecs3d getMax() { + + return max; + } + + public Vecs3d getCenter() { + + return new Vecs3d((getMinX() + getMaxX()) / 2D, (getMinY() + getMaxY()) / 2D, (getMinZ() + getMaxZ()) / 2D, getMin().getWorld()); + } + + public double getMinX() { + + return min.getX(); + } + + public double getMinY() { + + return min.getY(); + } + + public double getMinZ() { + + return min.getZ(); + } + + public double getMaxX() { + + return max.getX(); + } + + public double getMaxY() { + + return max.getY(); + } + + public double getMaxZ() { + + return max.getZ(); + } + + public AxisAlignedBB toAABB() { + + return AxisAlignedBB.getBoundingBox(getMinX(), getMinY(), getMinZ(), getMaxX(), getMaxY(), getMaxZ()); + } + + @Override + public Vecs3dCube clone() { + + return new Vecs3dCube(min.clone(), max.clone()); + } + + public Vecs3dCube expand(double size) { + + min.sub(size, size, size); + max.add(size, size, size); + + return this; + } + + public Vecs3dCube fix() { + + Vecs3d a = min.clone(); + Vecs3d b = max.clone(); + + double minX = Math.min(a.getX(), b.getX()); + double minY = Math.min(a.getY(), b.getY()); + double minZ = Math.min(a.getZ(), b.getZ()); + + double maxX = Math.max(a.getX(), b.getX()); + double maxY = Math.max(a.getY(), b.getY()); + double maxZ = Math.max(a.getZ(), b.getZ()); + + min = new Vecs3d(minX, minY, minZ, a.w); + max = new Vecs3d(maxX, maxY, maxZ, b.w); + + return this; + } + + public Vecs3dCube add(double x, double y, double z) { + + min.add(x, y, z); + max.add(x, y, z); + + return this; + } + + public static final Vecs3dCube merge(List cubes) { + + double minx = Double.MAX_VALUE; + double miny = Double.MAX_VALUE; + double minz = Double.MAX_VALUE; + double maxx = Double.MIN_VALUE; + double maxy = Double.MIN_VALUE; + double maxz = Double.MIN_VALUE; + + for (Vecs3dCube c : cubes) { + minx = Math.min(minx, c.getMinX()); + miny = Math.min(miny, c.getMinY()); + minz = Math.min(minz, c.getMinZ()); + maxx = Math.max(maxx, c.getMaxX()); + maxy = Math.max(maxy, c.getMaxY()); + maxz = Math.max(maxz, c.getMaxZ()); + } + + if (cubes.size() == 0) + return new Vecs3dCube(0, 0, 0, 0, 0, 0); + + return new Vecs3dCube(minx, miny, minz, maxx, maxy, maxz); + } + + @Override + public int hashCode() { + + return min.hashCode() << 8 + max.hashCode(); + } +} diff --git a/src/main/java/techreborn/partSystem/ICustomHighlight.java b/src/main/java/techreborn/partSystem/ICustomHighlight.java new file mode 100644 index 000000000..57c409594 --- /dev/null +++ b/src/main/java/techreborn/partSystem/ICustomHighlight.java @@ -0,0 +1,13 @@ +package techreborn.partSystem; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.world.World; + +import java.util.ArrayList; + +public interface ICustomHighlight { + + ArrayList getBoxes(World world, int x, int y, int z, EntityPlayer player); + +} diff --git a/src/main/java/techreborn/partSystem/IModPart.java b/src/main/java/techreborn/partSystem/IModPart.java index 1822a83ef..b0f12c1fe 100644 --- a/src/main/java/techreborn/partSystem/IModPart.java +++ b/src/main/java/techreborn/partSystem/IModPart.java @@ -6,12 +6,12 @@ package techreborn.partSystem; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import me.modmuss50.mods.lib.vecmath.Vecs3d; -import me.modmuss50.mods.lib.vecmath.Vecs3dCube; import net.minecraft.entity.Entity; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; +import techreborn.lib.vecmath.Vecs3d; +import techreborn.lib.vecmath.Vecs3dCube; import java.util.List; diff --git a/src/main/java/techreborn/partSystem/IPartProvider.java b/src/main/java/techreborn/partSystem/IPartProvider.java index e9f6bc795..a552229fd 100644 --- a/src/main/java/techreborn/partSystem/IPartProvider.java +++ b/src/main/java/techreborn/partSystem/IPartProvider.java @@ -4,12 +4,12 @@ package techreborn.partSystem; -import me.modmuss50.mods.lib.Location; -import me.modmuss50.mods.lib.vecmath.Vecs3dCube; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; +import techreborn.lib.Location; +import techreborn.lib.vecmath.Vecs3dCube; public interface IPartProvider { diff --git a/src/main/java/techreborn/partSystem/ModPart.java b/src/main/java/techreborn/partSystem/ModPart.java index 531e5ce0a..23d30e014 100644 --- a/src/main/java/techreborn/partSystem/ModPart.java +++ b/src/main/java/techreborn/partSystem/ModPart.java @@ -5,9 +5,9 @@ package techreborn.partSystem; -import me.modmuss50.mods.lib.Location; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; +import techreborn.lib.Location; /** diff --git a/src/main/java/techreborn/partSystem/ModPartUtils.java b/src/main/java/techreborn/partSystem/ModPartUtils.java index 5deeb702c..9f9957edb 100644 --- a/src/main/java/techreborn/partSystem/ModPartUtils.java +++ b/src/main/java/techreborn/partSystem/ModPartUtils.java @@ -4,10 +4,10 @@ package techreborn.partSystem; -import me.modmuss50.mods.lib.Location; -import me.modmuss50.mods.lib.vecmath.Vecs3dCube; import net.minecraft.item.Item; import net.minecraft.world.World; +import techreborn.lib.Location; +import techreborn.lib.vecmath.Vecs3dCube; import java.util.Map; diff --git a/src/main/java/techreborn/partSystem/QLib/ModLib2QLib.java b/src/main/java/techreborn/partSystem/QLib/ModLib2QLib.java index 8afebe98c..fd1f9fb0e 100644 --- a/src/main/java/techreborn/partSystem/QLib/ModLib2QLib.java +++ b/src/main/java/techreborn/partSystem/QLib/ModLib2QLib.java @@ -4,8 +4,8 @@ package techreborn.partSystem.QLib; -import me.modmuss50.mods.lib.vecmath.Vecs3d; -import me.modmuss50.mods.lib.vecmath.Vecs3dCube; +import techreborn.lib.vecmath.Vecs3d; +import techreborn.lib.vecmath.Vecs3dCube; import uk.co.qmunity.lib.vec.Vec3d; import uk.co.qmunity.lib.vec.Vec3dCube; diff --git a/src/main/java/techreborn/partSystem/QLib/QModPart.java b/src/main/java/techreborn/partSystem/QLib/QModPart.java index ad95d0caa..42cf58083 100644 --- a/src/main/java/techreborn/partSystem/QLib/QModPart.java +++ b/src/main/java/techreborn/partSystem/QLib/QModPart.java @@ -4,8 +4,8 @@ package techreborn.partSystem.QLib; -import me.modmuss50.mods.lib.Location; -import me.modmuss50.mods.lib.vecmath.Vecs3dCube; +import techreborn.lib.Location; +import techreborn.lib.vecmath.Vecs3dCube; import techreborn.partSystem.ModPart; import net.minecraft.entity.Entity; import net.minecraft.item.ItemStack; diff --git a/src/main/java/techreborn/partSystem/QLib/QModPartFactory.java b/src/main/java/techreborn/partSystem/QLib/QModPartFactory.java index 88595d13d..4cce84803 100644 --- a/src/main/java/techreborn/partSystem/QLib/QModPartFactory.java +++ b/src/main/java/techreborn/partSystem/QLib/QModPartFactory.java @@ -4,11 +4,7 @@ package techreborn.partSystem.QLib; -import me.modmuss50.mods.lib.Location; -import me.modmuss50.mods.lib.vecmath.Vecs3dCube; -import techreborn.partSystem.IPartProvider; -import techreborn.partSystem.ModPart; -import techreborn.partSystem.ModPartRegistry; +import techreborn.lib.Location; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; @@ -16,6 +12,10 @@ import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.Vec3; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; +import techreborn.lib.vecmath.Vecs3dCube; +import techreborn.partSystem.IPartProvider; +import techreborn.partSystem.ModPart; +import techreborn.partSystem.ModPartRegistry; import uk.co.qmunity.lib.QLModInfo; import uk.co.qmunity.lib.part.IPart; import uk.co.qmunity.lib.part.IPartFactory; diff --git a/src/main/java/techreborn/partSystem/block/BlockModPart.java b/src/main/java/techreborn/partSystem/block/BlockModPart.java index 536d41a2f..b4f3fa1fd 100644 --- a/src/main/java/techreborn/partSystem/block/BlockModPart.java +++ b/src/main/java/techreborn/partSystem/block/BlockModPart.java @@ -4,10 +4,6 @@ package techreborn.partSystem.block; -import me.modmuss50.mods.lib.client.ICustomHighlight; -import me.modmuss50.mods.lib.vecmath.Vecs3dCube; -import techreborn.partSystem.IModPart; -import techreborn.partSystem.ModPart; import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; @@ -20,6 +16,10 @@ import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.Vec3; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; +import techreborn.lib.vecmath.Vecs3dCube; +import techreborn.partSystem.ICustomHighlight; +import techreborn.partSystem.IModPart; +import techreborn.partSystem.ModPart; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/techreborn/partSystem/block/RenderModPart.java b/src/main/java/techreborn/partSystem/block/RenderModPart.java index 89ca37f28..1509049b4 100644 --- a/src/main/java/techreborn/partSystem/block/RenderModPart.java +++ b/src/main/java/techreborn/partSystem/block/RenderModPart.java @@ -5,11 +5,11 @@ package techreborn.partSystem.block; -import me.modmuss50.mods.lib.vecmath.Vecs3d; -import techreborn.partSystem.ModPart; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.tileentity.TileEntity; import org.lwjgl.opengl.GL11; +import techreborn.lib.vecmath.Vecs3d; +import techreborn.partSystem.ModPart; public class RenderModPart extends TileEntitySpecialRenderer { @Override diff --git a/src/main/java/techreborn/partSystem/block/TileEntityModPart.java b/src/main/java/techreborn/partSystem/block/TileEntityModPart.java index 349ce6db8..a03acc697 100644 --- a/src/main/java/techreborn/partSystem/block/TileEntityModPart.java +++ b/src/main/java/techreborn/partSystem/block/TileEntityModPart.java @@ -4,11 +4,6 @@ package techreborn.partSystem.block; -import me.modmuss50.mods.lib.Location; -import me.modmuss50.mods.lib.vecmath.Vecs3dCube; -import techreborn.partSystem.ModPart; -import techreborn.partSystem.ModPartRegistry; -import techreborn.partSystem.parts.NullPart; import net.minecraft.entity.Entity; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; @@ -18,6 +13,11 @@ import net.minecraft.network.play.server.S35PacketUpdateTileEntity; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.World; +import techreborn.lib.Location; +import techreborn.lib.vecmath.Vecs3dCube; +import techreborn.partSystem.ModPart; +import techreborn.partSystem.ModPartRegistry; +import techreborn.partSystem.parts.NullPart; import java.util.ArrayList; import java.util.HashMap; diff --git a/src/main/java/techreborn/partSystem/block/WorldProvider.java b/src/main/java/techreborn/partSystem/block/WorldProvider.java index 67142cec1..3fc4970a1 100644 --- a/src/main/java/techreborn/partSystem/block/WorldProvider.java +++ b/src/main/java/techreborn/partSystem/block/WorldProvider.java @@ -6,8 +6,8 @@ package techreborn.partSystem.block; import cpw.mods.fml.client.registry.ClientRegistry; import cpw.mods.fml.common.registry.GameRegistry; -import me.modmuss50.mods.lib.Location; -import me.modmuss50.mods.lib.vecmath.Vecs3dCube; +import techreborn.lib.Location; +import techreborn.lib.vecmath.Vecs3dCube; import techreborn.partSystem.IPartProvider; import techreborn.partSystem.ModPart; import net.minecraft.block.Block; diff --git a/src/main/java/techreborn/partSystem/client/PartPlacementRenderer.java b/src/main/java/techreborn/partSystem/client/PartPlacementRenderer.java index 4462084dd..8ef849b70 100644 --- a/src/main/java/techreborn/partSystem/client/PartPlacementRenderer.java +++ b/src/main/java/techreborn/partSystem/client/PartPlacementRenderer.java @@ -3,10 +3,6 @@ package techreborn.partSystem.client; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import me.modmuss50.mods.lib.Location; -import me.modmuss50.mods.lib.vecmath.Vecs3d; -import techreborn.partSystem.IModPart; -import techreborn.partSystem.ModPartItem; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.ScaledResolution; import net.minecraft.client.renderer.Tessellator; @@ -18,6 +14,10 @@ import net.minecraft.util.Vec3; import net.minecraftforge.client.event.RenderWorldLastEvent; import net.minecraftforge.common.util.ForgeDirection; import org.lwjgl.opengl.GL11; +import techreborn.lib.Location; +import techreborn.lib.vecmath.Vecs3d; +import techreborn.partSystem.IModPart; +import techreborn.partSystem.ModPartItem; /** * This is based of https://github.com/Qmunity/QmunityLib/blob/master/src%2Fmain%2Fjava%2Fuk%2Fco%2Fqmunity%2Flib%2Fclient%2Frender%2FRenderPartPlacement.java diff --git a/src/main/java/techreborn/partSystem/fmp/FMPFactory.java b/src/main/java/techreborn/partSystem/fmp/FMPFactory.java index 16e8a121a..2662b023f 100644 --- a/src/main/java/techreborn/partSystem/fmp/FMPFactory.java +++ b/src/main/java/techreborn/partSystem/fmp/FMPFactory.java @@ -10,8 +10,8 @@ import codechicken.multipart.MultiPartRegistry; import codechicken.multipart.NormallyOccludedPart; import codechicken.multipart.TMultiPart; import codechicken.multipart.TileMultipart; -import me.modmuss50.mods.lib.Location; -import me.modmuss50.mods.lib.vecmath.Vecs3dCube; +import techreborn.lib.Location; +import techreborn.lib.vecmath.Vecs3dCube; import techreborn.partSystem.IPartProvider; import techreborn.partSystem.ModPart; import techreborn.partSystem.ModPartRegistry; diff --git a/src/main/java/techreborn/partSystem/fmp/FMPModPart.java b/src/main/java/techreborn/partSystem/fmp/FMPModPart.java index 71770b1a4..87e2e02eb 100644 --- a/src/main/java/techreborn/partSystem/fmp/FMPModPart.java +++ b/src/main/java/techreborn/partSystem/fmp/FMPModPart.java @@ -15,13 +15,13 @@ import codechicken.multipart.TMultiPart; import codechicken.multipart.TSlottedPart; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import me.modmuss50.mods.lib.Location; -import me.modmuss50.mods.lib.vecmath.Vecs3d; -import me.modmuss50.mods.lib.vecmath.Vecs3dCube; -import techreborn.partSystem.ModPart; import net.minecraft.entity.Entity; import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.World; +import techreborn.lib.Location; +import techreborn.lib.vecmath.Vecs3d; +import techreborn.lib.vecmath.Vecs3dCube; +import techreborn.partSystem.ModPart; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/techreborn/partSystem/parts/CablePart.java b/src/main/java/techreborn/partSystem/parts/CablePart.java index ea1fcb11a..29d055058 100644 --- a/src/main/java/techreborn/partSystem/parts/CablePart.java +++ b/src/main/java/techreborn/partSystem/parts/CablePart.java @@ -5,9 +5,6 @@ import ic2.api.energy.event.EnergyTileUnloadEvent; import ic2.api.energy.tile.IEnergyConductor; import ic2.api.energy.tile.IEnergyTile; import ic2.core.IC2; -import me.modmuss50.mods.lib.Functions; -import me.modmuss50.mods.lib.vecmath.Vecs3d; -import me.modmuss50.mods.lib.vecmath.Vecs3dCube; import net.minecraft.entity.Entity; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; @@ -15,6 +12,9 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.util.ForgeDirection; +import techreborn.lib.Functions; +import techreborn.lib.vecmath.Vecs3d; +import techreborn.lib.vecmath.Vecs3dCube; import techreborn.partSystem.ModPart; import techreborn.partSystem.ModPartUtils; diff --git a/src/main/java/techreborn/partSystem/parts/NullPart.java b/src/main/java/techreborn/partSystem/parts/NullPart.java index 73231e00f..855309941 100644 --- a/src/main/java/techreborn/partSystem/parts/NullPart.java +++ b/src/main/java/techreborn/partSystem/parts/NullPart.java @@ -4,12 +4,12 @@ package techreborn.partSystem.parts; -import me.modmuss50.mods.lib.vecmath.Vecs3d; -import me.modmuss50.mods.lib.vecmath.Vecs3dCube; -import techreborn.partSystem.ModPart; import net.minecraft.entity.Entity; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; +import techreborn.lib.vecmath.Vecs3d; +import techreborn.lib.vecmath.Vecs3dCube; +import techreborn.partSystem.ModPart; import java.util.ArrayList; import java.util.List;