Merge branch 'master' of https://github.com/pahimar/Equivalent-Exchange-3.git
This commit is contained in:
commit
d5b25d9cc9
92 changed files with 1634 additions and 1593 deletions
17
build.xml
17
build.xml
|
@ -4,23 +4,25 @@
|
|||
<property file="build.properties" />
|
||||
|
||||
<target name="clean">
|
||||
<delete file="${dir.development}\mcp\src\common\mcmod.info" />
|
||||
<delete dir="${dir.development}\mcp\src\common\ee3" />
|
||||
<delete file="${dir.development}\mcp\src\minecraft\mcmod.info" />
|
||||
<delete dir="${dir.development}\mcp\src\minecraft\com" />
|
||||
<delete dir="${dir.development}\mcp\reobf\minecraft" />
|
||||
</target>
|
||||
|
||||
<target name="build">
|
||||
<copy todir="${dir.development}\mcp\src\common">
|
||||
<fileset dir="${dir.development}\source\Equivalent-Exchange-3\ee3_client\" />
|
||||
<copy todir="${dir.development}\mcp\src\minecraft">
|
||||
<fileset dir="${dir.development}\source\Equivalent-Exchange-3\ee3_common\" />
|
||||
</copy>
|
||||
<replace dir="${dir.development}\mcp\src\common" token="@VERSION@" value="${release.mod.version}" />
|
||||
<replace dir="${dir.development}\mcp\src\minecraft" token="@VERSION@" value="${release.mod.version}" />
|
||||
</target>
|
||||
|
||||
<target name="recompile">
|
||||
<exec dir="${dir.development}\mcp" executable="cmd" os="Windows 7">
|
||||
<arg line="/c recompile.bat" />
|
||||
</exec>
|
||||
<exec dir="${dir.development}\mcp" executable="cmd" os="Windows 8">
|
||||
<arg line="/c recompile.bat" />
|
||||
</exec>
|
||||
<exec dir="${dir.development}\mcp" executable="bash" os="Linux">
|
||||
<arg line="recompile.sh" />
|
||||
</exec>
|
||||
|
@ -33,6 +35,9 @@
|
|||
<exec dir="${dir.development}\mcp" executable="cmd" os="Windows 7">
|
||||
<arg line="/c reobfuscate.bat" />
|
||||
</exec>
|
||||
<exec dir="${dir.development}\mcp" executable="cmd" os="Windows 8">
|
||||
<arg line="/c reobfuscate.bat" />
|
||||
</exec>
|
||||
<exec dir="${dir.development}\mcp" executable="bash" os="Linux">
|
||||
<arg line="reobfuscate.sh" />
|
||||
</exec>
|
||||
|
@ -70,7 +75,7 @@
|
|||
<!-- Build the jar -->
|
||||
<mkdir dir="${dir.release}\${release.minecraft.version}\${release.mod.version}" />
|
||||
<jar destfile="${dir.release}\${release.minecraft.version}\${release.mod.version}\ee3-universal-${release.mod.version}.jar">
|
||||
<fileset dir="${dir.development}\mcp\src\common\" includes="mcmod.info" />
|
||||
<fileset dir="${dir.development}\mcp\src\minecraft\" includes="mcmod.info" />
|
||||
<fileset dir="${dir.development}\mcp\reobf\minecraft" />
|
||||
<fileset dir="${dir.development}\source\Equivalent-Exchange-3\resources" />
|
||||
</jar>
|
||||
|
|
|
@ -1,4 +1,26 @@
|
|||
package ee3.common;
|
||||
package com.pahimar.ee3;
|
||||
|
||||
import com.pahimar.ee3.block.ModBlocks;
|
||||
import com.pahimar.ee3.core.handlers.AddonHandler;
|
||||
import com.pahimar.ee3.core.handlers.ConfigurationHandler;
|
||||
import com.pahimar.ee3.core.handlers.EntityLivingHandler;
|
||||
import com.pahimar.ee3.core.handlers.FuelHandler;
|
||||
import com.pahimar.ee3.core.handlers.ItemPickupHandler;
|
||||
import com.pahimar.ee3.core.handlers.LocalizationHandler;
|
||||
import com.pahimar.ee3.core.handlers.ActionRequestHandler;
|
||||
import com.pahimar.ee3.core.handlers.PacketHandler;
|
||||
import com.pahimar.ee3.core.handlers.PlayerDestroyItemHandler;
|
||||
import com.pahimar.ee3.core.handlers.RenderTickHandler;
|
||||
import com.pahimar.ee3.core.handlers.VersionCheckTickHandler;
|
||||
import com.pahimar.ee3.core.handlers.WorldTransmutationHandler;
|
||||
import com.pahimar.ee3.core.helper.LogHelper;
|
||||
import com.pahimar.ee3.core.helper.VersionHelper;
|
||||
import com.pahimar.ee3.core.proxy.CommonProxy;
|
||||
import com.pahimar.ee3.creativetab.CreativeTabEE3;
|
||||
import com.pahimar.ee3.item.ModItems;
|
||||
import com.pahimar.ee3.lib.ConfigurationSettings;
|
||||
import com.pahimar.ee3.lib.Reference;
|
||||
import com.pahimar.ee3.recipe.RecipesTransmutationStone;
|
||||
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
|
@ -17,27 +39,6 @@ import cpw.mods.fml.common.network.NetworkMod;
|
|||
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.common.registry.TickRegistry;
|
||||
import ee3.client.core.handlers.RenderTickHandler;
|
||||
import ee3.common.block.ModBlocks;
|
||||
import ee3.common.core.CommonProxy;
|
||||
import ee3.common.core.CreativeTabEE3;
|
||||
import ee3.common.core.handlers.ModActionHandler;
|
||||
import ee3.common.core.handlers.AddonHandler;
|
||||
import ee3.common.core.handlers.ConfigurationHandler;
|
||||
import ee3.common.core.handlers.EntityLivingHandler;
|
||||
import ee3.common.core.handlers.FuelHandler;
|
||||
import ee3.common.core.handlers.ItemPickupHandler;
|
||||
import ee3.common.core.handlers.LocalizationHandler;
|
||||
import ee3.common.core.handlers.PacketHandler;
|
||||
import ee3.common.core.handlers.PlayerDestroyItemHandler;
|
||||
import ee3.common.core.handlers.VersionCheckTickHandler;
|
||||
import ee3.common.core.handlers.WorldTransmutationHandler;
|
||||
import ee3.common.core.helper.LogHelper;
|
||||
import ee3.common.core.helper.VersionHelper;
|
||||
import ee3.common.item.ModItems;
|
||||
import ee3.common.lib.ConfigurationSettings;
|
||||
import ee3.common.lib.Reference;
|
||||
import ee3.common.recipe.RecipesTransmutationStone;
|
||||
|
||||
/**
|
||||
* EquivalentExchange3
|
||||
|
@ -110,7 +111,7 @@ public class EquivalentExchange3 {
|
|||
// Register the EntityLiving Handler
|
||||
MinecraftForge.EVENT_BUS.register(new EntityLivingHandler());
|
||||
|
||||
MinecraftForge.EVENT_BUS.register(new ModActionHandler());
|
||||
MinecraftForge.EVENT_BUS.register(new ActionRequestHandler());
|
||||
|
||||
MinecraftForge.EVENT_BUS.register(new WorldTransmutationHandler());
|
||||
|
|
@ -1,70 +1,71 @@
|
|||
package ee3.common.block;
|
||||
|
||||
import ee3.common.EquivalentExchange3;
|
||||
import ee3.common.lib.GuiIds;
|
||||
import ee3.common.lib.RenderIds;
|
||||
import ee3.common.lib.Strings;
|
||||
import ee3.common.tile.TileCalcinator;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/**
|
||||
* BlockCalcinator
|
||||
*
|
||||
* Block class for the Calcinator
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
public class BlockCalcinator extends BlockEE {
|
||||
|
||||
public BlockCalcinator(int id) {
|
||||
super(id, Material.rock);
|
||||
this.setBlockName(Strings.CALCINATOR_NAME);
|
||||
this.setCreativeTab(EquivalentExchange3.tabsEE3);
|
||||
this.setHardness(5F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World var1) {
|
||||
return new TileCalcinator();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return RenderIds.calcinatorRenderId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBlockTextureFromSide(int par1) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9) {
|
||||
|
||||
if (!world.isRemote) {
|
||||
TileCalcinator tileCalcinator = (TileCalcinator) world.getBlockTileEntity(x, y, z);
|
||||
|
||||
if (tileCalcinator != null) {
|
||||
player.openGui(EquivalentExchange3.instance, GuiIds.CALCINATOR, world, x, y, z);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
package com.pahimar.ee3.block;
|
||||
|
||||
import com.pahimar.ee3.EquivalentExchange3;
|
||||
import com.pahimar.ee3.lib.GuiIds;
|
||||
import com.pahimar.ee3.lib.RenderIds;
|
||||
import com.pahimar.ee3.lib.Strings;
|
||||
import com.pahimar.ee3.tileentity.TileCalcinator;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/**
|
||||
* BlockCalcinator
|
||||
*
|
||||
* Block class for the Calcinator
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
public class BlockCalcinator extends BlockEE {
|
||||
|
||||
public BlockCalcinator(int id) {
|
||||
super(id, Material.rock);
|
||||
this.setBlockName(Strings.CALCINATOR_NAME);
|
||||
this.setCreativeTab(EquivalentExchange3.tabsEE3);
|
||||
this.setHardness(5F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World var1) {
|
||||
return new TileCalcinator();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return RenderIds.calcinatorRenderId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBlockTextureFromSide(int par1) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9) {
|
||||
|
||||
if (!world.isRemote) {
|
||||
TileCalcinator tileCalcinator = (TileCalcinator) world.getBlockTileEntity(x, y, z);
|
||||
|
||||
if (tileCalcinator != null) {
|
||||
player.openGui(EquivalentExchange3.instance, GuiIds.CALCINATOR, world, x, y, z);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -1,21 +1,21 @@
|
|||
package ee3.common.block;
|
||||
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
||||
/**
|
||||
* BlockEE
|
||||
*
|
||||
* Parent block class for Equivalent Exchange blocks
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
public abstract class BlockEE extends BlockContainer {
|
||||
|
||||
public BlockEE(int id, Material material) {
|
||||
super(id, material);
|
||||
}
|
||||
|
||||
}
|
||||
package com.pahimar.ee3.block;
|
||||
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
||||
/**
|
||||
* BlockEE
|
||||
*
|
||||
* Parent block class for Equivalent Exchange blocks
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
public abstract class BlockEE extends BlockContainer {
|
||||
|
||||
public BlockEE(int id, Material material) {
|
||||
super(id, material);
|
||||
}
|
||||
|
||||
}
|
|
@ -1,9 +1,10 @@
|
|||
package ee3.common.block;
|
||||
package com.pahimar.ee3.block;
|
||||
|
||||
import com.pahimar.ee3.EquivalentExchange3;
|
||||
import com.pahimar.ee3.lib.Reference;
|
||||
import com.pahimar.ee3.lib.Sprites;
|
||||
import com.pahimar.ee3.lib.Strings;
|
||||
|
||||
import ee3.common.EquivalentExchange3;
|
||||
import ee3.common.lib.Reference;
|
||||
import ee3.common.lib.Sprites;
|
||||
import ee3.common.lib.Strings;
|
||||
import net.minecraft.block.BlockFlowing;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
|
@ -1,8 +1,9 @@
|
|||
package ee3.common.block;
|
||||
package com.pahimar.ee3.block;
|
||||
|
||||
import com.pahimar.ee3.EquivalentExchange3;
|
||||
import com.pahimar.ee3.lib.Sprites;
|
||||
import com.pahimar.ee3.lib.Strings;
|
||||
|
||||
import ee3.common.EquivalentExchange3;
|
||||
import ee3.common.lib.Sprites;
|
||||
import ee3.common.lib.Strings;
|
||||
import net.minecraft.block.BlockStationary;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
|
@ -1,55 +1,56 @@
|
|||
package ee3.common.block;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
import ee3.common.EquivalentExchange3;
|
||||
import ee3.common.lib.BlockIds;
|
||||
import ee3.common.lib.Strings;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
/**
|
||||
* ModBlocks
|
||||
*
|
||||
* Class containing all the EE3 custom blocks
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
public class ModBlocks {
|
||||
|
||||
/* Mod block instances */
|
||||
public static Block calcinator;
|
||||
public static Block redWaterStill;
|
||||
public static Block redWaterFlowing;
|
||||
|
||||
public static void init() {
|
||||
|
||||
calcinator = new BlockCalcinator(BlockIds.CALCINATOR);
|
||||
redWaterStill = new BlockRedWaterStill(BlockIds.RED_WATER_STILL);
|
||||
redWaterFlowing = new BlockRedWaterFlowing(BlockIds.RED_WATER_STILL - 1);
|
||||
|
||||
GameRegistry.registerBlock(calcinator);
|
||||
GameRegistry.registerBlock(redWaterStill);
|
||||
GameRegistry.registerBlock(redWaterFlowing);
|
||||
|
||||
initBlockRecipes();
|
||||
|
||||
}
|
||||
|
||||
private static void initBlockRecipes() {
|
||||
|
||||
// Calcinator Recipe
|
||||
/* Temporarily disabled for pre-release 1, as it is not completely functional
|
||||
GameRegistry.addRecipe(new ItemStack(calcinator),
|
||||
new Object[] {"i i","iii","sfs",
|
||||
Character.valueOf('i'), Item.ingotIron,
|
||||
Character.valueOf('s'), Block.stone,
|
||||
Character.valueOf('f'), Item.flintAndSteel
|
||||
});
|
||||
*/
|
||||
}
|
||||
|
||||
}
|
||||
package com.pahimar.ee3.block;
|
||||
|
||||
import com.pahimar.ee3.EquivalentExchange3;
|
||||
import com.pahimar.ee3.lib.BlockIds;
|
||||
import com.pahimar.ee3.lib.Strings;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
/**
|
||||
* ModBlocks
|
||||
*
|
||||
* Class containing all the EE3 custom blocks
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
public class ModBlocks {
|
||||
|
||||
/* Mod block instances */
|
||||
public static Block calcinator;
|
||||
public static Block redWaterStill;
|
||||
public static Block redWaterFlowing;
|
||||
|
||||
public static void init() {
|
||||
|
||||
calcinator = new BlockCalcinator(BlockIds.CALCINATOR);
|
||||
redWaterStill = new BlockRedWaterStill(BlockIds.RED_WATER_STILL);
|
||||
redWaterFlowing = new BlockRedWaterFlowing(BlockIds.RED_WATER_STILL - 1);
|
||||
|
||||
GameRegistry.registerBlock(calcinator);
|
||||
GameRegistry.registerBlock(redWaterStill);
|
||||
GameRegistry.registerBlock(redWaterFlowing);
|
||||
|
||||
initBlockRecipes();
|
||||
|
||||
}
|
||||
|
||||
private static void initBlockRecipes() {
|
||||
|
||||
// Calcinator Recipe
|
||||
/* Temporarily disabled for pre-release 1, as it is not completely functional
|
||||
GameRegistry.addRecipe(new ItemStack(calcinator),
|
||||
new Object[] {"i i","iii","sfs",
|
||||
Character.valueOf('i'), Item.ingotIron,
|
||||
Character.valueOf('s'), Block.stone,
|
||||
Character.valueOf('f'), Item.flintAndSteel
|
||||
});
|
||||
*/
|
||||
}
|
||||
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package ee3.client.gui;
|
||||
package com.pahimar.ee3.client.gui.inventory;
|
||||
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
@ -6,13 +6,14 @@ import net.minecraft.util.StatCollector;
|
|||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.pahimar.ee3.inventory.ContainerCalcinator;
|
||||
import com.pahimar.ee3.lib.Sprites;
|
||||
import com.pahimar.ee3.lib.Strings;
|
||||
import com.pahimar.ee3.tileentity.TileCalcinator;
|
||||
|
||||
import cpw.mods.fml.common.Side;
|
||||
import cpw.mods.fml.common.asm.SideOnly;
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
import ee3.common.container.ContainerCalcinator;
|
||||
import ee3.common.lib.Sprites;
|
||||
import ee3.common.lib.Strings;
|
||||
import ee3.common.tile.TileCalcinator;
|
||||
|
||||
/**
|
||||
* GuiCalcinator
|
|
@ -1,4 +1,4 @@
|
|||
package ee3.client.gui;
|
||||
package com.pahimar.ee3.client.gui.inventory;
|
||||
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -7,9 +7,10 @@ import net.minecraft.world.World;
|
|||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.pahimar.ee3.inventory.ContainerPortableCrafting;
|
||||
|
||||
import cpw.mods.fml.common.Side;
|
||||
import cpw.mods.fml.common.asm.SideOnly;
|
||||
import ee3.common.container.ContainerPortableCrafting;
|
||||
|
||||
/**
|
||||
* GuiPortableCrafting
|
|
@ -1,9 +1,10 @@
|
|||
package ee3.client.render;
|
||||
package com.pahimar.ee3.client.model;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import ee3.common.lib.Sprites;
|
||||
import ee3.common.tile.TileCalcinator;
|
||||
import com.pahimar.ee3.lib.Sprites;
|
||||
import com.pahimar.ee3.tileentity.TileCalcinator;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraftforge.client.ForgeHooksClient;
|
|
@ -1,9 +1,11 @@
|
|||
package ee3.client.render;
|
||||
package com.pahimar.ee3.client.renderer;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import ee3.common.lib.Reference;
|
||||
import ee3.common.lib.Sprites;
|
||||
import com.pahimar.ee3.client.model.ModelCalcinator;
|
||||
import com.pahimar.ee3.lib.Reference;
|
||||
import com.pahimar.ee3.lib.Sprites;
|
||||
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.client.ForgeHooksClient;
|
||||
|
@ -18,11 +20,11 @@ import net.minecraftforge.client.IItemRenderer;
|
|||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
public class RenderItemCalcinator implements IItemRenderer {
|
||||
public class ItemCalcinatorRenderer implements IItemRenderer {
|
||||
|
||||
private ModelCalcinator calcinatorModel;
|
||||
|
||||
public RenderItemCalcinator() {
|
||||
public ItemCalcinatorRenderer() {
|
||||
calcinatorModel = new ModelCalcinator(1/16F);
|
||||
}
|
||||
|
|
@ -1,12 +1,13 @@
|
|||
package ee3.client.render;
|
||||
package com.pahimar.ee3.client.renderer.texturefx;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.pahimar.ee3.block.ModBlocks;
|
||||
import com.pahimar.ee3.lib.Sprites;
|
||||
|
||||
import net.minecraft.client.renderer.RenderEngine;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
import cpw.mods.fml.client.FMLTextureFX;
|
||||
import ee3.common.block.ModBlocks;
|
||||
import ee3.common.lib.Sprites;
|
||||
|
||||
/**
|
||||
* TextureRedWaterFX
|
|
@ -1,12 +1,13 @@
|
|||
package ee3.client.render;
|
||||
package com.pahimar.ee3.client.renderer.texturefx;
|
||||
|
||||
import net.minecraft.client.renderer.RenderEngine;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.pahimar.ee3.block.ModBlocks;
|
||||
import com.pahimar.ee3.lib.Sprites;
|
||||
|
||||
import cpw.mods.fml.client.FMLTextureFX;
|
||||
import ee3.common.block.ModBlocks;
|
||||
import ee3.common.lib.Sprites;
|
||||
|
||||
/**
|
||||
* TextureRedWaterFlowFX
|
|
@ -1,30 +1,31 @@
|
|||
package ee3.client.render;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import ee3.common.tile.TileCalcinator;
|
||||
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
/**
|
||||
* RenderCalcinator
|
||||
*
|
||||
* Renders the Calcinator in game as a TESR (Tile Entity Special Render)
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
public class RenderCalcinator extends TileEntitySpecialRenderer {
|
||||
|
||||
static final float scale = (float) (1.0 / 16.0);
|
||||
|
||||
private ModelCalcinator modelCalcinator = new ModelCalcinator(scale);
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float tick) {
|
||||
modelCalcinator.render((TileCalcinator)tileEntity, x, y, z);
|
||||
}
|
||||
|
||||
}
|
||||
package com.pahimar.ee3.client.renderer.tileentity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.pahimar.ee3.client.model.ModelCalcinator;
|
||||
import com.pahimar.ee3.tileentity.TileCalcinator;
|
||||
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
/**
|
||||
* RenderCalcinator
|
||||
*
|
||||
* Renders the Calcinator in game as a TESR (Tile Entity Special Render)
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
public class TileEntityCalcinatorRenderer extends TileEntitySpecialRenderer {
|
||||
|
||||
static final float scale = (float) (1.0 / 16.0);
|
||||
|
||||
private ModelCalcinator modelCalcinator = new ModelCalcinator(scale);
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float tick) {
|
||||
modelCalcinator.render((TileCalcinator)tileEntity, x, y, z);
|
||||
}
|
||||
|
||||
}
|
|
@ -1,13 +1,14 @@
|
|||
package ee3.common.core.addons;
|
||||
package com.pahimar.ee3.core.addons;
|
||||
|
||||
import java.util.logging.Level;
|
||||
|
||||
import com.pahimar.ee3.core.helper.LogHelper;
|
||||
import com.pahimar.ee3.core.helper.RecipeHelper;
|
||||
import com.pahimar.ee3.recipe.RecipesTransmutationStone;
|
||||
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
|
||||
import ee3.common.core.helper.LogHelper;
|
||||
import ee3.common.core.helper.RecipeHelper;
|
||||
import ee3.common.recipe.RecipesTransmutationStone;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.src.ModLoader;
|
|
@ -0,0 +1,14 @@
|
|||
package com.pahimar.ee3.core.handlers;
|
||||
|
||||
import com.pahimar.ee3.event.ActionRequestEvent;
|
||||
|
||||
import net.minecraftforge.event.ForgeSubscribe;
|
||||
|
||||
public class ActionRequestHandler {
|
||||
|
||||
@ForgeSubscribe
|
||||
public void onModActionEvent(ActionRequestEvent event) {
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -1,21 +1,21 @@
|
|||
package ee3.common.core.handlers;
|
||||
|
||||
import ee3.common.core.addons.AddonRedPower2;
|
||||
|
||||
/**
|
||||
* AddonHandler
|
||||
*
|
||||
* Takes care of initializing of addons to the mod. Occurs after all mods are
|
||||
* loaded
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
public class AddonHandler {
|
||||
|
||||
public static void init() {
|
||||
AddonRedPower2.initWorld();
|
||||
}
|
||||
|
||||
}
|
||||
package com.pahimar.ee3.core.handlers;
|
||||
|
||||
import com.pahimar.ee3.core.addons.AddonRedPower2;
|
||||
|
||||
/**
|
||||
* AddonHandler
|
||||
*
|
||||
* Takes care of initializing of addons to the mod. Occurs after all mods are
|
||||
* loaded
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
public class AddonHandler {
|
||||
|
||||
public static void init() {
|
||||
AddonRedPower2.initWorld();
|
||||
}
|
||||
|
||||
}
|
|
@ -1,16 +1,18 @@
|
|||
package ee3.common.core.handlers;
|
||||
package com.pahimar.ee3.core.handlers;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import com.pahimar.ee3.EquivalentExchange3;
|
||||
import com.pahimar.ee3.block.ModBlocks;
|
||||
import com.pahimar.ee3.item.ModItems;
|
||||
import com.pahimar.ee3.lib.BlockIds;
|
||||
import com.pahimar.ee3.lib.ConfigurationSettings;
|
||||
import com.pahimar.ee3.lib.ItemIds;
|
||||
import com.pahimar.ee3.lib.Reference;
|
||||
import com.pahimar.ee3.lib.Strings;
|
||||
|
||||
import cpw.mods.fml.common.FMLLog;
|
||||
import ee3.common.EquivalentExchange3;
|
||||
import ee3.common.block.ModBlocks;
|
||||
import ee3.common.item.ModItems;
|
||||
import ee3.common.lib.BlockIds;
|
||||
import ee3.common.lib.ConfigurationSettings;
|
||||
import ee3.common.lib.ItemIds;
|
||||
import ee3.common.lib.Reference;
|
||||
import ee3.common.lib.Strings;
|
||||
import net.minecraftforge.common.Configuration;
|
||||
import static net.minecraftforge.common.Configuration.*;
|
||||
|
|
@ -1,12 +1,13 @@
|
|||
package ee3.client.core.handlers;
|
||||
package com.pahimar.ee3.core.handlers;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import ee3.common.item.ITransmutationStone;
|
||||
import ee3.common.item.IChargeable;
|
||||
import ee3.common.lib.ConfigurationSettings;
|
||||
import ee3.common.lib.Sprites;
|
||||
import com.pahimar.ee3.item.IChargeable;
|
||||
import com.pahimar.ee3.item.ITransmutationStone;
|
||||
import com.pahimar.ee3.lib.ConfigurationSettings;
|
||||
import com.pahimar.ee3.lib.Sprites;
|
||||
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.util.EnumMovingObjectType;
|
||||
import net.minecraftforge.client.event.DrawBlockHighlightEvent;
|
|
@ -1,46 +1,47 @@
|
|||
package ee3.common.core.handlers;
|
||||
|
||||
import ee3.common.core.helper.ItemDropHelper;
|
||||
import ee3.common.core.helper.RedWaterHelper;
|
||||
import ee3.common.lib.Reference;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraftforge.event.ForgeSubscribe;
|
||||
import net.minecraftforge.event.entity.living.LivingDeathEvent;
|
||||
import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent;
|
||||
|
||||
/**
|
||||
* EntityLivingHandler
|
||||
*
|
||||
* Class containing all EE3 custom event related logic for EntityLiving events
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
public class EntityLivingHandler {
|
||||
|
||||
@ForgeSubscribe
|
||||
public void onEntityLivingUpdate(LivingUpdateEvent event) {
|
||||
/* Disabled because of horribly inefficient code
|
||||
EntityLiving entity = event.entityLiving;
|
||||
|
||||
if (entity.worldObj.getWorldTime() % 4 == 0) {
|
||||
|
||||
if (RedWaterHelper.handleRedWaterDetection(entity)) {
|
||||
entity.addPotionEffect(new PotionEffect(Potion.weakness.id, Reference.BLOCK_RED_WATER_EFFECT_DURATION_MODIFIER * Reference.BLOCK_RED_WATER_EFFECT_DURATION_BASE * Reference.SECOND_IN_TICKS, 0));
|
||||
entity.addPotionEffect(new PotionEffect(Potion.poison.id, Reference.BLOCK_RED_WATER_EFFECT_DURATION_MODIFIER * Reference.BLOCK_RED_WATER_EFFECT_DURATION_BASE * Reference.SECOND_IN_TICKS, 0));
|
||||
entity.addPotionEffect(new PotionEffect(Potion.blindness.id, Reference.BLOCK_RED_WATER_EFFECT_DURATION_MODIFIER * Reference.BLOCK_RED_WATER_EFFECT_DURATION_BASE * Reference.SECOND_IN_TICKS, 0));
|
||||
entity.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, Reference.BLOCK_RED_WATER_EFFECT_DURATION_MODIFIER * Reference.BLOCK_RED_WATER_EFFECT_DURATION_BASE * Reference.SECOND_IN_TICKS, 0));
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
@ForgeSubscribe
|
||||
public void onEntityLivingDeath(LivingDeathEvent event) {
|
||||
if (event.source.getDamageType().equals("player")) {
|
||||
ItemDropHelper.dropMiniumShard((EntityPlayer)event.source.getSourceOfDamage(), event.entityLiving);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
package com.pahimar.ee3.core.handlers;
|
||||
|
||||
import com.pahimar.ee3.core.helper.ItemDropHelper;
|
||||
import com.pahimar.ee3.core.helper.RedWaterHelper;
|
||||
import com.pahimar.ee3.lib.Reference;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraftforge.event.ForgeSubscribe;
|
||||
import net.minecraftforge.event.entity.living.LivingDeathEvent;
|
||||
import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent;
|
||||
|
||||
/**
|
||||
* EntityLivingHandler
|
||||
*
|
||||
* Class containing all EE3 custom event related logic for EntityLiving events
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
public class EntityLivingHandler {
|
||||
|
||||
@ForgeSubscribe
|
||||
public void onEntityLivingUpdate(LivingUpdateEvent event) {
|
||||
/* Disabled because of horribly inefficient code
|
||||
EntityLiving entity = event.entityLiving;
|
||||
|
||||
if (entity.worldObj.getWorldTime() % 4 == 0) {
|
||||
|
||||
if (RedWaterHelper.handleRedWaterDetection(entity)) {
|
||||
entity.addPotionEffect(new PotionEffect(Potion.weakness.id, Reference.BLOCK_RED_WATER_EFFECT_DURATION_MODIFIER * Reference.BLOCK_RED_WATER_EFFECT_DURATION_BASE * Reference.SECOND_IN_TICKS, 0));
|
||||
entity.addPotionEffect(new PotionEffect(Potion.poison.id, Reference.BLOCK_RED_WATER_EFFECT_DURATION_MODIFIER * Reference.BLOCK_RED_WATER_EFFECT_DURATION_BASE * Reference.SECOND_IN_TICKS, 0));
|
||||
entity.addPotionEffect(new PotionEffect(Potion.blindness.id, Reference.BLOCK_RED_WATER_EFFECT_DURATION_MODIFIER * Reference.BLOCK_RED_WATER_EFFECT_DURATION_BASE * Reference.SECOND_IN_TICKS, 0));
|
||||
entity.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, Reference.BLOCK_RED_WATER_EFFECT_DURATION_MODIFIER * Reference.BLOCK_RED_WATER_EFFECT_DURATION_BASE * Reference.SECOND_IN_TICKS, 0));
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
@ForgeSubscribe
|
||||
public void onEntityLivingDeath(LivingDeathEvent event) {
|
||||
if (event.source.getDamageType().equals("player")) {
|
||||
ItemDropHelper.dropMiniumShard((EntityPlayer)event.source.getSourceOfDamage(), event.entityLiving);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -1,233 +1,234 @@
|
|||
package ee3.common.core.handlers;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import ee3.common.core.helper.GeneralHelper;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
/**
|
||||
* EquivalencyHandler
|
||||
*
|
||||
* Class to handle all the equivalency relationships between items/etc
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
public class EquivalencyHandler {
|
||||
|
||||
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 void addObjects(Object obj1, Object obj2) {
|
||||
|
||||
ItemStack stack1 = GeneralHelper.convertObjectToItemStack(obj1);
|
||||
ItemStack stack2 = GeneralHelper.convertObjectToItemStack(obj2);
|
||||
|
||||
ArrayList<ItemStack> currentList = new ArrayList<ItemStack>();
|
||||
|
||||
Integer stack1Index = getIndexInList(stack1);
|
||||
Integer stack2Index = getIndexInList(stack2);
|
||||
|
||||
if ((stack1Index != null) && (stack2Index != null)) {
|
||||
return;
|
||||
}
|
||||
else if ((stack1Index != null) && (stack2Index == null)) {
|
||||
currentList = equivalencyList.get(stack1Index.intValue());
|
||||
currentList.add(stack2);
|
||||
equivalencyList.set(stack1Index.intValue(), currentList);
|
||||
}
|
||||
else if ((stack1Index == null) && (stack2Index != null)) {
|
||||
currentList = equivalencyList.get(stack2Index.intValue());
|
||||
currentList.add(stack1);
|
||||
equivalencyList.set(stack2Index.intValue(), currentList);
|
||||
}
|
||||
else if ((stack1Index == null) && (stack2Index == null)) {
|
||||
currentList.add(stack1);
|
||||
currentList.add(stack2);
|
||||
equivalencyList.add(currentList);
|
||||
}
|
||||
}
|
||||
|
||||
public void addObjects(Object... objList) {
|
||||
|
||||
if (objList.length < 2)
|
||||
return;
|
||||
|
||||
for (int i = 0; i < objList.length - 1; i++) {
|
||||
addObjects(objList[i], objList[i + 1]);
|
||||
}
|
||||
}
|
||||
|
||||
public Integer getIndexInList(Object obj) {
|
||||
|
||||
ItemStack checkStack = GeneralHelper.convertObjectToItemStack(obj);
|
||||
ArrayList<ItemStack> currentList;
|
||||
int i = 0;
|
||||
|
||||
while (i < equivalencyList.size()) {
|
||||
currentList = equivalencyList.get(i);
|
||||
for (ItemStack currentStack : currentList) {
|
||||
if (ItemStack.areItemStacksEqual(checkStack, currentStack)) {
|
||||
return new Integer(i);
|
||||
}
|
||||
}
|
||||
++i;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public Integer getIndexInList(int id, int meta) {
|
||||
|
||||
ArrayList<ItemStack> currentList;
|
||||
int i = 0;
|
||||
|
||||
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);
|
||||
|
||||
if (checkStack == null)
|
||||
return null;
|
||||
|
||||
for (ArrayList<ItemStack> list : equivalencyList) {
|
||||
for (ItemStack currentStack : list) {
|
||||
if (ItemStack.areItemStacksEqual(checkStack, currentStack)) {
|
||||
return list;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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) {
|
||||
if (list.size() == 1) {
|
||||
return list.get(i);
|
||||
}
|
||||
|
||||
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) {
|
||||
if (list.size() == 1) {
|
||||
return list.get(i);
|
||||
}
|
||||
|
||||
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 boolean areEquivalent(Object obj1, Object obj2) {
|
||||
|
||||
return (getEquivalencyList(obj1).equals(getEquivalencyList(obj2)));
|
||||
}
|
||||
|
||||
public void debug() {
|
||||
|
||||
int i = 0;
|
||||
for (ArrayList list : equivalencyList) {
|
||||
System.out.println("equivalencyList[" + i + "]: " + list.toString());
|
||||
++i;
|
||||
}
|
||||
}
|
||||
}
|
||||
package com.pahimar.ee3.core.handlers;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import com.pahimar.ee3.core.helper.GeneralHelper;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
/**
|
||||
* EquivalencyHandler
|
||||
*
|
||||
* Class to handle all the equivalency relationships between items/etc
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
public class EquivalencyHandler {
|
||||
|
||||
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 void addObjects(Object obj1, Object obj2) {
|
||||
|
||||
ItemStack stack1 = GeneralHelper.convertObjectToItemStack(obj1);
|
||||
ItemStack stack2 = GeneralHelper.convertObjectToItemStack(obj2);
|
||||
|
||||
ArrayList<ItemStack> currentList = new ArrayList<ItemStack>();
|
||||
|
||||
Integer stack1Index = getIndexInList(stack1);
|
||||
Integer stack2Index = getIndexInList(stack2);
|
||||
|
||||
if ((stack1Index != null) && (stack2Index != null)) {
|
||||
return;
|
||||
}
|
||||
else if ((stack1Index != null) && (stack2Index == null)) {
|
||||
currentList = equivalencyList.get(stack1Index.intValue());
|
||||
currentList.add(stack2);
|
||||
equivalencyList.set(stack1Index.intValue(), currentList);
|
||||
}
|
||||
else if ((stack1Index == null) && (stack2Index != null)) {
|
||||
currentList = equivalencyList.get(stack2Index.intValue());
|
||||
currentList.add(stack1);
|
||||
equivalencyList.set(stack2Index.intValue(), currentList);
|
||||
}
|
||||
else if ((stack1Index == null) && (stack2Index == null)) {
|
||||
currentList.add(stack1);
|
||||
currentList.add(stack2);
|
||||
equivalencyList.add(currentList);
|
||||
}
|
||||
}
|
||||
|
||||
public void addObjects(Object... objList) {
|
||||
|
||||
if (objList.length < 2)
|
||||
return;
|
||||
|
||||
for (int i = 0; i < objList.length - 1; i++) {
|
||||
addObjects(objList[i], objList[i + 1]);
|
||||
}
|
||||
}
|
||||
|
||||
public Integer getIndexInList(Object obj) {
|
||||
|
||||
ItemStack checkStack = GeneralHelper.convertObjectToItemStack(obj);
|
||||
ArrayList<ItemStack> currentList;
|
||||
int i = 0;
|
||||
|
||||
while (i < equivalencyList.size()) {
|
||||
currentList = equivalencyList.get(i);
|
||||
for (ItemStack currentStack : currentList) {
|
||||
if (ItemStack.areItemStacksEqual(checkStack, currentStack)) {
|
||||
return new Integer(i);
|
||||
}
|
||||
}
|
||||
++i;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public Integer getIndexInList(int id, int meta) {
|
||||
|
||||
ArrayList<ItemStack> currentList;
|
||||
int i = 0;
|
||||
|
||||
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);
|
||||
|
||||
if (checkStack == null)
|
||||
return null;
|
||||
|
||||
for (ArrayList<ItemStack> list : equivalencyList) {
|
||||
for (ItemStack currentStack : list) {
|
||||
if (ItemStack.areItemStacksEqual(checkStack, currentStack)) {
|
||||
return list;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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) {
|
||||
if (list.size() == 1) {
|
||||
return list.get(i);
|
||||
}
|
||||
|
||||
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) {
|
||||
if (list.size() == 1) {
|
||||
return list.get(i);
|
||||
}
|
||||
|
||||
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 boolean areEquivalent(Object obj1, Object obj2) {
|
||||
|
||||
return (getEquivalencyList(obj1).equals(getEquivalencyList(obj2)));
|
||||
}
|
||||
|
||||
public void debug() {
|
||||
|
||||
int i = 0;
|
||||
for (ArrayList list : equivalencyList) {
|
||||
System.out.println("equivalencyList[" + i + "]: " + list.toString());
|
||||
++i;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package ee3.common.core.handlers;
|
||||
package com.pahimar.ee3.core.handlers;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import cpw.mods.fml.common.IFuelHandler;
|
|
@ -1,4 +1,4 @@
|
|||
package ee3.common.core.handlers;
|
||||
package com.pahimar.ee3.core.handlers;
|
||||
|
||||
import net.minecraftforge.event.ForgeSubscribe;
|
||||
import net.minecraftforge.event.entity.player.EntityItemPickupEvent;
|
|
@ -1,8 +1,21 @@
|
|||
package ee3.client.core.handlers;
|
||||
package com.pahimar.ee3.core.handlers;
|
||||
|
||||
import java.util.EnumSet;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import com.pahimar.ee3.EquivalentExchange3;
|
||||
import com.pahimar.ee3.core.helper.KeyBindingHelper;
|
||||
import com.pahimar.ee3.core.helper.LogHelper;
|
||||
import com.pahimar.ee3.item.IKeyBound;
|
||||
import com.pahimar.ee3.item.ITransmutationStone;
|
||||
import com.pahimar.ee3.item.ModItems;
|
||||
import com.pahimar.ee3.lib.ConfigurationSettings;
|
||||
import com.pahimar.ee3.lib.GuiIds;
|
||||
import com.pahimar.ee3.lib.Reference;
|
||||
import com.pahimar.ee3.network.PacketTypeHandler;
|
||||
import com.pahimar.ee3.network.packet.PacketEE;
|
||||
import com.pahimar.ee3.network.packet.PacketKeyPressed;
|
||||
|
||||
import net.minecraft.client.settings.KeyBinding;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
|
@ -12,18 +25,6 @@ import cpw.mods.fml.client.registry.KeyBindingRegistry;
|
|||
import cpw.mods.fml.common.TickType;
|
||||
import cpw.mods.fml.common.network.PacketDispatcher;
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
import ee3.client.core.helper.KeyBindingHelper;
|
||||
import ee3.common.EquivalentExchange3;
|
||||
import ee3.common.core.helper.LogHelper;
|
||||
import ee3.common.item.IKeyBound;
|
||||
import ee3.common.item.ITransmutationStone;
|
||||
import ee3.common.item.ModItems;
|
||||
import ee3.common.lib.ConfigurationSettings;
|
||||
import ee3.common.lib.GuiIds;
|
||||
import ee3.common.lib.Reference;
|
||||
import ee3.common.network.PacketEE;
|
||||
import ee3.common.network.PacketKeyPressed;
|
||||
import ee3.common.network.PacketTypeHandler;
|
||||
|
||||
/**
|
||||
* KeyBindingHandler
|
|
@ -1,8 +1,9 @@
|
|||
package ee3.common.core.handlers;
|
||||
package com.pahimar.ee3.core.handlers;
|
||||
|
||||
import com.pahimar.ee3.core.helper.LocalizationHelper;
|
||||
import com.pahimar.ee3.lib.Localizations;
|
||||
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
import ee3.common.core.helper.LocalizationHelper;
|
||||
import ee3.common.lib.Localizations;
|
||||
|
||||
/**
|
||||
* LocalizationHandler
|
|
@ -1,15 +1,16 @@
|
|||
package ee3.common.core.handlers;
|
||||
package com.pahimar.ee3.core.handlers;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.DataInputStream;
|
||||
|
||||
import com.pahimar.ee3.network.PacketTypeHandler;
|
||||
import com.pahimar.ee3.network.packet.PacketEE;
|
||||
|
||||
import net.minecraft.network.INetworkManager;
|
||||
import net.minecraft.network.packet.Packet250CustomPayload;
|
||||
|
||||
import cpw.mods.fml.common.network.IPacketHandler;
|
||||
import cpw.mods.fml.common.network.Player;
|
||||
import ee3.common.network.PacketEE;
|
||||
import ee3.common.network.PacketTypeHandler;
|
||||
|
||||
/**
|
||||
* PacketHandler
|
|
@ -1,23 +1,23 @@
|
|||
package ee3.common.core.handlers;
|
||||
|
||||
import net.minecraftforge.event.ForgeSubscribe;
|
||||
import net.minecraftforge.event.entity.player.PlayerDestroyItemEvent;
|
||||
|
||||
/**
|
||||
* PlayerDestroyItemHandler
|
||||
*
|
||||
* Class containing all EE3 custom event related logic for PlayerDestroyItem events
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
public class PlayerDestroyItemHandler {
|
||||
|
||||
@ForgeSubscribe
|
||||
public void onPlayerDestroyItemEvent(PlayerDestroyItemEvent event) {
|
||||
// TODO Come back and actually do what I want here
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
package com.pahimar.ee3.core.handlers;
|
||||
|
||||
import net.minecraftforge.event.ForgeSubscribe;
|
||||
import net.minecraftforge.event.entity.player.PlayerDestroyItemEvent;
|
||||
|
||||
/**
|
||||
* PlayerDestroyItemHandler
|
||||
*
|
||||
* Class containing all EE3 custom event related logic for PlayerDestroyItem events
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
public class PlayerDestroyItemHandler {
|
||||
|
||||
@ForgeSubscribe
|
||||
public void onPlayerDestroyItemEvent(PlayerDestroyItemEvent event) {
|
||||
// TODO Come back and actually do what I want here
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -1,10 +1,17 @@
|
|||
package ee3.client.core.handlers;
|
||||
package com.pahimar.ee3.core.handlers;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import com.pahimar.ee3.core.helper.RenderUtils;
|
||||
import com.pahimar.ee3.core.helper.TransmutationHelper;
|
||||
import com.pahimar.ee3.core.helper.VersionHelper;
|
||||
import com.pahimar.ee3.item.ITransmutationStone;
|
||||
import com.pahimar.ee3.lib.ConfigurationSettings;
|
||||
import com.pahimar.ee3.lib.Reference;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.ScaledResolution;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
|
@ -17,12 +24,6 @@ import net.minecraft.util.MovingObjectPosition;
|
|||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import cpw.mods.fml.common.ITickHandler;
|
||||
import cpw.mods.fml.common.TickType;
|
||||
import ee3.client.core.helper.RenderUtils;
|
||||
import ee3.common.core.helper.TransmutationHelper;
|
||||
import ee3.common.core.helper.VersionHelper;
|
||||
import ee3.common.item.ITransmutationStone;
|
||||
import ee3.common.lib.ConfigurationSettings;
|
||||
import ee3.common.lib.Reference;
|
||||
|
||||
public class RenderTickHandler implements ITickHandler {
|
||||
|
|
@ -1,40 +1,42 @@
|
|||
package ee3.client.core.handlers;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.logging.Level;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import ee3.common.core.helper.LogHelper;
|
||||
import ee3.common.lib.Reference;
|
||||
import ee3.common.lib.Sounds;
|
||||
import net.minecraftforge.client.event.sound.SoundLoadEvent;
|
||||
import net.minecraftforge.event.ForgeSubscribe;
|
||||
|
||||
/**
|
||||
* SoundHandler
|
||||
*
|
||||
* Client specific handler for sound related events
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
public class SoundHandler {
|
||||
|
||||
@ForgeSubscribe
|
||||
public void onSoundLoad(SoundLoadEvent event) {
|
||||
|
||||
// For each custom sound file we have defined in Sounds
|
||||
for (String soundFile : Sounds.soundFiles) {
|
||||
// Try to add the custom sound file to the pool of sounds
|
||||
try {
|
||||
event.manager.soundPoolSounds.addSound(soundFile, this.getClass().getResource("/" + soundFile));
|
||||
}
|
||||
// If we cannot add the custom sound file to the pool, log the exception
|
||||
catch (Exception e) {
|
||||
LogHelper.log(Level.WARNING, "Failed loading sound file: " + soundFile);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
package com.pahimar.ee3.core.handlers;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import com.pahimar.ee3.core.helper.LogHelper;
|
||||
import com.pahimar.ee3.lib.Reference;
|
||||
import com.pahimar.ee3.lib.Sounds;
|
||||
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import net.minecraftforge.client.event.sound.SoundLoadEvent;
|
||||
import net.minecraftforge.event.ForgeSubscribe;
|
||||
|
||||
/**
|
||||
* SoundHandler
|
||||
*
|
||||
* Client specific handler for sound related events
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
public class SoundHandler {
|
||||
|
||||
@ForgeSubscribe
|
||||
public void onSoundLoad(SoundLoadEvent event) {
|
||||
|
||||
// For each custom sound file we have defined in Sounds
|
||||
for (String soundFile : Sounds.soundFiles) {
|
||||
// Try to add the custom sound file to the pool of sounds
|
||||
try {
|
||||
event.manager.soundPoolSounds.addSound(soundFile, this.getClass().getResource("/" + soundFile));
|
||||
}
|
||||
// If we cannot add the custom sound file to the pool, log the exception
|
||||
catch (Exception e) {
|
||||
LogHelper.log(Level.WARNING, "Failed loading sound file: " + soundFile);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -1,16 +1,17 @@
|
|||
package ee3.common.core.handlers;
|
||||
package com.pahimar.ee3.core.handlers;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import com.pahimar.ee3.core.helper.VersionHelper;
|
||||
import com.pahimar.ee3.lib.Colours;
|
||||
import com.pahimar.ee3.lib.ConfigurationSettings;
|
||||
import com.pahimar.ee3.lib.Reference;
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import cpw.mods.fml.common.ITickHandler;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.TickType;
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
import ee3.common.core.helper.VersionHelper;
|
||||
import ee3.common.lib.Colours;
|
||||
import ee3.common.lib.ConfigurationSettings;
|
||||
import ee3.common.lib.Reference;
|
||||
|
||||
/**
|
||||
* VersionCheckTickHandler
|
|
@ -1,6 +1,7 @@
|
|||
package ee3.common.core.handlers;
|
||||
package com.pahimar.ee3.core.handlers;
|
||||
|
||||
import com.pahimar.ee3.event.WorldTransmutationEvent;
|
||||
|
||||
import ee3.common.event.WorldTransmutationEvent;
|
||||
import net.minecraftforge.event.ForgeSubscribe;
|
||||
|
||||
|
|
@ -1,55 +1,55 @@
|
|||
package ee3.common.core.helper;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.monster.EntityMob;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
/**
|
||||
* GeneralHelper
|
||||
*
|
||||
* General helper methods for EE3
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
public class GeneralHelper {
|
||||
|
||||
public static ItemStack convertObjectToItemStack(Object obj) {
|
||||
if (obj instanceof Item) {
|
||||
return new ItemStack((Item) obj);
|
||||
} else if (obj instanceof Block) {
|
||||
return new ItemStack((Block) obj);
|
||||
} else if (obj instanceof ItemStack) {
|
||||
return (ItemStack) obj;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static Object[] convertSingleStackToPluralStacks(ItemStack stack) {
|
||||
ArrayList<ItemStack> list = new ArrayList<ItemStack>();
|
||||
ItemStack currentStack;
|
||||
|
||||
for (int i = 0; i < stack.stackSize; i++) {
|
||||
currentStack = new ItemStack(stack.itemID, 1, stack.getItemDamage());
|
||||
list.add(currentStack);
|
||||
}
|
||||
|
||||
return list.toArray();
|
||||
}
|
||||
|
||||
public static boolean isHostileEntity(EntityLiving entity) {
|
||||
if (entity instanceof EntityMob) {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
package com.pahimar.ee3.core.helper;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.monster.EntityMob;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
/**
|
||||
* GeneralHelper
|
||||
*
|
||||
* General helper methods for EE3
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
public class GeneralHelper {
|
||||
|
||||
public static ItemStack convertObjectToItemStack(Object obj) {
|
||||
if (obj instanceof Item) {
|
||||
return new ItemStack((Item) obj);
|
||||
} else if (obj instanceof Block) {
|
||||
return new ItemStack((Block) obj);
|
||||
} else if (obj instanceof ItemStack) {
|
||||
return (ItemStack) obj;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static Object[] convertSingleStackToPluralStacks(ItemStack stack) {
|
||||
ArrayList<ItemStack> list = new ArrayList<ItemStack>();
|
||||
ItemStack currentStack;
|
||||
|
||||
for (int i = 0; i < stack.stackSize; i++) {
|
||||
currentStack = new ItemStack(stack.itemID, 1, stack.getItemDamage());
|
||||
list.add(currentStack);
|
||||
}
|
||||
|
||||
return list.toArray();
|
||||
}
|
||||
|
||||
public static boolean isHostileEntity(EntityLiving entity) {
|
||||
if (entity instanceof EntityMob) {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -1,8 +1,9 @@
|
|||
package ee3.common.core.helper;
|
||||
package com.pahimar.ee3.core.helper;
|
||||
|
||||
import com.pahimar.ee3.item.ModItems;
|
||||
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import ee3.common.item.ModItems;
|
||||
|
||||
/**
|
||||
* ItemDropHelper
|
|
@ -1,4 +1,4 @@
|
|||
package ee3.client.core.helper;
|
||||
package com.pahimar.ee3.core.helper;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package ee3.common.core.helper;
|
||||
package com.pahimar.ee3.core.helper;
|
||||
|
||||
/**
|
||||
* LocalizationHelper
|
|
@ -1,12 +1,13 @@
|
|||
package ee3.common.core.helper;
|
||||
package com.pahimar.ee3.core.helper;
|
||||
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.pahimar.ee3.EquivalentExchange3;
|
||||
import com.pahimar.ee3.lib.Reference;
|
||||
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.FMLLog;
|
||||
import ee3.common.EquivalentExchange3;
|
||||
import ee3.common.lib.Reference;
|
||||
|
||||
/**
|
||||
* LogHelper
|
|
@ -1,4 +1,4 @@
|
|||
package ee3.common.core.helper;
|
||||
package com.pahimar.ee3.core.helper;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
|
@ -1,4 +1,4 @@
|
|||
package ee3.common.core.helper;
|
||||
package com.pahimar.ee3.core.helper;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
|
@ -1,154 +1,154 @@
|
|||
package ee3.common.core.helper;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.crafting.FurnaceRecipes;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
/**
|
||||
* RecipeHelper
|
||||
*
|
||||
* Helper methods for adding recipes
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
public class RecipeHelper {
|
||||
|
||||
public static void addRecipe(ItemStack output, Object... input) {
|
||||
GameRegistry.addShapelessRecipe(output, input);
|
||||
}
|
||||
|
||||
public static void addRecipe(ItemStack output, ItemStack transmutationStone, Object... input) {
|
||||
Object[] inputs = new Object[input.length + 1];
|
||||
System.arraycopy(input, 0, inputs, 0, input.length);
|
||||
inputs[input.length] = transmutationStone;
|
||||
|
||||
addRecipe(output, inputs);
|
||||
}
|
||||
|
||||
public static void addRecipe(Block output, Object... input) {
|
||||
addRecipe(new ItemStack(output), input);
|
||||
}
|
||||
|
||||
public static void addRecipe(Block output, int count, Object... input) {
|
||||
addRecipe(new ItemStack(output, count), input);
|
||||
}
|
||||
|
||||
public static void addRecipe(Item output, Object... input) {
|
||||
addRecipe(new ItemStack(output), input);
|
||||
}
|
||||
|
||||
public static void addRecipe(Item output, int count, Object... input) {
|
||||
addRecipe(new ItemStack(output, count), input);
|
||||
}
|
||||
|
||||
public static Object[] getMetaCycle(Object input, int n) {
|
||||
ArrayList<ItemStack> list = new ArrayList<ItemStack>();
|
||||
|
||||
ItemStack stack;
|
||||
|
||||
for (int i = 0; i < n; i++) {
|
||||
stack = GeneralHelper.convertObjectToItemStack(input);
|
||||
stack.setItemDamage(i);
|
||||
list.add(stack);
|
||||
}
|
||||
|
||||
return list.toArray();
|
||||
}
|
||||
|
||||
public static Object[] getMetaCycle(Object input, int n, int... excludedMeta) {
|
||||
ArrayList<ItemStack> list = new ArrayList<ItemStack>();
|
||||
|
||||
ItemStack stack;
|
||||
int i = 0;
|
||||
while (i < n) {
|
||||
for (int j : excludedMeta) {
|
||||
if (i == j)
|
||||
++i;
|
||||
}
|
||||
|
||||
if (!(i < n))
|
||||
break;
|
||||
|
||||
stack = GeneralHelper.convertObjectToItemStack(input);
|
||||
stack.setItemDamage(i);
|
||||
list.add(stack);
|
||||
++i;
|
||||
}
|
||||
|
||||
return list.toArray();
|
||||
}
|
||||
|
||||
/*
|
||||
* Pass this a Block, Item or ItemStack and the maximum number of indexes,
|
||||
* EXCLUDING zero
|
||||
*/
|
||||
protected static void addMetaCycleRecipe(Object input, ItemStack stone, int n) {
|
||||
int outputI;
|
||||
|
||||
/*
|
||||
* Makes a single item cycle through its meta values when it's crafted
|
||||
* with a PStone
|
||||
*/
|
||||
for (int i = 0; i < n; i++) {
|
||||
outputI = (i == n - 1 ? 0 : i + 1);
|
||||
|
||||
if (input instanceof Block)
|
||||
GameRegistry.addShapelessRecipe(new ItemStack((Block) input, 1, outputI), stone, new ItemStack((Block) input, 1, i));
|
||||
else if (input instanceof Item)
|
||||
GameRegistry.addShapelessRecipe(new ItemStack((Item) input, 1, outputI), stone, new ItemStack((Item) input, 1, i));
|
||||
else if (input instanceof ItemStack)
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(((ItemStack) input).itemID, 1, outputI), stone, new ItemStack(((ItemStack) input).itemID, 1, i));
|
||||
}
|
||||
}
|
||||
|
||||
protected static void addMetaCycleRecipe(Object input, ItemStack stone, int n, int... excludedMeta) {
|
||||
int i = 0;
|
||||
int outputI = 1;
|
||||
while (i < n && outputI != 0) {
|
||||
outputI = (i == n - 1 ? 0 : i + 1);
|
||||
|
||||
for (int j : excludedMeta) {
|
||||
if (outputI == j)
|
||||
outputI = (outputI + 1) % 16;
|
||||
}
|
||||
|
||||
if (input instanceof Block)
|
||||
GameRegistry.addShapelessRecipe(new ItemStack((Block) input, 1, outputI), stone, new ItemStack((Block) input, 1, i));
|
||||
else if (input instanceof Item)
|
||||
GameRegistry.addShapelessRecipe(new ItemStack((Item) input, 1, outputI), stone, new ItemStack((Item) input, 1, i));
|
||||
else if (input instanceof ItemStack)
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(((ItemStack) input).itemID, 1, outputI), stone, new ItemStack(((ItemStack) input).itemID, 1, i));
|
||||
|
||||
i = outputI;
|
||||
}
|
||||
}
|
||||
|
||||
public static void addSmeltingRecipe(ItemStack input, ItemStack stone, ItemStack fuel) {
|
||||
ItemStack result = FurnaceRecipes.smelting().getSmeltingResult(input);
|
||||
|
||||
if (result == null)
|
||||
return;
|
||||
|
||||
Object[] list = new Object[9];
|
||||
list[0] = stone;
|
||||
list[1] = fuel;
|
||||
|
||||
for (int i = 2; i < 9; i++) {
|
||||
list[i] = new ItemStack(input.getItem(), 1, input.getItemDamage());
|
||||
}
|
||||
|
||||
if (result.stackSize * 7 <= result.getItem().getItemStackLimit()) {
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(result.getItem(), (result.stackSize*7), result.getItemDamage()), list);
|
||||
}
|
||||
else {
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(result.getItem(), result.getItem().getItemStackLimit(), result.getItemDamage()), list);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
package com.pahimar.ee3.core.helper;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.crafting.FurnaceRecipes;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
/**
|
||||
* RecipeHelper
|
||||
*
|
||||
* Helper methods for adding recipes
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
public class RecipeHelper {
|
||||
|
||||
public static void addRecipe(ItemStack output, Object... input) {
|
||||
GameRegistry.addShapelessRecipe(output, input);
|
||||
}
|
||||
|
||||
public static void addRecipe(ItemStack output, ItemStack transmutationStone, Object... input) {
|
||||
Object[] inputs = new Object[input.length + 1];
|
||||
System.arraycopy(input, 0, inputs, 0, input.length);
|
||||
inputs[input.length] = transmutationStone;
|
||||
|
||||
addRecipe(output, inputs);
|
||||
}
|
||||
|
||||
public static void addRecipe(Block output, Object... input) {
|
||||
addRecipe(new ItemStack(output), input);
|
||||
}
|
||||
|
||||
public static void addRecipe(Block output, int count, Object... input) {
|
||||
addRecipe(new ItemStack(output, count), input);
|
||||
}
|
||||
|
||||
public static void addRecipe(Item output, Object... input) {
|
||||
addRecipe(new ItemStack(output), input);
|
||||
}
|
||||
|
||||
public static void addRecipe(Item output, int count, Object... input) {
|
||||
addRecipe(new ItemStack(output, count), input);
|
||||
}
|
||||
|
||||
public static Object[] getMetaCycle(Object input, int n) {
|
||||
ArrayList<ItemStack> list = new ArrayList<ItemStack>();
|
||||
|
||||
ItemStack stack;
|
||||
|
||||
for (int i = 0; i < n; i++) {
|
||||
stack = GeneralHelper.convertObjectToItemStack(input);
|
||||
stack.setItemDamage(i);
|
||||
list.add(stack);
|
||||
}
|
||||
|
||||
return list.toArray();
|
||||
}
|
||||
|
||||
public static Object[] getMetaCycle(Object input, int n, int... excludedMeta) {
|
||||
ArrayList<ItemStack> list = new ArrayList<ItemStack>();
|
||||
|
||||
ItemStack stack;
|
||||
int i = 0;
|
||||
while (i < n) {
|
||||
for (int j : excludedMeta) {
|
||||
if (i == j)
|
||||
++i;
|
||||
}
|
||||
|
||||
if (!(i < n))
|
||||
break;
|
||||
|
||||
stack = GeneralHelper.convertObjectToItemStack(input);
|
||||
stack.setItemDamage(i);
|
||||
list.add(stack);
|
||||
++i;
|
||||
}
|
||||
|
||||
return list.toArray();
|
||||
}
|
||||
|
||||
/*
|
||||
* Pass this a Block, Item or ItemStack and the maximum number of indexes,
|
||||
* EXCLUDING zero
|
||||
*/
|
||||
protected static void addMetaCycleRecipe(Object input, ItemStack stone, int n) {
|
||||
int outputI;
|
||||
|
||||
/*
|
||||
* Makes a single item cycle through its meta values when it's crafted
|
||||
* with a PStone
|
||||
*/
|
||||
for (int i = 0; i < n; i++) {
|
||||
outputI = (i == n - 1 ? 0 : i + 1);
|
||||
|
||||
if (input instanceof Block)
|
||||
GameRegistry.addShapelessRecipe(new ItemStack((Block) input, 1, outputI), stone, new ItemStack((Block) input, 1, i));
|
||||
else if (input instanceof Item)
|
||||
GameRegistry.addShapelessRecipe(new ItemStack((Item) input, 1, outputI), stone, new ItemStack((Item) input, 1, i));
|
||||
else if (input instanceof ItemStack)
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(((ItemStack) input).itemID, 1, outputI), stone, new ItemStack(((ItemStack) input).itemID, 1, i));
|
||||
}
|
||||
}
|
||||
|
||||
protected static void addMetaCycleRecipe(Object input, ItemStack stone, int n, int... excludedMeta) {
|
||||
int i = 0;
|
||||
int outputI = 1;
|
||||
while (i < n && outputI != 0) {
|
||||
outputI = (i == n - 1 ? 0 : i + 1);
|
||||
|
||||
for (int j : excludedMeta) {
|
||||
if (outputI == j)
|
||||
outputI = (outputI + 1) % 16;
|
||||
}
|
||||
|
||||
if (input instanceof Block)
|
||||
GameRegistry.addShapelessRecipe(new ItemStack((Block) input, 1, outputI), stone, new ItemStack((Block) input, 1, i));
|
||||
else if (input instanceof Item)
|
||||
GameRegistry.addShapelessRecipe(new ItemStack((Item) input, 1, outputI), stone, new ItemStack((Item) input, 1, i));
|
||||
else if (input instanceof ItemStack)
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(((ItemStack) input).itemID, 1, outputI), stone, new ItemStack(((ItemStack) input).itemID, 1, i));
|
||||
|
||||
i = outputI;
|
||||
}
|
||||
}
|
||||
|
||||
public static void addSmeltingRecipe(ItemStack input, ItemStack stone, ItemStack fuel) {
|
||||
ItemStack result = FurnaceRecipes.smelting().getSmeltingResult(input);
|
||||
|
||||
if (result == null)
|
||||
return;
|
||||
|
||||
Object[] list = new Object[9];
|
||||
list[0] = stone;
|
||||
list[1] = fuel;
|
||||
|
||||
for (int i = 2; i < 9; i++) {
|
||||
list[i] = new ItemStack(input.getItem(), 1, input.getItemDamage());
|
||||
}
|
||||
|
||||
if (result.stackSize * 7 <= result.getItem().getItemStackLimit()) {
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(result.getItem(), (result.stackSize*7), result.getItemDamage()), list);
|
||||
}
|
||||
else {
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(result.getItem(), result.getItem().getItemStackLimit(), result.getItemDamage()), list);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -1,7 +1,8 @@
|
|||
package ee3.common.core.helper;
|
||||
package com.pahimar.ee3.core.helper;
|
||||
|
||||
import com.pahimar.ee3.block.ModBlocks;
|
||||
import com.pahimar.ee3.lib.ConfigurationSettings;
|
||||
|
||||
import ee3.common.block.ModBlocks;
|
||||
import ee3.common.lib.ConfigurationSettings;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
|
@ -1,4 +1,4 @@
|
|||
package ee3.client.core.helper;
|
||||
package com.pahimar.ee3.core.helper;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
|
@ -1,116 +1,117 @@
|
|||
package ee3.common.core.helper;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import ee3.common.core.handlers.EquivalencyHandler;
|
||||
import ee3.common.lib.Sounds;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockSand;
|
||||
import net.minecraft.block.BlockLeaves;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
||||
/**
|
||||
* TransmutationHelper
|
||||
*
|
||||
* Helper methods for transmutation related things
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
public class TransmutationHelper {
|
||||
|
||||
public static boolean transmuteInWorld(World world, EntityPlayer player, ItemStack stack, int x, int y, int z) {
|
||||
|
||||
int id = world.getBlockId(x, y, z);
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
|
||||
if ((world.getBlockMaterial(x, y, z) == Material.leaves) && (Block.blocksList[id] instanceof BlockLeaves)) {
|
||||
meta = meta % 4;
|
||||
}
|
||||
|
||||
ItemStack nextItem = getNextBlock(id, meta, player.isSneaking());
|
||||
|
||||
if (nextItem != null) {
|
||||
if (Block.blocksList[nextItem.itemID] != null) {
|
||||
world.setBlockAndMetadataWithNotify(x, y, z, nextItem.itemID, nextItem.getItemDamage());
|
||||
world.playSoundAtEntity(player, Sounds.TRANSMUTE, 0.5F, 1.0F);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static ItemStack getNextBlock(int id, int meta, boolean allowFalling) {
|
||||
|
||||
ArrayList<ItemStack> list = EquivalencyHandler.instance().getEquivalencyList(id, meta);
|
||||
|
||||
ItemStack nextStack = null;
|
||||
|
||||
if (list != null) {
|
||||
return getNextBlock(id, meta, id, meta, allowFalling);
|
||||
}
|
||||
|
||||
return nextStack;
|
||||
}
|
||||
|
||||
private static ItemStack getNextBlock(int id, int meta, int origId, int origMeta, boolean allowFalling) {
|
||||
|
||||
ArrayList<ItemStack> list = EquivalencyHandler.instance().getEquivalencyList(id, meta);
|
||||
|
||||
ItemStack nextStack = null;
|
||||
|
||||
if (list != null) {
|
||||
nextStack = EquivalencyHandler.instance().getNextInList(id, meta);
|
||||
|
||||
/*
|
||||
* If the current item is the same as the original one we started
|
||||
* with, then we have recursed through the entire list and not found
|
||||
* a next block so return the original. This is the "base case" for
|
||||
* the recursion.
|
||||
*/
|
||||
if ((nextStack.itemID == origId) && (nextStack.getItemDamage() == origMeta)) {
|
||||
return nextStack;
|
||||
}
|
||||
else {
|
||||
/*
|
||||
* If we are allowing any block (including falling ones) just
|
||||
* check to see if the next item is a block. If it is, return
|
||||
* it. Otherwise continue the recursion.
|
||||
*/
|
||||
if (allowFalling) {
|
||||
if (nextStack.getItem() instanceof ItemBlock) {
|
||||
return nextStack;
|
||||
}
|
||||
else {
|
||||
return getNextBlock(nextStack.itemID, nextStack.getItemDamage(), origId, origMeta, allowFalling);
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Else we need to check to make sure the next item is both a
|
||||
* block and not an instance of BlockSand (which all gravity
|
||||
* affected blocks are a subclass of. If the next item is a
|
||||
* block, and is not a subclass of BlockSand return it,
|
||||
* otherwise, continue the recursion.
|
||||
*/
|
||||
else {
|
||||
if ((nextStack.getItem() instanceof ItemBlock) && (!(Block.blocksList[nextStack.itemID] instanceof BlockSand))) {
|
||||
return nextStack;
|
||||
}
|
||||
else {
|
||||
return getNextBlock(nextStack.itemID, nextStack.getItemDamage(), origId, origMeta, allowFalling);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// In the event the list is null, return null
|
||||
return nextStack;
|
||||
}
|
||||
|
||||
}
|
||||
package com.pahimar.ee3.core.helper;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import com.pahimar.ee3.core.handlers.EquivalencyHandler;
|
||||
import com.pahimar.ee3.lib.Sounds;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockSand;
|
||||
import net.minecraft.block.BlockLeaves;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
||||
/**
|
||||
* TransmutationHelper
|
||||
*
|
||||
* Helper methods for transmutation related things
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
public class TransmutationHelper {
|
||||
|
||||
public static boolean transmuteInWorld(World world, EntityPlayer player, ItemStack stack, int x, int y, int z) {
|
||||
|
||||
int id = world.getBlockId(x, y, z);
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
|
||||
if ((world.getBlockMaterial(x, y, z) == Material.leaves) && (Block.blocksList[id] instanceof BlockLeaves)) {
|
||||
meta = meta % 4;
|
||||
}
|
||||
|
||||
ItemStack nextItem = getNextBlock(id, meta, player.isSneaking());
|
||||
|
||||
if (nextItem != null) {
|
||||
if (Block.blocksList[nextItem.itemID] != null) {
|
||||
world.setBlockAndMetadataWithNotify(x, y, z, nextItem.itemID, nextItem.getItemDamage());
|
||||
world.playSoundAtEntity(player, Sounds.TRANSMUTE, 0.5F, 1.0F);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static ItemStack getNextBlock(int id, int meta, boolean allowFalling) {
|
||||
|
||||
ArrayList<ItemStack> list = EquivalencyHandler.instance().getEquivalencyList(id, meta);
|
||||
|
||||
ItemStack nextStack = null;
|
||||
|
||||
if (list != null) {
|
||||
return getNextBlock(id, meta, id, meta, allowFalling);
|
||||
}
|
||||
|
||||
return nextStack;
|
||||
}
|
||||
|
||||
private static ItemStack getNextBlock(int id, int meta, int origId, int origMeta, boolean allowFalling) {
|
||||
|
||||
ArrayList<ItemStack> list = EquivalencyHandler.instance().getEquivalencyList(id, meta);
|
||||
|
||||
ItemStack nextStack = null;
|
||||
|
||||
if (list != null) {
|
||||
nextStack = EquivalencyHandler.instance().getNextInList(id, meta);
|
||||
|
||||
/*
|
||||
* If the current item is the same as the original one we started
|
||||
* with, then we have recursed through the entire list and not found
|
||||
* a next block so return the original. This is the "base case" for
|
||||
* the recursion.
|
||||
*/
|
||||
if ((nextStack.itemID == origId) && (nextStack.getItemDamage() == origMeta)) {
|
||||
return nextStack;
|
||||
}
|
||||
else {
|
||||
/*
|
||||
* If we are allowing any block (including falling ones) just
|
||||
* check to see if the next item is a block. If it is, return
|
||||
* it. Otherwise continue the recursion.
|
||||
*/
|
||||
if (allowFalling) {
|
||||
if (nextStack.getItem() instanceof ItemBlock) {
|
||||
return nextStack;
|
||||
}
|
||||
else {
|
||||
return getNextBlock(nextStack.itemID, nextStack.getItemDamage(), origId, origMeta, allowFalling);
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Else we need to check to make sure the next item is both a
|
||||
* block and not an instance of BlockSand (which all gravity
|
||||
* affected blocks are a subclass of. If the next item is a
|
||||
* block, and is not a subclass of BlockSand return it,
|
||||
* otherwise, continue the recursion.
|
||||
*/
|
||||
else {
|
||||
if ((nextStack.getItem() instanceof ItemBlock) && (!(Block.blocksList[nextStack.itemID] instanceof BlockSand))) {
|
||||
return nextStack;
|
||||
}
|
||||
else {
|
||||
return getNextBlock(nextStack.itemID, nextStack.getItemDamage(), origId, origMeta, allowFalling);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// In the event the list is null, return null
|
||||
return nextStack;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package ee3.common.core.helper;
|
||||
package com.pahimar.ee3.core.helper;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
@ -6,13 +6,14 @@ import java.net.URL;
|
|||
import java.util.Properties;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import com.pahimar.ee3.lib.Colours;
|
||||
import com.pahimar.ee3.lib.ConfigurationSettings;
|
||||
import com.pahimar.ee3.lib.Reference;
|
||||
import com.pahimar.ee3.lib.Strings;
|
||||
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
import ee3.common.lib.Colours;
|
||||
import ee3.common.lib.ConfigurationSettings;
|
||||
import ee3.common.lib.Reference;
|
||||
import ee3.common.lib.Strings;
|
||||
|
||||
/**
|
||||
* VersionHelper
|
|
@ -1,4 +1,20 @@
|
|||
package ee3.client.core;
|
||||
package com.pahimar.ee3.core.proxy;
|
||||
|
||||
import com.pahimar.ee3.client.renderer.ItemCalcinatorRenderer;
|
||||
import com.pahimar.ee3.client.renderer.texturefx.TextureRedWaterFX;
|
||||
import com.pahimar.ee3.client.renderer.texturefx.TextureRedWaterFlowFX;
|
||||
import com.pahimar.ee3.client.renderer.tileentity.TileEntityCalcinatorRenderer;
|
||||
import com.pahimar.ee3.core.handlers.DrawBlockHighlightHandler;
|
||||
import com.pahimar.ee3.core.handlers.KeyBindingHandler;
|
||||
import com.pahimar.ee3.core.handlers.RenderTickHandler;
|
||||
import com.pahimar.ee3.core.handlers.SoundHandler;
|
||||
import com.pahimar.ee3.core.helper.KeyBindingHelper;
|
||||
import com.pahimar.ee3.lib.BlockIds;
|
||||
import com.pahimar.ee3.lib.RenderIds;
|
||||
import com.pahimar.ee3.lib.Sprites;
|
||||
import com.pahimar.ee3.network.PacketTypeHandler;
|
||||
import com.pahimar.ee3.network.packet.PacketRequestEvent;
|
||||
import com.pahimar.ee3.tileentity.TileCalcinator;
|
||||
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraftforge.client.EnumHelperClient;
|
||||
|
@ -12,23 +28,7 @@ import cpw.mods.fml.common.Side;
|
|||
import cpw.mods.fml.common.network.PacketDispatcher;
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
import cpw.mods.fml.common.registry.TickRegistry;
|
||||
import ee3.client.core.handlers.DrawBlockHighlightHandler;
|
||||
import ee3.client.core.handlers.KeyBindingHandler;
|
||||
import ee3.client.core.handlers.RenderTickHandler;
|
||||
import ee3.client.core.handlers.SoundHandler;
|
||||
import ee3.client.core.helper.KeyBindingHelper;
|
||||
import ee3.client.render.RenderCalcinator;
|
||||
import ee3.client.render.RenderItemCalcinator;
|
||||
import ee3.client.render.TextureRedWaterFX;
|
||||
import ee3.client.render.TextureRedWaterFlowFX;
|
||||
import ee3.common.core.CommonProxy;
|
||||
import ee3.common.lib.BlockIds;
|
||||
import ee3.common.lib.RenderIds;
|
||||
import ee3.common.lib.Sprites;
|
||||
import ee3.common.network.PacketTypeHandler;
|
||||
import ee3.common.network.PacketWorldEvent;
|
||||
import ee3.common.tile.TileCalcinator;
|
||||
import static ee3.common.lib.CustomItemRarity.*;
|
||||
import static com.pahimar.ee3.lib.CustomItemRarity.*;
|
||||
|
||||
/**
|
||||
* ClientProxy
|
||||
|
@ -105,7 +105,7 @@ public class ClientProxy extends CommonProxy {
|
|||
FMLClientHandler.instance().getClient().renderEngine.registerTextureFX(new TextureRedWaterFX());
|
||||
FMLClientHandler.instance().getClient().renderEngine.registerTextureFX(new TextureRedWaterFlowFX());
|
||||
|
||||
MinecraftForgeClient.registerItemRenderer(BlockIds.CALCINATOR, new RenderItemCalcinator());
|
||||
MinecraftForgeClient.registerItemRenderer(BlockIds.CALCINATOR, new ItemCalcinatorRenderer());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -113,13 +113,13 @@ public class ClientProxy extends CommonProxy {
|
|||
|
||||
super.initTileEntities();
|
||||
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileCalcinator.class, new RenderCalcinator());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileCalcinator.class, new TileEntityCalcinatorRenderer());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendWorldEventPacket(byte eventType, int originX, int originY, int originZ, byte sideHit, byte rangeX, byte rangeY, byte rangeZ, String data) {
|
||||
|
||||
PacketDispatcher.sendPacketToServer(PacketTypeHandler.populatePacket(new PacketWorldEvent(eventType, originX, originY, originZ, sideHit, rangeX, rangeY, rangeZ, data)));
|
||||
PacketDispatcher.sendPacketToServer(PacketTypeHandler.populatePacket(new PacketRequestEvent(eventType, originX, originY, originZ, sideHit, rangeX, rangeY, rangeZ, data)));
|
||||
}
|
||||
|
||||
}
|
|
@ -1,17 +1,18 @@
|
|||
package ee3.common.core;
|
||||
package com.pahimar.ee3.core.proxy;
|
||||
|
||||
import com.pahimar.ee3.client.gui.inventory.GuiCalcinator;
|
||||
import com.pahimar.ee3.client.gui.inventory.GuiPortableCrafting;
|
||||
import com.pahimar.ee3.inventory.ContainerCalcinator;
|
||||
import com.pahimar.ee3.inventory.ContainerPortableCrafting;
|
||||
import com.pahimar.ee3.lib.GuiIds;
|
||||
import com.pahimar.ee3.lib.Strings;
|
||||
import com.pahimar.ee3.tileentity.TileCalcinator;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.world.World;
|
||||
import cpw.mods.fml.common.network.IGuiHandler;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import ee3.client.gui.GuiCalcinator;
|
||||
import ee3.client.gui.GuiPortableCrafting;
|
||||
import ee3.common.container.ContainerCalcinator;
|
||||
import ee3.common.container.ContainerPortableCrafting;
|
||||
import ee3.common.lib.GuiIds;
|
||||
import ee3.common.lib.Strings;
|
||||
import ee3.common.tile.TileCalcinator;
|
||||
|
||||
/**
|
||||
* CommonProxy
|
|
@ -1,9 +1,10 @@
|
|||
package ee3.common.core;
|
||||
package com.pahimar.ee3.creativetab;
|
||||
|
||||
import com.pahimar.ee3.item.ModItems;
|
||||
import com.pahimar.ee3.lib.ItemIds;
|
||||
|
||||
import cpw.mods.fml.common.Side;
|
||||
import cpw.mods.fml.common.asm.SideOnly;
|
||||
import ee3.common.item.ModItems;
|
||||
import ee3.common.lib.ItemIds;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package ee3.common.emc;
|
||||
package com.pahimar.ee3.emc;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
|
@ -1,4 +1,4 @@
|
|||
package ee3.common.emc;
|
||||
package com.pahimar.ee3.emc;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
|
@ -1,4 +1,4 @@
|
|||
package ee3.common.emc;
|
||||
package com.pahimar.ee3.emc;
|
||||
|
||||
/**
|
||||
* EMCType
|
|
@ -1,24 +1,25 @@
|
|||
package ee3.common.event;
|
||||
package com.pahimar.ee3.event;
|
||||
|
||||
import static net.minecraftforge.event.Event.Result.*;
|
||||
import ee3.common.lib.ModAction;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraftforge.event.Cancelable;
|
||||
import net.minecraftforge.event.Event;
|
||||
import net.minecraftforge.event.entity.player.PlayerEvent;
|
||||
|
||||
@Cancelable
|
||||
public class ModActionEvent extends PlayerEvent {
|
||||
public class ActionRequestEvent extends PlayerEvent {
|
||||
|
||||
public final ModAction modAction;
|
||||
public final Event modEvent;
|
||||
public final int x, y, z;
|
||||
public final int sideHit;
|
||||
|
||||
public Result allowEvent;
|
||||
|
||||
public ModActionEvent(EntityPlayer player, ModAction modAction, int x, int y, int z, int sideHit) {
|
||||
public ActionRequestEvent(EntityPlayer player, Event modEvent, int x, int y, int z, int sideHit) {
|
||||
|
||||
super(player);
|
||||
this.modAction = modAction;
|
||||
this.modEvent = modEvent;
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
|
@ -0,0 +1,23 @@
|
|||
package com.pahimar.ee3.event;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.event.Event;
|
||||
|
||||
public class WorldTransmutationEvent extends Event {
|
||||
|
||||
public final EntityPlayer player;
|
||||
public final World world;
|
||||
public final int x, y, z;
|
||||
public final String data;
|
||||
|
||||
public WorldTransmutationEvent(EntityPlayer player, World world, int x, int y, int z, String data) {
|
||||
|
||||
this.player = player;
|
||||
this.world = world;
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
this.data = data;
|
||||
}
|
||||
}
|
|
@ -1,6 +1,7 @@
|
|||
package ee3.common.container;
|
||||
package com.pahimar.ee3.inventory;
|
||||
|
||||
import com.pahimar.ee3.tileentity.TileCalcinator;
|
||||
|
||||
import ee3.common.tile.TileCalcinator;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
|
@ -1,4 +1,4 @@
|
|||
package ee3.common.container;
|
||||
package com.pahimar.ee3.inventory;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
|
@ -1,4 +1,4 @@
|
|||
package ee3.common.item;
|
||||
package com.pahimar.ee3.item;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package ee3.common.item;
|
||||
package com.pahimar.ee3.item;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
|
@ -1,4 +1,4 @@
|
|||
package ee3.common.item;
|
||||
package com.pahimar.ee3.item;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
|
@ -1,16 +1,17 @@
|
|||
package ee3.common.item;
|
||||
package com.pahimar.ee3.item;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.pahimar.ee3.EquivalentExchange3;
|
||||
import com.pahimar.ee3.lib.Colours;
|
||||
import com.pahimar.ee3.lib.Strings;
|
||||
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import cpw.mods.fml.common.Side;
|
||||
import cpw.mods.fml.common.asm.SideOnly;
|
||||
import ee3.common.EquivalentExchange3;
|
||||
import ee3.common.lib.Colours;
|
||||
import ee3.common.lib.Strings;
|
||||
|
||||
public class ItemAlchemyBag extends ItemEE {
|
||||
|
|
@ -1,7 +1,11 @@
|
|||
package ee3.common.item;
|
||||
package com.pahimar.ee3.item;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.pahimar.ee3.EquivalentExchange3;
|
||||
import com.pahimar.ee3.lib.CustomItemRarity;
|
||||
import com.pahimar.ee3.lib.Strings;
|
||||
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -9,9 +13,6 @@ import net.minecraft.util.MathHelper;
|
|||
import cpw.mods.fml.common.Side;
|
||||
import cpw.mods.fml.common.asm.SideOnly;
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
import ee3.common.EquivalentExchange3;
|
||||
import ee3.common.lib.CustomItemRarity;
|
||||
import ee3.common.lib.Strings;
|
||||
|
||||
/**
|
||||
* ItemAlchemyDust
|
|
@ -1,7 +1,8 @@
|
|||
package ee3.common.item;
|
||||
package com.pahimar.ee3.item;
|
||||
|
||||
import com.pahimar.ee3.lib.Reference;
|
||||
import com.pahimar.ee3.lib.Sprites;
|
||||
|
||||
import ee3.common.lib.Reference;
|
||||
import ee3.common.lib.Sprites;
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
/**
|
|
@ -1,7 +1,8 @@
|
|||
package ee3.common.item;
|
||||
package com.pahimar.ee3.item;
|
||||
|
||||
import com.pahimar.ee3.EquivalentExchange3;
|
||||
import com.pahimar.ee3.lib.Strings;
|
||||
|
||||
import ee3.common.EquivalentExchange3;
|
||||
import ee3.common.lib.Strings;
|
||||
|
||||
/**
|
||||
* ItemInertStone
|
|
@ -1,7 +1,8 @@
|
|||
package ee3.common.item;
|
||||
package com.pahimar.ee3.item;
|
||||
|
||||
import com.pahimar.ee3.EquivalentExchange3;
|
||||
import com.pahimar.ee3.lib.Strings;
|
||||
|
||||
import ee3.common.EquivalentExchange3;
|
||||
import ee3.common.lib.Strings;
|
||||
|
||||
/**
|
||||
* ItemMiniumShard
|
|
@ -1,4 +1,15 @@
|
|||
package ee3.common.item;
|
||||
package com.pahimar.ee3.item;
|
||||
|
||||
import com.pahimar.ee3.EquivalentExchange3;
|
||||
import com.pahimar.ee3.core.helper.TransmutationHelper;
|
||||
import com.pahimar.ee3.lib.Colours;
|
||||
import com.pahimar.ee3.lib.ConfigurationSettings;
|
||||
import com.pahimar.ee3.lib.CustomItemRarity;
|
||||
import com.pahimar.ee3.lib.GuiIds;
|
||||
import com.pahimar.ee3.lib.Reference;
|
||||
import com.pahimar.ee3.lib.Strings;
|
||||
import com.pahimar.ee3.network.PacketTypeHandler;
|
||||
import com.pahimar.ee3.network.packet.PacketKeyPressed;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
|
@ -8,16 +19,6 @@ import cpw.mods.fml.client.FMLClientHandler;
|
|||
import cpw.mods.fml.common.Side;
|
||||
import cpw.mods.fml.common.asm.SideOnly;
|
||||
import cpw.mods.fml.common.network.PacketDispatcher;
|
||||
import ee3.common.EquivalentExchange3;
|
||||
import ee3.common.core.helper.TransmutationHelper;
|
||||
import ee3.common.lib.Colours;
|
||||
import ee3.common.lib.ConfigurationSettings;
|
||||
import ee3.common.lib.CustomItemRarity;
|
||||
import ee3.common.lib.GuiIds;
|
||||
import ee3.common.lib.Reference;
|
||||
import ee3.common.lib.Strings;
|
||||
import ee3.common.network.PacketKeyPressed;
|
||||
import ee3.common.network.PacketTypeHandler;
|
||||
|
||||
/**
|
||||
* ItemMiniumStone
|
|
@ -1,21 +1,22 @@
|
|||
package ee3.common.item;
|
||||
package com.pahimar.ee3.item;
|
||||
|
||||
import com.pahimar.ee3.EquivalentExchange3;
|
||||
import com.pahimar.ee3.core.helper.NBTHelper;
|
||||
import com.pahimar.ee3.core.helper.TransmutationHelper;
|
||||
import com.pahimar.ee3.lib.ConfigurationSettings;
|
||||
import com.pahimar.ee3.lib.CustomItemRarity;
|
||||
import com.pahimar.ee3.lib.GuiIds;
|
||||
import com.pahimar.ee3.lib.Reference;
|
||||
import com.pahimar.ee3.lib.Sounds;
|
||||
import com.pahimar.ee3.lib.Strings;
|
||||
import com.pahimar.ee3.lib.RequestEvents;
|
||||
import com.pahimar.ee3.network.PacketTypeHandler;
|
||||
import com.pahimar.ee3.network.packet.PacketKeyPressed;
|
||||
import com.pahimar.ee3.network.packet.PacketRequestEvent;
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import cpw.mods.fml.common.Side;
|
||||
import cpw.mods.fml.common.asm.SideOnly;
|
||||
import ee3.common.EquivalentExchange3;
|
||||
import ee3.common.core.helper.NBTHelper;
|
||||
import ee3.common.core.helper.TransmutationHelper;
|
||||
import ee3.common.lib.ConfigurationSettings;
|
||||
import ee3.common.lib.CustomItemRarity;
|
||||
import ee3.common.lib.GuiIds;
|
||||
import ee3.common.lib.Reference;
|
||||
import ee3.common.lib.Sounds;
|
||||
import ee3.common.lib.Strings;
|
||||
import ee3.common.lib.WorldEvents;
|
||||
import ee3.common.network.PacketKeyPressed;
|
||||
import ee3.common.network.PacketTypeHandler;
|
||||
import ee3.common.network.PacketWorldEvent;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -83,7 +84,7 @@ public class ItemPhilosopherStone extends ItemEE
|
|||
//boolean result = TransmutationHelper.transmuteInWorld(world, entityPlayer, itemStack, x, y, z);
|
||||
boolean result = true;
|
||||
if (!world.isRemote) {
|
||||
EquivalentExchange3.proxy.sendWorldEventPacket(WorldEvents.TRANSMUTATION, x, y, z, (byte)sideHit, (byte)getCharge(itemStack), (byte)getCharge(itemStack), (byte)getCharge(itemStack), "50:0");
|
||||
EquivalentExchange3.proxy.sendWorldEventPacket(RequestEvents.TRANSMUTATION, x, y, z, (byte)sideHit, (byte)getCharge(itemStack), (byte)getCharge(itemStack), (byte)getCharge(itemStack), "50:0");
|
||||
}
|
||||
/*
|
||||
if (result) {
|
|
@ -1,10 +1,11 @@
|
|||
package ee3.common.item;
|
||||
package com.pahimar.ee3.item;
|
||||
|
||||
import com.pahimar.ee3.EquivalentExchange3;
|
||||
import com.pahimar.ee3.lib.ItemIds;
|
||||
import com.pahimar.ee3.lib.Strings;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
import ee3.common.EquivalentExchange3;
|
||||
import ee3.common.lib.ItemIds;
|
||||
import ee3.common.lib.Strings;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
|
@ -1,4 +1,4 @@
|
|||
package ee3.common.lib;
|
||||
package com.pahimar.ee3.lib;
|
||||
|
||||
/**
|
||||
* BlockIds
|
|
@ -1,4 +1,4 @@
|
|||
package ee3.common.lib;
|
||||
package com.pahimar.ee3.lib;
|
||||
|
||||
/**
|
||||
* Colours
|
|
@ -1,112 +1,113 @@
|
|||
package ee3.common.lib;
|
||||
|
||||
import net.minecraftforge.common.Configuration;
|
||||
import ee3.common.item.ModItems;
|
||||
|
||||
/**
|
||||
* ConfigurationSettings
|
||||
*
|
||||
* Stores the various configuration settings read in from configuration files
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
public class ConfigurationSettings {
|
||||
|
||||
/*
|
||||
* General configuration settings
|
||||
*/
|
||||
// Whether or not EE3 sounds are enabled
|
||||
public static boolean ENABLE_SOUNDS;
|
||||
public static final String ENABLE_SOUNDS_CONFIGNAME = "sounds.enabled";
|
||||
public static final boolean ENABLE_SOUNDS_DEFAULT = true;
|
||||
|
||||
// Whether or not EE3 will do a version check when loaded
|
||||
public static boolean ENABLE_VERSION_CHECK;
|
||||
public static final String ENABLE_VERSION_CHECK_CONFIGNAME = "version_check.enabled";
|
||||
public static final boolean ENABLE_VERSION_CHECK_DEFAULT = true;
|
||||
|
||||
/*
|
||||
* Graphic config settings
|
||||
*/
|
||||
// Whether or not EE3 particle fx are enabled
|
||||
public static boolean ENABLE_PARTICLE_FX;
|
||||
public static final String ENABLE_PARTICLE_FX_CONFIGNAME = "particle_fx.enabled";
|
||||
public static final boolean ENABLE_PARTICLE_FX_DEFAULT = true;
|
||||
|
||||
// Whether or not the in world transmutation overlay is enabled
|
||||
public static boolean ENABLE_OVERLAY_WORLD_TRANSMUTATION;
|
||||
public static final String ENABLE_OVERLAY_WORLD_TRANSMUTATION_CONFIGNAME = "world_transmutation_overlay.enabled";
|
||||
public static final boolean ENABLE_OVERLAY_WORLD_TRANSMUTATION_DEFAULT = true;
|
||||
|
||||
/*
|
||||
* Block related config settings
|
||||
*/
|
||||
public static int RED_WATER_DURATION_BASE;
|
||||
public static String RED_WATER_DURATION_BASE_CONFIGNAME = "duration.base";
|
||||
public static final int RED_WATER_DURATION_BASE_DEFAULT = 5;
|
||||
|
||||
public static int RED_WATER_DURATION_MODIFIER;
|
||||
public static String RED_WATER_DURATION_MODIFIER_CONFIGNAME = "duration.modifier";
|
||||
public static final int RED_WATER_DURATION_MODIFIER_DEFAULT = 2;
|
||||
|
||||
public static int RED_WATER_RANGE_BASE;
|
||||
public static String RED_WATER_RANGE_BASE_CONFIGNAME = "range.base";
|
||||
public static final int RED_WATER_RANGE_BASE_DEFAULT = 1;
|
||||
|
||||
public static int RED_WATER_RANGE_MODIFIER;
|
||||
public static String RED_WATER_RANGE_MODIFIER_CONFIGNAME = "range.modifier";
|
||||
public static final int RED_WATER_RANGE_MODIFIER_DEFAULT = 3;
|
||||
|
||||
/*
|
||||
* Item related config settings
|
||||
*/
|
||||
// The maximum durability for the Minium Stone
|
||||
public static int MINIUM_STONE_MAX_DURABILITY;
|
||||
public static final String MINIUM_STONE_MAX_DURABILITY_CONFIGNAME = Strings.MINIUM_STONE_NAME;
|
||||
public static final int MINIUM_STONE_MAX_DURABILITY_DEFAULT = 1521;
|
||||
|
||||
// The maximum durability for the Philosophers Stone
|
||||
public static int PHILOSOPHERS_STONE_MAX_DURABILITY;
|
||||
public static final String PHILOSOPHERS_STONE_MAX_DURABILITY_CONFIGNAME = Strings.PHILOSOPHER_STONE_NAME;
|
||||
public static final int PHILOSOPHERS_STONE_MAX_DURABILITY_DEFAULT = 10001;
|
||||
|
||||
/*
|
||||
* Keybinding related config settings
|
||||
*/
|
||||
// Extra key
|
||||
public static final String KEYBINDING_EXTRA = "key.extra";
|
||||
public static final int KEYBINDING_EXTRA_DEFAULT = 46;
|
||||
|
||||
// Release key
|
||||
public static final String KEYBINDING_RELEASE = "key.release";
|
||||
public static final int KEYBINDING_RELEASE_DEFAULT = 19;
|
||||
|
||||
// Toggle key
|
||||
public static final String KEYBINDING_TOGGLE = "key.toggle";
|
||||
public static final int KEYBINDING_TOGGLE_DEFAULT = 34;
|
||||
|
||||
// Charge key
|
||||
public static final String KEYBINDING_CHARGE = "key.charge";
|
||||
public static final int KEYBINDING_CHARGE_DEFAULT = 47;
|
||||
|
||||
/*
|
||||
* Transmutation related config settings
|
||||
*/
|
||||
// The durability cost for each item transmutation
|
||||
public static int TRANSMUTE_COST_ITEM;
|
||||
public static final String TRANSMUTE_COST_ITEM_CONFIGNAME = Strings.TRANSMUTATION_COST_ITEM;
|
||||
public static final int TRANSMUTE_COST_ITEM_DEFAULT = 1;
|
||||
|
||||
// The durability cost for each block transmutation
|
||||
public static int TRANSMUTE_COST_BLOCK;
|
||||
public static final String TRANSMUTE_COST_BLOCK_CONFIGNAME = Strings.TRANSMUTATION_COST_BLOCK;
|
||||
public static final int TRANSMUTE_COST_BLOCK_DEFAULT = 1;
|
||||
|
||||
// The durability cost for each block transmutation
|
||||
public static int TRANSMUTE_COST_MOB;
|
||||
public static final String TRANSMUTE_COST_MOB_CONFIGNAME = Strings.TRANSMUTATION_COST_MOB;
|
||||
public static final int TRANSMUTE_COST_MOB_DEFAULT = 1;
|
||||
|
||||
}
|
||||
package com.pahimar.ee3.lib;
|
||||
|
||||
import com.pahimar.ee3.item.ModItems;
|
||||
|
||||
import net.minecraftforge.common.Configuration;
|
||||
|
||||
/**
|
||||
* ConfigurationSettings
|
||||
*
|
||||
* Stores the various configuration settings read in from configuration files
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
public class ConfigurationSettings {
|
||||
|
||||
/*
|
||||
* General configuration settings
|
||||
*/
|
||||
// Whether or not EE3 sounds are enabled
|
||||
public static boolean ENABLE_SOUNDS;
|
||||
public static final String ENABLE_SOUNDS_CONFIGNAME = "sounds.enabled";
|
||||
public static final boolean ENABLE_SOUNDS_DEFAULT = true;
|
||||
|
||||
// Whether or not EE3 will do a version check when loaded
|
||||
public static boolean ENABLE_VERSION_CHECK;
|
||||
public static final String ENABLE_VERSION_CHECK_CONFIGNAME = "version_check.enabled";
|
||||
public static final boolean ENABLE_VERSION_CHECK_DEFAULT = true;
|
||||
|
||||
/*
|
||||
* Graphic config settings
|
||||
*/
|
||||
// Whether or not EE3 particle fx are enabled
|
||||
public static boolean ENABLE_PARTICLE_FX;
|
||||
public static final String ENABLE_PARTICLE_FX_CONFIGNAME = "particle_fx.enabled";
|
||||
public static final boolean ENABLE_PARTICLE_FX_DEFAULT = true;
|
||||
|
||||
// Whether or not the in world transmutation overlay is enabled
|
||||
public static boolean ENABLE_OVERLAY_WORLD_TRANSMUTATION;
|
||||
public static final String ENABLE_OVERLAY_WORLD_TRANSMUTATION_CONFIGNAME = "world_transmutation_overlay.enabled";
|
||||
public static final boolean ENABLE_OVERLAY_WORLD_TRANSMUTATION_DEFAULT = true;
|
||||
|
||||
/*
|
||||
* Block related config settings
|
||||
*/
|
||||
public static int RED_WATER_DURATION_BASE;
|
||||
public static String RED_WATER_DURATION_BASE_CONFIGNAME = "duration.base";
|
||||
public static final int RED_WATER_DURATION_BASE_DEFAULT = 5;
|
||||
|
||||
public static int RED_WATER_DURATION_MODIFIER;
|
||||
public static String RED_WATER_DURATION_MODIFIER_CONFIGNAME = "duration.modifier";
|
||||
public static final int RED_WATER_DURATION_MODIFIER_DEFAULT = 2;
|
||||
|
||||
public static int RED_WATER_RANGE_BASE;
|
||||
public static String RED_WATER_RANGE_BASE_CONFIGNAME = "range.base";
|
||||
public static final int RED_WATER_RANGE_BASE_DEFAULT = 1;
|
||||
|
||||
public static int RED_WATER_RANGE_MODIFIER;
|
||||
public static String RED_WATER_RANGE_MODIFIER_CONFIGNAME = "range.modifier";
|
||||
public static final int RED_WATER_RANGE_MODIFIER_DEFAULT = 3;
|
||||
|
||||
/*
|
||||
* Item related config settings
|
||||
*/
|
||||
// The maximum durability for the Minium Stone
|
||||
public static int MINIUM_STONE_MAX_DURABILITY;
|
||||
public static final String MINIUM_STONE_MAX_DURABILITY_CONFIGNAME = Strings.MINIUM_STONE_NAME;
|
||||
public static final int MINIUM_STONE_MAX_DURABILITY_DEFAULT = 1521;
|
||||
|
||||
// The maximum durability for the Philosophers Stone
|
||||
public static int PHILOSOPHERS_STONE_MAX_DURABILITY;
|
||||
public static final String PHILOSOPHERS_STONE_MAX_DURABILITY_CONFIGNAME = Strings.PHILOSOPHER_STONE_NAME;
|
||||
public static final int PHILOSOPHERS_STONE_MAX_DURABILITY_DEFAULT = 10001;
|
||||
|
||||
/*
|
||||
* Keybinding related config settings
|
||||
*/
|
||||
// Extra key
|
||||
public static final String KEYBINDING_EXTRA = "key.extra";
|
||||
public static final int KEYBINDING_EXTRA_DEFAULT = 46;
|
||||
|
||||
// Release key
|
||||
public static final String KEYBINDING_RELEASE = "key.release";
|
||||
public static final int KEYBINDING_RELEASE_DEFAULT = 19;
|
||||
|
||||
// Toggle key
|
||||
public static final String KEYBINDING_TOGGLE = "key.toggle";
|
||||
public static final int KEYBINDING_TOGGLE_DEFAULT = 34;
|
||||
|
||||
// Charge key
|
||||
public static final String KEYBINDING_CHARGE = "key.charge";
|
||||
public static final int KEYBINDING_CHARGE_DEFAULT = 47;
|
||||
|
||||
/*
|
||||
* Transmutation related config settings
|
||||
*/
|
||||
// The durability cost for each item transmutation
|
||||
public static int TRANSMUTE_COST_ITEM;
|
||||
public static final String TRANSMUTE_COST_ITEM_CONFIGNAME = Strings.TRANSMUTATION_COST_ITEM;
|
||||
public static final int TRANSMUTE_COST_ITEM_DEFAULT = 1;
|
||||
|
||||
// The durability cost for each block transmutation
|
||||
public static int TRANSMUTE_COST_BLOCK;
|
||||
public static final String TRANSMUTE_COST_BLOCK_CONFIGNAME = Strings.TRANSMUTATION_COST_BLOCK;
|
||||
public static final int TRANSMUTE_COST_BLOCK_DEFAULT = 1;
|
||||
|
||||
// The durability cost for each block transmutation
|
||||
public static int TRANSMUTE_COST_MOB;
|
||||
public static final String TRANSMUTE_COST_MOB_CONFIGNAME = Strings.TRANSMUTATION_COST_MOB;
|
||||
public static final int TRANSMUTE_COST_MOB_DEFAULT = 1;
|
||||
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package ee3.common.lib;
|
||||
package com.pahimar.ee3.lib;
|
||||
|
||||
/**
|
||||
* CustomItemRarity
|
|
@ -1,4 +1,4 @@
|
|||
package ee3.common.lib;
|
||||
package com.pahimar.ee3.lib;
|
||||
|
||||
/**
|
||||
* GuiIds
|
|
@ -1,4 +1,4 @@
|
|||
package ee3.common.lib;
|
||||
package com.pahimar.ee3.lib;
|
||||
|
||||
/**
|
||||
* ItemIds
|
|
@ -1,38 +1,38 @@
|
|||
package ee3.common.lib;
|
||||
|
||||
/**
|
||||
* Localizations
|
||||
*
|
||||
* Library containing all mod language related files
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
public class Localizations {
|
||||
|
||||
private static final String LANG_RESOURCE_LOCATION = "/ee3/lang/";
|
||||
|
||||
public static String[] localeFiles = {
|
||||
LANG_RESOURCE_LOCATION + "cs_CZ.xml",
|
||||
LANG_RESOURCE_LOCATION + "cy_GB.xml",
|
||||
LANG_RESOURCE_LOCATION + "de_DE.xml",
|
||||
LANG_RESOURCE_LOCATION + "en_US.xml",
|
||||
LANG_RESOURCE_LOCATION + "es_ES.xml",
|
||||
LANG_RESOURCE_LOCATION + "fr_FR.xml",
|
||||
LANG_RESOURCE_LOCATION + "it_IT.xml",
|
||||
LANG_RESOURCE_LOCATION + "ja_JP.xml",
|
||||
LANG_RESOURCE_LOCATION + "la_IT.xml",
|
||||
LANG_RESOURCE_LOCATION + "nl_NL.xml",
|
||||
LANG_RESOURCE_LOCATION + "no_NO.xml",
|
||||
LANG_RESOURCE_LOCATION + "pl_PL.xml",
|
||||
LANG_RESOURCE_LOCATION + "pt_BR.xml",
|
||||
LANG_RESOURCE_LOCATION + "pt_PT.xml",
|
||||
LANG_RESOURCE_LOCATION + "ru_RU.xml",
|
||||
LANG_RESOURCE_LOCATION + "sr_RS.xml",
|
||||
LANG_RESOURCE_LOCATION + "sv_SE.xml",
|
||||
LANG_RESOURCE_LOCATION + "zh_CN.xml",
|
||||
LANG_RESOURCE_LOCATION + "zh_TW.xml"
|
||||
};
|
||||
|
||||
}
|
||||
package com.pahimar.ee3.lib;
|
||||
|
||||
/**
|
||||
* Localizations
|
||||
*
|
||||
* Library containing all mod language related files
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
public class Localizations {
|
||||
|
||||
private static final String LANG_RESOURCE_LOCATION = "/ee3/lang/";
|
||||
|
||||
public static String[] localeFiles = {
|
||||
LANG_RESOURCE_LOCATION + "cs_CZ.xml",
|
||||
LANG_RESOURCE_LOCATION + "cy_GB.xml",
|
||||
LANG_RESOURCE_LOCATION + "de_DE.xml",
|
||||
LANG_RESOURCE_LOCATION + "en_US.xml",
|
||||
LANG_RESOURCE_LOCATION + "es_ES.xml",
|
||||
LANG_RESOURCE_LOCATION + "fr_FR.xml",
|
||||
LANG_RESOURCE_LOCATION + "it_IT.xml",
|
||||
LANG_RESOURCE_LOCATION + "ja_JP.xml",
|
||||
LANG_RESOURCE_LOCATION + "la_IT.xml",
|
||||
LANG_RESOURCE_LOCATION + "nl_NL.xml",
|
||||
LANG_RESOURCE_LOCATION + "no_NO.xml",
|
||||
LANG_RESOURCE_LOCATION + "pl_PL.xml",
|
||||
LANG_RESOURCE_LOCATION + "pt_BR.xml",
|
||||
LANG_RESOURCE_LOCATION + "pt_PT.xml",
|
||||
LANG_RESOURCE_LOCATION + "ru_RU.xml",
|
||||
LANG_RESOURCE_LOCATION + "sr_RS.xml",
|
||||
LANG_RESOURCE_LOCATION + "sv_SE.xml",
|
||||
LANG_RESOURCE_LOCATION + "zh_CN.xml",
|
||||
LANG_RESOURCE_LOCATION + "zh_TW.xml"
|
||||
};
|
||||
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package ee3.common.lib;
|
||||
package com.pahimar.ee3.lib;
|
||||
|
||||
/**
|
||||
* PacketIds
|
|
@ -1,4 +1,4 @@
|
|||
package ee3.common.lib;
|
||||
package com.pahimar.ee3.lib;
|
||||
|
||||
/**
|
||||
* Reference
|
||||
|
@ -21,7 +21,7 @@ public class Reference {
|
|||
public static final String CHANNEL_NAME = MOD_ID;
|
||||
public static final int SECOND_IN_TICKS = 20;
|
||||
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";
|
||||
public static final String SERVER_PROXY_CLASS = "com.pahimar.ee3.core.proxy.CommonProxy";
|
||||
public static final String CLIENT_PROXY_CLASS = "com.pahimar.ee3.core.proxy.ClientProxy";
|
||||
|
||||
}
|
|
@ -1,16 +1,16 @@
|
|||
package ee3.common.lib;
|
||||
|
||||
/**
|
||||
* RenderIds
|
||||
*
|
||||
* Library containing the various ids for different renders in the mod
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
public class RenderIds {
|
||||
|
||||
public static int calcinatorRenderId;
|
||||
|
||||
}
|
||||
package com.pahimar.ee3.lib;
|
||||
|
||||
/**
|
||||
* RenderIds
|
||||
*
|
||||
* Library containing the various ids for different renders in the mod
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
public class RenderIds {
|
||||
|
||||
public static int calcinatorRenderId;
|
||||
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
package ee3.common.lib;
|
||||
package com.pahimar.ee3.lib;
|
||||
|
||||
|
||||
public class WorldEvents {
|
||||
public class RequestEvents {
|
||||
|
||||
public static final byte TRANSMUTATION = 0;
|
||||
|
|
@ -1,48 +1,48 @@
|
|||
package ee3.common.lib;
|
||||
|
||||
/**
|
||||
* Sounds
|
||||
*
|
||||
* Library containing all mod sound related files and references
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
public class Sounds {
|
||||
|
||||
private static final String SOUND_RESOURCE_LOCATION = "ee3/sound/";
|
||||
private static final String SOUND_PREFIX = "ee3.sound.";
|
||||
|
||||
public static String[] soundFiles = {
|
||||
SOUND_RESOURCE_LOCATION + "chargeDown.ogg",
|
||||
SOUND_RESOURCE_LOCATION + "chargeUp.ogg",
|
||||
SOUND_RESOURCE_LOCATION + "destruct.ogg",
|
||||
SOUND_RESOURCE_LOCATION + "gust.ogg",
|
||||
SOUND_RESOURCE_LOCATION + "heal.ogg",
|
||||
SOUND_RESOURCE_LOCATION + "kinesis.ogg",
|
||||
SOUND_RESOURCE_LOCATION + "launch.ogg",
|
||||
SOUND_RESOURCE_LOCATION + "nova.ogg",
|
||||
SOUND_RESOURCE_LOCATION + "philball.ogg",
|
||||
SOUND_RESOURCE_LOCATION + "tock.ogg",
|
||||
SOUND_RESOURCE_LOCATION + "transmute.ogg",
|
||||
SOUND_RESOURCE_LOCATION + "wall.ogg",
|
||||
SOUND_RESOURCE_LOCATION + "waterball.ogg",
|
||||
SOUND_RESOURCE_LOCATION + "wind.ogg" };
|
||||
|
||||
public static final String CHARGE_DOWN = SOUND_PREFIX + "chargeDown";
|
||||
public static final String CHARGE_UP = SOUND_PREFIX + "chargeUp";
|
||||
public static final String DESTRUCTION = SOUND_PREFIX + "destruct";
|
||||
public static final String GUST = SOUND_PREFIX + "gust";
|
||||
public static final String HEAL = SOUND_PREFIX + "heal";
|
||||
public static final String KINESIS = SOUND_PREFIX + "kinesis";
|
||||
public static final String LAUNCH = SOUND_PREFIX + "launch";
|
||||
public static final String NOVA = SOUND_PREFIX + "nova";
|
||||
public static final String PHILOSOPHERS_BALL = SOUND_PREFIX + "philball";
|
||||
public static final String TOCK = SOUND_PREFIX + "tock";
|
||||
public static final String TRANSMUTE = SOUND_PREFIX + "transmute";
|
||||
public static final String WALL = SOUND_PREFIX + "wall";
|
||||
public static final String WATER_BALL = SOUND_PREFIX + "waterball";
|
||||
public static final String WIND = SOUND_PREFIX + "wind";
|
||||
|
||||
package com.pahimar.ee3.lib;
|
||||
|
||||
/**
|
||||
* Sounds
|
||||
*
|
||||
* Library containing all mod sound related files and references
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
public class Sounds {
|
||||
|
||||
private static final String SOUND_RESOURCE_LOCATION = "ee3/sound/";
|
||||
private static final String SOUND_PREFIX = "ee3.sound.";
|
||||
|
||||
public static String[] soundFiles = {
|
||||
SOUND_RESOURCE_LOCATION + "chargeDown.ogg",
|
||||
SOUND_RESOURCE_LOCATION + "chargeUp.ogg",
|
||||
SOUND_RESOURCE_LOCATION + "destruct.ogg",
|
||||
SOUND_RESOURCE_LOCATION + "gust.ogg",
|
||||
SOUND_RESOURCE_LOCATION + "heal.ogg",
|
||||
SOUND_RESOURCE_LOCATION + "kinesis.ogg",
|
||||
SOUND_RESOURCE_LOCATION + "launch.ogg",
|
||||
SOUND_RESOURCE_LOCATION + "nova.ogg",
|
||||
SOUND_RESOURCE_LOCATION + "philball.ogg",
|
||||
SOUND_RESOURCE_LOCATION + "tock.ogg",
|
||||
SOUND_RESOURCE_LOCATION + "transmute.ogg",
|
||||
SOUND_RESOURCE_LOCATION + "wall.ogg",
|
||||
SOUND_RESOURCE_LOCATION + "waterball.ogg",
|
||||
SOUND_RESOURCE_LOCATION + "wind.ogg" };
|
||||
|
||||
public static final String CHARGE_DOWN = SOUND_PREFIX + "chargeDown";
|
||||
public static final String CHARGE_UP = SOUND_PREFIX + "chargeUp";
|
||||
public static final String DESTRUCTION = SOUND_PREFIX + "destruct";
|
||||
public static final String GUST = SOUND_PREFIX + "gust";
|
||||
public static final String HEAL = SOUND_PREFIX + "heal";
|
||||
public static final String KINESIS = SOUND_PREFIX + "kinesis";
|
||||
public static final String LAUNCH = SOUND_PREFIX + "launch";
|
||||
public static final String NOVA = SOUND_PREFIX + "nova";
|
||||
public static final String PHILOSOPHERS_BALL = SOUND_PREFIX + "philball";
|
||||
public static final String TOCK = SOUND_PREFIX + "tock";
|
||||
public static final String TRANSMUTE = SOUND_PREFIX + "transmute";
|
||||
public static final String WALL = SOUND_PREFIX + "wall";
|
||||
public static final String WATER_BALL = SOUND_PREFIX + "waterball";
|
||||
public static final String WIND = SOUND_PREFIX + "wind";
|
||||
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package ee3.common.lib;
|
||||
package com.pahimar.ee3.lib;
|
||||
|
||||
|
||||
public class Sprites {
|
|
@ -1,4 +1,4 @@
|
|||
package ee3.common.lib;
|
||||
package com.pahimar.ee3.lib;
|
||||
|
||||
public class Strings {
|
||||
|
|
@ -1,12 +1,17 @@
|
|||
package ee3.common.network;
|
||||
package com.pahimar.ee3.network;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.DataInputStream;
|
||||
|
||||
import com.pahimar.ee3.lib.Reference;
|
||||
import com.pahimar.ee3.network.packet.PacketEE;
|
||||
import com.pahimar.ee3.network.packet.PacketKeyPressed;
|
||||
import com.pahimar.ee3.network.packet.PacketTileUpdate;
|
||||
import com.pahimar.ee3.network.packet.PacketRequestEvent;
|
||||
|
||||
import net.minecraft.network.packet.Packet;
|
||||
import net.minecraft.network.packet.Packet250CustomPayload;
|
||||
|
||||
import ee3.common.lib.Reference;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -21,7 +26,7 @@ import ee3.common.lib.Reference;
|
|||
public enum PacketTypeHandler {
|
||||
KEY(PacketKeyPressed.class),
|
||||
TILE(PacketTileUpdate.class),
|
||||
WORLD_EVENT(PacketWorldEvent.class);
|
||||
REQUEST_EVENT(PacketRequestEvent.class);
|
||||
|
||||
private Class<? extends PacketEE> clazz;
|
||||
|
|
@ -1,10 +1,12 @@
|
|||
package ee3.common.network;
|
||||
package com.pahimar.ee3.network.packet;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.DataInputStream;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.pahimar.ee3.network.PacketTypeHandler;
|
||||
|
||||
import net.minecraft.network.INetworkManager;
|
||||
import cpw.mods.fml.common.network.Player;
|
||||
|
||||
|
@ -19,8 +21,8 @@ import cpw.mods.fml.common.network.Player;
|
|||
*/
|
||||
public class PacketEE {
|
||||
|
||||
protected PacketTypeHandler packetType;
|
||||
protected boolean isChunkDataPacket;
|
||||
public PacketTypeHandler packetType;
|
||||
public boolean isChunkDataPacket;
|
||||
|
||||
public PacketEE(PacketTypeHandler packetType, boolean isChunkDataPacket) {
|
||||
this.packetType = packetType;
|
|
@ -1,20 +1,22 @@
|
|||
package ee3.common.network;
|
||||
package com.pahimar.ee3.network.packet;
|
||||
|
||||
import java.io.DataInputStream;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.pahimar.ee3.EquivalentExchange3;
|
||||
import com.pahimar.ee3.item.IKeyBound;
|
||||
import com.pahimar.ee3.item.ITransmutationStone;
|
||||
import com.pahimar.ee3.lib.GuiIds;
|
||||
import com.pahimar.ee3.lib.ItemIds;
|
||||
import com.pahimar.ee3.lib.Reference;
|
||||
import com.pahimar.ee3.network.PacketTypeHandler;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.network.INetworkManager;
|
||||
|
||||
import cpw.mods.fml.common.network.Player;
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
import ee3.common.EquivalentExchange3;
|
||||
import ee3.common.item.IKeyBound;
|
||||
import ee3.common.item.ITransmutationStone;
|
||||
import ee3.common.lib.GuiIds;
|
||||
import ee3.common.lib.ItemIds;
|
||||
import ee3.common.lib.Reference;
|
||||
|
||||
/**
|
||||
* PacketKeyPressed
|
|
@ -1,9 +1,14 @@
|
|||
package ee3.common.network;
|
||||
package com.pahimar.ee3.network.packet;
|
||||
|
||||
import java.io.DataInputStream;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.pahimar.ee3.event.ActionRequestEvent;
|
||||
import com.pahimar.ee3.event.WorldTransmutationEvent;
|
||||
import com.pahimar.ee3.lib.RequestEvents;
|
||||
import com.pahimar.ee3.network.PacketTypeHandler;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.network.INetworkManager;
|
||||
import net.minecraft.world.World;
|
||||
|
@ -12,12 +17,8 @@ import net.minecraftforge.event.Event;
|
|||
import net.minecraftforge.event.Event.Result;
|
||||
import net.minecraftforge.event.entity.player.PlayerInteractEvent.Action;
|
||||
import cpw.mods.fml.common.network.Player;
|
||||
import ee3.common.event.ModActionEvent;
|
||||
import ee3.common.event.WorldTransmutationEvent;
|
||||
import ee3.common.lib.ModAction;
|
||||
import ee3.common.lib.WorldEvents;
|
||||
|
||||
public class PacketWorldEvent extends PacketEE {
|
||||
public class PacketRequestEvent extends PacketEE {
|
||||
|
||||
public byte eventType;
|
||||
public int originX, originY, originZ;
|
||||
|
@ -25,14 +26,14 @@ public class PacketWorldEvent extends PacketEE {
|
|||
public byte rangeX, rangeY, rangeZ;
|
||||
public String data;
|
||||
|
||||
public PacketWorldEvent() {
|
||||
public PacketRequestEvent() {
|
||||
|
||||
super(PacketTypeHandler.WORLD_EVENT, false);
|
||||
super(PacketTypeHandler.REQUEST_EVENT, false);
|
||||
}
|
||||
|
||||
public PacketWorldEvent(byte eventType, int originX, int originY, int originZ, byte sideHit, byte rangeX, byte rangeY, byte rangeZ, String data) {
|
||||
public PacketRequestEvent(byte eventType, int originX, int originY, int originZ, byte sideHit, byte rangeX, byte rangeY, byte rangeZ, String data) {
|
||||
|
||||
super(PacketTypeHandler.WORLD_EVENT, false);
|
||||
super(PacketTypeHandler.REQUEST_EVENT, false);
|
||||
this.eventType = eventType;
|
||||
this.originX = originX;
|
||||
this.originY = originY;
|
||||
|
@ -100,28 +101,23 @@ public class PacketWorldEvent extends PacketEE {
|
|||
|
||||
public void execute(INetworkManager manager, Player player) {
|
||||
|
||||
/*
|
||||
* Server knows the world, the player, and all the packet data
|
||||
* Server checks (for each block);
|
||||
* 1) If the action on that block is allowed for the player
|
||||
* 2) If the action is a valid action
|
||||
*
|
||||
* AoE options are; 1x1, 3x3, 5x5, and 7x7
|
||||
* Charge options; 0, 1, 2, 3
|
||||
* so Range would be 1, 2, 4, 6
|
||||
* 1 + 0, 1 + 1, 1 + 3, 1 + 5
|
||||
*/
|
||||
|
||||
EntityPlayer thePlayer = (EntityPlayer) player;
|
||||
ModActionEvent modActionEvent;
|
||||
WorldTransmutationEvent worldTransmutationEvent;
|
||||
ActionRequestEvent actionRequestEvent = null;
|
||||
Event actionEvent = null;;
|
||||
|
||||
modActionEvent= new ModActionEvent(thePlayer, ModAction.TRANSMUTATION, originX, originY, originZ, (int) sideHit);
|
||||
MinecraftForge.EVENT_BUS.post(modActionEvent);
|
||||
// TODO Move this logic to a ActionEvent handler to post an appropriate event depending on the request received
|
||||
|
||||
if (modActionEvent.allowEvent != Result.DENY) {
|
||||
worldTransmutationEvent = new WorldTransmutationEvent(thePlayer, thePlayer.worldObj, originX, originY, originZ, sideHit, rangeX, rangeY, rangeZ, data);
|
||||
MinecraftForge.EVENT_BUS.post(worldTransmutationEvent);
|
||||
if (eventType == RequestEvents.TRANSMUTATION) {
|
||||
actionEvent = new WorldTransmutationEvent(thePlayer, thePlayer.worldObj, originX, originY, originZ, data);
|
||||
}
|
||||
|
||||
if (actionEvent != null) {
|
||||
actionRequestEvent = new ActionRequestEvent(thePlayer, actionEvent, originX, originY, originZ, (int) sideHit);
|
||||
MinecraftForge.EVENT_BUS.post(actionRequestEvent);
|
||||
|
||||
if (actionRequestEvent.allowEvent != Result.DENY) {
|
||||
MinecraftForge.EVENT_BUS.post(actionEvent);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -1,9 +1,11 @@
|
|||
package ee3.common.network;
|
||||
package com.pahimar.ee3.network.packet;
|
||||
|
||||
import java.io.DataInputStream;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.pahimar.ee3.network.PacketTypeHandler;
|
||||
|
||||
import cpw.mods.fml.common.network.Player;
|
||||
|
||||
import net.minecraft.network.INetworkManager;
|
|
@ -1,4 +1,4 @@
|
|||
package ee3.common.recipe;
|
||||
package com.pahimar.ee3.recipe;
|
||||
|
||||
/**
|
||||
* RecipesCalcinator
|
|
@ -1,4 +1,4 @@
|
|||
package ee3.common.recipe;
|
||||
package com.pahimar.ee3.recipe;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
@ -6,17 +6,18 @@ import java.util.Iterator;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.pahimar.ee3.core.handlers.EquivalencyHandler;
|
||||
import com.pahimar.ee3.core.helper.GeneralHelper;
|
||||
import com.pahimar.ee3.core.helper.RecipeHelper;
|
||||
import com.pahimar.ee3.item.ModItems;
|
||||
import com.pahimar.ee3.lib.Reference;
|
||||
|
||||
import cpw.mods.fml.common.ObfuscationReflectionHelper;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.FurnaceRecipes;
|
||||
import ee3.common.core.handlers.EquivalencyHandler;
|
||||
import ee3.common.core.helper.GeneralHelper;
|
||||
import ee3.common.core.helper.RecipeHelper;
|
||||
import ee3.common.item.ModItems;
|
||||
import ee3.common.lib.Reference;
|
||||
|
||||
/**
|
||||
* RecipesTransmutationStone
|
|
@ -1,99 +1,100 @@
|
|||
package ee3.common.tile;
|
||||
|
||||
import ee3.common.block.ModBlocks;
|
||||
import ee3.common.lib.Strings;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
|
||||
/**
|
||||
* TileCalcinator
|
||||
*
|
||||
* Calcinator tile entity, and all the logic associated with it
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
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];
|
||||
|
||||
public void readFromNBT(NBTTagCompound nbtTagCompound) {
|
||||
super.readFromNBT(nbtTagCompound);
|
||||
|
||||
// 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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void writeToNBT(NBTTagCompound nbtTagCompound) {
|
||||
super.writeToNBT(nbtTagCompound);
|
||||
|
||||
// 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." + Strings.CALCINATOR_NAME;
|
||||
}
|
||||
|
||||
public int getInventoryStackLimit() {
|
||||
return 64;
|
||||
}
|
||||
|
||||
public void openChest() { }
|
||||
public void closeChest() { }
|
||||
|
||||
}
|
||||
package com.pahimar.ee3.tileentity;
|
||||
|
||||
import com.pahimar.ee3.block.ModBlocks;
|
||||
import com.pahimar.ee3.lib.Strings;
|
||||
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
|
||||
/**
|
||||
* TileCalcinator
|
||||
*
|
||||
* Calcinator tile entity, and all the logic associated with it
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
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];
|
||||
|
||||
public void readFromNBT(NBTTagCompound nbtTagCompound) {
|
||||
super.readFromNBT(nbtTagCompound);
|
||||
|
||||
// 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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void writeToNBT(NBTTagCompound nbtTagCompound) {
|
||||
super.writeToNBT(nbtTagCompound);
|
||||
|
||||
// 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." + Strings.CALCINATOR_NAME;
|
||||
}
|
||||
|
||||
public int getInventoryStackLimit() {
|
||||
return 64;
|
||||
}
|
||||
|
||||
public void openChest() { }
|
||||
public void closeChest() { }
|
||||
|
||||
}
|
|
@ -1,70 +1,71 @@
|
|||
package ee3.common.tile;
|
||||
|
||||
import ee3.common.lib.Reference;
|
||||
import ee3.common.lib.Strings;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
/**
|
||||
* TileEE
|
||||
*
|
||||
* General tile entity for EE3 related tile entities
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
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(Strings.NBT_TE_DIRECTION_KEY);
|
||||
state = nbtTagCompound.getShort(Strings.NBT_TE_STATE_KEY);
|
||||
owner = nbtTagCompound.getString(Strings.NBT_TE_OWNER_KEY);
|
||||
}
|
||||
|
||||
public void writeToNBT(NBTTagCompound nbtTagCompound) {
|
||||
super.writeToNBT(nbtTagCompound);
|
||||
|
||||
nbtTagCompound.setByte(Strings.NBT_TE_DIRECTION_KEY, direction);
|
||||
nbtTagCompound.setShort(Strings.NBT_TE_STATE_KEY, state);
|
||||
if(owner != null && owner != "") {
|
||||
nbtTagCompound.setString(Strings.NBT_TE_OWNER_KEY, owner);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
package com.pahimar.ee3.tileentity;
|
||||
|
||||
import com.pahimar.ee3.lib.Reference;
|
||||
import com.pahimar.ee3.lib.Strings;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
/**
|
||||
* TileEE
|
||||
*
|
||||
* General tile entity for EE3 related tile entities
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
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(Strings.NBT_TE_DIRECTION_KEY);
|
||||
state = nbtTagCompound.getShort(Strings.NBT_TE_STATE_KEY);
|
||||
owner = nbtTagCompound.getString(Strings.NBT_TE_OWNER_KEY);
|
||||
}
|
||||
|
||||
public void writeToNBT(NBTTagCompound nbtTagCompound) {
|
||||
super.writeToNBT(nbtTagCompound);
|
||||
|
||||
nbtTagCompound.setByte(Strings.NBT_TE_DIRECTION_KEY, direction);
|
||||
nbtTagCompound.setShort(Strings.NBT_TE_STATE_KEY, state);
|
||||
if(owner != null && owner != "") {
|
||||
nbtTagCompound.setString(Strings.NBT_TE_OWNER_KEY, owner);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
package ee3.common.core.handlers;
|
||||
|
||||
import ee3.common.event.ModActionEvent;
|
||||
import net.minecraftforge.event.ForgeSubscribe;
|
||||
|
||||
public class ModActionHandler {
|
||||
|
||||
@ForgeSubscribe
|
||||
public void onModActionEvent(ModActionEvent event) {
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -1,29 +0,0 @@
|
|||
package ee3.common.event;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.event.Event;
|
||||
|
||||
public class WorldTransmutationEvent extends Event {
|
||||
|
||||
public final EntityPlayer player;
|
||||
public final World world;
|
||||
public final int originX, originY, originZ;
|
||||
public final byte sideHit;
|
||||
public final byte rangeX, rangeY, rangeZ;
|
||||
public final String data;
|
||||
|
||||
public WorldTransmutationEvent(EntityPlayer player, World world, int originX, int originY, int originZ, byte sideHit, byte rangeX, byte rangeY, byte rangeZ, String data) {
|
||||
|
||||
this.player = player;
|
||||
this.world = world;
|
||||
this.originX = originX;
|
||||
this.originY = originY;
|
||||
this.originZ = originZ;
|
||||
this.sideHit = sideHit;
|
||||
this.rangeX = rangeX;
|
||||
this.rangeY = rangeY;
|
||||
this.rangeZ = rangeZ;
|
||||
this.data = data;
|
||||
}
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
package ee3.common.lib;
|
||||
|
||||
|
||||
public enum ModAction {
|
||||
|
||||
TRANSMUTATION(WorldEvents.TRANSMUTATION);
|
||||
|
||||
public int actionId;
|
||||
|
||||
ModAction(int actionId) {
|
||||
this.actionId = actionId;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
|
||||
<properties version="1.0">
|
||||
<comment>German (DE) Localization File</comment>
|
||||
|
@ -31,7 +31,7 @@
|
|||
<entry key="item.alchemyBag.brown.name">Brauner Alchemiebeutel</entry>
|
||||
<entry key="item.alchemyBag.green.name">Grüner Alchemiebeutel</entry>
|
||||
<entry key="item.alchemyBag.red.name">Roter Alchemiebeutel</entry>
|
||||
<entry key="item.alchemyBag.black.name">Schwarzer Alchemiebeutel</entry></entry>
|
||||
<entry key="item.alchemyBag.black.name">Schwarzer Alchemiebeutel</entry>
|
||||
<entry key="tile.redWaterStill.name">Rotes Wasser (Still)</entry>
|
||||
<entry key="tile.redWaterFlowing.name">Rotes Wasser (Fließend)</entry>
|
||||
<entry key="tile.calcinator.name">Kalzinierer</entry>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
|
||||
<properties version="1.0">
|
||||
<comment>Chinese (Simplified)(zh_CN) Localization File</comment>
|
||||
<entry key="key.extra">其他</entry>
|
||||
<entry key="key.extra">額外</entry>
|
||||
<entry key="key.release">松开</entry>
|
||||
<entry key="key.toggle">切换</entry>
|
||||
<entry key="key.charge">充</entry>
|
||||
|
@ -43,4 +43,4 @@
|
|||
<entry key="version.outdated">A new @MOD_NAME@ version exists (@REMOTE_MOD_VERSION@) for @MINECRAFT_VERSION@. 请更新: @MOD_UPDATE_LOCATION@</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>
|
||||
|
|
Loading…
Reference in a new issue