From 1543214dcdbb4b38a10055f837fe4b31a3ee5230 Mon Sep 17 00:00:00 2001 From: Matt Caughey Date: Thu, 26 Mar 2015 21:25:54 -0400 Subject: [PATCH] Added peaches --- .../common/blocks/BlockBOPFruit.java | 24 ++++++++++++------ .../common/itemblocks/ItemBlockFruit.java | 2 +- .../common/items/ItemBOPFood.java | 4 +-- .../assets/biomesoplenty/lang/en_US.lang | 2 +- .../textures/blocks/apple_block.png | Bin 325 -> 329 bytes .../textures/blocks/peach_block.png | Bin 0 -> 333 bytes .../textures/blocks/persimmon_block.png | Bin 0 -> 312 bytes .../biomesoplenty/textures/items/peach.png | Bin 0 -> 370 bytes .../textures/items/persimmon.png | Bin 353 -> 351 bytes 9 files changed, 20 insertions(+), 12 deletions(-) create mode 100644 src/main/resources/assets/biomesoplenty/textures/blocks/peach_block.png create mode 100644 src/main/resources/assets/biomesoplenty/textures/blocks/persimmon_block.png create mode 100644 src/main/resources/assets/biomesoplenty/textures/items/peach.png diff --git a/src/main/java/biomesoplenty/common/blocks/BlockBOPFruit.java b/src/main/java/biomesoplenty/common/blocks/BlockBOPFruit.java index 2f3c1c34d..3c83eef93 100644 --- a/src/main/java/biomesoplenty/common/blocks/BlockBOPFruit.java +++ b/src/main/java/biomesoplenty/common/blocks/BlockBOPFruit.java @@ -35,7 +35,7 @@ import cpw.mods.fml.relauncher.SideOnly; public class BlockBOPFruit extends BOPBlockWorldDecor { - private static final String[] fruit = new String[] {"apple_block", "persimmon_block"}; + private static final String[] fruit = new String[] {"apple_block", "persimmon_block", "peach_block"}; private IIcon[] textures; public BlockBOPFruit() @@ -83,7 +83,10 @@ public class BlockBOPFruit extends BOPBlockWorldDecor //TODO: getSubBlocks() public void getSubBlocks(Item block, CreativeTabs creativeTabs, List list) { - + for (int i = 0; i < fruit.length; ++i) + { + list.add(new ItemStack(block, 1, i)); + } } @Override @@ -93,12 +96,6 @@ public class BlockBOPFruit extends BOPBlockWorldDecor switch (metadata) { - case 0: // Apple - return block == BOPCBlocks.appleLeaves; - - case 1: // Dune Grass - return block == BOPCBlocks.persimmonLeaves; - default: return block == Blocks.leaves || block == Blocks.leaves2 || block == BOPCBlocks.leaves1 || block == BOPCBlocks.leaves2 || block == BOPCBlocks.leaves3 || block == BOPCBlocks.leaves4; } @@ -124,6 +121,9 @@ public class BlockBOPFruit extends BOPBlockWorldDecor case 1: return new ItemStack(BOPCItems.food, 1, 8); + + case 2: + return new ItemStack(BOPCItems.food, 1, 3); } return new ItemStack(this, 1, meta); @@ -148,6 +148,10 @@ public class BlockBOPFruit extends BOPBlockWorldDecor { return BOPCItems.food; } + else if (metadata == 2) + { + return BOPCItems.food; + } else { return null; @@ -161,6 +165,10 @@ public class BlockBOPFruit extends BOPBlockWorldDecor { return 8; } + else if (meta == 2) + { + return 3; + } else { return 0; diff --git a/src/main/java/biomesoplenty/common/itemblocks/ItemBlockFruit.java b/src/main/java/biomesoplenty/common/itemblocks/ItemBlockFruit.java index c4976608e..f293249db 100644 --- a/src/main/java/biomesoplenty/common/itemblocks/ItemBlockFruit.java +++ b/src/main/java/biomesoplenty/common/itemblocks/ItemBlockFruit.java @@ -15,7 +15,7 @@ import cpw.mods.fml.relauncher.SideOnly; public class ItemBlockFruit extends ItemBlock { - private static final String[] plants = new String[] {"apple_block", "persimmon_block"}; + private static final String[] plants = new String[] {"apple_block", "persimmon_block", "peach_block"}; @SideOnly(Side.CLIENT) private IIcon[] textures; diff --git a/src/main/java/biomesoplenty/common/items/ItemBOPFood.java b/src/main/java/biomesoplenty/common/items/ItemBOPFood.java index 1df6f8d7a..4f38c3bf1 100644 --- a/src/main/java/biomesoplenty/common/items/ItemBOPFood.java +++ b/src/main/java/biomesoplenty/common/items/ItemBOPFood.java @@ -21,8 +21,8 @@ import biomesoplenty.api.content.BOPCBlocks; public class ItemBOPFood extends ItemFood { - private static final String[] foodTypes = new String[] {"berries", "shroompowder", "wildcarrots", "sunflowerseeds", "saladfruit", "saladveggie", "saladshroom", "earth", "persimmon", "filledhoneycomb", "ambrosia", "turnip"}; - private static final int[] foodHunger = new int[] {1, 1, 3, 2, 6, 6, 6, 0, 5, 3, 6, 3}; + private static final String[] foodTypes = new String[] {"berries", "shroompowder", "wildcarrots", "peach", "saladfruit", "saladveggie", "saladshroom", "earth", "persimmon", "filledhoneycomb", "ambrosia", "turnip"}; + private static final int[] foodHunger = new int[] {1, 1, 3, 5, 6, 6, 6, 0, 5, 3, 6, 3}; private static final float[] foodSaturation = new float[] {0.1F, 0.1F, 0.5F, 0.5F, 0.6F, 0.6F, 0.6F, 0.0F, 0.2F, 0.4F, 0.8F, 0.4F}; private IIcon[] textures; diff --git a/src/main/resources/assets/biomesoplenty/lang/en_US.lang b/src/main/resources/assets/biomesoplenty/lang/en_US.lang index b3dff7977..adb3ba31f 100644 --- a/src/main/resources/assets/biomesoplenty/lang/en_US.lang +++ b/src/main/resources/assets/biomesoplenty/lang/en_US.lang @@ -313,7 +313,7 @@ tile.mahoganyStairs.name=Mahogany Wood Stairs item.food.berries.name=Berry item.food.shroompowder.name=Shroom Powder item.food.wildcarrots.name=Wild Carrots -item.food.sunflowerseeds.name=Sunflower Seeds +item.food.peach.name=Peach item.food.saladfruit.name=Fruit Salad item.food.saladveggie.name=Veggie Salad item.food.saladshroom.name=Shroom Salad diff --git a/src/main/resources/assets/biomesoplenty/textures/blocks/apple_block.png b/src/main/resources/assets/biomesoplenty/textures/blocks/apple_block.png index fdbf9ddda47564062f6c682c91624f17f3a429dc..4cbb125cb4c4cf190caaf659e1d032e419a601c2 100644 GIT binary patch delta 242 zcmVehFJI~|M>sk-Y+Ka5ciS|rwc2VX>A&UzsXyaSYcm~tk(D6f%&_EV^O9r#{~O){Fi0%gWj#|#)RX}TJYD@<);T3K0RYM{W2pcD diff --git a/src/main/resources/assets/biomesoplenty/textures/blocks/peach_block.png b/src/main/resources/assets/biomesoplenty/textures/blocks/peach_block.png new file mode 100644 index 0000000000000000000000000000000000000000..23207209f8fa4fd16a70da8d697e64c878bab9c9 GIT binary patch literal 333 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1qucL5ULAh?3y^w370~qEv>0#LT=By}Z;C1rt33 zJ=4@yqg0@peV#6kAr}70Kh7UG@ZtaedXb!InV;m_PWx6gI<5G0LSi+e!kQ6#j4JQArw|xA+e=YYvdrj|#Orl}7NA0%eVI4MthRzH{Z zh$O?I>SWskT?eH;X0U+_HSjR>5avm~%yY!lvI6;>1s;*b z3=DjSK$uZf!>a)(C{f}XQ4*Y=R#Ki=l*&+$n3-3imzP?iV4`QBXPVk-lnPX{&C|s( z#KJ%M$N&HKVL8(>Kgr83Ud@=u!#E>JQ(V))Eq$?c%Oc4($FBZmjs{lJvASIBZSf%| z{{P>984R&3QmC)#2CDzJ(sNigV*`NRQTSV4Kw%A|OOfY3}HRfpMWyo~8 zTx07mmE+LEs2?CH$IQ3fyUFx`iBh)ODFy*HOW|dVl8dw15=Hoo*fiaazsPcsaBc|c i37sH<1y}r;&&Xgca%?}JT`&*O2MnIBelF{r5}E*Wqhv_{ literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/biomesoplenty/textures/items/peach.png b/src/main/resources/assets/biomesoplenty/textures/items/peach.png new file mode 100644 index 0000000000000000000000000000000000000000..8a19df3dea9da487e89946f44b7d3eeed026f941 GIT binary patch literal 370 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Ea{HEjtmSN`?>!lvI6;>1s;*b z3=Dh+K$tP>S|=w^P@=>&q9iy!t)x7$D3zfgF*C13FE6!3!9>qM&os5wC>5yYgQtsQ zh=u>s32V6y1xU1svlvROZA%n&Z8KkRFd;@rNkKjFxu??|j#F{TAeNgl9dpzq* zgvLNx0OGyG)oh_7%$;m{Yv2Q?NgeoUt5Gpv L^>bP0l+XkK=1hyx literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/biomesoplenty/textures/items/persimmon.png b/src/main/resources/assets/biomesoplenty/textures/items/persimmon.png index c8c043857b5341aaf6033732e460483ee597e8ef..bcc011e17e030b7358392ba4b392b6249c725942 100644 GIT binary patch delta 232 zcmVgrC7%EPzuEEs|Itz~AEXg14rSvs1a82-EQkS9H6R!y z2Bl#J#2D~m8gMvW62&&S0Z5v!=Skx>00h>>LJUDMh*-@pFaR-Rz iWB}7ZvPL=s1_l7AH;LN}3WM}Oa4qXouFK1%=91J%LorZBnxDt;>XHQ$+N1XlciZ{q*|JEQ;q z-{=kIKb>I$#xR4R%25GG^Uq}#|Nrj-YW#fQ|Nm>PU_MAAh=#Fo8Ui=qLKVb-4R&A* z7K73-1HvsuFb&vQqlsc0%m8G~XWMjf8vp`J^VPu$kqshRGcOE)3;`*G83fV@5(8-@ ks2Lf+G?1*3&VYdd0Q}n4O?a!I_5c6?07*qoM6N<$f-u)(LI3~&