Maybe make things work awesome?

This commit is contained in:
oitsjustjose 2015-10-27 15:37:56 -04:00
commit 06c71e95a5
6 changed files with 71 additions and 31 deletions

View file

@ -23,7 +23,9 @@ import net.minecraft.world.World;
public class ItemEverfulBucket extends Item
{
String[] types = new String[]
{ "everfulBucket", "voidBucket" };
{
"everfulBucket", "voidBucket"
};
@SideOnly(Side.CLIENT)
IIcon[] icons = new IIcon[types.length];
@ -33,6 +35,7 @@ public class ItemEverfulBucket extends Item
this.maxStackSize = 1;
this.setCreativeTab(CrissCross.CCTab);
GameRegistry.registerItem(this, "magicBucket");
this.setContainerItem(this);
}
@SideOnly(Side.CLIENT)
@ -77,35 +80,36 @@ public class ItemEverfulBucket extends Item
Material material = world.getBlock(x, y, z).getMaterial();
int meta = world.getBlockMetadata(x, y, z);
if(material == Material.water && meta == 0)
if(material == Material.water && meta == 0)
world.setBlockToAir(x, y, z);
if(material == Material.lava && meta == 0)
world.setBlockToAir(x, y, z);
}
else
{
if(world.getBlock(x, y, z).getMaterial() == Material.lava || world.getBlock(x, y, z).getMaterial() == Material.water)
if(world.getBlock(x, y, z).getMaterial() == Material.lava
|| world.getBlock(x, y, z).getMaterial() == Material.water)
return itemstack;
if(movingobjectposition.sideHit == 0)
--y;
if(movingobjectposition.sideHit == 1)
++y;
if(movingobjectposition.sideHit == 2)
--z;
if(movingobjectposition.sideHit == 3)
++z;
if(movingobjectposition.sideHit == 4)
--x;
if(movingobjectposition.sideHit == 5)
++x;
if(!player.canPlayerEdit(x, y, z, movingobjectposition.sideHit, itemstack))
return itemstack;

View file

@ -43,7 +43,10 @@ public class CCCraftingRecipes
}
GameRegistry.addRecipe(new ItemStack(CCBlocks.woodchipper), new Object[]
{ "I#I", "SCS", "I#I", '#', Items.diamond_axe, 'I', Blocks.iron_bars, 'S', Items.golden_axe, 'C', centerItem });
{
"I#I", "SCS", "I#I", '#', Items.diamond_axe, 'I', Blocks.iron_bars, 'S', Items.golden_axe, 'C',
centerItem
});
}
static void electroextractorRecipe()
@ -68,7 +71,10 @@ public class CCCraftingRecipes
}
GameRegistry.addRecipe(new ItemStack(CCBlocks.electroextractor), new Object[]
{ "I#I", "SCS", "I#I", '#', Blocks.piston, 'I', Blocks.iron_bars, 'S', Items.golden_pickaxe, 'C', centerItem });
{
"I#I", "SCS", "I#I", '#', Blocks.piston, 'I', Blocks.iron_bars, 'S', Items.golden_pickaxe, 'C',
centerItem
});
}
static void cropomatorRecipe()
@ -92,6 +98,9 @@ public class CCCraftingRecipes
}
GameRegistry.addRecipe(new ItemStack(CCBlocks.cropomator), new Object[]
{ "I#I", "SCS", "I#I", '#', Blocks.hay_block, 'I', Items.iron_ingot, 'S', Items.golden_hoe, 'C', centerItem });
{
"I#I", "SCS", "I#I", '#', Blocks.hay_block, 'I', Items.iron_ingot, 'S', Items.golden_hoe, 'C',
centerItem
});
}
}

View file

@ -21,11 +21,17 @@ public class TileEntityCropomator extends TileEntity implements ISidedInventory
private static int proTicks = ConfigHandler.cropomatorProcessTime;
private static int qty = ConfigHandler.cropomatorOutput;
private static final int[] slotsTop = new int[]
{ 0 };
{
0
};
private static final int[] slotsBottom = new int[]
{ 2, 1 };
{
2, 1
};
private static final int[] slotsSides = new int[]
{ 1 };
{
1
};
private static ArrayList<ItemStack> fuelItems = new ArrayList<ItemStack>();
private ItemStack[] ItemStacks = new ItemStack[3];

