Code formatting (noticed some ugly tabbing + whitespace mix up in last commit), support for custom item rarities added back in
This commit is contained in:
parent
510a3b3cd0
commit
322775d5e7
|
@ -1,5 +1,7 @@
|
|||
package ee3.client.core;
|
||||
|
||||
import net.minecraft.src.EnumRarity;
|
||||
import net.minecraftforge.client.EnumHelperClient;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import cpw.mods.fml.client.registry.KeyBindingRegistry;
|
||||
|
@ -8,37 +10,56 @@ import ee3.client.core.handlers.SoundHandler;
|
|||
import ee3.client.lib.KeyBindings;
|
||||
import ee3.common.core.CommonProxy;
|
||||
import ee3.common.lib.Reference;
|
||||
import static ee3.common.lib.CustomItemRarity.*;
|
||||
|
||||
/**
|
||||
* ClientProxy
|
||||
*
|
||||
* Client specific functionality that cannot be put into CommonProxy
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
* ClientProxy
|
||||
*
|
||||
* Client specific functionality that cannot be put into CommonProxy
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
public class ClientProxy extends CommonProxy {
|
||||
|
||||
@Override
|
||||
public void registerKeyBindingHandler() {
|
||||
KeyBindingRegistry.registerKeyBinding(new KeyBindingHandler());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setKeyBinding(String name, int value) {
|
||||
KeyBindings.addKeyBinding(name, value);
|
||||
KeyBindings.addIsRepeating(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerSoundHandler() {
|
||||
MinecraftForge.EVENT_BUS.register(new SoundHandler());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preloadTextures() {
|
||||
MinecraftForgeClient.preloadTexture(Reference.SPRITE_SHEET_LOCATION + Reference.BLOCK_SPRITE_SHEET);
|
||||
MinecraftForgeClient.preloadTexture(Reference.SPRITE_SHEET_LOCATION + Reference.ITEM_SPRITE_SHEET);
|
||||
}
|
||||
@Override
|
||||
public void registerKeyBindingHandler() {
|
||||
KeyBindingRegistry.registerKeyBinding(new KeyBindingHandler());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setKeyBinding(String name, int value) {
|
||||
KeyBindings.addKeyBinding(name, value);
|
||||
KeyBindings.addIsRepeating(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerSoundHandler() {
|
||||
MinecraftForge.EVENT_BUS.register(new SoundHandler());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preloadTextures() {
|
||||
MinecraftForgeClient.preloadTexture(Reference.SPRITE_SHEET_LOCATION + Reference.BLOCK_SPRITE_SHEET);
|
||||
MinecraftForgeClient.preloadTexture(Reference.SPRITE_SHEET_LOCATION + Reference.ITEM_SPRITE_SHEET);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initCustomRarityTypes() {
|
||||
EnumHelperClient.addRarity(JUNK, COLOR_JUNK, DISPLAY_NAME_JUNK);
|
||||
EnumHelperClient.addRarity(NORMAL, COLOR_NORMAL, DISPLAY_NAME_NORMAL);
|
||||
EnumHelperClient.addRarity(MAGICAL, COLOR_MAGICAL, DISPLAY_NAME_MAGICAL);
|
||||
EnumHelperClient.addRarity(RARE, COLOR_RARE, DISPLAY_NAME_RARE);
|
||||
EnumHelperClient.addRarity(LEGENDARY, COLOR_LEGENDARY, DISPLAY_NAME_LEGENDARY);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumRarity getCustomRarityType(String customRarity) {
|
||||
for (EnumRarity rarity : EnumRarity.class.getEnumConstants()) {
|
||||
if (rarity.name().equals(customRarity))
|
||||
return rarity;
|
||||
}
|
||||
return EnumRarity.common;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,58 +1,51 @@
|
|||
package ee3.client.core.handlers;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import net.minecraft.src.KeyBinding;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import cpw.mods.fml.client.registry.KeyBindingRegistry;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.Side;
|
||||
import cpw.mods.fml.common.TickType;
|
||||
import cpw.mods.fml.common.asm.SideOnly;
|
||||
import ee3.client.lib.KeyBindings;
|
||||
import ee3.common.lib.Reference;
|
||||
import ee3.common.lib.Sounds;
|
||||
|
||||
/**
|
||||
* KeyBindingHandler
|
||||
*
|
||||
* Client specific handler for handling keybinding related events
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
* KeyBindingHandler
|
||||
*
|
||||
* Client specific handler for handling keybinding related events
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
public class KeyBindingHandler extends KeyBindingRegistry.KeyHandler {
|
||||
|
||||
public KeyBindingHandler() {
|
||||
super(KeyBindings.gatherKeyBindings(), KeyBindings.gatherIsRepeating());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getLabel() {
|
||||
return Reference.MOD_NAME + " KeyBindingHandler";
|
||||
}
|
||||
public KeyBindingHandler() {
|
||||
super(KeyBindings.gatherKeyBindings(), KeyBindings.gatherIsRepeating());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void keyDown(EnumSet<TickType> types, KeyBinding kb, boolean tickEnd, boolean isRepeat) {
|
||||
// Only operate at the end of the tick
|
||||
if (tickEnd) {
|
||||
// If we are not in a GUI of any kind, continue execution
|
||||
if (FMLClientHandler.instance().getClient().currentScreen == null) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@Override
|
||||
public String getLabel() {
|
||||
return Reference.MOD_NAME + " KeyBindingHandler";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void keyUp(EnumSet<TickType> types, KeyBinding kb, boolean tickEnd) { }
|
||||
@Override
|
||||
public void keyDown(EnumSet<TickType> types, KeyBinding kb, boolean tickEnd, boolean isRepeat) {
|
||||
// Only operate at the end of the tick
|
||||
if (tickEnd) {
|
||||
// If we are not in a GUI of any kind, continue execution
|
||||
if (FMLClientHandler.instance().getClient().currentScreen == null) {
|
||||
|
||||
@Override
|
||||
public EnumSet<TickType> ticks() {
|
||||
return EnumSet.of(TickType.CLIENT);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void keyUp(EnumSet<TickType> types, KeyBinding kb, boolean tickEnd) {}
|
||||
|
||||
@Override
|
||||
public EnumSet<TickType> ticks() {
|
||||
return EnumSet.of(TickType.CLIENT);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -9,31 +9,32 @@ import net.minecraftforge.client.event.sound.SoundLoadEvent;
|
|||
import net.minecraftforge.event.ForgeSubscribe;
|
||||
|
||||
/**
|
||||
* SoundHandler
|
||||
*
|
||||
* Client specific handler for sound related events
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
* SoundHandler
|
||||
*
|
||||
* Client specific handler for sound related events
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
public class SoundHandler {
|
||||
|
||||
@ForgeSubscribe
|
||||
public void onSoundLoad(SoundLoadEvent event) {
|
||||
|
||||
// For each custom sound file we have defined in Sounds
|
||||
for (String soundFile : Sounds.soundFiles) {
|
||||
// Try to add the custom sound file to the pool of sounds
|
||||
try {
|
||||
event.manager.addSound(soundFile, new File(this.getClass().getResource("/" + soundFile).toURI()));
|
||||
}
|
||||
// If we cannot add the custom sound file to the pool, log the exception
|
||||
catch (Exception e) {
|
||||
FMLCommonHandler.instance().getFMLLogger().log(Level.WARNING, Reference.LOGGER_PREFIX + "Failed loading sound file: " + soundFile);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ForgeSubscribe
|
||||
public void onSoundLoad(SoundLoadEvent event) {
|
||||
|
||||
// For each custom sound file we have defined in Sounds
|
||||
for (String soundFile : Sounds.soundFiles) {
|
||||
// Try to add the custom sound file to the pool of sounds
|
||||
try {
|
||||
event.manager.addSound(soundFile, new File(this.getClass().getResource("/" + soundFile).toURI()));
|
||||
}
|
||||
// If we cannot add the custom sound file to the pool, log the
|
||||
// exception
|
||||
catch (Exception e) {
|
||||
FMLCommonHandler.instance().getFMLLogger().log(Level.WARNING, Reference.LOGGER_PREFIX + "Failed loading sound file: " + soundFile);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -4,46 +4,46 @@ import java.util.ArrayList;
|
|||
import net.minecraft.src.KeyBinding;
|
||||
|
||||
/**
|
||||
* KeyBindings
|
||||
*
|
||||
* Client specific library for a general collection of mod related KeyBindings
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
* KeyBindings
|
||||
*
|
||||
* Client specific library for a general collection of mod related KeyBindings
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
public class KeyBindings {
|
||||
|
||||
public static ArrayList<KeyBinding> keyBindingsList;
|
||||
public static ArrayList<Boolean> isRepeatingList;
|
||||
|
||||
public static void addKeyBinding(String name, int value) {
|
||||
if (keyBindingsList == null) {
|
||||
keyBindingsList = new ArrayList<KeyBinding>();
|
||||
}
|
||||
|
||||
keyBindingsList.add(new KeyBinding(name, value));
|
||||
}
|
||||
|
||||
public static void addIsRepeating(boolean value) {
|
||||
if (isRepeatingList == null) {
|
||||
isRepeatingList = new ArrayList<Boolean>();
|
||||
}
|
||||
|
||||
isRepeatingList.add(value);
|
||||
}
|
||||
|
||||
public static KeyBinding[] gatherKeyBindings() {
|
||||
return keyBindingsList.toArray(new KeyBinding[keyBindingsList.size()]);
|
||||
}
|
||||
|
||||
public static boolean[] gatherIsRepeating() {
|
||||
boolean[] isRepeating = new boolean[isRepeatingList.size()];
|
||||
|
||||
for (int x = 0; x < isRepeating.length; x++) {
|
||||
isRepeating[x] = isRepeatingList.get(x).booleanValue();
|
||||
}
|
||||
|
||||
return isRepeating;
|
||||
}
|
||||
public static ArrayList<KeyBinding> keyBindingsList;
|
||||
public static ArrayList<Boolean> isRepeatingList;
|
||||
|
||||
public static void addKeyBinding(String name, int value) {
|
||||
if (keyBindingsList == null) {
|
||||
keyBindingsList = new ArrayList<KeyBinding>();
|
||||
}
|
||||
|
||||
keyBindingsList.add(new KeyBinding(name, value));
|
||||
}
|
||||
|
||||
public static void addIsRepeating(boolean value) {
|
||||
if (isRepeatingList == null) {
|
||||
isRepeatingList = new ArrayList<Boolean>();
|
||||
}
|
||||
|
||||
isRepeatingList.add(value);
|
||||
}
|
||||
|
||||
public static KeyBinding[] gatherKeyBindings() {
|
||||
return keyBindingsList.toArray(new KeyBinding[keyBindingsList.size()]);
|
||||
}
|
||||
|
||||
public static boolean[] gatherIsRepeating() {
|
||||
boolean[] isRepeating = new boolean[isRepeatingList.size()];
|
||||
|
||||
for (int x = 0; x < isRepeating.length; x++) {
|
||||
isRepeating[x] = isRepeatingList.get(x).booleanValue();
|
||||
}
|
||||
|
||||
return isRepeating;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package ee3.common;
|
||||
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.Mod;
|
||||
import cpw.mods.fml.common.Mod.Init;
|
||||
import cpw.mods.fml.common.Mod.Instance;
|
||||
|
@ -25,66 +24,69 @@ import ee3.common.lib.Reference;
|
|||
import ee3.common.network.PacketHandler;
|
||||
|
||||
/**
|
||||
* EquivalentExchange3
|
||||
*
|
||||
* Main mod class for the Minecraft mod Equivalent Exchange 3
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
* EquivalentExchange3
|
||||
*
|
||||
* Main mod class for the Minecraft mod Equivalent Exchange 3
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
@Mod(modid = Reference.MOD_ID, name = Reference.MOD_NAME, version = Reference.VERSION)
|
||||
@NetworkMod(channels = { Reference.CHANNEL_NAME }, clientSideRequired = true, serverSideRequired = false, packetHandler = PacketHandler.class)
|
||||
public class EquivalentExchange3 {
|
||||
|
||||
@Instance
|
||||
public static EquivalentExchange3 instance;
|
||||
|
||||
@SidedProxy(clientSide = "ee3.client.core.ClientProxy", serverSide = "ee3.common.core.CommonProxy")
|
||||
public static CommonProxy proxy;
|
||||
|
||||
@PreInit
|
||||
public void preInit(FMLPreInitializationEvent event) {
|
||||
|
||||
// Initialize the configuration
|
||||
ConfigurationHandler.init(event.getSuggestedConfigurationFile());
|
||||
|
||||
// Register the KeyBinding Handler (Client only)
|
||||
proxy.registerKeyBindingHandler();
|
||||
@Instance
|
||||
public static EquivalentExchange3 instance;
|
||||
|
||||
// Register the Sound Handler (Client only)
|
||||
proxy.registerSoundHandler();
|
||||
|
||||
}
|
||||
|
||||
@Init
|
||||
public void load(FMLInitializationEvent event) {
|
||||
|
||||
// Pre-load textures (Client only)
|
||||
proxy.preloadTextures();
|
||||
|
||||
// Register the GUI Handler
|
||||
NetworkRegistry.instance().registerGuiHandler(instance, proxy);
|
||||
|
||||
// Register the Crafting Handler
|
||||
GameRegistry.registerCraftingHandler(new CraftingHandler());
|
||||
|
||||
// Register the Item Pickup Handler
|
||||
MinecraftForge.EVENT_BUS.register(new ItemPickupHandler());
|
||||
|
||||
// Register the EntityLiving Handler
|
||||
MinecraftForge.EVENT_BUS.register(new EntityLivingHandler());
|
||||
|
||||
// Initialize mod items
|
||||
ModItems.init();
|
||||
|
||||
}
|
||||
|
||||
@PostInit
|
||||
public void modsLoaded(FMLPostInitializationEvent event) {
|
||||
@SidedProxy(clientSide = "ee3.client.core.ClientProxy", serverSide = "ee3.common.core.CommonProxy")
|
||||
public static CommonProxy proxy;
|
||||
|
||||
// Initialize the Addon Handler
|
||||
AddonHandler.init();
|
||||
|
||||
}
|
||||
@PreInit
|
||||
public void preInit(FMLPreInitializationEvent event) {
|
||||
|
||||
// Initialize the configuration
|
||||
ConfigurationHandler.init(event.getSuggestedConfigurationFile());
|
||||
|
||||
// Register the KeyBinding Handler (Client only)
|
||||
proxy.registerKeyBindingHandler();
|
||||
|
||||
// Register the Sound Handler (Client only)
|
||||
proxy.registerSoundHandler();
|
||||
|
||||
}
|
||||
|
||||
@Init
|
||||
public void load(FMLInitializationEvent event) {
|
||||
|
||||
// Pre-load textures (Client only)
|
||||
proxy.preloadTextures();
|
||||
|
||||
// Initialize the custom item rarity types
|
||||
proxy.initCustomRarityTypes();
|
||||
|
||||
// Register the GUI Handler
|
||||
NetworkRegistry.instance().registerGuiHandler(instance, proxy);
|
||||
|
||||
// Register the Crafting Handler
|
||||
GameRegistry.registerCraftingHandler(new CraftingHandler());
|
||||
|
||||
// Register the Item Pickup Handler
|
||||
MinecraftForge.EVENT_BUS.register(new ItemPickupHandler());
|
||||
|
||||
// Register the EntityLiving Handler
|
||||
MinecraftForge.EVENT_BUS.register(new EntityLivingHandler());
|
||||
|
||||
// Initialize mod items
|
||||
ModItems.init();
|
||||
|
||||
}
|
||||
|
||||
@PostInit
|
||||
public void modsLoaded(FMLPostInitializationEvent event) {
|
||||
|
||||
// Initialize the Addon Handler
|
||||
AddonHandler.init();
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,36 +1,44 @@
|
|||
package ee3.common.core;
|
||||
|
||||
import net.minecraft.src.EntityPlayer;
|
||||
import net.minecraft.src.EnumRarity;
|
||||
import net.minecraft.src.World;
|
||||
import cpw.mods.fml.common.network.IGuiHandler;
|
||||
|
||||
/**
|
||||
* CommonProxy
|
||||
*
|
||||
* The common proxy class between client and server. Client proxy extends this for further client specific functionality
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
* CommonProxy
|
||||
*
|
||||
* The common proxy class between client and server. Client proxy extends this
|
||||
* for further client specific functionality
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
public class CommonProxy implements IGuiHandler {
|
||||
|
||||
public void registerKeyBindingHandler() { }
|
||||
|
||||
public void setKeyBinding(String name, int value) { }
|
||||
|
||||
public void registerSoundHandler() { }
|
||||
|
||||
public void preloadTextures() { }
|
||||
|
||||
@Override
|
||||
public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return null;
|
||||
}
|
||||
public void registerKeyBindingHandler() {}
|
||||
|
||||
@Override
|
||||
public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return null;
|
||||
}
|
||||
public void setKeyBinding(String name, int value) {}
|
||||
|
||||
public void registerSoundHandler() {}
|
||||
|
||||
public void preloadTextures() {}
|
||||
|
||||
public void initCustomRarityTypes() {}
|
||||
|
||||
public EnumRarity getCustomRarityType(String customRarity) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,18 +1,17 @@
|
|||
package ee3.common.core.handlers;
|
||||
|
||||
/**
|
||||
* AddonHandler
|
||||
*
|
||||
* Takes care of initializing of addons to the mod. Occurs after all mods are loaded
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
* AddonHandler
|
||||
*
|
||||
* Takes care of initializing of addons to the mod. Occurs after all mods are
|
||||
* loaded
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
public class AddonHandler {
|
||||
|
||||
public static void init() {
|
||||
|
||||
}
|
||||
|
||||
public static void init() {}
|
||||
|
||||
}
|
||||
|
|
|
@ -10,54 +10,54 @@ import static net.minecraftforge.common.Configuration.*;
|
|||
import static ee3.common.lib.Reference.*;
|
||||
|
||||
/**
|
||||
* ConfigurationManager
|
||||
*
|
||||
* Loads in configuration data from disk
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
* ConfigurationManager
|
||||
*
|
||||
* Loads in configuration data from disk
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
public class ConfigurationHandler {
|
||||
|
||||
private static final String CATEGORY_KEYBIND = "keybinds";
|
||||
|
||||
public static boolean AUTO_RESOLVE_IDS;
|
||||
public static boolean ENABLE_SOUNDS;
|
||||
public static boolean ENABLE_PARTICLES;
|
||||
|
||||
public static void init(File configFile) {
|
||||
Configuration configuration = new Configuration(configFile);
|
||||
|
||||
try {
|
||||
configuration.load();
|
||||
|
||||
// TODO: Clean up property names
|
||||
|
||||
/* General Configs */
|
||||
ENABLE_SOUNDS = configuration.getOrCreateBooleanProperty("enable_sounds", CATEGORY_GENERAL, true).getBoolean(false);
|
||||
ENABLE_PARTICLES = configuration.getOrCreateBooleanProperty("enable_particles", CATEGORY_GENERAL, true).getBoolean(false);
|
||||
|
||||
/* Block Configs */
|
||||
AUTO_RESOLVE_IDS = configuration.getOrCreateBooleanProperty("auto_resolve_ids", CATEGORY_BLOCK, false).getBoolean(false);
|
||||
|
||||
/* Item Configs */
|
||||
ItemIds.MINIUM_SHARD = configuration.getOrCreateIntProperty("miniumShard", CATEGORY_ITEM, 27269).getInt(27269);
|
||||
ItemIds.MINIUM_STONE = configuration.getOrCreateIntProperty("miniumStone", CATEGORY_ITEM, 27270).getInt(27270);
|
||||
ItemIds.PHIL_STONE = configuration.getOrCreateIntProperty("philStone", CATEGORY_ITEM, 27271).getInt(27271);
|
||||
|
||||
/* KeyBinding Configs */
|
||||
EquivalentExchange3.proxy.setKeyBinding(KEYBINDING_EXTRA, configuration.getOrCreateIntProperty(KEYBINDING_EXTRA, CATEGORY_KEYBIND, KEYBINDING_EXTRA_DEFAULT).getInt(KEYBINDING_EXTRA_DEFAULT));
|
||||
EquivalentExchange3.proxy.setKeyBinding(KEYBINDING_CHARGE, configuration.getOrCreateIntProperty(KEYBINDING_CHARGE, CATEGORY_KEYBIND, KEYBINDING_CHARGE_DEFAULT).getInt(KEYBINDING_CHARGE_DEFAULT));
|
||||
EquivalentExchange3.proxy.setKeyBinding(KEYBINDING_TOGGLE, configuration.getOrCreateIntProperty(KEYBINDING_TOGGLE, CATEGORY_KEYBIND, KEYBINDING_TOGGLE_DEFAULT).getInt(KEYBINDING_TOGGLE_DEFAULT));
|
||||
EquivalentExchange3.proxy.setKeyBinding(KEYBINDING_RELEASE, configuration.getOrCreateIntProperty(KEYBINDING_RELEASE, CATEGORY_KEYBIND, KEYBINDING_RELEASE_DEFAULT).getInt(KEYBINDING_RELEASE_DEFAULT));
|
||||
}
|
||||
catch (Exception e) {
|
||||
// TODO: Clean up the logging message
|
||||
FMLLog.log(Level.SEVERE, e, "Equivalent Exchange 3 has had a problem loading its configuration");
|
||||
}
|
||||
finally {
|
||||
configuration.save();
|
||||
}
|
||||
}
|
||||
|
||||
private static final String CATEGORY_KEYBIND = "keybinds";
|
||||
|
||||
public static boolean AUTO_RESOLVE_IDS;
|
||||
public static boolean ENABLE_SOUNDS;
|
||||
public static boolean ENABLE_PARTICLES;
|
||||
|
||||
public static void init(File configFile) {
|
||||
Configuration configuration = new Configuration(configFile);
|
||||
|
||||
try {
|
||||
configuration.load();
|
||||
|
||||
// TODO: Clean up property names
|
||||
|
||||
/* General Configs */
|
||||
ENABLE_SOUNDS = configuration.getOrCreateBooleanProperty("enable_sounds", CATEGORY_GENERAL, true).getBoolean(false);
|
||||
ENABLE_PARTICLES = configuration.getOrCreateBooleanProperty("enable_particles", CATEGORY_GENERAL, true).getBoolean(false);
|
||||
|
||||
/* Block Configs */
|
||||
AUTO_RESOLVE_IDS = configuration.getOrCreateBooleanProperty("auto_resolve_ids", CATEGORY_BLOCK, false).getBoolean(false);
|
||||
|
||||
/* Item Configs */
|
||||
ItemIds.MINIUM_SHARD = configuration.getOrCreateIntProperty("miniumShard", CATEGORY_ITEM, 27269).getInt(27269);
|
||||
ItemIds.MINIUM_STONE = configuration.getOrCreateIntProperty("miniumStone", CATEGORY_ITEM, 27270).getInt(27270);
|
||||
ItemIds.PHIL_STONE = configuration.getOrCreateIntProperty("philStone", CATEGORY_ITEM, 27271).getInt(27271);
|
||||
|
||||
/* KeyBinding Configs */
|
||||
EquivalentExchange3.proxy.setKeyBinding(KEYBINDING_EXTRA, configuration.getOrCreateIntProperty(KEYBINDING_EXTRA, CATEGORY_KEYBIND, KEYBINDING_EXTRA_DEFAULT).getInt(KEYBINDING_EXTRA_DEFAULT));
|
||||
EquivalentExchange3.proxy.setKeyBinding(KEYBINDING_CHARGE, configuration.getOrCreateIntProperty(KEYBINDING_CHARGE, CATEGORY_KEYBIND, KEYBINDING_CHARGE_DEFAULT).getInt(KEYBINDING_CHARGE_DEFAULT));
|
||||
EquivalentExchange3.proxy.setKeyBinding(KEYBINDING_TOGGLE, configuration.getOrCreateIntProperty(KEYBINDING_TOGGLE, CATEGORY_KEYBIND, KEYBINDING_TOGGLE_DEFAULT).getInt(KEYBINDING_TOGGLE_DEFAULT));
|
||||
EquivalentExchange3.proxy.setKeyBinding(KEYBINDING_RELEASE, configuration.getOrCreateIntProperty(KEYBINDING_RELEASE, CATEGORY_KEYBIND, KEYBINDING_RELEASE_DEFAULT).getInt(KEYBINDING_RELEASE_DEFAULT));
|
||||
}
|
||||
catch (Exception e) {
|
||||
// TODO: Clean up the logging message
|
||||
FMLLog.log(Level.SEVERE, e, "Equivalent Exchange 3 has had a problem loading its configuration");
|
||||
}
|
||||
finally {
|
||||
configuration.save();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
package ee3.common.core.handlers;
|
||||
|
||||
import net.minecraft.src.EntityLiving;
|
||||
import net.minecraft.src.Potion;
|
||||
import net.minecraft.src.PotionEffect;
|
||||
import net.minecraftforge.event.ForgeSubscribe;
|
||||
import net.minecraftforge.event.entity.living.LivingDeathEvent;
|
||||
import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent;
|
||||
|
|
|
@ -4,21 +4,21 @@ import ee3.common.lib.Reference;
|
|||
import net.minecraft.src.Item;
|
||||
|
||||
/**
|
||||
* ItemEE
|
||||
*
|
||||
* Wrapper for mod items
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
* ItemEE
|
||||
*
|
||||
* Wrapper for mod items
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
public class ItemEE extends Item {
|
||||
|
||||
public ItemEE(int id) {
|
||||
super(id);
|
||||
maxStackSize = 1;
|
||||
setTextureFile(Reference.SPRITE_SHEET_LOCATION + Reference.ITEM_SPRITE_SHEET);
|
||||
setNoRepair();
|
||||
}
|
||||
public ItemEE(int id) {
|
||||
super(id);
|
||||
maxStackSize = 1;
|
||||
setTextureFile(Reference.SPRITE_SHEET_LOCATION + Reference.ITEM_SPRITE_SHEET);
|
||||
setNoRepair();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
package ee3.common.item;
|
||||
|
||||
/**
|
||||
* ItemEEStackable
|
||||
*
|
||||
* Stackable version of mod items
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
* ItemEEStackable
|
||||
*
|
||||
* Stackable version of mod items
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
public class ItemEEStackable extends ItemEE {
|
||||
|
||||
public ItemEEStackable(int id) {
|
||||
super(id);
|
||||
maxStackSize = 64;
|
||||
}
|
||||
public ItemEEStackable(int id) {
|
||||
super(id);
|
||||
maxStackSize = 64;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,9 +1,18 @@
|
|||
package ee3.common.item;
|
||||
|
||||
/**
|
||||
* ItemMiniumShard
|
||||
*
|
||||
* A shard of Minium
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
public class ItemMiniumShard extends ItemEE {
|
||||
|
||||
public ItemMiniumShard(int id) {
|
||||
super(id);
|
||||
}
|
||||
public ItemMiniumShard(int id) {
|
||||
super(id);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,20 +1,30 @@
|
|||
package ee3.common.item;
|
||||
|
||||
import ee3.common.lib.Reference;
|
||||
import net.minecraft.src.EnumRarity;
|
||||
import net.minecraft.src.ItemStack;
|
||||
import cpw.mods.fml.common.Side;
|
||||
import cpw.mods.fml.common.asm.SideOnly;
|
||||
import ee3.common.EquivalentExchange3;
|
||||
import ee3.common.lib.CustomItemRarity;
|
||||
|
||||
/**
|
||||
* ItemMiniumStone
|
||||
*
|
||||
* The "lesser" or "imperfect" Philosophers Stone
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
* ItemMiniumStone
|
||||
*
|
||||
* The "lesser" or "imperfect" Philosophers Stone
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
public class ItemMiniumStone extends ItemEE {
|
||||
|
||||
public ItemMiniumStone(int id) {
|
||||
super(id);
|
||||
}
|
||||
public ItemMiniumStone(int id) {
|
||||
super(id);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public EnumRarity getRarity(ItemStack stack) {
|
||||
return EquivalentExchange3.proxy.getCustomRarityType(CustomItemRarity.MAGICAL);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -2,23 +2,34 @@ package ee3.common.item;
|
|||
|
||||
import cpw.mods.fml.common.Side;
|
||||
import cpw.mods.fml.common.asm.SideOnly;
|
||||
import ee3.common.EquivalentExchange3;
|
||||
import ee3.common.lib.CustomItemRarity;
|
||||
import net.minecraft.src.EnumRarity;
|
||||
import net.minecraft.src.ItemStack;
|
||||
|
||||
/**
|
||||
* ItemPhilosopherStone
|
||||
*
|
||||
* The Philosophers Stone
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
public class ItemPhilosopherStone extends ItemEE {
|
||||
|
||||
public ItemPhilosopherStone(int id) {
|
||||
super(id);
|
||||
}
|
||||
public ItemPhilosopherStone(int id) {
|
||||
super(id);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean hasEffect(ItemStack stack) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public EnumRarity getRarity(ItemStack stack) {
|
||||
return EnumRarity.epic;
|
||||
return EquivalentExchange3.proxy.getCustomRarityType(CustomItemRarity.RARE);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -6,31 +6,28 @@ import net.minecraft.src.CreativeTabs;
|
|||
import net.minecraft.src.Item;
|
||||
|
||||
/**
|
||||
* ModItems
|
||||
*
|
||||
* Contains all relevant mod item instances
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
* ModItems
|
||||
*
|
||||
* Contains all relevant mod item instances
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
public class ModItems {
|
||||
|
||||
public static Item miniumShard;
|
||||
public static Item miniumStone;
|
||||
public static Item philStone;
|
||||
|
||||
public static void init() {
|
||||
|
||||
/* Initialize each mod item individually */
|
||||
miniumShard = new ItemMiniumShard(ItemIds.MINIUM_SHARD).setIconCoord(0, 0).setItemName("miniumShard").setTabToDisplayOn(CreativeTabs.tabMisc);
|
||||
miniumStone = new ItemMiniumStone(ItemIds.MINIUM_STONE).setIconCoord(1, 0).setItemName("miniumStone").setTabToDisplayOn(CreativeTabs.tabMisc);
|
||||
philStone = new ItemMiniumStone(ItemIds.PHIL_STONE).setIconCoord(2, 0).setItemName("philStone").setTabToDisplayOn(CreativeTabs.tabMisc);
|
||||
|
||||
LanguageRegistry.addName(miniumShard, "Shard of Minium");
|
||||
LanguageRegistry.addName(miniumStone, "Minium Stone");
|
||||
LanguageRegistry.addName(philStone, "Philosophers Stone");
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static Item miniumShard;
|
||||
public static Item miniumStone;
|
||||
public static Item philStone;
|
||||
|
||||
public static void init() {
|
||||
/* Initialize each mod item individually */
|
||||
miniumShard = new ItemMiniumShard(ItemIds.MINIUM_SHARD).setIconCoord(0, 0).setItemName("miniumShard").setTabToDisplayOn(CreativeTabs.tabMisc);
|
||||
miniumStone = new ItemMiniumStone(ItemIds.MINIUM_STONE).setIconCoord(1, 0).setItemName("miniumStone").setTabToDisplayOn(CreativeTabs.tabMisc);
|
||||
philStone = new ItemPhilosopherStone(ItemIds.PHIL_STONE).setIconCoord(2, 0).setItemName("philStone").setTabToDisplayOn(CreativeTabs.tabMisc);
|
||||
|
||||
LanguageRegistry.addName(miniumShard, "Shard of Minium");
|
||||
LanguageRegistry.addName(miniumStone, "Minium Stone");
|
||||
LanguageRegistry.addName(philStone, "Philosophers Stone");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
package ee3.common.lib;
|
||||
|
||||
/**
|
||||
* BlockIds
|
||||
*
|
||||
* Library containing the default values for mod related Block ids
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
* BlockIds
|
||||
*
|
||||
* Library containing the default values for mod related Block ids
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
public class BlockIds {
|
||||
|
||||
public static int RED_WATER_STILL;
|
||||
|
||||
public static int RED_WATER_STILL;
|
||||
|
||||
}
|
||||
|
|
|
@ -1,54 +1,50 @@
|
|||
package ee3.common.lib;
|
||||
|
||||
/**
|
||||
* CustomItemRarity
|
||||
*
|
||||
* Library containing references to custom colour codes for item rarity
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
* CustomItemRarity
|
||||
*
|
||||
* Library containing references to custom colour codes for item rarity
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
public class CustomItemRarity {
|
||||
|
||||
/**
|
||||
* Colour Value Guide
|
||||
*
|
||||
* 0 = Black
|
||||
* 1 = Dark Blue
|
||||
* 2 = Green
|
||||
* 3 = Cyan
|
||||
* 4 = Dark Red
|
||||
* 5 = Purple
|
||||
* 6 = Orange
|
||||
* 7 = Light Grey
|
||||
* 8 = Dark Grey
|
||||
* 9 = Blue
|
||||
* 10 = Light Green
|
||||
* 11 = Light Cyan
|
||||
* 12 = Light Red
|
||||
* 13 = Pink
|
||||
* 14 = Yellow
|
||||
* 15 = White
|
||||
*
|
||||
**/
|
||||
|
||||
public static final int COLOR_JUNK = 7;
|
||||
public static final int COLOR_NORMAL = 15;
|
||||
public static final int COLOR_MAGICAL = 9;
|
||||
public static final int COLOR_RARE = 14;
|
||||
public static final int COLOR_LEGENDARY = 6;
|
||||
|
||||
public static final String JUNK = "custom_junk";
|
||||
public static final String NORMAL = "custom_normal";
|
||||
public static final String MAGICAL = "custom_magical";
|
||||
public static final String RARE = "custom_rare";
|
||||
public static final String LEGENDARY = "custom_legendary";
|
||||
|
||||
public static final String DISPLAY_NAME_JUNK = "Junk";
|
||||
public static final String DISPLAY_NAME_NORMAL = "Normal";
|
||||
public static final String DISPLAY_NAME_MAGICAL = "Magical";
|
||||
public static final String DISPLAY_NAME_RARE = "Rare";
|
||||
public static final String DISPLAY_NAME_LEGENDARY = "Legendary";
|
||||
// Colour Value Guide
|
||||
// 0 = Black
|
||||
// 1 = Dark Blue
|
||||
// 2 = Green
|
||||
// 3 = Cyan
|
||||
// 4 = Dark Red
|
||||
// 5 = Purple
|
||||
// 6 = Orange
|
||||
// 7 = Light Grey
|
||||
// 8 = Dark Grey
|
||||
// 9 = Blue
|
||||
// 10 = Light Green
|
||||
// 11 = Light Cyan
|
||||
// 12 = Light Red
|
||||
// 13 = Pink
|
||||
// 14 = Yellow
|
||||
// 15 = White
|
||||
|
||||
public static final int COLOR_JUNK = 7;
|
||||
public static final int COLOR_NORMAL = 15;
|
||||
public static final int COLOR_MAGICAL = 9;
|
||||
public static final int COLOR_RARE = 14;
|
||||
public static final int COLOR_LEGENDARY = 6;
|
||||
|
||||
public static final String JUNK = "custom_junk";
|
||||
public static final String NORMAL = "custom_normal";
|
||||
public static final String MAGICAL = "custom_magical";
|
||||
public static final String RARE = "custom_rare";
|
||||
public static final String LEGENDARY = "custom_legendary";
|
||||
|
||||
public static final String DISPLAY_NAME_JUNK = "Junk";
|
||||
public static final String DISPLAY_NAME_NORMAL = "Normal";
|
||||
public static final String DISPLAY_NAME_MAGICAL = "Magical";
|
||||
public static final String DISPLAY_NAME_RARE = "Rare";
|
||||
public static final String DISPLAY_NAME_LEGENDARY = "Legendary";
|
||||
|
||||
}
|
|
@ -1,18 +1,18 @@
|
|||
package ee3.common.lib;
|
||||
|
||||
/**
|
||||
* ItemIds
|
||||
*
|
||||
* Library containing the default values for mod related Item ids
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
* ItemIds
|
||||
*
|
||||
* Library containing the default values for mod related Item ids
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
public class ItemIds {
|
||||
|
||||
public static int MINIUM_SHARD;
|
||||
public static int MINIUM_STONE;
|
||||
public static int PHIL_STONE;
|
||||
|
||||
|
||||
public static int MINIUM_SHARD;
|
||||
public static int MINIUM_STONE;
|
||||
public static int PHIL_STONE;
|
||||
|
||||
}
|
||||
|
|
|
@ -1,41 +1,41 @@
|
|||
package ee3.common.lib;
|
||||
|
||||
/**
|
||||
* Reference
|
||||
*
|
||||
* General purpose library to contain mod related constants
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
* Reference
|
||||
*
|
||||
* General purpose library to contain mod related constants
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
public class Reference {
|
||||
|
||||
/* Debug Mode On-Off */
|
||||
public static final boolean DEBUG_MODE = false;
|
||||
|
||||
/* General Mod related constants */
|
||||
public static final String MOD_ID = "EE3";
|
||||
public static final String MOD_NAME = "Equivalent Exchange 3";
|
||||
public static final String VERSION = "1.0.0.0";
|
||||
public static final String CHANNEL_NAME = MOD_ID;
|
||||
public static final String LOGGER_PREFIX = "[" + MOD_ID + "] ";
|
||||
|
||||
/* KeyBinding related constants */
|
||||
public static final String KEYBINDING_EXTRA = "mod.ee3.extra_key";
|
||||
public static final int KEYBINDING_EXTRA_DEFAULT = 46;
|
||||
public static final String KEYBINDING_RELEASE = "mod.ee3.release_key";
|
||||
public static final int KEYBINDING_RELEASE_DEFAULT = 19;
|
||||
public static final String KEYBINDING_TOGGLE = "mod.ee3.toggle_key";
|
||||
public static final int KEYBINDING_TOGGLE_DEFAULT = 34;
|
||||
public static final String KEYBINDING_CHARGE = "mod.ee3.charge_key";
|
||||
public static final int KEYBINDING_CHARGE_DEFAULT = 47;
|
||||
|
||||
/* Texture related constants */
|
||||
public static final String SPRITE_SHEET_LOCATION = "/ee3/art/sprites/";
|
||||
public static final String ITEM_SPRITE_SHEET = "ee3_items.png";
|
||||
public static final String BLOCK_SPRITE_SHEET = "ee3_blocks.png";
|
||||
public static final String GUI_SHEET_LOCATION = "/ee3/art/gui/";
|
||||
public static final String ARMOR_SHEET_LOCATION = "/ee3/art/armor/";
|
||||
/* Debug Mode On-Off */
|
||||
public static final boolean DEBUG_MODE = false;
|
||||
|
||||
/* General Mod related constants */
|
||||
public static final String MOD_ID = "EE3";
|
||||
public static final String MOD_NAME = "Equivalent Exchange 3";
|
||||
public static final String VERSION = "1.0.0.0";
|
||||
public static final String CHANNEL_NAME = MOD_ID;
|
||||
public static final String LOGGER_PREFIX = "[" + MOD_ID + "] ";
|
||||
|
||||
/* KeyBinding related constants */
|
||||
public static final String KEYBINDING_EXTRA = "mod.ee3.extra_key";
|
||||
public static final int KEYBINDING_EXTRA_DEFAULT = 46;
|
||||
public static final String KEYBINDING_RELEASE = "mod.ee3.release_key";
|
||||
public static final int KEYBINDING_RELEASE_DEFAULT = 19;
|
||||
public static final String KEYBINDING_TOGGLE = "mod.ee3.toggle_key";
|
||||
public static final int KEYBINDING_TOGGLE_DEFAULT = 34;
|
||||
public static final String KEYBINDING_CHARGE = "mod.ee3.charge_key";
|
||||
public static final int KEYBINDING_CHARGE_DEFAULT = 47;
|
||||
|
||||
/* Texture related constants */
|
||||
public static final String SPRITE_SHEET_LOCATION = "/ee3/art/sprites/";
|
||||
public static final String ITEM_SPRITE_SHEET = "ee3_items.png";
|
||||
public static final String BLOCK_SPRITE_SHEET = "ee3_blocks.png";
|
||||
public static final String GUI_SHEET_LOCATION = "/ee3/art/gui/";
|
||||
public static final String ARMOR_SHEET_LOCATION = "/ee3/art/armor/";
|
||||
|
||||
}
|
||||
|
|
|
@ -7,43 +7,44 @@ package ee3.common.lib;
|
|||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class Sounds {
|
||||
|
||||
private static final String SOUND_RESOURCE_LOCATION = "ee3/sound/";
|
||||
private static final String SOUND_PREFIX = "ee3.sound.";
|
||||
|
||||
public static String[] soundFiles = {SOUND_RESOURCE_LOCATION + "break.ogg",
|
||||
SOUND_RESOURCE_LOCATION + "chargetick.ogg",
|
||||
SOUND_RESOURCE_LOCATION + "destruct.ogg",
|
||||
SOUND_RESOURCE_LOCATION + "flash.ogg",
|
||||
SOUND_RESOURCE_LOCATION + "gust.ogg",
|
||||
SOUND_RESOURCE_LOCATION + "heal.ogg",
|
||||
SOUND_RESOURCE_LOCATION + "kinesis.ogg",
|
||||
SOUND_RESOURCE_LOCATION + "launch.ogg",
|
||||
SOUND_RESOURCE_LOCATION + "nova.ogg",
|
||||
SOUND_RESOURCE_LOCATION + "philball.ogg",
|
||||
SOUND_RESOURCE_LOCATION + "tock.ogg",
|
||||
SOUND_RESOURCE_LOCATION + "transmute.ogg",
|
||||
SOUND_RESOURCE_LOCATION + "wall.ogg",
|
||||
SOUND_RESOURCE_LOCATION + "waterball.ogg",
|
||||
SOUND_RESOURCE_LOCATION + "wind.ogg"};
|
||||
|
||||
public static final String BREAK = SOUND_PREFIX + "break";
|
||||
public static final String CHARGE_TICK = SOUND_PREFIX + "chargetick";
|
||||
public static final String DESTRUCTION = SOUND_PREFIX + "destruct";
|
||||
public static final String FLASH = SOUND_PREFIX + "flash";
|
||||
public static final String GUST = SOUND_PREFIX + "gust";
|
||||
public static final String HEAL = SOUND_PREFIX + "heal";
|
||||
public static final String KINESIS = SOUND_PREFIX + "kinesis";
|
||||
public static final String LAUNCH = SOUND_PREFIX + "launch";
|
||||
public static final String NOVA = SOUND_PREFIX + "nova";
|
||||
public static final String PHILOSOPHERS_BALL = SOUND_PREFIX + "philball";
|
||||
public static final String TOCK = SOUND_PREFIX + "tock";
|
||||
public static final String TRANSMUTE = SOUND_PREFIX + "transmute";
|
||||
public static final String WALL = SOUND_PREFIX + "wall";
|
||||
public static final String WATER_BALL = SOUND_PREFIX + "waterball";
|
||||
public static final String WIND = SOUND_PREFIX + "wind";
|
||||
|
||||
|
||||
private static final String SOUND_RESOURCE_LOCATION = "ee3/sound/";
|
||||
private static final String SOUND_PREFIX = "ee3.sound.";
|
||||
|
||||
public static String[] soundFiles = {
|
||||
SOUND_RESOURCE_LOCATION + "break.ogg",
|
||||
SOUND_RESOURCE_LOCATION + "chargetick.ogg",
|
||||
SOUND_RESOURCE_LOCATION + "destruct.ogg",
|
||||
SOUND_RESOURCE_LOCATION + "flash.ogg",
|
||||
SOUND_RESOURCE_LOCATION + "gust.ogg",
|
||||
SOUND_RESOURCE_LOCATION + "heal.ogg",
|
||||
SOUND_RESOURCE_LOCATION + "kinesis.ogg",
|
||||
SOUND_RESOURCE_LOCATION + "launch.ogg",
|
||||
SOUND_RESOURCE_LOCATION + "nova.ogg",
|
||||
SOUND_RESOURCE_LOCATION + "philball.ogg",
|
||||
SOUND_RESOURCE_LOCATION + "tock.ogg",
|
||||
SOUND_RESOURCE_LOCATION + "transmute.ogg",
|
||||
SOUND_RESOURCE_LOCATION + "wall.ogg",
|
||||
SOUND_RESOURCE_LOCATION + "waterball.ogg",
|
||||
SOUND_RESOURCE_LOCATION + "wind.ogg" };
|
||||
|
||||
public static final String BREAK = SOUND_PREFIX + "break";
|
||||
public static final String CHARGE_TICK = SOUND_PREFIX + "chargetick";
|
||||
public static final String DESTRUCTION = SOUND_PREFIX + "destruct";
|
||||
public static final String FLASH = SOUND_PREFIX + "flash";
|
||||
public static final String GUST = SOUND_PREFIX + "gust";
|
||||
public static final String HEAL = SOUND_PREFIX + "heal";
|
||||
public static final String KINESIS = SOUND_PREFIX + "kinesis";
|
||||
public static final String LAUNCH = SOUND_PREFIX + "launch";
|
||||
public static final String NOVA = SOUND_PREFIX + "nova";
|
||||
public static final String PHILOSOPHERS_BALL = SOUND_PREFIX + "philball";
|
||||
public static final String TOCK = SOUND_PREFIX + "tock";
|
||||
public static final String TRANSMUTE = SOUND_PREFIX + "transmute";
|
||||
public static final String WALL = SOUND_PREFIX + "wall";
|
||||
public static final String WATER_BALL = SOUND_PREFIX + "waterball";
|
||||
public static final String WIND = SOUND_PREFIX + "wind";
|
||||
|
||||
}
|
|
@ -6,20 +6,20 @@ import cpw.mods.fml.common.network.IPacketHandler;
|
|||
import cpw.mods.fml.common.network.Player;
|
||||
|
||||
/**
|
||||
* PacketHandler
|
||||
*
|
||||
* Handles the dispatch and receipt of packets for the mod
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
* PacketHandler
|
||||
*
|
||||
* Handles the dispatch and receipt of packets for the mod
|
||||
*
|
||||
* @author pahimar
|
||||
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
*
|
||||
*/
|
||||
public class PacketHandler implements IPacketHandler {
|
||||
|
||||
@Override
|
||||
public void onPacketData(NetworkManager manager, Packet250CustomPayload packet, Player player) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
@Override
|
||||
public void onPacketData(NetworkManager manager, Packet250CustomPayload packet, Player player) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue