mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 07:13:28 +01:00
Added more Treasure Chest loots
This commit is contained in:
parent
1d2f03b587
commit
0d3ab98e44
3 changed files with 36 additions and 1 deletions
|
@ -29,3 +29,11 @@ The two Brackets will have to get replaced with one of the parts of Information
|
||||||
- To the Compound, add an NBTTagCompound with the name "output" that contains the Input ItemStack saved to NBT (To do this, just use ItemStack.saveToNBT)
|
- To the Compound, add an NBTTagCompound with the name "output" that contains the Input ItemStack saved to NBT (To do this, just use ItemStack.saveToNBT)
|
||||||
- To the Compound, add an int with the name "chance" that contains the Chance of the Item appearing
|
- To the Compound, add an int with the name "chance" that contains the Chance of the Item appearing
|
||||||
- Send the Message with "registerBallOfHairRecipe" as the [X] Argument, the Compound as the [Y] Argument.
|
- Send the Message with "registerBallOfHairRecipe" as the [X] Argument, the Compound as the [Y] Argument.
|
||||||
|
|
||||||
|
##### Treasure Chest Recipes
|
||||||
|
- Create an NBTTagCompound
|
||||||
|
- To the Compound, add an NBTTagCompound with the name "output" that contains the Input ItemStack saved to NBT (To do this, just use ItemStack.saveToNBT)
|
||||||
|
- To the Compound, add an int with the name "chance" that contains the Chance of the Item appearing
|
||||||
|
- To the Compound, add an int with the name "minAmount" that contains the minimum size of the ItemStack
|
||||||
|
- To the Compound, add an int with the name "maxAmount" that contains the maximum size of the ItemStack
|
||||||
|
- Send the Message with "registerTreasureChestRecipe" as the [X] Argument, the Compound as the [Y] Argument.
|
||||||
|
|
|
@ -53,7 +53,6 @@ public class WorldDecorationEvent{
|
||||||
int genX = event.chunkX+event.rand.nextInt(16)+8;
|
int genX = event.chunkX+event.rand.nextInt(16)+8;
|
||||||
int genZ = event.chunkZ+event.rand.nextInt(16)+8;
|
int genZ = event.chunkZ+event.rand.nextInt(16)+8;
|
||||||
int genY = event.world.getTopSolidOrLiquidBlock(genX, genZ)-1;
|
int genY = event.world.getTopSolidOrLiquidBlock(genX, genZ)-1;
|
||||||
|
|
||||||
if(event.world.getBlock(genX, genY, genZ).getMaterial() == blockBelow){
|
if(event.world.getBlock(genX, genY, genZ).getMaterial() == blockBelow){
|
||||||
event.world.setBlock(genX, genY+1, genZ, plant, meta, 2);
|
event.world.setBlock(genX, genY+1, genZ, plant, meta, 2);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
package ellpeck.actuallyadditions.recipe;
|
package ellpeck.actuallyadditions.recipe;
|
||||||
|
|
||||||
import ellpeck.actuallyadditions.blocks.InitBlocks;
|
import ellpeck.actuallyadditions.blocks.InitBlocks;
|
||||||
|
import ellpeck.actuallyadditions.items.InitItems;
|
||||||
|
import ellpeck.actuallyadditions.items.metalists.TheJams;
|
||||||
|
import ellpeck.actuallyadditions.items.metalists.TheSpecialDrops;
|
||||||
import net.minecraft.init.Items;
|
import net.minecraft.init.Items;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.WeightedRandom;
|
import net.minecraft.util.WeightedRandom;
|
||||||
|
@ -19,6 +22,31 @@ public class TreasureChestHandler{
|
||||||
addReturn(new ItemStack(Items.ender_pearl), 10, 1, 2);
|
addReturn(new ItemStack(Items.ender_pearl), 10, 1, 2);
|
||||||
addReturn(new ItemStack(Items.emerald), 3, 1, 1);
|
addReturn(new ItemStack(Items.emerald), 3, 1, 1);
|
||||||
addReturn(new ItemStack(Items.experience_bottle), 5, 3, 6);
|
addReturn(new ItemStack(Items.experience_bottle), 5, 3, 6);
|
||||||
|
addReturn(new ItemStack(InitItems.itemSpecialDrop, 1, TheSpecialDrops.SOLIDIFIED_EXPERIENCE.ordinal()), 15, 3, 6);
|
||||||
|
addReturn(new ItemStack(Items.record_11), 2, 1, 1);
|
||||||
|
addReturn(new ItemStack(Items.record_13), 2, 1, 1);
|
||||||
|
addReturn(new ItemStack(Items.record_blocks), 2, 1, 1);
|
||||||
|
addReturn(new ItemStack(Items.record_cat), 2, 1, 1);
|
||||||
|
addReturn(new ItemStack(Items.record_chirp), 2, 1, 1);
|
||||||
|
addReturn(new ItemStack(Items.record_far), 2, 1, 1);
|
||||||
|
addReturn(new ItemStack(Items.record_mall), 2, 1, 1);
|
||||||
|
addReturn(new ItemStack(Items.record_mellohi), 2, 1, 1);
|
||||||
|
addReturn(new ItemStack(Items.record_stal), 2, 1, 1);
|
||||||
|
addReturn(new ItemStack(Items.record_strad), 2, 1, 1);
|
||||||
|
addReturn(new ItemStack(Items.record_ward), 2, 1, 1);
|
||||||
|
addReturn(new ItemStack(Items.record_wait), 2, 1, 1);
|
||||||
|
addReturn(new ItemStack(Items.saddle), 5, 1, 1);
|
||||||
|
addReturn(new ItemStack(Items.name_tag), 20, 1, 2);
|
||||||
|
addReturn(new ItemStack(InitItems.itemJams, 1, TheJams.CU_BA_RA.ordinal()), 10, 1, 2);
|
||||||
|
addReturn(new ItemStack(InitItems.itemJams, 1, TheJams.GRA_KI_BA.ordinal()), 10, 1, 2);
|
||||||
|
addReturn(new ItemStack(InitItems.itemJams, 1, TheJams.PL_AP_LE.ordinal()), 10, 1, 2);
|
||||||
|
addReturn(new ItemStack(InitItems.itemJams, 1, TheJams.CH_AP_CI.ordinal()), 10, 1, 2);
|
||||||
|
addReturn(new ItemStack(InitItems.itemJams, 1, TheJams.HO_ME_KI.ordinal()), 10, 1, 2);
|
||||||
|
addReturn(new ItemStack(InitItems.itemJams, 1, TheJams.PI_CO.ordinal()), 10, 1, 2);
|
||||||
|
addReturn(new ItemStack(Items.fish), 80, 1, 3);
|
||||||
|
addReturn(new ItemStack(Items.fish, 1, 1), 60, 1, 3);
|
||||||
|
addReturn(new ItemStack(Items.fish, 1, 2), 10, 1, 1);
|
||||||
|
addReturn(new ItemStack(Items.fish, 1, 3), 40, 1, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void addReturn(ItemStack stack, int chance, int minAmount, int maxAmount){
|
public static void addReturn(ItemStack stack, int chance, int minAmount, int maxAmount){
|
||||||
|
|
Loading…
Reference in a new issue