Moved interfaces around

Added learnable/recoverable variables to the EMC mappings
Renamed the PStone recipes
This commit is contained in:
pahimar 2012-05-04 06:55:48 -04:00
parent f18d562885
commit f4880dd5e1
15 changed files with 147 additions and 90 deletions

View file

@ -7,7 +7,7 @@ import net.minecraft.src.EntityPlayer;
import net.minecraft.src.ModLoader;
import net.minecraft.src.NetworkManager;
import net.minecraft.src.World;
import net.minecraft.src.ee3.core.IProxy;
import net.minecraft.src.ee3.interfaces.IProxy;
import net.minecraft.src.forge.MinecraftForgeClient;
public class EEProxy implements IProxy {

View file

@ -4,17 +4,23 @@ public class EMCMapping {
private float cost;
private float recovery;
private boolean learnable;
private boolean recoverable;
public EMCMapping() { }
public EMCMapping(float cost) {
this.cost = cost;
recovery = cost;
learnable = true;
recoverable = true;
}
public EMCMapping(float cost, float recovery) {
public EMCMapping(float cost, float recovery, boolean learnable, boolean recoverable) {
this.cost = cost;
this.recovery = recovery;
this.learnable = learnable;
this.recoverable = recoverable;
}
public float getCostEMC() {
@ -25,6 +31,14 @@ public class EMCMapping {
return recovery;
}
public boolean isLearnable() {
return learnable;
}
public boolean isRecoverable() {
return recoverable;
}
public void setCostEMC(float cost) {
this.cost = cost;
}
@ -32,4 +46,12 @@ public class EMCMapping {
public void setRecoveryEMC(float recovery) {
this.recovery = recovery;
}
public void setLearnable(boolean learnable) {
this.learnable = learnable;
}
public void setRecoverable(boolean recoverable) {
this.recoverable = recoverable;
}
}

View file

@ -1,5 +0,0 @@
package net.minecraft.src.ee3.core;
public interface IItemModal {
}

View file

@ -1,22 +1,22 @@
package net.minecraft.src.ee3.core;
public class PStoneRecipes {
public void init() {
// X dirt == X cobblestone == X stone == X sand
// X gravel == X sandstone
// X rose == X dandelion == X indigo flower (RP2)
// X sapling == X birch sapling == X pine sapling == X jungle sapling
// X wood == X birch wood == X pine wood == X jungle wood
// X wood plank == X birch wood plank == X pine wood plank == X jungle wood plank
// X wool == X wool (next meta colour)
/* Cobblestone to diamond recipe path */
// X cobblestone == X/4 gravel
// X gravel == X/8 wood
// X wood == X/2 obsidian
// X obsidian == X/4 iron ingot
// X iron ingot == X/8 gold ingot
// X gold ingot == X/4 diamond
/* Therefore, 8192 cobblestone == 2048 gravel == 256 wood == 128 obsidian == 32 iron ingot == 4 gold ingot == 1 diamond */
}
}
package net.minecraft.src.ee3.core;
public class RecipesPhilStone {
public void init() {
// X dirt == X cobblestone == X stone == X sand
// X gravel == X sandstone
// X rose == X dandelion == X indigo flower (RP2)
// X sapling == X birch sapling == X pine sapling == X jungle sapling
// X wood == X birch wood == X pine wood == X jungle wood
// X wood plank == X birch wood plank == X pine wood plank == X jungle wood plank
// X wool == X wool (next meta colour)
/* Cobblestone to diamond recipe path */
// X cobblestone == X/4 gravel
// X gravel == X/8 wood
// X wood == X/2 obsidian
// X obsidian == X/4 iron ingot
// X iron ingot == X/8 gold ingot
// X gold ingot == X/4 diamond
/* Therefore, 8192 cobblestone == 2048 gravel == 256 wood == 128 obsidian == 32 iron ingot == 4 gold ingot == 1 diamond */
}
}

View file

@ -1,6 +1,7 @@
package net.minecraft.src.ee3.core;
import net.minecraft.src.ModLoader;
import net.minecraft.src.ee3.interfaces.IProxy;
import net.minecraft.src.ee3.lib.Reference;
import net.minecraft.src.forge.MinecraftForge;

View file

@ -1,10 +1,10 @@
package net.minecraft.src.ee3.core;
public interface IItemChargeable {
public abstract int getMaxCharge();
public abstract void increaseCharge();
public abstract void decreaseCharge();
}
package net.minecraft.src.ee3.interfaces;
public interface IItemChargeable {
public abstract int getMaxCharge();
public abstract void increaseCharge();
public abstract void decreaseCharge();
}

View file

@ -0,0 +1,5 @@
package net.minecraft.src.ee3.interfaces;
public interface IItemModal {
}

View file

@ -1,37 +1,37 @@
package net.minecraft.src.ee3.core;
import java.io.File;
import net.minecraft.src.EntityPlayer;
import net.minecraft.src.NetworkManager;
import net.minecraft.src.World;
import net.minecraft.src.forge.IGuiHandler;
public interface IProxy {
public abstract void registerRenderInformation();
public abstract void registerTileEntities();
public abstract void registerTranslations();
public abstract File getMinecraftDir();
public abstract boolean isRemote();
public abstract World getCurrentWorld();
public abstract String getMinecraftVersion();
public abstract void registerSoundHandler();
public abstract void handleControl(NetworkManager network, int key);
public abstract void handlePedestalPacket(int x, int y, int z, int itemId, boolean activated);
public abstract void handleTEPacket(int x, int y, int z, byte direction, String player);
public abstract Object handleGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z);
public abstract void playSound(String soundName, float x, float y, float z, float volume, float pitch);
}
package net.minecraft.src.ee3.interfaces;
import java.io.File;
import net.minecraft.src.EntityPlayer;
import net.minecraft.src.NetworkManager;
import net.minecraft.src.World;
import net.minecraft.src.forge.IGuiHandler;
public interface IProxy {
public abstract void registerRenderInformation();
public abstract void registerTileEntities();
public abstract void registerTranslations();
public abstract File getMinecraftDir();
public abstract boolean isRemote();
public abstract World getCurrentWorld();
public abstract String getMinecraftVersion();
public abstract void registerSoundHandler();
public abstract void handleControl(NetworkManager network, int key);
public abstract void handlePedestalPacket(int x, int y, int z, int itemId, boolean activated);
public abstract void handleTEPacket(int x, int y, int z, byte direction, String player);
public abstract Object handleGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z);
public abstract void playSound(String soundName, float x, float y, float z, float volume, float pitch);
}

View file

@ -1,11 +0,0 @@
package net.minecraft.src.ee3.item;
public class ItemChargeable extends ItemMod {
private int maxCharge;
public ItemChargeable(int i, int j) {
super(i);
maxCharge = j;
}
}

View file

@ -0,0 +1,8 @@
package net.minecraft.src.ee3.item;
public class ItemEE extends ItemMod {
public ItemEE(int i) {
super(i);
}
}

View file

@ -0,0 +1,10 @@
package net.minecraft.src.ee3.item;
public class ItemEEStackable extends ItemMod {
public ItemEEStackable(int i) {
super(i);
maxStackSize = 64;
}
}

View file

@ -14,7 +14,6 @@ public class ItemMod extends Item implements ITextureProvider {
@Override
public String getTextureFile() {
// TODO Proper location
return Reference.SPRITE_SHEET_LOCATION + Reference.ITEM_SPRITE_SHEET;
}

View file

@ -0,0 +1,28 @@
package net.minecraft.src.ee3.item;
import net.minecraft.src.ee3.interfaces.IItemChargeable;
import net.minecraft.src.ee3.interfaces.IItemModal;
public class ItemPhilosopherStone extends ItemEE implements IItemChargeable, IItemModal {
private int maxCharge;
public ItemPhilosopherStone(int i) {
super(i);
maxCharge = 4;
}
@Override
public int getMaxCharge() {
return maxCharge;
}
@Override
public void increaseCharge() {
}
@Override
public void decreaseCharge() {
}
}

View file

@ -2,10 +2,10 @@ package net.minecraft.src;
import net.minecraft.src.ModLoader;
import net.minecraft.src.ee3.core.ConfigurationManager;
import net.minecraft.src.ee3.core.IProxy;
import net.minecraft.src.ee3.core.ServerClientProxy;
import net.minecraft.src.ee3.core.Version;
import net.minecraft.src.ee3.gui.GuiHandler;
import net.minecraft.src.ee3.interfaces.IProxy;
import net.minecraft.src.ee3.lib.Reference;
import net.minecraft.src.ee3.lib.Sounds;
import net.minecraft.src.ee3.network.PacketHandler;

View file

@ -6,7 +6,7 @@ import net.minecraft.src.EntityPlayer;
import net.minecraft.src.ModLoader;
import net.minecraft.src.NetworkManager;
import net.minecraft.src.World;
import net.minecraft.src.ee3.core.IProxy;
import net.minecraft.src.ee3.interfaces.IProxy;
public class EEProxy implements IProxy {