First initial pass of 1.7 update

This commit is contained in:
pahimar 2014-03-27 21:34:47 -04:00
parent 065d129b76
commit 9f56070058
79 changed files with 673 additions and 815 deletions

View file

@ -5,110 +5,38 @@ buildscript {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/repositories/snapshots/"
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:1.0-SNAPSHOT'
classpath 'net.minecraftforge.gradle:ForgeGradle:1.1-SNAPSHOT'
}
}
apply plugin: "forge"
apply plugin: 'forge'
// define the properties file
ext.configFile = file "build.properties"
configFile.withReader {
// read config. it shall from now on be referenced as simply config or as project.config
def prop = new Properties()
prop.load(it)
ext.config = new ConfigSlurper().parse prop
}
group = "com.pahimar.ee3"
version = config.mod_version
version = "0.2"
group = "com.pahimar.ee3" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "EquivalentExchange3"
minecraft {
version = config.minecraft_version + "-" + config.forge_version
assetDir = "run/assets"
replaceIn "lib/Reference.java"
if (project.hasProperty("ee3_signature"))
replace "@FINGERPRINT@", project.ee3_signature
version = "1.7.2-10.12.0.1047"
assetDir = "eclipse/assets"
}
processResources
{
// replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
version = "${config.minecraft_version}-${config.mod_version}.${System.getenv().BUILD_NUMBER}"
// replace version and mcversion
expand 'version': project.version, 'mcversion': project.minecraft.version
}
processResources {
// replace stuff in the files we want.
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
include 'version.properties'
// replaces
expand 'version': project.config.mod_version, 'buildnumber': "${System.getenv().BUILD_NUMBER}"
}
// copy everything else, thats we didnt do before
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
exclude 'version.properties'
}
}
// BEYOND THIS POINT..
// IS STUFF THATS FOR RELEASING...
// verify the properties exist.. or initialize.
if (!project.hasProperty("keystore_location")) // keystore stuff
ext.keystore_location = "."
if (!project.hasProperty("ee3_keystore_alias")) // keystore stuff
ext.ee3_keystore_alias = ""
if (!project.hasProperty("keystore_password")) // keystore stuff
ext.keystore_password = ""
if (!project.hasProperty("ee3_release_loc")) // release loc
ext.ee3_release_loc = "."
else
ext.ee3_release_loc = ee3_release_loc.replace('{MC}', minecraft.version).replace('{MODVER}', config.mod_version).replace('{BUILD}', "${System.getenv().BUILD_NUMBER}")
task signJar(dependsOn: "reobf") {
inputs.file jar.getArchivePath()
inputs.file keystore_location
inputs.property "ee3_keystore_alias", ee3_keystore_alias
inputs.property "keystore_password", keystore_password
outputs.file jar.getArchivePath()
// only sign if the keystore exists
onlyIf {
return keystore_location != "."
}
// the actual action.. sign the jar.
doLast {
ant.signjar(
destDir: jar.destinationDir,
jar: jar.getArchivePath(),
keystore: keystore_location,
alias: ee3_keystore_alias,
storepass: keystore_password
)
}
}
task release(type: Copy) {
dependsOn "signJar"
from project.tasks.jar.destinationDir
into project.file(project.ee3_release_loc)
eachFile { file ->
logger.info "copying ${file}"
}
// only if the release location isn't empty.
onlyIf {
return project.ee3_release_loc != "."
}
}
// copy everything else, thats not the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
}

View file

@ -4,7 +4,6 @@ import com.pahimar.ee3.addon.AddonHandler;
import com.pahimar.ee3.block.ModBlocks;
import com.pahimar.ee3.command.CommandHandler;
import com.pahimar.ee3.configuration.ConfigurationHandler;
import com.pahimar.ee3.creativetab.CreativeTabEE3;
import com.pahimar.ee3.handler.*;
import com.pahimar.ee3.helper.FluidHelper;
import com.pahimar.ee3.helper.LogHelper;
@ -13,7 +12,6 @@ import com.pahimar.ee3.imc.InterModCommsHandler;
import com.pahimar.ee3.item.ModItems;
import com.pahimar.ee3.lib.Reference;
import com.pahimar.ee3.lib.Strings;
import com.pahimar.ee3.network.PacketHandler;
import com.pahimar.ee3.proxy.IProxy;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
@ -21,12 +19,9 @@ import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.*;
import cpw.mods.fml.common.event.FMLInterModComms.IMCEvent;
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 cpw.mods.fml.relauncher.Side;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraftforge.common.MinecraftForge;
import java.io.File;
@ -38,8 +33,7 @@ import java.io.File;
*
* @author pahimar
*/
@Mod(modid = Reference.MOD_ID, name = Reference.MOD_NAME, dependencies = Reference.DEPENDENCIES, certificateFingerprint = Reference.FINGERPRINT)
@NetworkMod(channels = {Reference.CHANNEL_NAME}, clientSideRequired = true, serverSideRequired = false, packetHandler = PacketHandler.class)
@Mod(modid = Reference.MOD_ID, name = Reference.MOD_NAME, certificateFingerprint = Reference.FINGERPRINT)
public class EquivalentExchange3
{
@Instance(Reference.MOD_ID)
@ -48,8 +42,6 @@ public class EquivalentExchange3
@SidedProxy(clientSide = Reference.CLIENT_PROXY_CLASS, serverSide = Reference.SERVER_PROXY_CLASS)
public static IProxy proxy;
public static CreativeTabs tabsEE3 = new CreativeTabEE3(CreativeTabs.getNextID());
@EventHandler
@SuppressWarnings("unused")
public void invalidFingerprint(FMLFingerprintViolationEvent event)
@ -58,11 +50,11 @@ public class EquivalentExchange3
// they are using has been changed/tampered with
if (Reference.FINGERPRINT.equals("@FINGERPRINT@"))
{
LogHelper.warning(Strings.NO_FINGERPRINT_MESSAGE);
LogHelper.warn(Strings.NO_FINGERPRINT_MESSAGE);
}
else
{
LogHelper.severe(Strings.INVALID_FINGERPRINT_MESSAGE);
LogHelper.error(Strings.INVALID_FINGERPRINT_MESSAGE);
}
}
@ -81,9 +73,6 @@ public class EquivalentExchange3
// set version number
event.getModMetadata().version = Reference.VERSION_NUMBER;
// Initialize the log helper
LogHelper.init();
// Initialize the configuration
ConfigurationHandler.init(event.getModConfigurationDirectory().getAbsolutePath() + File.separator + Reference.CHANNEL_NAME.toLowerCase() + File.separator);
@ -117,7 +106,7 @@ public class EquivalentExchange3
public void init(FMLInitializationEvent event)
{
// Register the GUI Handler
NetworkRegistry.instance().registerGuiHandler(instance, new GuiHandler());
NetworkRegistry.INSTANCE.registerGuiHandler(instance, new GuiHandler());
// Register the Item Pickup Handler
MinecraftForge.EVENT_BUS.register(new ItemEventHandler());

View file

@ -21,120 +21,6 @@ public class OreStack implements Comparable<OreStack>
public String oreName;
public int stackSize;
public OreStack(String oreName, int stackSize)
{
this.oreName = oreName;
this.stackSize = stackSize;
}
public OreStack(String oreName)
{
this(oreName, 1);
}
public OreStack(ItemStack itemStack)
{
this(OreDictionary.getOreName(OreDictionary.getOreID(itemStack)), itemStack.stackSize);
}
@Override
public String toString()
{
return String.format("%sxoreStack.%s", stackSize, oreName);
}
@Override
public boolean equals(Object object)
{
return object instanceof OreStack && (comparator.compare(this, (OreStack) object) == Compare.EQUALS);
}
public static boolean compareOreNames(OreStack oreStack1, OreStack oreStack2)
{
if (oreStack1 != null && oreStack2 != null)
{
if ((oreStack1.oreName != null) && (oreStack2.oreName != null))
{
return oreStack1.oreName.equalsIgnoreCase(oreStack2.oreName);
}
}
return false;
}
@Override
public int compareTo(OreStack oreStack)
{
return comparator.compare(this, oreStack);
}
/**
* Deserializes a OreStack object from the given serialized json String
*
* @param jsonOreStack
* Json encoded String representing a OreStack object
*
* @return The OreStack that was encoded as json, or null if a valid OreStack could not be decoded from given String
*/
@SuppressWarnings("unused")
public static OreStack createFromJson(String jsonOreStack)
{
try
{
return gsonSerializer.fromJson(jsonOreStack, OreStack.class);
}
catch (JsonSyntaxException exception)
{
LogHelper.severe(exception.getMessage());
}
catch (JsonParseException exception)
{
LogHelper.severe(exception.getMessage());
}
return null;
}
/**
* Returns this OreStack as a json serialized String
*
* @return Json serialized String of this OreStack
*/
@SuppressWarnings("unused")
public String toJson()
{
return gsonSerializer.toJson(this);
}
public static OreStack getOreStackFromList(Object... objects)
{
return getOreStackFromList(Arrays.asList(objects));
}
public static OreStack getOreStackFromList(List<?> objectList)
{
for (Object listElement : objectList)
{
if (listElement instanceof ItemStack)
{
ItemStack stack = (ItemStack) listElement;
if (OreDictionary.getOreID(stack) != ORE_DICTIONARY_NOT_FOUND)
{
return new OreStack(stack);
}
}
}
return null;
}
public static int compare(OreStack oreStack1, OreStack oreStack2)
{
return comparator.compare(oreStack1, oreStack2);
}
public static Comparator<OreStack> comparator = new Comparator<OreStack>()
{
@ -173,4 +59,117 @@ public class OreStack implements Comparable<OreStack>
}
}
};
public OreStack(String oreName, int stackSize)
{
this.oreName = oreName;
this.stackSize = stackSize;
}
public OreStack(String oreName)
{
this(oreName, 1);
}
public OreStack(ItemStack itemStack)
{
this(OreDictionary.getOreName(OreDictionary.getOreID(itemStack)), itemStack.stackSize);
}
public static boolean compareOreNames(OreStack oreStack1, OreStack oreStack2)
{
if (oreStack1 != null && oreStack2 != null)
{
if ((oreStack1.oreName != null) && (oreStack2.oreName != null))
{
return oreStack1.oreName.equalsIgnoreCase(oreStack2.oreName);
}
}
return false;
}
/**
* Deserializes a OreStack object from the given serialized json String
*
* @param jsonOreStack
* Json encoded String representing a OreStack object
*
* @return The OreStack that was encoded as json, or null if a valid OreStack could not be decoded from given String
*/
@SuppressWarnings("unused")
public static OreStack createFromJson(String jsonOreStack)
{
try
{
return gsonSerializer.fromJson(jsonOreStack, OreStack.class);
}
catch (JsonSyntaxException exception)
{
LogHelper.error(exception.getMessage());
}
catch (JsonParseException exception)
{
LogHelper.error(exception.getMessage());
}
return null;
}
public static OreStack getOreStackFromList(Object... objects)
{
return getOreStackFromList(Arrays.asList(objects));
}
public static OreStack getOreStackFromList(List<?> objectList)
{
for (Object listElement : objectList)
{
if (listElement instanceof ItemStack)
{
ItemStack stack = (ItemStack) listElement;
if (OreDictionary.getOreID(stack) != ORE_DICTIONARY_NOT_FOUND)
{
return new OreStack(stack);
}
}
}
return null;
}
public static int compare(OreStack oreStack1, OreStack oreStack2)
{
return comparator.compare(oreStack1, oreStack2);
}
@Override
public String toString()
{
return String.format("%sxoreStack.%s", stackSize, oreName);
}
@Override
public boolean equals(Object object)
{
return object instanceof OreStack && (comparator.compare(this, (OreStack) object) == Compare.EQUALS);
}
@Override
public int compareTo(OreStack oreStack)
{
return comparator.compare(this, oreStack);
}
/**
* Returns this OreStack as a json serialized String
*
* @return Json serialized String of this OreStack
*/
@SuppressWarnings("unused")
public String toJson()
{
return gsonSerializer.toJson(this);
}
}

View file

@ -36,7 +36,7 @@ public class RecipeMapping implements JsonSerializer<RecipeMapping>, JsonDeseria
}
else
{
LogHelper.warning(String.format("RecipeMapping with output: %s is containing a null WrappedStack " +
LogHelper.warn(String.format("RecipeMapping with output: %s is containing a null WrappedStack " +
"input that will not be added to the input list.", outputWrappedStack.toString()));
}
}
@ -52,11 +52,11 @@ public class RecipeMapping implements JsonSerializer<RecipeMapping>, JsonDeseria
}
catch (JsonSyntaxException exception)
{
LogHelper.severe(exception.getMessage());
LogHelper.error(exception.getMessage());
}
catch (JsonParseException exception)
{
LogHelper.severe(exception.getMessage());
LogHelper.error(exception.getMessage());
}
return null;

View file

@ -35,11 +35,11 @@ public class StackValueMapping implements JsonSerializer<StackValueMapping>, Jso
}
catch (JsonSyntaxException exception)
{
LogHelper.severe(exception.getMessage());
LogHelper.error(exception.getMessage());
}
catch (JsonParseException exception)
{
LogHelper.severe(exception.getMessage());
LogHelper.error(exception.getMessage());
}
return null;

View file

@ -290,11 +290,11 @@ public class WrappedStack implements Comparable<WrappedStack>, JsonDeserializer<
}
catch (JsonSyntaxException exception)
{
LogHelper.severe(exception.getMessage());
LogHelper.error(exception.getMessage());
}
catch (JsonParseException exception)
{
LogHelper.severe(exception.getMessage());
LogHelper.error(exception.getMessage());
}
return null;
@ -588,6 +588,103 @@ public class WrappedStack implements Comparable<WrappedStack>, JsonDeserializer<
}
}
/**
*
*/
@Override
public WrappedStack deserialize(JsonElement jsonElement, Type type, JsonDeserializationContext context) throws JsonParseException
{
if (!jsonElement.isJsonPrimitive())
{
JsonObject jsonWrappedStack = (JsonObject) jsonElement;
int stackSize = -1;
String className = null;
Object stackObject = null;
if (jsonWrappedStack.get("className") != null)
{
className = jsonWrappedStack.get("className").getAsString();
}
if (jsonWrappedStack.get("stackSize") != null)
{
stackSize = jsonWrappedStack.get("stackSize").getAsInt();
}
if (jsonWrappedStack.get("wrappedStack") != null && !jsonWrappedStack.get("wrappedStack").isJsonPrimitive())
{
if (className != null)
{
if (className.equalsIgnoreCase(ItemStack.class.getSimpleName()))
{
JsonItemStack jsonItemStack = gsonSerializer.fromJson(jsonWrappedStack.get("wrappedStack"), JsonItemStack.class);
ItemStack itemStack = null;
if (stackSize > 0)
{
itemStack = new ItemStack(jsonItemStack.itemID, stackSize, jsonItemStack.itemDamage);
if (jsonItemStack.compressedStackTagCompound != null)
{
try
{
itemStack.stackTagCompound = CompressedStreamTools.decompress(jsonItemStack.compressedStackTagCompound);
}
catch (IOException e)
{
e.printStackTrace();
}
}
}
stackObject = itemStack;
}
else if (className.equalsIgnoreCase(OreStack.class.getSimpleName()))
{
OreStack oreStack = gsonSerializer.fromJson(jsonWrappedStack.get("wrappedStack"), OreStack.class);
if (stackSize > 0)
{
oreStack.stackSize = stackSize;
}
stackObject = oreStack;
}
else if (className.equalsIgnoreCase(EnergyStack.class.getSimpleName()))
{
EnergyStack energyStack = gsonSerializer.fromJson(jsonWrappedStack.get("wrappedStack"), EnergyStack.class);
if (stackSize > 0)
{
energyStack.stackSize = stackSize;
}
stackObject = energyStack;
}
else if (className.equalsIgnoreCase(FluidStack.class.getSimpleName()))
{
FluidStack fluidStack = gsonSerializer.fromJson(jsonWrappedStack.get("wrappedStack"), FluidStack.class);
if (stackSize > 0)
{
fluidStack.amount = stackSize;
}
stackObject = fluidStack;
}
}
}
if (stackObject != null)
{
return new WrappedStack(stackObject);
}
else
{
throw new JsonParseException(String.format("Unable to parse a wrappable stack object from the provided json: %s", jsonElement.toString()));
}
}
else
{
throw new JsonParseException(String.format("Unable to parse a wrappable stack object from the provided json: %s", jsonElement.toString()));
}
}
public static Comparator<WrappedStack> comparator = new Comparator<WrappedStack>()
{

View file

@ -17,7 +17,6 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import net.minecraftforge.common.ForgeDirection;
import java.util.List;

View file

@ -4,12 +4,9 @@ import com.pahimar.ee3.EquivalentExchange3;
import com.pahimar.ee3.lib.Strings;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Icon;
import net.minecraft.util.MathHelper;
import net.minecraftforge.common.ForgeDirection;
import java.util.List;

View file

@ -15,7 +15,6 @@ import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.common.ForgeDirection;
import java.util.Random;
@ -140,7 +139,7 @@ public class BlockAludelBase extends BlockEE implements ITileEntityProvider
@Override
public void onNeighborBlockChange(World world, int x, int y, int z, int blockID)
{
TileAludel aludel = (TileAludel)world.getBlockTileEntity(x, y, z);
TileAludel aludel = (TileAludel) world.getBlockTileEntity(x, y, z);
aludel.hasGlassBell = world.getBlockTileEntity(x, y + 1, z) instanceof TileGlassBell;
super.onNeighborBlockChange(world, x, y, z, blockID);
@ -168,7 +167,7 @@ public class BlockAludelBase extends BlockEE implements ITileEntityProvider
{
if (((TileAludel) tile).getState() == 1)
{
switch(((TileAludel) tile).getOrientation())
switch (((TileAludel) tile).getOrientation())
{
case NORTH:
world.spawnParticle(Particles.FLAME, (double) x + 0.5F, (double) y + 0.33F, (double) z + 0.175F, 0.0D, 0.0D, 0.0D);

View file

@ -6,7 +6,6 @@ import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.inventory.IInventory;
@ -15,7 +14,6 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
import net.minecraftforge.common.ForgeDirection;
import java.util.Random;

View file

@ -18,7 +18,6 @@ import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.Vec3;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.common.ForgeDirection;
public class BlockGlassBell extends BlockEE implements ITileEntityProvider
{

View file

@ -6,7 +6,6 @@ import com.pahimar.ee3.lib.Strings;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.ItemStack;
import net.minecraft.world.IBlockAccess;

View file

@ -6,7 +6,6 @@ import com.pahimar.ee3.lib.Strings;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.ItemStack;
import net.minecraft.world.IBlockAccess;

View file

@ -6,13 +6,10 @@ import com.pahimar.ee3.lib.Strings;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Icon;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.common.ForgeDirection;
import java.util.List;

View file

@ -3,7 +3,6 @@ package com.pahimar.ee3.client.audio;
import com.pahimar.ee3.helper.LogHelper;
import com.pahimar.ee3.lib.Sounds;
import net.minecraftforge.client.event.sound.SoundLoadEvent;
import net.minecraftforge.event.ForgeSubscribe;
/**
* Equivalent-Exchange-3
@ -30,7 +29,7 @@ public class SoundHandler
// If we cannot add the custom sound file to the pool, log the exception
catch (Exception e)
{
LogHelper.warning("Failed loading sound file: " + soundFile);
LogHelper.warn("Failed loading sound file: " + soundFile);
}
}
}

View file

@ -50,7 +50,7 @@ public class GuiAlchemicalChest extends GuiContainer
{
if (tileAlchemicalChest.getState() == 0 || tileAlchemicalChest.getState() == 1)
{
fontRenderer.drawString(tileAlchemicalChest.isInvNameLocalized() ? tileAlchemicalChest.getInvName() : StatCollector.translateToLocal(tileAlchemicalChest.getInvName()), 8, 6, 4210752);
fontRenderer.drawString(tileAlchemicalChest.isInvNameLocalized() ? tileAlchemicalChest.getInventoryname() : StatCollector.translateToLocal(tileAlchemicalChest.getInventoryname()), 8, 6, 4210752);
fontRenderer.drawString(StatCollector.translateToLocal(Strings.CONTAINER_INVENTORY), 35, ySize - 95 + 2, 4210752);
}
}

View file

@ -8,8 +8,6 @@ import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.event.DrawBlockHighlightEvent;
import net.minecraftforge.common.ForgeDirection;
import net.minecraftforge.event.ForgeSubscribe;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
@ -26,6 +24,57 @@ public class DrawBlockHighlightHandler
private static int pulse = 0;
private static boolean doInc = true;
public static void renderPulsingQuad(ResourceLocation texture, float maxTransparency)
{
float pulseTransparency = getPulseValue() * maxTransparency / 3000f;
FMLClientHandler.instance().getClient().renderEngine.bindTexture(texture);
Tessellator tessellator = Tessellator.instance;
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
GL11.glColor4f(1, 1, 1, pulseTransparency);
tessellator.startDrawingQuads();
tessellator.setColorRGBA_F(1, 1, 1, pulseTransparency);
tessellator.addVertexWithUV(-0.5D, 0.5D, 0F, 0, 1);
tessellator.addVertexWithUV(0.5D, 0.5D, 0F, 1, 1);
tessellator.addVertexWithUV(0.5D, -0.5D, 0F, 1, 0);
tessellator.addVertexWithUV(-0.5D, -0.5D, 0F, 0, 0);
tessellator.draw();
GL11.glDisable(GL11.GL_BLEND);
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
}
private static int getPulseValue()
{
if (doInc)
{
pulse += 8;
}
else
{
pulse -= 8;
}
if (pulse == 3000)
{
doInc = false;
}
if (pulse == 0)
{
doInc = true;
}
return pulse;
}
@ForgeSubscribe
public void onDrawBlockHighlightEvent(DrawBlockHighlightEvent event)
{
@ -159,55 +208,4 @@ public class DrawBlockHighlightHandler
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glDepthMask(true);
}
public static void renderPulsingQuad(ResourceLocation texture, float maxTransparency)
{
float pulseTransparency = getPulseValue() * maxTransparency / 3000f;
FMLClientHandler.instance().getClient().renderEngine.bindTexture(texture);
Tessellator tessellator = Tessellator.instance;
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
GL11.glColor4f(1, 1, 1, pulseTransparency);
tessellator.startDrawingQuads();
tessellator.setColorRGBA_F(1, 1, 1, pulseTransparency);
tessellator.addVertexWithUV(-0.5D, 0.5D, 0F, 0, 1);
tessellator.addVertexWithUV(0.5D, 0.5D, 0F, 1, 1);
tessellator.addVertexWithUV(0.5D, -0.5D, 0F, 1, 0);
tessellator.addVertexWithUV(-0.5D, -0.5D, 0F, 0, 0);
tessellator.draw();
GL11.glDisable(GL11.GL_BLEND);
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
}
private static int getPulseValue()
{
if (doInc)
{
pulse += 8;
}
else
{
pulse -= 8;
}
if (pulse == 3000)
{
doInc = false;
}
if (pulse == 0)
{
doInc = true;
}
return pulse;
}
}

View file

@ -5,8 +5,6 @@ import com.pahimar.ee3.emc.EmcRegistry;
import com.pahimar.ee3.emc.EmcValue;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraftforge.event.EventPriority;
import net.minecraftforge.event.ForgeSubscribe;
import net.minecraftforge.event.entity.player.ItemTooltipEvent;
import org.lwjgl.input.Keyboard;

View file

@ -6,9 +6,6 @@ import com.pahimar.ee3.lib.Reference;
import com.pahimar.ee3.network.PacketTypeHandler;
import com.pahimar.ee3.network.packet.PacketKeyPressed;
import cpw.mods.fml.client.FMLClientHandler;
import cpw.mods.fml.client.registry.KeyBindingRegistry;
import cpw.mods.fml.common.TickType;
import cpw.mods.fml.common.network.PacketDispatcher;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.settings.KeyBinding;

View file

@ -6,8 +6,6 @@ import com.pahimar.ee3.helper.TransmutationHelper;
import com.pahimar.ee3.item.ITransmutationStone;
import com.pahimar.ee3.lib.Reference;
import cpw.mods.fml.client.FMLClientHandler;
import cpw.mods.fml.common.ITickHandler;
import cpw.mods.fml.common.TickType;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.Minecraft;
@ -32,51 +30,6 @@ import java.util.EnumSet;
public class TransmutationTargetOverlayHandler implements ITickHandler
{
@Override
public void tickStart(EnumSet<TickType> type, Object... tickData)
{
}
@Override
public void tickEnd(EnumSet<TickType> type, Object... tickData)
{
Minecraft minecraft = FMLClientHandler.instance().getClient();
EntityPlayer player = minecraft.thePlayer;
ItemStack currentItemStack;
if (type.contains(TickType.RENDER))
{
if (player != null)
{
currentItemStack = player.inventory.getCurrentItem();
if (Minecraft.isGuiEnabled() && minecraft.inGameHasFocus)
{
if (currentItemStack != null && currentItemStack.getItem() instanceof ITransmutationStone && ConfigurationSettings.ENABLE_OVERLAY_WORLD_TRANSMUTATION)
{
renderStoneHUD(minecraft, player, currentItemStack, (Float) tickData[0]);
}
}
}
}
}
@Override
public EnumSet<TickType> ticks()
{
return EnumSet.of(TickType.CLIENT, TickType.RENDER);
}
@Override
public String getLabel()
{
return Reference.MOD_NAME + ": " + this.getClass().getSimpleName();
}
private static void renderStoneHUD(Minecraft minecraft, EntityPlayer player, ItemStack stack, float partialTicks)
{
@ -157,4 +110,49 @@ public class TransmutationTargetOverlayHandler implements ITickHandler
GL11.glPopMatrix();
GL11.glPopMatrix();
}
@Override
public void tickStart(EnumSet<TickType> type, Object... tickData)
{
}
@Override
public void tickEnd(EnumSet<TickType> type, Object... tickData)
{
Minecraft minecraft = FMLClientHandler.instance().getClient();
EntityPlayer player = minecraft.thePlayer;
ItemStack currentItemStack;
if (type.contains(TickType.RENDER))
{
if (player != null)
{
currentItemStack = player.inventory.getCurrentItem();
if (Minecraft.isGuiEnabled() && minecraft.inGameHasFocus)
{
if (currentItemStack != null && currentItemStack.getItem() instanceof ITransmutationStone && ConfigurationSettings.ENABLE_OVERLAY_WORLD_TRANSMUTATION)
{
renderStoneHUD(minecraft, player, currentItemStack, (Float) tickData[0]);
}
}
}
}
}
@Override
public EnumSet<TickType> ticks()
{
return EnumSet.of(TickType.CLIENT, TickType.RENDER);
}
@Override
public String getLabel()
{
return Reference.MOD_NAME + ": " + this.getClass().getSimpleName();
}
}

View file

@ -8,7 +8,6 @@ import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Icon;
import org.lwjgl.opengl.GL11;
/**

View file

@ -8,7 +8,6 @@ import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.model.ModelChest;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.ForgeDirection;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;

View file

@ -14,7 +14,6 @@ import net.minecraft.entity.item.EntityItem;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.ForgeDirection;
import org.lwjgl.opengl.GL11;
/**

View file

@ -13,7 +13,6 @@ import net.minecraft.entity.item.EntityItem;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.ForgeDirection;
import org.lwjgl.opengl.GL11;
/**

View file

@ -5,7 +5,6 @@ import com.pahimar.ee3.configuration.GeneralConfiguration;
import com.pahimar.ee3.lib.Commands;
import net.minecraft.command.ICommandSender;
import net.minecraft.command.WrongUsageException;
import net.minecraft.util.ChatMessageComponent;
/**
* Equivalent-Exchange-3

View file

@ -5,7 +5,6 @@ import com.pahimar.ee3.configuration.GeneralConfiguration;
import com.pahimar.ee3.lib.Commands;
import net.minecraft.command.ICommandSender;
import net.minecraft.command.WrongUsageException;
import net.minecraft.util.ChatMessageComponent;
/**
* Equivalent-Exchange-3

View file

@ -5,7 +5,6 @@ import com.pahimar.ee3.configuration.GeneralConfiguration;
import com.pahimar.ee3.lib.Commands;
import net.minecraft.command.ICommandSender;
import net.minecraft.command.WrongUsageException;
import net.minecraft.util.ChatMessageComponent;
/**
* Equivalent-Exchange-3

View file

@ -4,7 +4,6 @@ import com.pahimar.ee3.helper.VersionHelper;
import com.pahimar.ee3.lib.Commands;
import net.minecraft.command.ICommandSender;
import net.minecraft.command.WrongUsageException;
import net.minecraft.util.ChatMessageComponent;
/**
* Equivalent-Exchange-3

View file

@ -4,7 +4,6 @@ import com.pahimar.ee3.lib.BlockIds;
import com.pahimar.ee3.lib.Reference;
import com.pahimar.ee3.lib.Strings;
import cpw.mods.fml.common.FMLLog;
import net.minecraftforge.common.Configuration;
import java.io.File;
import java.util.logging.Level;

View file

@ -1,6 +1,6 @@
package com.pahimar.ee3.configuration;
import net.minecraftforge.common.Configuration;
import net.minecraftforge.common.config.Configuration;
import java.io.File;
@ -13,10 +13,8 @@ import java.io.File;
*/
public class ConfigurationHandler
{
public static Configuration configuration;
public static final String CATEGORY_TRANSMUTATION = "transmutation";
public static Configuration configuration;
public static void init(String configPath)
{

View file

@ -3,21 +3,17 @@ package com.pahimar.ee3.configuration;
import com.pahimar.ee3.EquivalentExchange3;
import com.pahimar.ee3.lib.Reference;
import cpw.mods.fml.common.FMLLog;
import net.minecraftforge.common.Configuration;
import net.minecraftforge.common.config.Configuration;
import org.apache.logging.log4j.Level;
import java.io.File;
import java.util.logging.Level;
import static net.minecraftforge.common.Configuration.CATEGORY_GENERAL;
public class GeneralConfiguration
{
private static Configuration generalConfiguration;
public static final String CATEGORY_KEYBIND = "keybindings";
public static final String CATEGORY_GRAPHICS = "graphics";
public static final String CATEGORY_AUDIO = "audio";
private static Configuration generalConfiguration;
protected static void init(File configFile)
{
@ -29,9 +25,9 @@ public class GeneralConfiguration
generalConfiguration.load();
/* Version check */
ConfigurationSettings.DISPLAY_VERSION_RESULT = generalConfiguration.get(CATEGORY_GENERAL, ConfigurationSettings.DISPLAY_VERSION_RESULT_CONFIGNAME, ConfigurationSettings.DISPLAY_VERSION_RESULT_DEFAULT).getBoolean(ConfigurationSettings.DISPLAY_VERSION_RESULT_DEFAULT);
ConfigurationSettings.LAST_DISCOVERED_VERSION = generalConfiguration.get(CATEGORY_GENERAL, ConfigurationSettings.LAST_DISCOVERED_VERSION_CONFIGNAME, ConfigurationSettings.LAST_DISCOVERED_VERSION_DEFAULT).getString();
ConfigurationSettings.LAST_DISCOVERED_VERSION_TYPE = generalConfiguration.get(CATEGORY_GENERAL, ConfigurationSettings.LAST_DISCOVERED_VERSION_TYPE_CONFIGNAME, ConfigurationSettings.LAST_DISCOVERED_VERSION_TYPE_DEFAULT).getString();
ConfigurationSettings.DISPLAY_VERSION_RESULT = generalConfiguration.get(Configuration.CATEGORY_GENERAL, ConfigurationSettings.DISPLAY_VERSION_RESULT_CONFIGNAME, ConfigurationSettings.DISPLAY_VERSION_RESULT_DEFAULT).getBoolean(ConfigurationSettings.DISPLAY_VERSION_RESULT_DEFAULT);
ConfigurationSettings.LAST_DISCOVERED_VERSION = generalConfiguration.get(Configuration.CATEGORY_GENERAL, ConfigurationSettings.LAST_DISCOVERED_VERSION_CONFIGNAME, ConfigurationSettings.LAST_DISCOVERED_VERSION_DEFAULT).getString();
ConfigurationSettings.LAST_DISCOVERED_VERSION_TYPE = generalConfiguration.get(Configuration.CATEGORY_GENERAL, ConfigurationSettings.LAST_DISCOVERED_VERSION_TYPE_CONFIGNAME, ConfigurationSettings.LAST_DISCOVERED_VERSION_TYPE_DEFAULT).getString();
/* Graphics */
ConfigurationSettings.ENABLE_PARTICLE_FX = generalConfiguration.get(CATEGORY_GRAPHICS, ConfigurationSettings.ENABLE_PARTICLE_FX_CONFIGNAME, ConfigurationSettings.ENABLE_PARTICLE_FX_DEFAULT).getBoolean(ConfigurationSettings.ENABLE_PARTICLE_FX_DEFAULT);
@ -76,7 +72,7 @@ public class GeneralConfiguration
}
catch (Exception e)
{
FMLLog.log(Level.SEVERE, e, Reference.MOD_NAME + " has had a problem loading its general configuration");
FMLLog.log(Level.ERROR, e, Reference.MOD_NAME + " has had a problem loading its general configuration");
}
finally
{

View file

@ -4,21 +4,18 @@ 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 net.minecraftforge.common.Configuration;
import net.minecraftforge.common.config.Configuration;
import org.apache.logging.log4j.Level;
import java.io.File;
import java.util.logging.Level;
public class ItemConfiguration
{
private static Configuration itemConfiguration;
private static final String CATEGORY_DURABILITY = "durability";
private static Configuration itemConfiguration;
protected static void init(File configFile)
{
itemConfiguration = new Configuration(configFile);
try
@ -43,7 +40,7 @@ public class ItemConfiguration
}
catch (Exception e)
{
FMLLog.log(Level.SEVERE, e, Reference.MOD_NAME + " has had a problem loading its item configuration");
FMLLog.log(Level.ERROR, e, Reference.MOD_NAME + " has had a problem loading its item configuration");
}
finally
{

View file

@ -2,17 +2,15 @@ package com.pahimar.ee3.configuration;
import com.pahimar.ee3.lib.Reference;
import cpw.mods.fml.common.FMLLog;
import net.minecraftforge.common.Configuration;
import net.minecraftforge.common.config.Configuration;
import org.apache.logging.log4j.Level;
import java.io.File;
import java.util.logging.Level;
public class TransmutationConfiguration
{
private static Configuration transmutationConfiguration;
private static final String CATEGORY_TRANSMUTATION = "transmutation";
private static Configuration transmutationConfiguration;
protected static void init(File configFile)
{
@ -30,7 +28,7 @@ public class TransmutationConfiguration
}
catch (Exception e)
{
FMLLog.log(Level.SEVERE, e, Reference.MOD_NAME + " has had a problem loading its transmutation configuration");
FMLLog.log(Level.ERROR, e, Reference.MOD_NAME + " has had a problem loading its transmutation configuration");
}
finally
{

View file

@ -1,9 +1,8 @@
package com.pahimar.ee3.creativetab;
import com.pahimar.ee3.lib.ItemIds;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import com.pahimar.ee3.lib.Reference;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
/**
* Equivalent-Exchange-3
@ -12,25 +11,14 @@ import net.minecraft.creativetab.CreativeTabs;
*
* @author pahimar
*/
public class CreativeTabEE3 extends CreativeTabs
public class CreativeTabEE3
{
public CreativeTabEE3(int tabID)
public static final CreativeTabs tabEE3 = new CreativeTabs(Reference.MOD_ID)
{
super(tabID, com.pahimar.ee3.lib.Reference.MOD_ID);
}
@Override
@SideOnly(Side.CLIENT)
public int getTabIconItemIndex()
{
return ItemIds.MINIUM_SHARD;
}
@Override
@SideOnly(Side.CLIENT)
public String getTranslatedTabLabel()
{
return "Equivalent Exchange 3";
}
@Override
public Item getTabIconItem()
{
return null;
}
};
}

View file

@ -117,6 +117,86 @@ public class EmcValue implements Comparable<EmcValue>, JsonDeserializer<EmcValue
}
}
/**
* Deserializes an EmcValue object from the given serialized json String
*
* @param jsonEmcValue
* Json encoded String representing a EmcValue object
*
* @return The EmcValue that was encoded as json, or null if a valid EmcValue could not be decoded from given String
*/
@SuppressWarnings("unused")
public static EmcValue createFromJson(String jsonEmcValue)
{
try
{
return gsonSerializer.fromJson(jsonEmcValue, EmcValue.class);
}
catch (JsonSyntaxException exception)
{
LogHelper.error(exception.getMessage());
}
catch (JsonParseException exception)
{
LogHelper.error(exception.getMessage());
}
return null;
}
private static List<EmcComponent> collateComponents(List<EmcComponent> uncollatedComponents)
{
Integer[] componentCount = new Integer[EmcType.TYPES.length];
for (EmcComponent emcComponent : uncollatedComponents)
{
if (componentCount[emcComponent.type.ordinal()] == null)
{
componentCount[emcComponent.type.ordinal()] = 0;
}
if (emcComponent.weight >= 0)
{
componentCount[emcComponent.type.ordinal()] = componentCount[emcComponent.type.ordinal()] + emcComponent.weight;
}
}
List<EmcComponent> collatedComponents = new ArrayList<EmcComponent>();
for (int i = 0; i < EmcType.TYPES.length; i++)
{
if (componentCount[i] != null)
{
collatedComponents.add(new EmcComponent(EmcType.TYPES[i], componentCount[i]));
}
}
Collections.sort(collatedComponents);
return collatedComponents;
}
private static int compareComponents(float[] first, float[] second)
{
if (first.length == EmcType.TYPES.length && second.length == EmcType.TYPES.length)
{
for (EmcType emcType : EmcType.TYPES)
{
if (Float.compare(first[emcType.ordinal()], second[emcType.ordinal()]) != Compare.EQUALS)
{
return Float.compare(first[emcType.ordinal()], second[emcType.ordinal()]);
}
}
return Compare.EQUALS;
}
else
{
throw new ArrayIndexOutOfBoundsException();
}
}
public float getValue()
{
float sumSubValues = 0;
@ -183,33 +263,6 @@ public class EmcValue implements Comparable<EmcValue>, JsonDeserializer<EmcValue
}
}
/**
* Deserializes an EmcValue object from the given serialized json String
*
* @param jsonEmcValue
* Json encoded String representing a EmcValue object
*
* @return The EmcValue that was encoded as json, or null if a valid EmcValue could not be decoded from given String
*/
@SuppressWarnings("unused")
public static EmcValue createFromJson(String jsonEmcValue)
{
try
{
return gsonSerializer.fromJson(jsonEmcValue, EmcValue.class);
}
catch (JsonSyntaxException exception)
{
LogHelper.severe(exception.getMessage());
}
catch (JsonParseException exception)
{
LogHelper.severe(exception.getMessage());
}
return null;
}
/**
* Returns this EmcValue as a json serialized String
*
@ -220,59 +273,6 @@ public class EmcValue implements Comparable<EmcValue>, JsonDeserializer<EmcValue
return gsonSerializer.toJson(this);
}
private static List<EmcComponent> collateComponents(List<EmcComponent> uncollatedComponents)
{
Integer[] componentCount = new Integer[EmcType.TYPES.length];
for (EmcComponent emcComponent : uncollatedComponents)
{
if (componentCount[emcComponent.type.ordinal()] == null)
{
componentCount[emcComponent.type.ordinal()] = 0;
}
if (emcComponent.weight >= 0)
{
componentCount[emcComponent.type.ordinal()] = componentCount[emcComponent.type.ordinal()] + emcComponent.weight;
}
}
List<EmcComponent> collatedComponents = new ArrayList<EmcComponent>();
for (int i = 0; i < EmcType.TYPES.length; i++)
{
if (componentCount[i] != null)
{
collatedComponents.add(new EmcComponent(EmcType.TYPES[i], componentCount[i]));
}
}
Collections.sort(collatedComponents);
return collatedComponents;
}
private static int compareComponents(float[] first, float[] second)
{
if (first.length == EmcType.TYPES.length && second.length == EmcType.TYPES.length)
{
for (EmcType emcType : EmcType.TYPES)
{
if (Float.compare(first[emcType.ordinal()], second[emcType.ordinal()]) != Compare.EQUALS)
{
return Float.compare(first[emcType.ordinal()], second[emcType.ordinal()]);
}
}
return Compare.EQUALS;
}
else
{
throw new ArrayIndexOutOfBoundsException();
}
}
@Override
public JsonElement serialize(EmcValue emcValue, Type type, JsonSerializationContext context)
{
@ -303,7 +303,7 @@ public class EmcValue implements Comparable<EmcValue>, JsonDeserializer<EmcValue
}
catch (UnsupportedOperationException exception)
{
LogHelper.severe(exception.getMessage());
LogHelper.error(exception.getMessage());
}
}
}

View file

@ -3,7 +3,6 @@ package com.pahimar.ee3.event;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import net.minecraftforge.event.Event;
/**
* Equivalent-Exchange-3
@ -15,18 +14,13 @@ import net.minecraftforge.event.Event;
public class ActionEvent extends Event
{
public enum ActionResult
{
SUCCESS, DEFAULT, FAILURE
}
public final byte actionType;
public ItemStack itemStack;
public final EntityPlayer player;
public final World world;
public final int x, y, z;
public final boolean hasActionOccured;
public final String data;
public ItemStack itemStack;
public ActionResult actionResult;
public ActionEvent(byte actionType, ItemStack itemStack, EntityPlayer player, World world, int x, int y, int z, boolean hasActionOccured, String data)
@ -42,4 +36,9 @@ public class ActionEvent extends Event
this.hasActionOccured = hasActionOccured;
this.data = data;
}
public enum ActionResult
{
SUCCESS, DEFAULT, FAILURE
}
}

View file

@ -1,12 +1,8 @@
package com.pahimar.ee3.event;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraftforge.event.Cancelable;
import net.minecraftforge.event.entity.player.PlayerEvent;
import static net.minecraftforge.event.Event.Result.DEFAULT;
import static net.minecraftforge.event.Event.Result.DENY;
/**
* Equivalent-Exchange-3
* <p/>

View file

@ -1,7 +1,6 @@
package com.pahimar.ee3.handler;
import com.pahimar.ee3.event.ActionRequestEvent;
import net.minecraftforge.event.ForgeSubscribe;
/**
* Equivalent-Exchange-3

View file

@ -8,7 +8,6 @@ import com.pahimar.ee3.item.crafting.RecipesTransmutationStones;
import com.pahimar.ee3.item.crafting.RecipesVanilla;
import com.pahimar.ee3.lib.Strings;
import com.pahimar.ee3.recipe.RecipesAludel;
import cpw.mods.fml.common.ICraftingHandler;
import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;

View file

@ -22,12 +22,12 @@ public class GuiHandler implements IGuiHandler
}
else if (ID == GuiIds.CALCINATOR)
{
TileCalcinator tileCalcinator = (TileCalcinator) world.getBlockTileEntity(x, y, z);
TileCalcinator tileCalcinator = (TileCalcinator) world.getTileEntity(x, y, z);
return new ContainerCalcinator(player.inventory, tileCalcinator);
}
else if (ID == GuiIds.ALCHEMICAL_CHEST)
{
TileAlchemicalChest tileAlchemicalChest = (TileAlchemicalChest) world.getBlockTileEntity(x, y, z);
TileAlchemicalChest tileAlchemicalChest = (TileAlchemicalChest) world.getTileEntity(x, y, z);
return new ContainerAlchemicalChest(player.inventory, tileAlchemicalChest);
}
else if (ID == GuiIds.ALCHEMICAL_BAG)
@ -36,12 +36,12 @@ public class GuiHandler implements IGuiHandler
}
else if (ID == GuiIds.ALUDEL)
{
TileAludel tileAludel = (TileAludel) world.getBlockTileEntity(x, y, z);
TileAludel tileAludel = (TileAludel) world.getTileEntity(x, y, z);
return new ContainerAludel(player.inventory, tileAludel);
}
else if (ID == GuiIds.GLASS_BELL)
{
TileGlassBell tileGlassBell = (TileGlassBell) world.getBlockTileEntity(x, y, z);
TileGlassBell tileGlassBell = (TileGlassBell) world.getTileEntity(x, y, z);
return new ContainerGlassBell(player.inventory, tileGlassBell);
}
@ -57,12 +57,12 @@ public class GuiHandler implements IGuiHandler
}
else if (ID == GuiIds.CALCINATOR)
{
TileCalcinator tileCalcinator = (TileCalcinator) world.getBlockTileEntity(x, y, z);
TileCalcinator tileCalcinator = (TileCalcinator) world.getTileEntity(x, y, z);
return new GuiCalcinator(player.inventory, tileCalcinator);
}
else if (ID == GuiIds.ALCHEMICAL_CHEST)
{
TileAlchemicalChest tileAlchemicalChest = (TileAlchemicalChest) world.getBlockTileEntity(x, y, z);
TileAlchemicalChest tileAlchemicalChest = (TileAlchemicalChest) world.getTileEntity(x, y, z);
return new GuiAlchemicalChest(player.inventory, tileAlchemicalChest);
}
else if (ID == GuiIds.ALCHEMICAL_BAG)
@ -71,12 +71,12 @@ public class GuiHandler implements IGuiHandler
}
else if (ID == GuiIds.ALUDEL)
{
TileAludel tileAludel = (TileAludel) world.getBlockTileEntity(x, y, z);
TileAludel tileAludel = (TileAludel) world.getTileEntity(x, y, z);
return new GuiAludel(player.inventory, tileAludel);
}
else if (ID == GuiIds.GLASS_BELL)
{
TileGlassBell tileGlassBell = (TileGlassBell) world.getBlockTileEntity(x, y, z);
TileGlassBell tileGlassBell = (TileGlassBell) world.getTileEntity(x, y, z);
return new GuiGlassBell(player.inventory, tileGlassBell);
}

View file

@ -3,7 +3,6 @@ package com.pahimar.ee3.handler;
import com.pahimar.ee3.helper.ItemStackNBTHelper;
import com.pahimar.ee3.lib.Strings;
import net.minecraft.entity.item.EntityItem;
import net.minecraftforge.event.ForgeSubscribe;
import net.minecraftforge.event.entity.item.ItemTossEvent;
import net.minecraftforge.event.entity.player.EntityItemPickupEvent;
import net.minecraftforge.event.entity.player.PlayerDropsEvent;

View file

@ -5,9 +5,6 @@ import com.pahimar.ee3.configuration.GeneralConfiguration;
import com.pahimar.ee3.helper.VersionHelper;
import com.pahimar.ee3.lib.Reference;
import cpw.mods.fml.client.FMLClientHandler;
import cpw.mods.fml.common.ITickHandler;
import cpw.mods.fml.common.TickType;
import net.minecraftforge.common.Configuration;
import java.util.EnumSet;

View file

@ -1,7 +1,6 @@
package com.pahimar.ee3.handler;
import com.pahimar.ee3.helper.EmcInitializationHelper;
import net.minecraftforge.event.ForgeSubscribe;
import net.minecraftforge.event.world.WorldEvent;
public class WorldEventHandler

View file

@ -14,15 +14,10 @@ import com.pahimar.ee3.network.PacketTypeHandler;
import com.pahimar.ee3.network.packet.PacketItemUpdate;
import com.pahimar.ee3.network.packet.PacketSoundEvent;
import com.pahimar.ee3.network.packet.PacketSpawnParticle;
import cpw.mods.fml.common.network.PacketDispatcher;
import cpw.mods.fml.common.network.Player;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.ForgeDirection;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.Event.Result;
import net.minecraftforge.event.ForgeSubscribe;
/**
* Equivalent-Exchange-3

View file

@ -1,10 +1,8 @@
package com.pahimar.ee3.helper;
import com.pahimar.ee3.lib.Reference;
import cpw.mods.fml.common.FMLLog;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.Logger;
/**
* Equivalent-Exchange-3
@ -15,32 +13,31 @@ import java.util.logging.Logger;
*/
public class LogHelper
{
private static Logger eeLogger = Logger.getLogger(Reference.MOD_ID);
public static void init()
{
eeLogger.setParent(FMLLog.getLogger());
}
private static final Logger EE_LOGGER = FMLLog.getLogger();
public static void log(Level logLevel, Object object)
{
eeLogger.log(logLevel, String.valueOf(object));
EE_LOGGER.log(logLevel, String.valueOf(object));
}
public static void severe(Object object)
public static void all(Object object)
{
log(Level.SEVERE, object);
log(Level.ALL, object);
}
public static void debug(Object object)
{
log(Level.INFO, String.format("[DEBUG] %s", String.valueOf(object)));
log(Level.DEBUG, object);
}
public static void warning(Object object)
public static void error(Object object)
{
log(Level.WARNING, object);
log(Level.ERROR, object);
}
public static void fatal(Object object)
{
log(Level.FATAL, object);
}
public static void info(Object object)
@ -48,23 +45,18 @@ public class LogHelper
log(Level.INFO, object);
}
public static void config(Object object)
public static void off(Object object)
{
log(Level.CONFIG, object);
log(Level.OFF, object);
}
public static void fine(Object object)
public static void trace(Object object)
{
log(Level.FINE, object);
log(Level.TRACE, object);
}
public static void finer(Object object)
public static void warn(Object object)
{
log(Level.FINER, object);
}
public static void finest(Object object)
{
log(Level.FINEST, object);
log(Level.WARN, object);
}
}

View file

@ -7,7 +7,6 @@ import com.pahimar.ee3.lib.Reference;
import com.pahimar.ee3.lib.Strings;
import cpw.mods.fml.common.Loader;
import net.minecraft.util.StatCollector;
import net.minecraftforge.common.Configuration;
import java.io.InputStream;
import java.net.URL;
@ -25,25 +24,21 @@ public class VersionHelper implements Runnable
// TODO Switch how versions are looked up from xml to json (for changelog support)
private static VersionHelper instance = new VersionHelper();
// The (publicly available) remote version number authority file
private static final String REMOTE_VERSION_XML_FILE = "https://raw.github.com/pahimar/Equivalent-Exchange-3/master/version.xml";
public static Properties remoteVersionProperties = new Properties();
// All possible results of the remote version number check
public static final byte UNINITIALIZED = 0;
// Var to hold the result of the remote version check, initially set to uninitialized
private static byte result = UNINITIALIZED;
public static final byte CURRENT = 1;
public static final byte OUTDATED = 2;
public static final byte ERROR = 3;
public static final byte FINAL_ERROR = 4;
public static final byte MC_VERSION_NOT_FOUND = 5;
// Var to hold the result of the remote version check, initially set to uninitialized
private static byte result = UNINITIALIZED;
// The (publicly available) remote version number authority file
private static final String REMOTE_VERSION_XML_FILE = "https://raw.github.com/pahimar/Equivalent-Exchange-3/master/version.xml";
public static Properties remoteVersionProperties = new Properties();
public static String remoteVersion = null;
public static String remoteUpdateLocation = null;
private static VersionHelper instance = new VersionHelper();
/**
* Checks the version of the currently running instance of the mod against the remote version authority, and sets
@ -148,7 +143,7 @@ public class VersionHelper implements Runnable
}
else
{
LogHelper.warning(getResultMessage());
LogHelper.warn(getResultMessage());
}
}
@ -198,6 +193,11 @@ public class VersionHelper implements Runnable
return result;
}
public static void execute()
{
new Thread(instance).start();
}
@Override
public void run()
{
@ -232,9 +232,4 @@ public class VersionHelper implements Runnable
e.printStackTrace();
}
}
public static void execute()
{
new Thread(instance).start();
}
}

View file

@ -1,11 +1,5 @@
package com.pahimar.ee3.imc;
import java.util.EnumSet;
import java.util.List;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import com.google.common.collect.ImmutableList;
import com.google.gson.Gson;
import com.pahimar.ee3.EquivalentExchange3;
@ -18,13 +12,14 @@ import com.pahimar.ee3.emc.EmcValue;
import com.pahimar.ee3.emc.EmcValuesIMC;
import com.pahimar.ee3.lib.Reference;
import com.pahimar.ee3.recipe.RecipesIMC;
import cpw.mods.fml.common.IScheduledTickHandler;
import cpw.mods.fml.common.ITickHandler;
import cpw.mods.fml.common.TickType;
import cpw.mods.fml.common.event.FMLInterModComms;
import cpw.mods.fml.common.event.FMLInterModComms.IMCEvent;
import cpw.mods.fml.common.event.FMLInterModComms.IMCMessage;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import java.util.EnumSet;
import java.util.List;
public class InterModCommsHandler implements ITickHandler, IScheduledTickHandler
{
@ -226,65 +221,65 @@ public class InterModCommsHandler implements ITickHandler, IScheduledTickHandler
// TODO Log that the message payload is of an invalid type
}
}
private static void processSimplePreAssignEmcValueMessage(IMCMessage imcMessage)
{
NBTTagCompound tagCompound = imcMessage.getNBTValue();
if(tagCompound.hasKey("emcValue"))
{
WrappedStack wrappedStack;
EmcValue emcValue = new EmcValue(tagCompound.getFloat("emcValue"));
if(tagCompound.hasKey("itemStack"))
{
wrappedStack = new WrappedStack(ItemStack.loadItemStackFromNBT(tagCompound.getCompoundTag("itemStack")));
}
else if(tagCompound.hasKey("oreName"))
{
wrappedStack = new WrappedStack(new OreStack(tagCompound.getString("oreName")));
}
else
{
// TODO log that the message didn't contain either a itemstack or a ore dictionary name
return;
}
EmcValuesIMC.addPreAssignedValued(wrappedStack, emcValue);
}
else
{
// TODO log that no EMC value was sent in the message
}
NBTTagCompound tagCompound = imcMessage.getNBTValue();
if (tagCompound.hasKey("emcValue"))
{
WrappedStack wrappedStack;
EmcValue emcValue = new EmcValue(tagCompound.getFloat("emcValue"));
if (tagCompound.hasKey("itemStack"))
{
wrappedStack = new WrappedStack(ItemStack.loadItemStackFromNBT(tagCompound.getCompoundTag("itemStack")));
}
else if (tagCompound.hasKey("oreName"))
{
wrappedStack = new WrappedStack(new OreStack(tagCompound.getString("oreName")));
}
else
{
// TODO log that the message didn't contain either a itemstack or a ore dictionary name
return;
}
EmcValuesIMC.addPreAssignedValued(wrappedStack, emcValue);
}
else
{
// TODO log that no EMC value was sent in the message
}
}
private static void processSimplePostAssignEmcValueMessage(IMCMessage imcMessage)
{
NBTTagCompound tagCompound = imcMessage.getNBTValue();
if(tagCompound.hasKey("emcValue"))
{
WrappedStack wrappedStack;
EmcValue emcValue = new EmcValue(tagCompound.getFloat("emcValue"));
if(tagCompound.hasKey("itemStack"))
{
wrappedStack = new WrappedStack(ItemStack.loadItemStackFromNBT(tagCompound.getCompoundTag("itemStack")));
}
else if(tagCompound.hasKey("oreName"))
{
wrappedStack = new WrappedStack(new OreStack(tagCompound.getString("oreName")));
}
else
{
// TODO log that the message didn't contain either a itemstack or a ore dictionary name
return;
}
EmcValuesIMC.addPostAssignedValued(wrappedStack, emcValue);
}
else
{
// TODO log that no EMC value was sent in the message
}
NBTTagCompound tagCompound = imcMessage.getNBTValue();
if (tagCompound.hasKey("emcValue"))
{
WrappedStack wrappedStack;
EmcValue emcValue = new EmcValue(tagCompound.getFloat("emcValue"));
if (tagCompound.hasKey("itemStack"))
{
wrappedStack = new WrappedStack(ItemStack.loadItemStackFromNBT(tagCompound.getCompoundTag("itemStack")));
}
else if (tagCompound.hasKey("oreName"))
{
wrappedStack = new WrappedStack(new OreStack(tagCompound.getString("oreName")));
}
else
{
// TODO log that the message didn't contain either a itemstack or a ore dictionary name
return;
}
EmcValuesIMC.addPostAssignedValued(wrappedStack, emcValue);
}
else
{
// TODO log that no EMC value was sent in the message
}
}
/**

View file

@ -150,13 +150,13 @@ public class InventoryAlchemicalBag implements IInventory, INBTTaggable
}
@Override
public String getInvName()
public String getInventoryName()
{
return this.hasCustomName() ? this.getCustomName() : Strings.CONTAINER_ALCHEMICAL_BAG_NAME;
}
@Override
public boolean isInvNameLocalized()
public boolean hasCustomInventoryName()
{
return true;
}
@ -168,7 +168,7 @@ public class InventoryAlchemicalBag implements IInventory, INBTTaggable
}
@Override
public void onInventoryChanged()
public void markDirty()
{
// NOOP
}
@ -180,13 +180,13 @@ public class InventoryAlchemicalBag implements IInventory, INBTTaggable
}
@Override
public void openChest()
public void openInventory()
{
// NOOP
}
@Override
public void closeChest()
public void closeInventory()
{
// NOOP
}
@ -205,11 +205,11 @@ public class InventoryAlchemicalBag implements IInventory, INBTTaggable
// Read in the ItemStacks in the inventory from NBT
if (nbtTagCompound.hasKey("Items"))
{
NBTTagList tagList = nbtTagCompound.getTagList("Items");
NBTTagList tagList = nbtTagCompound.getTagList("Items", 10);
inventory = new ItemStack[this.getSizeInventory()];
for (int i = 0; i < tagList.tagCount(); ++i)
{
NBTTagCompound tagCompound = (NBTTagCompound) tagList.tagAt(i);
NBTTagCompound tagCompound = tagList.getCompoundTagAt(i);
byte slotIndex = tagCompound.getByte("Slot");
if (slotIndex >= 0 && slotIndex < inventory.length)
{

View file

@ -1,6 +1,5 @@
package com.pahimar.ee3.inventory;
import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.Slot;
@ -23,6 +22,5 @@ public class SlotAludelOutput extends Slot
public void onPickupFromSlot(EntityPlayer entityPlayer, ItemStack itemStack)
{
super.onPickupFromSlot(entityPlayer, itemStack);
GameRegistry.onItemCrafted(entityPlayer, itemStack, inventory);
}
}

View file

@ -1,6 +1,5 @@
package com.pahimar.ee3.inventory;
import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.Slot;
@ -30,6 +29,5 @@ public class SlotCalcinator extends Slot
public void onPickupFromSlot(EntityPlayer entityPlayer, ItemStack itemStack)
{
super.onPickupFromSlot(entityPlayer, itemStack);
GameRegistry.onItemCrafted(entityPlayer, itemStack, inventory);
}
}

View file

@ -8,12 +8,10 @@ import com.pahimar.ee3.lib.GuiIds;
import com.pahimar.ee3.lib.Strings;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.Icon;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;

View file

@ -3,10 +3,8 @@ package com.pahimar.ee3.item;
import com.pahimar.ee3.lib.Strings;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Icon;
import net.minecraft.util.MathHelper;
import java.util.List;

View file

@ -2,6 +2,7 @@ package com.pahimar.ee3.item;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
@ -10,9 +11,9 @@ import java.util.List;
public class ItemBlockAlchemicalChest extends ItemBlock
{
public ItemBlockAlchemicalChest(int id)
public ItemBlockAlchemicalChest(Block block)
{
super(id);
super(block);
this.setHasSubtypes(true);
}

View file

@ -2,7 +2,6 @@ package com.pahimar.ee3.item;
import com.pahimar.ee3.block.ModBlocks;
import com.pahimar.ee3.lib.Strings;
import net.minecraft.item.ItemMultiTextureTile;
public class ItemBlockAlchemicalFuel extends ItemMultiTextureTile
{

View file

@ -4,7 +4,7 @@ import com.pahimar.ee3.EquivalentExchange3;
import com.pahimar.ee3.lib.Strings;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
@ -46,7 +46,7 @@ public class ItemEE extends Item
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IconRegister iconRegister)
public void registerIcons(IIconRegister iconRegister)
{
itemIcon = iconRegister.registerIcon(this.getUnlocalizedName().substring(this.getUnlocalizedName().indexOf(".") + 1));
}

View file

@ -9,12 +9,10 @@ import com.pahimar.ee3.lib.Sounds;
import com.pahimar.ee3.lib.Strings;
import com.pahimar.ee3.network.PacketTypeHandler;
import com.pahimar.ee3.network.packet.PacketSoundEvent;
import cpw.mods.fml.common.network.PacketDispatcher;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.world.World;
/**
@ -43,12 +41,6 @@ public class ItemPhilosophersStone extends ItemEE implements ITransmutationStone
return ItemStackNBTHelper.hasTag(itemStack, Strings.NBT_ITEM_CRAFTING_GUI_OPEN) || ItemStackNBTHelper.hasTag(itemStack, Strings.NBT_ITEM_TRANSMUTATION_GUI_OPEN);
}
@Override
public String getItemDisplayName(ItemStack itemStack)
{
return EnumChatFormatting.YELLOW + super.getItemDisplayName(itemStack);
}
@Override
public boolean doesContainerItemLeaveCraftingGrid(ItemStack itemStack)
{

View file

@ -3,7 +3,6 @@ package com.pahimar.ee3.item;
import com.pahimar.ee3.lib.ItemIds;
import com.pahimar.ee3.lib.Strings;
import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraft.item.ItemMultiTextureTile;
/**
* Equivalent-Exchange-3

View file

@ -34,10 +34,9 @@ public class Reference
// General Mod related constants
public static final String MOD_ID = "EE3";
public static final String CHANNEL_NAME = MOD_ID;
public static final String MOD_NAME = "Equivalent Exchange 3";
public static final String VERSION_NUMBER;
public static final String CHANNEL_NAME = MOD_ID;
public static final String DEPENDENCIES = "required-after:Forge@[9.10.1.849,)";
public static final String FINGERPRINT = "@FINGERPRINT@";
public static final int ONE_SECOND_IN_TICKS = 20;
public static final String SERVER_PROXY_CLASS = "com.pahimar.ee3.proxy.ServerProxy";

View file

@ -1,10 +1,6 @@
package com.pahimar.ee3.network;
import com.pahimar.ee3.network.packet.PacketEE;
import cpw.mods.fml.common.network.IPacketHandler;
import cpw.mods.fml.common.network.Player;
import net.minecraft.network.INetworkManager;
import net.minecraft.network.packet.Packet250CustomPayload;
/**
* Equivalent-Exchange-3

View file

@ -2,8 +2,6 @@ package com.pahimar.ee3.network;
import com.pahimar.ee3.lib.Reference;
import com.pahimar.ee3.network.packet.*;
import net.minecraft.network.packet.Packet;
import net.minecraft.network.packet.Packet250CustomPayload;
import java.io.ByteArrayInputStream;
import java.io.DataInputStream;

View file

@ -1,8 +1,6 @@
package com.pahimar.ee3.network.packet;
import com.pahimar.ee3.network.PacketTypeHandler;
import cpw.mods.fml.common.network.Player;
import net.minecraft.network.INetworkManager;
import java.io.ByteArrayOutputStream;
import java.io.DataInputStream;

View file

@ -2,10 +2,8 @@ package com.pahimar.ee3.network.packet;
import com.pahimar.ee3.lib.ItemUpdateTypes;
import com.pahimar.ee3.network.PacketTypeHandler;
import cpw.mods.fml.common.network.Player;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.network.INetworkManager;
import java.io.DataInputStream;
import java.io.DataOutputStream;

View file

@ -2,9 +2,7 @@ package com.pahimar.ee3.network.packet;
import com.pahimar.ee3.item.IKeyBound;
import com.pahimar.ee3.network.PacketTypeHandler;
import cpw.mods.fml.common.network.Player;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.network.INetworkManager;
import java.io.DataInputStream;
import java.io.DataOutputStream;

View file

@ -2,9 +2,7 @@ package com.pahimar.ee3.network.packet;
import com.pahimar.ee3.handler.WorldTransmutationHandler;
import com.pahimar.ee3.network.PacketTypeHandler;
import cpw.mods.fml.common.network.Player;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.network.INetworkManager;
import java.io.DataInputStream;
import java.io.DataOutputStream;

View file

@ -4,9 +4,7 @@ import com.pahimar.ee3.configuration.ConfigurationSettings;
import com.pahimar.ee3.lib.Commands;
import com.pahimar.ee3.network.PacketTypeHandler;
import cpw.mods.fml.client.FMLClientHandler;
import cpw.mods.fml.common.network.Player;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.network.INetworkManager;
import java.io.DataInputStream;
import java.io.DataOutputStream;

View file

@ -2,9 +2,7 @@ package com.pahimar.ee3.network.packet;
import com.pahimar.ee3.configuration.ConfigurationSettings;
import com.pahimar.ee3.network.PacketTypeHandler;
import cpw.mods.fml.common.network.Player;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.network.INetworkManager;
import java.io.DataInputStream;
import java.io.DataOutputStream;

View file

@ -2,9 +2,6 @@ package com.pahimar.ee3.network.packet;
import com.pahimar.ee3.EquivalentExchange3;
import com.pahimar.ee3.network.PacketTypeHandler;
import cpw.mods.fml.common.network.Player;
import net.minecraft.network.INetworkManager;
import net.minecraftforge.common.ForgeDirection;
import java.io.DataInputStream;
import java.io.DataOutputStream;

View file

@ -2,9 +2,6 @@ package com.pahimar.ee3.network.packet;
import com.pahimar.ee3.EquivalentExchange3;
import com.pahimar.ee3.network.PacketTypeHandler;
import cpw.mods.fml.common.network.Player;
import net.minecraft.network.INetworkManager;
import net.minecraftforge.common.ForgeDirection;
import java.io.DataInputStream;
import java.io.DataOutputStream;

View file

@ -2,9 +2,6 @@ package com.pahimar.ee3.network.packet;
import com.pahimar.ee3.EquivalentExchange3;
import com.pahimar.ee3.network.PacketTypeHandler;
import cpw.mods.fml.common.network.Player;
import net.minecraft.network.INetworkManager;
import net.minecraftforge.common.ForgeDirection;
import java.io.DataInputStream;
import java.io.DataOutputStream;

View file

@ -21,10 +21,7 @@ import com.pahimar.ee3.network.packet.PacketRequestEvent;
import com.pahimar.ee3.tileentity.*;
import cpw.mods.fml.client.FMLClientHandler;
import cpw.mods.fml.client.registry.ClientRegistry;
import cpw.mods.fml.client.registry.KeyBindingRegistry;
import cpw.mods.fml.client.registry.RenderingRegistry;
import cpw.mods.fml.common.network.PacketDispatcher;
import cpw.mods.fml.common.registry.TickRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.entity.player.EntityPlayer;
@ -32,7 +29,6 @@ import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import net.minecraftforge.client.MinecraftForgeClient;
import net.minecraftforge.common.ForgeDirection;
import net.minecraftforge.common.MinecraftForge;
/**

View file

@ -3,7 +3,6 @@ package com.pahimar.ee3.proxy;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import net.minecraftforge.common.ForgeDirection;
public interface IProxy
{

View file

@ -3,7 +3,6 @@ package com.pahimar.ee3.proxy;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import net.minecraftforge.common.ForgeDirection;
/**
* Equivalent-Exchange-3

View file

@ -1,6 +1,6 @@
package com.pahimar.ee3.tileentity;
import com.pahimar.ee3.block.ModBlocks;
import com.pahimar.ee3.block.BlockAlchemicalChest;
import com.pahimar.ee3.inventory.ContainerAlchemicalChest;
import com.pahimar.ee3.lib.Sounds;
import com.pahimar.ee3.lib.Strings;
@ -123,11 +123,11 @@ public class TileAlchemicalChest extends TileEE implements IInventory
itemStack.stackSize = this.getInventoryStackLimit();
}
this.onInventoryChanged();
this.markDirty();
}
@Override
public String getInvName()
public String getInventoryName()
{
return this.hasCustomName() ? this.getCustomName() : Strings.CONTAINER_ALCHEMICAL_CHEST_NAME;
}
@ -167,17 +167,27 @@ public class TileAlchemicalChest extends TileEE implements IInventory
}
@Override
public void openChest()
public void openInventory()
{
++numUsingPlayers;
worldObj.addBlockEvent(xCoord, yCoord, zCoord, ModBlocks.alchemicalChest.blockID, 1, numUsingPlayers);
if (this.numUsingPlayers < 0)
{
this.numUsingPlayers = 0;
}
++this.numUsingPlayers;
this.worldObj.addBlockEvent(xCoord, yCoord, zCoord, this.getBlockType(), 1, numUsingPlayers);
this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord, this.zCoord, this.getBlockType());
}
@Override
public void closeChest()
public void closeInventory()
{
--numUsingPlayers;
worldObj.addBlockEvent(xCoord, yCoord, zCoord, ModBlocks.alchemicalChest.blockID, 1, numUsingPlayers);
if (this.getBlockType() instanceof BlockAlchemicalChest)
{
--this.numUsingPlayers;
this.worldObj.addBlockEvent(xCoord, yCoord, zCoord, this.getBlockType(), 1, numUsingPlayers);
this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord, this.zCoord, this.getBlockType());
}
}
/**
@ -191,7 +201,7 @@ public class TileAlchemicalChest extends TileEE implements IInventory
if (++ticksSinceSync % 20 * 4 == 0)
{
worldObj.addBlockEvent(xCoord, yCoord, zCoord, ModBlocks.alchemicalChest.blockID, 1, numUsingPlayers);
worldObj.addBlockEvent(xCoord, yCoord, zCoord, this.getBlockType(), 1, numUsingPlayers);
}
prevLidAngle = lidAngle;
@ -243,11 +253,11 @@ public class TileAlchemicalChest extends TileEE implements IInventory
super.readFromNBT(nbtTagCompound);
// Read in the ItemStacks in the inventory from NBT
NBTTagList tagList = nbtTagCompound.getTagList("Items");
NBTTagList tagList = nbtTagCompound.getTagList("Items", 10);
inventory = new ItemStack[this.getSizeInventory()];
for (int i = 0; i < tagList.tagCount(); ++i)
{
NBTTagCompound tagCompound = (NBTTagCompound) tagList.tagAt(i);
NBTTagCompound tagCompound = tagList.getCompoundTagAt(i);
byte slotIndex = tagCompound.getByte("Slot");
if (slotIndex >= 0 && slotIndex < inventory.length)
{
@ -277,7 +287,7 @@ public class TileAlchemicalChest extends TileEE implements IInventory
}
@Override
public boolean isInvNameLocalized()
public boolean hasCustomInventoryName()
{
return this.hasCustomName();
}

View file

@ -6,9 +6,8 @@ import net.minecraft.item.ItemStack;
public class TileAlchemySquare extends TileEE implements IInventory
{
private ItemStack[] inventory;
public static final int INVENTORY_SIZE = 8;
private ItemStack[] inventory;
public TileAlchemySquare()
{
@ -76,7 +75,7 @@ public class TileAlchemySquare extends TileEE implements IInventory
* Returns the name of the inventory.
*/
@Override
public String getInvName()
public String getInventoryName()
{
return null;
}
@ -86,7 +85,7 @@ public class TileAlchemySquare extends TileEE implements IInventory
* language. Otherwise it will be used directly.
*/
@Override
public boolean isInvNameLocalized()
public boolean hasCustomInventoryName()
{
return false;
}
@ -113,13 +112,13 @@ public class TileAlchemySquare extends TileEE implements IInventory
}
@Override
public void openChest()
public void openInventory()
{
// NOOP
}
@Override
public void closeChest()
public void closeInventory()
{
// NOOP
}

View file

@ -7,7 +7,6 @@ import com.pahimar.ee3.lib.Strings;
import com.pahimar.ee3.network.PacketTypeHandler;
import com.pahimar.ee3.network.packet.PacketTileWithItemUpdate;
import com.pahimar.ee3.recipe.RecipesAludel;
import cpw.mods.fml.common.network.PacketDispatcher;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.entity.player.EntityPlayer;
@ -15,9 +14,9 @@ import net.minecraft.inventory.ISidedInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.network.packet.Packet;
import net.minecraft.network.Packet;
import net.minecraft.tileentity.TileEntityFurnace;
import net.minecraftforge.common.ForgeDirection;
import net.minecraftforge.common.util.ForgeDirection;
/**
* Equivalent-Exchange-3
@ -28,25 +27,20 @@ import net.minecraftforge.common.ForgeDirection;
*/
public class TileAludel extends TileEE implements ISidedInventory
{
/**
* The ItemStacks that hold the items currently being used in the Aludel
*/
private ItemStack[] inventory;
public static final int INVENTORY_SIZE = 4;
public static final int FUEL_INVENTORY_INDEX = 0;
public static final int INPUT_INVENTORY_INDEX = 1;
public static final int DUST_INVENTORY_INDEX = 2;
public static final int OUTPUT_INVENTORY_INDEX = 3;
public int deviceCookTime; // How much longer the Aludel will cook
public int fuelBurnTime; // The fuel value for the currently burning fuel
public int itemCookTime; // How long the current item has been "cooking"
public ItemStack outputItemStack;
public boolean hasGlassBell = false;
/**
* The ItemStacks that hold the items currently being used in the Aludel
*/
private ItemStack[] inventory;
public TileAludel()
{
@ -110,7 +104,7 @@ public class TileAludel extends TileEE implements ISidedInventory
}
@Override
public String getInvName()
public String getInventoryName()
{
return this.hasCustomName() ? this.getCustomName() : Strings.CONTAINER_ALUDEL_NAME;
}
@ -137,13 +131,13 @@ public class TileAludel extends TileEE implements ISidedInventory
}
@Override
public void openChest()
public void openInventory()
{
// NOOP
}
@Override
public void closeChest()
public void closeInventory()
{
// NOOP
}
@ -154,11 +148,11 @@ public class TileAludel extends TileEE implements ISidedInventory
super.readFromNBT(nbtTagCompound);
// Read in the ItemStacks in the inventory from NBT
NBTTagList tagList = nbtTagCompound.getTagList("Items");
NBTTagList tagList = nbtTagCompound.getTagList("Items", 10);
inventory = new ItemStack[this.getSizeInventory()];
for (int i = 0; i < tagList.tagCount(); ++i)
{
NBTTagCompound tagCompound = (NBTTagCompound) tagList.tagAt(i);
NBTTagCompound tagCompound = tagList.getCompoundTagAt(i);
byte slotIndex = tagCompound.getByte("Slot");
if (slotIndex >= 0 && slotIndex < inventory.length)
{
@ -197,7 +191,7 @@ public class TileAludel extends TileEE implements ISidedInventory
}
@Override
public boolean isInvNameLocalized()
public boolean hasCustomInventoryName()
{
return this.hasCustomName();
}
@ -381,7 +375,7 @@ public class TileAludel extends TileEE implements ISidedInventory
}
@Override
public void onInventoryChanged()
public void markDirty()
{
PacketDispatcher.sendPacketToAllAround(this.xCoord, this.yCoord, this.zCoord, 128D, this.worldObj.provider.dimensionId, getDescriptionPacket());
@ -456,7 +450,7 @@ public class TileAludel extends TileEE implements ISidedInventory
@Override
public boolean canInsertItem(int slotIndex, ItemStack itemStack, int side)
{
if (worldObj.getBlockTileEntity(xCoord, yCoord + 1, zCoord) instanceof TileGlassBell)
if (worldObj.getTileEntity(xCoord, yCoord + 1, zCoord) instanceof TileGlassBell)
{
return isItemValidForSlot(slotIndex, itemStack);
}

View file

@ -1,8 +1,6 @@
package com.pahimar.ee3.tileentity;
import com.pahimar.ee3.lib.Strings;
import com.pahimar.ee3.network.PacketTypeHandler;
import com.pahimar.ee3.network.packet.PacketTileCalcinator;
import com.pahimar.ee3.recipe.CalcinationManager;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@ -12,10 +10,10 @@ import net.minecraft.inventory.ISidedInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.network.packet.Packet;
import net.minecraft.network.Packet;
import net.minecraft.tileentity.TileEntityFurnace;
import net.minecraft.tileentity.TileEntityHopper;
import net.minecraftforge.common.ForgeDirection;
import net.minecraftforge.common.util.ForgeDirection;
/**
* Equivalent-Exchange-3
@ -26,18 +24,12 @@ import net.minecraftforge.common.ForgeDirection;
*/
public class TileCalcinator extends TileEE implements ISidedInventory
{
/**
* The ItemStacks that hold the items currently being used in the Calcinator
*/
private ItemStack[] inventory;
public static final int INVENTORY_SIZE = 4;
public static final int FUEL_INVENTORY_INDEX = 0;
public static final int INPUT_INVENTORY_INDEX = 1;
public static final int OUTPUT_LEFT_INVENTORY_INDEX = 2;
public static final int OUTPUT_RIGHT_INVENTORY_INDEX = 3;
private static final int DEFAULT_ITEM_SUCK_COOL_DOWN = 20;
public int deviceCookTime; // How much longer the Calcinator will cook
public int fuelBurnTime; // The fuel value for the currently burning fuel
public int itemCookTime; // How long the current item has been "cooking"
@ -45,13 +37,28 @@ public class TileCalcinator extends TileEE implements ISidedInventory
public byte leftStackSize, leftStackMeta, rightStackSize, rightStackMeta;
public int itemSuckCoolDown = 0;
private static final int DEFAULT_ITEM_SUCK_COOL_DOWN = 20;
/**
* The ItemStacks that hold the items currently being used in the Calcinator
*/
private ItemStack[] inventory;
public TileCalcinator()
{
inventory = new ItemStack[INVENTORY_SIZE];
}
/**
* Sucks one item into the given hopper from an inventory or EntityItem above it.
*/
public static boolean suckItemsIntoCalcinator(TileCalcinator calcinator)
{
// EntityItem entityitem = TileEntityHopper.getEntityAbove(calcinator.getWorldObj(), calcinator.xCoord, calcinator.yCoord + 1.0D, calcinator.zCoord);
EntityItem entityitem = TileEntityHopper.func_145897_a(calcinator.getWorldObj(), calcinator.xCoord, calcinator.yCoord + 1.0D, calcinator.zCoord);
// return entityitem != null && TileEntityHopper.insertStackFromEntity(calcinator, entityitem);
return entityitem != null && TileEntityHopper.func_145898_a(calcinator, entityitem);
}
/**
* Returns the number of slots in the inventory.
*/
@ -116,7 +123,7 @@ public class TileCalcinator extends TileEE implements ISidedInventory
}
@Override
public String getInvName()
public String getInventoryName()
{
return this.hasCustomName() ? this.getCustomName() : Strings.CONTAINER_CALCINATOR_NAME;
}
@ -174,13 +181,13 @@ public class TileCalcinator extends TileEE implements ISidedInventory
}
@Override
public void openChest()
public void openInventory()
{
}
@Override
public void closeChest()
public void closeInventory()
{
}
@ -191,11 +198,11 @@ public class TileCalcinator extends TileEE implements ISidedInventory
super.readFromNBT(nbtTagCompound);
// Read in the ItemStacks in the inventory from NBT
NBTTagList tagList = nbtTagCompound.getTagList("Items");
NBTTagList tagList = nbtTagCompound.getTagList("Items", 10);
inventory = new ItemStack[this.getSizeInventory()];
for (int i = 0; i < tagList.tagCount(); ++i)
{
NBTTagCompound tagCompound = (NBTTagCompound) tagList.tagAt(i);
NBTTagCompound tagCompound = tagList.getCompoundTagAt(i);
byte slotIndex = tagCompound.getByte("Slot");
if (slotIndex >= 0 && slotIndex < inventory.length)
{
@ -234,7 +241,7 @@ public class TileCalcinator extends TileEE implements ISidedInventory
}
@Override
public boolean isInvNameLocalized()
public boolean hasCustomInventoryName()
{
return this.hasCustomName();
}
@ -326,7 +333,7 @@ public class TileCalcinator extends TileEE implements ISidedInventory
{
if (suckItemsIntoCalcinator(this))
{
onInventoryChanged();
markDirty();
}
itemSuckCoolDown = DEFAULT_ITEM_SUCK_COOL_DOWN;
}
@ -334,11 +341,11 @@ public class TileCalcinator extends TileEE implements ISidedInventory
if (sendUpdate)
{
this.onInventoryChanged();
this.markDirty();
this.state = this.deviceCookTime > 0 ? (byte) 1 : (byte) 0;
this.worldObj.addBlockEvent(this.xCoord, this.yCoord, this.zCoord, this.getBlockType().blockID, 1, this.state);
this.worldObj.addBlockEvent(this.xCoord, this.yCoord, this.zCoord, this.getBlockType(), 1, this.state);
sendDustPileData();
this.worldObj.notifyBlockChange(this.xCoord, this.yCoord, this.zCoord, this.getBlockType().blockID);
this.worldObj.notifyBlockChange(this.xCoord, this.yCoord, this.zCoord, this.getBlockType());
}
}
@ -463,20 +470,12 @@ public class TileCalcinator extends TileEE implements ISidedInventory
}
}
/**
* Sucks one item into the given hopper from an inventory or EntityItem above it.
*/
public static boolean suckItemsIntoCalcinator(TileCalcinator calcinator)
{
EntityItem entityitem = TileEntityHopper.getEntityAbove(calcinator.getWorldObj(), calcinator.xCoord, calcinator.yCoord + 1.0D, calcinator.zCoord);
return entityitem != null && TileEntityHopper.insertStackFromEntity(calcinator, entityitem);
}
@Override
public Packet getDescriptionPacket()
{
return PacketTypeHandler.populatePacket(new PacketTileCalcinator(xCoord, yCoord, zCoord, orientation, state, customName, (byte) getLeftStackSize(), (byte) getLeftStackMeta(), (byte) getRightStackSize(), (byte) getRightStackMeta()));
// return PacketTypeHandler.populatePacket(new PacketTileCalcinator(xCoord, yCoord, zCoord, orientation, state, customName, (byte) getLeftStackSize(), (byte) getLeftStackMeta(), (byte) getRightStackSize(), (byte) getRightStackMeta()));
// FIXME
return null;
}
private int getLeftStackSize()
@ -523,10 +522,10 @@ public class TileCalcinator extends TileEE implements ISidedInventory
{
if (this.getBlockType() != null)
{
this.worldObj.addBlockEvent(this.xCoord, this.yCoord, this.zCoord, this.getBlockType().blockID, 2, getLeftStackSize());
this.worldObj.addBlockEvent(this.xCoord, this.yCoord, this.zCoord, this.getBlockType().blockID, 3, getLeftStackMeta());
this.worldObj.addBlockEvent(this.xCoord, this.yCoord, this.zCoord, this.getBlockType().blockID, 4, getRightStackSize());
this.worldObj.addBlockEvent(this.xCoord, this.yCoord, this.zCoord, this.getBlockType().blockID, 5, getRightStackMeta());
this.worldObj.addBlockEvent(this.xCoord, this.yCoord, this.zCoord, this.getBlockType(), 2, getLeftStackSize());
this.worldObj.addBlockEvent(this.xCoord, this.yCoord, this.zCoord, this.getBlockType(), 3, getLeftStackMeta());
this.worldObj.addBlockEvent(this.xCoord, this.yCoord, this.zCoord, this.getBlockType(), 4, getRightStackSize());
this.worldObj.addBlockEvent(this.xCoord, this.yCoord, this.zCoord, this.getBlockType(), 5, getRightStackMeta());
}
}

View file

@ -1,12 +1,10 @@
package com.pahimar.ee3.tileentity;
import com.pahimar.ee3.lib.Strings;
import com.pahimar.ee3.network.PacketTypeHandler;
import com.pahimar.ee3.network.packet.PacketTileUpdate;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.network.packet.Packet;
import net.minecraft.network.Packet;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.ForgeDirection;
import net.minecraftforge.common.util.ForgeDirection;
/**
* Equivalent-Exchange-3
@ -30,30 +28,26 @@ public class TileEE extends TileEntity
public ForgeDirection getOrientation()
{
return orientation;
}
public void setOrientation(ForgeDirection orientation)
{
this.orientation = orientation;
}
public void setOrientation(int orientation)
{
this.orientation = ForgeDirection.getOrientation(orientation);
}
public void setOrientation(ForgeDirection orientation)
{
this.orientation = orientation;
}
public short getState()
{
return state;
}
public void setState(byte state)
{
this.state = state;
}
@ -64,13 +58,11 @@ public class TileEE extends TileEntity
public String getCustomName()
{
return customName;
}
public void setCustomName(String customName)
{
this.customName = customName;
}
@ -112,12 +104,9 @@ public class TileEE extends TileEntity
@Override
public Packet getDescriptionPacket()
{
return PacketTypeHandler.populatePacket(new PacketTileUpdate(xCoord, yCoord, zCoord, orientation, state, customName));
}
// return PacketTypeHandler.populatePacket(new PacketTileUpdate(xCoord, yCoord, zCoord, orientation, state, customName));
@Override
public String toString()
{
return String.format("TileEE Data - Class: %s, xCoord: %d, yCoord: %d, zCoord: %d, customName: '%s', orientation: %s, state: %d\n", this.getClass().getSimpleName(), xCoord, yCoord, zCoord, customName, orientation, state);
// FIXME Send proper packets
return null;
}
}

View file

@ -4,32 +4,27 @@ import com.pahimar.ee3.helper.ItemHelper;
import com.pahimar.ee3.lib.Strings;
import com.pahimar.ee3.network.PacketTypeHandler;
import com.pahimar.ee3.network.packet.PacketTileWithItemUpdate;
import cpw.mods.fml.common.network.PacketDispatcher;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.network.packet.Packet;
import net.minecraft.network.Packet;
public class TileGlassBell extends TileEE implements IInventory
{
public static final int INVENTORY_SIZE = 1;
public static final int DISPLAY_SLOT_INVENTORY_INDEX = 0;
public ItemStack outputItemStack;
/**
* Server sync counter (once per 20 ticks)
*/
private int ticksSinceSync;
/**
* The ItemStacks that hold the items currently being used in the Glass Bell
*/
private ItemStack[] inventory;
public static final int INVENTORY_SIZE = 1;
public static final int DISPLAY_SLOT_INVENTORY_INDEX = 0;
public ItemStack outputItemStack;
public TileGlassBell()
{
inventory = new ItemStack[INVENTORY_SIZE];
@ -92,7 +87,7 @@ public class TileGlassBell extends TileEE implements IInventory
}
@Override
public String getInvName()
public String getInventoryName()
{
return this.hasCustomName() ? this.getCustomName() : Strings.CONTAINER_GLASS_BELL_NAME;
}
@ -104,13 +99,13 @@ public class TileGlassBell extends TileEE implements IInventory
}
@Override
public void openChest()
public void openInventory()
{
}
@Override
public void closeChest()
public void closeInventory()
{
}
@ -121,11 +116,11 @@ public class TileGlassBell extends TileEE implements IInventory
super.readFromNBT(nbtTagCompound);
// Read in the ItemStacks in the inventory from NBT
NBTTagList tagList = nbtTagCompound.getTagList("Items");
NBTTagList tagList = nbtTagCompound.getTagList("Items", 10);
inventory = new ItemStack[this.getSizeInventory()];
for (int i = 0; i < tagList.tagCount(); ++i)
{
NBTTagCompound tagCompound = (NBTTagCompound) tagList.tagAt(i);
NBTTagCompound tagCompound = tagList.getCompoundTagAt(i);
byte slotIndex = tagCompound.getByte("Slot");
if (slotIndex >= 0 && slotIndex < inventory.length)
{
@ -155,7 +150,7 @@ public class TileGlassBell extends TileEE implements IInventory
}
@Override
public boolean isInvNameLocalized()
public boolean hasCustomInventoryName()
{
return this.hasCustomName();
}
@ -197,7 +192,7 @@ public class TileGlassBell extends TileEE implements IInventory
}
@Override
public void onInventoryChanged()
public void markDirty()
{
worldObj.updateAllLightTypes(xCoord, yCoord, zCoord);
}

View file

@ -68,7 +68,7 @@ public class TileResearchStation extends TileEE implements IInventory
* Returns the name of the inventory.
*/
@Override
public String getInvName()
public String getInventoryName()
{
return null;
}
@ -78,7 +78,7 @@ public class TileResearchStation extends TileEE implements IInventory
* language. Otherwise it will be used directly.
*/
@Override
public boolean isInvNameLocalized()
public boolean hasCustomInventoryName()
{
return false;
}
@ -105,13 +105,13 @@ public class TileResearchStation extends TileEE implements IInventory
}
@Override
public void openChest()
public void openInventory()
{
}
@Override
public void closeChest()
public void closeInventory()
{
}