clean up,updates,bug fixes

nothing major
This commit is contained in:
Rseifert 2012-09-01 21:31:07 -04:00
parent 34aff9017a
commit 451feabf0d
34 changed files with 198 additions and 203 deletions

View file

@ -0,0 +1,21 @@
MCP - Minecraft Coder Pack
MCP is (c) Copyright by the MCP Team
License and terms of use.
No warranties. If MCP does not work for you, or causes any damage, it's your problem. Use it at own risk.
You are allowed to:
- Use MCP to decompile the Minecraft client and server jar files.
- Use the decompiled source code to create mods for Minecraft.
- Recompile modified versions of Minecraft.
- Reobfuscate the classes of your mod for Minecraft.
You are NOT allowed to:
- Use MCP to do anything that violated Mojangs terms of use for Minecraft.
- Release Minecraft versions or modifications that allow you to play without having bought Minecraft from Mojang.
- Release modified or unmodified versions of MCP anywhere.
- Use any of MCPs scripts, tools or data files without explicit written permission.
- Make money with anything based on MCP (excluding Minecraft mods created by using MCP).
- Use MCP to create clients that are used for griefing or exploiting server bugs.
- Release the decompiled source code of Minecraft in any way.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 770 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 658 B

View file

@ -2,7 +2,7 @@ package basicpipes;
import java.io.File;
import basicpipes.pipes.BlockPipe;
import basicpipes.pipes.BlockPump;
import basicpipes.pipes.BlockMachine;
import basicpipes.pipes.ItemGuage;
import basicpipes.pipes.ItemParts;
import basicpipes.pipes.ItemPipe;
@ -32,7 +32,7 @@ import cpw.mods.fml.common.registry.LanguageRegistry;
public class BasicPipesMain{
@Instance
public static BasicPipesMain instance;
public BasicPipesMain instance;
@SidedProxy(clientSide = "basicpipes.PipeClientProxy", serverSide = "basicpipes.PipeProxy")
public static PipeProxy proxy;
@ -41,11 +41,12 @@ public class BasicPipesMain{
private static int partID;
private static int ppipeID;
private static int machineID;
private static int toolID;
public static Block pipe = new BlockPipe(pipeID).setBlockName("pipe");
public static Block machine = new BlockPump(machineID).setBlockName("pump");
public static Block machine = new BlockMachine(machineID).setBlockName("pump");
public static Item parts = new ItemParts(partID);
public static Item itemPipes = new ItemPipe(ppipeID);
public static Item gauge = new ItemGuage(ppipeID+1);
public static Item gauge = new ItemGuage(toolID);
public static String channel = "Pipes";
public static String textureFile = "/textures";
@ -57,6 +58,7 @@ public class BasicPipesMain{
machineID = Integer.parseInt(config.getOrCreateIntProperty("machineBlock", Configuration.CATEGORY_BLOCK, 156).value);
partID = Integer.parseInt(config.getOrCreateIntProperty("parts", Configuration.CATEGORY_ITEM, 23022).value);
ppipeID = Integer.parseInt(config.getOrCreateIntProperty("pipes", Configuration.CATEGORY_ITEM, 23023).value);
toolID = Integer.parseInt(config.getOrCreateIntProperty("ToolID", Configuration.CATEGORY_ITEM, 23024).value);
config.save();
return pipeID;
}
@ -65,7 +67,7 @@ public class BasicPipesMain{
{
proxy.preInit();
GameRegistry.registerBlock(pipe);
GameRegistry.registerBlock(machine);
GameRegistry.registerBlock(machine,basicpipes.pipes.ItemMachine.class);
}
@Init
public void load(FMLInitializationEvent evt)
@ -74,7 +76,7 @@ public class BasicPipesMain{
proxy.init();
GameRegistry.registerTileEntity(TileEntityPump.class, "pump");
//Names
LanguageRegistry.addName((new ItemStack(gauge, 1, 0)), "guage");
LanguageRegistry.addName((new ItemStack(gauge, 1, 0)), "PipeGuage");
LanguageRegistry.addName((new ItemStack(itemPipes, 1, 0)), "SteamPipe");
LanguageRegistry.addName((new ItemStack(itemPipes, 1, 1)), "WaterPipe");
LanguageRegistry.addName((new ItemStack(itemPipes, 1, 2)), "LavaPipe");

View file

@ -0,0 +1,83 @@
package basicpipes.pipes;
import java.util.ArrayList;
import net.minecraft.src.*;
import java.util.Random;
public class BlockMachine extends BlockContainer
{
public BlockMachine(int id)
{
super(id, Material.iron);
this.setBlockName("Machine");
this.setCreativeTab(CreativeTabs.tabBlock);
this.setRequiresSelfNotify();
this.blockIndexInTexture = 19;
}
public boolean isOpaqueCube()
{
return false;
}
public boolean renderAsNormalBlock()
{
//TODO change later when custom models are added
return true;
}
/**
* The type of render function that is called for this block
*/
public int getRenderType()
{
return 0;
}
/**
* Returns the ID of the items to drop on destruction.
*/
public int idDropped(int par1, Random par2Random, int par3)
{
return 0;
}
//Per tick
public int conductorCapacity()
{
return 10;
}
public void addCreativeItems(ArrayList itemList)
{
itemList.add(new ItemStack(this, 1,0));
}
@Override
public TileEntity createNewTileEntity(World var1,int meta) {
// TODO Auto-generated method stub
if(meta < 4)
{
return new TileEntityPump();
}
if(meta > 3 && meta < 8)
{
return new TileEntityCondenser();
}
return null;
}
@Override
public TileEntity createNewTileEntity(World var1) {
// TODO Auto-generated method stub
return null;
}
@Override
public String getTextureFile()
{
return basicpipes.BasicPipesMain.textureFile + "/items.png";
}
}

View file

@ -1,155 +0,0 @@
package basicpipes.pipes;
import java.util.ArrayList;
import net.minecraft.src.*;
import java.util.Random;
public class BlockPump extends BlockContainer
{
public BlockPump(int id)
{
super(id, Material.iron);
this.setBlockName("Pump");
}
/**
* Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two
* adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
*/
public boolean isOpaqueCube()
{
return false;
}
@Override
public int getBlockTexture(IBlockAccess par1iBlockAccess, int x, int y, int z, int side)
{
int metadata = par1iBlockAccess.getBlockMetadata(x, y, z);
if (side == 1)
{
switch(metadata)
{
case 0: return 1;
case 1: return 3;
case 2: return 18;
case 3: return 5;
}
}
switch(metadata)
{
case 1: return 4;
case 2: return 16;
case 3: return 2;
}
return 0;
}
@Override
public int getBlockTextureFromSideAndMetadata(int side, int metadata)
{
if (side == 1)
{
switch(metadata)
{
case 0: return 1;
case 1: return 3;
case 2: return 18;
case 3: return 5;
}
}
else
{
//If it is the front side
if(side == 3)
{
switch(metadata)
{
case 0: return 19;
case 1: return 6;
case 2: return 17;
case 3: return 3;
}
}
//If it is the back side
else if(side == 2)
{
switch(metadata)
{
case 0: return this.blockIndexInTexture + 2;
case 1: return this.blockIndexInTexture + 3;
case 2: return this.blockIndexInTexture + 2;
}
}
switch(metadata)
{
case 1: return 4;
case 2: return 16;
case 3: return 2;
}
}
return 0;
}
/**
* If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)
*/
public boolean renderAsNormalBlock()
{
return false;
}
/**
* The type of render function that is called for this block
*/
public int getRenderType()
{
return 0;
}
/**
* Returns the ID of the items to drop on destruction.
*/
public int idDropped(int par1, Random par2Random, int par3)
{
return 0;
}
@Override
public String getTextureFile() {
// TODO Auto-generated method stub
return "/eui/blocks.png";
}
//Per tick
public int conductorCapacity()
{
return 10;
}
public void addCreativeItems(ArrayList itemList)
{
itemList.add(new ItemStack(this, 1,0));
}
@Override
public TileEntity createNewTileEntity(World var1,int meta) {
// TODO Auto-generated method stub
switch(meta)
{
case 0: return new TileEntityPump();
}
return null;
}
@Override
public TileEntity createNewTileEntity(World var1) {
// TODO Auto-generated method stub
return null;
}
}

View file

@ -1,6 +1,10 @@
package basicpipes.pipes;
import java.util.ArrayList;
import java.util.List;
import basicpipes.BasicPipesMain;
import net.minecraft.src.*;
public class ItemGuage extends Item
@ -14,35 +18,54 @@ public class ItemGuage extends Item
this.setHasSubtypes(true);
this.setIconIndex(10);
this.setItemName("guage");
this.setTabToDisplayOn(CreativeTabs.tabTools);
}
@Override
public void getSubItems(int par1, CreativeTabs par2CreativeTabs, List par3List)
{
par3List.add(new ItemStack(this, 1, 0));
}
@Override
public int getIconFromDamage(int par1)
{
switch(par1)
{
case 0: return 11;
case 0: return 24;
}
return this.iconIndex;
}
public String getTextureFile() {
return BasicPipesMain.textureFile+"/Items.png";
}
@Override
public String getItemName()
{
return "guage";
}
public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7)
public boolean tryPlaceIntoWorld(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10)
{
if(par1ItemStack.getItemDamage() == 0)
{
TileEntity blockEntity = par3World.getBlockTileEntity(par4, par5, par6);
if(blockEntity instanceof TileEntityPipe)
{
TileEntityPipe pipeEntity = (TileEntityPipe) blockEntity;
int steam = pipeEntity.getStoredLiquid(0);
TileEntityPipe pipeEntity = (TileEntityPipe) blockEntity;
int type = pipeEntity.getType();
int steam = pipeEntity.getStoredLiquid(type);
String typeName = getType(type);
par2EntityPlayer.addChatMessage(typeName +" " + steam);
String print = "Error";
if(steam < 0)
{
print = "No pressure or Volume";
}
else
{
print = typeName +" " + steam + 1*Math.random() +" @ 16PSI";
}
par2EntityPlayer.addChatMessage(print);
return true;
}
}
@ -58,7 +81,7 @@ public class ItemGuage extends Item
case 3: return "Oil";
case 4: return "Fuel";
case 5: return "Air";
default: return "unknow";
default: return "???";
}
}
public String getItemNameIS(ItemStack par1ItemStack)
@ -66,13 +89,8 @@ public class ItemGuage extends Item
int var3 = par1ItemStack.getItemDamage();
switch(var3)
{
case 1: return "PipeGuage";
case 0: return "PipeGuage";
}
return this.getItemName();
}
@Override
public String getTextureFile() {
return "/eui/Items.png";
}
}

View file

@ -0,0 +1,12 @@
package basicpipes.pipes;
import net.minecraft.src.ItemBlock;
public class ItemMachine extends ItemBlock {
public ItemMachine(int par1) {
super(par1);
// TODO Auto-generated constructor stub
}
}

View file

@ -6,8 +6,10 @@ import java.util.List;
import basicpipes.BasicPipesMain;
import net.minecraft.src.CreativeTabs;
import net.minecraft.src.EntityPlayer;
import net.minecraft.src.Item;
import net.minecraft.src.ItemStack;
import net.minecraft.src.World;
public class ItemParts extends Item{
String[] names = new String[]{"BronzeTube","IronTube","ObbyTube","NetherTube","Seal","StickSeal","BronzeTank","Valve",};
@ -43,6 +45,11 @@ public class ItemParts extends Item{
par3List.add(new ItemStack(this, 1, i));
}
}
public boolean tryPlaceIntoWorld(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10)
{
//TODO add block place event for some items like valves,tanks
return false;
}
public String getTextureFile() {
return BasicPipesMain.textureFile+"/Items.png";
}

View file

@ -8,6 +8,7 @@ import net.minecraft.src.Block;
import net.minecraft.src.CreativeTabs;
import net.minecraft.src.EntityPlayer;
import net.minecraft.src.Item;
import net.minecraft.src.ItemBlock;
import net.minecraft.src.ItemStack;
import net.minecraft.src.TileEntity;
import net.minecraft.src.World;

