Some work on things, got rid of version constants, they're supposed to differ per module.
This commit is contained in:
parent
665b857b94
commit
14d557cbe5
7 changed files with 48 additions and 16 deletions
|
@ -230,7 +230,7 @@ public class GuiDigitalMinerConfig extends GuiMekanism
|
|||
String prevMin = minField != null ? minField.getText() : "" + tileEntity.minY;
|
||||
String prevMax = maxField != null ? maxField.getText() : "" + tileEntity.maxY;
|
||||
|
||||
radiusField = new GuiTextField(fontRenderer, guiWidth + 12, guiHeight + 67, 24, 11);
|
||||
radiusField = new GuiTextField(fontRenderer, guiWidth + 12, guiHeight + 67, 26, 11);
|
||||
radiusField.setMaxStringLength(3);
|
||||
radiusField.setText(prevRad);
|
||||
|
||||
|
@ -390,6 +390,31 @@ public class GuiDigitalMinerConfig extends GuiMekanism
|
|||
super.keyTyped(c, i);
|
||||
}
|
||||
|
||||
if(i == Keyboard.KEY_RETURN)
|
||||
{
|
||||
if(radiusField.isFocused())
|
||||
{
|
||||
if(!radiusField.getText().isEmpty())
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
else if(minField.isFocused())
|
||||
{
|
||||
if(!minField.getText().isEmpty())
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
else if(maxField.isFocused())
|
||||
{
|
||||
if(!maxField.getText().isEmpty())
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(Character.isDigit(c) || i == Keyboard.KEY_BACK || i == Keyboard.KEY_DELETE || i == Keyboard.KEY_LEFT || i == Keyboard.KEY_RIGHT)
|
||||
{
|
||||
radiusField.textboxKeyTyped(c, i);
|
||||
|
|
|
@ -115,12 +115,10 @@ import cpw.mods.fml.common.registry.GameRegistry;
|
|||
* @author AidanBrady
|
||||
*
|
||||
*/
|
||||
@Mod(modid = "Mekanism", name = "Mekanism", version = Mekanism.VERSION)
|
||||
@Mod(modid = "Mekanism", name = "Mekanism", version = "5.6.0")
|
||||
@NetworkMod(channels = {"MEK"}, clientSideRequired = true, serverSideRequired = false, packetHandler = PacketHandler.class)
|
||||
public class Mekanism
|
||||
{
|
||||
public static final String VERSION = "5.6.0";
|
||||
|
||||
/** Mekanism logger instance */
|
||||
public static Logger logger = Logger.getLogger("Minecraft");
|
||||
|
||||
|
|
|
@ -249,6 +249,18 @@ public class TileEntityDigitalMiner extends TileEntityElectricBlock implements I
|
|||
{
|
||||
reset();
|
||||
}
|
||||
else if(type == 6)
|
||||
{
|
||||
radius = dataStream.readInt();
|
||||
}
|
||||
else if(type == 7)
|
||||
{
|
||||
minY = dataStream.readInt();
|
||||
}
|
||||
else if(type == 8)
|
||||
{
|
||||
maxY = dataStream.readInt();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ import cpw.mods.fml.common.network.NetworkRegistry;
|
|||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
|
||||
@Mod(modid = "MekanismGenerators", name = "MekanismGenerators", version = Mekanism.VERSION, dependencies = "required-after:Mekanism")
|
||||
@Mod(modid = "MekanismGenerators", name = "MekanismGenerators", version = "5.6.0", dependencies = "required-after:Mekanism")
|
||||
@NetworkMod(clientSideRequired = true, serverSideRequired = false)
|
||||
public class MekanismGenerators implements IModule
|
||||
{
|
||||
|
|
|
@ -48,7 +48,7 @@ import cpw.mods.fml.common.network.NetworkMod;
|
|||
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
@Mod(modid = "MekanismInduction", name = "MekanismInduction", version = Mekanism.VERSION)
|
||||
@Mod(modid = "MekanismInduction", name = "MekanismInduction", version = "5.6.0", dependencies = "required-after:Mekanism")
|
||||
@NetworkMod(clientSideRequired = true, serverSideRequired = false)
|
||||
public class MekanismInduction implements IModule
|
||||
{
|
||||
|
@ -141,7 +141,7 @@ public class MekanismInduction implements IModule
|
|||
ElectromagneticContractor = new BlockEMContractor(Mekanism.configuration.getBlock("ElectromagneticContractor", getNextBlockID()).getInt()).setUnlocalizedName("ElectromagneticContractor");
|
||||
Battery = new BlockBattery(Mekanism.configuration.getBlock("Battery", getNextBlockID()).getInt()).setUnlocalizedName("Battery");
|
||||
|
||||
if (REPLACE_FURNACE)
|
||||
if(REPLACE_FURNACE)
|
||||
{
|
||||
blockAdvancedFurnaceIdle = BlockAdvancedFurnace.createNew(false);
|
||||
blockAdvancedFurnaceBurning = BlockAdvancedFurnace.createNew(true);
|
||||
|
@ -163,7 +163,7 @@ public class MekanismInduction implements IModule
|
|||
GameRegistry.registerBlock(ElectromagneticContractor, ItemBlockContractor.class, "ElectromagneticContractor");
|
||||
GameRegistry.registerBlock(Battery, "Battery");
|
||||
|
||||
// Tiles
|
||||
//Tiles
|
||||
GameRegistry.registerTileEntity(TileEntityTesla.class, "Tesla");
|
||||
GameRegistry.registerTileEntity(TileEntityMultimeter.class, "Multimeter");
|
||||
GameRegistry.registerTileEntity(TileEntityEMContractor.class, "ElectromagneticContractor");
|
||||
|
@ -188,7 +188,7 @@ public class MekanismInduction implements IModule
|
|||
* Recipes
|
||||
*/
|
||||
ItemStack emptyCapacitor = new ItemStack(Capacitor);
|
||||
((IItemElectric) Capacitor).setElectricity(emptyCapacitor, 0);
|
||||
((IItemElectric)Capacitor).setElectricity(emptyCapacitor, 0);
|
||||
|
||||
/** Capacitor **/
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(emptyCapacitor, "RRR", "RIR", "RRR", 'R', Item.redstone, 'I', UniversalRecipes.PRIMARY_METAL));
|
||||
|
@ -214,22 +214,19 @@ public class MekanismInduction implements IModule
|
|||
|
||||
public static void replaceTileEntity(Class<? extends TileEntity> findTile, Class<? extends TileEntity> replaceTile)
|
||||
{
|
||||
try
|
||||
{
|
||||
try {
|
||||
Map<String, Class> nameToClassMap = ObfuscationReflectionHelper.getPrivateValue(TileEntity.class, null, "field_" + "70326_a", "nameToClassMap", "a");
|
||||
Map<Class, String> classToNameMap = ObfuscationReflectionHelper.getPrivateValue(TileEntity.class, null, "field_" + "70326_b", "classToNameMap", "b");
|
||||
|
||||
String findTileID = classToNameMap.get(findTile);
|
||||
|
||||
if (findTileID != null)
|
||||
if(findTileID != null)
|
||||
{
|
||||
nameToClassMap.put(findTileID, replaceTile);
|
||||
classToNameMap.put(replaceTile, findTileID);
|
||||
classToNameMap.remove(findTile);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
} catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ import cpw.mods.fml.common.network.NetworkMod;
|
|||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
|
||||
@Mod(modid = "MekanismTools", name = "MekanismTools", version = Mekanism.VERSION, dependencies = "required-after:Mekanism")
|
||||
@Mod(modid = "MekanismTools", name = "MekanismTools", version = "5.6.0", dependencies = "required-after:Mekanism")
|
||||
@NetworkMod(clientSideRequired = true, serverSideRequired = false)
|
||||
public class MekanismTools implements IModule
|
||||
{
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
Loading…
Reference in a new issue