v5.0.3 Release
*Synchronized sound system around SoundHandler.sounds ArrayList. *Bumped version to 5.0.3. *Removed unbalanced Enriched Iron uses. *Fixed block IDs. *Replaced Refined Steel with Steel. *Replaced Redstone with Bronze. *Updated to use Forge's new block registration system. *Fixed bronze Metallurgic Infuser recipe. *Bumped Advanced Solar Generator output to 512v. *Made Platinum Compressor cooperate with Ore Dictionary. *Fixed infusion notification. *Revamped and removed bugs in sound system. *Fixed crash when removing iterated sounds. *Fixed configuration usage. *Other minor bugfixes and formatting.
BIN
bin/minecraft/armor/bronze_1.png
Executable file
After Width: | Height: | Size: 1.9 KiB |
BIN
bin/minecraft/armor/bronze_2.png
Executable file
After Width: | Height: | Size: 955 B |
Before Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
|
@ -1,7 +1,5 @@
|
|||
package mekanism.api;
|
||||
|
||||
import mekanism.api.Tier.EnergyCubeTier;
|
||||
|
||||
public enum InfusionType
|
||||
{
|
||||
COAL("COAL"),
|
||||
|
@ -20,7 +18,7 @@ public enum InfusionType
|
|||
}
|
||||
}
|
||||
|
||||
System.out.println("[Mekanism] Invalid tier identifier when retrieving with name.");
|
||||
System.out.println("[Mekanism] Invalid infusion identifier when retrieving with name.");
|
||||
return NONE;
|
||||
}
|
||||
|
||||
|
|
|
@ -165,4 +165,19 @@ public class ClientProxy extends CommonProxy
|
|||
{
|
||||
Mekanism.audioHandler = new SoundHandler();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void unloadSoundHandler()
|
||||
{
|
||||
synchronized(Mekanism.audioHandler.sounds)
|
||||
{
|
||||
for(Sound sound : Mekanism.audioHandler.sounds)
|
||||
{
|
||||
sound.stop();
|
||||
Mekanism.audioHandler.soundSystem.removeSource(sound.identifier);
|
||||
}
|
||||
|
||||
Mekanism.audioHandler.sounds.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,9 +31,12 @@ public class ClientTickHandler implements ITickHandler
|
|||
|
||||
@Override
|
||||
public void tickEnd(EnumSet<TickType> type, Object... tickData)
|
||||
{
|
||||
synchronized(Mekanism.audioHandler.sounds)
|
||||
{
|
||||
Mekanism.audioHandler.onTick();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumSet<TickType> ticks()
|
||||
|
|
|
@ -17,24 +17,21 @@ import paulscode.sound.SoundSystem;
|
|||
*/
|
||||
public class Sound
|
||||
{
|
||||
/** The PaulsCode SoundSystem */
|
||||
public SoundSystem soundSystem;
|
||||
|
||||
/** The bundled path where the sound is */
|
||||
public String soundPath;
|
||||
|
||||
/** A unique identifier for this sound */
|
||||
public String identifier;
|
||||
|
||||
/** X coordinate of this sound effect */
|
||||
public int xCoord;
|
||||
|
||||
/** Y coordinate of this sound effect */
|
||||
public int yCoord;
|
||||
|
||||
/** Z coordinate of this sound effect */
|
||||
public int zCoord;
|
||||
|
||||
/** The world in which this sound is playing */
|
||||
public World worldObj;
|
||||
|
||||
/** Whether or not this sound is playing */
|
||||
public boolean isPlaying = false;
|
||||
|
||||
|
@ -48,12 +45,12 @@ public class Sound
|
|||
* @param y - y coord
|
||||
* @param z - z coord
|
||||
*/
|
||||
public Sound(SoundSystem system, String id, String sound, World world, int x, int y, int z)
|
||||
public Sound(String id, String sound, World world, int x, int y, int z)
|
||||
{
|
||||
synchronized(Mekanism.audioHandler.sounds)
|
||||
{
|
||||
soundSystem = system;
|
||||
soundPath = sound;
|
||||
identifier = id;
|
||||
worldObj = world;
|
||||
xCoord = x;
|
||||
yCoord = y;
|
||||
zCoord = z;
|
||||
|
@ -65,42 +62,51 @@ public class Sound
|
|||
}
|
||||
|
||||
Mekanism.audioHandler.sounds.add(this);
|
||||
soundSystem.newSource(false, id, url, sound, true, x, y, z, 0, 16F);
|
||||
soundSystem.activate(id);
|
||||
Mekanism.audioHandler.soundSystem.newSource(false, id, url, sound, true, x, y, z, 0, 16F);
|
||||
Mekanism.audioHandler.soundSystem.activate(id);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Start looping the sound effect
|
||||
*/
|
||||
public void play()
|
||||
{
|
||||
synchronized(Mekanism.audioHandler.sounds)
|
||||
{
|
||||
if(isPlaying)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
soundSystem.play(identifier);
|
||||
Mekanism.audioHandler.soundSystem.play(identifier);
|
||||
isPlaying = true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Stop looping the sound effect
|
||||
*/
|
||||
public void stop()
|
||||
{
|
||||
synchronized(Mekanism.audioHandler.sounds)
|
||||
{
|
||||
if(!isPlaying)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
soundSystem.stop(identifier);
|
||||
Mekanism.audioHandler.soundSystem.stop(identifier);
|
||||
isPlaying = false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the sound effect from the PaulsCode SoundSystem
|
||||
*/
|
||||
public void remove()
|
||||
{
|
||||
synchronized(Mekanism.audioHandler.sounds)
|
||||
{
|
||||
if(isPlaying)
|
||||
{
|
||||
|
@ -108,25 +114,29 @@ public class Sound
|
|||
}
|
||||
|
||||
Mekanism.audioHandler.sounds.remove(this);
|
||||
soundSystem.removeSource(identifier);
|
||||
Mekanism.audioHandler.soundSystem.removeSource(identifier);
|
||||
}
|
||||
}
|
||||
|
||||
/** Updates the volume based on how far away the player is from the machine
|
||||
/** Updates the volume based on how far away the player is from the machine.
|
||||
*
|
||||
* @param entityplayer - player who is near the machine, usually Minecraft.thePlayer
|
||||
* @param entityplayer - player who is near the machine, always Minecraft.thePlayer
|
||||
*/
|
||||
public void updateVolume(EntityPlayer entityplayer)
|
||||
{
|
||||
synchronized(Mekanism.audioHandler.sounds)
|
||||
{
|
||||
float volume = 0;
|
||||
|
||||
if (!isPlaying)
|
||||
{
|
||||
volume = 0.0F;
|
||||
return;
|
||||
}
|
||||
|
||||
double distanceVolume = entityplayer.getDistanceSq(xCoord, yCoord, zCoord)*0.01;
|
||||
volume = (float)Math.max(Mekanism.audioHandler.masterVolume-distanceVolume, 0);
|
||||
|
||||
soundSystem.setVolume(identifier, volume);
|
||||
Mekanism.audioHandler.soundSystem.setVolume(identifier, volume);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
package mekanism.client;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import mekanism.common.TileEntityBasicMachine;
|
||||
import net.minecraft.world.World;
|
||||
import paulscode.sound.SoundSystem;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
|
@ -19,7 +21,7 @@ public class SoundHandler
|
|||
/** The PaulsCode SoundSystem */
|
||||
public SoundSystem soundSystem;
|
||||
|
||||
public List<Sound> sounds = new ArrayList<Sound>();
|
||||
public List<Sound> sounds = Collections.synchronizedList(new ArrayList<Sound>());
|
||||
|
||||
public float masterVolume = 0;
|
||||
|
||||
|
@ -34,15 +36,20 @@ public class SoundHandler
|
|||
}
|
||||
|
||||
public void onTick()
|
||||
{
|
||||
synchronized(sounds)
|
||||
{
|
||||
for(Sound sound : sounds)
|
||||
{
|
||||
if(FMLClientHandler.instance().getClient().theWorld != null && FMLClientHandler.instance().getClient().thePlayer != null)
|
||||
if(FMLClientHandler.instance().getClient().thePlayer != null && FMLClientHandler.instance().getClient().theWorld != null)
|
||||
{
|
||||
sound.updateVolume(FMLClientHandler.instance().getClient().thePlayer);
|
||||
}
|
||||
}
|
||||
|
||||
masterVolume = FMLClientHandler.instance().getClient().gameSettings.soundVolume;
|
||||
}
|
||||
}
|
||||
|
||||
/** Create and return an instance of a Sound.
|
||||
*
|
||||
|
@ -56,26 +63,25 @@ public class SoundHandler
|
|||
*/
|
||||
public Sound getSound(String name, String path, World world, int x, int y, int z)
|
||||
{
|
||||
if(soundSystem != null)
|
||||
synchronized(sounds)
|
||||
{
|
||||
return new Sound(soundSystem, getSoundName(name), path, world, x, y, z);
|
||||
}
|
||||
else {
|
||||
soundSystem = FMLClientHandler.instance().getClient().sndManager.sndSystem;
|
||||
return new Sound(soundSystem, getSoundName(name), path, world, x, y, z);
|
||||
String s = getIdentifier();
|
||||
System.out.println(s);
|
||||
return new Sound(s, path, world, x, y, z);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a unique identifier for a sound effect instance by getting adding a random
|
||||
* number between 0 and 10,000 to the end of the effect's name. Example:
|
||||
* EnrichmentChamber_2859
|
||||
* @param s - sound name
|
||||
* Get a unique identifier for a sound effect instance by combining the mod's name,
|
||||
* Mekanism, the new sound's unique position on the 'sounds' ArrayList, and a random
|
||||
* number between 0 and 10,000. Example: "Mekanism_6_6123"
|
||||
* @return unique identifier
|
||||
*/
|
||||
public String getSoundName(String s)
|
||||
public String getIdentifier()
|
||||
{
|
||||
Random random = new Random();
|
||||
return s + "_" + random.nextInt(10000);
|
||||
synchronized(sounds)
|
||||
{
|
||||
return "Mekanism_" + sounds.size()+1 + "_" + new Random().nextInt(10000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ import net.minecraftforge.common.ForgeChunkManager;
|
|||
/**
|
||||
* Block class for handling multiple metal block IDs.
|
||||
* 0: Platinum Block
|
||||
* 1: Redstone Block
|
||||
* 1: Bronze Block
|
||||
* 2: Refined Obsidian
|
||||
* 3: Coal Block
|
||||
* 4: Refined Glowstone
|
||||
|
|
|
@ -34,7 +34,7 @@ public class CommonProxy
|
|||
|
||||
/**
|
||||
* Gets the armor index number from ClientProxy.
|
||||
* @param armor indicator
|
||||
* @param string - armor indicator
|
||||
* @return armor index number
|
||||
*/
|
||||
public int getArmorIndex(String string)
|
||||
|
@ -53,10 +53,10 @@ public class CommonProxy
|
|||
Mekanism.oreBlockID = Mekanism.configuration.getBlock("OreBlock", 3002).getInt();
|
||||
Mekanism.obsidianTNTID = Mekanism.configuration.getBlock("ObsidianTNT", 3003).getInt();
|
||||
Mekanism.energyCubeID = Mekanism.configuration.getBlock("EnergyCube", 3004).getInt();
|
||||
Mekanism.nullRenderID = Mekanism.configuration.getBlock("NullRender", 3007).getInt();
|
||||
Mekanism.gasTankID = Mekanism.configuration.getBlock("GasTank", 3009).getInt();
|
||||
Mekanism.extrasEnabled = Mekanism.configuration.get("ExtrasEnabled", Configuration.CATEGORY_GENERAL, true).getBoolean(true);
|
||||
Mekanism.oreGenerationEnabled = Mekanism.configuration.get("OreGenerationEnabled", Configuration.CATEGORY_GENERAL, true).getBoolean(true);
|
||||
Mekanism.nullRenderID = Mekanism.configuration.getBlock("NullRender", 3005).getInt();
|
||||
Mekanism.gasTankID = Mekanism.configuration.getBlock("GasTank", 3006).getInt();
|
||||
Mekanism.extrasEnabled = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "ExtrasEnabled", true).getBoolean(true);
|
||||
Mekanism.oreGenerationEnabled = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "OreGenerationEnabled", true).getBoolean(true);
|
||||
Mekanism.configuration.save();
|
||||
}
|
||||
|
||||
|
@ -75,6 +75,11 @@ public class CommonProxy
|
|||
*/
|
||||
public void loadSoundHandler() {}
|
||||
|
||||
/**
|
||||
* Unload the sound handler.
|
||||
*/
|
||||
public void unloadSoundHandler() {}
|
||||
|
||||
/**
|
||||
* Get the actual interface for a GUI. Client-only.
|
||||
* @param ID - gui ID
|
||||
|
|
|
@ -7,7 +7,7 @@ import net.minecraft.item.ItemStack;
|
|||
/**
|
||||
* Item class for handling multiple metal block IDs.
|
||||
* 0: Platinum Block
|
||||
* 1: Redstone Block
|
||||
* 1: Bronze Block
|
||||
* 2: Refined Obsidian
|
||||
* 3: Coal Block
|
||||
* 4: Refined Glowstone
|
||||
|
@ -49,7 +49,7 @@ public class ItemBlockBasic extends ItemBlock
|
|||
name = "PlatinumBlock";
|
||||
break;
|
||||
case 1:
|
||||
name = "RedstoneBlock";
|
||||
name = "BronzeBlock";
|
||||
break;
|
||||
case 2:
|
||||
name = "RefinedObsidian";
|
||||
|
|
|
@ -8,7 +8,7 @@ import net.minecraft.item.ItemStack;
|
|||
public class ItemDust extends ItemMekanism
|
||||
{
|
||||
public static String[] en_USNames = {"Iron", "Gold", "Platinum",
|
||||
"Obsidian", "Diamond", "RefinedSteel"};
|
||||
"Obsidian", "Diamond", "Steel"};
|
||||
|
||||
public ItemDust(int id)
|
||||
{
|
||||
|
|
|
@ -7,7 +7,7 @@ import net.minecraft.item.ItemStack;
|
|||
|
||||
public class ItemIngot extends ItemMekanism
|
||||
{
|
||||
public static String[] en_USNames = {"Obsidian", "Platinum", "Redstone", "Glowstone", "RefinedSteel"};
|
||||
public static String[] en_USNames = {"Obsidian", "Platinum", "Bronze", "Glowstone", "Steel"};
|
||||
|
||||
public ItemIngot(int id)
|
||||
{
|
||||
|
|
|
@ -25,10 +25,12 @@ import cpw.mods.fml.common.Mod.Init;
|
|||
import cpw.mods.fml.common.Mod.Instance;
|
||||
import cpw.mods.fml.common.Mod.PostInit;
|
||||
import cpw.mods.fml.common.Mod.PreInit;
|
||||
import cpw.mods.fml.common.Mod.ServerStopping;
|
||||
import cpw.mods.fml.common.SidedProxy;
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLServerStoppingEvent;
|
||||
import cpw.mods.fml.common.network.NetworkMod;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||
import cpw.mods.fml.common.registry.EntityRegistry;
|
||||
|
@ -42,7 +44,7 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
* @author AidanBrady
|
||||
*
|
||||
*/
|
||||
@Mod(modid = "Mekanism", name = "Mekanism", version = "5.0.2")
|
||||
@Mod(modid = "Mekanism", name = "Mekanism", version = "5.0.3")
|
||||
@NetworkMod(channels = {"Mekanism"}, clientSideRequired = true, serverSideRequired = false, packetHandler = PacketHandler.class)
|
||||
public class Mekanism
|
||||
{
|
||||
|
@ -64,7 +66,7 @@ public class Mekanism
|
|||
public static Configuration configuration;
|
||||
|
||||
/** Mekanism version number */
|
||||
public static Version versionNumber = new Version(5, 0, 2);
|
||||
public static Version versionNumber = new Version(5, 0, 3);
|
||||
|
||||
/** Mekanism creative tab */
|
||||
public static CreativeTabMekanism tabMekanism = new CreativeTabMekanism();
|
||||
|
@ -94,8 +96,8 @@ public class Mekanism
|
|||
public static int oreBlockID = 3002;
|
||||
public static int obsidianTNTID = 3003;
|
||||
public static int energyCubeID = 3004;
|
||||
public static int nullRenderID = 3007;
|
||||
public static int gasTankID = 3009;
|
||||
public static int nullRenderID = 3005;
|
||||
public static int gasTankID = 3006;
|
||||
|
||||
|
||||
//Extra Items
|
||||
|
@ -177,13 +179,13 @@ public class Mekanism
|
|||
"*", Character.valueOf('*'), new ItemStack(BasicBlock, 1, 0)
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(BasicBlock, 1, 1), new Object[] {
|
||||
"***", "***", "***", Character.valueOf('*'), "ingotRedstone"
|
||||
"***", "***", "***", Character.valueOf('*'), "ingotBronze"
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(Ingot, 9, 2), new Object[] {
|
||||
"*", Character.valueOf('*'), new ItemStack(BasicBlock, 1, 1)
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(BasicBlock, 1, 5), new Object[] {
|
||||
"***", "***", "***", Character.valueOf('*'), "ingotRefinedSteel"
|
||||
"***", "***", "***", Character.valueOf('*'), "ingotSteel"
|
||||
}));
|
||||
|
||||
//Extra
|
||||
|
@ -244,13 +246,13 @@ public class Mekanism
|
|||
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(ControlCircuit), new Object[] {
|
||||
" P ", "PEP", " P ", Character.valueOf('P'), "ingotPlatinum", Character.valueOf('E'), EnrichedAlloy
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(EnrichedIron, 2), new Object[] {
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(EnrichedIron, 6), new Object[] {
|
||||
"A", "I", "A", Character.valueOf('A'), EnrichedAlloy, Character.valueOf('I'), Item.ingotIron
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(EnrichedIron, 1), new Object[] {
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(EnrichedIron, 4), new Object[] {
|
||||
"C", "I", "C", Character.valueOf('C'), "dustCopper", Character.valueOf('I'), Item.ingotIron
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(EnrichedIron, 1), new Object[] {
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(EnrichedIron, 4), new Object[] {
|
||||
"T", "I", "T", Character.valueOf('T'), "dustTin", Character.valueOf('I'), Item.ingotIron
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(MachineBlock, 1, 5), new Object[] {
|
||||
|
@ -280,7 +282,6 @@ public class Mekanism
|
|||
FurnaceRecipes.smelting().addSmelting(Dust.shiftedIndex, 1, new ItemStack(Item.ingotGold), 1.0F);
|
||||
FurnaceRecipes.smelting().addSmelting(Dust.shiftedIndex, 5, new ItemStack(Ingot, 1, 4), 1.0F);
|
||||
GameRegistry.addSmelting(Item.coal.shiftedIndex, new ItemStack(CompressedCarbon), 1.0F);
|
||||
GameRegistry.addSmelting(EnrichedIron.shiftedIndex, new ItemStack(EnrichedAlloy), 1.0F);
|
||||
|
||||
//Enrichment Chamber Recipes
|
||||
RecipeHandler.addEnrichmentChamberRecipe(new ItemStack(Dust, 1, 4), new ItemStack(Item.diamond));
|
||||
|
@ -288,11 +289,9 @@ public class Mekanism
|
|||
RecipeHandler.addEnrichmentChamberRecipe(new ItemStack(Block.obsidian), new ItemStack(Dust, 1, 3));
|
||||
RecipeHandler.addEnrichmentChamberRecipe(new ItemStack(Block.oreIron), new ItemStack(Dust, 2, 0));
|
||||
RecipeHandler.addEnrichmentChamberRecipe(new ItemStack(Block.oreGold), new ItemStack(Dust, 2, 1));
|
||||
RecipeHandler.addEnrichmentChamberRecipe(new ItemStack(EnrichedIron, 2), new ItemStack(Dust, 1, 2));
|
||||
RecipeHandler.addEnrichmentChamberRecipe(new ItemStack(Item.coal, 4), new ItemStack(CompressedCarbon, 8));
|
||||
|
||||
//Platinum Compressor Recipes
|
||||
RecipeHandler.addPlatinumCompressorRecipe(new ItemStack(Item.redstone), new ItemStack(Ingot, 1, 2));
|
||||
RecipeHandler.addPlatinumCompressorRecipe(new ItemStack(Item.lightStoneDust), new ItemStack(Ingot, 1, 3));
|
||||
|
||||
//Combiner Recipes
|
||||
|
@ -347,7 +346,7 @@ public class Mekanism
|
|||
|
||||
//Localization for MultiBlock
|
||||
LanguageRegistry.instance().addStringLocalization("tile.BasicBlock.PlatinumBlock.name", "Platinum Block");
|
||||
LanguageRegistry.instance().addStringLocalization("tile.BasicBlock.RedstoneBlock.name", "Redstone Block");
|
||||
LanguageRegistry.instance().addStringLocalization("tile.BasicBlock.BronzeBlock.name", "Bronze Block");
|
||||
LanguageRegistry.instance().addStringLocalization("tile.BasicBlock.RefinedObsidian.name", "Refined Obsidian");
|
||||
LanguageRegistry.instance().addStringLocalization("tile.BasicBlock.CoalBlock.name", "Coal Block");
|
||||
LanguageRegistry.instance().addStringLocalization("tile.BasicBlock.RefinedGlowstone.name", "Refined Glowstone");
|
||||
|
@ -379,14 +378,14 @@ public class Mekanism
|
|||
LanguageRegistry.instance().addStringLocalization("item.platinumDust.name", "Platinum Dust");
|
||||
LanguageRegistry.instance().addStringLocalization("item.obsidianDust.name", "Obsidian Dust");
|
||||
LanguageRegistry.instance().addStringLocalization("item.diamondDust.name", "Diamond Dust");
|
||||
LanguageRegistry.instance().addStringLocalization("item.refinedsteelDust.name", "Refined Steel Dust");
|
||||
LanguageRegistry.instance().addStringLocalization("item.steelDust.name", "Steel Dust");
|
||||
|
||||
//Localization for Ingot
|
||||
LanguageRegistry.instance().addStringLocalization("item.obsidianIngot.name", "Obsidian Ingot");
|
||||
LanguageRegistry.instance().addStringLocalization("item.platinumIngot.name", "Platinum Ingot");
|
||||
LanguageRegistry.instance().addStringLocalization("item.redstoneIngot.name", "Redstone Ingot");
|
||||
LanguageRegistry.instance().addStringLocalization("item.bronzeIngot.name", "Bronze Ingot");
|
||||
LanguageRegistry.instance().addStringLocalization("item.glowstoneIngot.name", "Glowstone Ingot");
|
||||
LanguageRegistry.instance().addStringLocalization("item.refinedsteelIngot.name", "Refined Steel Ingot");
|
||||
LanguageRegistry.instance().addStringLocalization("item.steelIngot.name", "Steel Ingot");
|
||||
|
||||
//Localization for Mekanism creative tab
|
||||
LanguageRegistry.instance().addStringLocalization("itemGroup.tabMekanism", "Mekanism");
|
||||
|
@ -460,9 +459,9 @@ public class Mekanism
|
|||
GasTank = new BlockGasTank(gasTankID).setBlockName("GasTank");
|
||||
|
||||
//Registrations
|
||||
GameRegistry.registerBlock(ObsidianTNT);
|
||||
GameRegistry.registerBlock(NullRender);
|
||||
GameRegistry.registerBlock(GasTank);
|
||||
GameRegistry.registerBlock(ObsidianTNT, "ObsidianTNT");
|
||||
GameRegistry.registerBlock(NullRender, "NullRender");
|
||||
GameRegistry.registerBlock(GasTank, "GasTank");
|
||||
|
||||
//Add block items into itemsList for blocks with common IDs.
|
||||
Item.itemsList[basicBlockID] = new ItemBlockBasic(basicBlockID - 256, BasicBlock).setItemName("BasicBlock");
|
||||
|
@ -482,13 +481,13 @@ public class Mekanism
|
|||
OreDictionary.registerOre("dustPlatinum", new ItemStack(Dust, 1, 2));
|
||||
OreDictionary.registerOre("dustObsidian", new ItemStack(Dust, 1, 3));
|
||||
OreDictionary.registerOre("dustDiamond", new ItemStack(Dust, 1, 4));
|
||||
OreDictionary.registerOre("dustRefinedSteel", new ItemStack(Dust, 1, 5));
|
||||
OreDictionary.registerOre("dustSteel", new ItemStack(Dust, 1, 5));
|
||||
|
||||
OreDictionary.registerOre("ingotObsidian", new ItemStack(Ingot, 1, 0));
|
||||
OreDictionary.registerOre("ingotPlatinum", new ItemStack(Ingot, 1, 1));
|
||||
OreDictionary.registerOre("ingotRedstone", new ItemStack(Ingot, 1, 2));
|
||||
OreDictionary.registerOre("ingotBronze", new ItemStack(Ingot, 1, 2));
|
||||
OreDictionary.registerOre("ingotGlowstone", new ItemStack(Ingot, 1, 3));
|
||||
OreDictionary.registerOre("ingotRefinedSteel", new ItemStack(Ingot, 1, 4));
|
||||
OreDictionary.registerOre("ingotSteel", new ItemStack(Ingot, 1, 4));
|
||||
|
||||
OreDictionary.registerOre("orePlatinum", new ItemStack(OreBlock, 1, 0));
|
||||
|
||||
|
@ -541,13 +540,6 @@ public class Mekanism
|
|||
}
|
||||
} catch(Exception e) {}
|
||||
|
||||
try {
|
||||
for(ItemStack ore : OreDictionary.getOres("ingotRefinedSteel"))
|
||||
{
|
||||
RecipeHandler.addEnrichmentChamberRecipe(ore, OreDictionary.getOres("ingotSteel").get(0));
|
||||
}
|
||||
} catch(Exception e) {}
|
||||
|
||||
for(ItemStack ore : OreDictionary.getOres("ingotObsidian"))
|
||||
{
|
||||
RecipeHandler.addCrusherRecipe(ore, new ItemStack(Dust, 1, 3));
|
||||
|
@ -618,7 +610,7 @@ public class Mekanism
|
|||
try {
|
||||
for(ItemStack ore : OreDictionary.getOres("ingotCopper"))
|
||||
{
|
||||
RecipeHandler.addMetallurgicInfuserRecipe(Infusion.getInfusion(InfusionType.TIN, ore), MekanismUtils.getStackWithSize(OreDictionary.getOres("ingotBronze").get(0), 1));
|
||||
RecipeHandler.addMetallurgicInfuserRecipe(Infusion.getInfusion(InfusionType.TIN, ore), new ItemStack(Ingot, 1, 2));
|
||||
}
|
||||
} catch(Exception e) {}
|
||||
|
||||
|
@ -682,6 +674,12 @@ public class Mekanism
|
|||
ServerCommandHandler.initialize();
|
||||
}
|
||||
|
||||
@ServerStopping
|
||||
public void serverStopping(FMLServerStoppingEvent event)
|
||||
{
|
||||
proxy.unloadSoundHandler();
|
||||
}
|
||||
|
||||
@PreInit
|
||||
public void preInit(FMLPreInitializationEvent event)
|
||||
{
|
||||
|
|
|
@ -94,8 +94,6 @@ public abstract class TileEntityBasicMachine extends TileEntityElectricBlock imp
|
|||
if(!worldObj.isRemote)
|
||||
{
|
||||
for(ForgeDirection direction : ForgeDirection.values())
|
||||
{
|
||||
if(direction != ForgeDirection.getOrientation(facing))
|
||||
{
|
||||
TileEntity tileEntity = Vector3.getTileEntityFromSide(worldObj, new Vector3(this), direction);
|
||||
if(tileEntity != null)
|
||||
|
@ -116,16 +114,22 @@ public abstract class TileEntityBasicMachine extends TileEntityElectricBlock imp
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(worldObj.isRemote)
|
||||
{
|
||||
try {
|
||||
synchronized(Mekanism.audioHandler.sounds)
|
||||
{
|
||||
handleSound();
|
||||
}
|
||||
} catch(NoSuchMethodError e) {}
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void handleSound()
|
||||
{
|
||||
synchronized(Mekanism.audioHandler.sounds)
|
||||
{
|
||||
if(audio == null && worldObj != null && worldObj.isRemote)
|
||||
{
|
||||
|
@ -147,6 +151,7 @@ public abstract class TileEntityBasicMachine extends TileEntityElectricBlock imp
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbtTags)
|
||||
|
|
|
@ -5,6 +5,7 @@ import ic2.api.ElectricItem;
|
|||
import ic2.api.IElectricItem;
|
||||
import ic2.api.energy.tile.IEnergySink;
|
||||
|
||||
import java.util.EnumSet;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
|
@ -21,9 +22,12 @@ import net.minecraft.network.packet.Packet250CustomPayload;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import universalelectricity.core.electricity.ElectricityConnections;
|
||||
import universalelectricity.core.implement.IConductor;
|
||||
import universalelectricity.core.implement.IItemElectric;
|
||||
import universalelectricity.core.implement.IJouleStorage;
|
||||
import universalelectricity.core.implement.IVoltage;
|
||||
import universalelectricity.core.vector.Vector3;
|
||||
|
||||
import com.google.common.io.ByteArrayDataInput;
|
||||
|
||||
|
@ -41,7 +45,7 @@ public class TileEntityMetallurgicInfuser extends TileEntityElectricBlock implem
|
|||
public int MAX_INFUSE = 1000;
|
||||
|
||||
/** How much energy this machine consumes per-tick. */
|
||||
public double ENERGY_PER_TICK = 100;
|
||||
public double ENERGY_PER_TICK = 12;
|
||||
|
||||
/** How many ticks it takes to run an operation. */
|
||||
public int TICKS_REQUIRED = 200;
|
||||
|
@ -72,6 +76,8 @@ public class TileEntityMetallurgicInfuser extends TileEntityElectricBlock implem
|
|||
|
||||
currentTicksRequired = TICKS_REQUIRED;
|
||||
currentMaxElectricity = MAX_ELECTRICITY;
|
||||
|
||||
ElectricityConnections.registerConnector(this, EnumSet.allOf(ForgeDirection.class));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -81,6 +87,30 @@ public class TileEntityMetallurgicInfuser extends TileEntityElectricBlock implem
|
|||
|
||||
boolean testActive = operatingTicks > 0;
|
||||
|
||||
if(!worldObj.isRemote)
|
||||
{
|
||||
for(ForgeDirection direction : ForgeDirection.values())
|
||||
{
|
||||
TileEntity tileEntity = Vector3.getTileEntityFromSide(worldObj, new Vector3(this), direction);
|
||||
if(tileEntity != null)
|
||||
{
|
||||
if(tileEntity instanceof IConductor)
|
||||
{
|
||||
if(electricityStored < currentMaxElectricity)
|
||||
{
|
||||
double electricityNeeded = currentMaxElectricity - electricityStored;
|
||||
((IConductor)tileEntity).getNetwork().startRequesting(this, electricityNeeded, electricityNeeded >= getVoltage() ? getVoltage() : electricityNeeded);
|
||||
setJoules(electricityStored + ((IConductor)tileEntity).getNetwork().consumeElectricity(this).getWatts());
|
||||
}
|
||||
else if(electricityStored >= currentMaxElectricity)
|
||||
{
|
||||
((IConductor)tileEntity).getNetwork().stopRequesting(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(inventory[4] != null)
|
||||
{
|
||||
if(electricityStored < currentMaxElectricity)
|
||||
|
|
|
@ -4,6 +4,7 @@ import java.util.HashMap;
|
|||
import java.util.Map;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
public class TileEntityPlatinumCompressor extends TileEntityAdvancedElectricMachine
|
||||
{
|
||||
|
@ -23,7 +24,18 @@ public class TileEntityPlatinumCompressor extends TileEntityAdvancedElectricMach
|
|||
@Override
|
||||
public int getFuelTicks(ItemStack itemstack)
|
||||
{
|
||||
if (itemstack.itemID == new ItemStack(Mekanism.Ingot, 1, 1).itemID) return 200;
|
||||
boolean hasPlatinum = false;
|
||||
|
||||
for(ItemStack ore : OreDictionary.getOres("ingotPlatinum"))
|
||||
{
|
||||
if(ore.isItemEqual(itemstack))
|
||||
{
|
||||
hasPlatinum = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(hasPlatinum) return 200;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,8 +9,10 @@ public class Version
|
|||
{
|
||||
/** Major number for version */
|
||||
public int major;
|
||||
|
||||
/** Minor number for version */
|
||||
public int minor;
|
||||
|
||||
/** Build number for version */
|
||||
public int build;
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ import cpw.mods.fml.common.network.NetworkRegistry;
|
|||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
|
||||
@Mod(modid = "MekanismGenerators", name = "MekanismGenerators", version = "5.0.2", dependencies = "required-after:Mekanism")
|
||||
@Mod(modid = "MekanismGenerators", name = "MekanismGenerators", version = "5.0.3", dependencies = "required-after:Mekanism")
|
||||
@NetworkMod(clientSideRequired = true, serverSideRequired = false)
|
||||
public class MekanismGenerators
|
||||
{
|
||||
|
|
|
@ -10,7 +10,7 @@ public class TileEntityAdvancedSolarGenerator extends TileEntitySolarGenerator i
|
|||
{
|
||||
public TileEntityAdvancedSolarGenerator()
|
||||
{
|
||||
super("Advanced Solar Generator", 600000, 256, 256);
|
||||
super("Advanced Solar Generator", 600000, 512, 512);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -26,7 +26,7 @@ import cpw.mods.fml.common.network.NetworkMod;
|
|||
import cpw.mods.fml.common.registry.EntityRegistry;
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
|
||||
@Mod(modid = "MekanismTools", name = "MekanismTools", version = "5.0.2", dependencies = "required-after:Mekanism")
|
||||
@Mod(modid = "MekanismTools", name = "MekanismTools", version = "5.0.3", dependencies = "required-after:Mekanism")
|
||||
@NetworkMod(clientSideRequired = true, serverSideRequired = false)
|
||||
public class MekanismTools
|
||||
{
|
||||
|
@ -34,14 +34,14 @@ public class MekanismTools
|
|||
public static MekanismTools instance;
|
||||
|
||||
//Enums: Tools
|
||||
public static EnumToolMaterial toolOBSIDIAN = EnumHelper.addToolMaterial("OBSIDIAN", 3, 2500, 20F, 10, 50);
|
||||
public static EnumToolMaterial toolOBSIDIAN = EnumHelper.addToolMaterial("OBSIDIAN", 3, 2500, 20F, 10, 100);
|
||||
public static EnumToolMaterial toolOBSIDIAN2 = EnumHelper.addToolMaterial("OBSIDIAN2", 3, 3000, 25F, 10, 100);
|
||||
public static EnumToolMaterial toolLAZULI = EnumHelper.addToolMaterial("LAZULI", 2, 200, 5F, 2, 22);
|
||||
public static EnumToolMaterial toolLAZULI2 = EnumHelper.addToolMaterial("LAZULI2", 2, 250, 6F, 4, 50);
|
||||
public static EnumToolMaterial toolPLATINUM = EnumHelper.addToolMaterial("PLATINUM", 2, 500, 10F, 4, 30);
|
||||
public static EnumToolMaterial toolPLATINUM2 = EnumHelper.addToolMaterial("PLATINUM2", 3, 700, 12F, 5, 40);
|
||||
public static EnumToolMaterial toolREDSTONE = EnumHelper.addToolMaterial("REDSTONE", 2, 250, 10F, 6, 50);
|
||||
public static EnumToolMaterial toolREDSTONE2 = EnumHelper.addToolMaterial("REDSTONE2", 2, 400, 12F, 6, 60);
|
||||
public static EnumToolMaterial toolBRONZE = EnumHelper.addToolMaterial("BRONZE", 3, 1000, 16F, 6, 100);
|
||||
public static EnumToolMaterial toolBRONZE2 = EnumHelper.addToolMaterial("BRONZE2", 3, 1400, 22F, 10, 100);
|
||||
public static EnumToolMaterial toolGLOWSTONE = EnumHelper.addToolMaterial("GLOWSTONE", 2, 300, 14F, 5, 80);
|
||||
public static EnumToolMaterial toolGLOWSTONE2 = EnumHelper.addToolMaterial("GLOWSTONE2", 2, 450, 18F, 5, 100);
|
||||
public static EnumToolMaterial toolSTEEL = EnumHelper.addToolMaterial("STEEL", 3, 850, 14F, 4, 100);
|
||||
|
@ -50,10 +50,10 @@ public class MekanismTools
|
|||
//Enums: Armor
|
||||
public static EnumArmorMaterial armorOBSIDIAN = EnumHelper.addArmorMaterial("OBSIDIAN", 50, new int[]{5, 12, 8, 5}, 50);
|
||||
public static EnumArmorMaterial armorLAZULI = EnumHelper.addArmorMaterial("LAZULI", 13, new int[]{2, 5, 4, 2}, 50);
|
||||
public static EnumArmorMaterial armorPLATINUM = EnumHelper.addArmorMaterial("PLATINUM", 30, new int[]{4, 10, 7, 4}, 50);
|
||||
public static EnumArmorMaterial armorREDSTONE = EnumHelper.addArmorMaterial("REDSTONE", 16, new int[]{2, 7, 5, 3}, 50);
|
||||
public static EnumArmorMaterial armorPLATINUM = EnumHelper.addArmorMaterial("PLATINUM", 30, new int[]{3, 9, 7, 3}, 50);
|
||||
public static EnumArmorMaterial armorBRONZE = EnumHelper.addArmorMaterial("BRONZE", 42, new int[]{4, 10, 8, 4}, 50);
|
||||
public static EnumArmorMaterial armorGLOWSTONE = EnumHelper.addArmorMaterial("GLOWSTONE", 18, new int[]{3, 7, 6, 3}, 50);
|
||||
public static EnumArmorMaterial armorSTEEL = EnumHelper.addArmorMaterial("STEEL", 40, new int[] {4, 11, 8, 4}, 50);
|
||||
public static EnumArmorMaterial armorSTEEL = EnumHelper.addArmorMaterial("STEEL", 40, new int[] {4, 10, 8, 4}, 50);
|
||||
|
||||
//Base Items
|
||||
public static Item WoodPaxel;
|
||||
|
@ -75,16 +75,16 @@ public class MekanismTools
|
|||
public static Item GlowstoneBoots;
|
||||
|
||||
//Redstone Items
|
||||
public static Item RedstonePaxel;
|
||||
public static Item RedstonePickaxe;
|
||||
public static Item RedstoneAxe;
|
||||
public static Item RedstoneSpade;
|
||||
public static Item RedstoneHoe;
|
||||
public static Item RedstoneSword;
|
||||
public static Item RedstoneHelmet;
|
||||
public static Item RedstoneBody;
|
||||
public static Item RedstoneLegs;
|
||||
public static Item RedstoneBoots;
|
||||
public static Item BronzePaxel;
|
||||
public static Item BronzePickaxe;
|
||||
public static Item BronzeAxe;
|
||||
public static Item BronzeSpade;
|
||||
public static Item BronzeHoe;
|
||||
public static Item BronzeSword;
|
||||
public static Item BronzeHelmet;
|
||||
public static Item BronzeBody;
|
||||
public static Item BronzeLegs;
|
||||
public static Item BronzeBoots;
|
||||
|
||||
//Platinum Items
|
||||
public static Item PlatinumPaxel;
|
||||
|
@ -298,68 +298,68 @@ public class MekanismTools
|
|||
"* *", "* *", Character.valueOf('*'), "ingotPlatinum"
|
||||
}));
|
||||
|
||||
//Redstone
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(RedstonePaxel, 1), new Object[] {
|
||||
"XYZ", " T ", " T ", Character.valueOf('X'), RedstoneAxe, Character.valueOf('Y'), RedstonePickaxe, Character.valueOf('Z'), RedstoneSpade, Character.valueOf('T'), Item.stick
|
||||
//Bronze
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(BronzePaxel, 1), new Object[] {
|
||||
"XYZ", " T ", " T ", Character.valueOf('X'), BronzeAxe, Character.valueOf('Y'), BronzePickaxe, Character.valueOf('Z'), BronzeSpade, Character.valueOf('T'), Item.stick
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(RedstonePickaxe, 1), new Object[] {
|
||||
"XXX", " T ", " T ", Character.valueOf('X'), "ingotRedstone", Character.valueOf('T'), Item.stick
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(BronzePickaxe, 1), new Object[] {
|
||||
"XXX", " T ", " T ", Character.valueOf('X'), "ingotBronze", Character.valueOf('T'), Item.stick
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(RedstoneAxe, 1), new Object[] {
|
||||
"XX", "XT", " T", Character.valueOf('X'), "ingotRedstone", Character.valueOf('T'), Item.stick
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(BronzeAxe, 1), new Object[] {
|
||||
"XX", "XT", " T", Character.valueOf('X'), "ingotBronze", Character.valueOf('T'), Item.stick
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(RedstoneSpade, 1), new Object[] {
|
||||
"X", "T", "T", Character.valueOf('X'), "ingotRedstone", Character.valueOf('T'), Item.stick
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(BronzeSpade, 1), new Object[] {
|
||||
"X", "T", "T", Character.valueOf('X'), "ingotBronze", Character.valueOf('T'), Item.stick
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(RedstoneHoe, 1), new Object[] {
|
||||
"XX", " T", " T", Character.valueOf('X'), "ingotRedstone", Character.valueOf('T'), Item.stick
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(BronzeHoe, 1), new Object[] {
|
||||
"XX", " T", " T", Character.valueOf('X'), "ingotBronze", Character.valueOf('T'), Item.stick
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(RedstoneSword, 1), new Object[] {
|
||||
"X", "X", "T", Character.valueOf('X'), "ingotRedstone", Character.valueOf('T'), Item.stick
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(BronzeSword, 1), new Object[] {
|
||||
"X", "X", "T", Character.valueOf('X'), "ingotBronze", Character.valueOf('T'), Item.stick
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(RedstoneHelmet, 1), new Object[] {
|
||||
"***", "* *", Character.valueOf('*'), "ingotRedstone"
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(BronzeHelmet, 1), new Object[] {
|
||||
"***", "* *", Character.valueOf('*'), "ingotBronze"
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(RedstoneBody, 1), new Object[] {
|
||||
"* *", "***", "***", Character.valueOf('*'), "ingotRedstone"
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(BronzeBody, 1), new Object[] {
|
||||
"* *", "***", "***", Character.valueOf('*'), "ingotBronze"
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(RedstoneLegs, 1), new Object[] {
|
||||
"***", "* *", "* *", Character.valueOf('*'), "ingotRedstone"
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(BronzeLegs, 1), new Object[] {
|
||||
"***", "* *", "* *", Character.valueOf('*'), "ingotBronze"
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(RedstoneBoots, 1), new Object[] {
|
||||
"* *", "* *", Character.valueOf('*'), "ingotRedstone"
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(BronzeBoots, 1), new Object[] {
|
||||
"* *", "* *", Character.valueOf('*'), "ingotBronze"
|
||||
}));
|
||||
|
||||
//Steel
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(SteelPaxel, 1), new Object[] {
|
||||
"XYZ", " T ", " T ", Character.valueOf('X'), SteelAxe, Character.valueOf('Y'), SteelPickaxe, Character.valueOf('Z'), SteelSpade, Character.valueOf('T'), Item.stick
|
||||
"XYZ", " I ", " I ", Character.valueOf('X'), SteelAxe, Character.valueOf('Y'), SteelPickaxe, Character.valueOf('Z'), SteelSpade, Character.valueOf('I'), Item.ingotIron
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(SteelPickaxe, 1), new Object[] {
|
||||
"XXX", " T ", " T ", Character.valueOf('X'), "ingotRefinedSteel", Character.valueOf('T'), Item.stick
|
||||
"XXX", " I ", " I ", Character.valueOf('X'), "ingotSteel", Character.valueOf('I'), Item.ingotIron
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(SteelAxe, 1), new Object[] {
|
||||
"XX", "XT", " T", Character.valueOf('X'), "ingotRefinedSteel", Character.valueOf('T'), Item.stick
|
||||
"XX", "XI", " I", Character.valueOf('X'), "ingotSteel", Character.valueOf('I'), Item.ingotIron
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(SteelSpade, 1), new Object[] {
|
||||
"X", "T", "T", Character.valueOf('X'), "ingotRefinedSteel", Character.valueOf('T'), Item.stick
|
||||
"X", "I", "I", Character.valueOf('X'), "ingotSteel", Character.valueOf('I'), Item.ingotIron
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(SteelHoe, 1), new Object[] {
|
||||
"XX", " T", " T", Character.valueOf('X'), "ingotRefinedSteel", Character.valueOf('T'), Item.stick
|
||||
"XX", " I", " I", Character.valueOf('X'), "ingotSteel", Character.valueOf('I'), Item.ingotIron
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(SteelSword, 1), new Object[] {
|
||||
"X", "X", "T", Character.valueOf('X'), "ingotRefinedSteel", Character.valueOf('T'), Item.stick
|
||||
"X", "X", "I", Character.valueOf('X'), "ingotSteel", Character.valueOf('I'), Item.ingotIron
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(SteelHelmet, 1), new Object[] {
|
||||
"***", "* *", Character.valueOf('*'), "ingotRefinedSteel"
|
||||
"***", "I I", Character.valueOf('*'), "ingotSteel", Character.valueOf('I'), Item.ingotIron
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(SteelBody, 1), new Object[] {
|
||||
"* *", "***", "***", Character.valueOf('*'), "ingotRefinedSteel"
|
||||
"I I", "*I*", "***", Character.valueOf('*'), "ingotSteel", Character.valueOf('I'), Item.ingotIron
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(SteelLegs, 1), new Object[] {
|
||||
"***", "* *", "* *", Character.valueOf('*'), "ingotRefinedSteel"
|
||||
"I*I", "* *", "* *", Character.valueOf('*'), "ingotSteel", Character.valueOf('I'), Item.ingotIron
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(SteelBoots, 1), new Object[] {
|
||||
"* *", "* *", Character.valueOf('*'), "ingotRefinedSteel"
|
||||
"I *", "* I", Character.valueOf('*'), "ingotSteel", Character.valueOf('I'), Item.ingotIron
|
||||
}));
|
||||
}
|
||||
|
||||
|
@ -409,16 +409,16 @@ public class MekanismTools
|
|||
LanguageRegistry.addName(PlatinumSword, "Platinum Sword");
|
||||
|
||||
//Redstone
|
||||
LanguageRegistry.addName(RedstoneHelmet, "Redstone Helmet");
|
||||
LanguageRegistry.addName(RedstoneBody, "Redstone Chestplate");
|
||||
LanguageRegistry.addName(RedstoneLegs, "Redstone Leggings");
|
||||
LanguageRegistry.addName(RedstoneBoots, "Redstone Boots");
|
||||
LanguageRegistry.addName(RedstonePaxel, "Redstone Paxel");
|
||||
LanguageRegistry.addName(RedstonePickaxe, "Redstone Pickaxe");
|
||||
LanguageRegistry.addName(RedstoneAxe, "Redstone Axe");
|
||||
LanguageRegistry.addName(RedstoneSpade, "Redstone Shovel");
|
||||
LanguageRegistry.addName(RedstoneHoe, "Redstone Hoe");
|
||||
LanguageRegistry.addName(RedstoneSword, "Redstone Sword");
|
||||
LanguageRegistry.addName(BronzeHelmet, "Bronze Helmet");
|
||||
LanguageRegistry.addName(BronzeBody, "Bronze Chestplate");
|
||||
LanguageRegistry.addName(BronzeLegs, "Bronze Leggings");
|
||||
LanguageRegistry.addName(BronzeBoots, "Bronze Boots");
|
||||
LanguageRegistry.addName(BronzePaxel, "Bronze Paxel");
|
||||
LanguageRegistry.addName(BronzePickaxe, "Bronze Pickaxe");
|
||||
LanguageRegistry.addName(BronzeAxe, "Bronze Axe");
|
||||
LanguageRegistry.addName(BronzeSpade, "Bronze Shovel");
|
||||
LanguageRegistry.addName(BronzeHoe, "Bronze Hoe");
|
||||
LanguageRegistry.addName(BronzeSword, "Bronze Sword");
|
||||
|
||||
//Glowstone
|
||||
LanguageRegistry.addName(GlowstonePaxel, "Glowstone Paxel");
|
||||
|
@ -467,16 +467,16 @@ public class MekanismTools
|
|||
GlowstoneSword.setIconIndex(132);
|
||||
|
||||
//Redstone
|
||||
RedstoneHelmet.setIconIndex(3);
|
||||
RedstoneBody.setIconIndex(19);
|
||||
RedstoneLegs.setIconIndex(35);
|
||||
RedstoneBoots.setIconIndex(51);
|
||||
RedstonePaxel.setIconIndex(147);
|
||||
RedstonePickaxe.setIconIndex(67);
|
||||
RedstoneAxe.setIconIndex(83);
|
||||
RedstoneSpade.setIconIndex(99);
|
||||
RedstoneHoe.setIconIndex(115);
|
||||
RedstoneSword.setIconIndex(131);
|
||||
BronzeHelmet.setIconIndex(3);
|
||||
BronzeBody.setIconIndex(19);
|
||||
BronzeLegs.setIconIndex(35);
|
||||
BronzeBoots.setIconIndex(51);
|
||||
BronzePaxel.setIconIndex(147);
|
||||
BronzePickaxe.setIconIndex(67);
|
||||
BronzeAxe.setIconIndex(83);
|
||||
BronzeSpade.setIconIndex(99);
|
||||
BronzeHoe.setIconIndex(115);
|
||||
BronzeSword.setIconIndex(131);
|
||||
|
||||
//Platinum
|
||||
PlatinumHelmet.setIconIndex(2);
|
||||
|
@ -529,17 +529,17 @@ public class MekanismTools
|
|||
|
||||
public void addItems()
|
||||
{
|
||||
//Redstone
|
||||
RedstoneHelmet = (new ItemMekanismArmor(11400, armorREDSTONE, Mekanism.proxy.getArmorIndex("redstone"), 0)).setItemName("RedstoneHelmet");
|
||||
RedstoneBody = (new ItemMekanismArmor(11401, armorREDSTONE, Mekanism.proxy.getArmorIndex("redstone"), 1)).setItemName("RedstoneBody");
|
||||
RedstoneLegs = (new ItemMekanismArmor(11402, armorREDSTONE, Mekanism.proxy.getArmorIndex("redstone"), 2)).setItemName("RedstoneLegs");
|
||||
RedstoneBoots = (new ItemMekanismArmor(11403, armorREDSTONE, Mekanism.proxy.getArmorIndex("redstone"), 3)).setItemName("RedstoneBoots");
|
||||
RedstonePaxel = new ItemMekanismPaxel(11404, toolREDSTONE2).setItemName("RedstonePaxel");
|
||||
RedstonePickaxe = new ItemMekanismPickaxe(11405, toolREDSTONE).setItemName("RedstonePickaxe");
|
||||
RedstoneAxe = new ItemMekanismAxe(11406, toolREDSTONE).setItemName("RedstoneAxe");
|
||||
RedstoneSpade = new ItemMekanismSpade(11407, toolREDSTONE).setItemName("RedstoneSpade");
|
||||
RedstoneHoe = new ItemMekanismHoe(11408, toolREDSTONE).setItemName("RedstoneHoe");
|
||||
RedstoneSword = new ItemMekanismSword(11409, toolREDSTONE).setItemName("RedstoneSword");
|
||||
//Bronze
|
||||
BronzeHelmet = (new ItemMekanismArmor(11400, armorBRONZE, Mekanism.proxy.getArmorIndex("bronze"), 0)).setItemName("BronzeHelmet");
|
||||
BronzeBody = (new ItemMekanismArmor(11401, armorBRONZE, Mekanism.proxy.getArmorIndex("bronze"), 1)).setItemName("BronzeBody");
|
||||
BronzeLegs = (new ItemMekanismArmor(11402, armorBRONZE, Mekanism.proxy.getArmorIndex("bronze"), 2)).setItemName("BronzeLegs");
|
||||
BronzeBoots = (new ItemMekanismArmor(11403, armorBRONZE, Mekanism.proxy.getArmorIndex("bronze"), 3)).setItemName("BronzeBoots");
|
||||
BronzePaxel = new ItemMekanismPaxel(11404, toolBRONZE2).setItemName("BronzePaxel");
|
||||
BronzePickaxe = new ItemMekanismPickaxe(11405, toolBRONZE).setItemName("BronzePickaxe");
|
||||
BronzeAxe = new ItemMekanismAxe(11406, toolBRONZE).setItemName("BronzeAxe");
|
||||
BronzeSpade = new ItemMekanismSpade(11407, toolBRONZE).setItemName("BronzeSpade");
|
||||
BronzeHoe = new ItemMekanismHoe(11408, toolBRONZE).setItemName("BronzeHoe");
|
||||
BronzeSword = new ItemMekanismSword(11409, toolBRONZE).setItemName("BronzeSword");
|
||||
|
||||
//Platinum
|
||||
PlatinumHelmet = (new ItemMekanismArmor(11410, EnumArmorMaterial.DIAMOND, Mekanism.proxy.getArmorIndex("platinum"), 0)).setItemName("PlatinumHelmet");
|
||||
|
@ -603,10 +603,10 @@ public class MekanismTools
|
|||
SteelSpade = new ItemMekanismSpade(11458, toolSTEEL).setItemName("SteelSpade");
|
||||
SteelHoe = new ItemMekanismHoe(11459, toolSTEEL).setItemName("SteelHoe");
|
||||
SteelSword = new ItemMekanismSword(11460, toolSTEEL).setItemName("SteelSword");
|
||||
SteelHelmet = new ItemMekanismArmor(11461, armorSTEEL, Mekanism.proxy.getArmorIndex("Steel"), 0).setItemName("SteelHelmet");
|
||||
SteelBody = new ItemMekanismArmor(11462, armorSTEEL, Mekanism.proxy.getArmorIndex("Steel"), 1).setItemName("SteelBody");
|
||||
SteelLegs = new ItemMekanismArmor(11463, armorSTEEL, Mekanism.proxy.getArmorIndex("Steel"), 2).setItemName("SteelLegs");
|
||||
SteelBoots = new ItemMekanismArmor(11464, armorSTEEL, Mekanism.proxy.getArmorIndex("Steel"), 3).setItemName("SteelBoots");
|
||||
SteelHelmet = new ItemMekanismArmor(11461, armorSTEEL, Mekanism.proxy.getArmorIndex("steel"), 0).setItemName("SteelHelmet");
|
||||
SteelBody = new ItemMekanismArmor(11462, armorSTEEL, Mekanism.proxy.getArmorIndex("steel"), 1).setItemName("SteelBody");
|
||||
SteelLegs = new ItemMekanismArmor(11463, armorSTEEL, Mekanism.proxy.getArmorIndex("steel"), 2).setItemName("SteelLegs");
|
||||
SteelBoots = new ItemMekanismArmor(11464, armorSTEEL, Mekanism.proxy.getArmorIndex("steel"), 3).setItemName("SteelBoots");
|
||||
}
|
||||
|
||||
@ForgeSubscribe
|
||||
|
@ -615,9 +615,9 @@ public class MekanismTools
|
|||
Random random = new Random();
|
||||
|
||||
int chance = random.nextInt(100);
|
||||
int secondChance = random.nextInt(4);
|
||||
int secondChance = random.nextInt(3);
|
||||
|
||||
if(chance < 5)
|
||||
if(chance < 4)
|
||||
{
|
||||
if(event.entityLiving instanceof EntityZombie || event.entityLiving instanceof EntitySkeleton)
|
||||
{
|
||||
|
@ -638,14 +638,6 @@ public class MekanismTools
|
|||
event.entityLiving.setCurrentItemOrArmor(4, new ItemStack(LazuliBoots));
|
||||
}
|
||||
else if(secondChance == 2)
|
||||
{
|
||||
if(event.entityLiving instanceof EntityZombie) event.entityLiving.setCurrentItemOrArmor(0, new ItemStack(RedstoneSword));
|
||||
event.entityLiving.setCurrentItemOrArmor(1, new ItemStack(RedstoneHelmet));
|
||||
event.entityLiving.setCurrentItemOrArmor(2, new ItemStack(RedstoneBody));
|
||||
event.entityLiving.setCurrentItemOrArmor(3, new ItemStack(RedstoneLegs));
|
||||
event.entityLiving.setCurrentItemOrArmor(4, new ItemStack(RedstoneBoots));
|
||||
}
|
||||
else if(secondChance == 3)
|
||||
{
|
||||
if(event.entityLiving instanceof EntityZombie) event.entityLiving.setCurrentItemOrArmor(0, new ItemStack(PlatinumSword));
|
||||
event.entityLiving.setCurrentItemOrArmor(1, new ItemStack(PlatinumHelmet));
|
||||
|
|