mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 07:13:28 +01:00
Made Treasure Chests generate in any Ocean Biome between Level 45 and 25.
This commit is contained in:
parent
0fcff1cd12
commit
1d2f03b587
3 changed files with 11 additions and 7 deletions
|
@ -56,7 +56,9 @@ public enum ConfigIntValues{
|
|||
COFFEE_AMOUNT("Coffee Amount", ConfigCategories.WORLD_GEN, 6, 1, 50, "The Chance of Coffee generating"),
|
||||
RICE_CHANCE("Rice Chance", ConfigCategories.WORLD_GEN, 50, 1, 3000, "The 1 in X chance for Rice to generate"),
|
||||
NORMAL_PLANT_CHANCE("Plant Chance", ConfigCategories.WORLD_GEN, 400, 1, 3000, "The 1 in X chance for Flax, Coffee and Canola to generate"),
|
||||
TREASURE_CHEST_CHANCE("Treasure Chest Chance", ConfigCategories.WORLD_GEN, 300, 1, 3000, "The 1 in X chance for a Treasure Chest to generate in a Deep Ocean"),
|
||||
TREASURE_CHEST_CHANCE("Treasure Chest Chance", ConfigCategories.WORLD_GEN, 300, 1, 3000, "The 1 in X chance for a Treasure Chest to generate in an Ocean"),
|
||||
TREASURE_CHEST_MIN_HEIGHT("Treasure Chest Min Height", ConfigCategories.WORLD_GEN, 25, 0, 65, "The Min Height for a Treasure Chest to generate"),
|
||||
TREASURE_CHEST_MAX_HEIGHT("Treasure Chest Max Height", ConfigCategories.WORLD_GEN, 45, 0, 65, "The Max Height for a Treasure Chest to generate"),
|
||||
|
||||
GRINDER_ENERGY_USED("Energy Use: Crusher", ConfigCategories.MACHINE_VALUES, 40, 1, 500, "The Amount of Energy used by the Crusher per Tick"),
|
||||
GRINDER_DOUBLE_ENERGY_USED("Energy Use: Double Crusher", ConfigCategories.MACHINE_VALUES, 60, 1, 500, "The Amount of Energy used by the Double Crusher per Tick"),
|
||||
|
|
|
@ -9,7 +9,7 @@ import ellpeck.actuallyadditions.config.values.ConfigIntValues;
|
|||
import ellpeck.actuallyadditions.util.WorldUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraft.world.biome.BiomeGenOcean;
|
||||
import net.minecraftforge.event.terraingen.DecorateBiomeEvent;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -32,10 +32,12 @@ public class WorldDecorationEvent{
|
|||
int genZ = event.chunkZ+event.rand.nextInt(16)+8;
|
||||
int genY = event.world.getTopSolidOrLiquidBlock(genX, genZ);
|
||||
|
||||
if(event.world.getBiomeGenForCoords(genX, genZ) == BiomeGenBase.deepOcean){
|
||||
if(event.world.getBlock(genX, genY, genZ).getMaterial() == Material.water){
|
||||
if(event.world.getBlock(genX, genY-1, genZ).getMaterial().isSolid()){
|
||||
event.world.setBlock(genX, genY, genZ, InitBlocks.blockTreasureChest, 0, 2);
|
||||
if(event.world.getBiomeGenForCoords(genX, genZ) instanceof BiomeGenOcean){
|
||||
if(genY >= ConfigIntValues.TREASURE_CHEST_MIN_HEIGHT.getValue() && genY <= ConfigIntValues.TREASURE_CHEST_MAX_HEIGHT.getValue()){
|
||||
if(event.world.getBlock(genX, genY, genZ).getMaterial() == Material.water){
|
||||
if(event.world.getBlock(genX, genY-1, genZ).getMaterial().isSolid()){
|
||||
event.world.setBlock(genX, genY, genZ, InitBlocks.blockTreasureChest, 0, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -194,7 +194,7 @@ tooltip.actuallyadditions.itemResonantRice.desc=Don't know what it does... maybe
|
|||
tooltip.actuallyadditions.itemResonantRice.uncraftable.desc=Uncraftable because there's no Mod installed that adds Enderium :(
|
||||
|
||||
tile.actuallyadditions.blockTreasureChest.name=Treasure Chest
|
||||
tooltip.actuallyadditions.blockTreasureChest.desc.1=A Chest found on the Ground of Deep Ocean Biomes
|
||||
tooltip.actuallyadditions.blockTreasureChest.desc.1=A Chest found on the Ground of Ocean Biomes
|
||||
tooltip.actuallyadditions.blockTreasureChest.desc.2=Maybe you'll get something awesome when you Right-Click it?
|
||||
|
||||
tile.actuallyadditions.blockCanolaPress.name=Canola Press
|
||||
|
|
Loading…
Reference in a new issue