Wild carrot blocks now give their respective item when using pick block
This commit is contained in:
parent
024d5025a6
commit
a04827be39
|
@ -39,7 +39,7 @@ public class Items
|
|||
|
||||
public static Optional<? extends Item> ancientStaff = Optional.absent();
|
||||
public static Optional<? extends Item> enderporter = Optional.absent();
|
||||
public static Optional<? extends Item> berries = Optional.absent();
|
||||
public static Optional<? extends Item> food = Optional.absent();
|
||||
public static Optional<? extends Item> miscItems = Optional.absent();
|
||||
public static Optional<? extends Item> mudball = Optional.absent();
|
||||
public static Optional<? extends Item> poison = Optional.absent();
|
||||
|
|
|
@ -115,7 +115,7 @@ public class BlockBOPFoliage extends BlockFlower implements IShearable
|
|||
break;
|
||||
|
||||
case 8:
|
||||
ret.add(new ItemStack(Items.berries.get(), 1, 0));
|
||||
ret.add(new ItemStack(Items.food.get(), 1, 0));
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -316,7 +316,7 @@ public class BlockBOPFoliage extends BlockFlower implements IShearable
|
|||
if (meta == 8)
|
||||
{
|
||||
world.setBlock(x, y, z, blockID, 4, 3);
|
||||
EntityItem entityitem = new EntityItem(world, x, y, z, new ItemStack(Items.berries.get(), 1, 0));
|
||||
EntityItem entityitem = new EntityItem(world, x, y, z, new ItemStack(Items.food.get(), 1, 0));
|
||||
if (!world.isRemote) {
|
||||
world.spawnEntityInWorld(entityitem);
|
||||
if (!(player instanceof FakePlayer))
|
||||
|
|
|
@ -214,14 +214,34 @@ public class BlockBOPPlant extends BlockFlower implements IShearable
|
|||
entity.attackEntityFrom(DamageSource.cactus, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int idPicked(World world, int x, int y, int z)
|
||||
{
|
||||
int blockID = world.getBlockId(x, y, z);
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
|
||||
if (meta == 11)
|
||||
{
|
||||
return Items.food.get().itemID;
|
||||
}
|
||||
|
||||
return this.blockID;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getDamageValue(World world, int x, int y, int z)
|
||||
{
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
if (meta == CATTAILTOP || meta == CATTAILBOTTOM) {
|
||||
if (meta == CATTAILTOP || meta == CATTAILBOTTOM)
|
||||
{
|
||||
meta = 7;
|
||||
}
|
||||
else if (meta == 11)
|
||||
{
|
||||
meta = 2;
|
||||
}
|
||||
|
||||
return meta;
|
||||
}
|
||||
|
||||
|
@ -234,7 +254,7 @@ public class BlockBOPPlant extends BlockFlower implements IShearable
|
|||
}
|
||||
else if (par1 == 11)
|
||||
{
|
||||
return Items.berries.get().itemID;
|
||||
return Items.food.get().itemID;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -211,7 +211,7 @@ public class BOPConfiguration {
|
|||
public static int graveID;
|
||||
|
||||
//Item IDs
|
||||
public static int berriesID;
|
||||
public static int foodID;
|
||||
|
||||
public static int ancientStaffID;
|
||||
public static int enderporterID;
|
||||
|
@ -783,7 +783,7 @@ public class BOPConfiguration {
|
|||
graveID = config.getBlock("Grave ID", 1981, null).getInt();
|
||||
|
||||
// Get Item ID's
|
||||
berriesID = config.getItem("Food ID", 21003, null).getInt();
|
||||
foodID = config.getItem("Food ID", 21003, null).getInt();
|
||||
|
||||
ancientStaffID = config.getItem("Ancient Staff ID", 21006).getInt();
|
||||
enderporterID = config.getItem("Enderporter ID", 21007).getInt();
|
||||
|
|
|
@ -40,7 +40,7 @@ public class BOPCrafting
|
|||
GameRegistry.addShapelessRecipe(new ItemStack(Items.miscItems.get(), 2, 7), new Object[] {new ItemStack(Blocks.moss.get(),1,0)});
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(Items.miscItems.get(), 2, 8), new Object[] {new ItemStack(Blocks.flowers.get(),1,9)});
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(Items.miscItems.get(), 2, 9), new Object[] {new ItemStack(Blocks.flowers.get(),1,2)});
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(Items.berries.get(), 4, 3), new Object[] {new ItemStack(Blocks.flowers.get(),1,13)});
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(Items.food.get(), 4, 3), new Object[] {new ItemStack(Blocks.flowers.get(),1,13)});
|
||||
|
||||
//Brick stairs and slabs
|
||||
GameRegistry.addRecipe(new ItemStack(Blocks.stoneSingleSlab.get(), 6, 0), new Object[] {"RRR", 'R', new ItemStack(Blocks.redRock.get(),1,1)});
|
||||
|
@ -248,11 +248,11 @@ public class BOPCrafting
|
|||
GameRegistry.addShapelessRecipe(new ItemStack(Item.dyePowder, 12, 15), new Object[] {new ItemStack(Blocks.bones.get(), 1, 2)});
|
||||
|
||||
//Plants
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(Items.berries.get(), 2, 1), new Object[] {new ItemStack(Blocks.mushrooms.get(),1,0)});
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(Items.food.get(), 2, 1), new Object[] {new ItemStack(Blocks.mushrooms.get(),1,0)});
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(Items.miscItems.get(), 1, 3), new Object[] {new ItemStack(Blocks.foliage.get(),1,7)});
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(Items.berries.get(), 1, 4), new Object[] {Item.bowlEmpty, new ItemStack(Items.berries.get(), 1, 0), Item.appleRed, Item.melon});
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(Items.berries.get(), 1, 5), new Object[] {Item.bowlEmpty, new ItemStack(Items.berries.get(), 1, 2), Item.carrot, Item.potato});
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(Items.berries.get(), 1, 6), new Object[] {Item.bowlEmpty, new ItemStack(Blocks.mushrooms.get(), 1, 0), new ItemStack(Blocks.mushrooms.get(), 1, 1), new ItemStack(Blocks.mushrooms.get(), 1, 2)});
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(Items.food.get(), 1, 4), new Object[] {Item.bowlEmpty, new ItemStack(Items.food.get(), 1, 0), Item.appleRed, Item.melon});
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(Items.food.get(), 1, 5), new Object[] {Item.bowlEmpty, new ItemStack(Items.food.get(), 1, 2), Item.carrot, Item.potato});
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(Items.food.get(), 1, 6), new Object[] {Item.bowlEmpty, new ItemStack(Blocks.mushrooms.get(), 1, 0), new ItemStack(Blocks.mushrooms.get(), 1, 1), new ItemStack(Blocks.mushrooms.get(), 1, 2)});
|
||||
|
||||
//Glass
|
||||
GameRegistry.addRecipe(new ItemStack(Blocks.glass.get(), 1, 0), new Object [] {"GGG", "GGG", "GGG", Character.valueOf('G'), Block.glass});
|
||||
|
|
|
@ -98,7 +98,7 @@ public class BOPItems {
|
|||
private static void initializeItems()
|
||||
{
|
||||
// Item declaration
|
||||
Items.berries = Optional.of(new ItemBOPFood(BOPConfiguration.berriesID).setUnlocalizedName("bop.food"));
|
||||
Items.food = Optional.of(new ItemBOPFood(BOPConfiguration.foodID).setUnlocalizedName("bop.food"));
|
||||
Items.miscItems = Optional.of(new ItemBOP(BOPConfiguration.miscItemsID).setUnlocalizedName("bop.miscItems"));
|
||||
Items.mudball = Optional.of(new ItemBOPMudball(BOPConfiguration.mudballID).setUnlocalizedName("bop.mudball"));
|
||||
Items.dartBlower = Optional.of(new ItemDartBlower(BOPConfiguration.dartBlowerID).setUnlocalizedName("bop.dartblower"));
|
||||
|
|
|
@ -161,7 +161,7 @@ public class ThaumcraftIntegration {
|
|||
/*Poison Dart*/ThaumcraftApi.registerObjectTag(Items.dart.get().itemID, 1, (new ObjectTags()).add(EnumTag.PLANT, 2).add(EnumTag.WEAPON, 2));
|
||||
/*Spring Water Bucket*/ThaumcraftApi.registerObjectTag(Fluids.bopBucket.get().itemID, 0, (new ObjectTags()).add(EnumTag.METAL, 13).add(EnumTag.VOID, 1).add(EnumTag.WATER, 4).add(EnumTag.LIFE, 2).add(EnumTag.HEAL, 4));
|
||||
/*Liquid Poison Bucket*/ThaumcraftApi.registerObjectTag(Fluids.bopBucket.get().itemID, 1, (new ObjectTags()).add(EnumTag.METAL, 13).add(EnumTag.VOID, 1).add(EnumTag.WATER, 2).add(EnumTag.WEAPON, 4).add(EnumTag.POISON, 4));
|
||||
ThaumcraftApi.registerObjectTag(Items.berries.get().itemID, 0, (new ObjectTags()).add(EnumTag.PLANT, 1).add(EnumTag.LIFE, 1));
|
||||
ThaumcraftApi.registerObjectTag(Items.food.get().itemID, 0, (new ObjectTags()).add(EnumTag.PLANT, 1).add(EnumTag.LIFE, 1));
|
||||
//ThaumcraftApi.registerObjectTag(Items.sunflowerSeeds.get().itemID, 0, (new ObjectTags()).add(EnumTag.PLANT, 1).add(EnumTag.EXCHANGE, 1));
|
||||
ThaumcraftApi.registerObjectTag(Items.mudball.get().itemID, 0, (new ObjectTags()).add(EnumTag.WATER, 1).add(EnumTag.EARTH, 2));
|
||||
//ThaumcraftApi.registerObjectTag(Items.shroomPowder.get().itemID, -1, (new ObjectTags()).add(EnumTag.FUNGUS, 2).add(EnumTag.DESTRUCTION, 1));
|
||||
|
|
Loading…
Reference in New Issue