View file

@ -23,11 +23,17 @@ public class TileEntityElectroextractor extends TileEntity implements ISidedInve
private static int proTicks = ConfigHandler.electroextractorProcessTime;
private static int qty = ConfigHandler.electroextractorOutput;
private static final int[] slotsTop = new int[]
{ 0 };
{
0
};
private static final int[] slotsBottom = new int[]
{ 2, 1 };
{
2, 1
};
private static final int[] slotsSides = new int[]
{ 1 };
{
1
};
private static ArrayList<ItemStack> fuelItems = new ArrayList<ItemStack>();
private ItemStack[] ItemStacks = new ItemStack[3];

View file

@ -20,11 +20,17 @@ public class TileEntityWoodchipper extends TileEntity implements ISidedInventory
private static int proTicks = ConfigHandler.woodchipperProcessTime;
private static int qty = ConfigHandler.woodchipperOutput;
private static final int[] slotsTop = new int[]
{ 0 };
{
0
};
private static final int[] slotsBottom = new int[]
{ 2, 1 };
{
2, 1
};
private static final int[] slotsSides = new int[]
{ 1 };
{
1
};
private static ArrayList<ItemStack> fuelItems = new ArrayList<ItemStack>();
private ItemStack[] ItemStacks = new ItemStack[3];

View file

@ -16,13 +16,17 @@ public class ConfigHandler
public static String[] cropomatorInputs;
public static String[] cropomatorCatalysts;
public static String[] defaultCropomatorInputs = new String[]
{ "minecraft:apple", "minecraft:reeds", "minecraft:nether_wart", "minecraft:carrot", "minecraft:cactus",
{
"minecraft:apple", "minecraft:reeds", "minecraft:nether_wart", "minecraft:carrot", "minecraft:cactus",
"minecraft:potato", "minecraft:sapling:0", "minecraft:sapling:1", "minecraft:sapling:2",
"minecraft:sapling:3", "minecraft:sapling:4", "minecraft:sapling:5", "minecraft:melon",
"minecraft:brown_mushroom", "minecraft:red_mushroom", "minecraft:cocoa", "minecraft:pumpkin",
"minecraft:wheat", "minecraft:wheat_seeds" };
"minecraft:wheat", "minecraft:wheat_seeds"
};
public static String[] defaultCropomatorCatalystItems = new String[]
{ "minecraft:dye:15" };
{
"minecraft:dye:15"
};
public static int electroextractorProcessTime;
public static int electroextractorOutput;
@ -30,18 +34,23 @@ public class ConfigHandler
public static String[] electroextractorEnergySources;
public static String[] electroextractorOreDictInputs;
public static String[] defaultElectroextractorOreDictInputs = new String[]
{ "Iron:12428902", "Gold:15400704", "Aluminum:15987699", "Cobalt:17663", "Ardite:13938485", "Copper:16751872",
"Tin:15132390", "Silver:13297640", "Lead:5722979", "Platinum:11067903", "Mithril:4433113",
"Nickel:16580553" };
{
"Iron:12428902", "Gold:15400704", "Aluminum:15987699", "Cobalt:17663", "Ardite:13938485", "Copper:16751872",
"Tin:15132390", "Silver:13297640", "Lead:5722979", "Platinum:11067903", "Mithril:4433113", "Nickel:16580553"
};
public static String[] defaultElectroextractorEnergySources = new String[]
{ "minecraft:redstone_block" };
{
"minecraft:redstone_block"
};
public static int woodchipperProcessTime;
public static int woodchipperOutput;
public static String woodchipperRecipeItem;
public static String[] woodchipperFuels;
public static String[] defaultWoodchipperFuels = new String[]
{ "minecraft:water_bucket", "minecraft:potion:0" };
{
"minecraft:water_bucket", "minecraft:potion:0", "CrissCross:magicBucket:0"
};
public static void init(File configFile)
{