aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kubatech/loaders
diff options
context:
space:
mode:
authorkuba6000 <kuba.123123.6000@gmail.com>2023-04-10 21:03:52 +0200
committerkuba6000 <kuba.123123.6000@gmail.com>2023-04-10 21:03:52 +0200
commit74a9bcc5a0b7e179a71932e7dba88794deeb4c99 (patch)
treea80901824606cae422be00d026605da912054c06 /src/main/java/kubatech/loaders
parent0ecb697d75b25206daf921ecec1c910d6ab77491 (diff)
downloadGT5-Unofficial-74a9bcc5a0b7e179a71932e7dba88794deeb4c99.tar.gz
GT5-Unofficial-74a9bcc5a0b7e179a71932e7dba88794deeb4c99.tar.bz2
GT5-Unofficial-74a9bcc5a0b7e179a71932e7dba88794deeb4c99.zip
Update spotless formatting
Diffstat (limited to 'src/main/java/kubatech/loaders')
-rw-r--r--src/main/java/kubatech/loaders/ItemLoader.java2
-rw-r--r--src/main/java/kubatech/loaders/MobRecipeLoader.java246
-rw-r--r--src/main/java/kubatech/loaders/RecipeLoader.java331
-rw-r--r--src/main/java/kubatech/loaders/TCLoader.java84
-rw-r--r--src/main/java/kubatech/loaders/block/BlockProxy.java7
-rw-r--r--src/main/java/kubatech/loaders/block/KubaBlock.java59
-rw-r--r--src/main/java/kubatech/loaders/block/KubaItemBlock.java11
-rw-r--r--src/main/java/kubatech/loaders/item/ItemProxy.java36
-rw-r--r--src/main/java/kubatech/loaders/item/KubaItems.java7
-rw-r--r--src/main/java/kubatech/loaders/item/items/Tea.java3
-rw-r--r--src/main/java/kubatech/loaders/item/items/TeaCollection.java70
-rw-r--r--src/main/java/kubatech/loaders/item/items/TeaUltimate.java208
12 files changed, 540 insertions, 524 deletions
diff --git a/src/main/java/kubatech/loaders/ItemLoader.java b/src/main/java/kubatech/loaders/ItemLoader.java
index a0f28dc391..68c62226c7 100644
--- a/src/main/java/kubatech/loaders/ItemLoader.java
+++ b/src/main/java/kubatech/loaders/ItemLoader.java
@@ -67,7 +67,7 @@ public class ItemLoader {
PartiallyOxidizedTeaLeaf.set(kubaitems.registerProxyItem(new TeaIngredient("partially_oxidized_tea_leaf")));
TeaAcceptorResearchNote
- .set(kubaitems.registerProxyItem(new ItemProxy("tea_acceptor_research_note", "research_note")));
+ .set(kubaitems.registerProxyItem(new ItemProxy("tea_acceptor_research_note", "research_note")));
Beeeeee.set(kubaitems.registerProxyItem(new ItemProxy("beeeeee", "beeeeee")));
}
}
diff --git a/src/main/java/kubatech/loaders/MobRecipeLoader.java b/src/main/java/kubatech/loaders/MobRecipeLoader.java
index dde418aaac..8b652410d1 100644
--- a/src/main/java/kubatech/loaders/MobRecipeLoader.java
+++ b/src/main/java/kubatech/loaders/MobRecipeLoader.java
@@ -110,20 +110,20 @@ public class MobRecipeLoader {
@SuppressWarnings("unchecked")
public MobRecipe copy() {
return new MobRecipe(
- (ArrayList<MobDrop>) mOutputs.clone(),
- mDuration,
- mMaxDamageChance,
- infernalityAllowed,
- alwaysinfernal,
- isPeacefulAllowed,
- entity,
- maxEntityHealth,
- isUsable);
+ (ArrayList<MobDrop>) mOutputs.clone(),
+ mDuration,
+ mMaxDamageChance,
+ infernalityAllowed,
+ alwaysinfernal,
+ isPeacefulAllowed,
+ entity,
+ maxEntityHealth,
+ isUsable);
}
private MobRecipe(ArrayList<MobDrop> mOutputs, int mDuration, int mMaxDamageChance, boolean infernalityAllowed,
- boolean alwaysinfernal, boolean isPeacefulAllowed, EntityLiving entity, float maxEntityHealth,
- boolean isUsable) {
+ boolean alwaysinfernal, boolean isPeacefulAllowed, EntityLiving entity, float maxEntityHealth,
+ boolean isUsable) {
this.mOutputs = mOutputs;
this.mDuration = mDuration;
this.mMaxDamageChance = mMaxDamageChance;
@@ -145,42 +145,47 @@ public class MobRecipeLoader {
infernaldrops = new droplist();
LOG.info("Generating Infernal drops");
ArrayList<ModifierLoader<?>> modifierLoaders = (ArrayList<ModifierLoader<?>>) InfernalHelper
- .getModifierLoaders().clone();
+ .getModifierLoaders()
+ .clone();
int i = 0;
for (ModifierLoader<?> modifierLoader : modifierLoaders) {
MobModifier nextMod = modifierLoader.make(null);
- if (nextMod.getBlackListMobClasses() != null) for (Class<?> cl : nextMod.getBlackListMobClasses())
- if (e.getClass().isAssignableFrom(cl)) break;
+ if (nextMod.getBlackListMobClasses() != null)
+ for (Class<?> cl : nextMod.getBlackListMobClasses()) if (e.getClass()
+ .isAssignableFrom(cl)) break;
i++;
}
if (i > 0) {
double chance = InfernalHelper.checkEntityClassForced(e) ? 1d
- : (1d / InfernalHelper.getEliteRarity());
+ : (1d / InfernalHelper.getEliteRarity());
ArrayList<ItemStack> elitelist = InfernalHelper.getDropIdListElite();
for (ItemStack stack : elitelist) {
dropinstance instance = infernaldrops
- .add(new dropinstance(stack.copy(), infernaldrops), chance / elitelist.size());
+ .add(new dropinstance(stack.copy(), infernaldrops), chance / elitelist.size());
instance.isEnchatmentRandomized = true;
// noinspection ConstantConditions
- instance.enchantmentLevel = stack.getItem().getItemEnchantability();
+ instance.enchantmentLevel = stack.getItem()
+ .getItemEnchantability();
}
ArrayList<ItemStack> ultralist = InfernalHelper.getDropIdListUltra();
chance *= 1d / InfernalHelper.getUltraRarity();
for (ItemStack stack : ultralist) {
dropinstance instance = infernaldrops
- .add(new dropinstance(stack.copy(), infernaldrops), chance / ultralist.size());
+ .add(new dropinstance(stack.copy(), infernaldrops), chance / ultralist.size());
instance.isEnchatmentRandomized = true;
// noinspection ConstantConditions
- instance.enchantmentLevel = stack.getItem().getItemEnchantability();
+ instance.enchantmentLevel = stack.getItem()
+ .getItemEnchantability();
}
ArrayList<ItemStack> infernallist = InfernalHelper.getDropIdListInfernal();
chance *= 1d / InfernalHelper.getInfernoRarity();
for (ItemStack stack : infernallist) {
dropinstance instance = infernaldrops
- .add(new dropinstance(stack.copy(), infernaldrops), chance / infernallist.size());
+ .add(new dropinstance(stack.copy(), infernaldrops), chance / infernallist.size());
instance.isEnchatmentRandomized = true;
// noinspection ConstantConditions
- instance.enchantmentLevel = stack.getItem().getItemEnchantability();
+ instance.enchantmentLevel = stack.getItem()
+ .getItemEnchantability();
}
}
} else if (infernaldrops == null) infernaldrops = new droplist();
@@ -206,7 +211,7 @@ public class MobRecipeLoader {
}
public ItemStack[] generateOutputs(Random rnd, GT_MetaTileEntity_ExtremeExterminationChamber MTE,
- double attackDamage, int lootinglevel, boolean preferInfernalDrops) {
+ double attackDamage, int lootinglevel, boolean preferInfernalDrops) {
MTE.lEUt = mEUt;
MTE.mMaxProgresstime = Math.max(MOB_SPAWN_INTERVAL, (int) ((maxEntityHealth / attackDamage) * 10d));
ArrayList<ItemStack> stacks = new ArrayList<>(mOutputs.size());
@@ -245,8 +250,10 @@ public class MobRecipeLoader {
}
if (infernalityAllowed && mEUt * 8 < MTE.getMaxInputVoltage()
- && !InfernalHelper.getDimensionBlackList()
- .contains(MTE.getBaseMetaTileEntity().getWorld().provider.dimensionId)) {
+ && !InfernalHelper.getDimensionBlackList()
+ .contains(
+ MTE.getBaseMetaTileEntity()
+ .getWorld().provider.dimensionId)) {
int p = 0;
int mods = 0;
if (alwaysinfernal || (preferInfernalDrops && rnd.nextInt(InfernalHelper.getEliteRarity()) == 0)) {
@@ -268,13 +275,18 @@ public class MobRecipeLoader {
mods = InfernalHelper.getMinInfernoModifiers();
}
if (infernalstacks != null) {
- ItemStack infernalstack = infernalstacks.get(rnd.nextInt(infernalstacks.size())).copy();
+ ItemStack infernalstack = infernalstacks.get(rnd.nextInt(infernalstacks.size()))
+ .copy();
// noinspection ConstantConditions
- EnchantmentHelper
- .addRandomEnchantment(rnd, infernalstack, infernalstack.getItem().getItemEnchantability());
+ EnchantmentHelper.addRandomEnchantment(
+ rnd,
+ infernalstack,
+ infernalstack.getItem()
+ .getItemEnchantability());
stacks.add(infernalstack);
MTE.lEUt *= 8L;
- MTE.mMaxProgresstime *= mods * InfernalMobsCore.instance().getMobModHealthFactor();
+ MTE.mMaxProgresstime *= mods * InfernalMobsCore.instance()
+ .getMobModHealthFactor();
}
}
@@ -338,7 +350,8 @@ public class MobRecipeLoader {
return 0;
}
chance /= bound;
- return nexts.get(walkCounter++).getInt();
+ return nexts.get(walkCounter++)
+ .getInt();
}
@Override
@@ -354,7 +367,8 @@ public class MobRecipeLoader {
return 0f;
}
chance /= 10;
- return nexts.get(walkCounter++).getFloat();
+ return nexts.get(walkCounter++)
+ .getFloat();
}
@Override
@@ -369,7 +383,8 @@ public class MobRecipeLoader {
return false;
}
chance /= 2;
- return nexts.get(walkCounter++).getBoolean();
+ return nexts.get(walkCounter++)
+ .getBoolean();
}
public void newRound() {
@@ -384,7 +399,8 @@ public class MobRecipeLoader {
public boolean nextRound() {
walkCounter = 0;
chance = 1d;
- while (nexts.size() > 0 && nexts.get(nexts.size() - 1).next()) nexts.remove(nexts.size() - 1);
+ while (nexts.size() > 0 && nexts.get(nexts.size() - 1)
+ .next()) nexts.remove(nexts.size() - 1);
return nexts.size() > 0;
}
}
@@ -481,7 +497,7 @@ public class MobRecipeLoader {
if (ostack == null) continue;
dropinstance drop;
boolean randomchomenchantdetected = ostack.hasTagCompound()
- && ostack.stackTagCompound.hasKey(randomEnchantmentDetectedString);
+ && ostack.stackTagCompound.hasKey(randomEnchantmentDetectedString);
int randomenchantmentlevel = 0;
if (randomchomenchantdetected) {
randomenchantmentlevel = ostack.stackTagCompound.getInteger(randomEnchantmentDetectedString);
@@ -489,7 +505,7 @@ public class MobRecipeLoader {
ostack.stackTagCompound.setInteger(randomEnchantmentDetectedString, 0);
}
if ((booksAlwaysRandomlyEnchanted || randomchomenchantdetected)
- && Items.enchanted_book == ostack.getItem()) {
+ && Items.enchanted_book == ostack.getItem()) {
NBTTagCompound tagCompound = (NBTTagCompound) ostack.stackTagCompound.copy();
tagCompound.removeTag("StoredEnchantments");
ostack = new ItemStack(Items.book, ostack.stackSize, 0);
@@ -582,7 +598,7 @@ public class MobRecipeLoader {
@Override
public Block getBlock(int aX, int aY, int aZ) {
if (LoaderReference.TwilightForest && new Throwable().getStackTrace()[1].getClassName()
- .equals("twilightforest.client.renderer.entity.RenderTFSnowQueenIceShield"))
+ .equals("twilightforest.client.renderer.entity.RenderTFSnowQueenIceShield"))
return Blocks.packed_ice;
return super.getBlock(aX, aY, aZ);
}
@@ -601,14 +617,14 @@ public class MobRecipeLoader {
else modlistversion = ModUtils.getModListVersion();
if (Config.MobHandler.regenerationTrigger != Config.MobHandler._CacheRegenerationTrigger.Always
- && cache.exists()) {
+ && cache.exists()) {
LOG.info("Parsing Cached map");
Reader reader = null;
try {
reader = Files.newReader(cache, StandardCharsets.UTF_8);
MobRecipeLoaderCacheStructure s = gson.fromJson(reader, MobRecipeLoaderCacheStructure.class);
if (Config.MobHandler.regenerationTrigger == Config.MobHandler._CacheRegenerationTrigger.Never
- || s.version.equals(modlistversion)) {
+ || s.version.equals(modlistversion)) {
ProgressBarWrapper bar = new ProgressBarWrapper("Parsing cached Mob Recipe Map", s.moblist.size());
for (Map.Entry<String, ArrayList<MobDrop>> entry : s.moblist.entrySet()) {
bar.step(entry.getKey());
@@ -616,16 +632,17 @@ public class MobRecipeLoader {
EntityLiving e;
String mobName = entry.getKey();
if (mobName.equals("witherSkeleton")
- && !EntityList.stringToClassMapping.containsKey("witherSkeleton")) {
+ && !EntityList.stringToClassMapping.containsKey("witherSkeleton")) {
e = new EntitySkeleton(f);
((EntitySkeleton) e).setSkeletonType(1);
} else e = (EntityLiving) ((Class<?>) EntityList.stringToClassMapping.get(mobName))
- .getConstructor(new Class[] { World.class }).newInstance(new Object[] { f });
+ .getConstructor(new Class[] { World.class })
+ .newInstance(new Object[] { f });
ArrayList<MobDrop> drops = entry.getValue();
drops.forEach(MobDrop::reconstructStack);
GeneralMobList.put(
- mobName,
- new GeneralMappedMob(e, MobRecipe.generateMobRecipe(e, mobName, drops), drops));
+ mobName,
+ new GeneralMappedMob(e, MobRecipe.generateMobRecipe(e, mobName, drops), drops));
} catch (Exception ignored) {}
}
bar.end();
@@ -695,7 +712,8 @@ public class MobRecipeLoader {
EntityLiving e;
try {
- e = (EntityLiving) v.getConstructor(new Class[] { World.class }).newInstance(new Object[] { f });
+ e = (EntityLiving) v.getConstructor(new Class[] { World.class })
+ .newInstance(new Object[] { f });
} catch (ClassCastException ex) {
// not a EntityLiving
LOG.info("Entity " + k + " is not a LivingEntity, skipping");
@@ -715,10 +733,11 @@ public class MobRecipeLoader {
if (registeringWitherSkeleton && e instanceof EntitySkeleton && k.equals("witherSkeleton"))
((EntitySkeleton) e).setSkeletonType(1);
- else if (StatCollector.translateToLocal("entity." + k + ".name").equals("entity." + k + ".name")) {
- LOG.info("Entity " + k + " does't have localized name, skipping");
- return;
- }
+ else if (StatCollector.translateToLocal("entity." + k + ".name")
+ .equals("entity." + k + ".name")) {
+ LOG.info("Entity " + k + " does't have localized name, skipping");
+ return;
+ }
// POWERFULL GENERATION
@@ -747,7 +766,8 @@ public class MobRecipeLoader {
frand.newRound();
collector.newRound();
- if (v.getName().startsWith("com.emoniph.witchery")) {
+ if (v.getName()
+ .startsWith("com.emoniph.witchery")) {
try {
dropFewItems.invoke(e, true, 0);
} catch (Exception ex) {
@@ -792,7 +812,8 @@ public class MobRecipeLoader {
frand.newRound();
collector.newRound();
- if (v.getName().startsWith("com.emoniph.witchery")) {
+ if (v.getName()
+ .startsWith("com.emoniph.witchery")) {
try {
dropFewItems.invoke(e, true, 0);
} catch (Exception ex) {
@@ -911,7 +932,8 @@ public class MobRecipeLoader {
} while (detectedException && !cl.equals(EntityLiving.class));
boolean usingVanillaEnchantingMethod = cl.equals(EntityLiving.class);
double chanceModifierLocal = 1f;
- if (v.getName().startsWith("twilightforest.entity")) {
+ if (v.getName()
+ .startsWith("twilightforest.entity")) {
frand.forceFloatValue = 0f;
chanceModifierLocal = 0.25f;
}
@@ -933,14 +955,14 @@ public class MobRecipeLoader {
int randomenchant = -1;
if (stack.hasTagCompound()
- && stack.stackTagCompound.hasKey(randomEnchantmentDetectedString)) {
+ && stack.stackTagCompound.hasKey(randomEnchantmentDetectedString)) {
randomenchant = stack.stackTagCompound.getInteger(randomEnchantmentDetectedString);
stack.stackTagCompound.removeTag("ench");
}
dropinstance i = additionaldrops.add(
- new dropinstance(stack.copy(), additionaldrops),
- frand.chance * chanceModifierLocal
- * (usingVanillaEnchantingMethod ? (j == 0 ? 0.75d : 0.5d) : 1d));
+ new dropinstance(stack.copy(), additionaldrops),
+ frand.chance * chanceModifierLocal
+ * (usingVanillaEnchantingMethod ? (j == 0 ? 0.75d : 0.5d) : 1d));
if (!i.isDamageRandomized && i.stack.isItemStackDamageable()) {
i.isDamageRandomized = true;
int maxdamage = i.stack.getMaxDamage();
@@ -955,8 +977,8 @@ public class MobRecipeLoader {
if (!stack.hasTagCompound()) stack.stackTagCompound = new NBTTagCompound();
stack.stackTagCompound.setInteger(randomEnchantmentDetectedString, 14);
dropinstance newdrop = additionaldrops.add(
- new dropinstance(stack.copy(), additionaldrops),
- frand.chance * chanceModifierLocal * (j == 0 ? 0.25d : 0.5d));
+ new dropinstance(stack.copy(), additionaldrops),
+ frand.chance * chanceModifierLocal * (j == 0 ? 0.25d : 0.5d));
newdrop.isEnchatmentRandomized = true;
newdrop.enchantmentLevel = 14;
newdrop.isDamageRandomized = i.isDamageRandomized;
@@ -1002,14 +1024,14 @@ public class MobRecipeLoader {
}
dropinstance dlooting = dropslooting.get(drop);
moboutputs.add(
- new MobDrop(
- stack,
- MobDrop.DropType.Normal,
- chance,
- drop.isEnchatmentRandomized ? drop.enchantmentLevel : null,
- drop.isDamageRandomized ? drop.damagesPossible : null,
- dlooting != null && dlooting.dropcount > drop.dropcount,
- false));
+ new MobDrop(
+ stack,
+ MobDrop.DropType.Normal,
+ chance,
+ drop.isEnchatmentRandomized ? drop.enchantmentLevel : null,
+ drop.isDamageRandomized ? drop.damagesPossible : null,
+ dlooting != null && dlooting.dropcount > drop.dropcount,
+ false));
}
for (dropinstance drop : raredrops.drops) {
ItemStack stack = drop.stack;
@@ -1025,14 +1047,14 @@ public class MobRecipeLoader {
chance = 1;
}
moboutputs.add(
- new MobDrop(
- stack,
- MobDrop.DropType.Rare,
- chance,
- drop.isEnchatmentRandomized ? drop.enchantmentLevel : null,
- drop.isDamageRandomized ? drop.damagesPossible : null,
- false,
- false));
+ new MobDrop(
+ stack,
+ MobDrop.DropType.Rare,
+ chance,
+ drop.isEnchatmentRandomized ? drop.enchantmentLevel : null,
+ drop.isDamageRandomized ? drop.damagesPossible : null,
+ false,
+ false));
}
for (dropinstance drop : superraredrops.drops) {
if (raredrops.contains(drop)) continue;
@@ -1049,14 +1071,14 @@ public class MobRecipeLoader {
chance = 1;
}
moboutputs.add(
- new MobDrop(
- stack,
- MobDrop.DropType.Rare,
- chance,
- drop.isEnchatmentRandomized ? drop.enchantmentLevel : null,
- drop.isDamageRandomized ? drop.damagesPossible : null,
- false,
- false));
+ new MobDrop(
+ stack,
+ MobDrop.DropType.Rare,
+ chance,
+ drop.isEnchatmentRandomized ? drop.enchantmentLevel : null,
+ drop.isDamageRandomized ? drop.damagesPossible : null,
+ false,
+ false));
}
for (dropinstance drop : additionaldrops.drops) {
ItemStack stack = drop.stack;
@@ -1072,14 +1094,14 @@ public class MobRecipeLoader {
chance = 1;
}
moboutputs.add(
- new MobDrop(
- stack,
- MobDrop.DropType.Additional,
- chance,
- drop.isEnchatmentRandomized ? drop.enchantmentLevel : null,
- drop.isDamageRandomized ? drop.damagesPossible : null,
- false,
- false));
+ new MobDrop(
+ stack,
+ MobDrop.DropType.Additional,
+ chance,
+ drop.isEnchatmentRandomized ? drop.enchantmentLevel : null,
+ drop.isDamageRandomized ? drop.damagesPossible : null,
+ false,
+ false));
}
GeneralMobList.put(k, new GeneralMappedMob(e, MobRecipe.generateMobRecipe(e, k, moboutputs), moboutputs));
@@ -1130,7 +1152,8 @@ public class MobRecipeLoader {
for (Map.Entry<String, GeneralMappedMob> entry : GeneralMobList.entrySet()) {
String k = entry.getKey();
GeneralMappedMob v = entry.getValue();
- if (Arrays.asList(Config.MobHandler.mobBlacklist).contains(k)) {
+ if (Arrays.asList(Config.MobHandler.mobBlacklist)
+ .contains(k)) {
LOG.info("Entity " + k + " is blacklisted, skipping");
continue;
}
@@ -1175,7 +1198,7 @@ public class MobRecipeLoader {
@SideOnly(Side.CLIENT)
public static void processMobRecipeMap(HashSet<String> mobs,
- HashMap<String, OverridesConfig.MobOverride> overrides) {
+ HashMap<String, OverridesConfig.MobOverride> overrides) {
if (isClientSided) Mob_Handler.clearRecipes();
MobNameToRecipeMap.clear();
mobs.forEach(k -> {
@@ -1218,7 +1241,8 @@ public class MobRecipeLoader {
private static void parseMTAdditions(String k, ArrayList<MobDrop> drops, MobRecipe recipe) {
IEntityDefinition ie = MineTweakerAPI.game.getEntity(k);
if (ie != null) {
- for (Map.Entry<IItemStack, IntRange> entry : ie.getDropsToAdd().entrySet()) {
+ for (Map.Entry<IItemStack, IntRange> entry : ie.getDropsToAdd()
+ .entrySet()) {
IntRange r = entry.getValue();
// Get average chance
double chance;
@@ -1228,19 +1252,21 @@ public class MobRecipeLoader {
double b = r.getTo();
chance = ((b * b) + b - (a * a) + a) / (2 * (b - a + 1));
}
- ItemStack stack = ((ItemStack) entry.getKey().getInternal()).copy();
+ ItemStack stack = ((ItemStack) entry.getKey()
+ .getInternal()).copy();
MobDrop drop = new MobDrop(
- stack,
- MobDrop.DropType.Normal,
- (int) (chance * 10000),
- null,
- null,
- false,
- false);
+ stack,
+ MobDrop.DropType.Normal,
+ (int) (chance * 10000),
+ null,
+ null,
+ false,
+ false);
drops.add(drop);
recipe.mOutputs.add(drop);
}
- for (Map.Entry<IItemStack, IntRange> entry : ie.getDropsToAddPlayerOnly().entrySet()) {
+ for (Map.Entry<IItemStack, IntRange> entry : ie.getDropsToAddPlayerOnly()
+ .entrySet()) {
IntRange r = entry.getValue();
// Get average chance
double chance;
@@ -1250,20 +1276,22 @@ public class MobRecipeLoader {
double b = r.getTo();
chance = ((b * b) + b - (a * a) + a) / (2 * (b - a + 1));
}
- ItemStack stack = ((ItemStack) entry.getKey().getInternal()).copy();
+ ItemStack stack = ((ItemStack) entry.getKey()
+ .getInternal()).copy();
MobDrop drop = new MobDrop(
- stack,
- MobDrop.DropType.Normal,
- (int) (chance * 10000),
- null,
- null,
- false,
- true);
+ stack,
+ MobDrop.DropType.Normal,
+ (int) (chance * 10000),
+ null,
+ null,
+ false,
+ true);
drops.add(drop);
}
for (IItemStack istack : ie.getDropsToRemove()) {
- List<MobDrop> toRemove = drops.stream().filter(d -> istack.matches(new MCItemStack(d.stack)))
- .collect(Collectors.toList());
+ List<MobDrop> toRemove = drops.stream()
+ .filter(d -> istack.matches(new MCItemStack(d.stack)))
+ .collect(Collectors.toList());
drops.removeAll(toRemove);
recipe.mOutputs.removeAll(toRemove);
}
diff --git a/src/main/java/kubatech/loaders/RecipeLoader.java b/src/main/java/kubatech/loaders/RecipeLoader.java
index 53ae79de1e..29f22782f0 100644
--- a/src/main/java/kubatech/loaders/RecipeLoader.java
+++ b/src/main/java/kubatech/loaders/RecipeLoader.java
@@ -45,79 +45,76 @@ public class RecipeLoader {
private static final Logger LOG = LogManager.getLogger(Tags.MODID + "[Recipe Loader]");
protected static final long bitsd = GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE
- | GT_ModHandler.RecipeBits.BUFFERED
- | GT_ModHandler.RecipeBits.DISMANTLEABLE;
+ | GT_ModHandler.RecipeBits.BUFFERED
+ | GT_ModHandler.RecipeBits.DISMANTLEABLE;
private static int MTEID = 14201;
private static final int MTEIDMax = 14300;
public static void addRecipes() {
if (registerMTE(
- ExtremeExterminationChamber,
- GT_MetaTileEntity_ExtremeExterminationChamber.class,
- "multimachine.exterminationchamber",
- "Extreme Extermination Chamber",
- LoaderReference.EnderIO)) {
+ ExtremeExterminationChamber,
+ GT_MetaTileEntity_ExtremeExterminationChamber.class,
+ "multimachine.exterminationchamber",
+ "Extreme Extermination Chamber",
+ LoaderReference.EnderIO)) {
GT_ModHandler.addCraftingRecipe(
- ItemList.ExtremeExterminationChamber.get(1),
- bitsd,
- new Object[] { "RCR", "CHC", "VVV", 'R', gregtech.api.enums.ItemList.Robot_Arm_EV, 'C',
- OrePrefixes.circuit.get(Materials.Data), 'H', gregtech.api.enums.ItemList.Hull_EV, 'V',
- GT_ModHandler.getModItem("OpenBlocks", "vacuumhopper", 1, new ItemStack(Blocks.hopper)) });
+ ItemList.ExtremeExterminationChamber.get(1),
+ bitsd,
+ new Object[] { "RCR", "CHC", "VVV", 'R', gregtech.api.enums.ItemList.Robot_Arm_EV, 'C',
+ OrePrefixes.circuit.get(Materials.Data), 'H', gregtech.api.enums.ItemList.Hull_EV, 'V',
+ GT_ModHandler.getModItem("OpenBlocks", "vacuumhopper", 1, new ItemStack(Blocks.hopper)) });
}
if (registerMTE(
- ExtremeIndustrialApiary,
- GT_MetaTileEntity_MegaIndustrialApiary.class,
- "multimachine.extremeapiary",
- "Industrial Apicultural Acclimatiser and Drone Domestication Station",
- LoaderReference.Forestry)) {
+ ExtremeIndustrialApiary,
+ GT_MetaTileEntity_MegaIndustrialApiary.class,
+ "multimachine.extremeapiary",
+ "Industrial Apicultural Acclimatiser and Drone Domestication Station",
+ LoaderReference.Forestry)) {
GT_Values.RA.addAssemblylineRecipe(
- gregtech.api.enums.ItemList.Machine_IndustrialApiary.get(1),
- 10000,
- new Object[] { gregtech.api.enums.ItemList.Machine_IndustrialApiary.get(64L),
- gregtech.api.enums.ItemList.IndustrialApiary_Upgrade_Acceleration_8_Upgraded.get(64L),
- gregtech.api.enums.ItemList.IndustrialApiary_Upgrade_STABILIZER.get(64L),
- gregtech.api.enums.ItemList.Robot_Arm_UV.get(16L),
- new Object[] { OrePrefixes.circuit.get(Materials.SuperconductorUHV), 4L },
- new Object[] { OrePrefixes.circuit.get(Materials.SuperconductorUHV), 4L },
- new Object[] { OrePrefixes.circuit.get(Materials.SuperconductorUHV), 4L },
- new Object[] { OrePrefixes.circuit.get(Materials.SuperconductorUHV), 4L }, },
- new FluidStack[] { FluidRegistry.getFluidStack("molten.indalloy140", 28800),
- FluidRegistry.getFluidStack("for.honey", 20000) },
- ExtremeIndustrialApiary.get(1),
- 6000,
- 2_048_000);
+ gregtech.api.enums.ItemList.Machine_IndustrialApiary.get(1),
+ 10000,
+ new Object[] { gregtech.api.enums.ItemList.Machine_IndustrialApiary.get(64L),
+ gregtech.api.enums.ItemList.IndustrialApiary_Upgrade_Acceleration_8_Upgraded.get(64L),
+ gregtech.api.enums.ItemList.IndustrialApiary_Upgrade_STABILIZER.get(64L),
+ gregtech.api.enums.ItemList.Robot_Arm_UV.get(16L),
+ new Object[] { OrePrefixes.circuit.get(Materials.SuperconductorUHV), 4L },
+ new Object[] { OrePrefixes.circuit.get(Materials.SuperconductorUHV), 4L },
+ new Object[] { OrePrefixes.circuit.get(Materials.SuperconductorUHV), 4L },
+ new Object[] { OrePrefixes.circuit.get(Materials.SuperconductorUHV), 4L }, },
+ new FluidStack[] { FluidRegistry.getFluidStack("molten.indalloy140", 28800),
+ FluidRegistry.getFluidStack("for.honey", 20000) },
+ ExtremeIndustrialApiary.get(1),
+ 6000,
+ 2_048_000);
}
if (registerMTEUsingID(
- 12_792,
- ExtremeIndustrialGreenhouse,
- GT_MetaTileEntity_ExtremeIndustrialGreenhouse.class,
- "multimachine.extremegreenhouse",
- "Extreme Industrial Greenhouse",
- true /* IC2 is always loaded */)) {
+ 12_792,
+ ExtremeIndustrialGreenhouse,
+ GT_MetaTileEntity_ExtremeIndustrialGreenhouse.class,
+ "multimachine.extremegreenhouse",
+ "Extreme Industrial Greenhouse",
+ true /* IC2 is always loaded */)) {
GT_ModHandler.addCraftingRecipe(
- ExtremeIndustrialGreenhouse.get(1),
- bitsd,
- new Object[] { "AZA", "BRB", "AZA", 'B', gregtech.api.enums.ItemList.Casing_CleanStainlessSteel,
- 'R',
- GT_ModHandler
- .getModItem("EnderIO", "blockFarmStation", 1, new ItemStack(Items.diamond_hoe)),
- 'A',
- LoaderReference.GTNHCoreMod ? CustomItemList.AcceleratorIV.get(1)
- : gregtech.api.enums.ItemList.Robot_Arm_IV,
- 'Z', OrePrefixes.circuit.get(Materials.Ultimate) });
+ ExtremeIndustrialGreenhouse.get(1),
+ bitsd,
+ new Object[] { "AZA", "BRB", "AZA", 'B', gregtech.api.enums.ItemList.Casing_CleanStainlessSteel, 'R',
+ GT_ModHandler.getModItem("EnderIO", "blockFarmStation", 1, new ItemStack(Items.diamond_hoe)), 'A',
+ LoaderReference.GTNHCoreMod ? CustomItemList.AcceleratorIV.get(1)
+ : gregtech.api.enums.ItemList.Robot_Arm_IV,
+ 'Z', OrePrefixes.circuit.get(Materials.Ultimate) });
}
RegisterTeaLine();
if (MTEID > MTEIDMax + 1) throw new RuntimeException("MTE ID's");
}
private static boolean registerMTE(ItemList item, Class<? extends MetaTileEntity> mte, String aName,
- String aNameRegional) {
+ String aNameRegional) {
return registerMTE(item, mte, aName, aNameRegional, true);
}
private static boolean registerMTE(ItemList item, Class<? extends MetaTileEntity> mte, String aName,
- String aNameRegional, boolean... deps) {
+ String aNameRegional, boolean... deps) {
boolean dep = true;
for (boolean i : deps) if (!i) {
dep = false;
@@ -127,7 +124,7 @@ public class RecipeLoader {
}
private static boolean registerMTE(ItemList item, Class<? extends MetaTileEntity> mte, String aName,
- String aNameRegional, boolean dep) {
+ S