This commit is contained in:
moen 2012-10-22 09:54:16 +02:00
commit 64ce176250
46 changed files with 1193 additions and 500 deletions

View file

@ -8,13 +8,16 @@ import cpw.mods.fml.client.FMLClientHandler;
import cpw.mods.fml.client.registry.ClientRegistry; import cpw.mods.fml.client.registry.ClientRegistry;
import cpw.mods.fml.client.registry.KeyBindingRegistry; import cpw.mods.fml.client.registry.KeyBindingRegistry;
import cpw.mods.fml.client.registry.RenderingRegistry; import cpw.mods.fml.client.registry.RenderingRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
import ee3.client.core.handlers.KeyBindingHandler; import ee3.client.core.handlers.KeyBindingHandler;
import ee3.client.core.handlers.SoundHandler; import ee3.client.core.handlers.SoundHandler;
import ee3.client.lib.KeyBindings; import ee3.client.core.helper.KeyBindingHelper;
import ee3.client.render.RenderCalcinator; import ee3.client.render.RenderCalcinator;
import ee3.client.render.RenderItemCalcinator;
import ee3.client.render.TextureRedWaterFX; import ee3.client.render.TextureRedWaterFX;
import ee3.client.render.TextureRedWaterFlowFX; import ee3.client.render.TextureRedWaterFlowFX;
import ee3.common.core.CommonProxy; import ee3.common.core.CommonProxy;
import ee3.common.lib.BlockIds;
import ee3.common.lib.Reference; import ee3.common.lib.Reference;
import ee3.common.lib.RenderIds; import ee3.common.lib.RenderIds;
import ee3.common.tile.TileCalcinator; import ee3.common.tile.TileCalcinator;
@ -38,8 +41,8 @@ public class ClientProxy extends CommonProxy {
@Override @Override
public void setKeyBinding(String name, int value) { public void setKeyBinding(String name, int value) {
KeyBindings.addKeyBinding(name, value); KeyBindingHelper.addKeyBinding(LanguageRegistry.instance().getStringLocalization(name), value);
KeyBindings.addIsRepeating(false); KeyBindingHelper.addIsRepeating(false);
} }
@Override @Override
@ -74,6 +77,8 @@ public class ClientProxy extends CommonProxy {
FMLClientHandler.instance().getClient().renderEngine.registerTextureFX(new TextureRedWaterFX()); FMLClientHandler.instance().getClient().renderEngine.registerTextureFX(new TextureRedWaterFX());
FMLClientHandler.instance().getClient().renderEngine.registerTextureFX(new TextureRedWaterFlowFX()); FMLClientHandler.instance().getClient().renderEngine.registerTextureFX(new TextureRedWaterFlowFX());
MinecraftForgeClient.registerItemRenderer(BlockIds.CALCINATOR, new RenderItemCalcinator());
} }
@Override @Override

View file

@ -10,7 +10,8 @@ import cpw.mods.fml.client.FMLClientHandler;
import cpw.mods.fml.client.registry.KeyBindingRegistry; import cpw.mods.fml.client.registry.KeyBindingRegistry;
import cpw.mods.fml.common.TickType; import cpw.mods.fml.common.TickType;
import cpw.mods.fml.common.network.PacketDispatcher; import cpw.mods.fml.common.network.PacketDispatcher;
import ee3.client.lib.KeyBindings; import cpw.mods.fml.common.registry.LanguageRegistry;
import ee3.client.core.helper.KeyBindingHelper;
import ee3.common.EquivalentExchange3; import ee3.common.EquivalentExchange3;
import ee3.common.item.ModItems; import ee3.common.item.ModItems;
import ee3.common.lib.GuiIds; import ee3.common.lib.GuiIds;
@ -31,7 +32,7 @@ import ee3.common.network.PacketTypeHandler;
public class KeyBindingHandler extends KeyBindingRegistry.KeyHandler { public class KeyBindingHandler extends KeyBindingRegistry.KeyHandler {
public KeyBindingHandler() { public KeyBindingHandler() {
super(KeyBindings.gatherKeyBindings(), KeyBindings.gatherIsRepeating()); super(KeyBindingHelper.gatherKeyBindings(), KeyBindingHelper.gatherIsRepeating());
} }
@Override @Override
@ -45,7 +46,7 @@ public class KeyBindingHandler extends KeyBindingRegistry.KeyHandler {
if (tickEnd) { if (tickEnd) {
// If we are not in a GUI of any kind, continue execution // If we are not in a GUI of any kind, continue execution
if (FMLClientHandler.instance().getClient().currentScreen == null) { if (FMLClientHandler.instance().getClient().currentScreen == null) {
if (kb.keyDescription == Reference.KEYBINDING_EXTRA) { if (kb.keyDescription == getLocalizedKey(Reference.KEYBINDING_EXTRA)) {
ItemStack currentItem = FMLClientHandler.instance().getClient().thePlayer.getCurrentEquippedItem(); ItemStack currentItem = FMLClientHandler.instance().getClient().thePlayer.getCurrentEquippedItem();
if (currentItem != null) { if (currentItem != null) {
@ -72,4 +73,7 @@ public class KeyBindingHandler extends KeyBindingRegistry.KeyHandler {
return EnumSet.of(TickType.CLIENT); return EnumSet.of(TickType.CLIENT);
} }
private static String getLocalizedKey(String key) {
return LanguageRegistry.instance().getStringLocalization(key);
}
} }

View file

@ -1,4 +1,4 @@
package ee3.client.lib; package ee3.client.core.helper;
import java.util.ArrayList; import java.util.ArrayList;
import net.minecraft.src.KeyBinding; import net.minecraft.src.KeyBinding;
@ -12,7 +12,7 @@ import net.minecraft.src.KeyBinding;
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html) * @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
* *
*/ */
public class KeyBindings { public class KeyBindingHelper {
public static ArrayList<KeyBinding> keyBindingsList; public static ArrayList<KeyBinding> keyBindingsList;
public static ArrayList<Boolean> isRepeatingList; public static ArrayList<Boolean> isRepeatingList;

View file

@ -4,6 +4,7 @@ import org.lwjgl.opengl.GL11;
import cpw.mods.fml.common.Side; import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly; import cpw.mods.fml.common.asm.SideOnly;
import cpw.mods.fml.common.registry.LanguageRegistry;
import ee3.common.container.ContainerCalcinator; import ee3.common.container.ContainerCalcinator;
import ee3.common.lib.Reference; import ee3.common.lib.Reference;
import ee3.common.tile.TileCalcinator; import ee3.common.tile.TileCalcinator;
@ -20,12 +21,13 @@ public class GuiCalcinator extends GuiContainer {
public GuiCalcinator(InventoryPlayer player, TileCalcinator calcinator) { public GuiCalcinator(InventoryPlayer player, TileCalcinator calcinator) {
super(new ContainerCalcinator(player, calcinator)); super(new ContainerCalcinator(player, calcinator));
this.ySize = 176;
this.calcinator = calcinator; this.calcinator = calcinator;
} }
protected void drawGuiContainerForegroundLayer() protected void drawGuiContainerForegroundLayer()
{ {
this.fontRenderer.drawString("Calcinator", 60, 6, 4210752); this.fontRenderer.drawString(LanguageRegistry.instance().getStringLocalization(Reference.GUI_CALCINATOR_NAME), 60, 6, 4210752);
this.fontRenderer.drawString(StatCollector.translateToLocal("container.inventory"), 8, this.ySize - 96 + 2, 4210752); this.fontRenderer.drawString(StatCollector.translateToLocal("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
} }

View file

@ -0,0 +1,142 @@
package ee3.client.render;
import org.lwjgl.opengl.GL11;
import ee3.common.lib.Reference;
import ee3.common.tile.TileCalcinator;
import net.minecraft.src.ModelBase;
import net.minecraft.src.ModelRenderer;
import net.minecraftforge.client.ForgeHooksClient;
public class ModelCalcinator extends ModelBase {
private static final int TEXTURE_HEIGHT = 128;
private static final int TEXTURE_WIDTH = 128;
private ModelRenderer firePotBottom, firePotLeft, firePotRight, firePotFront, firePotBack;
private ModelRenderer legFrontLeft, legFrontRight, legBackLeft, legBackRight;
private ModelRenderer armFrontLeft, armFrontRight, armBackLeft, armBackRight;
private ModelRenderer bowlBottom, bowlLeft, bowlRight, bowlFront, bowlBack;
private ModelRenderer firePotEmbers, bowlEmbers;
private float scale;
public ModelCalcinator(float scale) {
this.scale = scale;
this.textureHeight = TEXTURE_HEIGHT;
this.textureWidth = TEXTURE_WIDTH;
this.firePotLeft = new ModelRenderer(this, 0, 36);
this.firePotLeft.addBox(-0.5F, -1.5F, -4F, 1, 3, 8, scale);
this.firePotLeft.setRotationPoint(3.5F, 1F, 0F);
this.firePotRight = new ModelRenderer(this, 0, 36);
this.firePotRight.addBox(-0.5F, -1.5F, -4F, 1, 3, 8, scale);
this.firePotRight.setRotationPoint(-3.5F, 1F, 0F);
this.firePotBack = new ModelRenderer(this, 0, 36);
this.firePotBack.addBox(-3F, -1.5F, -0.5F, 6, 3, 1, scale);
this.firePotBack.setRotationPoint(0F, 1F, -3.5F);
this.firePotFront = new ModelRenderer(this, 0, 36);
this.firePotFront.addBox(-3F, -1.5F, -0.5F, 6, 3, 1, scale);
this.firePotFront.setRotationPoint(0F, 1F, 3.5F);
this.firePotBottom = new ModelRenderer(this, 0, 36);
this.firePotBottom.addBox(-3F, -0.5F, -3F, 6, 1, 6, scale);
this.firePotBottom.setRotationPoint(8, 2, 8);
this.firePotBottom.addChild(this.firePotBack);
this.firePotBottom.addChild(this.firePotFront);
this.firePotBottom.addChild(this.firePotLeft);
this.firePotBottom.addChild(this.firePotRight);
this.legFrontLeft = new ModelRenderer(this, 0, 0);
this.legFrontLeft.addBox(-1F, -8F, -1F, 2, 8, 2, scale);
this.legFrontLeft.setRotationPoint(-9F, 6, 0);
this.legFrontRight = new ModelRenderer(this, 0, 0);
this.legFrontRight.addBox(-1F, -8F, -1F, 2, 8, 2, scale);
this.legFrontRight.setRotationPoint(9F, 6, 0);
this.legBackLeft = new ModelRenderer(this, 0, 0);
this.legBackLeft.addBox(-1F, -8F, -1F, 2, 8, 2, scale);
this.legBackLeft.setRotationPoint(0, 6, -9F);
this.legBackRight = new ModelRenderer(this, 0, 0);
this.legBackRight.addBox(-1F, -8F, -1F, 2, 8, 2, scale);
this.legBackRight.setRotationPoint(0, 6, 9F);
this.armFrontLeft = new ModelRenderer(this, 0, 10);
this.armFrontLeft.addBox(-2F, -0.5F, -1F, 4, 1, 2, scale);
this.armFrontLeft.setRotationPoint(6, 1, 0);
this.armFrontRight = new ModelRenderer(this, 0, 10);
this.armFrontRight.addBox(-2F, -0.5F, -1F, 4, 1, 2, scale);
this.armFrontRight.setRotationPoint(-6, 1, 0);
this.armBackLeft = new ModelRenderer(this, 12, 10);
this.armBackLeft.addBox(-1F, -0.5F, -2.0F, 2, 1, 4, scale);
this.armBackLeft.setRotationPoint(0, 1, 6);
this.armBackRight = new ModelRenderer(this, 12, 10);
this.armBackRight.addBox(-1F, -0.5F, -2.0F, 2, 1, 4, scale);
this.armBackRight.setRotationPoint(0, 1, -6);
this.firePotBottom.addChild(this.legFrontLeft);
this.firePotBottom.addChild(this.legFrontRight);
this.firePotBottom.addChild(this.legBackLeft);
this.firePotBottom.addChild(this.legBackRight);
this.firePotBottom.addChild(this.armFrontLeft);
this.firePotBottom.addChild(this.armFrontRight);
this.firePotBottom.addChild(this.armBackLeft);
this.firePotBottom.addChild(this.armBackRight);
this.firePotBottom.rotateAngleY = (float)(Math.PI / 4F);
this.bowlBack = new ModelRenderer(this, 0, 36);
this.bowlBack.addBox(-8F, -3.5F, -0.5F, 16, 7, 1, scale);
this.bowlBack.setRotationPoint(0F, 3.6F, 7.5F);
this.bowlFront = new ModelRenderer(this, 0, 36);
this.bowlFront.addBox(-8F, -3.5F, -0.5F, 16, 7, 1, scale);
this.bowlFront.setRotationPoint(0, 3.6F, -7.5F);
this.bowlLeft = new ModelRenderer(this, 0, 44);
this.bowlLeft.addBox(-0.5F, -3.5F, -7F, 1, 7, 14, scale);
this.bowlLeft.setRotationPoint(7.5F, 3.6F, 0);
this.bowlRight = new ModelRenderer(this, 0, 44);
this.bowlRight.addBox(-0.5F, -3.5F, -7F, 1, 7, 14, scale);
this.bowlRight.setRotationPoint(-7.5F, 3.6F, 0);
this.bowlBottom = new ModelRenderer(this, 0, 19);
this.bowlBottom.addBox(-8F, -1F, -8F, 16, 1, 16, scale);
this.bowlBottom.setRotationPoint(8, 9, 8);
this.bowlBottom.addChild(this.bowlBack);
this.bowlBottom.addChild(this.bowlFront);
this.bowlBottom.addChild(this.bowlLeft);
this.bowlBottom.addChild(this.bowlRight);
this.bowlEmbers = new ModelRenderer(this, 0, 65);
this.bowlEmbers.addBox(-7F, -0.5F, -7F, 14, 1, 14, scale);
this.bowlEmbers.setRotationPoint(8, 9, 8);
this.bowlEmbers.mirror = true;
this.firePotEmbers = new ModelRenderer(this, 0, 65);
this.firePotEmbers.addBox(-3F, -0.5F, -3F, 6, 1, 6, scale);
this.firePotEmbers.setRotationPoint(8, 3, 8);
this.firePotEmbers.rotateAngleY = (float)(Math.PI / 4F);
}
public void render(TileCalcinator calcinator, double x, double y, double z) {
GL11.glPushMatrix();
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glTranslated(x, y, z);
ForgeHooksClient.bindTexture(Reference.SPRITE_SHEET_LOCATION + "calcinator.png", 0);
firePotBottom.render(scale);
bowlBottom.render(scale);
firePotEmbers.render(scale);
bowlEmbers.render(scale);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glPopMatrix();
}
public void render(float scale) {
firePotBottom.render(scale);
bowlBottom.render(scale);
firePotEmbers.render(scale);
bowlEmbers.render(scale);
}
}

View file

@ -2,116 +2,22 @@ package ee3.client.render;
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
import ee3.common.lib.Reference; import ee3.common.tile.TileCalcinator;
import net.minecraft.src.ModelBase; import net.minecraft.src.ModelBase;
import net.minecraft.src.ModelRenderer; import net.minecraft.src.ModelRenderer;
import net.minecraft.src.Tessellator;
import net.minecraft.src.TileEntity; import net.minecraft.src.TileEntity;
import net.minecraft.src.TileEntitySpecialRenderer; import net.minecraft.src.TileEntitySpecialRenderer;
import net.minecraftforge.client.ForgeHooksClient;
public class RenderCalcinator extends TileEntitySpecialRenderer { public class RenderCalcinator extends TileEntitySpecialRenderer {
private static final int TEXTURE_HEIGHT = 128; static final float scale = (float) (1.0 / 16.0);
private static final int TEXTURE_WIDTH = 128;
private ModelBase model = new ModelBase() {}; private ModelCalcinator modelCalcinator = new ModelCalcinator(scale);
static final float factor = (float) (1.0 / 16.0);
/* The four support legs of the Calcinator */
private final ModelRenderer[] legs = new ModelRenderer[4];
/* The four support arms for the fire plateof the Calcinator */
private final ModelRenderer[] supportArms = new ModelRenderer[4];
/* The five faces (four sides and the bottom) of the Calcinator bowl */
private final ModelRenderer[] bowlParts = new ModelRenderer[5];
private final ModelRenderer firePlate;
private final ModelRenderer ashLayer;
public RenderCalcinator() {
model.textureHeight = TEXTURE_HEIGHT;
model.textureWidth = TEXTURE_WIDTH;
legs[0] = new ModelRenderer(model, 0, 0);
legs[0].addBox(-1F, -8F, -1F, 2, 8, 2).setRotationPoint(2, 8, 2);
legs[0].rotateAngleY = ((float)Math.PI / 4F);
legs[1] = new ModelRenderer(model, 0, 0);
legs[1].addBox(-1F, -8F, -1F, 2, 8, 2).setRotationPoint(2, 8, 14);
legs[1].rotateAngleY = ((float)Math.PI / 4F);
legs[2] = new ModelRenderer(model, 0, 0);
legs[2].addBox(-1F, -8F, -1F, 2, 8, 2).setRotationPoint(14, 8, 2);
legs[2].rotateAngleY = ((float)Math.PI / 4F);
legs[3] = new ModelRenderer(model, 0, 0);
legs[3].addBox(-1F, -8F, -1F, 2, 8, 2).setRotationPoint(14, 8, 14);
legs[3].rotateAngleY = ((float)Math.PI / 4F);
firePlate = new ModelRenderer(model, 0, 10);
firePlate.addBox(-4F, -0.5F, -4F, 8, 1, 8).setRotationPoint(8, 3, 8);
firePlate.rotateAngleY = ((float)Math.PI / 4F);
supportArms[0] = new ModelRenderer(model, 8, 0);
supportArms[0].addBox(-2F, -0.5F, -0.5F, 4, 1, 1).setRotationPoint(4, 3, 4);
supportArms[0].rotateAngleY = ((float)Math.PI * 3 / 4F);
supportArms[1] = new ModelRenderer(model, 8, 0);
supportArms[1].addBox(-2F, -0.5F, -0.5F, 4, 1, 1).setRotationPoint(12, 3, 4);
supportArms[1].rotateAngleY = ((float)Math.PI / 4F);
supportArms[2] = new ModelRenderer(model, 8, 0);
supportArms[2].addBox(-2F, -0.5F, -0.5F, 4, 1, 1).setRotationPoint(12, 3, 12);
supportArms[2].rotateAngleY = ((float)Math.PI * 7 / 4F);
supportArms[3] = new ModelRenderer(model, 8, 0);
supportArms[3].addBox(-2F, -0.5F, -0.5F, 4, 1, 1).setRotationPoint(4, 3, 12);
supportArms[3].rotateAngleY = ((float)Math.PI * 5 / 4F);
bowlParts[0] = new ModelRenderer(model, 0, 19);
bowlParts[0].addBox(-8F, -1F, -8F, 16, 1, 16).setRotationPoint(8, 9, 8);
bowlParts[1] = new ModelRenderer(model, 0, 36);
bowlParts[1].addBox(-8F, -3.5F, -0.5F, 16, 7, 1).setRotationPoint(8, 12.5F, 15.5F);
bowlParts[2] = new ModelRenderer(model, 0, 44);
bowlParts[2].addBox(-0.5F, -3.5F, -7F, 1, 7, 14).setRotationPoint(15.5F, 12.5F, 8);
bowlParts[3] = new ModelRenderer(model, 0, 44);
bowlParts[3].addBox(-0.5F, -3.5F, -7F, 1, 7, 14).setRotationPoint(0.5F, 12.5F, 8);
bowlParts[4] = new ModelRenderer(model, 0, 36);
bowlParts[4].addBox(-8F, -3.5F, -0.5F, 16, 7, 1).setRotationPoint(8F, 12.5F, 0.5F);
ashLayer = new ModelRenderer(model, 0, 65);
ashLayer.addBox(-7F, -0.5F, -7F, 14, 1, 14).setRotationPoint(8, 9, 8);
ashLayer.mirror = true;
}
@Override @Override
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f) { public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float tick) {
render(x, y, z); modelCalcinator.render((TileCalcinator)tileEntity, x, y, z);
}
private void render(double x, double y, double z) {
GL11.glPushMatrix();
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glTranslated(x, y, z);
ForgeHooksClient.bindTexture(Reference.SPRITE_SHEET_LOCATION + "calcinator.png", 0);
firePlate.render(factor);
for (ModelRenderer leg : legs) {
leg.render(factor);
}
for (ModelRenderer supportArm : supportArms) {
supportArm.render(factor);
}
for (ModelRenderer bowlPart : bowlParts) {
bowlPart.render(factor);
}
ashLayer.render(factor);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glPopMatrix();
} }
} }

View file

@ -0,0 +1,49 @@
package ee3.client.render;
import org.lwjgl.opengl.GL11;
import ee3.common.lib.Reference;
import net.minecraft.src.ItemStack;
import net.minecraft.src.Tessellator;
import net.minecraftforge.client.ForgeHooksClient;
import net.minecraftforge.client.IItemRenderer;
public class RenderItemCalcinator implements IItemRenderer {
private ModelCalcinator calcinatorModel;
public RenderItemCalcinator() {
calcinatorModel = new ModelCalcinator(1/16F);
}
@Override
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
return true;
}
@Override
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
return true;
}
@Override
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
switch (type) {
case ENTITY: renderCalcinator(-0.5F, 0.5F, -0.5F); break;
case EQUIPPED: renderCalcinator(0F, 0.4F, 0F); break;
case INVENTORY: renderCalcinator(1F, 0.65F, 1F); break;
default: break;
}
}
private void renderCalcinator(float x, float y, float z) {
Tessellator tesselator = Tessellator.instance;
ForgeHooksClient.bindTexture(Reference.SPRITE_SHEET_LOCATION + "calcinator.png", 0);
GL11.glPushMatrix(); //start
GL11.glTranslatef(x, y, z); //size
calcinatorModel.render(0.0625F);
GL11.glPopMatrix(); //end
}
}

View file

@ -18,18 +18,21 @@ import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.TickRegistry; import cpw.mods.fml.common.registry.TickRegistry;
import ee3.common.block.ModBlocks; import ee3.common.block.ModBlocks;
import ee3.common.core.CommonProxy; import ee3.common.core.CommonProxy;
import ee3.common.core.RecipesTransmutationStone;
import ee3.common.core.handlers.AddonHandler; import ee3.common.core.handlers.AddonHandler;
import ee3.common.core.handlers.ConfigurationHandler; import ee3.common.core.handlers.ConfigurationHandler;
import ee3.common.core.handlers.EntityLivingHandler; import ee3.common.core.handlers.EntityLivingHandler;
import ee3.common.core.handlers.FuelHandler;
import ee3.common.core.handlers.ItemPickupHandler; import ee3.common.core.handlers.ItemPickupHandler;
import ee3.common.core.handlers.LocalizationHandler; import ee3.common.core.handlers.LocalizationHandler;
import ee3.common.core.handlers.PacketHandler; import ee3.common.core.handlers.PacketHandler;
import ee3.common.core.handlers.PlayerDestroyItemHandler; import ee3.common.core.handlers.PlayerDestroyItemHandler;
import ee3.common.core.handlers.VersionCheckTickHandler; import ee3.common.core.handlers.VersionCheckTickHandler;
import ee3.common.core.helper.LogHelper;
import ee3.common.core.helper.VersionHelper; import ee3.common.core.helper.VersionHelper;
import ee3.common.item.ModItems; import ee3.common.item.ModItems;
import ee3.common.lib.ConfigurationSettings;
import ee3.common.lib.Reference; import ee3.common.lib.Reference;
import ee3.common.recipe.RecipesTransmutationStone;
/** /**
* EquivalentExchange3 * EquivalentExchange3
@ -44,24 +47,29 @@ import ee3.common.lib.Reference;
@NetworkMod(channels = { Reference.CHANNEL_NAME }, clientSideRequired = true, serverSideRequired = false, packetHandler = PacketHandler.class) @NetworkMod(channels = { Reference.CHANNEL_NAME }, clientSideRequired = true, serverSideRequired = false, packetHandler = PacketHandler.class)
public class EquivalentExchange3 { public class EquivalentExchange3 {
@Instance @Instance(Reference.MOD_ID)
public static EquivalentExchange3 instance; public static EquivalentExchange3 instance;
@SidedProxy(clientSide = "ee3.client.core.ClientProxy", serverSide = "ee3.common.core.CommonProxy") @SidedProxy(clientSide = Reference.CLIENT_PROXY_CLASS, serverSide = Reference.SERVER_PROXY_CLASS)
public static CommonProxy proxy; public static CommonProxy proxy;
@PreInit @PreInit
public void preInit(FMLPreInitializationEvent event) { public void preInit(FMLPreInitializationEvent event) {
// Initialize the log helper
LogHelper.init();
// Load the localization files into the LanguageRegistry
LocalizationHandler.loadLanguages();
// Initialize the configuration // Initialize the configuration
ConfigurationHandler.init(event.getSuggestedConfigurationFile()); ConfigurationHandler.init(event.getSuggestedConfigurationFile());
// Load the localization files into the LanguageRegistry
LocalizationHandler.instance().loadLanguages();
// Conduct the version check and log the result // Conduct the version check and log the result
VersionHelper.checkVersion(); if (ConfigurationSettings.ENABLE_VERSION_CHECK) {
VersionHelper.logResult(); VersionHelper.checkVersion();
}
VersionHelper.logResult();
// Initialize the Version Check Tick Handler (Client only) // Initialize the Version Check Tick Handler (Client only)
TickRegistry.registerTickHandler(new VersionCheckTickHandler(), Side.CLIENT); TickRegistry.registerTickHandler(new VersionCheckTickHandler(), Side.CLIENT);
@ -106,6 +114,9 @@ public class EquivalentExchange3 {
// Load the Transmutation Stone recipes // Load the Transmutation Stone recipes
RecipesTransmutationStone.init(); RecipesTransmutationStone.init();
// Register the Fuel Handler
GameRegistry.registerFuelHandler(new FuelHandler());
} }

View file

@ -54,7 +54,7 @@ public class BlockCalcinator extends BlockEE {
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9) { public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9) {
if (world.isRemote) { if (!world.isRemote) {
TileCalcinator tileCalcinator = (TileCalcinator) world.getBlockTileEntity(x, y, z); TileCalcinator tileCalcinator = (TileCalcinator) world.getBlockTileEntity(x, y, z);
if (tileCalcinator != null) { if (tileCalcinator != null) {

View file

@ -3,20 +3,121 @@ package ee3.common.container;
import ee3.common.tile.TileCalcinator; import ee3.common.tile.TileCalcinator;
import net.minecraft.src.Container; import net.minecraft.src.Container;
import net.minecraft.src.EntityPlayer; import net.minecraft.src.EntityPlayer;
import net.minecraft.src.FurnaceRecipes;
import net.minecraft.src.InventoryPlayer; import net.minecraft.src.InventoryPlayer;
import net.minecraft.src.ItemStack;
import net.minecraft.src.Slot;
import net.minecraft.src.TileEntityFurnace;
public class ContainerCalcinator extends Container { public class ContainerCalcinator extends Container {
private TileCalcinator calcinator; private TileCalcinator calcinator;
public ContainerCalcinator(InventoryPlayer inventoryPlayer, TileCalcinator calcinator) { public ContainerCalcinator(InventoryPlayer inventoryPlayer, TileCalcinator calcinator) {
this.calcinator = calcinator; // Set the instance of the TileCalcinator for the container
this.calcinator = calcinator;
// Add the calcinator "to be calcined" slot to the container
this.addSlotToContainer(new Slot(calcinator, 0, 56, 17));
// Add the calcinator fuel slot to the container
this.addSlotToContainer(new Slot(calcinator, 1, 56, 62));
// Add the calcined results slot to the container
// TODO Add a slot here
// Add the player's inventory slots to the container
for (int inventoryRowIndex = 0; inventoryRowIndex < 3; ++inventoryRowIndex)
{
for (int inventoryColumnIndex = 0; inventoryColumnIndex < 9; ++inventoryColumnIndex)
{
this.addSlotToContainer(new Slot(inventoryPlayer, inventoryColumnIndex + inventoryRowIndex * 9 + 9, 8 + inventoryColumnIndex * 18, 94 + inventoryRowIndex * 18));
}
}
// Add the player's action bar slots to the container
for (int actionBarSlotIndex = 0; actionBarSlotIndex < 9; ++actionBarSlotIndex)
{
this.addSlotToContainer(new Slot(inventoryPlayer, actionBarSlotIndex, 8 + actionBarSlotIndex * 18, 152));
}
} }
@Override public boolean canInteractWith(EntityPlayer player) {
public boolean canInteractWith(EntityPlayer var1) { //return calcinator.isUseableByPlayer(player);
// TODO Auto-generated method stub return true;
return false;
} }
// TODO Write our own version - this is taken from ContainerFurnace
public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int par2)
{
ItemStack var3 = null;
Slot var4 = (Slot)this.inventorySlots.get(par2);
if (var4 != null && var4.getHasStack())
{
ItemStack var5 = var4.getStack();
var3 = var5.copy();
if (par2 == 2)
{
if (!this.mergeItemStack(var5, 3, 39, true))
{
return null;
}
var4.onSlotChange(var5, var3);
}
else if (par2 != 1 && par2 != 0)
{
if (FurnaceRecipes.smelting().getSmeltingResult(var5) != null)
{
if (!this.mergeItemStack(var5, 0, 1, false))
{
return null;
}
}
else if (TileEntityFurnace.isItemFuel(var5))
{
if (!this.mergeItemStack(var5, 1, 2, false))
{
return null;
}
}
else if (par2 >= 3 && par2 < 30)
{
if (!this.mergeItemStack(var5, 30, 39, false))
{
return null;
}
}
else if (par2 >= 30 && par2 < 39 && !this.mergeItemStack(var5, 3, 30, false))
{
return null;
}
}
else if (!this.mergeItemStack(var5, 3, 39, false))
{
return null;
}
if (var5.stackSize == 0)
{
var4.putStack((ItemStack)null);
}
else
{
var4.onSlotChanged();
}
if (var5.stackSize == var3.stackSize)
{
return null;
}
var4.func_82870_a(par1EntityPlayer, var5);
}
return var3;
}
} }

View file

@ -33,6 +33,9 @@ public class ConfigurationHandler {
configuration.load(); configuration.load();
/* General Configs */ /* General Configs */
ConfigurationSettings.ENABLE_VERSION_CHECK = configuration
.get(CATEGORY_GENERAL, Reference.ENABLE_VERSION_CHECK, ConfigurationSettings.ENABLE_VERSION_CHECK_DEFAULT)
.getBoolean(ConfigurationSettings.ENABLE_VERSION_CHECK_DEFAULT);
ConfigurationSettings.ENABLE_SOUNDS = configuration ConfigurationSettings.ENABLE_SOUNDS = configuration
.get(CATEGORY_GENERAL, Reference.ENABLE_SOUNDS, ConfigurationSettings.ENABLE_SOUNDS_DEFAULT) .get(CATEGORY_GENERAL, Reference.ENABLE_SOUNDS, ConfigurationSettings.ENABLE_SOUNDS_DEFAULT)
.getBoolean(ConfigurationSettings.ENABLE_SOUNDS_DEFAULT); .getBoolean(ConfigurationSettings.ENABLE_SOUNDS_DEFAULT);

View file

@ -7,44 +7,57 @@ import net.minecraft.src.ItemStack;
public class EquivalencyHandler { public class EquivalencyHandler {
public static ArrayList<ArrayList<ItemStack>> equivalencyList = new ArrayList<ArrayList<ItemStack>>(); private static final EquivalencyHandler instance = new EquivalencyHandler();
private static ArrayList<ArrayList<ItemStack>> equivalencyList = new ArrayList<ArrayList<ItemStack>>();
public static EquivalencyHandler instance() {
return instance;
}
public ArrayList<ArrayList<ItemStack>> getAllLists() {
return equivalencyList;
}
public static void addObjectToEquivalencyList(Object obj1, Object obj2) { public void addObjects(Object obj1, Object obj2) {
ItemStack stack1 = GeneralHelper.convertObjectToItemStack(obj1); ItemStack stack1 = GeneralHelper.convertObjectToItemStack(obj1);
ItemStack stack2 = GeneralHelper.convertObjectToItemStack(obj2); ItemStack stack2 = GeneralHelper.convertObjectToItemStack(obj2);
ArrayList<ItemStack> currentList = new ArrayList<ItemStack>(); ArrayList<ItemStack> currentList = new ArrayList<ItemStack>();
Integer stack1Index = getEquivalencyIndexForItem(stack1); Integer stack1Index = getIndexInList(stack1);
Integer stack2Index = getEquivalencyIndexForItem(stack2); Integer stack2Index = getIndexInList(stack2);
if ((stack1Index != null) && (stack2Index != null)) { if ((stack1Index != null) && (stack2Index != null)) {
return; return;
} else if ((stack1Index != null) && (stack2Index == null)) { }
else if ((stack1Index != null) && (stack2Index == null)) {
currentList = equivalencyList.get(stack1Index.intValue()); currentList = equivalencyList.get(stack1Index.intValue());
currentList.add(stack2); currentList.add(stack2);
equivalencyList.set(stack1Index.intValue(), currentList); equivalencyList.set(stack1Index.intValue(), currentList);
} else if ((stack1Index == null) && (stack2Index != null)) { }
else if ((stack1Index == null) && (stack2Index != null)) {
currentList = equivalencyList.get(stack2Index.intValue()); currentList = equivalencyList.get(stack2Index.intValue());
currentList.add(stack1); currentList.add(stack1);
equivalencyList.set(stack2Index.intValue(), currentList); equivalencyList.set(stack2Index.intValue(), currentList);
} else if ((stack1Index == null) && (stack2Index == null)) { }
else if ((stack1Index == null) && (stack2Index == null)) {
currentList.add(stack1); currentList.add(stack1);
currentList.add(stack2); currentList.add(stack2);
equivalencyList.add(currentList); equivalencyList.add(currentList);
} }
} }
public static void addObjectsToEquivalencyLists(Object... objList) { public void addObjects(Object... objList) {
if (objList.length < 2) if (objList.length < 2)
return; return;
for (int i = 0; i < objList.length - 1; i++) { for (int i = 0; i < objList.length - 1; i++) {
addObjectToEquivalencyList(objList[i], objList[i + 1]); addObjects(objList[i], objList[i + 1]);
} }
} }
public static Integer getEquivalencyIndexForItem(Object obj) { public Integer getIndexInList(Object obj) {
ItemStack checkStack = GeneralHelper.convertObjectToItemStack(obj); ItemStack checkStack = GeneralHelper.convertObjectToItemStack(obj);
ArrayList<ItemStack> currentList; ArrayList<ItemStack> currentList;
int i = 0; int i = 0;
@ -52,7 +65,7 @@ public class EquivalencyHandler {
while (i < equivalencyList.size()) { while (i < equivalencyList.size()) {
currentList = equivalencyList.get(i); currentList = equivalencyList.get(i);
for (ItemStack currentStack : currentList) { for (ItemStack currentStack : currentList) {
if (checkStack.isStackEqual(currentStack)) { if (ItemStack.areItemStacksEqual(checkStack, currentStack)) {
return new Integer(i); return new Integer(i);
} }
} }
@ -61,8 +74,25 @@ public class EquivalencyHandler {
return null; return null;
} }
public Integer getIndexinList(int id, int meta) {
ArrayList<ItemStack> currentList;
int i = 0;
public static ArrayList<ItemStack> getEquivalencyListForItem(Object obj) { while (i < equivalencyList.size()) {
currentList = equivalencyList.get(i);
for (ItemStack currentStack : currentList) {
if ((id == currentStack.itemID) && (meta == currentStack.getItemDamage())) {
return new Integer(i);
}
}
++i;
}
return null;
}
public ArrayList<ItemStack> getEquivalencyList(Object obj) {
ItemStack checkStack = GeneralHelper.convertObjectToItemStack(obj); ItemStack checkStack = GeneralHelper.convertObjectToItemStack(obj);
if (checkStack == null) if (checkStack == null)
@ -70,7 +100,7 @@ public class EquivalencyHandler {
for (ArrayList<ItemStack> list : equivalencyList) { for (ArrayList<ItemStack> list : equivalencyList) {
for (ItemStack currentStack : list) { for (ItemStack currentStack : list) {
if (checkStack.isStackEqual(currentStack)) { if (ItemStack.areItemStacksEqual(checkStack, currentStack)) {
return list; return list;
} }
} }
@ -78,8 +108,87 @@ public class EquivalencyHandler {
return null; return null;
} }
public ArrayList<ItemStack> getEquivalencyList(int id, int meta) {
for (ArrayList<ItemStack> list : equivalencyList) {
for (ItemStack currentStack : list) {
if ((id == currentStack.itemID) && (meta == currentStack.getItemDamage())) {
return list;
}
}
}
public static void debug() { return null;
}
public ItemStack getNextInList(Object obj) {
ItemStack checkStack = GeneralHelper.convertObjectToItemStack(obj);
if (checkStack != null) {
return getNextInList(checkStack.itemID, checkStack.getItemDamage());
}
return null;
}
public ItemStack getNextInList(int id, int meta) {
ArrayList<ItemStack> list = getEquivalencyList(id, meta);
ItemStack currentStack;
ItemStack returnStack = null;
int i = 0;
if (list != null) {
while (i < list.size()) {
currentStack = list.get(i);
if ((id == currentStack.itemID) && (meta == currentStack.getItemDamage())) {
returnStack = list.get((i + 1) % list.size());
break;
}
++i;
}
}
return returnStack;
}
public ItemStack getPrevInList(Object obj) {
ItemStack checkStack = GeneralHelper.convertObjectToItemStack(obj);
if (checkStack != null) {
return getPrevInList(checkStack.itemID, checkStack.getItemDamage());
}
return null;
}
public ItemStack getPrevInList(int id, int meta) {
ArrayList<ItemStack> list = getEquivalencyList(id, meta);
ItemStack currentStack;
ItemStack returnStack = null;
int i = 0;
if (list != null) {
while (i < list.size()) {
currentStack = list.get(i);
if ((id == currentStack.itemID) && (meta == currentStack.getItemDamage())) {
int index = ((i - 1) + list.size()) % list.size();
returnStack = list.get(index);
break;
}
++i;
}
}
return returnStack;
}
public void debug() {
int i = 0; int i = 0;
for (ArrayList list : equivalencyList) { for (ArrayList list : equivalencyList) {
System.out.println("equivalencyList[" + i + "]: " + list.toString()); System.out.println("equivalencyList[" + i + "]: " + list.toString());

View file

@ -0,0 +1,14 @@
package ee3.common.core.handlers;
import net.minecraft.src.ItemStack;
import cpw.mods.fml.common.IFuelHandler;
public class FuelHandler implements IFuelHandler {
@Override
public int getBurnTime(ItemStack fuel) {
// TODO Add in fuel values for EE3 fuel related items
return 0;
}
}

View file

@ -1,10 +1,5 @@
package ee3.common.core.handlers; package ee3.common.core.handlers;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.util.Iterator;
import java.util.Properties;
import cpw.mods.fml.common.registry.LanguageRegistry; import cpw.mods.fml.common.registry.LanguageRegistry;
import ee3.common.core.helper.LocalizationHelper; import ee3.common.core.helper.LocalizationHelper;
import ee3.common.lib.Localizations; import ee3.common.lib.Localizations;
@ -20,61 +15,14 @@ import ee3.common.lib.Localizations;
*/ */
public class LocalizationHandler { public class LocalizationHandler {
private static final LocalizationHandler INSTANCE = new LocalizationHandler();
public static LocalizationHandler instance() {
return INSTANCE;
}
/*** /***
* Loads in all the localization files from the Localizations library class * Loads in all the localization files from the Localizations library class
*/ */
public void loadLanguages() { public static void loadLanguages() {
InputStream languageStream = null; // For every file specified in the Localization library class, load them into the Language Registry
Properties languageMappings = new Properties(); for (String localizationFile : Localizations.localeFiles) {
Iterator<String> keyIter = null; LanguageRegistry.instance().loadLocalization(localizationFile, LocalizationHelper.getLocaleFromFileName(localizationFile), LocalizationHelper.isXMLLanguageFile(localizationFile));
String currentKey, currentLang;
try {
// For every file specified in the Localization library class, load them into the Language Registry
for (String localizationFile : Localizations.localeFiles) {
URL localizationFileURL = this.getClass().getResource(localizationFile);
languageStream = localizationFileURL.openStream();
// If this file is a XML file, load it from XML
if (LocalizationHelper.isXMLLanguageFile(localizationFile)) {
languageMappings.loadFromXML(languageStream);
}
// Otherwise, load it like any other Java Properties file
else {
languageMappings.load(languageStream);
}
// Read the locale from the file name of the localization file
currentLang = LocalizationHelper.getLocaleFromFileName(localizationFile);
// For every key in the localization file, add its key:value pair to the Language Registry for the given locale
keyIter = (Iterator<String>)languageMappings.keys();
while (keyIter.hasNext()) {
currentKey = keyIter.next();
LanguageRegistry.instance().addStringLocalization(currentKey, currentLang, languageMappings.getProperty(currentKey));
}
}
} catch (Exception e) {
e.printStackTrace(System.err);
} finally {
// Close the input stream when we are done with it
try {
if (languageStream != null) {
languageStream.close();
}
} catch (IOException ex) {
ex.printStackTrace(System.err);
}
} }
} }
} }

View file

@ -3,7 +3,7 @@ package ee3.common.core.handlers;
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;
import java.io.DataInputStream; import java.io.DataInputStream;
import net.minecraft.src.NetworkManager; import net.minecraft.src.INetworkManager;
import net.minecraft.src.Packet250CustomPayload; import net.minecraft.src.Packet250CustomPayload;
import cpw.mods.fml.common.network.IPacketHandler; import cpw.mods.fml.common.network.IPacketHandler;
import cpw.mods.fml.common.network.Player; import cpw.mods.fml.common.network.Player;
@ -28,7 +28,7 @@ public class PacketHandler implements IPacketHandler {
* @param player The Player associated with the packet * @param player The Player associated with the packet
*/ */
@Override @Override
public void onPacketData(NetworkManager manager, Packet250CustomPayload packet, Player player) { public void onPacketData(INetworkManager manager, Packet250CustomPayload packet, Player player) {
// Build a PacketEE object from the data contained within the Packet250CustomPayload packet // Build a PacketEE object from the data contained within the Packet250CustomPayload packet
PacketEE packetEE = PacketTypeHandler.buildPacket(packet.data); PacketEE packetEE = PacketTypeHandler.buildPacket(packet.data);

View file

@ -8,7 +8,7 @@ public class PlayerDestroyItemHandler {
@ForgeSubscribe @ForgeSubscribe
public void onPlayerDestroyItemEvent(PlayerDestroyItemEvent event) { public void onPlayerDestroyItemEvent(PlayerDestroyItemEvent event) {
// TODO Come back and actually do what I want here // TODO Come back and actually do what I want here
System.out.println(event.original.getItemNameandInformation()); System.out.println(event.original.func_82833_r());
} }
} }

View file

@ -6,6 +6,7 @@ import cpw.mods.fml.client.FMLClientHandler;
import cpw.mods.fml.common.ITickHandler; import cpw.mods.fml.common.ITickHandler;
import cpw.mods.fml.common.TickType; import cpw.mods.fml.common.TickType;
import ee3.common.core.helper.VersionHelper; import ee3.common.core.helper.VersionHelper;
import ee3.common.lib.ConfigurationSettings;
import ee3.common.lib.Reference; import ee3.common.lib.Reference;
public class VersionCheckTickHandler implements ITickHandler { public class VersionCheckTickHandler implements ITickHandler {
@ -17,12 +18,14 @@ public class VersionCheckTickHandler implements ITickHandler {
@Override @Override
public void tickEnd(EnumSet<TickType> type, Object... tickData) { public void tickEnd(EnumSet<TickType> type, Object... tickData) {
if (!initialized) { if (ConfigurationSettings.ENABLE_VERSION_CHECK) {
for (TickType tickType : type) { if (!initialized) {
if (tickType == TickType.CLIENT) { for (TickType tickType : type) {
if (FMLClientHandler.instance().getClient().currentScreen == null) { if (tickType == TickType.CLIENT) {
initialized = true; if (FMLClientHandler.instance().getClient().currentScreen == null) {
FMLClientHandler.instance().getClient().ingameGUI.getChatGUI().printChatMessage(VersionHelper.getResultMessage()); initialized = true;
FMLClientHandler.instance().getClient().ingameGUI.getChatGUI().printChatMessage(Reference.VERSION_CHECK_COLOUR_PREFIX + "[" + Reference.MOD_NAME + "] " + VersionHelper.getResultMessage());
}
} }
} }
} }

View file

@ -1,12 +1,5 @@
package ee3.common.core.helper; package ee3.common.core.helper;
import java.util.HashMap;
import java.util.Properties;
import cpw.mods.fml.common.registry.LanguageRegistry;
import cpw.mods.fml.relauncher.ReflectionHelper;
import net.minecraft.src.StringTranslate;
import ee3.common.core.handlers.LocalizationHandler;
/** /**
* LocalizationHelper * LocalizationHelper
* *
@ -18,40 +11,6 @@ import ee3.common.core.handlers.LocalizationHandler;
*/ */
public class LocalizationHelper { public class LocalizationHelper {
// The language data field name for localization data in the Language Registry
private static final String LANGUAGE_REGISTRY_LANGUAGE_DATA_FIELD = "modLanguageData";
/***
* Returns the localized version of the text represented by key for the current language from the Language Registry
* @param key The key that represents the text we are attempting to localize
* @return The localized string for the specified key for the current language, null if no localized version of the key exists in the Language Registry
*/
public static String localize(String key) {
return localize(StringTranslate.getInstance().getCurrentLanguage(), key);
}
/***
* Returns the localized version of the text represented by key for the specified language from the Language Registry
* @param language The language for which to search for the localized version of the key
* @param key The key that represents the text we are attempting to localize
* @return The localized string for the specified key for the specified language, null if no localized version of the key exists in the Language Registry
*/
public static String localize(String language, String key) {
String localizedValue = "";
HashMap<String,Properties> modLanguageData = null;
Properties languageMapping = null;
try {
modLanguageData = ReflectionHelper.getPrivateValue(cpw.mods.fml.common.registry.LanguageRegistry.class, LanguageRegistry.instance(), LANGUAGE_REGISTRY_LANGUAGE_DATA_FIELD);
languageMapping = modLanguageData.get(language);
localizedValue = languageMapping.getProperty(key);
} catch (Exception e) {
e.printStackTrace(System.err);
}
return localizedValue;
}
/*** /***
* Simple test to determine if a specified file name represents a XML file or not * Simple test to determine if a specified file name represents a XML file or not
* @param fileName String representing the file name of the file in question * @param fileName String representing the file name of the file in question

View file

@ -1,15 +1,24 @@
package ee3.common.core.helper; package ee3.common.core.helper;
import java.util.logging.Level; import java.util.logging.Level;
import java.util.logging.Logger;
import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.FMLLog;
import ee3.common.EquivalentExchange3;
import ee3.common.lib.Reference; import ee3.common.lib.Reference;
public class LogHelper { public class LogHelper {
private static Logger eeLogger = Logger.getLogger(Reference.MOD_NAME);
public static void init() {
eeLogger.setParent(FMLLog.getLogger());
}
public static void log(Level logLevel, String message) { public static void log(Level logLevel, String message) {
System.out.println(Reference.LOGGER_PREFIX + message); //System.out.println(Reference.LOGGER_PREFIX + message);
FMLCommonHandler.instance().getFMLLogger().log(logLevel, Reference.LOGGER_PREFIX + message); eeLogger.log(logLevel, message);
} }
} }

View file

@ -0,0 +1,48 @@
package ee3.common.core.helper;
import net.minecraft.src.ItemStack;
public class QualityHelper {
/*
* Legend for the dust table quality lookup, comparison is based off of quality tiers
*
* Item Quality
* |_0_|_1_|_2_|_3_|_4_|_5_|
* Fuel 0 | 0 | 0 | 0 | 1 | 1 | 1 |
* Quality 1 | 0 | 1 | 1 | 1 | 2 | 2 |
* 2 | 0 | 1 | 2 | 2 | 2 | 2 |
* 3 | 1 | 1 | 2 | 3 | 3 | 3 |
* 4 | 1 | 2 | 2 | 3 | 4 | 4 |
* 5 | 1 | 2 | 2 | 3 | 4 | 5 |
*/
private static int[][] dustTable = {
{0, 0, 0, 1, 1, 1},
{0, 1, 1, 1, 2, 2},
{0, 1, 2, 2, 2, 2},
{1, 1, 2, 3, 3, 3},
{1, 2, 2, 3, 4, 4},
{1, 2, 2, 3, 4, 5},
};
public static int getItemTierQuality(ItemStack item) {
// TODO Return the 'Tier' level of the given ItemStack
return -1;
}
public static int getFuelTierQuality(ItemStack fuel) {
// TODO Return the 'Tier' level of the given ItemStack
return -1;
}
public static int getDustTierQuality(ItemStack item, ItemStack fuel) {
if ((getItemTierQuality(item) >= 0) && (getItemTierQuality(item) <= 5)) {
if ((getFuelTierQuality(fuel) >= 0) && (getFuelTierQuality(fuel) <= 5)) {
return dustTable[getItemTierQuality(item)][getFuelTierQuality(fuel)];
}
}
return -1;
}
}

View file

@ -19,8 +19,7 @@ public class TransmutationHelper {
} }
/* /*
* @TODO Clean up later tonight ItemStack nextItem = EquivalencyHandler.getNextBlockInEquivalencyList(id, meta, player.isSneaking());
ItemStack nextItem = TransmuteEquivalencyList.getNextBlockInEquivalencyList(id, meta, player.isSneaking());
if (nextItem != null) { if (nextItem != null) {
if (Block.blocksList[nextItem.itemID] != null) { if (Block.blocksList[nextItem.itemID] != null) {
@ -30,7 +29,7 @@ public class TransmutationHelper {
} }
} }
*/ */
return false; return false;
} }

View file

@ -7,6 +7,8 @@ import java.util.logging.Level;
import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.registry.LanguageRegistry;
import ee3.common.lib.ConfigurationSettings;
import ee3.common.lib.Reference; import ee3.common.lib.Reference;
/** /**
@ -31,12 +33,14 @@ public class VersionHelper {
public static final byte CONNECTION_ERROR = 3; public static final byte CONNECTION_ERROR = 3;
// Localization keys // Localization keys
private static final String VERSION_CHECK_DISABLED = "version.check_disabled";
private static final String VERSION_CHECK_INIT_LOG_MESSAGE = "version.init_log_message";
private static final String UNINITIALIZED_MESSAGE = "version.uninitialized"; private static final String UNINITIALIZED_MESSAGE = "version.uninitialized";
private static final String CURRENT_MESSAGE = "version.current"; private static final String CURRENT_MESSAGE = "version.current";
private static final String OUTDATED_MESSAGE = "version.outdated"; private static final String OUTDATED_MESSAGE = "version.outdated";
private static final String CONNECTION_ERROR_MESSAGE = "version.connection_error"; private static final String CONNECTION_ERROR_MESSAGE = "version.connection_error";
// Var to hold the result of the remote version check // Var to hold the result of the remote version check, initially set to uninitialized
public static byte result = UNINITIALIZED; public static byte result = UNINITIALIZED;
/*** /***
@ -87,29 +91,40 @@ public class VersionHelper {
} }
public static void logResult() { public static void logResult() {
if ((result == CURRENT) || (result == OUTDATED)) { if (ConfigurationSettings.ENABLE_VERSION_CHECK) {
LogHelper.log(Level.FINE, getResultMessage()); LogHelper.log(Level.INFO, LanguageRegistry.instance().getStringLocalization(VERSION_CHECK_INIT_LOG_MESSAGE) + " " + REMOTE_VERSION_FILE);
if ((result == CURRENT) || (result == OUTDATED)) {
LogHelper.log(Level.INFO, getResultMessage());
}
else {
LogHelper.log(Level.WARNING, getResultMessage());
}
} }
else { else {
LogHelper.log(Level.WARNING, getResultMessage()); LogHelper.log(Level.INFO, getResultMessage());
} }
} }
public static String getResultMessage() { public static String getResultMessage() {
if (result == UNINITIALIZED) { if (ConfigurationSettings.ENABLE_VERSION_CHECK) {
return LocalizationHelper.localize(UNINITIALIZED_MESSAGE); if (result == UNINITIALIZED) {
} return LanguageRegistry.instance().getStringLocalization(UNINITIALIZED_MESSAGE);
else if (result == CURRENT) { }
return LocalizationHelper.localize(CURRENT_MESSAGE); else if (result == CURRENT) {
} return LanguageRegistry.instance().getStringLocalization(CURRENT_MESSAGE);
else if (result == OUTDATED) { }
return LocalizationHelper.localize(OUTDATED_MESSAGE); else if (result == OUTDATED) {
} return LanguageRegistry.instance().getStringLocalization(OUTDATED_MESSAGE);
else if (result == CONNECTION_ERROR) { }
return LocalizationHelper.localize(CONNECTION_ERROR_MESSAGE); else if (result == CONNECTION_ERROR) {
return LanguageRegistry.instance().getStringLocalization(CONNECTION_ERROR_MESSAGE);
}
else {
return null;
}
} }
else { else {
return null; return LanguageRegistry.instance().getStringLocalization(VERSION_CHECK_DISABLED);
} }
} }

View file

@ -0,0 +1,87 @@
package ee3.common.emc;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
public class EMCEntry {
private float cost, recoveryPercentage;
private boolean learnable, recoverable;
private Map<EMCType, Float> breakdown;
public EMCEntry(float cost) {
this.cost = cost;
recoveryPercentage = 1F;
learnable = true;
recoverable = true;
breakdown = Collections.synchronizedMap(new HashMap<EMCType, Float>());
}
public EMCEntry(float cost, float recoveryPercentage, boolean learnable, boolean recoverable) {
this.cost = cost;
this.recoveryPercentage = recoveryPercentage;
this.learnable = learnable;
this.recoverable = recoverable;
breakdown = Collections.synchronizedMap(new HashMap<EMCType, Float>());
}
public float getCost() {
return cost;
}
public float getRecoveryPercentage() {
return recoveryPercentage;
}
public boolean isLearnable() {
return learnable;
}
public boolean isRecoverable() {
return recoverable;
}
public Map<EMCType, Float> getEMCBreakDown() {
return breakdown;
}
public float getEMCBreakdownByType(EMCType emcType) {
if (breakdown.containsKey(emcType)) {
if (breakdown.get(emcType) != null) {
return breakdown.get(emcType).floatValue();
}
}
return -1F;
}
public void setCost(float cost) {
this.cost = cost;
}
public void setRecoveryPercentage(float recoveryPercentage) {
this.recoveryPercentage = recoveryPercentage;
}
public void setLearnable(boolean learnable) {
this.learnable = learnable;
}
public void setRecoverable(boolean recoverable) {
this.recoverable = recoverable;
}
public void addEMCBreakDown(EMCType emcType, Float breakdownPercentage) {
if (!(breakdown.containsKey(emcType))) {
breakdown.put(emcType, breakdownPercentage);
}
}
public void setEMCBreakDown(EMCType emcType, Float breakdownPercentage) {
if (breakdown.containsKey(emcType)) {
breakdown.put(emcType, breakdownPercentage);
}
}
}

View file

@ -0,0 +1,93 @@
package ee3.common.emc;
import java.util.HashMap;
import java.util.Map;
import net.minecraft.src.Block;
import net.minecraft.src.Item;
import net.minecraft.src.ItemStack;
public class EMCRegistry {
private static final EMCRegistry emcRegistry = new EMCRegistry();
private HashMap<Integer, HashMap<Integer, EMCEntry>> emcMap = new HashMap<Integer, HashMap<Integer, EMCEntry>>();
public static EMCRegistry instance() {
return emcRegistry;
}
public EMCEntry getEMCValue(Block block) {
if (block != null) {
return getEMCValue(block.blockID, 0);
}
return null;
}
public EMCEntry getEMCValue(Item item) {
if (item != null) {
return getEMCValue(item.shiftedIndex, 0);
}
return null;
}
public EMCEntry getEMCValue(ItemStack itemStack) {
if (itemStack != null) {
return getEMCValue(itemStack.itemID, itemStack.getItemDamage());
}
return null;
}
public EMCEntry getEMCValue(int id) {
return getEMCValue(id, 0);
}
public EMCEntry getEMCValue(int id, int meta) {
if (emcMap.containsKey(id)) {
if (emcMap.get(id).containsKey(meta)) {
return emcMap.get(id).get(meta);
}
}
return null;
}
public void addEMCValue(Block block, EMCEntry emcEntry) {
addEMCValue(block.blockID, 0, emcEntry);
}
public void addEMCValue(Block block, int meta, EMCEntry emcEntry) {
addEMCValue(block.blockID, meta, emcEntry);
}
public void addEMCValue(Item item, EMCEntry emcEntry) {
addEMCValue(item.shiftedIndex, 0, emcEntry);
}
public void addEMCValue(ItemStack itemStack, EMCEntry emcEntry) {
addEMCValue(itemStack.itemID, itemStack.getItemDamage(), emcEntry);
}
public void addEMCValue(int id, EMCEntry emcEntry) {
addEMCValue(id, 0, emcEntry);
}
public void addEMCValue(int id, int meta, EMCEntry emcEntry) {
HashMap<Integer, EMCEntry> tempMap = new HashMap<Integer, EMCEntry>();
if (emcMap.containsKey(id)) {
tempMap = emcMap.get(id);
if (tempMap.containsKey(meta)) {
return;
}
}
tempMap.put(meta, emcEntry);
emcMap.put(id, tempMap);
}
}

View file

@ -0,0 +1,5 @@
package ee3.common.emc;
public enum EMCType {
CORPOREAL, KINETIC, TEMPORAL, ESSENTIA, AMORPHOUS, VOID, OMNI
}

View file

@ -1,12 +1,16 @@
package ee3.common.item; package ee3.common.item;
import net.minecraft.src.EntityPlayer;
import net.minecraft.src.EnumRarity; import net.minecraft.src.EnumRarity;
import net.minecraft.src.ItemStack; import net.minecraft.src.ItemStack;
import net.minecraft.src.World;
import cpw.mods.fml.common.Side; import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly; import cpw.mods.fml.common.asm.SideOnly;
import ee3.common.EquivalentExchange3; import ee3.common.EquivalentExchange3;
import ee3.common.core.helper.TransmutationHelper;
import ee3.common.lib.ConfigurationSettings; import ee3.common.lib.ConfigurationSettings;
import ee3.common.lib.CustomItemRarity; import ee3.common.lib.CustomItemRarity;
import ee3.common.lib.Reference;
/** /**
* ItemMiniumStone * ItemMiniumStone
@ -46,4 +50,15 @@ public class ItemMiniumStone extends ItemEE {
return itemStack; return itemStack;
} }
@Override
public boolean onItemUse(ItemStack itemStack, EntityPlayer entityPlayer, World world, int x, int y, int z, int l, float f1, float f2, float f3) {
boolean result = TransmutationHelper.transmuteInWorld(world, entityPlayer, itemStack, x, y, z);
if (result) {
itemStack.damageItem(1, entityPlayer);
}
return result;
}
} }

View file

@ -19,6 +19,10 @@ public class ConfigurationSettings {
public static boolean ENABLE_PARTICLE_FX; public static boolean ENABLE_PARTICLE_FX;
public static final boolean ENABLE_PARTICLE_FX_DEFAULT = true; public static final boolean ENABLE_PARTICLE_FX_DEFAULT = true;
// Whether or not EE3 will do a version check when loaded
public static boolean ENABLE_VERSION_CHECK;
public static final boolean ENABLE_VERSION_CHECK_DEFAULT = true;
/* /*
* Minium stone config settings * Minium stone config settings
*/ */

View file

@ -20,22 +20,29 @@ public class Reference {
public static final String VERSION = "1.0.0.0"; public static final String VERSION = "1.0.0.0";
public static final String CHANNEL_NAME = MOD_ID; public static final String CHANNEL_NAME = MOD_ID;
public static final String LOGGER_PREFIX = "[" + MOD_ID + "] "; public static final String LOGGER_PREFIX = "[" + MOD_ID + "] ";
public static final int SECOND_IN_TICKS = 20;
public static final int SHIFTED_ID_RANGE_CORRECTION = 256; public static final int SHIFTED_ID_RANGE_CORRECTION = 256;
public static final String SERVER_PROXY_CLASS = "ee3.common.core.CommonProxy";
public static final String CLIENT_PROXY_CLASS = "ee3.client.core.ClientProxy";
/* Configuration related constants */ /* Configuration related constants */
public static final String ENABLE_VERSION_CHECK = "enable_version_check";
public static final String ENABLE_SOUNDS = "enable_sounds"; public static final String ENABLE_SOUNDS = "enable_sounds";
public static final String ENABLE_PARTICLE_FX = "enable_particle_fx"; public static final String ENABLE_PARTICLE_FX = "enable_particle_fx";
public static final String AUTO_RESOLVE_BLOCK_IDS = "auto_resolve_block_ids"; public static final String AUTO_RESOLVE_BLOCK_IDS = "auto_resolve_block_ids";
/* Text colour related constants */
public static final String VERSION_CHECK_COLOUR_PREFIX = "\u00a7e";
/* KeyBinding related constants */ /* KeyBinding related constants */
// TODO: Localize keybinding names // TODO: Localize keybinding names
public static final String KEYBINDING_EXTRA = "mod.ee3.extra_key"; public static final String KEYBINDING_EXTRA = "key.extra";
public static final int KEYBINDING_EXTRA_DEFAULT = 46; public static final int KEYBINDING_EXTRA_DEFAULT = 46;
public static final String KEYBINDING_RELEASE = "mod.ee3.release_key"; public static final String KEYBINDING_RELEASE = "key.release";
public static final int KEYBINDING_RELEASE_DEFAULT = 19; public static final int KEYBINDING_RELEASE_DEFAULT = 19;
public static final String KEYBINDING_TOGGLE = "mod.ee3.toggle_key"; public static final String KEYBINDING_TOGGLE = "key.toggle";
public static final int KEYBINDING_TOGGLE_DEFAULT = 34; public static final int KEYBINDING_TOGGLE_DEFAULT = 34;
public static final String KEYBINDING_CHARGE = "mod.ee3.charge_key"; public static final String KEYBINDING_CHARGE = "key.charge";
public static final int KEYBINDING_CHARGE_DEFAULT = 47; public static final int KEYBINDING_CHARGE_DEFAULT = 47;
/* Texture related constants */ /* Texture related constants */
@ -45,9 +52,14 @@ public class Reference {
public static final String ITEM_SPRITE_SHEET = "ee3_items.png"; public static final String ITEM_SPRITE_SHEET = "ee3_items.png";
public static final String BLOCK_SPRITE_SHEET = "ee3_blocks.png"; public static final String BLOCK_SPRITE_SHEET = "ee3_blocks.png";
/* Gui related constants */
public static final int SECOND_IN_TICKS = 20; public static final String GUI_CALCINATOR_NAME = "gui.calcinator.name";
/* General Tile Entity related constants */
public static final String TE_GEN_OWNER_NBT_TAG_LABEL = "owner";
public static final String TE_GEN_STATE_NBT_TAG_LABEL = "state";
public static final String TE_GEN_DIRECTION_NBT_TAG_LABEL = "direction";
// TODO: Find a better spot for these // TODO: Find a better spot for these
public static final int BLOCK_RED_WATER_EFFECT_DURATION_BASE = 5; public static final int BLOCK_RED_WATER_EFFECT_DURATION_BASE = 5;
public static final int BLOCK_RED_WATER_EFFECT_DURATION_MODIFIER = 2; public static final int BLOCK_RED_WATER_EFFECT_DURATION_MODIFIER = 2;

View file

@ -5,7 +5,7 @@ import java.io.DataInputStream;
import java.io.DataOutputStream; import java.io.DataOutputStream;
import java.io.IOException; import java.io.IOException;
import cpw.mods.fml.common.network.Player; import cpw.mods.fml.common.network.Player;
import net.minecraft.src.NetworkManager; import net.minecraft.src.INetworkManager;
public class PacketEE { public class PacketEE {
@ -43,7 +43,7 @@ public class PacketEE {
public void writeData(DataOutputStream dos) throws IOException { } public void writeData(DataOutputStream dos) throws IOException { }
public void execute(NetworkManager network, Player player) { } public void execute(INetworkManager network, Player player) { }
public void setKey(int key) { } public void setKey(int key) { }
} }

View file

@ -11,7 +11,7 @@ import ee3.common.lib.ItemIds;
import ee3.common.lib.Reference; import ee3.common.lib.Reference;
import net.minecraft.src.EntityPlayer; import net.minecraft.src.EntityPlayer;
import net.minecraft.src.NetworkManager; import net.minecraft.src.INetworkManager;
import net.minecraft.src.Packet250CustomPayload; import net.minecraft.src.Packet250CustomPayload;
public class PacketKeyPressed extends PacketEE { public class PacketKeyPressed extends PacketEE {
@ -40,7 +40,7 @@ public class PacketKeyPressed extends PacketEE {
this.key = key; this.key = key;
} }
public void execute(NetworkManager manager, Player player) { public void execute(INetworkManager manager, Player player) {
EntityPlayer thePlayer = (EntityPlayer) player; EntityPlayer thePlayer = (EntityPlayer) player;
if ((this.key.equals(Reference.KEYBINDING_EXTRA)) && (thePlayer.getCurrentEquippedItem().getItem().shiftedIndex == ItemIds.MINIUM_STONE)) { if ((this.key.equals(Reference.KEYBINDING_EXTRA)) && (thePlayer.getCurrentEquippedItem().getItem().shiftedIndex == ItemIds.MINIUM_STONE)) {

View file

@ -6,7 +6,7 @@ import java.io.IOException;
import cpw.mods.fml.common.network.Player; import cpw.mods.fml.common.network.Player;
import net.minecraft.src.NetworkManager; import net.minecraft.src.INetworkManager;
import net.minecraftforge.common.ForgeDirection; import net.minecraftforge.common.ForgeDirection;
public class PacketTileUpdate extends PacketEE { public class PacketTileUpdate extends PacketEE {
@ -62,7 +62,7 @@ public class PacketTileUpdate extends PacketEE {
this.player = data.readUTF(); this.player = data.readUTF();
} }
public void execute(NetworkManager manager, Player player) { public void execute(INetworkManager manager, Player player) {
// TODO: Stuff here // TODO: Stuff here
} }

View file

@ -0,0 +1,5 @@
package ee3.common.recipe;
public class RecipesCalcinator {
}

View file

@ -1,194 +1,193 @@
package ee3.common.core; package ee3.common.recipe;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import cpw.mods.fml.common.ObfuscationReflectionHelper; import cpw.mods.fml.common.ObfuscationReflectionHelper;
import net.minecraft.src.Block; import net.minecraft.src.Block;
import net.minecraft.src.FurnaceRecipes; import net.minecraft.src.FurnaceRecipes;
import net.minecraft.src.Item; import net.minecraft.src.Item;
import net.minecraft.src.ItemStack; import net.minecraft.src.ItemStack;
import ee3.common.core.handlers.EquivalencyHandler; import ee3.common.core.handlers.EquivalencyHandler;
import ee3.common.core.helper.GeneralHelper; import ee3.common.core.helper.GeneralHelper;
import ee3.common.core.helper.RecipeHelper; import ee3.common.core.helper.RecipeHelper;
import ee3.common.item.ModItems; import ee3.common.item.ModItems;
import ee3.common.lib.Reference; import ee3.common.lib.Reference;
public class RecipesTransmutationStone { public class RecipesTransmutationStone {
private static ItemStack philStone = new ItemStack(ModItems.philStone, 1, -1); private static ItemStack philStone = new ItemStack(ModItems.philStone, 1, -1);
private static ItemStack miniumStone = new ItemStack(ModItems.miniumStone, 1, -1); private static ItemStack miniumStone = new ItemStack(ModItems.miniumStone, 1, -1);
private static List<ItemStack> transmutationStones = Arrays.asList(miniumStone, philStone); private static List<ItemStack> transmutationStones = Arrays.asList(miniumStone, philStone);
private static ItemStack anyCoal = new ItemStack(Item.coal, 1, -1);
private static ItemStack anyCoal = new ItemStack(Item.coal, 1, -1); private static ItemStack anyWood = new ItemStack(Block.wood, 1, -1);
private static ItemStack anyWood = new ItemStack(Block.wood, 1, -1); private static ItemStack anyPlank = new ItemStack(Block.planks, 1, -1);
private static ItemStack anyPlank = new ItemStack(Block.planks, 1, -1); private static ItemStack anySandStone = new ItemStack(Block.sandStone, 1, -1);
private static ItemStack anySandStone = new ItemStack(Block.sandStone, 1, -1); private static ItemStack dyeBoneMeal = new ItemStack(Item.dyePowder, 1, 15);
private static ItemStack dyeBoneMeal = new ItemStack(Item.dyePowder, 1, 15);
public static void init() {
public static void init() { initEquivalencyList();
initEquivalencyList();
for (ItemStack stone: transmutationStones) {
for (ItemStack stone: transmutationStones) { initTransmutationRecipes(stone);
initTransmutationRecipes(stone); initEquivalenceRecipes(stone);
initEquivalenceRecipes(stone); initReconstructiveRecipes(stone);
initReconstructiveRecipes(stone); initDestructorRecipes(stone);
initDestructorRecipes(stone); initPortableSmeltingRecipes(stone);
initPortableSmeltingRecipes(stone); }
}
if (Reference.DEBUG_MODE) {
if (Reference.DEBUG_MODE) { EquivalencyHandler.instance().debug();
EquivalencyHandler.debug(); }
} }
}
public static void initTransmutationRecipes(ItemStack transmutationStone) {
public static void initTransmutationRecipes(ItemStack transmutationStone) { /* 4 Cobble <-> 1 Flint */
/* 4 Cobble <-> 1 Flint */ RecipeHelper.addRecipe(Item.flint, transmutationStone, Block.cobblestone, Block.cobblestone, Block.cobblestone, Block.cobblestone);
RecipeHelper.addRecipe(Item.flint, transmutationStone, Block.cobblestone, Block.cobblestone, Block.cobblestone, Block.cobblestone); RecipeHelper.addRecipe(new ItemStack(Block.cobblestone, 4), transmutationStone, Item.flint);
RecipeHelper.addRecipe(new ItemStack(Block.cobblestone, 4), transmutationStone, Item.flint);
/* 4 Dirt <-> 1 Gravel */
/* 4 Dirt <-> 1 Gravel */ RecipeHelper.addRecipe(Block.gravel, transmutationStone, Block.dirt, Block.dirt, Block.dirt, Block.dirt);
RecipeHelper.addRecipe(Block.gravel, transmutationStone, Block.dirt, Block.dirt, Block.dirt, Block.dirt); RecipeHelper.addRecipe(new ItemStack(Block.dirt, 4), transmutationStone, Block.gravel);
RecipeHelper.addRecipe(new ItemStack(Block.dirt, 4), transmutationStone, Block.gravel);
/* 4 Sand <-> 1 Sandstone */
/* 4 Sand <-> 1 Sandstone */ // Vanilla Recipes exist to make SandStone from 4 Sand
// Vanilla Recipes exist to make SandStone from 4 Sand RecipeHelper.addRecipe(new ItemStack(Block.sand, 4), transmutationStone, anySandStone);
RecipeHelper.addRecipe(new ItemStack(Block.sand, 4), transmutationStone, anySandStone);
/* 2 Sticks -> Wood Plank */
/* 2 Sticks -> Wood Plank */ RecipeHelper.addRecipe(Block.planks, transmutationStone, Item.stick, Item.stick);
RecipeHelper.addRecipe(Block.planks, transmutationStone, Item.stick, Item.stick); // Vanilla recipe exists to make sticks from planks
// Vanilla recipe exists to make sticks from planks
/* 4 Wood Planks -> Wood Block */
/* 4 Wood Planks -> Wood Block */ RecipeHelper.addRecipe(Block.wood, transmutationStone, anyPlank, anyPlank, anyPlank, anyPlank);
RecipeHelper.addRecipe(Block.wood, transmutationStone, anyPlank, anyPlank, anyPlank, anyPlank); // Vanilla recipes exist to make planks from any wood log
// Vanilla recipes exist to make planks from any wood log
/* 4 Gravel/Sandstone/Flint -> 1 Clay Ball, 1 Clay Ball -> 4 Gravel */
/* 4 Gravel/Sandstone/Flint -> 1 Clay Ball, 1 Clay Ball -> 4 Gravel */ RecipeHelper.addRecipe(Item.clay, transmutationStone, Block.gravel, Block.gravel, Block.gravel, Block.gravel);
RecipeHelper.addRecipe(Item.clay, transmutationStone, Block.gravel, Block.gravel, Block.gravel, Block.gravel); RecipeHelper.addRecipe(Item.clay, transmutationStone, anySandStone, anySandStone, anySandStone, anySandStone);
RecipeHelper.addRecipe(Item.clay, transmutationStone, anySandStone, anySandStone, anySandStone, anySandStone); RecipeHelper.addRecipe(Item.clay, transmutationStone, Item.flint, Item.flint, Item.flint, Item.flint);
RecipeHelper.addRecipe(Item.clay, transmutationStone, Item.flint, Item.flint, Item.flint, Item.flint); RecipeHelper.addRecipe(new ItemStack(Block.gravel, 4), transmutationStone, Item.clay);
RecipeHelper.addRecipe(new ItemStack(Block.gravel, 4), transmutationStone, Item.clay);
/* 2 Wood Log <-> 1 Obsidian */
/* 2 Wood Log <-> 1 Obsidian */ RecipeHelper.addRecipe(Block.obsidian, transmutationStone, anyWood, anyWood);
RecipeHelper.addRecipe(Block.obsidian, transmutationStone, anyWood, anyWood); RecipeHelper.addRecipe(new ItemStack(Block.wood, 2), transmutationStone, Block.obsidian);
RecipeHelper.addRecipe(new ItemStack(Block.wood, 2), transmutationStone, Block.obsidian);
/* 4 Clay Ball <-> 1 Clay Block */
/* 4 Clay Ball <-> 1 Clay Block */ // Vanilla recipe exists to make clay blocks from clay balls
// Vanilla recipe exists to make clay blocks from clay balls RecipeHelper.addRecipe(new ItemStack(Item.clay, 4), transmutationStone, Block.blockClay);
RecipeHelper.addRecipe(new ItemStack(Item.clay, 4), transmutationStone, Block.blockClay);
/* 4 Obsidian/Clay Block -> 1 Iron Ingot, Iron Ingot -> Clay Block */
/* 4 Obsidian/Clay Block -> 1 Iron Ingot, Iron Ingot -> Clay Block */ RecipeHelper.addRecipe(Item.ingotIron, transmutationStone, Block.obsidian, Block.obsidian, Block.obsidian, Block.obsidian);
RecipeHelper.addRecipe(Item.ingotIron, transmutationStone, Block.obsidian, Block.obsidian, Block.obsidian, Block.obsidian); RecipeHelper.addRecipe(Item.ingotIron, transmutationStone, Block.blockClay, Block.blockClay, Block.blockClay, Block.blockClay);
RecipeHelper.addRecipe(Item.ingotIron, transmutationStone, Block.blockClay, Block.blockClay, Block.blockClay, Block.blockClay); RecipeHelper.addRecipe(new ItemStack(Block.blockClay, 4), transmutationStone, Item.ingotIron);
RecipeHelper.addRecipe(new ItemStack(Block.blockClay, 4), transmutationStone, Item.ingotIron);
/* 8 Iron Ingot <-> 1 Gold Ingot */
/* 8 Iron Ingot <-> 1 Gold Ingot */ RecipeHelper.addRecipe(Item.ingotGold, transmutationStone, Item.ingotIron, Item.ingotIron, Item.ingotIron, Item.ingotIron, Item.ingotIron, Item.ingotIron, Item.ingotIron, Item.ingotIron);
RecipeHelper.addRecipe(Item.ingotGold, transmutationStone, Item.ingotIron, Item.ingotIron, Item.ingotIron, Item.ingotIron, Item.ingotIron, Item.ingotIron, Item.ingotIron, Item.ingotIron); RecipeHelper.addRecipe(new ItemStack(Item.ingotIron, 8), transmutationStone, Item.ingotGold);
RecipeHelper.addRecipe(new ItemStack(Item.ingotIron, 8), transmutationStone, Item.ingotGold);
/* 4 Gold Ingot <-> 1 Diamond */
/* 4 Gold Ingot <-> 1 Diamond */ RecipeHelper.addRecipe(Item.diamond, transmutationStone, Item.ingotGold, Item.ingotGold, Item.ingotGold, Item.ingotGold);
RecipeHelper.addRecipe(Item.diamond, transmutationStone, Item.ingotGold, Item.ingotGold, Item.ingotGold, Item.ingotGold); RecipeHelper.addRecipe(new ItemStack(Item.ingotGold, 4), transmutationStone, Item.diamond);
RecipeHelper.addRecipe(new ItemStack(Item.ingotGold, 4), transmutationStone, Item.diamond);
/* 8 Iron Block <-> 1 Gold Block */
/* 8 Iron Block <-> 1 Gold Block */ RecipeHelper.addRecipe(Block.blockGold, transmutationStone, Block.blockSteel, Block.blockSteel, Block.blockSteel, Block.blockSteel, Block.blockSteel, Block.blockSteel, Block.blockSteel, Block.blockSteel);
RecipeHelper.addRecipe(Block.blockGold, transmutationStone, Block.blockSteel, Block.blockSteel, Block.blockSteel, Block.blockSteel, Block.blockSteel, Block.blockSteel, Block.blockSteel, Block.blockSteel); RecipeHelper.addRecipe(new ItemStack(Block.blockSteel, 8), transmutationStone, Block.blockGold);
RecipeHelper.addRecipe(new ItemStack(Block.blockSteel, 8), transmutationStone, Block.blockGold);
/* 4 Gold Block <-> 1 Diamond Block */
/* 4 Gold Block <-> 1 Diamond Block */ RecipeHelper.addRecipe(Block.blockDiamond, transmutationStone, Block.blockGold, Block.blockGold, Block.blockGold, Block.blockGold);
RecipeHelper.addRecipe(Block.blockDiamond, transmutationStone, Block.blockGold, Block.blockGold, Block.blockGold, Block.blockGold); RecipeHelper.addRecipe(new ItemStack(Block.blockGold, 4), transmutationStone, Block.blockDiamond);
RecipeHelper.addRecipe(new ItemStack(Block.blockGold, 4), transmutationStone, Block.blockDiamond);
/* 1 Ender Pearl <-> 4 Iron Ingot */
/* 1 Ender Pearl <-> 4 Iron Ingot */ RecipeHelper.addRecipe(Item.enderPearl, transmutationStone, Item.ingotIron, Item.ingotIron, Item.ingotIron, Item.ingotIron);
RecipeHelper.addRecipe(Item.enderPearl, transmutationStone, Item.ingotIron, Item.ingotIron, Item.ingotIron, Item.ingotIron); RecipeHelper.addRecipe(new ItemStack(Item.ingotIron, 4), transmutationStone, Item.enderPearl);
RecipeHelper.addRecipe(new ItemStack(Item.ingotIron, 4), transmutationStone, Item.enderPearl); }
}
public static void initEquivalenceRecipes(ItemStack stone) {
public static void initEquivalenceRecipes(ItemStack stone) { int outputI;
int outputI;
for (ArrayList<ItemStack> itemStackList : EquivalencyHandler.instance().getAllLists()) {
for (ArrayList<ItemStack> itemStackList : EquivalencyHandler.equivalencyList) { ItemStack[] currentList = new ItemStack[itemStackList.size()];
ItemStack[] currentList = new ItemStack[itemStackList.size()]; currentList = itemStackList.toArray(currentList);
currentList = itemStackList.toArray(currentList);
for (int i = 0; i < currentList.length; i++) {
for (int i = 0; i < currentList.length; i++) { outputI = (i == currentList.length - 1 ? 0 : i + 1);
outputI = (i == currentList.length - 1 ? 0 : i + 1);
RecipeHelper.addRecipe(currentList[outputI], stone, GeneralHelper.convertSingleStackToPluralStacks(currentList[i]));
RecipeHelper.addRecipe(currentList[outputI], stone, GeneralHelper.convertSingleStackToPluralStacks(currentList[i])); }
} }
} }
}
public static void initReconstructiveRecipes(ItemStack stone) {
public static void initReconstructiveRecipes(ItemStack stone) { /* 3 Bone Meal --> 1 Bone */
/* 3 Bone Meal --> 1 Bone */ RecipeHelper.addRecipe(Item.bone, stone, dyeBoneMeal, dyeBoneMeal, dyeBoneMeal);
RecipeHelper.addRecipe(Item.bone, stone, dyeBoneMeal, dyeBoneMeal, dyeBoneMeal);
/* 2 Blaze Powder --> 1 Blaze Rod */
/* 2 Blaze Powder --> 1 Blaze Rod */ RecipeHelper.addRecipe(Item.blazeRod, stone, Item.blazePowder, Item.blazePowder);
RecipeHelper.addRecipe(Item.blazeRod, stone, Item.blazePowder, Item.blazePowder); }
}
public static void initDestructorRecipes(ItemStack stone) {
public static void initDestructorRecipes(ItemStack stone) { /* Smooth Stone -> Cobble Stone */
/* Smooth Stone -> Cobble Stone */ RecipeHelper.addRecipe(Block.cobblestone, stone, Block.stone);
RecipeHelper.addRecipe(Block.cobblestone, stone, Block.stone);
/* Glass -> Sand */
/* Glass -> Sand */ RecipeHelper.addRecipe(Block.sand, stone, Block.glass);
RecipeHelper.addRecipe(Block.sand, stone, Block.glass);
/* Glowstone Block -> 4 Glowstone Dust */
/* Glowstone Block -> 4 Glowstone Dust */ RecipeHelper.addRecipe(new ItemStack(Item.lightStoneDust, 4), stone, Block.glowStone);
RecipeHelper.addRecipe(new ItemStack(Item.lightStoneDust, 4), stone, Block.glowStone);
/* Brick Block -> 4 Bricks */
/* Brick Block -> 4 Bricks */ RecipeHelper.addRecipe(new ItemStack(Item.brick, 4), stone, Block.brick);
RecipeHelper.addRecipe(new ItemStack(Item.brick, 4), stone, Block.brick); }
}
public static void initPortableSmeltingRecipes(ItemStack stone) {
public static void initPortableSmeltingRecipes(ItemStack stone) { Map furnaceMap = FurnaceRecipes.smelting().getSmeltingList();
Map furnaceMap = FurnaceRecipes.smelting().getSmeltingList(); Map furnaceMetaMap = ObfuscationReflectionHelper.getPrivateValue(FurnaceRecipes.class, FurnaceRecipes.smelting(), "metaSmeltingList");
Map furnaceMetaMap = ObfuscationReflectionHelper.getPrivateValue(FurnaceRecipes.class, FurnaceRecipes.smelting(), "metaSmeltingList");
Iterator iterFurnaceKeyMap = furnaceMap.keySet().iterator();
Iterator iterFurnaceKeyMap = furnaceMap.keySet().iterator(); Iterator iterFurnaceMetaKeyMap = furnaceMetaMap.keySet().iterator();
Iterator iterFurnaceMetaKeyMap = furnaceMetaMap.keySet().iterator();
Integer furnaceMapKey;
Integer furnaceMapKey; List furnaceMetaMapKey;
List furnaceMetaMapKey;
ItemStack unSmeltedStack;
ItemStack unSmeltedStack;
while (iterFurnaceKeyMap.hasNext()) {
while (iterFurnaceKeyMap.hasNext()) { furnaceMapKey = (Integer) iterFurnaceKeyMap.next();
furnaceMapKey = (Integer) iterFurnaceKeyMap.next(); unSmeltedStack = new ItemStack(furnaceMapKey, 1, 0);
unSmeltedStack = new ItemStack(furnaceMapKey, 1, 0);
RecipeHelper.addSmeltingRecipe(unSmeltedStack, stone, anyCoal);
RecipeHelper.addSmeltingRecipe(unSmeltedStack, stone, anyCoal); }
}
while (iterFurnaceMetaKeyMap.hasNext()) {
while (iterFurnaceMetaKeyMap.hasNext()) { furnaceMetaMapKey = (List)iterFurnaceMetaKeyMap.next();
furnaceMetaMapKey = (List)iterFurnaceMetaKeyMap.next(); unSmeltedStack = new ItemStack((Integer)furnaceMetaMapKey.get(0), 1, (Integer)furnaceMetaMapKey.get(1));
unSmeltedStack = new ItemStack((Integer)furnaceMetaMapKey.get(0), 1, (Integer)furnaceMetaMapKey.get(1));
RecipeHelper.addSmeltingRecipe(unSmeltedStack, stone, anyCoal);
RecipeHelper.addSmeltingRecipe(unSmeltedStack, stone, anyCoal); }
} }
}
protected static void initEquivalencyList() {
protected static void initEquivalencyList() { EquivalencyHandler.instance().addObjects(Block.sand, Block.dirt, Block.cobblestone, Block.grass);
EquivalencyHandler.addObjectsToEquivalencyLists(Block.sand, Block.dirt, Block.cobblestone, Block.grass); EquivalencyHandler.instance().addObjects(Block.plantYellow, Block.plantRed);
EquivalencyHandler.addObjectsToEquivalencyLists(Block.plantYellow, Block.plantRed); EquivalencyHandler.instance().addObjects(Block.mushroomRed, Block.mushroomBrown);
EquivalencyHandler.addObjectsToEquivalencyLists(Block.mushroomRed, Block.mushroomBrown); EquivalencyHandler.instance().addObjects(Item.pumpkinSeeds, Item.melonSeeds);
EquivalencyHandler.addObjectsToEquivalencyLists(Item.pumpkinSeeds, Item.melonSeeds); EquivalencyHandler.instance().addObjects(Block.pumpkin, Block.melon);
EquivalencyHandler.addObjectsToEquivalencyLists(Block.pumpkin, Block.melon); EquivalencyHandler.instance().addObjects(new ItemStack(Item.paper, 3), new ItemStack(Item.reed, 3));
EquivalencyHandler.addObjectsToEquivalencyLists(new ItemStack(Item.paper, 3), new ItemStack(Item.reed, 3)); EquivalencyHandler.instance().addObjects(new ItemStack(Item.flint, 2), new ItemStack(Block.gravel, 2), new ItemStack(Block.sandStone, 2, 0), new ItemStack(Block.sandStone, 2, 1), new ItemStack(Block.sandStone, 2, 2));
EquivalencyHandler.addObjectsToEquivalencyLists(new ItemStack(Item.flint, 2), new ItemStack(Block.gravel, 2), new ItemStack(Block.sandStone, 2, 0), new ItemStack(Block.sandStone, 2, 1), new ItemStack(Block.sandStone, 2, 2)); EquivalencyHandler.instance().addObjects(RecipeHelper.getMetaCycle(Block.planks, 4));
EquivalencyHandler.addObjectsToEquivalencyLists(RecipeHelper.getMetaCycle(Block.planks, 4)); EquivalencyHandler.instance().addObjects(RecipeHelper.getMetaCycle(Block.wood, 4));
EquivalencyHandler.addObjectsToEquivalencyLists(RecipeHelper.getMetaCycle(Block.wood, 4)); EquivalencyHandler.instance().addObjects(RecipeHelper.getMetaCycle(Block.sapling, 4));
EquivalencyHandler.addObjectsToEquivalencyLists(RecipeHelper.getMetaCycle(Block.sapling, 4)); EquivalencyHandler.instance().addObjects(RecipeHelper.getMetaCycle(Block.leaves, 4));
EquivalencyHandler.addObjectsToEquivalencyLists(RecipeHelper.getMetaCycle(Block.leaves, 4)); EquivalencyHandler.instance().addObjects(RecipeHelper.getMetaCycle(Block.tallGrass, 3));
EquivalencyHandler.addObjectsToEquivalencyLists(RecipeHelper.getMetaCycle(Block.tallGrass, 3)); EquivalencyHandler.instance().addObjects(RecipeHelper.getMetaCycle(Block.cloth, 16));
EquivalencyHandler.addObjectsToEquivalencyLists(RecipeHelper.getMetaCycle(Block.cloth, 16)); EquivalencyHandler.instance().addObjects(RecipeHelper.getMetaCycle(Block.stoneBrick, 4));
EquivalencyHandler.addObjectsToEquivalencyLists(RecipeHelper.getMetaCycle(Block.stoneBrick, 4)); EquivalencyHandler.instance().addObjects(RecipeHelper.getMetaCycle(Item.dyePowder, 16, 3, 4, 15));
EquivalencyHandler.addObjectsToEquivalencyLists(RecipeHelper.getMetaCycle(Item.dyePowder, 16, 3, 4, 15)); }
}
}
}

View file

@ -1,17 +1,89 @@
package ee3.common.tile; package ee3.common.tile;
import ee3.common.block.ModBlocks;
import net.minecraft.src.IInventory;
import net.minecraft.src.ItemStack;
import net.minecraft.src.NBTTagCompound; import net.minecraft.src.NBTTagCompound;
import net.minecraft.src.NBTTagList;
public class TileCalcinator extends TileEE { public class TileCalcinator extends TileEE implements IInventory {
/**
* The ItemStacks that hold the items currently being used in the Calcinator
*/
private ItemStack[] calcinatorItemStacks = new ItemStack[3];
@Override public void readFromNBT(NBTTagCompound nbtTagCompound) {
public void readFromNBT(NBTTagCompound par1NBTTagCompound) { super.readFromNBT(nbtTagCompound);
super.readFromNBT(par1NBTTagCompound);
// Read in the ItemStacks in the inventory from NBT
NBTTagList tagList = nbtTagCompound.getTagList("Items");
this.calcinatorItemStacks = new ItemStack[this.getSizeInventory()];
for (int i = 0; i < tagList.tagCount(); ++i) {
NBTTagCompound tagCompound = (NBTTagCompound)tagList.tagAt(i);
byte slot = tagCompound.getByte("Slot");
if (slot >= 0 && slot < this.calcinatorItemStacks.length) {
this.calcinatorItemStacks[slot] = ItemStack.loadItemStackFromNBT(tagCompound);
}
}
} }
@Override public void writeToNBT(NBTTagCompound nbtTagCompound) {
public void writeToNBT(NBTTagCompound par1NBTTagCompound) { super.writeToNBT(nbtTagCompound);
super.writeToNBT(par1NBTTagCompound);
// Write the ItemStacks in the inventory to NBT
NBTTagList tagList = new NBTTagList();
for (int currentIndex = 0; currentIndex < this.calcinatorItemStacks.length; ++currentIndex) {
if (this.calcinatorItemStacks[currentIndex] != null) {
NBTTagCompound tagCompound = new NBTTagCompound();
tagCompound.setByte("Slot", (byte)currentIndex);
this.calcinatorItemStacks[currentIndex].writeToNBT(tagCompound);
tagList.appendTag(tagCompound);
}
}
nbtTagCompound.setTag("Items", tagList);
} }
/**
* Returns the number of slots in the inventory.
*/
public int getSizeInventory() {
return this.calcinatorItemStacks.length;
}
/**
* Returns the stack in slot i
*/
public ItemStack getStackInSlot(int i) {
return this.calcinatorItemStacks[i];
}
public ItemStack decrStackSize(int i, int j) {
// TODO Auto-generated method stub
return null;
}
public ItemStack getStackInSlotOnClosing(int i) {
return null;
}
@Override
public void setInventorySlotContents(int var1, ItemStack var2) {
// TODO Auto-generated method stub
}
public String getInvName() {
return "container." + ModBlocks.CALCINATOR_NAME;
}
public int getInventoryStackLimit() {
return 64;
}
public void openChest() { }
public void closeChest() { }
} }

View file

@ -1,7 +1,60 @@
package ee3.common.tile; package ee3.common.tile;
import ee3.common.lib.Reference;
import net.minecraft.src.EntityPlayer;
import net.minecraft.src.NBTTagCompound;
import net.minecraft.src.TileEntity; import net.minecraft.src.TileEntity;
public class TileEE extends TileEntity { public class TileEE extends TileEntity {
private byte direction;
private short state;
private String owner;
public byte getDirection() {
return direction;
}
public void setDirection(byte direction) {
this.direction = direction;
}
public short getState() {
return state;
}
public void setState(short state) {
this.state = state;
}
public String getOwner() {
return owner;
}
public void setOwner(String owner) {
this.owner = owner;
}
public boolean isUseableByPlayer(EntityPlayer player) {
return owner.equals(player.username);
}
public void readFromNBT(NBTTagCompound nbtTagCompound) {
super.readFromNBT(nbtTagCompound);
direction = nbtTagCompound.getByte(Reference.TE_GEN_DIRECTION_NBT_TAG_LABEL);
state = nbtTagCompound.getShort(Reference.TE_GEN_STATE_NBT_TAG_LABEL);
owner = nbtTagCompound.getString(Reference.TE_GEN_OWNER_NBT_TAG_LABEL);
}
public void writeToNBT(NBTTagCompound nbtTagCompound) {
super.writeToNBT(nbtTagCompound);
nbtTagCompound.setByte(Reference.TE_GEN_DIRECTION_NBT_TAG_LABEL, direction);
nbtTagCompound.setShort(Reference.TE_GEN_STATE_NBT_TAG_LABEL, state);
if(owner != null && owner != "") {
nbtTagCompound.setString(Reference.TE_GEN_OWNER_NBT_TAG_LABEL, owner);
}
}
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -2,14 +2,21 @@
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties version="1.0"> <properties version="1.0">
<comment>English (US) Localization File</comment> <comment>English (US) Localization File</comment>
<entry key="key.extra">Extra</entry>
<entry key="key.release">Release</entry>
<entry key="key.toggle">Toggle</entry>
<entry key="key.charge">Charge</entry>
<entry key="item.miniumShard.name">Shard of Minium</entry> <entry key="item.miniumShard.name">Shard of Minium</entry>
<entry key="item.miniumStone.name">Minium Stone</entry> <entry key="item.miniumStone.name">Minium Stone</entry>
<entry key="item.philStone.name">Philosopher's Stone</entry> <entry key="item.philStone.name">Philosopher's Stone</entry>
<entry key="tile.redWaterStill.name">Red Water (Still)</entry> <entry key="tile.redWaterStill.name">Red Water (Still)</entry>
<entry key="tile.redWaterFlowing.name">Red Water (Flowing)</entry> <entry key="tile.redWaterFlowing.name">Red Water (Flowing)</entry>
<entry key="tile.calcinator.name">Calcinator</entry> <entry key="tile.calcinator.name">Calcinator</entry>
<entry key="version.uninitialized">Uninitialized</entry> <entry key="gui.calcinator.name">Calcinator</entry>
<entry key="version.current">Current</entry> <entry key="version.init_log_message">Initializing version check against the remote version authority file, located at</entry>
<entry key="version.outdated">Outdated</entry> <entry key="version.uninitialized">The version check did not complete successfully (version check did not initialize properly)</entry>
<entry key="version.connection_error">Connection Error</entry> <entry key="version.current">You are currently using the most up to date version for your version of Minecraft</entry>
<entry key="version.outdated">You are currently using an out of date version; consider updating here - http://goo.gl/sNcGl</entry>
<entry key="version.connection_error">Error connecting to the remote version authority file (check your Internet connection?)</entry>
<entry key="version.check_disabled">Remote version check disabled, skipping</entry>
</properties> </properties>

View file

@ -2,14 +2,21 @@
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties version="1.0"> <properties version="1.0">
<comment>Dutch (NL) Localization File</comment> <comment>Dutch (NL) Localization File</comment>
<entry key="key.extra">Extra</entry>
<entry key="key.release">Ontlaad</entry>
<entry key="key.toggle">Wissel</entry>
<entry key="key.charge">Opladen</entry>
<entry key="item.miniumShard.name">Minium Scherf</entry> <entry key="item.miniumShard.name">Minium Scherf</entry>
<entry key="item.miniumStone.name">Minium Steen</entry> <entry key="item.miniumStone.name">Minium Steen</entry>
<entry key="item.philStone.name">Steen der Wijzen</entry> <entry key="item.philStone.name">Steen der Wijzen</entry>
<entry key="tile.redWaterStill.name">Rood Water (Stilstaand)</entry> <entry key="tile.redWaterStill.name">Rood Water (Stilstaand)</entry>
<entry key="tile.redWaterFlowing.name">Rood Water (Vloeiend)</entry> <entry key="tile.redWaterFlowing.name">Rood Water (Vloeiend)</entry>
<entry key="tile.calcinator.name">Calcinator</entry> <entry key="tile.calcinator.name">Calcinator</entry>
<entry key="version.uninitialized">Ongestart</entry> <entry key="gui.calcinator.name">Calcinator</entry>
<entry key="version.current">Huidig</entry> <entry key="version.init_log_message">Initialisatie versiecontrole tegen extern versie bestand, te vinden op</entry>
<entry key="version.outdated">Verouderd</entry> <entry key="version.uninitialized">De versiecontrole is niet geslaagd (versiecontrole niet correct gestart)</entry>
<entry key="version.connection_error">Verbindingsfout</entry> <entry key="version.current">Je gebruikt momenteel de meest recente versie voor jouw Minecraft versie</entry>
<entry key="version.outdated">Je gebruikt momenteel een verouderde versie; overweeg om up te daten - http://goo.gl/sNcGl</entry>
<entry key="version.connection_error">Fout bij het verbinden met het extern versiecontrole bestand (controleer je internetverbinding)</entry>
<entry key="version.check_disabled">Externe versiecontrole uitgeschakeld, wordt overgeslagen</entry>
</properties> </properties>

View file

@ -1,15 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties version="1.0"> <properties version="1.0">
<comment>Russian (RU) Localization File</comment> <comment>Russian (RU) Localization File</comment>
<entry key="item.miniumShard.name">Осколок Миниума</entry> <entry key="key.extra">Дополнительная функция</entry>
<entry key="item.miniumStone.name">Миниум</entry> <entry key="key.release">Выпуск</entry>
<entry key="item.philStone.name">Философский Камень</entry> <entry key="key.toggle">Переключение</entry>
<entry key="tile.redWaterStill.name">Красная Вода (Стоящая)</entry> <entry key="key.charge">Заряд</entry>
<entry key="tile.redWaterFlowing.name">Красная Вода (Текущая)</entry> <entry key="item.miniumShard.name">Осколок Сурика</entry>
<entry key="tile.calcinator.name">Кальцинатор</entry> <entry key="item.miniumStone.name">Сурик</entry>
<entry key="version.uninitialized">Неинициализированная</entry> <entry key="item.philStone.name">Философский Камень</entry>
<entry key="version.current">Текущая</entry> <entry key="tile.redWaterStill.name">Красная Вода (Стоящая)</entry>
<entry key="version.outdated">Устаревшая</entry> <entry key="tile.redWaterFlowing.name">Красная Вода (Текущая)</entry>
<entry key="version.connection_error">Ошибка подключения</entry> <entry key="tile.calcinator.name">Кальцинатор</entry>
</properties> <entry key="gui.calcinator.name">Кальцинатор</entry>
<entry key="version.init_log_message">Инициализация проверки версии в удаленном файле, находящемся на</entry>
<entry key="version.uninitialized">Проверка версии не была завершена успешно (проверка версии не инициализирована правильно)</entry>
<entry key="version.current">Вы используете самую последнюю версию для вашей версии Minecraft</entry>
<entry key="version.outdated">Вы используете устаревшую версию, обновите здесь - http://goo.gl/sNcGl</entry>
<entry key="version.connection_error">Ошибка подключения к удаленному файлу (проверьте подключение к Интернету)</entry>
<entry key="version.check_disabled">Удаленная проверка версии отключена, пропуск</entry>
</properties>