Reformatted all the code using the default intelji formatting options.
This commit is contained in:
parent
2f63a24070
commit
e0ab0af822
363 changed files with 20524 additions and 23016 deletions
|
@ -13,82 +13,82 @@ import java.util.Map;
|
|||
|
||||
public class ModPartUtils {
|
||||
|
||||
public static boolean checkOcclusion(World world, Location location,
|
||||
Vecs3dCube cube) {
|
||||
if (world == null) {
|
||||
return false;
|
||||
}
|
||||
IPartProvider partProvider = getPartProvider(world, location);
|
||||
if (partProvider != null) {
|
||||
return partProvider.checkOcclusion(world, location, cube);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public static boolean checkOcclusion(World world, Location location,
|
||||
Vecs3dCube cube) {
|
||||
if (world == null) {
|
||||
return false;
|
||||
}
|
||||
IPartProvider partProvider = getPartProvider(world, location);
|
||||
if (partProvider != null) {
|
||||
return partProvider.checkOcclusion(world, location, cube);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean checkOcclusion(World world, int x, int y, int z, Vecs3dCube cube) {
|
||||
return !checkOcclusion(world, new Location(x, y, z), cube);
|
||||
}
|
||||
public static boolean checkOcclusion(World world, int x, int y, int z, Vecs3dCube cube) {
|
||||
return !checkOcclusion(world, new Location(x, y, z), cube);
|
||||
}
|
||||
|
||||
public static boolean checkOcclusionInvert(World world, Location location,
|
||||
Vecs3dCube cube) {
|
||||
if (world == null) {
|
||||
return false;
|
||||
}
|
||||
for (IPartProvider iPartProvider : ModPartRegistry.providers) {
|
||||
if (!iPartProvider.checkOcclusion(world, location, cube)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public static boolean checkOcclusionInvert(World world, Location location,
|
||||
Vecs3dCube cube) {
|
||||
if (world == null) {
|
||||
return false;
|
||||
}
|
||||
for (IPartProvider iPartProvider : ModPartRegistry.providers) {
|
||||
if (!iPartProvider.checkOcclusion(world, location, cube)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean checkOcclusionInvert(World world, int x, int y,
|
||||
int z, Vecs3dCube cube) {
|
||||
return checkOcclusionInvert(world, new Location(x, y, z), cube);
|
||||
}
|
||||
public static boolean checkOcclusionInvert(World world, int x, int y,
|
||||
int z, Vecs3dCube cube) {
|
||||
return checkOcclusionInvert(world, new Location(x, y, z), cube);
|
||||
}
|
||||
|
||||
public static boolean hasPart(World world, Location location, String name) {
|
||||
for (IPartProvider iPartProvider : ModPartRegistry.providers) {
|
||||
if (iPartProvider.hasPart(world, location, name)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public static boolean hasPart(World world, Location location, String name) {
|
||||
for (IPartProvider iPartProvider : ModPartRegistry.providers) {
|
||||
if (iPartProvider.hasPart(world, location, name)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean hasPart(World world, int x, int y, int z, String name) {
|
||||
return hasPart(world, new Location(x, y, z), name);
|
||||
}
|
||||
public static boolean hasPart(World world, int x, int y, int z, String name) {
|
||||
return hasPart(world, new Location(x, y, z), name);
|
||||
}
|
||||
|
||||
public static Item getItemForPart(String string) {
|
||||
for (Map.Entry<String, Item> item : ModPartRegistry.itemParts
|
||||
.entrySet()) {
|
||||
if (item.getValue().equals(string)) {
|
||||
return item.getValue();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public static Item getItemForPart(String string) {
|
||||
for (Map.Entry<String, Item> item : ModPartRegistry.itemParts
|
||||
.entrySet()) {
|
||||
if (item.getValue().equals(string)) {
|
||||
return item.getValue();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static IPartProvider getPartProvider(World world, Location location) {
|
||||
for (IPartProvider partProvider : ModPartRegistry.providers) {
|
||||
if (partProvider.isTileFromProvider(world.getTileEntity(
|
||||
location.getX(), location.getY(), location.getZ()))) {
|
||||
return partProvider;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public static IPartProvider getPartProvider(World world, Location location) {
|
||||
for (IPartProvider partProvider : ModPartRegistry.providers) {
|
||||
if (partProvider.isTileFromProvider(world.getTileEntity(
|
||||
location.getX(), location.getY(), location.getZ()))) {
|
||||
return partProvider;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static IModPart getPartFromWorld(World world, Location location, String name) {
|
||||
for (IPartProvider partProvider : ModPartRegistry.providers) {
|
||||
IModPart tempPart = null;
|
||||
tempPart = partProvider.getPartFromWorld(world, location, name);
|
||||
if (tempPart != null) {
|
||||
return tempPart;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public static IModPart getPartFromWorld(World world, Location location, String name) {
|
||||
for (IPartProvider partProvider : ModPartRegistry.providers) {
|
||||
IModPart tempPart = null;
|
||||
tempPart = partProvider.getPartFromWorld(world, location, name);
|
||||
if (tempPart != null) {
|
||||
return tempPart;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue