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