Deprecating Verdant and Azure Dust
Renaming "Tome of Alchemical Knowledge" to "Alchenomicon"
This commit is contained in:
parent
15fb3da1de
commit
1fbc290025
|
@ -116,7 +116,7 @@ public class EquivalentExchange3
|
|||
public void postInit(FMLPostInitializationEvent event)
|
||||
{
|
||||
CachedOreDictionary.getInstance();
|
||||
Abilities.setOresNotLearnable();
|
||||
Abilities.initNotLearnables();
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
|
|
@ -9,18 +9,18 @@ import net.minecraft.item.crafting.CraftingManager;
|
|||
|
||||
public class CraftingHandler
|
||||
{
|
||||
public static void init()
|
||||
{
|
||||
public static void init() {
|
||||
// Add in the ability to dye Alchemical Bags
|
||||
CraftingManager.getInstance().getRecipeList().add(new RecipesAlchemicalBagDyes());
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onItemCraftedEvent(PlayerEvent.ItemCraftedEvent event)
|
||||
{
|
||||
if (event.crafting.getItem() instanceof IOwnable)
|
||||
{
|
||||
public void onItemCraftedEvent(PlayerEvent.ItemCraftedEvent event) {
|
||||
if (event.crafting.getItem() instanceof IOwnable) {
|
||||
ItemHelper.setOwner(event.crafting, event.player);
|
||||
}
|
||||
|
||||
// TODO Conversion of deprecated alchemical dusts to shards of minium with appropriate energy values
|
||||
// https://github.com/pahimar/Equivalent-Exchange-3/issues/1020
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ import net.minecraftforge.oredict.OreDictionary;
|
|||
|
||||
public class Abilities
|
||||
{
|
||||
public static void setOresNotLearnable()
|
||||
public static void initNotLearnables()
|
||||
{
|
||||
for (String oreName : OreDictionary.getOreNames())
|
||||
{
|
||||
|
@ -22,7 +22,10 @@ public class Abilities
|
|||
AbilityRegistryProxy.setAsNotLearnable(new OreStack(oreName));
|
||||
}
|
||||
}
|
||||
|
||||
AbilityRegistryProxy.setAsNotLearnable(new ItemStack(Blocks.coal_ore));
|
||||
|
||||
AbilityRegistryProxy.setAsNotLearnable(ModItems.shardMinium);
|
||||
AbilityRegistryProxy.setAsNotLearnable(new ItemStack(ModItems.alchemicalDust, 1, 1));
|
||||
AbilityRegistryProxy.setAsNotLearnable(new ItemStack(ModItems.alchemicalDust, 1, 2));
|
||||
}
|
||||
}
|
|
@ -18,6 +18,9 @@ public class Recipes
|
|||
|
||||
private static void initModRecipes()
|
||||
{
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.shardMinium, 1, 0), new ItemStack(ModItems.alchemicalDust, 1, 1));
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.shardMinium, 1, 0), new ItemStack(ModItems.alchemicalDust, 1, 2));
|
||||
|
||||
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.alchemicalFuelBlock, 1, 0), "fff", "fff", "fff", 'f', new ItemStack(ModItems.alchemicalFuel, 1, 0));
|
||||
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.alchemicalFuelBlock, 1, 1), "fff", "fff", "fff", 'f', new ItemStack(ModItems.alchemicalFuel, 1, 1));
|
||||
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.alchemicalFuelBlock, 1, 2), "fff", "fff", "fff", 'f', new ItemStack(ModItems.alchemicalFuel, 1, 2));
|
||||
|
@ -78,10 +81,6 @@ public class Recipes
|
|||
AludelRecipeManager.getInstance().addRecipe(new ItemStack(ModItems.alchemicalFuel, 1, 2), new ItemStack(ModItems.alchemicalFuel, 1, 1), new ItemStack(ModItems.alchemicalDust, 14, 3));
|
||||
|
||||
// Alchemical Chest
|
||||
AludelRecipeManager.getInstance().addRecipe(new ItemStack(ModBlocks.alchemicalChest, 1, 0), new ItemStack(Blocks.chest, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(ModItems.alchemicalDust, 8, 1));
|
||||
AludelRecipeManager.getInstance().addRecipe(new ItemStack(ModBlocks.alchemicalChest, 1, 0), new ItemStack(Blocks.trapped_chest, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(ModItems.alchemicalDust, 8, 1));
|
||||
AludelRecipeManager.getInstance().addRecipe(new ItemStack(ModBlocks.alchemicalChest, 1, 1), new ItemStack(Blocks.chest, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(ModItems.alchemicalDust, 8, 2));
|
||||
AludelRecipeManager.getInstance().addRecipe(new ItemStack(ModBlocks.alchemicalChest, 1, 1), new ItemStack(ModBlocks.alchemicalChest, 1, 0), new ItemStack(ModItems.alchemicalDust, 8, 2));
|
||||
AludelRecipeManager.getInstance().addRecipe(new ItemStack(ModBlocks.alchemicalChest, 1, 2), new ItemStack(Blocks.chest, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(ModItems.alchemicalDust, 8, 3));
|
||||
AludelRecipeManager.getInstance().addRecipe(new ItemStack(ModBlocks.alchemicalChest, 1, 2), new ItemStack(ModBlocks.alchemicalChest, 1, 0), new ItemStack(ModItems.alchemicalDust, 8, 3));
|
||||
AludelRecipeManager.getInstance().addRecipe(new ItemStack(ModBlocks.alchemicalChest, 1, 2), new ItemStack(ModBlocks.alchemicalChest, 1, 1), new ItemStack(ModItems.alchemicalDust, 8, 3));
|
||||
|
|
|
@ -76,9 +76,7 @@ public class ItemAlchemicalDust extends ItemEE
|
|||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item, CreativeTabs creativeTab, List list)
|
||||
{
|
||||
for (int meta = 0; meta < Names.Items.ALCHEMICAL_DUST_SUBTYPES.length; ++meta)
|
||||
{
|
||||
list.add(new ItemStack(this, 1, meta));
|
||||
}
|
||||
list.add(new ItemStack(this, 1, 0));
|
||||
list.add(new ItemStack(this, 1, 3));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
package com.pahimar.ee3.item;
|
||||
|
||||
import com.pahimar.ee3.api.exchange.EnergyValue;
|
||||
import com.pahimar.ee3.api.exchange.IEnergyValueProvider;
|
||||
import com.pahimar.ee3.reference.Names;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ItemMiniumShard extends ItemEE
|
||||
public class ItemMiniumShard extends ItemEE implements IEnergyValueProvider
|
||||
{
|
||||
public ItemMiniumShard()
|
||||
{
|
||||
|
@ -10,4 +13,13 @@ public class ItemMiniumShard extends ItemEE
|
|||
this.setMaxStackSize(64);
|
||||
this.setUnlocalizedName(Names.Items.MINIUM_SHARD);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnergyValue getEnergyValue(ItemStack itemStack) {
|
||||
if (itemStack != null && itemStack.hasTagCompound() && itemStack.getTagCompound().hasKey("energyValue")) {
|
||||
if (Float.compare(itemStack.getTagCompound().getFloat("energyValue"), 0) > 0)
|
||||
return new EnergyValue(itemStack.getTagCompound().getFloat("energyValue"));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,16 +1,14 @@
|
|||
package com.pahimar.ee3.network.message;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
import com.pahimar.ee3.tileentity.TileEntityResearchStation;
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import cpw.mods.fml.common.network.ByteBufUtils;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessage;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
|
||||
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
public class MessageTileEntityResearchStation implements IMessage, IMessageHandler<MessageTileEntityResearchStation, IMessage>
|
||||
{
|
||||
|
|
|
@ -1,59 +1,34 @@
|
|||
package com.pahimar.ee3.util;
|
||||
|
||||
import com.pahimar.ee3.api.exchange.EnergyValue;
|
||||
import com.pahimar.ee3.exchange.EnergyValueRegistry;
|
||||
import com.pahimar.ee3.api.exchange.EnergyValueRegistryProxy;
|
||||
import com.pahimar.ee3.init.ModItems;
|
||||
import com.pahimar.ee3.item.ItemAlchemicalDust;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import java.util.TreeMap;
|
||||
import java.util.Random;
|
||||
|
||||
public class CalcinationHelper
|
||||
{
|
||||
public static ItemStack getCalcinationResult(ItemStack calcinedStack)
|
||||
{
|
||||
ItemStack itemStack = calcinedStack.copy();
|
||||
itemStack.stackSize = 1;
|
||||
private static Random random = new Random();
|
||||
|
||||
TreeMap<EnergyValue, ItemStack> sortedItems = new TreeMap<EnergyValue, ItemStack>();
|
||||
public static ItemStack getCalcinationResult(ItemStack itemStack) {
|
||||
EnergyValue dustEnergyValue = EnergyValueRegistryProxy.getEnergyValue(new ItemStack(ModItems.alchemicalDust, 1, 3));
|
||||
EnergyValue itemStackEnergyValue = EnergyValueRegistryProxy.getEnergyValue(itemStack);
|
||||
|
||||
for (ItemStack dustStack : ItemAlchemicalDust.getAlchemicalDusts())
|
||||
{
|
||||
// If the item to be calcined is an alchemical dust, return null (you cannot calcine what's already been calcined)
|
||||
if (ItemHelper.equals(itemStack, dustStack))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
if (dustEnergyValue != null && itemStackEnergyValue != null) {
|
||||
int dustAmount = (int) Math.floor(itemStackEnergyValue.getValue() / dustEnergyValue.getValue());
|
||||
float residualEMC = itemStackEnergyValue.getValue() - (dustAmount * dustEnergyValue.getValue());
|
||||
|
||||
if (EnergyValueRegistry.getInstance().hasEnergyValue(dustStack))
|
||||
{
|
||||
sortedItems.put(EnergyValueRegistry.getInstance().getEnergyValue(dustStack), dustStack);
|
||||
double u = (double) residualEMC / dustEnergyValue.getValue(); // expected value (µ)
|
||||
double s = u / 2; // deviation (σ)
|
||||
u *= 1 - 0.0043451773677092; // negative cut-off correction factor
|
||||
dustAmount += (int) (Math.max(0, random.nextGaussian() * s + u) + random.nextDouble());
|
||||
|
||||
if (dustAmount > 0) {
|
||||
return new ItemStack(ModItems.alchemicalDust, dustAmount, 3);
|
||||
}
|
||||
}
|
||||
|
||||
if (EnergyValueRegistry.getInstance().hasEnergyValue(itemStack))
|
||||
{
|
||||
if (sortedItems.containsKey(EnergyValueRegistry.getInstance().getEnergyValue(itemStack)))
|
||||
{
|
||||
return sortedItems.get(EnergyValueRegistry.getInstance().getEnergyValue(itemStack));
|
||||
}
|
||||
else
|
||||
{
|
||||
sortedItems.put(EnergyValueRegistry.getInstance().getEnergyValue(itemStack), itemStack);
|
||||
|
||||
if (sortedItems.lowerEntry(EnergyValueRegistry.getInstance().getEnergyValue(itemStack)) == null)
|
||||
{
|
||||
return new ItemStack(ModItems.alchemicalDust, 1, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
return sortedItems.lowerEntry(EnergyValueRegistry.getInstance().getEnergyValue(itemStack)).getValue();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return new ItemStack(ModItems.alchemicalDust, 1, 0);
|
||||
}
|
||||
return new ItemStack(ModItems.alchemicalDust, 1, 0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ item.ee3:stonePhilosophers.name=Philosopher's Stone [WIP]
|
|||
item.ee3:alchemicalUpgrade.verdant.name=Verdant Upgrade [WIP]
|
||||
item.ee3:alchemicalUpgrade.azure.name=Azure Upgrade [WIP]
|
||||
item.ee3:alchemicalUpgrade.minium.name=Minium Upgrade [WIP]
|
||||
item.ee3:alchemicalTome.name=Tome of Alchemical Knowledge
|
||||
item.ee3:alchemicalTome.name=Alchenomicon
|
||||
item.ee3:matterProto.name=Proto Matter [WIP]
|
||||
item.ee3:matterDark.name=Dark Matter [WIP]
|
||||
item.ee3:matterOmni.name=Omni Matter [WIP]
|
||||
|
@ -114,7 +114,7 @@ container.ee3:calcinator=Calcinator
|
|||
container.ee3:glassBell=Glass Bell
|
||||
container.ee3:researchStation=Research Station
|
||||
container.ee3:augmentationTable=Augmentation Table [WIP]
|
||||
container.ee3:alchemicalTome=Tome of Alchemical Knowledge
|
||||
container.ee3:alchemicalTome=Alchenomicon
|
||||
container.ee3:alchemicalTome.noTransmutationsKnown=No known transmutations
|
||||
container.ee3:transmutationAlchemyArray=Transmutation Square [WIP]
|
||||
|
||||
|
|
Loading…
Reference in a new issue