View file

@ -1,7 +1,11 @@
package basicpipes.pipes.api;
import net.minecraftforge.common.ForgeDirection;
/**
* Based off of Calclavia's old wire API
* @author DarkGuardsman
*
*/
public interface ILiquidConsumer
{
@ -16,9 +20,9 @@ public interface ILiquidConsumer
/**
* You can use this to check if a pipe can connect to this liquid consumer to properly render the graphics
* @param forgeDirection - The side in which the electricity is coming from.
* @param forgeDirection - The side in which the volume is coming from.
* @parm type - The type of liquid
* @return Returns true or false if this consumer can receive electricity at this given tick or moment.
* @return Returns true or false if this consumer can receive a volume at this given tick or moment.
*/
public boolean canRecieveLiquid(int type, ForgeDirection forgeDirection);

View file

@ -3,8 +3,8 @@ package basicpipes.pipes.api;
import net.minecraftforge.common.ForgeDirection;
/**
* The UEIProducer interface is an interface that must be applied to all tile entities that can produce electricity.
* @author Calclavia
* Based off of Calclavia's old wire API
* @author DarkGuardsman
*
*/
public interface ILiquidProducer

View file

@ -1,21 +1,21 @@
[
{
"modid": "SteamPower",
"name": "Steam Power",
"description": "Basic coal fired power plant generator pack for UE",
"version": "r4",
"modid": "UniversalElectricity",
"name": "Universal Electricity",
"description": "Universal Electricity is a modular electricity API for modders to create to add electricity to Minecraft. The mod alone does not add many things to the game. It requires add-ons in order to work. Universal Electricity is basically a structure that integrates a universal electric system for modders to easily implement into their mods.",
"version": "0.7.0",
"mcversion": "1.3.2",
"url": "",
"updateUrl": "",
"url": "http://calclavia.com/universalelectricity",
"updateUrl": "http://calclavia.com/universalelectricity",
"authors": [
"DarkGuardsman"
"Calclavia"
],
"credits": "Created by Darkguardsman; Vector/network code from Calclavia; Some Models thanks to Azkhare;",
"credits": "Authored by Calclavia",
"logoFile": "",
"screenshots": [
],
"parent":"",
"dependencies": ["UE","BasicPipes"
"dependencies": [
]
}
]

View file

@ -24,7 +24,7 @@ public class ItemMachine extends ItemBlock {
@Override
public String getTextureFile() {
// TODO Auto-generated method stub
return SteamPowerMain.textureFile+"/Items.png";
return SteamPowerMain.textureFile+"Items.png";
}
@Override
public int getIconFromDamage(int par1)

View file

@ -26,7 +26,7 @@ import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
@Mod(modid = "SteamPower", name = "Steam Power", version = "V9")
@Mod(modid = "SteamPower", name = "Steam Power", version = "0.0.10")
@NetworkMod(channels = { "SPpack" }, clientSideRequired = true, serverSideRequired = false, packetHandler = PacketManager.class)
public class SteamPowerMain{
@ -105,14 +105,14 @@ public class SteamPowerMain{
case 15: return new TileEntityNuller();<-Just for testing Not craftable
*/
GameRegistry.addRecipe(new ItemStack(machine, 1, 1), new Object [] {"@T@", "OVO", "@T@",
'T',new ItemStack(BasicPipesMain.parts, 1,5),
'T',new ItemStack(BasicPipesMain.parts, 1,6),
'@',new ItemStack(BasicComponents.itemSteelPlate),
'O',new ItemStack(BasicPipesMain.parts, 1,1),
'V',new ItemStack(BasicPipesMain.parts, 1,6)});
'O',new ItemStack(BasicPipesMain.parts, 1,0),
'V',new ItemStack(BasicPipesMain.parts, 1,7)});
GameRegistry.addRecipe(new ItemStack(machine, 1, 2), new Object [] { "@", "F",
'F',Block.stoneOvenIdle,
'@',new ItemStack(BasicComponents.itemSteelPlate)});
GameRegistry.addRecipe(new ItemStack(itemEngine, 1, 0), new Object [] {"@T@", "PMP", "@T@",
GameRegistry.addRecipe(new ItemStack(itemEngine, 1,0), new Object [] {"@T@", "PMP", "@T@",
'T',new ItemStack(BasicPipesMain.parts, 1,0),
'@',new ItemStack(BasicComponents.itemSteelPlate),
'P',Block.pistonBase,

View file

@ -27,7 +27,7 @@ public class ItemEngine extends Item
@Override
public String getTextureFile() {
// TODO Auto-generated method stub
return SteamPowerMain.textureFile+"/Items.png";
return SteamPowerMain.textureFile+"Items.png";
}
@Override
public boolean tryPlaceIntoWorld(ItemStack par1ItemStack, EntityPlayer ePlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10)

View file

@ -113,7 +113,7 @@ public class TileEntitySteamPiston extends TileEntityMachine implements IPacketR
ForgeDirection.getOrientation(i));
if (tileEntity instanceof TileEntityConductor)
{
if (ElectricityManager.electricityRequired(((TileEntityConductor)tileEntity).connectionID) > 0)
if (ElectricityManager.instance.electricityRequired(((TileEntityConductor)tileEntity).connectionID) > 0)
{
this.connectedElectricUnit = (TileEntityConductor)tileEntity;
}
@ -173,7 +173,7 @@ public class TileEntitySteamPiston extends TileEntityMachine implements IPacketR
if(this.generateRate > 1)
{
ElectricityManager.produceElectricity(this.connectedElectricUnit, this.generateRate*this.getTickInterval(), this.getVoltage());
ElectricityManager.instance.produceElectricity(this.connectedElectricUnit, this.generateRate*this.getTickInterval(), this.getVoltage());
}
}
}

View file

@ -1,5 +1,6 @@
package basicpipes;
import steampower.SteamPowerMain;
import basicpipes.PipeProxy;
import basicpipes.pipes.TileEntityPipe;
import net.minecraftforge.client.MinecraftForgeClient;
@ -11,8 +12,8 @@ public class PipeClientProxy extends PipeProxy
public void preInit()
{
//Preload textures
MinecraftForgeClient.preloadTexture("/EUIClient/Textures/Items.png");
MinecraftForgeClient.preloadTexture("/EUIClient/Textures/blocks.png");
MinecraftForgeClient.preloadTexture(BasicPipesMain.textureFile+"/Items.png");
MinecraftForgeClient.preloadTexture(BasicPipesMain.textureFile+"/blocks.png");
}
@Override

View file

@ -8,6 +8,7 @@ import org.lwjgl.opengl.GL11;
import steampower.turbine.ContainerGenerator;
import steampower.turbine.TileEntitySteamPiston;
import universalelectricity.electricity.ElectricUnit;
public class GUIGenerator extends GuiContainer
{
@ -55,7 +56,7 @@ import steampower.turbine.TileEntitySteamPiston;
}
else
{
displayText = universalelectricity.UniversalElectricity.getWattDisplay((int)(tileEntity.generateRate*20));
displayText = ElectricUnit.getWattDisplay((int)(tileEntity.generateRate*20));
}
displayText2 = "water" + "-" + tileEntity.waterStored;
displayText3 = "steam" + "-" + tileEntity.steamStored;

View file

@ -12,8 +12,8 @@ public class SteamClientProxy extends SteamProxy{
public void preInit()
{
MinecraftForgeClient.preloadTexture("/EUIClient/textures/blocks.png");
MinecraftForgeClient.preloadTexture("/EUIClient/textures/Items.png");
MinecraftForgeClient.preloadTexture(SteamPowerMain.textureFile+"blocks.png");
MinecraftForgeClient.preloadTexture(SteamPowerMain.textureFile+"Items.png");
}
@Override
public void init()

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB