This commit is contained in:
DarkGuardsman 2013-09-20 12:03:51 -04:00
parent 07eb79cdd0
commit b688548aa0
18 changed files with 31 additions and 43 deletions

View file

@ -18,7 +18,7 @@ import dark.core.common.machines.TileEntityCoalGenerator;
@SideOnly(Side.CLIENT)
public class GuiCoalGenerator extends GuiContainer
{
private static final ResourceLocation coalGeneratorTexture = new ResourceLocation(DarkMain.getInstance().DOMAIN,DarkMain.GUI_DIRECTORY+ "coal_generator.png");
private static final ResourceLocation coalGeneratorTexture = new ResourceLocation(DarkMain.getInstance().DOMAIN, DarkMain.GUI_DIRECTORY + "coal_generator.png");
private TileEntityCoalGenerator tileEntity;

View file

@ -18,7 +18,7 @@ import dark.core.common.machines.TileEntityElectricFurnace;
@SideOnly(Side.CLIENT)
public class GuiElectricFurnace extends GuiContainer
{
private static final ResourceLocation electricFurnaceTexture = new ResourceLocation(DarkMain.getInstance().DOMAIN,DarkMain.GUI_DIRECTORY+ "electric_furnace.png");
private static final ResourceLocation electricFurnaceTexture = new ResourceLocation(DarkMain.getInstance().DOMAIN, DarkMain.GUI_DIRECTORY + "electric_furnace.png");
private TileEntityElectricFurnace tileEntity;

View file

@ -5,8 +5,6 @@ import java.io.File;
import java.util.Arrays;
import net.minecraft.block.Block;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.Configuration;
import net.minecraftforge.common.MinecraftForge;
@ -258,6 +256,4 @@ public class DarkMain extends ModPrefab
return "dark";
}
}

View file

@ -10,6 +10,7 @@ import net.minecraft.util.Icon;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import dark.core.common.DarkMain;
import dark.core.prefab.ModPrefab;
public class BlockBasalt extends Block
{
@ -35,7 +36,7 @@ public class BlockBasalt extends Block
public BlockBasalt()
{
super(DarkMain.CONFIGURATION.getBlock("basalt", DarkMain.getNextID()).getInt(), Material.rock);
super(DarkMain.CONFIGURATION.getBlock("basalt", ModPrefab.getNextID()).getInt(), Material.rock);
this.setCreativeTab(CreativeTabs.tabDecorations);
this.setHardness(2f);
this.setResistance(2f);

View file

@ -8,13 +8,14 @@ import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import dark.core.common.DarkMain;
import dark.core.prefab.BlockColored;
import dark.core.prefab.ModPrefab;
public class BlockColorGlass extends BlockColored
{
public BlockColorGlass(String name)
{
super(name, DarkMain.CONFIGURATION.getBlock(name, DarkMain.getNextID()).getInt(), Material.glass);
super(name, DarkMain.CONFIGURATION.getBlock(name, ModPrefab.getNextID()).getInt(), Material.glass);
this.setCreativeTab(CreativeTabs.tabDecorations);
this.setHardness(.5f);
this.setResistance(.5f);

View file

@ -8,13 +8,14 @@ import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.world.World;
import dark.core.common.DarkMain;
import dark.core.prefab.BlockColored;
import dark.core.prefab.ModPrefab;
//TODO fix instant falling sand
public class BlockColorSand extends BlockColored
{
public BlockColorSand()
{
super("colorSand", DarkMain.CONFIGURATION.getBlock("colorSand", DarkMain.getNextID()).getInt(), Material.sand);
super("colorSand", DarkMain.CONFIGURATION.getBlock("colorSand", ModPrefab.getNextID()).getInt(), Material.sand);
this.setCreativeTab(CreativeTabs.tabDecorations);
this.setHardness(1f);
this.setResistance(.5f);

View file

@ -14,10 +14,10 @@ import net.minecraftforge.common.Configuration;
import net.minecraftforge.oredict.OreDictionary;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import dark.core.common.CoreRecipeLoader;
import dark.core.common.DarkMain;
import dark.core.common.items.EnumMeterials;
import dark.core.prefab.IExtraObjectInfo;
import dark.core.prefab.ModPrefab;
import dark.core.prefab.helpers.Pair;
public class BlockOre extends Block implements IExtraObjectInfo
@ -26,7 +26,7 @@ public class BlockOre extends Block implements IExtraObjectInfo
public BlockOre()
{
super(DarkMain.CONFIGURATION.getBlock("Ore", DarkMain.getNextID()).getInt(), Material.rock);
super(DarkMain.CONFIGURATION.getBlock("Ore", ModPrefab.getNextID()).getInt(), Material.rock);
this.setCreativeTab(CreativeTabs.tabBlock);
this.setUnlocalizedName(DarkMain.getInstance().PREFIX + "Ore");
}

View file

@ -1,22 +1,14 @@
package dark.core.common.machines;
import java.io.DataInputStream;
import java.util.HashSet;
import java.util.Set;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.FurnaceRecipes;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.network.INetworkManager;
import net.minecraft.network.packet.Packet;
import net.minecraft.network.packet.Packet250CustomPayload;
import net.minecraftforge.common.ForgeDirection;
import universalelectricity.core.item.IItemElectric;
import com.google.common.io.ByteArrayDataInput;
import cpw.mods.fml.common.network.PacketDispatcher;
import cpw.mods.fml.common.network.Player;
import cpw.mods.fml.common.registry.LanguageRegistry;

View file

@ -6,7 +6,6 @@ import java.util.Set;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;

View file

@ -1,18 +1,16 @@
package dark.core.prefab.machine;
import net.minecraft.block.ITileEntityProvider;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Icon;
import net.minecraft.world.World;
import net.minecraftforge.common.Configuration;
import universalelectricity.prefab.block.BlockTile;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import dark.api.parts.INetworkPart;
import dark.core.common.DarkMain;
import dark.core.prefab.ModPrefab;
import dark.core.registration.ModObjectRegistry.BlockBuildData;
/** Basic TileEntity Container class designed to be used by generic machines. It is suggested that
@ -24,16 +22,14 @@ public abstract class BlockMachine extends BlockTile implements ITileEntityProvi
{
public BlockMachine(BlockBuildData data)
{
super(data.config.getBlock(data.blockName, DarkMain.getNextID()).getInt(), data.blockMaterial);
super(data.config.getBlock(data.blockName, ModPrefab.getNextID()).getInt(), data.blockMaterial);
this.setUnlocalizedName(data.blockName);
if(data.creativeTab != null)
if (data.creativeTab != null)
{
this.setCreativeTab(data.creativeTab);
}
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IconRegister iconReg)

View file

@ -5,7 +5,6 @@ import java.util.Set;
import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
@ -19,6 +18,7 @@ import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import dark.core.common.DarkMain;
import dark.core.prefab.IExtraObjectInfo;
import dark.core.prefab.ModPrefab;
import dark.core.prefab.helpers.Pair;
public class BlockMulti extends BlockContainer implements IExtraObjectInfo
@ -28,7 +28,7 @@ public class BlockMulti extends BlockContainer implements IExtraObjectInfo
public BlockMulti()
{
super(DarkMain.CONFIGURATION.getBlock("MultiBlock", DarkMain.getNextID()).getInt(), UniversalElectricity.machine);
super(DarkMain.CONFIGURATION.getBlock("MultiBlock", ModPrefab.getNextID()).getInt(), UniversalElectricity.machine);
this.setHardness(0.8F);
this.setUnlocalizedName("multiBlock");
this.setChannel(DarkMain.CHANNEL);

View file

@ -9,6 +9,7 @@ import net.minecraftforge.fluids.Fluid;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import dark.core.common.DarkMain;
import dark.core.prefab.ModPrefab;
public class BlockFluid extends BlockFluidFinite
{
@ -19,7 +20,7 @@ public class BlockFluid extends BlockFluidFinite
public BlockFluid(String prefix, Fluid fluid, Configuration config)
{
super(config.getBlock("BlockFluid" + fluid.getName(), DarkMain.getNextID()).getInt(), fluid, Material.water);
super(config.getBlock("BlockFluid" + fluid.getName(), ModPrefab.getNextID()).getInt(), fluid, Material.water);
this.fluid = fluid;
if (prefix != null && prefix.contains(":"))
{

View file

@ -21,6 +21,7 @@ import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.registry.GameRegistry;
import dark.core.common.DarkMain;
import dark.core.prefab.IExtraObjectInfo;
import dark.core.prefab.ModPrefab;
import dark.core.prefab.helpers.Pair;
import dark.core.prefab.machine.BlockMachine;
@ -91,7 +92,7 @@ public class ModObjectRegistry
{
constructor.setAccessible(true);
Object obj = (Block) constructor.newInstance(buildData.config.getBlock(buildData.blockName, DarkMain.getNextID()), buildData.blockMaterial);
Object obj = constructor.newInstance(buildData.config.getBlock(buildData.blockName, ModPrefab.getNextID()), buildData.blockMaterial);
if (obj instanceof Block)
{
block = (Block) obj;