Auto-format spaces to tabs (#2)

This commit is contained in:
mezz committed 2016-10-27 02:49:49 -07:00
1 parent 25be7fd254
commit 5bb4b5d9a5
756 files changed
+49198 -48489

No files matched your search

+59 -59
View File
@@ -12,76 +12,76 @@ import net.minecraftforge.fml.common.versioning.Restriction;
import java.util.Objects;
public class Mods {
public static Mod Forestry = new Mod("forestry") {
@Override
public boolean dev() {
final String forVersion = Loader.instance().getIndexedModList().get("forestry").getVersion();
final Restriction rest = new Restriction(new DefaultArtifactVersion("3.6"), true, null, false);
return rest.containsVersion(new DefaultArtifactVersion(forVersion));
}
};
public static Mod IC2 = new Mod("IC2");
public static Mod Botania = new Mod("Botania");
private static boolean WARN = true;
public static Mod Forestry = new Mod("forestry") {
@Override
public boolean dev() {
final String forVersion = Loader.instance().getIndexedModList().get("forestry").getVersion();
final Restriction rest = new Restriction(new DefaultArtifactVersion("3.6"), true, null, false);
return rest.containsVersion(new DefaultArtifactVersion(forVersion));
}
};
public static Mod IC2 = new Mod("IC2");
public static Mod Botania = new Mod("Botania");
private static boolean WARN = true;
private static Item findItem(final String modId, final String name) {
final Item stack = Item.REGISTRY.getObject(new ResourceLocation(modId, name));
if (stack == null && Mods.WARN && Objects.equals(modId, "forestry")) {
//throw new RuntimeException("Item not found: " + modId + ":" + name);
}
private static Item findItem(final String modId, final String name) {
final Item stack = Item.REGISTRY.getObject(new ResourceLocation(modId, name));
if (stack == null && Mods.WARN && Objects.equals(modId, "forestry")) {
//throw new RuntimeException("Item not found: " + modId + ":" + name);
}
return stack;
}
return stack;
}
private static ItemStack findItemStack(final String modId, final String name, final int stackSize) {
final ItemStack stack = GameRegistry.makeItemStack(modId + ":" + name, 0, stackSize, null);
if (stack == null && Mods.WARN && Objects.equals(modId, "forestry")) {
//throw new RuntimeException("Stack not found: " + modId + ":" + name);
}
return stack;
}
private static ItemStack findItemStack(final String modId, final String name, final int stackSize) {
final ItemStack stack = GameRegistry.makeItemStack(modId + ":" + name, 0, stackSize, null);
if (stack == null && Mods.WARN && Objects.equals(modId, "forestry")) {
//throw new RuntimeException("Stack not found: " + modId + ":" + name);
}
return stack;
}
private static Block findBlock(final String modId, final String name) {
final Block stack = Block.REGISTRY.getObject(new ResourceLocation(modId + ":" + name));
if (stack == null && Mods.WARN && Objects.equals(modId, "forestry")) {
//throw new RuntimeException("Block not found: " + modId + ":" + name);
}
return stack;
}
private static Block findBlock(final String modId, final String name) {
final Block stack = Block.REGISTRY.getObject(new ResourceLocation(modId + ":" + name));
if (stack == null && Mods.WARN && Objects.equals(modId, "forestry")) {
//throw new RuntimeException("Block not found: " + modId + ":" + name);
}
return stack;
}
public static class Mod {
private String id;
public static class Mod {
private String id;
private Mod(final String id) {
this.id = id;
}
private Mod(final String id) {
this.id = id;
}
public Item item(final String name) {
return findItem(this.id, name);
}
public Item item(final String name) {
return findItem(this.id, name);
}
public Block block(final String name) {
return findBlock(this.id, name);
}
public Block block(final String name) {
return findBlock(this.id, name);
}
public ItemStack stack(final String name, final int stackSize) {
return findItemStack(this.id, name, stackSize);
}
public ItemStack stack(final String name, final int stackSize) {
return findItemStack(this.id, name, stackSize);
}
public ItemStack stack(final String name) {
return this.stack(name, 1);
}
public ItemStack stack(final String name) {
return this.stack(name, 1);
}
public ItemStack stack(final String string, final int amount, final int meta) {
return new ItemStack(this.item(string), amount, meta);
}
public ItemStack stack(final String string, final int amount, final int meta) {
return new ItemStack(this.item(string), amount, meta);
}
public boolean active() {
return Loader.isModLoaded(this.id);
}
public boolean active() {
return Loader.isModLoaded(this.id);
}
public boolean dev() {
return false;
}
}
public boolean dev() {
return false;
}
}
}