Skip to content

Commit

Permalink
Update 900
Browse files Browse the repository at this point in the history
  • Loading branch information
ReikaKalseki committed May 15, 2020
1 parent 2a9feab commit 424a900
Show file tree
Hide file tree
Showing 31 changed files with 421 additions and 14 deletions.
4 changes: 4 additions & 0 deletions Auxiliary/RecipeManagers/CastingRecipe.java
Expand Up @@ -487,6 +487,10 @@ public boolean canBeSimpleAutomated() {
return false;
}

public boolean canGiveDoubleOutput() {
return false;
}

public int getInputCount() {
return ReikaRecipeHelper.getRecipeIngredientCount(recipe);
}
Expand Down
Expand Up @@ -63,6 +63,11 @@ public final boolean canBeSimpleAutomated() {
return true;
}

@Override
public boolean canGiveDoubleOutput() {
return true;
}

@Override
public int getTypicalCraftedAmount() {
return 32;
Expand Down
Expand Up @@ -39,4 +39,9 @@ public int getNumberProduced() {
return 8;
}

@Override
public boolean canGiveDoubleOutput() {
return true;
}

}
@@ -1,8 +1,8 @@
/*******************************************************************************
* @author Reika Kalseki
*
*
* Copyright 2017
*
*
* All rights reserved.
* Distribution of the software in any form is only allowed with
* explicit, prior permission from the owner.
Expand Down Expand Up @@ -31,4 +31,9 @@ public FloatingRelayRecipe(ItemStack out, ItemStack main) {
this.addAuxItem(ChromaStacks.enderDust, 0, -2);
}

@Override
public boolean canGiveDoubleOutput() {
return true;
}

}
Expand Up @@ -42,4 +42,9 @@ public int getNumberProduced() {
return 8;
}

@Override
public boolean canGiveDoubleOutput() {
return true;
}

}
Expand Up @@ -48,4 +48,9 @@ protected void getRequiredProgress(Collection<ProgressStage> c) {
c.add(ProgressStage.ALLCOLORS);
}

@Override
public boolean canGiveDoubleOutput() {
return true;
}

}
Expand Up @@ -39,4 +39,9 @@ public int getNumberProduced() {
return 4;
}

@Override
public boolean canGiveDoubleOutput() {
return true;
}

}
Expand Up @@ -33,6 +33,11 @@ public boolean canBeSimpleAutomated() {
return true;
}

@Override
public boolean canGiveDoubleOutput() {
return true;
}

private static IRecipe getRecipe(ItemStack out) {
int mod = (out.getItemDamage()-ChromaStacks.primaryCluster.getItemDamage())%2;
ItemStack is1 = ChromaItems.CLUSTER.getStackOfMetadata(2*mod);
Expand Down
Expand Up @@ -34,6 +34,11 @@ public boolean canBeSimpleAutomated() {
return true;
}

@Override
public boolean canGiveDoubleOutput() {
return true;
}

@Override
public int getDuration() {
return 2*super.getDuration();
Expand Down
Expand Up @@ -35,6 +35,11 @@ public boolean canBeSimpleAutomated() {
return true;
}

@Override
public boolean canGiveDoubleOutput() {
return true;
}

@Override
public int getTypicalCraftedAmount() {
return 32;
Expand Down
Expand Up @@ -44,6 +44,11 @@ public boolean canBeSimpleAutomated() {
return true;
}

@Override
public boolean canGiveDoubleOutput() {
return true;
}

private static IRecipe getRecipe(ItemStack out, CrystalElement e1, CrystalElement e2, CrystalElement e3, CrystalElement e4, ItemStack ctr, boolean chg) {
return ReikaRecipeHelper.getShapedRecipeFor(out, " A ", "BIC", " D ", 'A', getShardType(e1, chg), 'B', getShardType(e2, chg), 'C', getShardType(e3, chg), 'D', getShardType(e4, chg), 'I', ctr);
}
Expand Down
Expand Up @@ -36,6 +36,11 @@ public boolean canBeSimpleAutomated() {
return true;
}

@Override
public boolean canGiveDoubleOutput() {
return true;
}

@Override
public int getTypicalCraftedAmount() {
return 64;
Expand Down
Expand Up @@ -38,6 +38,10 @@ public boolean canBeSimpleAutomated() {
return true;
}

@Override
public boolean canGiveDoubleOutput() {
return true;
}

@Override
public int getTypicalCraftedAmount() {
Expand Down
Expand Up @@ -60,6 +60,11 @@ public boolean canBeSimpleAutomated() {
return true;
}

@Override
public boolean canGiveDoubleOutput() {
return true;
}

@Override
public int getDuration() {
return 4*super.getDuration();
Expand Down
Expand Up @@ -55,4 +55,9 @@ public final boolean canBeSimpleAutomated() {
return true;
}

@Override
public boolean canGiveDoubleOutput() {
return true;
}

}
Expand Up @@ -72,4 +72,9 @@ public final boolean canBeSimpleAutomated() {
return true;
}

@Override
public boolean canGiveDoubleOutput() {
return true;
}

}
Expand Up @@ -40,4 +40,9 @@ public final boolean canBeSimpleAutomated() {
return true;
}

@Override
public boolean canGiveDoubleOutput() {
return true;
}

}
Expand Up @@ -54,4 +54,9 @@ public final boolean canBeSimpleAutomated() {
return true;
}

@Override
public boolean canGiveDoubleOutput() {
return true;
}

}
@@ -1,8 +1,8 @@
/*******************************************************************************
* @author Reika Kalseki
*
*
* Copyright 2017
*
*
* All rights reserved.
* Distribution of the software in any form is only allowed with
* explicit, prior permission from the owner.
Expand Down Expand Up @@ -52,4 +52,9 @@ public boolean canBeStacked() {
return true;
}

@Override
public boolean canGiveDoubleOutput() {
return true;
}

}
@@ -1,8 +1,8 @@
/*******************************************************************************
* @author Reika Kalseki
*
*
* Copyright 2017
*
*
* All rights reserved.
* Distribution of the software in any form is only allowed with
* explicit, prior permission from the owner.
Expand Down Expand Up @@ -39,4 +39,9 @@ public LumenCoreRecipe(ItemStack out, ItemStack main) {
this.addAuraRequirement(CrystalElement.BLUE, 60000);
}

@Override
public boolean canGiveDoubleOutput() {
return false;
}

}
Expand Up @@ -31,4 +31,9 @@ public boolean canBeSimpleAutomated() {
return true;
}

@Override
public boolean canGiveDoubleOutput() {
return true;
}

}
Expand Up @@ -149,4 +149,9 @@ public boolean isModded() {
return true;
}

@Override
public boolean canGiveDoubleOutput() {
return true;
}

}
6 changes: 5 additions & 1 deletion Auxiliary/RecipeManagers/PoolRecipes.java
Expand Up @@ -35,6 +35,7 @@
import Reika.ChromatiCraft.Magic.Progression.ProgressStage;
import Reika.ChromatiCraft.Registry.ChromaBlocks;
import Reika.ChromatiCraft.Registry.ChromaItems;
import Reika.ChromatiCraft.Registry.Chromabilities;
import Reika.DragonAPI.ModList;
import Reika.DragonAPI.ASM.DependentMethodStripper.ModDependent;
import Reika.DragonAPI.Instantiable.Data.Collections.OneWayCollections.OneWayList;
Expand Down Expand Up @@ -161,6 +162,9 @@ public void makePoolRecipe(EntityItem ei, PoolRecipe pr, int ether, int x, int y
pr.makeFrom(li);
ReikaEntityHelper.decrEntityItemStack(ei, 1);
int n = pr.allowDoubling() && ReikaRandomHelper.doWithChance(BlockActiveChroma.getDoublingChance(ether)) ? 2 : 1;
EntityPlayer ep = ReikaItemHelper.getDropper(ei);
if (Chromabilities.DOUBLECRAFT.enabledOn(ep))
n *= 2;
int n2 = n*pr.getOutput().stackSize;
for (int i = 0; i < n2; i++) {
EntityItem newitem = ReikaItemHelper.dropItem(ei, ReikaItemHelper.getSizedItemStack(pr.getOutput(), 1));
Expand All @@ -174,7 +178,7 @@ public void makePoolRecipe(EntityItem ei, PoolRecipe pr, int ether, int x, int y
ei.worldObj.setBlock(x, y, z, Blocks.air);
}
ReikaWorldHelper.causeAdjacentUpdates(ei.worldObj, x, y, z);
ProgressStage.ALLOY.stepPlayerTo(ReikaItemHelper.getDropper(ei));
ProgressStage.ALLOY.stepPlayerTo(ep);
}

public void loadCustomPoolRecipes() {
Expand Down
2 changes: 1 addition & 1 deletion Resources/machines.xml
Expand Up @@ -820,7 +820,7 @@
</toolstorage>
<beestorage>
<desc>
The limitations of that digital storage system's ability to handle many discrete forms of items have become troublesome once again. As soon as you delved into breeding bees, trees, and butterflies, you were quickly inundated with products in every genetic combination you can think of. Not helping is the time your butterfly enclosure sprung a leak and the escapees proceeded to cross-pollinate every tree and plant in sight. Two dozen storage drives for Apple Oak pollen alone is not acceptable, but on the bright side, you have encountered a similar problem to this before, and might have something of a solution...
The limitations of that digital storage system's ability to handle many discrete forms of items have become troublesome once again. As soon as you delved into breeding bees, trees, and butterflies, you were quickly inundated with products in every genetic combination conceivable. Not helping is the time your butterfly enclosure sprung a leak and the escapees proceeded to cross-pollinate every tree and plant in sight. Two dozen storage drives for Apple Oak pollen alone is not acceptable, but on the bright side, you have encountered a similar problem to this before, and might have something of a solution...
</desc>
<note>
Stores any variants of one "species format" like pollen, princesses, or larvae
Expand Down
9 changes: 8 additions & 1 deletion TileEntity/Acquisition/TileEntityItemFabricator.java
Expand Up @@ -12,6 +12,7 @@
import org.apache.commons.lang3.tuple.ImmutableTriple;

import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
Expand All @@ -31,10 +32,12 @@
import Reika.ChromatiCraft.Magic.ElementTagCompound;
import Reika.ChromatiCraft.Magic.Network.CrystalNetworker;
import Reika.ChromatiCraft.Registry.ChromaTiles;
import Reika.ChromatiCraft.Registry.Chromabilities;
import Reika.ChromatiCraft.Registry.CrystalElement;
import Reika.ChromatiCraft.TileEntity.AOE.Effect.TileEntityAccelerator;
import Reika.DragonAPI.Instantiable.InertItem;
import Reika.DragonAPI.Libraries.ReikaInventoryHelper;
import Reika.DragonAPI.Libraries.ReikaPlayerAPI;
import Reika.DragonAPI.Libraries.MathSci.ReikaMathLibrary;
import Reika.DragonAPI.Libraries.Registry.ReikaItemHelper;

Expand Down Expand Up @@ -208,7 +211,11 @@ private void craft(World world, int x, int y, int z) {
((IFluidHandler)te).fill(ForgeDirection.UP, new FluidStack(((FluidRecipe)recipe).fluid, 1000), true);
}
else {
ReikaInventoryHelper.addOrSetStack(recipe.output.copy(), inv, 1);
int n = 1;
EntityPlayer ep = this.getPlacer();
if (ep != null && !ReikaPlayerAPI.isFake(ep) && Chromabilities.DOUBLECRAFT.enabledOn(ep))
n = 2;
ReikaInventoryHelper.addOrSetStack(recipe.output.copy(), inv, n);
}
energy.subtract(recipe.energy);
progress = 0;
Expand Down
7 changes: 6 additions & 1 deletion TileEntity/Processing/TileEntityGlowFire.java
Expand Up @@ -42,6 +42,7 @@
import Reika.ChromatiCraft.Registry.ChromaPackets;
import Reika.ChromatiCraft.Registry.ChromaSounds;
import Reika.ChromatiCraft.Registry.ChromaTiles;
import Reika.ChromatiCraft.Registry.Chromabilities;
import Reika.ChromatiCraft.Registry.CrystalElement;
import Reika.ChromatiCraft.Render.Particle.EntityBlurFX;
import Reika.ChromatiCraft.Render.Particle.EntityFloatingSeedsFX;
Expand Down Expand Up @@ -166,11 +167,15 @@ public boolean craft() {
if (energy.isEmpty())
return false;
ItemStack in = inv[0];
ItemStack out = in.copy();
EntityPlayer ep = this.getPlacer();
if (ep != null && !ReikaPlayerAPI.isFake(ep) && Chromabilities.DOUBLECRAFT.enabledOn(ep))
out.stackSize *= 2;
inv[0] = null;
boolean flag = true;
boolean flag2 = false;
while(flag) {
this.dropItem(in);
this.dropItem(out);
flag = this.craftAndDrop(in);
flag2 |= flag;
}
Expand Down
3 changes: 3 additions & 0 deletions TileEntity/Recipe/TileEntityCastingTable.java
Expand Up @@ -63,6 +63,7 @@
import Reika.ChromatiCraft.Registry.ChromaSounds;
import Reika.ChromatiCraft.Registry.ChromaStructures;
import Reika.ChromatiCraft.Registry.ChromaTiles;
import Reika.ChromatiCraft.Registry.Chromabilities;
import Reika.ChromatiCraft.Registry.CrystalElement;
import Reika.ChromatiCraft.Render.BotaniaPetalShower;
import Reika.ChromatiCraft.Render.Particle.EntityFloatingSeedsFX;
Expand Down Expand Up @@ -923,6 +924,8 @@ private void craft() {
count--;

ItemStack toadd = ReikaItemHelper.getSizedItemStack(out, activeRecipe.getOutput().stackSize);
if (Chromabilities.DOUBLECRAFT.enabledOn(craftingPlayer))
toadd.stackSize *= 2;
NBTTagCompound NBTout = NBTin != null ? (NBTTagCompound)NBTin.copy() : null;
if (NBTout != null) {
ReikaNBTHelper.combineNBT(NBTout, toadd.stackTagCompound);
Expand Down

0 comments on commit 424a900

Please sign in to comment.