v5.2.0 Beta #1
*Updated textures. *Added top and bottom textures for Smelting Factory. *Revamped and simplified Recipe Handler. *Individual GUI classes for NEI. *Fixed portable teleporter text and button. *Added Purification Chamber. *Added Chunks. *Added Dirty Dusts. *Made Smelting Factory work with ISidedInventory, and in turn changed some slot IDs. *Fixed portable teleporters able to provide electricity. *Fixed ore dictionary names. *Made the Combiner require 8 dusts of a resource to function. *Added config for update notifications. *Fixed damage when teleporting. *Added sounds when teleporting. *Fixed secondary energy calculations on AdvancedElectricMachine. *Made machines able to maintain their progress when unable to operate. *Fixed Energy Cubes unable to input BC power. *Other minor bugfixes.
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 5.2 KiB |
BIN
bin/minecraft/resources/mekanism/gui/GuiPurificationChamber.png
Executable file
After Width: | Height: | Size: 5.1 KiB |
BIN
bin/minecraft/resources/mekanism/sound/PurificationChamber.ogg
Normal file
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 34 KiB |
|
@ -1,5 +1,6 @@
|
||||||
package mekanism.api;
|
package mekanism.api;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -26,8 +27,7 @@ public interface IElectricMachine
|
||||||
public void operate();
|
public void operate();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the recipe vector from the machine tile entity.
|
* Gets this machine's recipes.
|
||||||
* @return recipes
|
|
||||||
*/
|
*/
|
||||||
public Map getRecipes();
|
public HashMap getRecipes();
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,7 @@ import mekanism.common.TileEntityElectricMachine;
|
||||||
import mekanism.common.TileEntityEnergyCube;
|
import mekanism.common.TileEntityEnergyCube;
|
||||||
import mekanism.common.TileEntityGasTank;
|
import mekanism.common.TileEntityGasTank;
|
||||||
import mekanism.common.TileEntityMetallurgicInfuser;
|
import mekanism.common.TileEntityMetallurgicInfuser;
|
||||||
|
import mekanism.common.TileEntityPurificationChamber;
|
||||||
import mekanism.common.TileEntitySmeltingFactory;
|
import mekanism.common.TileEntitySmeltingFactory;
|
||||||
import mekanism.common.TileEntityTeleporter;
|
import mekanism.common.TileEntityTeleporter;
|
||||||
import mekanism.common.TileEntityTheoreticalElementizer;
|
import mekanism.common.TileEntityTheoreticalElementizer;
|
||||||
|
@ -77,6 +78,7 @@ public class ClientProxy extends CommonProxy
|
||||||
MinecraftForgeClient.preloadTexture("/resources/mekanism/animate/ElementizerSide.png");
|
MinecraftForgeClient.preloadTexture("/resources/mekanism/animate/ElementizerSide.png");
|
||||||
MinecraftForgeClient.preloadTexture("/resources/mekanism/animate/HydrogenFront.png");
|
MinecraftForgeClient.preloadTexture("/resources/mekanism/animate/HydrogenFront.png");
|
||||||
MinecraftForgeClient.preloadTexture("/resources/mekanism/animate/HydrogenSide.png");
|
MinecraftForgeClient.preloadTexture("/resources/mekanism/animate/HydrogenSide.png");
|
||||||
|
MinecraftForgeClient.preloadTexture("/resources/mekanism/animate/PurificationChamberFront.png");
|
||||||
|
|
||||||
//Register animated TextureFX
|
//Register animated TextureFX
|
||||||
try {
|
try {
|
||||||
|
@ -88,6 +90,7 @@ public class ClientProxy extends CommonProxy
|
||||||
TextureFXManager.instance().addAnimation(new TextureAnimatedFX("/resources/mekanism/animate/ElementizerSide.png", Mekanism.ANIMATED_TEXTURE_INDEX+6));
|
TextureFXManager.instance().addAnimation(new TextureAnimatedFX("/resources/mekanism/animate/ElementizerSide.png", Mekanism.ANIMATED_TEXTURE_INDEX+6));
|
||||||
TextureFXManager.instance().addAnimation(new TextureAnimatedFX("/resources/mekanism/animate/InfuserFront.png", Mekanism.ANIMATED_TEXTURE_INDEX+7));
|
TextureFXManager.instance().addAnimation(new TextureAnimatedFX("/resources/mekanism/animate/InfuserFront.png", Mekanism.ANIMATED_TEXTURE_INDEX+7));
|
||||||
TextureFXManager.instance().addAnimation(new TextureAnimatedFX("/resources/mekanism/animate/InfuserSide.png", Mekanism.ANIMATED_TEXTURE_INDEX+8));
|
TextureFXManager.instance().addAnimation(new TextureAnimatedFX("/resources/mekanism/animate/InfuserSide.png", Mekanism.ANIMATED_TEXTURE_INDEX+8));
|
||||||
|
TextureFXManager.instance().addAnimation(new TextureAnimatedFX("/resources/mekanism/animate/PurificationChamberFront.png", Mekanism.ANIMATED_TEXTURE_INDEX+9));
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
System.err.println("[Mekanism] Error registering animation with FML: " + e.getMessage());
|
System.err.println("[Mekanism] Error registering animation with FML: " + e.getMessage());
|
||||||
}
|
}
|
||||||
|
@ -135,13 +138,13 @@ public class ClientProxy extends CommonProxy
|
||||||
case 2:
|
case 2:
|
||||||
return new GuiWeatherOrb(player);
|
return new GuiWeatherOrb(player);
|
||||||
case 3:
|
case 3:
|
||||||
return new GuiElectricMachine(player.inventory, (TileEntityElectricMachine)tileEntity);
|
return new GuiEnrichmentChamber(player.inventory, (TileEntityElectricMachine)tileEntity);
|
||||||
case 4:
|
case 4:
|
||||||
return new GuiAdvancedElectricMachine(player.inventory, (TileEntityAdvancedElectricMachine)tileEntity);
|
return new GuiPlatinumCompressor(player.inventory, (TileEntityAdvancedElectricMachine)tileEntity);
|
||||||
case 5:
|
case 5:
|
||||||
return new GuiAdvancedElectricMachine(player.inventory, (TileEntityAdvancedElectricMachine)tileEntity);
|
return new GuiCombiner(player.inventory, (TileEntityAdvancedElectricMachine)tileEntity);
|
||||||
case 6:
|
case 6:
|
||||||
return new GuiElectricMachine(player.inventory, (TileEntityElectricMachine)tileEntity);
|
return new GuiCrusher(player.inventory, (TileEntityElectricMachine)tileEntity);
|
||||||
case 7:
|
case 7:
|
||||||
return new GuiTheoreticalElementizer(player.inventory, (TileEntityTheoreticalElementizer)tileEntity);
|
return new GuiTheoreticalElementizer(player.inventory, (TileEntityTheoreticalElementizer)tileEntity);
|
||||||
case 8:
|
case 8:
|
||||||
|
@ -162,6 +165,8 @@ public class ClientProxy extends CommonProxy
|
||||||
{
|
{
|
||||||
return new GuiPortableTeleporter(player, itemStack);
|
return new GuiPortableTeleporter(player, itemStack);
|
||||||
}
|
}
|
||||||
|
case 15:
|
||||||
|
return new GuiPurificationChamber(player.inventory, (TileEntityAdvancedElectricMachine)tileEntity);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
12
src/minecraft/mekanism/client/GuiCombiner.java
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
package mekanism.client;
|
||||||
|
|
||||||
|
import mekanism.common.TileEntityAdvancedElectricMachine;
|
||||||
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
|
|
||||||
|
public class GuiCombiner extends GuiAdvancedElectricMachine
|
||||||
|
{
|
||||||
|
public GuiCombiner(InventoryPlayer inventory, TileEntityAdvancedElectricMachine tentity)
|
||||||
|
{
|
||||||
|
super(inventory, tentity);
|
||||||
|
}
|
||||||
|
}
|
12
src/minecraft/mekanism/client/GuiCrusher.java
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
package mekanism.client;
|
||||||
|
|
||||||
|
import mekanism.common.TileEntityElectricMachine;
|
||||||
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
|
|
||||||
|
public class GuiCrusher extends GuiElectricMachine
|
||||||
|
{
|
||||||
|
public GuiCrusher(InventoryPlayer inventory, TileEntityElectricMachine tentity)
|
||||||
|
{
|
||||||
|
super(inventory, tentity);
|
||||||
|
}
|
||||||
|
}
|
12
src/minecraft/mekanism/client/GuiEnrichmentChamber.java
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
package mekanism.client;
|
||||||
|
|
||||||
|
import mekanism.common.TileEntityElectricMachine;
|
||||||
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
|
|
||||||
|
public class GuiEnrichmentChamber extends GuiElectricMachine
|
||||||
|
{
|
||||||
|
public GuiEnrichmentChamber(InventoryPlayer inventory, TileEntityElectricMachine tentity)
|
||||||
|
{
|
||||||
|
super(inventory, tentity);
|
||||||
|
}
|
||||||
|
}
|
12
src/minecraft/mekanism/client/GuiPlatinumCompressor.java
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
package mekanism.client;
|
||||||
|
|
||||||
|
import mekanism.common.TileEntityAdvancedElectricMachine;
|
||||||
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
|
|
||||||
|
public class GuiPlatinumCompressor extends GuiAdvancedElectricMachine
|
||||||
|
{
|
||||||
|
public GuiPlatinumCompressor(InventoryPlayer inventory, TileEntityAdvancedElectricMachine tentity)
|
||||||
|
{
|
||||||
|
super(inventory, tentity);
|
||||||
|
}
|
||||||
|
}
|
|
@ -65,8 +65,11 @@ public class GuiPortableTeleporter extends GuiScreen
|
||||||
|
|
||||||
ItemPortableTeleporter item = (ItemPortableTeleporter)itemStack.getItem();
|
ItemPortableTeleporter item = (ItemPortableTeleporter)itemStack.getItem();
|
||||||
|
|
||||||
fontRenderer.drawString("Portable Teleporter", 160, 43, 0x404040);
|
((GuiButton)controlList.get(0)).xPosition = guiWidth+48;
|
||||||
fontRenderer.drawString(item.getStatusAsString(item.getStatus(itemStack)), 178, 56, 0x00CD00);
|
((GuiButton)controlList.get(0)).yPosition = guiHeight+68;
|
||||||
|
|
||||||
|
fontRenderer.drawString("Portable Teleporter", guiWidth+39, guiHeight+6, 0x404040);
|
||||||
|
fontRenderer.drawString(item.getStatusAsString(item.getStatus(itemStack)), guiWidth+53, guiHeight+19, 0x00CD00);
|
||||||
super.drawScreen(i, j, f);
|
super.drawScreen(i, j, f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
12
src/minecraft/mekanism/client/GuiPurificationChamber.java
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
package mekanism.client;
|
||||||
|
|
||||||
|
import mekanism.common.TileEntityAdvancedElectricMachine;
|
||||||
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
|
|
||||||
|
public class GuiPurificationChamber extends GuiAdvancedElectricMachine
|
||||||
|
{
|
||||||
|
public GuiPurificationChamber(InventoryPlayer inventory, TileEntityAdvancedElectricMachine tentity)
|
||||||
|
{
|
||||||
|
super(inventory, tentity);
|
||||||
|
}
|
||||||
|
}
|
|
@ -50,8 +50,7 @@ public class GuiSmeltingFactory extends GuiContainer
|
||||||
drawTexturedModalRect(guiWidth + xAxis, guiHeight + 33, 176, 52, 8, displayInt);
|
drawTexturedModalRect(guiWidth + xAxis, guiHeight + 33, 176, 52, 8, displayInt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if(tileEntity.tier == SmeltingFactoryTier.ADVANCED)
|
||||||
if(tileEntity.tier == SmeltingFactoryTier.ADVANCED)
|
|
||||||
{
|
{
|
||||||
for(int i = 0; i < tileEntity.tier.processes; i++)
|
for(int i = 0; i < tileEntity.tier.processes; i++)
|
||||||
{
|
{
|
||||||
|
@ -61,8 +60,7 @@ public class GuiSmeltingFactory extends GuiContainer
|
||||||
drawTexturedModalRect(guiWidth + xAxis, guiHeight + 33, 176, 52, 8, displayInt);
|
drawTexturedModalRect(guiWidth + xAxis, guiHeight + 33, 176, 52, 8, displayInt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if(tileEntity.tier == SmeltingFactoryTier.ELITE)
|
||||||
if(tileEntity.tier == SmeltingFactoryTier.ELITE)
|
|
||||||
{
|
{
|
||||||
for(int i = 0; i < tileEntity.tier.processes; i++)
|
for(int i = 0; i < tileEntity.tier.processes; i++)
|
||||||
{
|
{
|
||||||
|
|
|
@ -34,6 +34,7 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||||
* 6: Advanced Smelting Factory
|
* 6: Advanced Smelting Factory
|
||||||
* 7: Elite Smelting Factory
|
* 7: Elite Smelting Factory
|
||||||
* 8: Metallurgic Infuser
|
* 8: Metallurgic Infuser
|
||||||
|
* 9: Purification Chamber
|
||||||
* @author AidanBrady
|
* @author AidanBrady
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -130,7 +131,7 @@ public class BlockMachine extends BlockContainer
|
||||||
return 9;
|
return 9;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return 2;
|
return 26;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(meta == 1)
|
else if(meta == 1)
|
||||||
|
@ -140,7 +141,7 @@ public class BlockMachine extends BlockContainer
|
||||||
return 14;
|
return 14;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return 2;
|
return 26;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(meta == 2)
|
else if(meta == 2)
|
||||||
|
@ -183,6 +184,10 @@ public class BlockMachine extends BlockContainer
|
||||||
{
|
{
|
||||||
return 41;
|
return 41;
|
||||||
}
|
}
|
||||||
|
else if(side == 0 || side == 1)
|
||||||
|
{
|
||||||
|
return 47;
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
return 44;
|
return 44;
|
||||||
}
|
}
|
||||||
|
@ -193,6 +198,10 @@ public class BlockMachine extends BlockContainer
|
||||||
{
|
{
|
||||||
return 42;
|
return 42;
|
||||||
}
|
}
|
||||||
|
else if(side == 0 || side == 1)
|
||||||
|
{
|
||||||
|
return 48;
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
return 45;
|
return 45;
|
||||||
}
|
}
|
||||||
|
@ -203,6 +212,10 @@ public class BlockMachine extends BlockContainer
|
||||||
{
|
{
|
||||||
return 43;
|
return 43;
|
||||||
}
|
}
|
||||||
|
else if(side == 0 || side == 1)
|
||||||
|
{
|
||||||
|
return 49;
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
return 46;
|
return 46;
|
||||||
}
|
}
|
||||||
|
@ -217,6 +230,16 @@ public class BlockMachine extends BlockContainer
|
||||||
return 32;
|
return 32;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if(meta == 9)
|
||||||
|
{
|
||||||
|
if(side == 3)
|
||||||
|
{
|
||||||
|
return 12;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -236,7 +259,7 @@ public class BlockMachine extends BlockContainer
|
||||||
return MekanismUtils.isActive(world, x, y, z) ? 8 : 9;
|
return MekanismUtils.isActive(world, x, y, z) ? 8 : 9;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return 2;
|
return 26;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(metadata == 1)
|
else if(metadata == 1)
|
||||||
|
@ -246,7 +269,7 @@ public class BlockMachine extends BlockContainer
|
||||||
return MekanismUtils.isActive(world, x, y, z) ? Mekanism.ANIMATED_TEXTURE_INDEX+2 : 14;
|
return MekanismUtils.isActive(world, x, y, z) ? Mekanism.ANIMATED_TEXTURE_INDEX+2 : 14;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return 2;
|
return 26;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(metadata == 2)
|
else if(metadata == 2)
|
||||||
|
@ -295,6 +318,10 @@ public class BlockMachine extends BlockContainer
|
||||||
{
|
{
|
||||||
return 41;
|
return 41;
|
||||||
}
|
}
|
||||||
|
else if(side == 0 || side == 1)
|
||||||
|
{
|
||||||
|
return 47;
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
return 44;
|
return 44;
|
||||||
}
|
}
|
||||||
|
@ -305,6 +332,10 @@ public class BlockMachine extends BlockContainer
|
||||||
{
|
{
|
||||||
return 42;
|
return 42;
|
||||||
}
|
}
|
||||||
|
else if(side == 0 || side == 1)
|
||||||
|
{
|
||||||
|
return 48;
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
return 45;
|
return 45;
|
||||||
}
|
}
|
||||||
|
@ -315,6 +346,10 @@ public class BlockMachine extends BlockContainer
|
||||||
{
|
{
|
||||||
return 43;
|
return 43;
|
||||||
}
|
}
|
||||||
|
else if(side == 0 || side == 1)
|
||||||
|
{
|
||||||
|
return 49;
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
return 46;
|
return 46;
|
||||||
}
|
}
|
||||||
|
@ -329,6 +364,16 @@ public class BlockMachine extends BlockContainer
|
||||||
return MekanismUtils.isActive(world, x, y, z) ? Mekanism.ANIMATED_TEXTURE_INDEX+8 : 32;
|
return MekanismUtils.isActive(world, x, y, z) ? Mekanism.ANIMATED_TEXTURE_INDEX+8 : 32;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if(metadata == 9)
|
||||||
|
{
|
||||||
|
if(side == tileEntity.facing)
|
||||||
|
{
|
||||||
|
return MekanismUtils.isActive(world, x, y, z) ? Mekanism.ANIMATED_TEXTURE_INDEX+9 : 12;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -358,6 +403,7 @@ public class BlockMachine extends BlockContainer
|
||||||
list.add(new ItemStack(i, 1, 6));
|
list.add(new ItemStack(i, 1, 6));
|
||||||
list.add(new ItemStack(i, 1, 7));
|
list.add(new ItemStack(i, 1, 7));
|
||||||
list.add(new ItemStack(i, 1, 8));
|
list.add(new ItemStack(i, 1, 8));
|
||||||
|
list.add(new ItemStack(i, 1, 9));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -504,7 +550,8 @@ public class BlockMachine extends BlockContainer
|
||||||
BASIC_SMELTING_FACTORY(5, 11, TileEntitySmeltingFactory.class, false),
|
BASIC_SMELTING_FACTORY(5, 11, TileEntitySmeltingFactory.class, false),
|
||||||
ADVANCED_SMELTING_FACTORY(6, 11, TileEntityAdvancedSmeltingFactory.class, false),
|
ADVANCED_SMELTING_FACTORY(6, 11, TileEntityAdvancedSmeltingFactory.class, false),
|
||||||
ELITE_SMELTING_FACTORY(7, 11, TileEntityEliteSmeltingFactory.class, false),
|
ELITE_SMELTING_FACTORY(7, 11, TileEntityEliteSmeltingFactory.class, false),
|
||||||
METALLURGIC_INFUSER(8, 12, TileEntityMetallurgicInfuser.class, false);
|
METALLURGIC_INFUSER(8, 12, TileEntityMetallurgicInfuser.class, false),
|
||||||
|
PURIFICATION_CHAMBER(9, 15, TileEntityPurificationChamber.class, false);
|
||||||
|
|
||||||
public int meta;
|
public int meta;
|
||||||
public int guiId;
|
public int guiId;
|
||||||
|
|
|
@ -66,8 +66,9 @@ public class CommonProxy
|
||||||
Mekanism.gasTankID = Mekanism.configuration.getBlock("GasTank", 3006).getInt();
|
Mekanism.gasTankID = Mekanism.configuration.getBlock("GasTank", 3006).getInt();
|
||||||
Mekanism.extrasEnabled = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "ExtrasEnabled", true).getBoolean(true);
|
Mekanism.extrasEnabled = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "ExtrasEnabled", true).getBoolean(true);
|
||||||
Mekanism.platinumGenerationEnabled = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "PlatinumGenerationEnabled", true).getBoolean(true);
|
Mekanism.platinumGenerationEnabled = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "PlatinumGenerationEnabled", true).getBoolean(true);
|
||||||
Mekanism.disableBCSteelCrafting = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "DisableBCSteelCrafting", true).getBoolean(true);
|
Mekanism.disableBCSteelCrafting = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "DisableBCSteelCrafting", false).getBoolean(true);
|
||||||
Mekanism.disableBCBronzeCrafting = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "DisableBCBronzeCrafting", true).getBoolean(true);
|
Mekanism.disableBCBronzeCrafting = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "DisableBCBronzeCrafting", false).getBoolean(true);
|
||||||
|
Mekanism.notifyNewReleases = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "NotifyNewReleases", false).getBoolean(true);
|
||||||
Mekanism.configuration.save();
|
Mekanism.configuration.save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -145,6 +146,8 @@ public class CommonProxy
|
||||||
return new ContainerMetallurgicInfuser(player.inventory, (TileEntityMetallurgicInfuser)tileEntity);
|
return new ContainerMetallurgicInfuser(player.inventory, (TileEntityMetallurgicInfuser)tileEntity);
|
||||||
case 13:
|
case 13:
|
||||||
return new ContainerTeleporter(player.inventory, (TileEntityTeleporter)tileEntity);
|
return new ContainerTeleporter(player.inventory, (TileEntityTeleporter)tileEntity);
|
||||||
|
case 15:
|
||||||
|
return new ContainerAdvancedElectricMachine(player.inventory, (TileEntityAdvancedElectricMachine)tileEntity);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@ import ic2.api.IElectricItem;
|
||||||
import mekanism.api.InfusionInput;
|
import mekanism.api.InfusionInput;
|
||||||
import mekanism.api.InfusionOutput;
|
import mekanism.api.InfusionOutput;
|
||||||
import mekanism.api.InfusionType;
|
import mekanism.api.InfusionType;
|
||||||
|
import mekanism.common.RecipeHandler.Recipe;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
import net.minecraft.inventory.Container;
|
import net.minecraft.inventory.Container;
|
||||||
|
@ -97,7 +98,7 @@ public class ContainerMetallurgicInfuser extends Container
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(RecipeHandler.getOutput(InfusionInput.getInfusion(tileEntity.type, tileEntity.infuseStored, slotStack), false, TileEntityMetallurgicInfuser.recipes) != null)
|
else if(RecipeHandler.getOutput(InfusionInput.getInfusion(tileEntity.type, tileEntity.infuseStored, slotStack), false, Recipe.METALLURGIC_INFUSER.get()) != null)
|
||||||
{
|
{
|
||||||
if(!mergeItemStack(slotStack, 2, 3, false))
|
if(!mergeItemStack(slotStack, 2, 3, false))
|
||||||
{
|
{
|
||||||
|
|
|
@ -30,30 +30,46 @@ public class ContainerSmeltingFactory extends Container
|
||||||
{
|
{
|
||||||
int xAxis = 55 + (i*38);
|
int xAxis = 55 + (i*38);
|
||||||
|
|
||||||
addSlotToContainer(new Slot(tentity, 2+i*2, xAxis, 13));
|
addSlotToContainer(new Slot(tentity, 2+i, xAxis, 13));
|
||||||
addSlotToContainer(new SlotFurnace(inventory.player, tentity, 3+i*2, xAxis, 57));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for(int i = 0; i < tileEntity.tier.processes; i++)
|
||||||
|
{
|
||||||
|
int xAxis = 55 + (i*38);
|
||||||
|
|
||||||
|
addSlotToContainer(new SlotFurnace(inventory.player, tentity, tileEntity.tier.processes+2+i, xAxis, 57));
|
||||||
|
}
|
||||||
|
}
|
||||||
else if(tileEntity.tier == SmeltingFactoryTier.ADVANCED)
|
else if(tileEntity.tier == SmeltingFactoryTier.ADVANCED)
|
||||||
{
|
{
|
||||||
for(int i = 0; i < tileEntity.tier.processes; i++)
|
for(int i = 0; i < tileEntity.tier.processes; i++)
|
||||||
{
|
{
|
||||||
int xAxis = 35 + (i*26);
|
int xAxis = 35 + (i*26);
|
||||||
|
|
||||||
addSlotToContainer(new Slot(tentity, 2+i*2, xAxis, 13));
|
addSlotToContainer(new Slot(tentity, 2+i, xAxis, 13));
|
||||||
addSlotToContainer(new SlotFurnace(inventory.player, tentity, 3+i*2, xAxis, 57));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for(int i = 0; i < tileEntity.tier.processes; i++)
|
||||||
|
{
|
||||||
|
int xAxis = 35 + (i*26);
|
||||||
|
|
||||||
|
addSlotToContainer(new SlotFurnace(inventory.player, tentity, tileEntity.tier.processes+2+i, xAxis, 57));
|
||||||
|
}
|
||||||
|
}
|
||||||
else if(tileEntity.tier == SmeltingFactoryTier.ELITE)
|
else if(tileEntity.tier == SmeltingFactoryTier.ELITE)
|
||||||
{
|
{
|
||||||
for(int i = 0; i < tileEntity.tier.processes; i++)
|
for(int i = 0; i < tileEntity.tier.processes; i++)
|
||||||
{
|
{
|
||||||
int xAxis = 29 + (i*19);
|
int xAxis = 29 + (i*19);
|
||||||
|
|
||||||
addSlotToContainer(new Slot(tentity, 2+i*2, xAxis, 13));
|
addSlotToContainer(new Slot(tentity, 2+i, xAxis, 13));
|
||||||
addSlotToContainer(new SlotFurnace(inventory.player, tentity, 3+i*2, xAxis, 57));
|
}
|
||||||
|
|
||||||
|
for(int i = 0; i < tileEntity.tier.processes; i++)
|
||||||
|
{
|
||||||
|
int xAxis = 29 + (i*19);
|
||||||
|
|
||||||
|
addSlotToContainer(new SlotFurnace(inventory.player, tentity, tileEntity.tier.processes+2+i, xAxis, 57));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -127,35 +143,11 @@ public class ContainerSmeltingFactory extends Container
|
||||||
{
|
{
|
||||||
if(!isInputSlot(slotID))
|
if(!isInputSlot(slotID))
|
||||||
{
|
{
|
||||||
if(!mergeItemStack(slotStack, 2, 3, false))
|
if(!mergeItemStack(slotStack, 2, 2+tileEntity.tier.processes, false))
|
||||||
{
|
|
||||||
if(!mergeItemStack(slotStack, 4, 5, false))
|
|
||||||
{
|
|
||||||
if(!mergeItemStack(slotStack, 6, 7, false))
|
|
||||||
{
|
|
||||||
if(tileEntity.tier != SmeltingFactoryTier.BASIC)
|
|
||||||
{
|
|
||||||
if(!mergeItemStack(slotStack, 8, 9, false))
|
|
||||||
{
|
|
||||||
if(!mergeItemStack(slotStack, 10, 11, false))
|
|
||||||
{
|
|
||||||
if(tileEntity.tier != SmeltingFactoryTier.ADVANCED)
|
|
||||||
{
|
|
||||||
if(!mergeItemStack(slotStack, 12, 13, false))
|
|
||||||
{
|
|
||||||
if(!mergeItemStack(slotStack, 14, 15, false))
|
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
else {
|
||||||
if(!mergeItemStack(slotStack, tileEntity.inventory.length, inventorySlots.size(), true))
|
if(!mergeItemStack(slotStack, tileEntity.inventory.length, inventorySlots.size(), true))
|
||||||
{
|
{
|
||||||
|
@ -227,11 +219,11 @@ public class ContainerSmeltingFactory extends Container
|
||||||
public boolean isInputSlot(int slot)
|
public boolean isInputSlot(int slot)
|
||||||
{
|
{
|
||||||
if(tileEntity.tier == Tier.SmeltingFactoryTier.BASIC)
|
if(tileEntity.tier == Tier.SmeltingFactoryTier.BASIC)
|
||||||
return slot == 2 || slot == 4 || slot == 6;
|
return slot >= 2 && slot <= 4;
|
||||||
if(tileEntity.tier == Tier.SmeltingFactoryTier.ADVANCED)
|
if(tileEntity.tier == Tier.SmeltingFactoryTier.ADVANCED)
|
||||||
return slot == 2 || slot == 4 || slot == 6 || slot == 8 || slot == 10;
|
return slot >= 2 && slot <= 6;
|
||||||
if(tileEntity.tier == Tier.SmeltingFactoryTier.ELITE)
|
if(tileEntity.tier == Tier.SmeltingFactoryTier.ELITE)
|
||||||
return slot == 2 || slot == 4 || slot == 6 || slot == 8 || slot == 12 || slot == 14;
|
return slot >= 2 && slot <= 8;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -239,11 +231,11 @@ public class ContainerSmeltingFactory extends Container
|
||||||
public boolean isOutputSlot(int slot)
|
public boolean isOutputSlot(int slot)
|
||||||
{
|
{
|
||||||
if(tileEntity.tier == Tier.SmeltingFactoryTier.BASIC)
|
if(tileEntity.tier == Tier.SmeltingFactoryTier.BASIC)
|
||||||
return slot == 3 || slot == 5 || slot == 7;
|
return slot >= 5 && slot <= 7;
|
||||||
if(tileEntity.tier == Tier.SmeltingFactoryTier.ADVANCED)
|
if(tileEntity.tier == Tier.SmeltingFactoryTier.ADVANCED)
|
||||||
return slot == 3 || slot == 5 || slot == 7 || slot == 9 || slot == 11;
|
return slot >= 7 && slot <= 11;
|
||||||
if(tileEntity.tier == Tier.SmeltingFactoryTier.ELITE)
|
if(tileEntity.tier == Tier.SmeltingFactoryTier.ELITE)
|
||||||
return slot == 3 || slot == 5 || slot == 7 || slot == 9 || slot == 11 || slot == 13 || slot == 15;
|
return slot >= 9 && slot <= 15;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,7 @@ import net.minecraft.item.ItemStack;
|
||||||
* 6: Advanced Smelting Factory
|
* 6: Advanced Smelting Factory
|
||||||
* 7: Elite Smelting Factory
|
* 7: Elite Smelting Factory
|
||||||
* 8: Metallurgic Infuser
|
* 8: Metallurgic Infuser
|
||||||
|
* 9: Purification Chamber
|
||||||
* @author AidanBrady
|
* @author AidanBrady
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -74,6 +75,9 @@ public class ItemBlockMachine extends ItemBlock
|
||||||
case 8:
|
case 8:
|
||||||
name = "MetallurgicInfuser";
|
name = "MetallurgicInfuser";
|
||||||
break;
|
break;
|
||||||
|
case 9:
|
||||||
|
name = "PurificationChamber";
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
name = "Unknown";
|
name = "Unknown";
|
||||||
break;
|
break;
|
||||||
|
|
48
src/minecraft/mekanism/common/ItemClump.java
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
package mekanism.common;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
|
public class ItemClump extends ItemMekanism
|
||||||
|
{
|
||||||
|
public static String[] en_USNames = {"Iron", "Gold", "Platinum",
|
||||||
|
"Copper", "Tin"};
|
||||||
|
|
||||||
|
public ItemClump(int id)
|
||||||
|
{
|
||||||
|
super(id);
|
||||||
|
setHasSubtypes(true);
|
||||||
|
setCreativeTab(Mekanism.tabMekanism);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getIconFromDamage(int meta)
|
||||||
|
{
|
||||||
|
switch (meta)
|
||||||
|
{
|
||||||
|
case 0: return 216;
|
||||||
|
case 1: return 218;
|
||||||
|
case 2: return 210;
|
||||||
|
case 3: return 211;
|
||||||
|
case 4: return 212;
|
||||||
|
default: return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getSubItems(int id, CreativeTabs tabs, List itemList)
|
||||||
|
{
|
||||||
|
for (int counter = 0; counter <= 4; ++counter)
|
||||||
|
{
|
||||||
|
itemList.add(new ItemStack(this, 1, counter));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getItemNameIS(ItemStack item)
|
||||||
|
{
|
||||||
|
return "item." + en_USNames[item.getItemDamage()].toLowerCase() + "Clump";
|
||||||
|
}
|
||||||
|
}
|
48
src/minecraft/mekanism/common/ItemDirtyDust.java
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
package mekanism.common;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
|
public class ItemDirtyDust extends ItemMekanism
|
||||||
|
{
|
||||||
|
public static String[] en_USNames = {"Iron", "Gold", "Platinum",
|
||||||
|
"Copper", "Tin"};
|
||||||
|
|
||||||
|
public ItemDirtyDust(int id)
|
||||||
|
{
|
||||||
|
super(id);
|
||||||
|
setHasSubtypes(true);
|
||||||
|
setCreativeTab(Mekanism.tabMekanism);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getIconFromDamage(int meta)
|
||||||
|
{
|
||||||
|
switch (meta)
|
||||||
|
{
|
||||||
|
case 0: return 200;
|
||||||
|
case 1: return 202;
|
||||||
|
case 2: return 194;
|
||||||
|
case 3: return 195;
|
||||||
|
case 4: return 196;
|
||||||
|
default: return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getSubItems(int id, CreativeTabs tabs, List itemList)
|
||||||
|
{
|
||||||
|
for (int counter = 0; counter <= 4; ++counter)
|
||||||
|
{
|
||||||
|
itemList.add(new ItemStack(this, 1, counter));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getItemNameIS(ItemStack item)
|
||||||
|
{
|
||||||
|
return "item.dirty" + en_USNames[item.getItemDamage()] + "Dust";
|
||||||
|
}
|
||||||
|
}
|
|
@ -103,4 +103,10 @@ public class ItemPortableTeleporter extends ItemEnergized
|
||||||
|
|
||||||
itemstack.stackTagCompound.setInteger("digit"+index, digit);
|
itemstack.stackTagCompound.setInteger("digit"+index, digit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canProduceElectricity()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,7 +49,7 @@ import cpw.mods.fml.server.FMLServerHandler;
|
||||||
* @author AidanBrady
|
* @author AidanBrady
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Mod(modid = "Mekanism", name = "Mekanism", version = "5.1.1")
|
@Mod(modid = "Mekanism", name = "Mekanism", version = "5.2.0")
|
||||||
@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
|
||||||
{
|
{
|
||||||
|
@ -71,7 +71,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, 1, 1);
|
public static Version versionNumber = new Version(5, 2, 0);
|
||||||
|
|
||||||
/** Map of Teleporter info. */
|
/** Map of Teleporter info. */
|
||||||
public static Map<Teleporter.Code, ArrayList<Teleporter.Coords>> teleporters = new HashMap<Teleporter.Code, ArrayList<Teleporter.Coords>>();
|
public static Map<Teleporter.Code, ArrayList<Teleporter.Coords>> teleporters = new HashMap<Teleporter.Code, ArrayList<Teleporter.Coords>>();
|
||||||
|
@ -138,12 +138,15 @@ public class Mekanism
|
||||||
//MultiID Items
|
//MultiID Items
|
||||||
public static Item Dust;
|
public static Item Dust;
|
||||||
public static Item Ingot;
|
public static Item Ingot;
|
||||||
|
public static Item Clump;
|
||||||
|
public static Item DirtyDust;
|
||||||
|
|
||||||
//Boolean Values
|
//Boolean Values
|
||||||
public static boolean extrasEnabled = true;
|
public static boolean extrasEnabled = true;
|
||||||
public static boolean platinumGenerationEnabled = true;
|
public static boolean platinumGenerationEnabled = true;
|
||||||
public static boolean disableBCBronzeCrafting = true;
|
public static boolean disableBCBronzeCrafting = true;
|
||||||
public static boolean disableBCSteelCrafting = true;
|
public static boolean disableBCSteelCrafting = true;
|
||||||
|
public static boolean notifyNewReleases = true;
|
||||||
|
|
||||||
//Extra data
|
//Extra data
|
||||||
public static float ObsidianTNTBlastRadius = 12.0F;
|
public static float ObsidianTNTBlastRadius = 12.0F;
|
||||||
|
@ -172,13 +175,13 @@ public class Mekanism
|
||||||
"*", Character.valueOf('*'), new ItemStack(BasicBlock, 1, 3)
|
"*", Character.valueOf('*'), new ItemStack(BasicBlock, 1, 3)
|
||||||
}));
|
}));
|
||||||
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(BasicBlock, 1, 2), new Object[] {
|
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(BasicBlock, 1, 2), new Object[] {
|
||||||
"***", "***", "***", Character.valueOf('*'), "ingotObsidian"
|
"***", "***", "***", Character.valueOf('*'), "ingotRefinedObsidian"
|
||||||
}));
|
}));
|
||||||
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(Ingot, 9, 0), new Object[] {
|
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(Ingot, 9, 0), new Object[] {
|
||||||
"*", Character.valueOf('*'), new ItemStack(BasicBlock, 1, 2)
|
"*", Character.valueOf('*'), new ItemStack(BasicBlock, 1, 2)
|
||||||
}));
|
}));
|
||||||
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(BasicBlock, 1, 4), new Object[] {
|
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(BasicBlock, 1, 4), new Object[] {
|
||||||
"***", "***", "***", Character.valueOf('*'), "ingotGlowstone"
|
"***", "***", "***", Character.valueOf('*'), "ingotRefinedGlowstone"
|
||||||
}));
|
}));
|
||||||
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(Ingot, 9, 3), new Object[] {
|
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(Ingot, 9, 3), new Object[] {
|
||||||
"*", Character.valueOf('*'), new ItemStack(BasicBlock, 1, 4)
|
"*", Character.valueOf('*'), new ItemStack(BasicBlock, 1, 4)
|
||||||
|
@ -234,7 +237,7 @@ public class Mekanism
|
||||||
"AOA", "PDP", "AOA", Character.valueOf('A'), EnrichedAlloy, Character.valueOf('O'), "dustObsidian", Character.valueOf('P'), "dustPlatinum", Character.valueOf('D'), Item.diamond
|
"AOA", "PDP", "AOA", Character.valueOf('A'), EnrichedAlloy, Character.valueOf('O'), "dustObsidian", Character.valueOf('P'), "dustPlatinum", Character.valueOf('D'), Item.diamond
|
||||||
}));
|
}));
|
||||||
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(AtomicDisassembler.getUnchargedItem(), new Object[] {
|
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(AtomicDisassembler.getUnchargedItem(), new Object[] {
|
||||||
"AEA", "ACA", " O ", Character.valueOf('A'), EnrichedAlloy, Character.valueOf('E'), EnergyTablet.getUnchargedItem(), Character.valueOf('C'), AtomicCore, Character.valueOf('O'), "ingotObsidian"
|
"AEA", "ACA", " O ", Character.valueOf('A'), EnrichedAlloy, Character.valueOf('E'), EnergyTablet.getUnchargedItem(), Character.valueOf('C'), AtomicCore, Character.valueOf('O'), "ingotRefinedObsidian"
|
||||||
}));
|
}));
|
||||||
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(EnrichedAlloy), new Object[] {
|
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(new ItemStack(EnrichedAlloy), new Object[] {
|
||||||
" R ", "RIR", " R ", Character.valueOf('R'), Item.redstone, Character.valueOf('I'), Item.ingotIron
|
" R ", "RIR", " R ", Character.valueOf('R'), Item.redstone, Character.valueOf('I'), Item.ingotIron
|
||||||
|
@ -317,15 +320,15 @@ public class Mekanism
|
||||||
//Platinum Compressor Recipes
|
//Platinum Compressor Recipes
|
||||||
RecipeHandler.addPlatinumCompressorRecipe(new ItemStack(Item.lightStoneDust), new ItemStack(Ingot, 1, 3));
|
RecipeHandler.addPlatinumCompressorRecipe(new ItemStack(Item.lightStoneDust), new ItemStack(Ingot, 1, 3));
|
||||||
|
|
||||||
//Combiner Recipes
|
|
||||||
RecipeHandler.addCombinerRecipe(new ItemStack(Item.redstone, 10), new ItemStack(Block.oreRedstone));
|
|
||||||
RecipeHandler.addCombinerRecipe(new ItemStack(Item.dyePowder, 8, 4), new ItemStack(Block.oreLapis));
|
|
||||||
|
|
||||||
//Crusher Recipes
|
//Crusher Recipes
|
||||||
RecipeHandler.addCrusherRecipe(new ItemStack(Item.diamond), new ItemStack(Dust, 1, 4));
|
RecipeHandler.addCrusherRecipe(new ItemStack(Item.diamond), new ItemStack(Dust, 1, 4));
|
||||||
RecipeHandler.addCrusherRecipe(new ItemStack(Item.ingotIron), new ItemStack(Dust, 1, 0));
|
RecipeHandler.addCrusherRecipe(new ItemStack(Item.ingotIron), new ItemStack(Dust, 1, 0));
|
||||||
RecipeHandler.addCrusherRecipe(new ItemStack(Item.ingotGold), new ItemStack(Dust, 1, 1));
|
RecipeHandler.addCrusherRecipe(new ItemStack(Item.ingotGold), new ItemStack(Dust, 1, 1));
|
||||||
|
|
||||||
|
//Purification Chamber Recipes
|
||||||
|
RecipeHandler.addPurificationChamberRecipe(new ItemStack(Block.oreIron), new ItemStack(Clump, 1, 0));
|
||||||
|
RecipeHandler.addPurificationChamberRecipe(new ItemStack(Block.oreGold), new ItemStack(Clump, 1, 1));
|
||||||
|
|
||||||
//Metallurgic Infuser Recipes
|
//Metallurgic Infuser Recipes
|
||||||
RecipeHandler.addMetallurgicInfuserRecipe(InfusionInput.getInfusion(InfusionType.COAL, 10, new ItemStack(EnrichedIron)), new ItemStack(Dust, 1, 5));
|
RecipeHandler.addMetallurgicInfuserRecipe(InfusionInput.getInfusion(InfusionType.COAL, 10, new ItemStack(EnrichedIron)), new ItemStack(Dust, 1, 5));
|
||||||
}
|
}
|
||||||
|
@ -383,6 +386,7 @@ public class Mekanism
|
||||||
LanguageRegistry.instance().addStringLocalization("tile.MachineBlock.AdvancedSmeltingFactory.name", "Advanced Smelting Factory");
|
LanguageRegistry.instance().addStringLocalization("tile.MachineBlock.AdvancedSmeltingFactory.name", "Advanced Smelting Factory");
|
||||||
LanguageRegistry.instance().addStringLocalization("tile.MachineBlock.EliteSmeltingFactory.name", "Elite Smelting Factory");
|
LanguageRegistry.instance().addStringLocalization("tile.MachineBlock.EliteSmeltingFactory.name", "Elite Smelting Factory");
|
||||||
LanguageRegistry.instance().addStringLocalization("tile.MachineBlock.MetallurgicInfuser.name", "Metallurgic Infuser");
|
LanguageRegistry.instance().addStringLocalization("tile.MachineBlock.MetallurgicInfuser.name", "Metallurgic Infuser");
|
||||||
|
LanguageRegistry.instance().addStringLocalization("tile.MachineBlock.PurificationChamber.name", "Purification Chamber");
|
||||||
|
|
||||||
//Localization for OreBlock
|
//Localization for OreBlock
|
||||||
LanguageRegistry.instance().addStringLocalization("tile.OreBlock.PlatinumOre.name", "Platinum Ore");
|
LanguageRegistry.instance().addStringLocalization("tile.OreBlock.PlatinumOre.name", "Platinum Ore");
|
||||||
|
@ -402,6 +406,20 @@ public class Mekanism
|
||||||
LanguageRegistry.instance().addStringLocalization("item.copperDust.name", "Copper Dust");
|
LanguageRegistry.instance().addStringLocalization("item.copperDust.name", "Copper Dust");
|
||||||
LanguageRegistry.instance().addStringLocalization("item.tinDust.name", "Tin Dust");
|
LanguageRegistry.instance().addStringLocalization("item.tinDust.name", "Tin Dust");
|
||||||
|
|
||||||
|
//Localization for Clump
|
||||||
|
LanguageRegistry.instance().addStringLocalization("item.ironClump.name", "Iron Clump");
|
||||||
|
LanguageRegistry.instance().addStringLocalization("item.goldClump.name", "Gold Clump");
|
||||||
|
LanguageRegistry.instance().addStringLocalization("item.platinumClump.name", "Platinum Clump");
|
||||||
|
LanguageRegistry.instance().addStringLocalization("item.copperClump.name", "Copper Clump");
|
||||||
|
LanguageRegistry.instance().addStringLocalization("item.tinClump.name", "Tin Clump");
|
||||||
|
|
||||||
|
//Localization for Dirty Dust
|
||||||
|
LanguageRegistry.instance().addStringLocalization("item.dirtyIronDust.name", "Dirty Iron Dust");
|
||||||
|
LanguageRegistry.instance().addStringLocalization("item.dirtyGoldDust.name", "Dirty Gold Dust");
|
||||||
|
LanguageRegistry.instance().addStringLocalization("item.dirtyPlatinumDust.name", "Dirty Platinum Dust");
|
||||||
|
LanguageRegistry.instance().addStringLocalization("item.dirtyCopperDust.name", "Dirty Copper Dust");
|
||||||
|
LanguageRegistry.instance().addStringLocalization("item.dirtyTinDust.name", "Dirty Tin 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");
|
||||||
|
@ -467,6 +485,8 @@ public class Mekanism
|
||||||
CompressedCarbon = new ItemMekanism(configuration.getItem("CompressedCarbon", 11216).getInt()).setItemName("CompressedCarbon");
|
CompressedCarbon = new ItemMekanism(configuration.getItem("CompressedCarbon", 11216).getInt()).setItemName("CompressedCarbon");
|
||||||
PortableTeleporter = new ItemPortableTeleporter(configuration.getItem("PortableTeleporter", 11217).getInt()).setItemName("PortableTeleporter");
|
PortableTeleporter = new ItemPortableTeleporter(configuration.getItem("PortableTeleporter", 11217).getInt()).setItemName("PortableTeleporter");
|
||||||
TeleportationCore = new ItemMekanism(configuration.getItem("TeleportationCore", 11218).getInt()).setItemName("TeleportationCore");
|
TeleportationCore = new ItemMekanism(configuration.getItem("TeleportationCore", 11218).getInt()).setItemName("TeleportationCore");
|
||||||
|
Clump = new ItemClump(configuration.getItem("Clump", 11219).getInt()-256);
|
||||||
|
DirtyDust = new ItemDirtyDust(configuration.getItem("DirtyDust", 11220).getInt()-256);
|
||||||
configuration.save();
|
configuration.save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -511,10 +531,10 @@ public class Mekanism
|
||||||
OreDictionary.registerOre("dustCopper", new ItemStack(Dust, 1, 6));
|
OreDictionary.registerOre("dustCopper", new ItemStack(Dust, 1, 6));
|
||||||
OreDictionary.registerOre("dustTin", new ItemStack(Dust, 1, 7));
|
OreDictionary.registerOre("dustTin", new ItemStack(Dust, 1, 7));
|
||||||
|
|
||||||
OreDictionary.registerOre("ingotObsidian", new ItemStack(Ingot, 1, 0));
|
OreDictionary.registerOre("ingotRefinedObsidian", new ItemStack(Ingot, 1, 0));
|
||||||
OreDictionary.registerOre("ingotPlatinum", new ItemStack(Ingot, 1, 1));
|
OreDictionary.registerOre("ingotPlatinum", new ItemStack(Ingot, 1, 1));
|
||||||
OreDictionary.registerOre("ingotBronze", new ItemStack(Ingot, 1, 2));
|
OreDictionary.registerOre("ingotBronze", new ItemStack(Ingot, 1, 2));
|
||||||
OreDictionary.registerOre("ingotGlowstone", new ItemStack(Ingot, 1, 3));
|
OreDictionary.registerOre("ingotRefinedGlowstone", new ItemStack(Ingot, 1, 3));
|
||||||
OreDictionary.registerOre("ingotSteel", new ItemStack(Ingot, 1, 4));
|
OreDictionary.registerOre("ingotSteel", new ItemStack(Ingot, 1, 4));
|
||||||
|
|
||||||
OreDictionary.registerOre("blockPlatinum", new ItemStack(BasicBlock, 1, 0));
|
OreDictionary.registerOre("blockPlatinum", new ItemStack(BasicBlock, 1, 0));
|
||||||
|
@ -524,6 +544,18 @@ public class Mekanism
|
||||||
OreDictionary.registerOre("blockRefinedGlowstone", new ItemStack(BasicBlock, 1, 4));
|
OreDictionary.registerOre("blockRefinedGlowstone", new ItemStack(BasicBlock, 1, 4));
|
||||||
OreDictionary.registerOre("blockSteel", new ItemStack(BasicBlock, 1, 5));
|
OreDictionary.registerOre("blockSteel", new ItemStack(BasicBlock, 1, 5));
|
||||||
|
|
||||||
|
OreDictionary.registerOre("dirtyDustIron", new ItemStack(DirtyDust, 1, 0));
|
||||||
|
OreDictionary.registerOre("dirtyDustGold", new ItemStack(DirtyDust, 1, 1));
|
||||||
|
OreDictionary.registerOre("dirtyDustPlatinum", new ItemStack(DirtyDust, 1, 2));
|
||||||
|
OreDictionary.registerOre("dirtyDustCopper", new ItemStack(DirtyDust, 1, 3));
|
||||||
|
OreDictionary.registerOre("dirtyDustTin", new ItemStack(DirtyDust, 1, 4));
|
||||||
|
|
||||||
|
OreDictionary.registerOre("clumpIron", new ItemStack(Clump, 1, 0));
|
||||||
|
OreDictionary.registerOre("clumpGold", new ItemStack(Clump, 1, 1));
|
||||||
|
OreDictionary.registerOre("clumpPlatinum", new ItemStack(Clump, 1, 2));
|
||||||
|
OreDictionary.registerOre("clumpCopper", new ItemStack(Clump, 1, 3));
|
||||||
|
OreDictionary.registerOre("clumpTin", new ItemStack(Clump, 1, 4));
|
||||||
|
|
||||||
OreDictionary.registerOre("orePlatinum", new ItemStack(OreBlock, 1, 0));
|
OreDictionary.registerOre("orePlatinum", new ItemStack(OreBlock, 1, 0));
|
||||||
|
|
||||||
OreDictionary.registerOre("basicCircuit", new ItemStack(ControlCircuit));
|
OreDictionary.registerOre("basicCircuit", new ItemStack(ControlCircuit));
|
||||||
|
@ -538,25 +570,78 @@ public class Mekanism
|
||||||
RecipeHandler.addCrusherRecipe(new ItemStack(Item.coal), hooks.IC2CoalDust);
|
RecipeHandler.addCrusherRecipe(new ItemStack(Item.coal), hooks.IC2CoalDust);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for(ItemStack ore : OreDictionary.getOres("clumpIron"))
|
||||||
|
{
|
||||||
|
RecipeHandler.addCrusherRecipe(ore, new ItemStack(DirtyDust, 1, 0));
|
||||||
|
}
|
||||||
|
|
||||||
|
for(ItemStack ore : OreDictionary.getOres("clumpGold"))
|
||||||
|
{
|
||||||
|
RecipeHandler.addCrusherRecipe(ore, new ItemStack(DirtyDust, 1, 1));
|
||||||
|
}
|
||||||
|
|
||||||
|
for(ItemStack ore : OreDictionary.getOres("clumpPlatinum"))
|
||||||
|
{
|
||||||
|
RecipeHandler.addCrusherRecipe(ore, new ItemStack(DirtyDust, 1, 2));
|
||||||
|
}
|
||||||
|
|
||||||
|
for(ItemStack ore : OreDictionary.getOres("clumpCopper"))
|
||||||
|
{
|
||||||
|
RecipeHandler.addCrusherRecipe(ore, new ItemStack(DirtyDust, 1, 3));
|
||||||
|
}
|
||||||
|
|
||||||
|
for(ItemStack ore : OreDictionary.getOres("clumpTin"))
|
||||||
|
{
|
||||||
|
RecipeHandler.addCrusherRecipe(ore, new ItemStack(DirtyDust, 1, 4));
|
||||||
|
}
|
||||||
|
|
||||||
|
for(ItemStack ore : OreDictionary.getOres("dirtyDustIron"))
|
||||||
|
{
|
||||||
|
RecipeHandler.addEnrichmentChamberRecipe(ore, new ItemStack(Dust, 1, 0));
|
||||||
|
}
|
||||||
|
|
||||||
|
for(ItemStack ore : OreDictionary.getOres("dirtyDustGold"))
|
||||||
|
{
|
||||||
|
RecipeHandler.addEnrichmentChamberRecipe(ore, new ItemStack(Dust, 1, 1));
|
||||||
|
}
|
||||||
|
|
||||||
|
for(ItemStack ore : OreDictionary.getOres("dirtyDustPlatinum"))
|
||||||
|
{
|
||||||
|
RecipeHandler.addEnrichmentChamberRecipe(ore, new ItemStack(Dust, 1, 2));
|
||||||
|
}
|
||||||
|
|
||||||
|
for(ItemStack ore : OreDictionary.getOres("dirtyDustCopper"))
|
||||||
|
{
|
||||||
|
RecipeHandler.addEnrichmentChamberRecipe(ore, new ItemStack(Dust, 1, 6));
|
||||||
|
}
|
||||||
|
|
||||||
|
for(ItemStack ore : OreDictionary.getOres("dirtyDustTin"))
|
||||||
|
{
|
||||||
|
RecipeHandler.addEnrichmentChamberRecipe(ore, new ItemStack(Dust, 1, 7));
|
||||||
|
}
|
||||||
|
|
||||||
for(ItemStack ore : OreDictionary.getOres("oreCopper"))
|
for(ItemStack ore : OreDictionary.getOres("oreCopper"))
|
||||||
{
|
{
|
||||||
RecipeHandler.addEnrichmentChamberRecipe(ore, new ItemStack(Dust, 2, 6));
|
RecipeHandler.addEnrichmentChamberRecipe(ore, new ItemStack(Dust, 2, 6));
|
||||||
|
RecipeHandler.addPurificationChamberRecipe(ore, new ItemStack(Clump, 3, 3));
|
||||||
}
|
}
|
||||||
|
|
||||||
for(ItemStack ore : OreDictionary.getOres("oreTin"))
|
for(ItemStack ore : OreDictionary.getOres("oreTin"))
|
||||||
{
|
{
|
||||||
RecipeHandler.addEnrichmentChamberRecipe(ore, new ItemStack(Dust, 2, 7));
|
RecipeHandler.addEnrichmentChamberRecipe(ore, new ItemStack(Dust, 2, 7));
|
||||||
|
RecipeHandler.addPurificationChamberRecipe(ore, new ItemStack(Clump, 3, 4));
|
||||||
}
|
}
|
||||||
|
|
||||||
for(ItemStack ore : OreDictionary.getOres("orePlatinum"))
|
for(ItemStack ore : OreDictionary.getOres("orePlatinum"))
|
||||||
{
|
{
|
||||||
RecipeHandler.addEnrichmentChamberRecipe(ore, new ItemStack(Dust, 2, 2));
|
RecipeHandler.addEnrichmentChamberRecipe(ore, new ItemStack(Dust, 2, 2));
|
||||||
|
RecipeHandler.addPurificationChamberRecipe(ore, new ItemStack(Clump, 3, 2));
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
for(ItemStack ore : OreDictionary.getOres("oreLead"))
|
for(ItemStack ore : OreDictionary.getOres("oreLead"))
|
||||||
{
|
{
|
||||||
RecipeHandler.addEnrichmentChamberRecipe(ore, OreDictionary.getOres("dustLead").get(0));
|
RecipeHandler.addEnrichmentChamberRecipe(ore, MekanismUtils.getStackWithSize(OreDictionary.getOres("dustLead").get(0), 2));
|
||||||
}
|
}
|
||||||
|
|
||||||
for(ItemStack ore : OreDictionary.getOres("ingotLead"))
|
for(ItemStack ore : OreDictionary.getOres("ingotLead"))
|
||||||
|
@ -568,7 +653,7 @@ public class Mekanism
|
||||||
try {
|
try {
|
||||||
for(ItemStack ore : OreDictionary.getOres("oreSilver"))
|
for(ItemStack ore : OreDictionary.getOres("oreSilver"))
|
||||||
{
|
{
|
||||||
RecipeHandler.addEnrichmentChamberRecipe(ore, OreDictionary.getOres("dustSilver").get(0));
|
RecipeHandler.addEnrichmentChamberRecipe(ore, MekanismUtils.getStackWithSize(OreDictionary.getOres("dustSilver").get(0), 2));
|
||||||
}
|
}
|
||||||
|
|
||||||
for(ItemStack ore : OreDictionary.getOres("ingotSilver"))
|
for(ItemStack ore : OreDictionary.getOres("ingotSilver"))
|
||||||
|
@ -577,7 +662,7 @@ public class Mekanism
|
||||||
}
|
}
|
||||||
} catch(Exception e) {}
|
} catch(Exception e) {}
|
||||||
|
|
||||||
for(ItemStack ore : OreDictionary.getOres("ingotObsidian"))
|
for(ItemStack ore : OreDictionary.getOres("ingotRefinedObsidian"))
|
||||||
{
|
{
|
||||||
RecipeHandler.addCrusherRecipe(ore, new ItemStack(Dust, 1, 3));
|
RecipeHandler.addCrusherRecipe(ore, new ItemStack(Dust, 1, 3));
|
||||||
}
|
}
|
||||||
|
@ -592,7 +677,7 @@ public class Mekanism
|
||||||
RecipeHandler.addCrusherRecipe(ore, new ItemStack(Item.redstone));
|
RecipeHandler.addCrusherRecipe(ore, new ItemStack(Item.redstone));
|
||||||
}
|
}
|
||||||
|
|
||||||
for(ItemStack ore : OreDictionary.getOres("ingotGlowstone"))
|
for(ItemStack ore : OreDictionary.getOres("ingotRefinedGlowstone"))
|
||||||
{
|
{
|
||||||
RecipeHandler.addCrusherRecipe(ore, new ItemStack(Item.lightStoneDust));
|
RecipeHandler.addCrusherRecipe(ore, new ItemStack(Item.lightStoneDust));
|
||||||
}
|
}
|
||||||
|
@ -621,12 +706,12 @@ public class Mekanism
|
||||||
|
|
||||||
for(ItemStack ore : OreDictionary.getOres("dustIron"))
|
for(ItemStack ore : OreDictionary.getOres("dustIron"))
|
||||||
{
|
{
|
||||||
RecipeHandler.addCombinerRecipe(MekanismUtils.getStackWithSize(ore, 2), new ItemStack(Block.oreIron));
|
RecipeHandler.addCombinerRecipe(MekanismUtils.getStackWithSize(ore, 8), new ItemStack(Block.oreIron));
|
||||||
}
|
}
|
||||||
|
|
||||||
for(ItemStack ore : OreDictionary.getOres("dustGold"))
|
for(ItemStack ore : OreDictionary.getOres("dustGold"))
|
||||||
{
|
{
|
||||||
RecipeHandler.addCombinerRecipe(MekanismUtils.getStackWithSize(ore, 2), new ItemStack(Block.oreGold));
|
RecipeHandler.addCombinerRecipe(MekanismUtils.getStackWithSize(ore, 8), new ItemStack(Block.oreGold));
|
||||||
}
|
}
|
||||||
|
|
||||||
for(ItemStack ore : OreDictionary.getOres("dustObsidian"))
|
for(ItemStack ore : OreDictionary.getOres("dustObsidian"))
|
||||||
|
@ -637,13 +722,13 @@ public class Mekanism
|
||||||
|
|
||||||
for(ItemStack ore : OreDictionary.getOres("dustPlatinum"))
|
for(ItemStack ore : OreDictionary.getOres("dustPlatinum"))
|
||||||
{
|
{
|
||||||
RecipeHandler.addCombinerRecipe(MekanismUtils.getStackWithSize(ore, 2), new ItemStack(OreBlock, 1, 0));
|
RecipeHandler.addCombinerRecipe(MekanismUtils.getStackWithSize(ore, 8), new ItemStack(OreBlock, 1, 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
for(ItemStack ore : OreDictionary.getOres("dustCopper"))
|
for(ItemStack ore : OreDictionary.getOres("dustCopper"))
|
||||||
{
|
{
|
||||||
RecipeHandler.addCombinerRecipe(MekanismUtils.getStackWithSize(ore, 2), OreDictionary.getOres("oreCopper").get(0));
|
RecipeHandler.addCombinerRecipe(MekanismUtils.getStackWithSize(ore, 8), OreDictionary.getOres("oreCopper").get(0));
|
||||||
}
|
}
|
||||||
} catch(Exception e) {}
|
} catch(Exception e) {}
|
||||||
|
|
||||||
|
@ -657,21 +742,21 @@ public class Mekanism
|
||||||
try {
|
try {
|
||||||
for(ItemStack ore : OreDictionary.getOres("dustTin"))
|
for(ItemStack ore : OreDictionary.getOres("dustTin"))
|
||||||
{
|
{
|
||||||
RecipeHandler.addCombinerRecipe(MekanismUtils.getStackWithSize(ore, 2), OreDictionary.getOres("oreTin").get(0));
|
RecipeHandler.addCombinerRecipe(MekanismUtils.getStackWithSize(ore, 8), OreDictionary.getOres("oreTin").get(0));
|
||||||
}
|
}
|
||||||
} catch(Exception e) {}
|
} catch(Exception e) {}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
for(ItemStack ore : OreDictionary.getOres("dustLead"))
|
for(ItemStack ore : OreDictionary.getOres("dustLead"))
|
||||||
{
|
{
|
||||||
RecipeHandler.addCombinerRecipe(MekanismUtils.getStackWithSize(ore, 2), OreDictionary.getOres("oreLead").get(0));
|
RecipeHandler.addCombinerRecipe(MekanismUtils.getStackWithSize(ore, 8), OreDictionary.getOres("oreLead").get(0));
|
||||||
}
|
}
|
||||||
} catch(Exception e) {}
|
} catch(Exception e) {}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
for(ItemStack ore : OreDictionary.getOres("dustSilver"))
|
for(ItemStack ore : OreDictionary.getOres("dustSilver"))
|
||||||
{
|
{
|
||||||
RecipeHandler.addCombinerRecipe(MekanismUtils.getStackWithSize(ore, 2), OreDictionary.getOres("oreSilver").get(0));
|
RecipeHandler.addCombinerRecipe(MekanismUtils.getStackWithSize(ore, 8), OreDictionary.getOres("oreSilver").get(0));
|
||||||
}
|
}
|
||||||
} catch(Exception e) {}
|
} catch(Exception e) {}
|
||||||
}
|
}
|
||||||
|
@ -701,6 +786,7 @@ public class Mekanism
|
||||||
GameRegistry.registerTileEntity(TileEntityEliteSmeltingFactory.class, "UltimateSmeltingFactory");
|
GameRegistry.registerTileEntity(TileEntityEliteSmeltingFactory.class, "UltimateSmeltingFactory");
|
||||||
GameRegistry.registerTileEntity(TileEntityMetallurgicInfuser.class, "MetallurgicInfuser");
|
GameRegistry.registerTileEntity(TileEntityMetallurgicInfuser.class, "MetallurgicInfuser");
|
||||||
GameRegistry.registerTileEntity(TileEntityTeleporter.class, "MekanismTeleporter");
|
GameRegistry.registerTileEntity(TileEntityTeleporter.class, "MekanismTeleporter");
|
||||||
|
GameRegistry.registerTileEntity(TileEntityPurificationChamber.class, "PurificationChamber");
|
||||||
|
|
||||||
//Load tile entities that have special renderers.
|
//Load tile entities that have special renderers.
|
||||||
proxy.registerSpecialTileEntities();
|
proxy.registerSpecialTileEntities();
|
||||||
|
|
|
@ -35,6 +35,8 @@ public final class MekanismUtils
|
||||||
* Checks for a new version of Mekanism.
|
* Checks for a new version of Mekanism.
|
||||||
*/
|
*/
|
||||||
public static void checkForUpdates(EntityPlayer entityplayer)
|
public static void checkForUpdates(EntityPlayer entityplayer)
|
||||||
|
{
|
||||||
|
if(Mekanism.notifyNewReleases)
|
||||||
{
|
{
|
||||||
if(!Mekanism.latestVersionNumber.equals("Error retrieving data."))
|
if(!Mekanism.latestVersionNumber.equals("Error retrieving data."))
|
||||||
{
|
{
|
||||||
|
@ -53,6 +55,7 @@ public final class MekanismUtils
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the latest version using getHTML and returns it as a string.
|
* Gets the latest version using getHTML and returns it as a string.
|
||||||
|
|
|
@ -193,14 +193,17 @@ public class PacketHandler implements IPacketHandler
|
||||||
{
|
{
|
||||||
Teleporter.Coords coords = Mekanism.teleporters.get(new Teleporter.Code(item.getDigit(itemstack, 0), item.getDigit(itemstack, 1), item.getDigit(itemstack, 2), item.getDigit(itemstack, 3))).get(0);
|
Teleporter.Coords coords = Mekanism.teleporters.get(new Teleporter.Code(item.getDigit(itemstack, 0), item.getDigit(itemstack, 1), item.getDigit(itemstack, 2), item.getDigit(itemstack, 3))).get(0);
|
||||||
|
|
||||||
|
item.onUse(item.calculateEnergyCost(entityPlayerMP, coords), itemstack);
|
||||||
|
|
||||||
if(entityPlayerMP.worldObj.provider.dimensionId != coords.dimensionId)
|
if(entityPlayerMP.worldObj.provider.dimensionId != coords.dimensionId)
|
||||||
{
|
{
|
||||||
entityPlayerMP.travelToDimension(coords.dimensionId);
|
entityPlayerMP.travelToDimension(coords.dimensionId);
|
||||||
}
|
}
|
||||||
|
|
||||||
entityPlayerMP.playerNetServerHandler.setPlayerLocation(coords.xCoord, coords.yCoord, coords.zCoord, entityPlayerMP.rotationYaw, entityPlayerMP.rotationPitch);
|
entityPlayerMP.playerNetServerHandler.setPlayerLocation(coords.xCoord+0.5, coords.yCoord, coords.zCoord+0.5, entityPlayerMP.rotationYaw, entityPlayerMP.rotationPitch);
|
||||||
|
|
||||||
item.onUse(item.calculateEnergyCost(entityPlayerMP, coords), itemstack);
|
entityplayer.worldObj.playSound(coords.xCoord, coords.yCoord, coords.zCoord, "mob.endermen.portal", 1.0F, 1.0F, true);
|
||||||
|
PacketHandler.sendPortalFX(coords.xCoord, coords.yCoord, coords.zCoord, coords.dimensionId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -479,6 +482,6 @@ public class PacketHandler implements IPacketHandler
|
||||||
packet.data = bytes.toByteArray();
|
packet.data = bytes.toByteArray();
|
||||||
packet.length = packet.data.length;
|
packet.length = packet.data.length;
|
||||||
PacketDispatcher.sendPacketToServer(packet);
|
PacketDispatcher.sendPacketToServer(packet);
|
||||||
System.out.println("[Mekanism] Sent data int packet '" + i + "' to server");
|
System.out.println("[Mekanism] Sent data int packet '" + type.id + ":" + i + "' to server");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package mekanism.common;
|
package mekanism.common;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import mekanism.api.InfusionInput;
|
import mekanism.api.InfusionInput;
|
||||||
|
@ -13,6 +14,11 @@ import net.minecraft.item.ItemStack;
|
||||||
*/
|
*/
|
||||||
public final class RecipeHandler
|
public final class RecipeHandler
|
||||||
{
|
{
|
||||||
|
public static void addRecipe(Recipe recipe, Object input, Object output)
|
||||||
|
{
|
||||||
|
recipe.put(input, output);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add an Enrichment Chamber recipe.
|
* Add an Enrichment Chamber recipe.
|
||||||
* @param input - input ItemStack
|
* @param input - input ItemStack
|
||||||
|
@ -20,7 +26,7 @@ public final class RecipeHandler
|
||||||
*/
|
*/
|
||||||
public static void addEnrichmentChamberRecipe(ItemStack input, ItemStack output)
|
public static void addEnrichmentChamberRecipe(ItemStack input, ItemStack output)
|
||||||
{
|
{
|
||||||
TileEntityEnrichmentChamber.recipes.put(input, output);
|
Recipe.ENRICHMENT_CHAMBER.put(input, output);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -30,7 +36,7 @@ public final class RecipeHandler
|
||||||
*/
|
*/
|
||||||
public static void addPlatinumCompressorRecipe(ItemStack input, ItemStack output)
|
public static void addPlatinumCompressorRecipe(ItemStack input, ItemStack output)
|
||||||
{
|
{
|
||||||
TileEntityPlatinumCompressor.recipes.put(input, output);
|
Recipe.PLATINUM_COMPRESSOR.put(input, output);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -40,7 +46,7 @@ public final class RecipeHandler
|
||||||
*/
|
*/
|
||||||
public static void addCombinerRecipe(ItemStack input, ItemStack output)
|
public static void addCombinerRecipe(ItemStack input, ItemStack output)
|
||||||
{
|
{
|
||||||
TileEntityCombiner.recipes.put(input, output);
|
Recipe.COMBINER.put(input, output);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -50,7 +56,17 @@ public final class RecipeHandler
|
||||||
*/
|
*/
|
||||||
public static void addCrusherRecipe(ItemStack input, ItemStack output)
|
public static void addCrusherRecipe(ItemStack input, ItemStack output)
|
||||||
{
|
{
|
||||||
TileEntityCrusher.recipes.put(input, output);
|
Recipe.CRUSHER.put(input, output);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add a Purification Chamber recipe.
|
||||||
|
* @param input - input ItemStack
|
||||||
|
* @param output - output ItemStack
|
||||||
|
*/
|
||||||
|
public static void addPurificationChamberRecipe(ItemStack input, ItemStack output)
|
||||||
|
{
|
||||||
|
Recipe.PURIFICATION_CHAMBER.put(input, output);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -60,7 +76,7 @@ public final class RecipeHandler
|
||||||
*/
|
*/
|
||||||
public static void addMetallurgicInfuserRecipe(InfusionInput input, ItemStack output)
|
public static void addMetallurgicInfuserRecipe(InfusionInput input, ItemStack output)
|
||||||
{
|
{
|
||||||
TileEntityMetallurgicInfuser.recipes.put(input, InfusionOutput.getInfusion(input, output));
|
Recipe.METALLURGIC_INFUSER.put(input, InfusionOutput.getInfusion(input, output));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -115,4 +131,31 @@ public final class RecipeHandler
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static enum Recipe
|
||||||
|
{
|
||||||
|
ENRICHMENT_CHAMBER(new HashMap<ItemStack, ItemStack>()),
|
||||||
|
PLATINUM_COMPRESSOR(new HashMap<ItemStack, ItemStack>()),
|
||||||
|
COMBINER(new HashMap<ItemStack, ItemStack>()),
|
||||||
|
CRUSHER(new HashMap<ItemStack, ItemStack>()),
|
||||||
|
PURIFICATION_CHAMBER(new HashMap<ItemStack, ItemStack>()),
|
||||||
|
METALLURGIC_INFUSER(new HashMap<InfusionInput, InfusionOutput>());
|
||||||
|
|
||||||
|
private HashMap recipes;
|
||||||
|
|
||||||
|
private Recipe(HashMap map)
|
||||||
|
{
|
||||||
|
recipes = map;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void put(Object input, Object output)
|
||||||
|
{
|
||||||
|
recipes.put(input, output);
|
||||||
|
}
|
||||||
|
|
||||||
|
public HashMap get()
|
||||||
|
{
|
||||||
|
return recipes;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -110,12 +110,12 @@ public abstract class TileEntityAdvancedElectricMachine extends TileEntityBasicM
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(inventory[1] != null && secondaryEnergyStored == 0)
|
if(inventory[1] != null)
|
||||||
{
|
{
|
||||||
int fuelTicks = getFuelTicks(inventory[1]);
|
int fuelTicks = getFuelTicks(inventory[1]);
|
||||||
if(fuelTicks > 0)
|
|
||||||
{
|
|
||||||
int energyNeeded = MAX_SECONDARY_ENERGY - secondaryEnergyStored;
|
int energyNeeded = MAX_SECONDARY_ENERGY - secondaryEnergyStored;
|
||||||
|
if(fuelTicks > 0 && fuelTicks <= energyNeeded)
|
||||||
|
{
|
||||||
if(fuelTicks <= energyNeeded)
|
if(fuelTicks <= energyNeeded)
|
||||||
{
|
{
|
||||||
setSecondaryEnergy(secondaryEnergyStored + fuelTicks);
|
setSecondaryEnergy(secondaryEnergyStored + fuelTicks);
|
||||||
|
@ -157,6 +157,8 @@ public abstract class TileEntityAdvancedElectricMachine extends TileEntityBasicM
|
||||||
currentMaxElectricity = MAX_ELECTRICITY;
|
currentMaxElectricity = MAX_ELECTRICITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(electricityStored >= ENERGY_PER_TICK && secondaryEnergyStored >= SECONDARY_ENERGY_PER_TICK)
|
||||||
|
{
|
||||||
if(canOperate() && (operatingTicks+1) < currentTicksRequired && secondaryEnergyStored >= SECONDARY_ENERGY_PER_TICK)
|
if(canOperate() && (operatingTicks+1) < currentTicksRequired && secondaryEnergyStored >= SECONDARY_ENERGY_PER_TICK)
|
||||||
{
|
{
|
||||||
++operatingTicks;
|
++operatingTicks;
|
||||||
|
@ -173,25 +175,6 @@ public abstract class TileEntityAdvancedElectricMachine extends TileEntityBasicM
|
||||||
secondaryEnergyStored -= SECONDARY_ENERGY_PER_TICK;
|
secondaryEnergyStored -= SECONDARY_ENERGY_PER_TICK;
|
||||||
electricityStored -= ENERGY_PER_TICK;
|
electricityStored -= ENERGY_PER_TICK;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(electricityStored < 0)
|
|
||||||
{
|
|
||||||
electricityStored = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(secondaryEnergyStored < 0)
|
|
||||||
{
|
|
||||||
secondaryEnergyStored = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(electricityStored > currentMaxElectricity)
|
|
||||||
{
|
|
||||||
electricityStored = currentMaxElectricity;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(secondaryEnergyStored > MAX_SECONDARY_ENERGY)
|
|
||||||
{
|
|
||||||
secondaryEnergyStored = MAX_SECONDARY_ENERGY;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!canOperate())
|
if(!canOperate())
|
||||||
|
@ -201,28 +184,19 @@ public abstract class TileEntityAdvancedElectricMachine extends TileEntityBasicM
|
||||||
|
|
||||||
if(!worldObj.isRemote)
|
if(!worldObj.isRemote)
|
||||||
{
|
{
|
||||||
if(testActive != operatingTicks > 0)
|
if(canOperate() && electricityStored >= ENERGY_PER_TICK && secondaryEnergyStored >= SECONDARY_ENERGY_PER_TICK)
|
||||||
{
|
|
||||||
if(operatingTicks > 0)
|
|
||||||
{
|
{
|
||||||
setActive(true);
|
setActive(true);
|
||||||
}
|
}
|
||||||
else if(!canOperate())
|
else {
|
||||||
{
|
|
||||||
setActive(false);
|
setActive(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void operate()
|
public void operate()
|
||||||
{
|
{
|
||||||
if (!canOperate())
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
ItemStack itemstack = RecipeHandler.getOutput(inventory[0], true, getRecipes());
|
ItemStack itemstack = RecipeHandler.getOutput(inventory[0], true, getRecipes());
|
||||||
|
|
||||||
if (inventory[0].stackSize <= 0)
|
if (inventory[0].stackSize <= 0)
|
||||||
|
@ -248,16 +222,6 @@ public abstract class TileEntityAdvancedElectricMachine extends TileEntityBasicM
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(electricityStored < ENERGY_PER_TICK)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(secondaryEnergyStored < SECONDARY_ENERGY_PER_TICK)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
ItemStack itemstack = RecipeHandler.getOutput(inventory[0], false, getRecipes());
|
ItemStack itemstack = RecipeHandler.getOutput(inventory[0], false, getRecipes());
|
||||||
|
|
||||||
if (itemstack == null)
|
if (itemstack == null)
|
||||||
|
@ -363,7 +327,7 @@ public abstract class TileEntityAdvancedElectricMachine extends TileEntityBasicM
|
||||||
*/
|
*/
|
||||||
public void setSecondaryEnergy(int energy)
|
public void setSecondaryEnergy(int energy)
|
||||||
{
|
{
|
||||||
secondaryEnergyStored = Math.max(Math.min(energy, getFuelTicks(inventory[1])), 0);
|
secondaryEnergyStored = Math.max(Math.min(energy, MAX_SECONDARY_ENERGY), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -3,23 +3,22 @@ package mekanism.common;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import mekanism.common.RecipeHandler.Recipe;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.item.ItemBlock;
|
import net.minecraft.item.ItemBlock;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
public class TileEntityCombiner extends TileEntityAdvancedElectricMachine
|
public class TileEntityCombiner extends TileEntityAdvancedElectricMachine
|
||||||
{
|
{
|
||||||
public static Map<ItemStack, ItemStack> recipes = new HashMap<ItemStack, ItemStack>();
|
|
||||||
|
|
||||||
public TileEntityCombiner()
|
public TileEntityCombiner()
|
||||||
{
|
{
|
||||||
super("Combiner.ogg", "Combiner", "/resources/mekanism/gui/GuiCombiner.png", 5, 1, 200, 1000, 200);
|
super("Combiner.ogg", "Combiner", "/resources/mekanism/gui/GuiCombiner.png", 5, 1, 200, 1000, 200);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map getRecipes()
|
public HashMap getRecipes()
|
||||||
{
|
{
|
||||||
return recipes;
|
return Recipe.COMBINER.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -3,20 +3,19 @@ package mekanism.common;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import mekanism.common.RecipeHandler.Recipe;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
public class TileEntityCrusher extends TileEntityElectricMachine
|
public class TileEntityCrusher extends TileEntityElectricMachine
|
||||||
{
|
{
|
||||||
public static Map<ItemStack, ItemStack> recipes = new HashMap<ItemStack, ItemStack>();
|
|
||||||
|
|
||||||
public TileEntityCrusher()
|
public TileEntityCrusher()
|
||||||
{
|
{
|
||||||
super("Crusher.ogg", "Crusher", "/resources/mekanism/gui/GuiCrusher.png", 5, 200, 1000);
|
super("Crusher.ogg", "Crusher", "/resources/mekanism/gui/GuiCrusher.png", 5, 200, 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map getRecipes()
|
public HashMap getRecipes()
|
||||||
{
|
{
|
||||||
return recipes;
|
return Recipe.CRUSHER.get();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,8 +40,6 @@ public abstract class TileEntityElectricMachine extends TileEntityBasicMachine
|
||||||
{
|
{
|
||||||
super.onUpdate();
|
super.onUpdate();
|
||||||
|
|
||||||
boolean testActive = operatingTicks > 0;
|
|
||||||
|
|
||||||
if(inventory[1] != null)
|
if(inventory[1] != null)
|
||||||
{
|
{
|
||||||
if(electricityStored < currentMaxElectricity)
|
if(electricityStored < currentMaxElectricity)
|
||||||
|
@ -113,9 +111,11 @@ public abstract class TileEntityElectricMachine extends TileEntityBasicMachine
|
||||||
currentMaxElectricity = MAX_ELECTRICITY;
|
currentMaxElectricity = MAX_ELECTRICITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(electricityStored >= ENERGY_PER_TICK)
|
||||||
|
{
|
||||||
if(canOperate() && (operatingTicks+1) < currentTicksRequired)
|
if(canOperate() && (operatingTicks+1) < currentTicksRequired)
|
||||||
{
|
{
|
||||||
++operatingTicks;
|
operatingTicks++;
|
||||||
electricityStored -= ENERGY_PER_TICK;
|
electricityStored -= ENERGY_PER_TICK;
|
||||||
}
|
}
|
||||||
else if(canOperate() && (operatingTicks+1) >= currentTicksRequired)
|
else if(canOperate() && (operatingTicks+1) >= currentTicksRequired)
|
||||||
|
@ -127,15 +127,6 @@ public abstract class TileEntityElectricMachine extends TileEntityBasicMachine
|
||||||
operatingTicks = 0;
|
operatingTicks = 0;
|
||||||
electricityStored -= ENERGY_PER_TICK;
|
electricityStored -= ENERGY_PER_TICK;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(electricityStored < 0)
|
|
||||||
{
|
|
||||||
electricityStored = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(electricityStored > currentMaxElectricity)
|
|
||||||
{
|
|
||||||
electricityStored = currentMaxElectricity;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!canOperate())
|
if(!canOperate())
|
||||||
|
@ -145,28 +136,19 @@ public abstract class TileEntityElectricMachine extends TileEntityBasicMachine
|
||||||
|
|
||||||
if(!worldObj.isRemote)
|
if(!worldObj.isRemote)
|
||||||
{
|
{
|
||||||
if(testActive != operatingTicks > 0)
|
if(canOperate() && electricityStored >= ENERGY_PER_TICK)
|
||||||
{
|
|
||||||
if(operatingTicks > 0)
|
|
||||||
{
|
{
|
||||||
setActive(true);
|
setActive(true);
|
||||||
}
|
}
|
||||||
else if(!canOperate())
|
else {
|
||||||
{
|
|
||||||
setActive(false);
|
setActive(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void operate()
|
public void operate()
|
||||||
{
|
{
|
||||||
if (!canOperate())
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
ItemStack itemstack = RecipeHandler.getOutput(inventory[0], true, getRecipes());
|
ItemStack itemstack = RecipeHandler.getOutput(inventory[0], true, getRecipes());
|
||||||
|
|
||||||
if (inventory[0].stackSize <= 0)
|
if (inventory[0].stackSize <= 0)
|
||||||
|
@ -192,11 +174,6 @@ public abstract class TileEntityElectricMachine extends TileEntityBasicMachine
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(electricityStored < ENERGY_PER_TICK)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
ItemStack itemstack = RecipeHandler.getOutput(inventory[0], false, getRecipes());
|
ItemStack itemstack = RecipeHandler.getOutput(inventory[0], false, getRecipes());
|
||||||
|
|
||||||
if (itemstack == null)
|
if (itemstack == null)
|
||||||
|
|
|
@ -63,7 +63,12 @@ public class TileEntityEnergyCube extends TileEntityElectricBlock implements IEn
|
||||||
public TileEntityEnergyCube(String name, int maxEnergy, int i)
|
public TileEntityEnergyCube(String name, int maxEnergy, int i)
|
||||||
{
|
{
|
||||||
super(name, maxEnergy);
|
super(name, maxEnergy);
|
||||||
|
|
||||||
|
if(powerProvider != null)
|
||||||
|
{
|
||||||
powerProvider.configure(5, 2, 10, 1, maxEnergy/10);
|
powerProvider.configure(5, 2, 10, 1, maxEnergy/10);
|
||||||
|
}
|
||||||
|
|
||||||
ElectricityConnections.registerConnector(this, EnumSet.allOf(ForgeDirection.class));
|
ElectricityConnections.registerConnector(this, EnumSet.allOf(ForgeDirection.class));
|
||||||
inventory = new ItemStack[2];
|
inventory = new ItemStack[2];
|
||||||
output = i;
|
output = i;
|
||||||
|
|
|
@ -3,20 +3,19 @@ package mekanism.common;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import mekanism.common.RecipeHandler.Recipe;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
public class TileEntityEnrichmentChamber extends TileEntityElectricMachine
|
public class TileEntityEnrichmentChamber extends TileEntityElectricMachine
|
||||||
{
|
{
|
||||||
public static Map<ItemStack, ItemStack> recipes = new HashMap<ItemStack, ItemStack>();
|
|
||||||
|
|
||||||
public TileEntityEnrichmentChamber()
|
public TileEntityEnrichmentChamber()
|
||||||
{
|
{
|
||||||
super("Chamber.ogg", "Enrichment Chamber", "/resources/mekanism/gui/GuiChamber.png", 5, 200, 1000);
|
super("Chamber.ogg", "Enrichment Chamber", "/resources/mekanism/gui/GuiChamber.png", 5, 200, 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map getRecipes()
|
public HashMap getRecipes()
|
||||||
{
|
{
|
||||||
return recipes;
|
return Recipe.ENRICHMENT_CHAMBER.get();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,7 @@ import mekanism.api.InfusionInput;
|
||||||
import mekanism.api.InfusionOutput;
|
import mekanism.api.InfusionOutput;
|
||||||
import mekanism.api.InfusionType;
|
import mekanism.api.InfusionType;
|
||||||
import mekanism.client.Sound;
|
import mekanism.client.Sound;
|
||||||
|
import mekanism.common.RecipeHandler.Recipe;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
@ -42,8 +43,6 @@ import dan200.computer.api.IPeripheral;
|
||||||
|
|
||||||
public class TileEntityMetallurgicInfuser extends TileEntityElectricBlock implements IEnergySink, IJouleStorage, IVoltage, IPeripheral, IActiveState
|
public class TileEntityMetallurgicInfuser extends TileEntityElectricBlock implements IEnergySink, IJouleStorage, IVoltage, IPeripheral, IActiveState
|
||||||
{
|
{
|
||||||
public static Map<InfusionInput, InfusionOutput> recipes = new HashMap<InfusionInput, InfusionOutput>();
|
|
||||||
|
|
||||||
/** The Sound instance for this machine. */
|
/** The Sound instance for this machine. */
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public Sound audio;
|
public Sound audio;
|
||||||
|
@ -316,7 +315,7 @@ public class TileEntityMetallurgicInfuser extends TileEntityElectricBlock implem
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
InfusionOutput output = RecipeHandler.getOutput(InfusionInput.getInfusion(type, infuseStored, inventory[2]), true, recipes);
|
InfusionOutput output = RecipeHandler.getOutput(InfusionInput.getInfusion(type, infuseStored, inventory[2]), true, Recipe.METALLURGIC_INFUSER.get());
|
||||||
|
|
||||||
infuseStored -= output.getInfuseRequired();
|
infuseStored -= output.getInfuseRequired();
|
||||||
|
|
||||||
|
@ -346,7 +345,7 @@ public class TileEntityMetallurgicInfuser extends TileEntityElectricBlock implem
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
InfusionOutput output = RecipeHandler.getOutput(InfusionInput.getInfusion(type, infuseStored, inventory[2]), false, recipes);
|
InfusionOutput output = RecipeHandler.getOutput(InfusionInput.getInfusion(type, infuseStored, inventory[2]), false, Recipe.METALLURGIC_INFUSER.get());
|
||||||
|
|
||||||
if (output == null)
|
if (output == null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -3,22 +3,21 @@ package mekanism.common;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import mekanism.common.RecipeHandler.Recipe;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraftforge.oredict.OreDictionary;
|
import net.minecraftforge.oredict.OreDictionary;
|
||||||
|
|
||||||
public class TileEntityPlatinumCompressor extends TileEntityAdvancedElectricMachine
|
public class TileEntityPlatinumCompressor extends TileEntityAdvancedElectricMachine
|
||||||
{
|
{
|
||||||
public static Map<ItemStack, ItemStack> recipes = new HashMap<ItemStack, ItemStack>();
|
|
||||||
|
|
||||||
public TileEntityPlatinumCompressor()
|
public TileEntityPlatinumCompressor()
|
||||||
{
|
{
|
||||||
super("Compressor.ogg", "Platinum Compressor", "/resources/mekanism/gui/GuiCompressor.png", 5, 1, 200, 1000, 200);
|
super("Compressor.ogg", "Platinum Compressor", "/resources/mekanism/gui/GuiCompressor.png", 5, 1, 200, 1000, 200);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map getRecipes()
|
public HashMap getRecipes()
|
||||||
{
|
{
|
||||||
return recipes;
|
return Recipe.PLATINUM_COMPRESSOR.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -0,0 +1,31 @@
|
||||||
|
package mekanism.common;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
|
import mekanism.common.RecipeHandler.Recipe;
|
||||||
|
|
||||||
|
public class TileEntityPurificationChamber extends TileEntityAdvancedElectricMachine
|
||||||
|
{
|
||||||
|
public TileEntityPurificationChamber()
|
||||||
|
{
|
||||||
|
super("PurificationChamber.ogg", "Purification Chamber", "/resources/mekanism/gui/GuiPurificationChamber.png", 20, 1, 200, 12000, 1200);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HashMap getRecipes()
|
||||||
|
{
|
||||||
|
return Recipe.PURIFICATION_CHAMBER.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getFuelTicks(ItemStack itemstack)
|
||||||
|
{
|
||||||
|
if(itemstack.isItemEqual(new ItemStack(Block.sand))) return 10;
|
||||||
|
if(itemstack.isItemEqual(new ItemStack(Item.flint))) return 300;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
|
@ -391,6 +391,52 @@ public class TileEntitySmeltingFactory extends TileEntityElectricBlock implement
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getStartInventorySide(ForgeDirection side)
|
||||||
|
{
|
||||||
|
if(side == ForgeDirection.getOrientation(1) || side == MekanismUtils.getLeft(facing))
|
||||||
|
{
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
else if(side == ForgeDirection.getOrientation(0) || side == MekanismUtils.getRight(facing))
|
||||||
|
{
|
||||||
|
return 2+tier.processes;
|
||||||
|
}
|
||||||
|
else if(side == ForgeDirection.getOrientation(facing))
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
else if(side == ForgeDirection.getOrientation(facing).getOpposite())
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getSizeInventorySide(ForgeDirection side)
|
||||||
|
{
|
||||||
|
if(side == ForgeDirection.getOrientation(1) || side == MekanismUtils.getLeft(facing))
|
||||||
|
{
|
||||||
|
return tier.processes;
|
||||||
|
}
|
||||||
|
else if(side == ForgeDirection.getOrientation(0) || side == MekanismUtils.getRight(facing))
|
||||||
|
{
|
||||||
|
return tier.processes;
|
||||||
|
}
|
||||||
|
else if(side == ForgeDirection.getOrientation(facing))
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
else if(side == ForgeDirection.getOrientation(facing).getOpposite())
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handlePacketData(INetworkManager network, Packet250CustomPayload packet, EntityPlayer player, ByteArrayDataInput dataStream)
|
public void handlePacketData(INetworkManager network, Packet250CustomPayload packet, EntityPlayer player, ByteArrayDataInput dataStream)
|
||||||
{
|
{
|
||||||
|
@ -465,12 +511,12 @@ public class TileEntitySmeltingFactory extends TileEntityElectricBlock implement
|
||||||
|
|
||||||
public int getInputSlot(int operation)
|
public int getInputSlot(int operation)
|
||||||
{
|
{
|
||||||
return (operation+operation)+2;
|
return operation+2;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getOutputSlot(int operation)
|
public int getOutputSlot(int operation)
|
||||||
{
|
{
|
||||||
return (operation+operation)+3;
|
return tier.processes+2+operation;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -264,15 +264,14 @@ public class TileEntityTeleporter extends TileEntityElectricBlock implements IEn
|
||||||
{
|
{
|
||||||
setJoules(electricityStored - calculateEnergyCost(entity, closestCoords));
|
setJoules(electricityStored - calculateEnergyCost(entity, closestCoords));
|
||||||
|
|
||||||
entity.worldObj.playSoundAtEntity((EntityPlayerMP)entity, "mob.enderman.portal", 1.0F, 1.0F);
|
worldObj.playSoundAtEntity((EntityPlayerMP)entity, "mob.endermen.portal", 1.0F, 1.0F);
|
||||||
|
|
||||||
if(entity.worldObj.provider.dimensionId != closestCoords.dimensionId)
|
if(entity.worldObj.provider.dimensionId != closestCoords.dimensionId)
|
||||||
{
|
{
|
||||||
entity.travelToDimension(closestCoords.dimensionId);
|
entity.travelToDimension(closestCoords.dimensionId);
|
||||||
}
|
}
|
||||||
|
|
||||||
((EntityPlayerMP)entity).setLocationAndAngles(closestCoords.xCoord, closestCoords.yCoord, closestCoords.zCoord, entity.rotationYaw, entity.rotationPitch);
|
((EntityPlayerMP)entity).playerNetServerHandler.setPlayerLocation(closestCoords.xCoord+0.5, closestCoords.yCoord, closestCoords.zCoord+0.5, entity.rotationYaw, entity.rotationPitch);
|
||||||
((EntityPlayerMP)entity).playerNetServerHandler.setPlayerLocation(closestCoords.xCoord, closestCoords.yCoord, closestCoords.zCoord, entity.rotationYaw, entity.rotationPitch);
|
|
||||||
|
|
||||||
for(Teleporter.Coords coords : Mekanism.teleporters.get(code))
|
for(Teleporter.Coords coords : Mekanism.teleporters.get(code))
|
||||||
{
|
{
|
||||||
|
|
|
@ -16,9 +16,9 @@ public class TileEntityTheoreticalElementizer extends TileEntityAdvancedElectric
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map getRecipes()
|
public HashMap getRecipes()
|
||||||
{
|
{
|
||||||
return Collections.synchronizedMap(new HashMap<ItemStack, ItemStack>());
|
return (HashMap)Collections.synchronizedMap(new HashMap<ItemStack, ItemStack>());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -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.1.1", dependencies = "required-after:Mekanism")
|
@Mod(modid = "MekanismGenerators", name = "MekanismGenerators", version = "5.2.0", dependencies = "required-after:Mekanism")
|
||||||
@NetworkMod(clientSideRequired = true, serverSideRequired = false)
|
@NetworkMod(clientSideRequired = true, serverSideRequired = false)
|
||||||
public class MekanismGenerators
|
public class MekanismGenerators
|
||||||
{
|
{
|
||||||
|
@ -93,13 +93,15 @@ public class MekanismGenerators
|
||||||
//BioFuel Crusher Recipes
|
//BioFuel Crusher Recipes
|
||||||
RecipeHandler.addCrusherRecipe(new ItemStack(Block.sapling), new ItemStack(BioFuel, 2));
|
RecipeHandler.addCrusherRecipe(new ItemStack(Block.sapling), new ItemStack(BioFuel, 2));
|
||||||
RecipeHandler.addCrusherRecipe(new ItemStack(Block.tallGrass), new ItemStack(BioFuel, 2));
|
RecipeHandler.addCrusherRecipe(new ItemStack(Block.tallGrass), new ItemStack(BioFuel, 2));
|
||||||
|
RecipeHandler.addCrusherRecipe(new ItemStack(Item.reed), new ItemStack(BioFuel, 1));
|
||||||
RecipeHandler.addCrusherRecipe(new ItemStack(Item.seeds), new ItemStack(BioFuel, 1));
|
RecipeHandler.addCrusherRecipe(new ItemStack(Item.seeds), new ItemStack(BioFuel, 1));
|
||||||
RecipeHandler.addCrusherRecipe(new ItemStack(Item.wheat), new ItemStack(BioFuel, 2));
|
RecipeHandler.addCrusherRecipe(new ItemStack(Item.wheat), new ItemStack(BioFuel, 2));
|
||||||
RecipeHandler.addCrusherRecipe(new ItemStack(Item.pumpkinSeeds), new ItemStack(BioFuel, 1));
|
RecipeHandler.addCrusherRecipe(new ItemStack(Item.pumpkinSeeds), new ItemStack(BioFuel, 1));
|
||||||
RecipeHandler.addCrusherRecipe(new ItemStack(Item.melonSeeds), new ItemStack(BioFuel, 1));
|
RecipeHandler.addCrusherRecipe(new ItemStack(Item.melonSeeds), new ItemStack(BioFuel, 1));
|
||||||
RecipeHandler.addCrusherRecipe(new ItemStack(Item.appleRed), new ItemStack(BioFuel, 3));
|
RecipeHandler.addCrusherRecipe(new ItemStack(Item.appleRed), new ItemStack(BioFuel, 2));
|
||||||
RecipeHandler.addCrusherRecipe(new ItemStack(Item.bread), new ItemStack(BioFuel, 3));
|
RecipeHandler.addCrusherRecipe(new ItemStack(Item.bread), new ItemStack(BioFuel, 2));
|
||||||
RecipeHandler.addCrusherRecipe(new ItemStack(Item.potato), new ItemStack(BioFuel, 2));
|
RecipeHandler.addCrusherRecipe(new ItemStack(Item.potato), new ItemStack(BioFuel, 2));
|
||||||
|
RecipeHandler.addCrusherRecipe(new ItemStack(Item.carrot), new ItemStack(BioFuel, 2));
|
||||||
|
|
||||||
for(int i = 0; i < BlockLeaves.LEAF_TYPES.length; i++)
|
for(int i = 0; i < BlockLeaves.LEAF_TYPES.length; i++)
|
||||||
{
|
{
|
||||||
|
|
|
@ -34,6 +34,9 @@ public class TileEntityBioGenerator extends TileEntityGenerator implements ITank
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public Sound audio;
|
public Sound audio;
|
||||||
|
|
||||||
|
/** The amount of electricity this machine can produce with a unit of fuel. */
|
||||||
|
public final int GENERATION = 560;
|
||||||
|
|
||||||
/** The LiquidSlot biofuel instance for this generator. */
|
/** The LiquidSlot biofuel instance for this generator. */
|
||||||
public LiquidSlot bioFuelSlot = new LiquidSlot(24000, Mekanism.hooks.ForestryBiofuelID);
|
public LiquidSlot bioFuelSlot = new LiquidSlot(24000, Mekanism.hooks.ForestryBiofuelID);
|
||||||
|
|
||||||
|
@ -93,8 +96,6 @@ public class TileEntityBioGenerator extends TileEntityGenerator implements ITank
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(electricityStored < MAX_ELECTRICITY)
|
|
||||||
{
|
|
||||||
if(canOperate())
|
if(canOperate())
|
||||||
{
|
{
|
||||||
if(!worldObj.isRemote)
|
if(!worldObj.isRemote)
|
||||||
|
@ -102,7 +103,7 @@ public class TileEntityBioGenerator extends TileEntityGenerator implements ITank
|
||||||
setActive(true);
|
setActive(true);
|
||||||
}
|
}
|
||||||
bioFuelSlot.setLiquid(bioFuelSlot.liquidStored - 10);
|
bioFuelSlot.setLiquid(bioFuelSlot.liquidStored - 10);
|
||||||
setJoules(electricityStored + 560);
|
setJoules(electricityStored + GENERATION);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if(!worldObj.isRemote)
|
if(!worldObj.isRemote)
|
||||||
|
@ -111,7 +112,6 @@ public class TileEntityBioGenerator extends TileEntityGenerator implements ITank
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canOperate()
|
public boolean canOperate()
|
||||||
|
@ -189,7 +189,6 @@ public class TileEntityBioGenerator extends TileEntityGenerator implements ITank
|
||||||
bioFuelSlot.liquidStored = dataStream.readInt();
|
bioFuelSlot.liquidStored = dataStream.readInt();
|
||||||
worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
|
worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
|
||||||
worldObj.updateAllLightTypes(xCoord, yCoord, zCoord);
|
worldObj.updateAllLightTypes(xCoord, yCoord, zCoord);
|
||||||
worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, MekanismGenerators.generatorID);
|
|
||||||
} catch (Exception e)
|
} catch (Exception e)
|
||||||
{
|
{
|
||||||
System.out.println("[Mekanism] Error while handling tile entity packet.");
|
System.out.println("[Mekanism] Error while handling tile entity packet.");
|
||||||
|
|
|
@ -228,7 +228,7 @@ public class TileEntityElectrolyticSeparator extends TileEntityElectricBlock imp
|
||||||
waterSlot.setLiquid(waterSlot.liquidStored - 10);
|
waterSlot.setLiquid(waterSlot.liquidStored - 10);
|
||||||
setJoules(electricityStored - 4);
|
setJoules(electricityStored - 4);
|
||||||
setGas(EnumGas.OXYGEN, oxygenStored + 1);
|
setGas(EnumGas.OXYGEN, oxygenStored + 1);
|
||||||
setGas(EnumGas.HYDROGEN, hydrogenStored + 1);
|
setGas(EnumGas.HYDROGEN, hydrogenStored + 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(outputType != EnumGas.NONE && getGas(outputType) > 0 && !worldObj.isRemote)
|
if(outputType != EnumGas.NONE && getGas(outputType) > 0 && !worldObj.isRemote)
|
||||||
|
|
|
@ -35,6 +35,9 @@ public class TileEntityHeatGenerator extends TileEntityGenerator implements ITan
|
||||||
/** The LiquidSlot fuel instance for this generator. */
|
/** The LiquidSlot fuel instance for this generator. */
|
||||||
public LiquidSlot fuelSlot = new LiquidSlot(24000, Mekanism.hooks.BuildCraftFuelID);
|
public LiquidSlot fuelSlot = new LiquidSlot(24000, Mekanism.hooks.BuildCraftFuelID);
|
||||||
|
|
||||||
|
/** The amount of electricity this machine can produce with a unit of fuel. */
|
||||||
|
public final int GENERATION = 100;
|
||||||
|
|
||||||
public TileEntityHeatGenerator()
|
public TileEntityHeatGenerator()
|
||||||
{
|
{
|
||||||
super("Heat Generator", 160000, 480);
|
super("Heat Generator", 160000, 480);
|
||||||
|
@ -88,11 +91,14 @@ public class TileEntityHeatGenerator extends TileEntityGenerator implements ITan
|
||||||
{
|
{
|
||||||
inventory[0] = null;
|
inventory[0] = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(prevStack.isItemEqual(new ItemStack(Item.bucketLava)))
|
||||||
|
{
|
||||||
|
inventory[0] = new ItemStack(Item.bucketEmpty);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(electricityStored < MAX_ELECTRICITY)
|
|
||||||
{
|
|
||||||
setJoules(electricityStored + getEnvironmentBoost());
|
setJoules(electricityStored + getEnvironmentBoost());
|
||||||
|
|
||||||
if(canOperate())
|
if(canOperate())
|
||||||
|
@ -102,7 +108,7 @@ public class TileEntityHeatGenerator extends TileEntityGenerator implements ITan
|
||||||
setActive(true);
|
setActive(true);
|
||||||
}
|
}
|
||||||
fuelSlot.setLiquid(fuelSlot.liquidStored - 10);
|
fuelSlot.setLiquid(fuelSlot.liquidStored - 10);
|
||||||
setJoules(electricityStored + 100);
|
setJoules(electricityStored + GENERATION);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if(!worldObj.isRemote)
|
if(!worldObj.isRemote)
|
||||||
|
@ -111,7 +117,6 @@ public class TileEntityHeatGenerator extends TileEntityGenerator implements ITan
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canOperate()
|
public boolean canOperate()
|
||||||
|
|
|
@ -195,7 +195,6 @@ public class TileEntityHydrogenGenerator extends TileEntityGenerator implements
|
||||||
isActive = dataStream.readBoolean();
|
isActive = dataStream.readBoolean();
|
||||||
worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
|
worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
|
||||||
worldObj.updateAllLightTypes(xCoord, yCoord, zCoord);
|
worldObj.updateAllLightTypes(xCoord, yCoord, zCoord);
|
||||||
worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, MekanismGenerators.generatorID);
|
|
||||||
} catch (Exception e)
|
} catch (Exception e)
|
||||||
{
|
{
|
||||||
System.out.println("[Mekanism] Error while handling tile entity packet.");
|
System.out.println("[Mekanism] Error while handling tile entity packet.");
|
||||||
|
|
|
@ -148,7 +148,6 @@ public class TileEntitySolarGenerator extends TileEntityGenerator
|
||||||
isActive = dataStream.readBoolean();
|
isActive = dataStream.readBoolean();
|
||||||
seesSun = dataStream.readBoolean();
|
seesSun = dataStream.readBoolean();
|
||||||
worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
|
worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
|
||||||
worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, MekanismGenerators.generatorID);
|
|
||||||
} catch (Exception e)
|
} catch (Exception e)
|
||||||
{
|
{
|
||||||
System.out.println("[Mekanism] Error while handling tile entity packet.");
|
System.out.println("[Mekanism] Error while handling tile entity packet.");
|
||||||
|
|
139
src/minecraft/mekanism/nei/AdvancedMachineRecipeHandler.java
Normal file
|
@ -0,0 +1,139 @@
|
||||||
|
package mekanism.nei;
|
||||||
|
|
||||||
|
import java.awt.Rectangle;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Map.Entry;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
|
import codechicken.nei.NEIServerUtils;
|
||||||
|
import codechicken.nei.PositionedStack;
|
||||||
|
import codechicken.nei.forge.GuiContainerManager;
|
||||||
|
import codechicken.nei.recipe.TemplateRecipeHandler;
|
||||||
|
|
||||||
|
public abstract class AdvancedMachineRecipeHandler extends TemplateRecipeHandler
|
||||||
|
{
|
||||||
|
int ticksPassed;
|
||||||
|
|
||||||
|
public abstract String getRecipeId();
|
||||||
|
|
||||||
|
public abstract ItemStack getFuelStack();
|
||||||
|
|
||||||
|
public abstract Set<Entry<ItemStack, ItemStack>> getRecipes();
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void drawBackground(GuiContainerManager guimanager, int i)
|
||||||
|
{
|
||||||
|
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
|
guimanager.bindTextureByName(getGuiTexture());
|
||||||
|
guimanager.drawTexturedModalRect(12, 0, 28, 5, 144, 68);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void drawExtras(GuiContainerManager guimanager, int i)
|
||||||
|
{
|
||||||
|
float f = ticksPassed >= 40 ? (ticksPassed - 40) % 20 / 20.0F : 0.0F;
|
||||||
|
drawProgressBar(guimanager, 63, 34, 176, 0, 24, 7, f, 0);
|
||||||
|
|
||||||
|
f = ticksPassed >= 20 && ticksPassed < 40 ? (ticksPassed - 20) % 20 / 20.0F : 1.0F;
|
||||||
|
if(ticksPassed < 20) f = 0.0F;
|
||||||
|
drawProgressBar(guimanager, 45, 32, 176, 7, 5, 12, f, 3);
|
||||||
|
|
||||||
|
f = ticksPassed <= 20 ? ticksPassed / 20.0F : 1.0F;
|
||||||
|
drawProgressBar(guimanager, 149, 12, 176, 19, 4, 52, f, 3);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onUpdate()
|
||||||
|
{
|
||||||
|
super.onUpdate();
|
||||||
|
ticksPassed++;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void loadTransferRects()
|
||||||
|
{
|
||||||
|
transferRects.add(new TemplateRecipeHandler.RecipeTransferRect(new Rectangle(63, 34, 24, 7), getRecipeId(), new Object[0]));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void loadCraftingRecipes(String outputId, Object... results)
|
||||||
|
{
|
||||||
|
if(outputId.equals(getRecipeId()))
|
||||||
|
{
|
||||||
|
for(Map.Entry irecipe : getRecipes())
|
||||||
|
{
|
||||||
|
arecipes.add(new CachedIORecipe(irecipe, getFuelStack()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
super.loadCraftingRecipes(outputId, results);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void loadCraftingRecipes(ItemStack result)
|
||||||
|
{
|
||||||
|
for(Map.Entry irecipe : getRecipes())
|
||||||
|
{
|
||||||
|
if(NEIServerUtils.areStacksSameTypeCrafting((ItemStack)irecipe.getValue(), result))
|
||||||
|
{
|
||||||
|
arecipes.add(new CachedIORecipe(irecipe, getFuelStack()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void loadUsageRecipes(ItemStack ingredient)
|
||||||
|
{
|
||||||
|
for(Map.Entry irecipe : getRecipes())
|
||||||
|
{
|
||||||
|
if(NEIServerUtils.areStacksSameTypeCrafting((ItemStack)irecipe.getKey(), ingredient))
|
||||||
|
{
|
||||||
|
arecipes.add(new CachedIORecipe(irecipe, getFuelStack()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class CachedIORecipe extends TemplateRecipeHandler.CachedRecipe
|
||||||
|
{
|
||||||
|
public PositionedStack inputStack;
|
||||||
|
public PositionedStack outputStack;
|
||||||
|
public PositionedStack fuelStack;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PositionedStack getIngredient()
|
||||||
|
{
|
||||||
|
return inputStack;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PositionedStack getResult()
|
||||||
|
{
|
||||||
|
return outputStack;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PositionedStack getOtherStack()
|
||||||
|
{
|
||||||
|
return fuelStack;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CachedIORecipe(ItemStack input, ItemStack output, ItemStack fuel)
|
||||||
|
{
|
||||||
|
super();
|
||||||
|
inputStack = new PositionedStack(input, 40, 12);
|
||||||
|
outputStack = new PositionedStack(output, 100, 30);
|
||||||
|
fuelStack = new PositionedStack(fuel, 40, 48);
|
||||||
|
}
|
||||||
|
|
||||||
|
public CachedIORecipe(Map.Entry recipe, ItemStack fuel)
|
||||||
|
{
|
||||||
|
this((ItemStack)recipe.getKey(), (ItemStack)recipe.getValue(), fuel);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
57
src/minecraft/mekanism/nei/CombinerRecipeHandler.java
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
package mekanism.nei;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
|
import mekanism.client.GuiAdvancedElectricMachine;
|
||||||
|
import mekanism.client.GuiCombiner;
|
||||||
|
import mekanism.common.TileEntityCombiner;
|
||||||
|
import mekanism.common.RecipeHandler.Recipe;
|
||||||
|
|
||||||
|
public class CombinerRecipeHandler extends AdvancedMachineRecipeHandler
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public String getRecipeName()
|
||||||
|
{
|
||||||
|
return "Combiner";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getRecipeId()
|
||||||
|
{
|
||||||
|
return "mekanism.combiner";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getOverlayIdentifier()
|
||||||
|
{
|
||||||
|
return "combiner";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Set getRecipes()
|
||||||
|
{
|
||||||
|
return Recipe.COMBINER.get().entrySet();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getGuiTexture()
|
||||||
|
{
|
||||||
|
return "/resources/mekanism/gui/GuiCombiner.png";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ItemStack getFuelStack()
|
||||||
|
{
|
||||||
|
return new ItemStack(Block.cobblestone);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Class getGuiClass()
|
||||||
|
{
|
||||||
|
return GuiCombiner.class;
|
||||||
|
}
|
||||||
|
}
|
47
src/minecraft/mekanism/nei/CrusherRecipeHandler.java
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
package mekanism.nei;
|
||||||
|
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
import mekanism.client.GuiCrusher;
|
||||||
|
import mekanism.client.GuiElectricMachine;
|
||||||
|
import mekanism.common.TileEntityCrusher;
|
||||||
|
import mekanism.common.RecipeHandler.Recipe;
|
||||||
|
|
||||||
|
public class CrusherRecipeHandler extends MachineRecipeHandler
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public String getRecipeName()
|
||||||
|
{
|
||||||
|
return "Crusher";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getRecipeId()
|
||||||
|
{
|
||||||
|
return "mekanism.crusher";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getOverlayIdentifier()
|
||||||
|
{
|
||||||
|
return "crusher";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Set getRecipes()
|
||||||
|
{
|
||||||
|
return Recipe.CRUSHER.get().entrySet();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getGuiTexture()
|
||||||
|
{
|
||||||
|
return "/resources/mekanism/gui/GuiCrusher.png";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Class getGuiClass()
|
||||||
|
{
|
||||||
|
return GuiCrusher.class;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,47 @@
|
||||||
|
package mekanism.nei;
|
||||||
|
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
import mekanism.client.GuiElectricMachine;
|
||||||
|
import mekanism.client.GuiEnrichmentChamber;
|
||||||
|
import mekanism.common.TileEntityEnrichmentChamber;
|
||||||
|
import mekanism.common.RecipeHandler.Recipe;
|
||||||
|
|
||||||
|
public class EnrichmentChamberRecipeHandler extends MachineRecipeHandler
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public String getRecipeName()
|
||||||
|
{
|
||||||
|
return "Enrichment Chamber";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getRecipeId()
|
||||||
|
{
|
||||||
|
return "mekanism.chamber";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getOverlayIdentifier()
|
||||||
|
{
|
||||||
|
return "chamber";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Set getRecipes()
|
||||||
|
{
|
||||||
|
return Recipe.ENRICHMENT_CHAMBER.get().entrySet();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getGuiTexture()
|
||||||
|
{
|
||||||
|
return "/resources/mekanism/gui/GuiChamber.png";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Class getGuiClass()
|
||||||
|
{
|
||||||
|
return GuiEnrichmentChamber.class;
|
||||||
|
}
|
||||||
|
}
|
124
src/minecraft/mekanism/nei/MachineRecipeHandler.java
Normal file
|
@ -0,0 +1,124 @@
|
||||||
|
package mekanism.nei;
|
||||||
|
|
||||||
|
import java.awt.Rectangle;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Map.Entry;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
|
import codechicken.nei.NEIServerUtils;
|
||||||
|
import codechicken.nei.PositionedStack;
|
||||||
|
import codechicken.nei.forge.GuiContainerManager;
|
||||||
|
import codechicken.nei.recipe.TemplateRecipeHandler;
|
||||||
|
|
||||||
|
public abstract class MachineRecipeHandler extends TemplateRecipeHandler
|
||||||
|
{
|
||||||
|
int ticksPassed;
|
||||||
|
|
||||||
|
public abstract String getRecipeId();
|
||||||
|
|
||||||
|
public abstract Set<Entry<ItemStack, ItemStack>> getRecipes();
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void drawBackground(GuiContainerManager guimanager, int i)
|
||||||
|
{
|
||||||
|
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
|
guimanager.bindTextureByName(getGuiTexture());
|
||||||
|
guimanager.drawTexturedModalRect(12, 0, 28, 5, 144, 68);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void drawExtras(GuiContainerManager guimanager, int i)
|
||||||
|
{
|
||||||
|
float f = ticksPassed >= 20 ? (ticksPassed - 20) % 20 / 20.0F : 0.0F;
|
||||||
|
drawProgressBar(guimanager, 63, 34, 176, 0, 24, 7, f, 0);
|
||||||
|
f = ticksPassed <= 20 ? ticksPassed / 20.0F : 1.0F;
|
||||||
|
drawProgressBar(guimanager, 149, 12, 176, 7, 4, 52, f, 3);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onUpdate()
|
||||||
|
{
|
||||||
|
super.onUpdate();
|
||||||
|
ticksPassed++;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void loadTransferRects()
|
||||||
|
{
|
||||||
|
transferRects.add(new TemplateRecipeHandler.RecipeTransferRect(new Rectangle(63, 34, 24, 7), getRecipeId(), new Object[0]));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void loadCraftingRecipes(String outputId, Object... results)
|
||||||
|
{
|
||||||
|
if(outputId.equals(getRecipeId()))
|
||||||
|
{
|
||||||
|
for(Map.Entry irecipe : getRecipes())
|
||||||
|
{
|
||||||
|
arecipes.add(new CachedIORecipe(irecipe));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
super.loadCraftingRecipes(outputId, results);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void loadCraftingRecipes(ItemStack result)
|
||||||
|
{
|
||||||
|
for(Map.Entry irecipe : getRecipes())
|
||||||
|
{
|
||||||
|
if(NEIServerUtils.areStacksSameTypeCrafting((ItemStack)irecipe.getValue(), result))
|
||||||
|
{
|
||||||
|
arecipes.add(new CachedIORecipe(irecipe));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void loadUsageRecipes(ItemStack ingredient)
|
||||||
|
{
|
||||||
|
for(Map.Entry irecipe : getRecipes())
|
||||||
|
{
|
||||||
|
if(NEIServerUtils.areStacksSameTypeCrafting((ItemStack)irecipe.getKey(), ingredient))
|
||||||
|
{
|
||||||
|
arecipes.add(new CachedIORecipe(irecipe));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class CachedIORecipe extends TemplateRecipeHandler.CachedRecipe
|
||||||
|
{
|
||||||
|
public PositionedStack input;
|
||||||
|
public PositionedStack output;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PositionedStack getIngredient()
|
||||||
|
{
|
||||||
|
return input;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PositionedStack getResult()
|
||||||
|
{
|
||||||
|
return output;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CachedIORecipe(ItemStack itemstack, ItemStack itemstack1)
|
||||||
|
{
|
||||||
|
super();
|
||||||
|
input = new PositionedStack(itemstack, 40, 12);
|
||||||
|
output = new PositionedStack(itemstack1, 100, 30);
|
||||||
|
}
|
||||||
|
|
||||||
|
public CachedIORecipe(Map.Entry recipe)
|
||||||
|
{
|
||||||
|
this((ItemStack)recipe.getKey(), (ItemStack)recipe.getValue());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
188
src/minecraft/mekanism/nei/MetallurgicInfuserRecipeHandler.java
Normal file
|
@ -0,0 +1,188 @@
|
||||||
|
package mekanism.nei;
|
||||||
|
|
||||||
|
import java.awt.Rectangle;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Map.Entry;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
import mekanism.api.InfusionInput;
|
||||||
|
import mekanism.api.InfusionOutput;
|
||||||
|
import mekanism.api.InfusionType;
|
||||||
|
import mekanism.client.GuiMetallurgicInfuser;
|
||||||
|
import mekanism.common.Mekanism;
|
||||||
|
import mekanism.common.TileEntityMetallurgicInfuser;
|
||||||
|
import mekanism.common.RecipeHandler.Recipe;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
|
import codechicken.nei.NEIServerUtils;
|
||||||
|
import codechicken.nei.PositionedStack;
|
||||||
|
import codechicken.nei.forge.GuiContainerManager;
|
||||||
|
import codechicken.nei.recipe.TemplateRecipeHandler;
|
||||||
|
|
||||||
|
public class MetallurgicInfuserRecipeHandler extends TemplateRecipeHandler
|
||||||
|
{
|
||||||
|
int ticksPassed;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getRecipeName()
|
||||||
|
{
|
||||||
|
return "Metallurgic Infuser";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getOverlayIdentifier()
|
||||||
|
{
|
||||||
|
return "infuser";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getGuiTexture()
|
||||||
|
{
|
||||||
|
return "/resources/mekanism/gui/GuiMetallurgicInfuser.png";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Class getGuiClass()
|
||||||
|
{
|
||||||
|
return GuiMetallurgicInfuser.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRecipeId()
|
||||||
|
{
|
||||||
|
return "mekanism.infuser";
|
||||||
|
}
|
||||||
|
|
||||||
|
public ItemStack getInfuseStack(InfusionType type)
|
||||||
|
{
|
||||||
|
return type == InfusionType.COAL ? new ItemStack(Mekanism.CompressedCarbon) : new ItemStack(Mekanism.Dust, 1, 7);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Set<Entry<InfusionInput, InfusionOutput>> getRecipes()
|
||||||
|
{
|
||||||
|
return Recipe.METALLURGIC_INFUSER.get().entrySet();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void drawBackground(GuiContainerManager guimanager, int i)
|
||||||
|
{
|
||||||
|
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
|
guimanager.bindTextureByName(getGuiTexture());
|
||||||
|
guimanager.drawTexturedModalRect(0, 0, 5, 5, 166, 78);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void drawExtras(GuiContainerManager guimanager, int i)
|
||||||
|
{
|
||||||
|
float f = ticksPassed >= 40 ? (ticksPassed - 40) % 20 / 20.0F : 0.0F;
|
||||||
|
drawProgressBar(guimanager, 67, 42, 176, 104, 32, 8, f, 0);
|
||||||
|
|
||||||
|
f = ticksPassed >= 20 && ticksPassed < 40 ? (ticksPassed - 20) % 20 / 20.0F : 1.0F;
|
||||||
|
if(ticksPassed < 20) f = 0.0F;
|
||||||
|
int infuseX = 176 + (getOtherStacks(i).get(0).item.isItemEqual(new ItemStack(Mekanism.CompressedCarbon)) ? 4 : 0);
|
||||||
|
int infuseY = getOtherStacks(i).get(0).item.isItemEqual(new ItemStack(Mekanism.CompressedCarbon)) ? 0 : 52;
|
||||||
|
|
||||||
|
drawProgressBar(guimanager, 2, 22, infuseX, infuseY, 4, 52, f, 3);
|
||||||
|
|
||||||
|
f = ticksPassed <= 20 ? ticksPassed / 20.0F : 1.0F;
|
||||||
|
drawProgressBar(guimanager, 160, 12, 176, 0, 4, 52, f, 3);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onUpdate()
|
||||||
|
{
|
||||||
|
super.onUpdate();
|
||||||
|
ticksPassed++;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void loadTransferRects()
|
||||||
|
{
|
||||||
|
transferRects.add(new TemplateRecipeHandler.RecipeTransferRect(new Rectangle(67, 42, 32, 8), getRecipeId(), new Object[0]));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void loadCraftingRecipes(String outputId, Object... results)
|
||||||
|
{
|
||||||
|
if(outputId.equals(getRecipeId()))
|
||||||
|
{
|
||||||
|
for(Map.Entry irecipe : getRecipes())
|
||||||
|
{
|
||||||
|
arecipes.add(new CachedIORecipe(irecipe, getInfuseStack(((InfusionInput)irecipe.getKey()).infusionType)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
super.loadCraftingRecipes(outputId, results);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int recipiesPerPage()
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void loadCraftingRecipes(ItemStack result)
|
||||||
|
{
|
||||||
|
for(Map.Entry irecipe : getRecipes())
|
||||||
|
{
|
||||||
|
if(NEIServerUtils.areStacksSameTypeCrafting(((InfusionOutput)irecipe.getValue()).resource, result))
|
||||||
|
{
|
||||||
|
arecipes.add(new CachedIORecipe(irecipe, getInfuseStack(((InfusionInput)irecipe.getKey()).infusionType)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void loadUsageRecipes(ItemStack ingredient)
|
||||||
|
{
|
||||||
|
for(Map.Entry irecipe : getRecipes())
|
||||||
|
{
|
||||||
|
if(NEIServerUtils.areStacksSameTypeCrafting(((InfusionInput)irecipe.getKey()).inputSlot, ingredient))
|
||||||
|
{
|
||||||
|
arecipes.add(new CachedIORecipe(irecipe, getInfuseStack(((InfusionInput)irecipe.getKey()).infusionType)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class CachedIORecipe extends TemplateRecipeHandler.CachedRecipe
|
||||||
|
{
|
||||||
|
public PositionedStack inputStack;
|
||||||
|
public PositionedStack outputStack;
|
||||||
|
public PositionedStack infuseStack;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PositionedStack getIngredient()
|
||||||
|
{
|
||||||
|
return inputStack;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PositionedStack getResult()
|
||||||
|
{
|
||||||
|
return outputStack;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PositionedStack getOtherStack()
|
||||||
|
{
|
||||||
|
return infuseStack;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CachedIORecipe(ItemStack input, ItemStack output, ItemStack infuse)
|
||||||
|
{
|
||||||
|
super();
|
||||||
|
inputStack = new PositionedStack(input, 46, 38);
|
||||||
|
outputStack = new PositionedStack(output, 104, 38);
|
||||||
|
infuseStack = new PositionedStack(infuse, 12, 30);
|
||||||
|
}
|
||||||
|
|
||||||
|
public CachedIORecipe(Map.Entry recipe, ItemStack infuse)
|
||||||
|
{
|
||||||
|
this(((InfusionInput)recipe.getKey()).inputSlot, ((InfusionOutput)recipe.getValue()).resource, infuse);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
36
src/minecraft/mekanism/nei/NEIMekanismConfig.java
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
package mekanism.nei;
|
||||||
|
|
||||||
|
import codechicken.nei.api.API;
|
||||||
|
import codechicken.nei.api.IConfigureNEI;
|
||||||
|
|
||||||
|
public class NEIMekanismConfig implements IConfigureNEI
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public void loadConfig()
|
||||||
|
{
|
||||||
|
API.registerRecipeHandler(new EnrichmentChamberRecipeHandler());
|
||||||
|
API.registerUsageHandler(new EnrichmentChamberRecipeHandler());
|
||||||
|
API.registerRecipeHandler(new PlatinumCompressorRecipeHandler());
|
||||||
|
API.registerUsageHandler(new PlatinumCompressorRecipeHandler());
|
||||||
|
API.registerRecipeHandler(new CrusherRecipeHandler());
|
||||||
|
API.registerUsageHandler(new CrusherRecipeHandler());
|
||||||
|
API.registerRecipeHandler(new CombinerRecipeHandler());
|
||||||
|
API.registerUsageHandler(new CombinerRecipeHandler());
|
||||||
|
API.registerRecipeHandler(new MetallurgicInfuserRecipeHandler());
|
||||||
|
API.registerUsageHandler(new MetallurgicInfuserRecipeHandler());
|
||||||
|
API.registerRecipeHandler(new PurificationChamberRecipeHandler());
|
||||||
|
API.registerUsageHandler(new PurificationChamberRecipeHandler());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getName()
|
||||||
|
{
|
||||||
|
return "Mekanism NEI Plugin";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getVersion()
|
||||||
|
{
|
||||||
|
return "1.0.1";
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,56 @@
|
||||||
|
package mekanism.nei;
|
||||||
|
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
|
import mekanism.client.GuiAdvancedElectricMachine;
|
||||||
|
import mekanism.client.GuiPlatinumCompressor;
|
||||||
|
import mekanism.common.Mekanism;
|
||||||
|
import mekanism.common.TileEntityPlatinumCompressor;
|
||||||
|
import mekanism.common.RecipeHandler.Recipe;
|
||||||
|
|
||||||
|
public class PlatinumCompressorRecipeHandler extends AdvancedMachineRecipeHandler
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public String getRecipeName()
|
||||||
|
{
|
||||||
|
return "Platinum Compressor";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getRecipeId()
|
||||||
|
{
|
||||||
|
return "mekanism.compressor";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getOverlayIdentifier()
|
||||||
|
{
|
||||||
|
return "compressor";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Set getRecipes()
|
||||||
|
{
|
||||||
|
return Recipe.PLATINUM_COMPRESSOR.get().entrySet();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getGuiTexture()
|
||||||
|
{
|
||||||
|
return "/resources/mekanism/gui/GuiCompressor.png";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ItemStack getFuelStack()
|
||||||
|
{
|
||||||
|
return new ItemStack(Mekanism.Ingot, 1, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Class getGuiClass()
|
||||||
|
{
|
||||||
|
return GuiPlatinumCompressor.class;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,55 @@
|
||||||
|
package mekanism.nei;
|
||||||
|
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
import mekanism.client.GuiAdvancedElectricMachine;
|
||||||
|
import mekanism.client.GuiPurificationChamber;
|
||||||
|
import mekanism.common.Mekanism;
|
||||||
|
import mekanism.common.RecipeHandler.Recipe;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
|
public class PurificationChamberRecipeHandler extends AdvancedMachineRecipeHandler
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public String getRecipeName()
|
||||||
|
{
|
||||||
|
return "Purification Chamber";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getRecipeId()
|
||||||
|
{
|
||||||
|
return "mekanism.purificationchamber";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getOverlayIdentifier()
|
||||||
|
{
|
||||||
|
return "purificationchamber";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Set getRecipes()
|
||||||
|
{
|
||||||
|
return Recipe.PURIFICATION_CHAMBER.get().entrySet();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getGuiTexture()
|
||||||
|
{
|
||||||
|
return "/resources/mekanism/gui/GuiPurificationChamber.png";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ItemStack getFuelStack()
|
||||||
|
{
|
||||||
|
return new ItemStack(Item.flint);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Class getGuiClass()
|
||||||
|
{
|
||||||
|
return GuiPurificationChamber.class;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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.1.1", dependencies = "required-after:Mekanism")
|
@Mod(modid = "MekanismTools", name = "MekanismTools", version = "5.2.0", dependencies = "required-after:Mekanism")
|
||||||
@NetworkMod(clientSideRequired = true, serverSideRequired = false)
|
@NetworkMod(clientSideRequired = true, serverSideRequired = false)
|
||||||
public class MekanismTools
|
public class MekanismTools
|
||||||
{
|
{
|
||||||
|
|