diff --git a/build.properties b/build.properties index d30bc05a5..4bd9a97c0 100644 --- a/build.properties +++ b/build.properties @@ -1,4 +1,4 @@ minecraft_version=1.9 -forge_version=12.16.0.1842-1.9 +forge_version=12.16.0.1863-1.9 mod_version=4.0.2 -mappings_version=snapshot_nodoc_20160324 +mappings_version=snapshot_nodoc_20160412 diff --git a/src/main/java/biomesoplenty/api/biome/BOPBiome.java b/src/main/java/biomesoplenty/api/biome/BOPBiome.java index f598aa32f..b1ad5ff9f 100644 --- a/src/main/java/biomesoplenty/api/biome/BOPBiome.java +++ b/src/main/java/biomesoplenty/api/biome/BOPBiome.java @@ -8,15 +8,6 @@ package biomesoplenty.api.biome; -import java.io.File; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Random; - import biomesoplenty.api.biome.generation.GenerationManager; import biomesoplenty.api.biome.generation.GeneratorStage; import biomesoplenty.api.biome.generation.IGenerator; @@ -50,6 +41,9 @@ import net.minecraft.world.World; import net.minecraft.world.biome.BiomeGenBase; import net.minecraft.world.chunk.ChunkPrimer; +import java.util.*; +import java.util.Map.Entry; + public class BOPBiome extends BiomeGenBase implements IExtendedBiome { private GenerationManager generationManager = new GenerationManager(); @@ -58,13 +52,13 @@ public class BOPBiome extends BiomeGenBase implements IExtendedBiome // defaults public int skyColor = -1; // -1 indicates the default skyColor by temperature will be used public boolean hasBiomeEssence = true; - public IBlockState seaFloorBlock = Blocks.dirt.getDefaultState(); + public IBlockState seaFloorBlock = Blocks.DIRT.getDefaultState(); public boolean canSpawnInBiome = true; public boolean canGenerateVillages = true; public boolean canGenerateRivers = true; - public ResourceLocation beachBiomeLocation = BiomeUtils.getLocForBiome(Biomes.beach); + public ResourceLocation beachBiomeLocation = BiomeUtils.getLocForBiome(Biomes.BEACH); public TerrainSettings terrainSettings = new TerrainSettings(); public boolean noNeighborTerrainInfuence = false; @@ -91,7 +85,7 @@ public class BOPBiome extends BiomeGenBase implements IExtendedBiome // roots this.addGenerator("roots", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(4.0F).with(BOPPlants.ROOT).create()); - IBlockPosQuery suitableStonePosition = BlockQuery.buildAnd().withAltitudeBetween(0, 55).blocks(Blocks.stone).create(); + IBlockPosQuery suitableStonePosition = BlockQuery.buildAnd().withAltitudeBetween(0, 55).blocks(Blocks.STONE).create(); this.addGenerator("miners_delight", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.25F).generationAttempts(64).with(BOPFlowers.MINERS_DELIGHT).placeOn(suitableStonePosition).scatterYMethod(ScatterYMethod.BELOW_GROUND).create()); this.addGenerator("glowshrooms", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(1.5F).generationAttempts(64).placeOn(suitableStonePosition).with(BOPBlocks.mushroom.getDefaultState().withProperty(BlockBOPMushroom.VARIANT, BlockBOPMushroom.MushroomType.GLOWSHROOM)).scatterYMethod(ScatterYMethod.BELOW_GROUND).create()); this.addGenerator("stone_formations", GeneratorStage.FLOWERS,(new GeneratorColumns.Builder()).amountPerChunk(30.0F).generationAttempts(32).placeOn(suitableStonePosition).with(BOPBlocks.stone_formations.getDefaultState()).minHeight(1).maxHeight(7).randomDirection(true).scatterYMethod(ScatterYMethod.BELOW_GROUND).create()); @@ -195,7 +189,7 @@ public class BOPBiome extends BiomeGenBase implements IExtendedBiome // case insensitive, dot used as mod delimiter, no spaces or underscores // eg 'villager', 'Zombie', 'SQUID', 'enderdragon', 'biomesoplenty.wasp' all ok Class entityClazz = null; - for (Object entry : EntityList.stringToClassMapping.entrySet()) + for (Object entry : EntityList.NAME_TO_CLASS.entrySet()) { String entryEntityName = (String)((Entry)entry).getKey(); if (entryEntityName.equalsIgnoreCase(entityName)) @@ -340,24 +334,24 @@ public class BOPBiome extends BiomeGenBase implements IExtendedBiome // bedrock at the bottom if (y <= rand.nextInt(5)) { - primer.setBlockState(localZ, y, localX, Blocks.bedrock.getDefaultState()); + primer.setBlockState(localZ, y, localX, Blocks.BEDROCK.getDefaultState()); continue; } - if (state.getMaterial() == Material.air) + if (state.getMaterial() == Material.AIR) { // topBlocks and dirtBlocks can occur after any pocket of air topBlocksToFill = (topBlock == null ? 0 : 1); dirtBlocksToFill = dirtDepth; continue; } - else if (!hitFloorYet && state.getMaterial() == Material.water) + else if (!hitFloorYet && state.getMaterial() == Material.WATER) { // seaFloorBlocks can occur after surface water seaFloorBlocksToFill = seaFloorDepth; } - if (state.getBlock() == Blocks.stone) + if (state.getBlock() == Blocks.STONE) { hitFloorYet = true; if (topBlocksToFill > 0) @@ -372,7 +366,7 @@ public class BOPBiome extends BiomeGenBase implements IExtendedBiome } else { - primer.setBlockState(localZ, y, localX, Blocks.gravel.getDefaultState()); + primer.setBlockState(localZ, y, localX, Blocks.GRAVEL.getDefaultState()); dirtBlocksToFill = 0; } topBlocksToFill--; @@ -388,10 +382,10 @@ public class BOPBiome extends BiomeGenBase implements IExtendedBiome --dirtBlocksToFill; // add sandstone after a patch of sand - if (dirtBlocksToFill == 0 && fillerBlock.getBlock() == Blocks.sand) + if (dirtBlocksToFill == 0 && fillerBlock.getBlock() == Blocks.SAND) { dirtBlocksToFill = rand.nextInt(4) + Math.max(0, y - 63); - fillerBlock = fillerBlock.getValue(BlockSand.VARIANT) == BlockSand.EnumType.RED_SAND ? Blocks.red_sandstone.getDefaultState() : Blocks.sandstone.getDefaultState(); + fillerBlock = fillerBlock.getValue(BlockSand.VARIANT) == BlockSand.EnumType.RED_SAND ? Blocks.RED_SANDSTONE.getDefaultState() : Blocks.SANDSTONE.getDefaultState(); } } } diff --git a/src/main/java/biomesoplenty/api/biome/ExtendedBiomeWrapper.java b/src/main/java/biomesoplenty/api/biome/ExtendedBiomeWrapper.java index 9a5c3ffd4..830132039 100644 --- a/src/main/java/biomesoplenty/api/biome/ExtendedBiomeWrapper.java +++ b/src/main/java/biomesoplenty/api/biome/ExtendedBiomeWrapper.java @@ -1,8 +1,5 @@ package biomesoplenty.api.biome; -import java.util.HashMap; -import java.util.Map; - import biomesoplenty.api.biome.generation.GenerationManager; import biomesoplenty.api.biome.generation.GeneratorStage; import biomesoplenty.api.biome.generation.IGenerator; @@ -16,13 +13,16 @@ import net.minecraft.init.Biomes; import net.minecraft.util.ResourceLocation; import net.minecraft.world.biome.BiomeGenBase; +import java.util.HashMap; +import java.util.Map; + public class ExtendedBiomeWrapper implements IExtendedBiome { public final BiomeGenBase biome; private GenerationManager generationManager = new GenerationManager(); private Map weightMap = new HashMap(); - public ResourceLocation beachBiomeLocation = BiomeUtils.getLocForBiome(Biomes.beach); + public ResourceLocation beachBiomeLocation = BiomeUtils.getLocForBiome(Biomes.BEACH); public ExtendedBiomeWrapper(BiomeGenBase biome) { diff --git a/src/main/java/biomesoplenty/client/gui/GuiBOPConfigureWorld.java b/src/main/java/biomesoplenty/client/gui/GuiBOPConfigureWorld.java index b9a7b4a05..ab678a5bb 100644 --- a/src/main/java/biomesoplenty/client/gui/GuiBOPConfigureWorld.java +++ b/src/main/java/biomesoplenty/client/gui/GuiBOPConfigureWorld.java @@ -1,22 +1,13 @@ package biomesoplenty.client.gui; -import java.io.IOException; - -import com.google.common.base.Predicate; -import com.google.common.primitives.Floats; - import biomesoplenty.common.world.BOPWorldSettings; import biomesoplenty.common.world.BOPWorldSettings.BiomeSize; import biomesoplenty.common.world.BOPWorldSettings.LandMassScheme; import biomesoplenty.common.world.BOPWorldSettings.RainfallVariationScheme; import biomesoplenty.common.world.BOPWorldSettings.TemperatureVariationScheme; -import net.minecraft.client.gui.Gui; -import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.gui.GuiCreateWorld; -import net.minecraft.client.gui.GuiListButton; -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.client.gui.GuiSlider; -import net.minecraft.client.gui.GuiTextField; +import com.google.common.base.Predicate; +import com.google.common.primitives.Floats; +import net.minecraft.client.gui.*; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.VertexBuffer; @@ -25,6 +16,8 @@ import net.minecraft.client.resources.I18n; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import java.io.IOException; + @SideOnly(Side.CLIENT) public class GuiBOPConfigureWorld extends GuiScreen implements GuiSlider.FormatHelper, GuiBOPPageList.GuiResponder { @@ -638,7 +631,7 @@ public class GuiBOPConfigureWorld extends GuiScreen implements GuiSlider.FormatH GlStateManager.disableFog(); Tessellator tessellator = Tessellator.getInstance(); VertexBuffer worldrenderer = tessellator.getBuffer(); - this.mc.getTextureManager().bindTexture(optionsBackground); + this.mc.getTextureManager().bindTexture(OPTIONS_BACKGROUND); GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR); worldrenderer.pos((double)(this.width / 2 - 90), 185.0D, 0.0D).tex(0.0D, 2.65625D).color(64, 64, 64, 64).endVertex(); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenAlps.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenAlps.java index a3c3646b6..bc922fc51 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenAlps.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenAlps.java @@ -17,7 +17,6 @@ import biomesoplenty.common.world.feature.GeneratorLakes; import biomesoplenty.common.world.feature.GeneratorOreSingle; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; -import net.minecraft.world.biome.BiomeGenBase; public class BiomeGenAlps extends BOPBiome { @@ -35,8 +34,8 @@ public class BiomeGenAlps extends BOPBiome this.addWeight(BOPClimates.TUNDRA, 3); this.addWeight(BOPClimates.ICE_CAP, 5); - this.topBlock = Blocks.snow.getDefaultState(); - this.fillerBlock = Blocks.snow.getDefaultState(); + this.topBlock = Blocks.SNOW.getDefaultState(); + this.fillerBlock = Blocks.SNOW.getDefaultState(); this.avgDirtDepth = 8; @@ -46,7 +45,7 @@ public class BiomeGenAlps extends BOPBiome this.addGenerator("hot_springs", GeneratorStage.SAND, (new GeneratorLakes.Builder()).amountPerChunk(0.1F).waterLakeForBiome(this).liquid(BOPBlocks.hot_spring_water).frozenLiquid((IBlockState)null).create()); // gem - this.addGenerator("emeralds", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(Blocks.emerald_ore.getDefaultState()).create()); + this.addGenerator("emeralds", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(Blocks.EMERALD_ORE.getDefaultState()).create()); } diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBambooForest.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBambooForest.java index 916a00907..1ce9f0b46 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBambooForest.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBambooForest.java @@ -8,8 +8,6 @@ package biomesoplenty.common.biome.overworld; -import java.util.Random; - import biomesoplenty.api.biome.BOPBiome; import biomesoplenty.api.biome.generation.GeneratorStage; import biomesoplenty.api.biome.generation.GeneratorWeighted; @@ -24,11 +22,7 @@ import biomesoplenty.common.enums.BOPTrees; import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod; import biomesoplenty.common.util.config.BOPConfig.IConfigObj; import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorColumns; -import biomesoplenty.common.world.feature.GeneratorDoubleFlora; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorOreSingle; +import biomesoplenty.common.world.feature.*; import biomesoplenty.common.world.feature.tree.GeneratorBulbTree; import biomesoplenty.common.world.feature.tree.GeneratorTwigletTree; import net.minecraft.block.BlockDirt; @@ -42,6 +36,8 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraft.world.chunk.ChunkPrimer; +import java.util.Random; + public class BiomeGenBambooForest extends BOPBiome { @@ -62,9 +58,9 @@ public class BiomeGenBambooForest extends BOPBiome this.spawnableCreatureList.clear(); this.spawnableMonsterList.add(new SpawnListEntry(EntityOcelot.class, 2, 1, 1)); - this.topBlock = Blocks.dirt.getDefaultState().withProperty(BlockDirt.VARIANT, BlockDirt.DirtType.PODZOL); + this.topBlock = Blocks.DIRT.getDefaultState().withProperty(BlockDirt.VARIANT, BlockDirt.DirtType.PODZOL); this.usualTopBlock = this.topBlock; - this.alternateTopBlock = Blocks.grass.getDefaultState(); + this.alternateTopBlock = Blocks.GRASS.getDefaultState(); // flowers GeneratorWeighted flowerGenerator = new GeneratorWeighted(0.5F); @@ -92,7 +88,7 @@ public class BiomeGenBambooForest extends BOPBiome this.addGenerator("leaf_piles", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(3.0F).with(BOPPlants.LEAFPILE).create()); this.addGenerator("ferns", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(4.0F).with(BlockTallGrass.EnumType.FERN).create()); this.addGenerator("river_cane", GeneratorStage.FLOWERS,(new GeneratorColumns.Builder()).amountPerChunk(5.0F).generationAttempts(24).placeOn(BlockQueries.litFertileWaterside).with(BlockBOPPlant.paging.getVariantState(BOPPlants.RIVERCANE)).minHeight(1).maxHeight(3).create()); - this.addGenerator("algae", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(4.0F).replace(Blocks.water).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.ALGAE)).scatterYMethod(ScatterYMethod.AT_GROUND).create()); + this.addGenerator("algae", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(4.0F).replace(Blocks.WATER).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.ALGAE)).scatterYMethod(ScatterYMethod.AT_GROUND).create()); this.addGenerator("bushes", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BOPPlants.BUSH).create()); // gem diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBayou.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBayou.java index cabdd6935..f05fc6ba7 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBayou.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBayou.java @@ -92,21 +92,21 @@ public class BiomeGenBayou extends BOPBiome this.addGenerator("cattail", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(6.0F).with(BOPPlants.CATTAIL).create()); this.addGenerator("double_cattail", GeneratorStage.FLOWERS, (new GeneratorDoubleFlora.Builder()).amountPerChunk(8.0F).with(BlockBOPDoublePlant.DoublePlantType.TALL_CATTAIL).create()); this.addGenerator("leaf_piles", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(3.0F).with(BOPPlants.LEAFPILE).create()); - this.addGenerator("sugar_cane", GeneratorStage.FLOWERS,(new GeneratorColumns.Builder()).amountPerChunk(3.0F).generationAttempts(24).placeOn(BlockQueries.litFertileWaterside).with(Blocks.reeds.getDefaultState()).minHeight(1).maxHeight(3).create()); + this.addGenerator("sugar_cane", GeneratorStage.FLOWERS,(new GeneratorColumns.Builder()).amountPerChunk(3.0F).generationAttempts(24).placeOn(BlockQueries.litFertileWaterside).with(Blocks.REEDS.getDefaultState()).minHeight(1).maxHeight(3).create()); // water plants - this.addGenerator("lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(2.5F).with(Blocks.waterlily.getDefaultState()).create()); + this.addGenerator("lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(2.5F).with(Blocks.WATERLILY.getDefaultState()).create()); this.addGenerator("medium_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(2.0F).with(BlockBOPLilypad.LilypadType.MEDIUM).create()); this.addGenerator("flower_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.25F).with(BlockBOPLilypad.LilypadType.FLOWER).create()); this.addGenerator("small_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(1.5F).with(BlockBOPLilypad.LilypadType.SMALL).create()); this.addGenerator("tiny_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(1.5F).with(BlockBOPLilypad.LilypadType.TINY).create()); - this.addGenerator("algae", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(4.0F).replace(Blocks.water).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.ALGAE)).scatterYMethod(ScatterYMethod.AT_GROUND).create()); + this.addGenerator("algae", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(4.0F).replace(Blocks.WATER).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.ALGAE)).scatterYMethod(ScatterYMethod.AT_GROUND).create()); this.addGenerator("water_reeds", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(4.0F).with(BOPPlants.REED).generationAttempts(32).create()); // shrooms this.addGenerator("flat_mushroom", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(BlockBOPMushroom.MushroomType.FLAT_MUSHROOM).create()); - this.addGenerator("red_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.3F).with(Blocks.red_mushroom.getDefaultState()).create()); - this.addGenerator("brown_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(Blocks.brown_mushroom.getDefaultState()).create()); + this.addGenerator("red_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.3F).with(Blocks.RED_MUSHROOM.getDefaultState()).create()); + this.addGenerator("brown_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(Blocks.BROWN_MUSHROOM.getDefaultState()).create()); // gem this.addGenerator("malachite", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(BOPGems.MALACHITE).create()); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBog.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBog.java index b7921cabe..94b7c30ee 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBog.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBog.java @@ -75,7 +75,7 @@ public class BiomeGenBog extends BOPBiome this.addGenerator("poison_lakes", GeneratorStage.SAND, (new GeneratorLakes.Builder()).amountPerChunk(0.5F).waterLakeForBiome(this).liquid(BOPBlocks.poison).frozenLiquid((IBlockState)null).create()); // gravel - this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(4).maxRadius(7).with(Blocks.gravel.getDefaultState()).create()); + this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(4).maxRadius(7).with(Blocks.GRAVEL.getDefaultState()).create()); // mud this.addGenerator("mud", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(BOPBlocks.mud.getDefaultState()).create()); @@ -91,7 +91,7 @@ public class BiomeGenBog extends BOPBiome this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); treeGenerator.add("dark_oak_twiglet", 3, (new GeneratorTwigletTree.Builder()).log(BlockPlanks.EnumType.DARK_OAK).leaves(BlockPlanks.EnumType.DARK_OAK).minHeight(5).maxHeight(10).leafChance(0.3F, 0.9F).create()); treeGenerator.add("birch_twiglet", 1, (new GeneratorTwigletTree.Builder()).log(BlockPlanks.EnumType.BIRCH).leaves(BlockPlanks.EnumType.BIRCH).minHeight(5).maxHeight(10).leafChance(0.3F, 0.9F).create()); - treeGenerator.add("bog_bush", 3, (new GeneratorFlora.Builder()).placeOn(this.topBlock).replace(Material.air).withNonDecayingLeaf(BlockPlanks.EnumType.OAK).generationAttempts(8).create()); + treeGenerator.add("bog_bush", 3, (new GeneratorFlora.Builder()).placeOn(this.topBlock).replace(Material.AIR).withNonDecayingLeaf(BlockPlanks.EnumType.OAK).generationAttempts(8).create()); // grasses GeneratorWeighted grassGenerator = new GeneratorWeighted(7.0F); @@ -114,14 +114,14 @@ public class BiomeGenBog extends BOPBiome this.addGenerator("double_cattail", GeneratorStage.FLOWERS, (new GeneratorDoubleFlora.Builder()).amountPerChunk(1.0F).with(BlockBOPDoublePlant.DoublePlantType.TALL_CATTAIL).create()); // water plants - this.addGenerator("algae", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(8.0F).replace(Blocks.water).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.ALGAE)).generationAttempts(32).scatterYMethod(ScatterYMethod.AT_GROUND).create()); + this.addGenerator("algae", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(8.0F).replace(Blocks.WATER).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.ALGAE)).generationAttempts(32).scatterYMethod(ScatterYMethod.AT_GROUND).create()); this.addGenerator("water_reeds", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(3.0F).with(BOPPlants.REED).generationAttempts(32).create()); // shrooms this.addGenerator("flat_mushroom", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(BlockBOPMushroom.MushroomType.FLAT_MUSHROOM).create()); this.addGenerator("blue_milk_caps", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(BlockBOPMushroom.MushroomType.BLUE_MILK_CAP).create()); - this.addGenerator("brown_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(Blocks.brown_mushroom.getDefaultState()).create()); - this.addGenerator("red_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(Blocks.red_mushroom.getDefaultState()).create()); + this.addGenerator("brown_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(Blocks.BROWN_MUSHROOM.getDefaultState()).create()); + this.addGenerator("red_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(Blocks.RED_MUSHROOM.getDefaultState()).create()); // gem this.addGenerator("malachite", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(BOPGems.MALACHITE).create()); @@ -138,7 +138,7 @@ public class BiomeGenBog extends BOPBiome if (!settings.generateBopMushrooms) {this.removeGenerator("toadstools"); this.removeGenerator("flat_mushroom"); this.removeGenerator("blue_milk_caps"); this.removeGenerator("portobellos");} - if (!settings.generateBopSoils) {this.topBlock = Blocks.grass.getDefaultState(); this.fillerBlock = Blocks.dirt.getDefaultState();} + if (!settings.generateBopSoils) {this.topBlock = Blocks.GRASS.getDefaultState(); this.fillerBlock = Blocks.DIRT.getDefaultState();} if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBorealForest.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBorealForest.java index 0b9353abe..57d05273c 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBorealForest.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBorealForest.java @@ -47,8 +47,8 @@ public class BiomeGenBorealForest extends BOPBiome this.spawnableCreatureList.add(new SpawnListEntry(EntityWolf.class, 5, 4, 4)); // sand and gravel - this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.sand.getDefaultState()).create()); - this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(6).maxRadius(7).with(Blocks.gravel.getDefaultState()).create()); + this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.SAND.getDefaultState()).create()); + this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(6).maxRadius(7).with(Blocks.GRAVEL.getDefaultState()).create()); // trees & logs GeneratorWeighted treeGenerator = new GeneratorWeighted(20); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBrushland.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBrushland.java index 36b93981c..b2ea17812 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBrushland.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBrushland.java @@ -45,7 +45,7 @@ public class BiomeGenBrushland extends BOPBiome this.canGenerateVillages = true; //sand - this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(4).maxRadius(7).with(Blocks.sand.getDefaultState()).create()); + this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(4).maxRadius(7).with(Blocks.SAND.getDefaultState()).create()); // quicksand this.addGenerator("quicksand", GeneratorStage.SAND, (new GeneratorLakes.Builder()).amountPerChunk(0.2F).waterLakeForBiome(this).liquid(BOPBlocks.sand.getDefaultState().withProperty(BlockBOPSand.VARIANT, BlockBOPSand.SandType.QUICKSAND)).frozenLiquid((IBlockState)null).create()); @@ -55,8 +55,8 @@ public class BiomeGenBrushland extends BOPBiome this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); treeGenerator.add("brush", 1, (new GeneratorBasicTree.Builder()).log(BlockPlanks.EnumType.ACACIA).leaves(BlockPlanks.EnumType.ACACIA).minHeight(3).maxHeight(5).leafLayers(2).create()); treeGenerator.add("brush_twiglet", 2, (new GeneratorTwigletTree.Builder()).minHeight(1).maxHeight(2).log(BOPWoods.EBONY).leaves(BOPTrees.EBONY).create()); - treeGenerator.add("jungle_twiglet", 1, (new GeneratorTwigletTree.Builder()).minHeight(2).maxHeight(2).log(BlockPlanks.EnumType.JUNGLE).leaves(BlockPlanks.EnumType.JUNGLE).trunkFruit(Blocks.cocoa.getDefaultState()).create()); - treeGenerator.add("brush_bush", 3, (new GeneratorFlora.Builder()).placeOn(this.topBlock).replace(Material.air).withNonDecayingLeaf(BlockPlanks.EnumType.OAK).generationAttempts(8).create()); + treeGenerator.add("jungle_twiglet", 1, (new GeneratorTwigletTree.Builder()).minHeight(2).maxHeight(2).log(BlockPlanks.EnumType.JUNGLE).leaves(BlockPlanks.EnumType.JUNGLE).trunkFruit(Blocks.COCOA.getDefaultState()).create()); + treeGenerator.add("brush_bush", 3, (new GeneratorFlora.Builder()).placeOn(this.topBlock).replace(Material.AIR).withNonDecayingLeaf(BlockPlanks.EnumType.OAK).generationAttempts(8).create()); treeGenerator.add("decaying_tree", 2, (new GeneratorBigTree.Builder()).amountPerChunk(1.0F).log(BOPWoods.EBONY).leaves(BOPTrees.EBONY).minHeight(4).maxHeight(10).foliageHeight(1).create()); // grasses @@ -83,7 +83,7 @@ public class BiomeGenBrushland extends BOPBiome if (!settings.generateThorns) {this.removeGenerator("thorns");} if (!settings.generateQuicksand) {this.removeGenerator("quicksand");} - if (!settings.generateBopSoils) {this.topBlock = Blocks.grass.getDefaultState(); this.fillerBlock = Blocks.dirt.getDefaultState();} + if (!settings.generateBopSoils) {this.topBlock = Blocks.GRASS.getDefaultState(); this.fillerBlock = Blocks.DIRT.getDefaultState();} if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} @@ -96,8 +96,8 @@ public class BiomeGenBrushland extends BOPBiome this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); treeGenerator.add("brush", 1, (new GeneratorBasicTree.Builder()).log(BlockPlanks.EnumType.ACACIA).leaves(BlockPlanks.EnumType.ACACIA).minHeight(3).maxHeight(5).leafLayers(2).create()); treeGenerator.add("brush_twiglet", 2, (new GeneratorTwigletTree.Builder()).minHeight(1).maxHeight(2).log(BlockPlanks.EnumType.ACACIA).leaves(BlockPlanks.EnumType.ACACIA).create()); - treeGenerator.add("jungle_twiglet", 1, (new GeneratorTwigletTree.Builder()).minHeight(2).maxHeight(2).log(BlockPlanks.EnumType.JUNGLE).leaves(BlockPlanks.EnumType.JUNGLE).trunkFruit(Blocks.cocoa.getDefaultState()).create()); - treeGenerator.add("brush_bush", 3, (new GeneratorFlora.Builder()).placeOn(this.topBlock).replace(Material.air).withNonDecayingLeaf(BlockPlanks.EnumType.OAK).generationAttempts(8).create()); + treeGenerator.add("jungle_twiglet", 1, (new GeneratorTwigletTree.Builder()).minHeight(2).maxHeight(2).log(BlockPlanks.EnumType.JUNGLE).leaves(BlockPlanks.EnumType.JUNGLE).trunkFruit(Blocks.COCOA.getDefaultState()).create()); + treeGenerator.add("brush_bush", 3, (new GeneratorFlora.Builder()).placeOn(this.topBlock).replace(Material.AIR).withNonDecayingLeaf(BlockPlanks.EnumType.OAK).generationAttempts(8).create()); treeGenerator.add("decaying_tree", 2, (new GeneratorBigTree.Builder()).amountPerChunk(1.0F).log(BlockPlanks.EnumType.ACACIA).leaves(BlockPlanks.EnumType.ACACIA).minHeight(4).maxHeight(10).foliageHeight(1).create()); } diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenChaparral.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenChaparral.java index 387cd979a..0c05a1918 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenChaparral.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenChaparral.java @@ -51,10 +51,10 @@ public class BiomeGenChaparral extends BOPBiome this.canGenerateVillages = true; // sand - this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.sand.getDefaultState()).create()); + this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.SAND.getDefaultState()).create()); // stone patches - this.addGenerator("stone_patches", GeneratorStage.SAND, (new GeneratorSplotches.Builder()).amountPerChunk(2).splotchSize(15).replace(this.topBlock).with(Blocks.stone.getDefaultState()).scatterYMethod(ScatterYMethod.AT_SURFACE).create()); + this.addGenerator("stone_patches", GeneratorStage.SAND, (new GeneratorSplotches.Builder()).amountPerChunk(2).splotchSize(15).replace(this.topBlock).with(Blocks.STONE.getDefaultState()).scatterYMethod(ScatterYMethod.AT_SURFACE).create()); // flowers GeneratorWeighted flowerGenerator = new GeneratorWeighted(0.5F); @@ -77,7 +77,7 @@ public class BiomeGenChaparral extends BOPBiome GeneratorWeighted treeGenerator = new GeneratorWeighted(7.0F); this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); treeGenerator.add("twiglet", 3, (new GeneratorTwigletTree.Builder()).minHeight(2).maxHeight(2).log(BlockPlanks.EnumType.OAK).leaves(BlockPlanks.EnumType.OAK).create()); - treeGenerator.add("small_bush", 1, (new GeneratorFlora.Builder()).placeOn(this.topBlock).replace(Material.air).withNonDecayingLeaf(BlockPlanks.EnumType.OAK).create()); + treeGenerator.add("small_bush", 1, (new GeneratorFlora.Builder()).placeOn(this.topBlock).replace(Material.AIR).withNonDecayingLeaf(BlockPlanks.EnumType.OAK).create()); // other plants this.addGenerator("berry_bushes", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(BOPPlants.BERRYBUSH).create()); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenCherryBlossomGrove.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenCherryBlossomGrove.java index 97a77847f..f18842381 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenCherryBlossomGrove.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenCherryBlossomGrove.java @@ -78,7 +78,7 @@ public class BiomeGenCherryBlossomGrove extends BOPBiome this.addGenerator("sprouts", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.8F).with(BOPPlants.SPROUT).create()); // water plants - this.addGenerator("lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(Blocks.waterlily.getDefaultState()).create()); + this.addGenerator("lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(Blocks.WATERLILY.getDefaultState()).create()); this.addGenerator("medium_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(BlockBOPLilypad.LilypadType.MEDIUM).create()); this.addGenerator("small_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(BlockBOPLilypad.LilypadType.SMALL).create()); this.addGenerator("tiny_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(BlockBOPLilypad.LilypadType.TINY).create()); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenColdDesert.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenColdDesert.java index 83da02ba2..31da77ccd 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenColdDesert.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenColdDesert.java @@ -8,8 +8,6 @@ package biomesoplenty.common.biome.overworld; -import java.util.Random; - import biomesoplenty.api.biome.BOPBiome; import biomesoplenty.api.biome.generation.GeneratorStage; import biomesoplenty.api.block.BOPBlocks; @@ -29,6 +27,8 @@ import net.minecraft.init.Blocks; import net.minecraft.world.World; import net.minecraft.world.chunk.ChunkPrimer; +import java.util.Random; + public class BiomeGenColdDesert extends BOPBiome { @@ -45,10 +45,10 @@ public class BiomeGenColdDesert extends BOPBiome // terrain this.terrainSettings.avgHeight(64).heightVariation(5, 10).sidewaysNoise(0.7D); - this.topBlock = Blocks.gravel.getDefaultState(); - this.fillerBlock = Blocks.stone.getDefaultState(); + this.topBlock = Blocks.GRAVEL.getDefaultState(); + this.fillerBlock = Blocks.STONE.getDefaultState(); this.usualTopBlock = this.topBlock; - this.alternateTopBlock = Blocks.snow.getDefaultState(); + this.alternateTopBlock = Blocks.SNOW.getDefaultState(); this.canGenerateRivers = false; @@ -57,9 +57,9 @@ public class BiomeGenColdDesert extends BOPBiome this.spawnableCreatureList.clear(); // gravel, stone and boulders - IBlockPosQuery surface = new BlockQueryBlock(Blocks.stone, Blocks.gravel); - this.addGenerator("stone_patches", GeneratorStage.SAND, (new GeneratorSplotches.Builder()).amountPerChunk(6).splotchSize(24).placeOn(surface).replace(surface).with(Blocks.stone.getDefaultState()).scatterYMethod(ScatterYMethod.AT_SURFACE).create()); - this.addGenerator("boulders", GeneratorStage.SAND_PASS2, (new GeneratorBlobs.Builder()).amountPerChunk(0.2F).placeOn(surface).with(Blocks.cobblestone.getDefaultState()).minRadius(0.3F).maxRadius(3.2F).numBalls(4).scatterYMethod(ScatterYMethod.AT_SURFACE).create()); + IBlockPosQuery surface = new BlockQueryBlock(Blocks.STONE, Blocks.GRAVEL); + this.addGenerator("stone_patches", GeneratorStage.SAND, (new GeneratorSplotches.Builder()).amountPerChunk(6).splotchSize(24).placeOn(surface).replace(surface).with(Blocks.STONE.getDefaultState()).scatterYMethod(ScatterYMethod.AT_SURFACE).create()); + this.addGenerator("boulders", GeneratorStage.SAND_PASS2, (new GeneratorBlobs.Builder()).amountPerChunk(0.2F).placeOn(surface).with(Blocks.COBBLESTONE.getDefaultState()).minRadius(0.3F).maxRadius(3.2F).numBalls(4).scatterYMethod(ScatterYMethod.AT_SURFACE).create()); this.addGenerator("hard_ice_splatter", GeneratorStage.SAND, (new GeneratorSplatter.Builder()).amountPerChunk(1.0F).replace(surface).with(BOPBlocks.hard_ice.getDefaultState()).create()); // gem diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenConiferousForest.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenConiferousForest.java index 12bd5019f..8a187b52c 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenConiferousForest.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenConiferousForest.java @@ -53,7 +53,7 @@ public class BiomeGenConiferousForest extends BOPBiome this.spawnableCreatureList.add(new SpawnListEntry(EntityWolf.class, 8, 4, 4)); // gravel - this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(4).maxRadius(7).with(Blocks.gravel.getDefaultState()).create()); + this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(4).maxRadius(7).with(Blocks.GRAVEL.getDefaultState()).create()); // trees GeneratorWeighted treeGenerator = new GeneratorWeighted(8.0F); @@ -76,8 +76,8 @@ public class BiomeGenConiferousForest extends BOPBiome this.addGenerator("flat_mushroom", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(BlockBOPMushroom.MushroomType.FLAT_MUSHROOM).create()); this.addGenerator("toadstools", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.4F).with(BlockBOPMushroom.MushroomType.TOADSTOOL).create()); this.addGenerator("blue_milk_caps", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(BlockBOPMushroom.MushroomType.BLUE_MILK_CAP).create()); - this.addGenerator("brown_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(Blocks.brown_mushroom.getDefaultState()).create()); - this.addGenerator("red_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(Blocks.red_mushroom.getDefaultState()).create()); + this.addGenerator("brown_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(Blocks.BROWN_MUSHROOM.getDefaultState()).create()); + this.addGenerator("red_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(Blocks.RED_MUSHROOM.getDefaultState()).create()); // water plants this.addGenerator("water_reeds", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.8F).with(BOPPlants.REED).generationAttempts(32).create()); @@ -115,7 +115,7 @@ public class BiomeGenConiferousForest extends BOPBiome if (!settings.generateBopMushrooms) {this.removeGenerator("toadstools"); this.removeGenerator("flat_mushroom"); this.removeGenerator("blue_milk_caps"); this.removeGenerator("portobellos");} - if (!settings.generateBopSoils) {this.topBlock = Blocks.grass.getDefaultState(); this.fillerBlock = Blocks.dirt.getDefaultState();} + if (!settings.generateBopSoils) {this.topBlock = Blocks.GRASS.getDefaultState(); this.fillerBlock = Blocks.DIRT.getDefaultState();} if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenCoralReef.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenCoralReef.java index 064ebcdd3..aa1867830 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenCoralReef.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenCoralReef.java @@ -34,16 +34,16 @@ public class BiomeGenCoralReef extends BOPBiome this.canGenerateVillages = false; this.canGenerateRivers = false; - this.beachBiomeLocation = BiomeUtils.getLocForBiome(Biomes.beach); + this.beachBiomeLocation = BiomeUtils.getLocForBiome(Biomes.BEACH); clearWeights(); // coral - this.addGenerator("pink_coral", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(15.0F).replace(Blocks.water).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.PINK)).scatterYMethod(ScatterYMethod.AT_GROUND).create()); - this.addGenerator("orange_coral", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(15.0F).replace(Blocks.water).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.ORANGE)).scatterYMethod(ScatterYMethod.AT_GROUND).create()); - this.addGenerator("blue_coral", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(15.0F).replace(Blocks.water).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.BLUE)).scatterYMethod(ScatterYMethod.AT_GROUND).create()); - this.addGenerator("glowing_coral", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(15.0F).replace(Blocks.water).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.GLOWING)).scatterYMethod(ScatterYMethod.AT_GROUND).create()); - this.addGenerator("algae", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(3.0F).replace(Blocks.water).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.ALGAE)).scatterYMethod(ScatterYMethod.AT_GROUND).create()); + this.addGenerator("pink_coral", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(15.0F).replace(Blocks.WATER).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.PINK)).scatterYMethod(ScatterYMethod.AT_GROUND).create()); + this.addGenerator("orange_coral", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(15.0F).replace(Blocks.WATER).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.ORANGE)).scatterYMethod(ScatterYMethod.AT_GROUND).create()); + this.addGenerator("blue_coral", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(15.0F).replace(Blocks.WATER).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.BLUE)).scatterYMethod(ScatterYMethod.AT_GROUND).create()); + this.addGenerator("glowing_coral", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(15.0F).replace(Blocks.WATER).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.GLOWING)).scatterYMethod(ScatterYMethod.AT_GROUND).create()); + this.addGenerator("algae", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(3.0F).replace(Blocks.WATER).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.ALGAE)).scatterYMethod(ScatterYMethod.AT_GROUND).create()); // gem this.addGenerator("sapphire", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(BOPGems.SAPPHIRE).create()); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenCrag.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenCrag.java index 96564b4a6..12c2baae9 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenCrag.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenCrag.java @@ -43,7 +43,7 @@ public class BiomeGenCrag extends BOPBiome this.avgDirtDepth = 8; // gem - this.addGenerator("emeralds", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(Blocks.emerald_ore.getDefaultState()).create()); + this.addGenerator("emeralds", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(Blocks.EMERALD_ORE.getDefaultState()).create()); } diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenDeadForest.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenDeadForest.java index 170b604e5..117c7d5d7 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenDeadForest.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenDeadForest.java @@ -55,14 +55,14 @@ public class BiomeGenDeadForest extends BOPBiome this.addWeight(BOPClimates.BOREAL, 3); // gravel - this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(4).maxRadius(7).with(Blocks.gravel.getDefaultState()).create()); + this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(4).maxRadius(7).with(Blocks.GRAVEL.getDefaultState()).create()); // trees GeneratorWeighted treeGenerator = new GeneratorWeighted(3); this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); treeGenerator.add("spruce", 3, (new GeneratorTaigaTree.Builder()).minHeight(6).maxHeight(16).create()); // TODO: implement pine cones treeGenerator.add("dying_tree", 5, (new GeneratorBigTree.Builder()).minHeight(5).maxHeight(12).foliageHeight(2).leaves(BOPTrees.DEAD).create()); - treeGenerator.add("dead_tree", 2, (new GeneratorBigTree.Builder()).minHeight(5).maxHeight(12).foliageHeight(0).foliageDensity(0.5D).log(BOPWoods.DEAD).leaves(Blocks.air.getDefaultState()).create()); + treeGenerator.add("dead_tree", 2, (new GeneratorBigTree.Builder()).minHeight(5).maxHeight(12).foliageHeight(0).foliageDensity(0.5D).log(BOPWoods.DEAD).leaves(Blocks.AIR.getDefaultState()).create()); // other plants this.addGenerator("thorns", GeneratorStage.FLOWERS, (new GeneratorFlora.Builder()).amountPerChunk(0.3F).with(BOPPlants.THORN).create()); @@ -90,7 +90,7 @@ public class BiomeGenDeadForest extends BOPBiome if (!settings.generateBopGems) {this.removeGenerator("tanzanite");} if (!settings.generateThorns) {this.removeGenerator("thorns");} - if (!settings.generateBopSoils) {this.topBlock = Blocks.grass.getDefaultState(); this.fillerBlock = Blocks.dirt.getDefaultState();} + if (!settings.generateBopSoils) {this.topBlock = Blocks.GRASS.getDefaultState(); this.fillerBlock = Blocks.DIRT.getDefaultState();} if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} @@ -105,7 +105,7 @@ public class BiomeGenDeadForest extends BOPBiome this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); treeGenerator.add("spruce", 3, (new GeneratorTaigaTree.Builder()).minHeight(6).maxHeight(16).create()); // TODO: implement pine cones treeGenerator.add("dying_tree", 5, (new GeneratorBigTree.Builder()).minHeight(5).maxHeight(12).foliageHeight(2).leaves(BlockPlanks.EnumType.OAK).create()); - treeGenerator.add("dead_tree", 2, (new GeneratorBigTree.Builder()).minHeight(5).maxHeight(12).foliageHeight(0).foliageDensity(0.5D).log(BlockPlanks.EnumType.DARK_OAK).leaves(Blocks.air.getDefaultState()).create()); + treeGenerator.add("dead_tree", 2, (new GeneratorBigTree.Builder()).minHeight(5).maxHeight(12).foliageHeight(0).foliageDensity(0.5D).log(BlockPlanks.EnumType.DARK_OAK).leaves(Blocks.AIR.getDefaultState()).create()); } GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenDeadSwamp.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenDeadSwamp.java index 2298279fa..0d9b0fcd9 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenDeadSwamp.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenDeadSwamp.java @@ -63,7 +63,7 @@ public class BiomeGenDeadSwamp extends BOPBiome GeneratorWeighted treeGenerator = new GeneratorWeighted(0.6F); this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); treeGenerator.add("dying_tree", 2, (new GeneratorBigTree.Builder()).minHeight(5).maxHeight(12).foliageHeight(1).log(BOPWoods.DEAD).leaves(BOPTrees.DEAD).create()); - treeGenerator.add("dead_tree", 1, (new GeneratorBigTree.Builder()).minHeight(5).maxHeight(12).foliageHeight(0).foliageDensity(0.5D).log(BOPWoods.DEAD).leaves(Blocks.air.getDefaultState()).create()); + treeGenerator.add("dead_tree", 1, (new GeneratorBigTree.Builder()).minHeight(5).maxHeight(12).foliageHeight(0).foliageDensity(0.5D).log(BOPWoods.DEAD).leaves(Blocks.AIR.getDefaultState()).create()); // other plants this.addGenerator("koru", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(BOPPlants.KORU).create()); @@ -71,7 +71,7 @@ public class BiomeGenDeadSwamp extends BOPBiome // water plants this.addGenerator("river_cane", GeneratorStage.FLOWERS,(new GeneratorColumns.Builder()).amountPerChunk(0.3F).generationAttempts(24).placeOn(BlockQueries.litFertileWaterside).with(BlockBOPPlant.paging.getVariantState(BOPPlants.RIVERCANE)).minHeight(1).maxHeight(3).create()); this.addGenerator("water_reeds", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BOPPlants.REED).generationAttempts(32).create()); - this.addGenerator("algae", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).replace(Blocks.water).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.ALGAE)).generationAttempts(32).scatterYMethod(ScatterYMethod.AT_GROUND).create()); + this.addGenerator("algae", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).replace(Blocks.WATER).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.ALGAE)).generationAttempts(32).scatterYMethod(ScatterYMethod.AT_GROUND).create()); // grasses GeneratorWeighted grassGenerator = new GeneratorWeighted(2.0F); @@ -92,7 +92,7 @@ public class BiomeGenDeadSwamp extends BOPBiome { if (!settings.generateBopGems) {this.removeGenerator("malachite");} - if (!settings.generateBopSoils) {this.topBlock = Blocks.grass.getDefaultState(); this.fillerBlock = Blocks.dirt.getDefaultState();} + if (!settings.generateBopSoils) {this.topBlock = Blocks.GRASS.getDefaultState(); this.fillerBlock = Blocks.DIRT.getDefaultState();} if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} @@ -106,7 +106,7 @@ public class BiomeGenDeadSwamp extends BOPBiome GeneratorWeighted treeGenerator = new GeneratorWeighted(0.6F); this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); treeGenerator.add("dying_tree", 2, (new GeneratorBigTree.Builder()).minHeight(5).maxHeight(12).foliageHeight(1).log(BlockPlanks.EnumType.DARK_OAK).leaves(BlockPlanks.EnumType.DARK_OAK).create()); - treeGenerator.add("dead_tree", 1, (new GeneratorBigTree.Builder()).minHeight(5).maxHeight(12).foliageHeight(0).foliageDensity(0.5D).log(BlockPlanks.EnumType.DARK_OAK).leaves(Blocks.air.getDefaultState()).create()); + treeGenerator.add("dead_tree", 1, (new GeneratorBigTree.Builder()).minHeight(5).maxHeight(12).foliageHeight(0).foliageDensity(0.5D).log(BlockPlanks.EnumType.DARK_OAK).leaves(Blocks.AIR.getDefaultState()).create()); } GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenDummyTemplate.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenDummyTemplate.java index af090cb1c..6c1c0bb1a 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenDummyTemplate.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenDummyTemplate.java @@ -55,7 +55,7 @@ public class BiomeGenDummyTemplate extends BOPBiome this.addWeight(BOPClimates.COOL_TEMPERATE, 10); // gravel - this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(4).maxRadius(7).with(Blocks.gravel.getDefaultState()).create()); + this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(4).maxRadius(7).with(Blocks.GRAVEL.getDefaultState()).create()); // mud this.addGenerator("mud", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(BOPBlocks.mud.getDefaultState()).create()); @@ -103,13 +103,13 @@ public class BiomeGenDummyTemplate extends BOPBiome this.addGenerator("tall_cattails", GeneratorStage.FLOWERS, (new GeneratorDoubleFlora.Builder()).amountPerChunk(0.5F).with(BlockBOPDoublePlant.DoublePlantType.TALL_CATTAIL).create()); this.addGenerator("tall_ferns", GeneratorStage.FLOWERS, (new GeneratorDoubleFlora.Builder()).amountPerChunk(0.5F).with(BlockDoublePlant.EnumPlantType.FERN).create()); this.addGenerator("river_cane", GeneratorStage.FLOWERS,(new GeneratorColumns.Builder()).amountPerChunk(0.5F).placeOn(BlockQueries.litFertileWaterside).with(BlockBOPPlant.paging.getVariantState(BOPPlants.RIVERCANE)).minHeight(1).maxHeight(3).create()); - this.addGenerator("sugar_cane", GeneratorStage.FLOWERS,(new GeneratorColumns.Builder()).amountPerChunk(0.5F).placeOn(BlockQueries.litFertileWaterside).with(Blocks.reeds.getDefaultState()).minHeight(1).maxHeight(3).create()); + this.addGenerator("sugar_cane", GeneratorStage.FLOWERS,(new GeneratorColumns.Builder()).amountPerChunk(0.5F).placeOn(BlockQueries.litFertileWaterside).with(Blocks.REEDS.getDefaultState()).minHeight(1).maxHeight(3).create()); // TODO root // water plants this.addGenerator("water_reeds", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BOPPlants.REED).generationAttempts(32).create()); this.addGenerator("mixed_lily", GeneratorStage.LILYPAD, (new GeneratorMixedLily.Builder()).amountPerChunk(0.5F).create()); - this.addGenerator("algae", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).replace(Blocks.water).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.ALGAE)).scatterYMethod(ScatterYMethod.AT_GROUND).create()); + this.addGenerator("algae", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).replace(Blocks.WATER).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.ALGAE)).scatterYMethod(ScatterYMethod.AT_GROUND).create()); // flowers GeneratorWeighted flowerGenerator = new GeneratorWeighted(1.0F); @@ -152,8 +152,8 @@ public class BiomeGenDummyTemplate extends BOPBiome flowerGenerator.add("syringas", 1, (new GeneratorDoubleFlora.Builder()).with(BlockDoublePlant.EnumPlantType.SYRINGA).create()); // shrooms - this.addGenerator("brown_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(Blocks.brown_mushroom.getDefaultState()).create()); - this.addGenerator("red_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(Blocks.red_mushroom.getDefaultState()).create()); + this.addGenerator("brown_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(Blocks.BROWN_MUSHROOM.getDefaultState()).create()); + this.addGenerator("red_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(Blocks.RED_MUSHROOM.getDefaultState()).create()); this.addGenerator("blue_milk_caps", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(BlockBOPMushroom.MushroomType.BLUE_MILK_CAP).create()); this.addGenerator("flat_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(BlockBOPMushroom.MushroomType.FLAT_MUSHROOM).create()); this.addGenerator("glowshrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(BlockBOPMushroom.MushroomType.GLOWSHROOM).create()); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenEucalyptusForest.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenEucalyptusForest.java index 1e44dd883..16249dfd8 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenEucalyptusForest.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenEucalyptusForest.java @@ -73,10 +73,10 @@ public class BiomeGenEucalyptusForest extends BOPBiome this.addGenerator("bushes", GeneratorStage.FLOWERS, (new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(BOPPlants.BUSH).create()); this.addGenerator("shrubs", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(BOPPlants.SHRUB).create()); this.addGenerator("rafflesia", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(BOPPlants.RAFFLESIA).create()); - this.addGenerator("melons", GeneratorStage.FLOWERS, (new GeneratorFlora.Builder()).amountPerChunk(0.015625F).placeOn(this.topBlock).with(Blocks.melon_block.getDefaultState()).create()); + this.addGenerator("melons", GeneratorStage.FLOWERS, (new GeneratorFlora.Builder()).amountPerChunk(0.015625F).placeOn(this.topBlock).with(Blocks.MELON_BLOCK.getDefaultState()).create()); // water plants - this.addGenerator("lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(Blocks.waterlily.getDefaultState()).create()); + this.addGenerator("lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(Blocks.WATERLILY.getDefaultState()).create()); this.addGenerator("medium_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.3F).with(BlockBOPLilypad.LilypadType.MEDIUM).create()); this.addGenerator("small_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BlockBOPLilypad.LilypadType.SMALL).create()); this.addGenerator("tiny_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BlockBOPLilypad.LilypadType.TINY).create()); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenFen.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenFen.java index 34acd6b32..2031f0985 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenFen.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenFen.java @@ -73,7 +73,7 @@ public class BiomeGenFen extends BOPBiome // TODO: this.theBiomeDecorator.bopFeatures.waterSpringsPerChunk = 99; // gravel - this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(4).maxRadius(7).with(Blocks.gravel.getDefaultState()).create()); + this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(4).maxRadius(7).with(Blocks.GRAVEL.getDefaultState()).create()); // mud this.addGenerator("mud", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(BOPBlocks.mud.getDefaultState()).create()); @@ -83,7 +83,7 @@ public class BiomeGenFen extends BOPBiome this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); treeGenerator.add("dark_oak_taiga", 5, (new GeneratorTaigaTree.Builder()).log(BlockPlanks.EnumType.DARK_OAK).maxHeight(14).leaves(BlockPlanks.EnumType.DARK_OAK).create()); treeGenerator.add("dying", 10, (new GeneratorTaigaTree.Builder()).log(BlockPlanks.EnumType.DARK_OAK).maxHeight(14).leaves(BOPTrees.DEAD).create()); - treeGenerator.add("dead", 1, (new GeneratorBigTree.Builder()).log(BOPWoods.DEAD).leaves(Blocks.air.getDefaultState()).maxHeight(14).create()); + treeGenerator.add("dead", 1, (new GeneratorBigTree.Builder()).log(BOPWoods.DEAD).leaves(Blocks.AIR.getDefaultState()).maxHeight(14).create()); // grasses GeneratorWeighted grassGenerator = new GeneratorWeighted(2.5F); @@ -110,19 +110,19 @@ public class BiomeGenFen extends BOPBiome // water plants this.addGenerator("water_reeds", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(1.0F).with(BOPPlants.REED).generationAttempts(32).create()); - this.addGenerator("lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(Blocks.waterlily.getDefaultState()).create()); + this.addGenerator("lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(Blocks.WATERLILY.getDefaultState()).create()); this.addGenerator("medium_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BlockBOPLilypad.LilypadType.MEDIUM).create()); this.addGenerator("small_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BlockBOPLilypad.LilypadType.SMALL).create()); this.addGenerator("tiny_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BlockBOPLilypad.LilypadType.TINY).create()); - this.addGenerator("algae", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(3.0F).replace(Blocks.water).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.ALGAE)).generationAttempts(32).scatterYMethod(ScatterYMethod.AT_GROUND).create()); + this.addGenerator("algae", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(3.0F).replace(Blocks.WATER).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.ALGAE)).generationAttempts(32).scatterYMethod(ScatterYMethod.AT_GROUND).create()); this.addGenerator("flower_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(BlockBOPLilypad.LilypadType.FLOWER).create()); // shrooms this.addGenerator("flat_mushroom", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(BlockBOPMushroom.MushroomType.FLAT_MUSHROOM).create()); this.addGenerator("toadstools", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(BlockBOPMushroom.MushroomType.TOADSTOOL).create()); this.addGenerator("portobellos", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(BlockBOPMushroom.MushroomType.PORTOBELLO).create()); - this.addGenerator("brown_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.4F).with(Blocks.brown_mushroom.getDefaultState()).create()); - this.addGenerator("red_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.4F).with(Blocks.red_mushroom.getDefaultState()).create()); + this.addGenerator("brown_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.4F).with(Blocks.BROWN_MUSHROOM.getDefaultState()).create()); + this.addGenerator("red_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.4F).with(Blocks.RED_MUSHROOM.getDefaultState()).create()); // gem this.addGenerator("malachite", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(BOPGems.MALACHITE).create()); @@ -134,7 +134,7 @@ public class BiomeGenFen extends BOPBiome { if (!settings.generateBopGems) {this.removeGenerator("malachite");} - if (!settings.generateBopSoils) {this.topBlock = Blocks.grass.getDefaultState(); this.fillerBlock = Blocks.dirt.getDefaultState();} + if (!settings.generateBopSoils) {this.topBlock = Blocks.GRASS.getDefaultState(); this.fillerBlock = Blocks.DIRT.getDefaultState();} if (!settings.generateBopMushrooms) {this.removeGenerator("toadstools"); this.removeGenerator("flat_mushroom"); this.removeGenerator("blue_milk_caps"); this.removeGenerator("portobellos");} @@ -151,7 +151,7 @@ public class BiomeGenFen extends BOPBiome this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); treeGenerator.add("dark_oak_taiga", 5, (new GeneratorTaigaTree.Builder()).log(BlockPlanks.EnumType.DARK_OAK).maxHeight(14).leaves(BlockPlanks.EnumType.DARK_OAK).create()); treeGenerator.add("dying", 10, (new GeneratorTaigaTree.Builder()).log(BlockPlanks.EnumType.DARK_OAK).maxHeight(14).leaves(BlockPlanks.EnumType.DARK_OAK).create()); - treeGenerator.add("dead", 1, (new GeneratorBigTree.Builder()).log(BlockPlanks.EnumType.DARK_OAK).leaves(Blocks.air.getDefaultState()).maxHeight(14).create()); + treeGenerator.add("dead", 1, (new GeneratorBigTree.Builder()).log(BlockPlanks.EnumType.DARK_OAK).leaves(Blocks.AIR.getDefaultState()).maxHeight(14).create()); } GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenFlowerIsland.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenFlowerIsland.java index 61b71d8bb..41444e3b8 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenFlowerIsland.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenFlowerIsland.java @@ -62,7 +62,7 @@ public class BiomeGenFlowerIsland extends BOPBiome // regular grass IBlockPosQuery emptyGrass = BlockQuery.buildAnd().withAirAbove().states(this.topBlock).create(); - this.addGenerator("grass_splatter", GeneratorStage.SAND, (new GeneratorSplatter.Builder()).amountPerChunk(6.0F).replace(emptyGrass).with(Blocks.grass.getDefaultState()).create()); + this.addGenerator("grass_splatter", GeneratorStage.SAND, (new GeneratorSplatter.Builder()).amountPerChunk(6.0F).replace(emptyGrass).with(Blocks.GRASS.getDefaultState()).create()); // trees GeneratorWeighted treeGenerator = new GeneratorWeighted(1); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenGlacier.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenGlacier.java index c8aee913f..641c2017f 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenGlacier.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenGlacier.java @@ -26,7 +26,7 @@ public class BiomeGenGlacier extends BOPBiome // terrain this.terrainSettings.avgHeight(88).heightVariation(8, 10).octaves(0, 1, 1, 3, 1, 0); - this.topBlock = Blocks.ice.getDefaultState(); + this.topBlock = Blocks.ICE.getDefaultState(); this.fillerBlock = BOPBlocks.hard_ice.getDefaultState(); this.avgDirtDepth = 16; diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenGrassland.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenGrassland.java index 41a1a4511..96948df70 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenGrassland.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenGrassland.java @@ -59,12 +59,12 @@ public class BiomeGenGrassland extends BOPBiome { this.addGenerator("lakes", GeneratorStage.SAND, (new GeneratorLakes.Builder()).amountPerChunk(0.2F).waterLakeForBiome(this).create()); // sand and gravel - this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.sand.getDefaultState()).create()); - this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(4).maxRadius(7).with(Blocks.gravel.getDefaultState()).create()); + this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.SAND.getDefaultState()).create()); + this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(4).maxRadius(7).with(Blocks.GRAVEL.getDefaultState()).create()); // other plants this.addGenerator("river_cane", GeneratorStage.FLOWERS,(new GeneratorColumns.Builder()).amountPerChunk(1.0F).generationAttempts(24).placeOn(BlockQueries.litFertileWaterside).with(BlockBOPPlant.paging.getVariantState(BOPPlants.RIVERCANE)).minHeight(1).maxHeight(3).create()); - this.addGenerator("sugar_cane", GeneratorStage.FLOWERS,(new GeneratorColumns.Builder()).amountPerChunk(4.0F).generationAttempts(24).placeOn(BlockQueries.litFertileWaterside).with(Blocks.reeds.getDefaultState()).minHeight(1).maxHeight(3).create()); + this.addGenerator("sugar_cane", GeneratorStage.FLOWERS,(new GeneratorColumns.Builder()).amountPerChunk(4.0F).generationAttempts(24).placeOn(BlockQueries.litFertileWaterside).with(Blocks.REEDS.getDefaultState()).minHeight(1).maxHeight(3).create()); this.addGenerator("flax", GeneratorStage.FLOWERS,(new GeneratorDoubleFlora.Builder()).amountPerChunk(0.1F).with(BlockBOPDoublePlant.DoublePlantType.FLAX).generationAttempts(6).create()); // water plants diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenGravelBeach.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenGravelBeach.java index 863797b85..5ba54e7a5 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenGravelBeach.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenGravelBeach.java @@ -33,7 +33,7 @@ public class BiomeGenGravelBeach extends BOPBiome clearWeights(); - this.topBlock = Blocks.gravel.getDefaultState(); - this.fillerBlock = Blocks.gravel.getDefaultState(); + this.topBlock = Blocks.GRAVEL.getDefaultState(); + this.fillerBlock = Blocks.GRAVEL.getDefaultState(); } } diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenHeathland.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenHeathland.java index 61642f81e..3a772f0ff 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenHeathland.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenHeathland.java @@ -53,8 +53,8 @@ public class BiomeGenHeathland extends BOPBiome this.spawnableCreatureList.add(new SpawnListEntry(EntityHorse.class, 1, 2, 6)); // sand and gravel - this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.sand.getDefaultState()).create()); - this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(4).maxRadius(7).with(Blocks.gravel.getDefaultState()).create()); + this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.SAND.getDefaultState()).create()); + this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(4).maxRadius(7).with(Blocks.GRAVEL.getDefaultState()).create()); // flowers GeneratorWeighted flowerGenerator = new GeneratorWeighted(3.0F); @@ -74,11 +74,11 @@ public class BiomeGenHeathland extends BOPBiome grassGenerator.add("dampgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.DAMPGRASS).create()); // trees - IBlockPosQuery suitableTreePosition = BlockQuery.buildAnd().withAltitudeBetween(77, 90).materials(Material.ground, Material.grass).create(); + IBlockPosQuery suitableTreePosition = BlockQuery.buildAnd().withAltitudeBetween(77, 90).materials(Material.GROUND, Material.GRASS).create(); GeneratorWeighted treeGenerator = new GeneratorWeighted(12); this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); - treeGenerator.add("red_bush", 7, (new GeneratorFlora.Builder()).placeOn(this.topBlock).replace(Material.air).withNonDecayingLeaf(BOPTrees.MAPLE).create()); - treeGenerator.add("small_bush", 11, (new GeneratorFlora.Builder()).placeOn(this.topBlock).replace(Material.air).withNonDecayingLeaf(BlockPlanks.EnumType.OAK).create()); + treeGenerator.add("red_bush", 7, (new GeneratorFlora.Builder()).placeOn(this.topBlock).replace(Material.AIR).withNonDecayingLeaf(BOPTrees.MAPLE).create()); + treeGenerator.add("small_bush", 11, (new GeneratorFlora.Builder()).placeOn(this.topBlock).replace(Material.AIR).withNonDecayingLeaf(BlockPlanks.EnumType.OAK).create()); treeGenerator.add("oak_bush", 3, (new GeneratorBush.Builder()).maxHeight(2).create()); treeGenerator.add("oak", 2, (new GeneratorBasicTree.Builder()).minHeight(3).maxHeight(5).create()); treeGenerator.add("decaying_tree", 1, (new GeneratorBigTree.Builder()).amountPerChunk(1.0F).minHeight(5).maxHeight(12).foliageHeight(2).create()); @@ -105,7 +105,7 @@ public class BiomeGenHeathland extends BOPBiome if (!settings.generateThorns) {this.removeGenerator("thorns");} - if (!settings.generateBopSoils) {this.topBlock = Blocks.grass.getDefaultState(); this.fillerBlock = Blocks.dirt.getDefaultState();} + if (!settings.generateBopSoils) {this.topBlock = Blocks.GRASS.getDefaultState(); this.fillerBlock = Blocks.DIRT.getDefaultState();} if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} @@ -116,11 +116,11 @@ public class BiomeGenHeathland extends BOPBiome GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); if (!settings.generateBopTrees) {this.removeGenerator("trees"); - IBlockPosQuery suitableTreePosition = BlockQuery.buildAnd().withAltitudeBetween(77, 90).materials(Material.ground, Material.grass).create(); + IBlockPosQuery suitableTreePosition = BlockQuery.buildAnd().withAltitudeBetween(77, 90).materials(Material.GROUND, Material.GRASS).create(); GeneratorWeighted treeGenerator = new GeneratorWeighted(12); this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); - treeGenerator.add("red_bush", 7, (new GeneratorFlora.Builder()).placeOn(this.topBlock).replace(Material.air).withNonDecayingLeaf(BlockPlanks.EnumType.BIRCH).create()); - treeGenerator.add("small_bush", 11, (new GeneratorFlora.Builder()).placeOn(this.topBlock).replace(Material.air).withNonDecayingLeaf(BlockPlanks.EnumType.OAK).create()); + treeGenerator.add("red_bush", 7, (new GeneratorFlora.Builder()).placeOn(this.topBlock).replace(Material.AIR).withNonDecayingLeaf(BlockPlanks.EnumType.BIRCH).create()); + treeGenerator.add("small_bush", 11, (new GeneratorFlora.Builder()).placeOn(this.topBlock).replace(Material.AIR).withNonDecayingLeaf(BlockPlanks.EnumType.OAK).create()); treeGenerator.add("oak_bush", 3, (new GeneratorBush.Builder()).maxHeight(2).create()); treeGenerator.add("oak", 2, (new GeneratorBasicTree.Builder()).minHeight(3).maxHeight(5).create()); treeGenerator.add("decaying_tree", 1, (new GeneratorBigTree.Builder()).amountPerChunk(1.0F).minHeight(5).maxHeight(12).foliageHeight(2).create()); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenHighland.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenHighland.java index 1716b5a09..0cfeb4024 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenHighland.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenHighland.java @@ -41,8 +41,8 @@ public class BiomeGenHighland extends BOPBiome this.beachBiomeLocation = null; // boulders - this.addGenerator("boulders", GeneratorStage.SAND, (new GeneratorBlobs.Builder()).amountPerChunk(0.5F).placeOn(Blocks.grass).with(Blocks.cobblestone.getDefaultState()).minRadius(0.3F).maxRadius(1.2F).numBalls(1).scatterYMethod(ScatterYMethod.AT_SURFACE).create()); - this.addGenerator("big_boulders", GeneratorStage.SAND, (new GeneratorBlobs.Builder()).amountPerChunk(0.1F).placeOn(Blocks.grass).with(Blocks.cobblestone.getDefaultState()).minRadius(0.3F).maxRadius(4.0F).numBalls(3).scatterYMethod(ScatterYMethod.AT_SURFACE).create()); + this.addGenerator("boulders", GeneratorStage.SAND, (new GeneratorBlobs.Builder()).amountPerChunk(0.5F).placeOn(Blocks.GRASS).with(Blocks.COBBLESTONE.getDefaultState()).minRadius(0.3F).maxRadius(1.2F).numBalls(1).scatterYMethod(ScatterYMethod.AT_SURFACE).create()); + this.addGenerator("big_boulders", GeneratorStage.SAND, (new GeneratorBlobs.Builder()).amountPerChunk(0.1F).placeOn(Blocks.GRASS).with(Blocks.COBBLESTONE.getDefaultState()).minRadius(0.3F).maxRadius(4.0F).numBalls(3).scatterYMethod(ScatterYMethod.AT_SURFACE).create()); // grasses GeneratorWeighted grassGenerator = new GeneratorWeighted(10); @@ -55,7 +55,7 @@ public class BiomeGenHighland extends BOPBiome grassGenerator.add("doublegrass", 4, (new GeneratorDoubleFlora.Builder()).with(BlockDoublePlant.EnumPlantType.GRASS).create()); // gem - this.addGenerator("emerald", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(Blocks.emerald_ore.getDefaultState()).create()); + this.addGenerator("emerald", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(Blocks.EMERALD_ORE.getDefaultState()).create()); } diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenKelpForest.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenKelpForest.java index 0b5892fad..acfe1d0ea 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenKelpForest.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenKelpForest.java @@ -22,7 +22,6 @@ import biomesoplenty.common.world.feature.GeneratorFlora; import biomesoplenty.common.world.feature.GeneratorOreSingle; import net.minecraft.init.Biomes; import net.minecraft.init.Blocks; -import net.minecraft.world.biome.BiomeGenBase; public class BiomeGenKelpForest extends BOPBiome { @@ -37,12 +36,12 @@ public class BiomeGenKelpForest extends BOPBiome this.canGenerateVillages = false; this.canGenerateRivers = false; - this.beachBiomeLocation = BiomeUtils.getLocForBiome(Biomes.ocean); + this.beachBiomeLocation = BiomeUtils.getLocForBiome(Biomes.OCEAN); clearWeights(); // algae - this.addGenerator("algae", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(3.0F).replace(Blocks.water).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.ALGAE)).scatterYMethod(ScatterYMethod.AT_GROUND).create()); + this.addGenerator("algae", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(3.0F).replace(Blocks.WATER).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.ALGAE)).scatterYMethod(ScatterYMethod.AT_GROUND).create()); // kelp this.addGenerator("kelp", GeneratorStage.LILYPAD, (new GeneratorColumns.Builder()).amountPerChunk(5.0F).replace(BlockQueries.waterCovered).placeOn(BlockQueries.groundBlocks).with(BOPBlocks.seaweed.getDefaultState()).scatterYMethod(ScatterYMethod.AT_GROUND).create()); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenLandOfLakes.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenLandOfLakes.java index a72ffa3dc..635d75841 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenLandOfLakes.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenLandOfLakes.java @@ -65,7 +65,7 @@ public class BiomeGenLandOfLakes extends BOPBiome this.spawnableCreatureList.add(new SpawnListEntry(EntitySnail.class, 8, 1, 2)); // gravel - this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(4).maxRadius(7).with(Blocks.gravel.getDefaultState()).create()); + this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(4).maxRadius(7).with(Blocks.GRAVEL.getDefaultState()).create()); // mud this.addGenerator("mud", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(8).maxRadius(7).with(BOPBlocks.mud.getDefaultState()).create()); @@ -86,11 +86,11 @@ public class BiomeGenLandOfLakes extends BOPBiome this.addGenerator("wild_rice", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(1.0F).with(BOPPlants.WILDRICE).generationAttempts(64).create()); // water plants - this.addGenerator("lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(Blocks.waterlily.getDefaultState()).create()); + this.addGenerator("lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(Blocks.WATERLILY.getDefaultState()).create()); this.addGenerator("medium_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(BlockBOPLilypad.LilypadType.MEDIUM).create()); this.addGenerator("small_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(BlockBOPLilypad.LilypadType.SMALL).create()); this.addGenerator("tiny_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(BlockBOPLilypad.LilypadType.TINY).create()); - this.addGenerator("algae", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(1.0F).replace(Blocks.water).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.ALGAE)).scatterYMethod(ScatterYMethod.AT_GROUND).create()); + this.addGenerator("algae", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(1.0F).replace(Blocks.WATER).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.ALGAE)).scatterYMethod(ScatterYMethod.AT_GROUND).create()); this.addGenerator("water_reeds", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(1.0F).with(BOPPlants.REED).generationAttempts(32).create()); // grasses @@ -113,7 +113,7 @@ public class BiomeGenLandOfLakes extends BOPBiome { if (!settings.generateBopGems) {this.removeGenerator("malachite");} - if (!settings.generateBopSoils) {this.topBlock = Blocks.grass.getDefaultState(); this.fillerBlock = Blocks.dirt.getDefaultState();} + if (!settings.generateBopSoils) {this.topBlock = Blocks.GRASS.getDefaultState(); this.fillerBlock = Blocks.DIRT.getDefaultState();} if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenLushDesert.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenLushDesert.java index 1e00fbf81..79381a3c6 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenLushDesert.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenLushDesert.java @@ -44,8 +44,8 @@ public class BiomeGenLushDesert extends BOPBiome // terrain this.terrainSettings.avgHeight(64).heightVariation(4, 15); - this.topBlock = Blocks.hardened_clay.getDefaultState(); - this.fillerBlock = Blocks.hardened_clay.getDefaultState(); + this.topBlock = Blocks.HARDENED_CLAY.getDefaultState(); + this.fillerBlock = Blocks.HARDENED_CLAY.getDefaultState(); this.canSpawnInBiome = false; this.canGenerateVillages = true; @@ -57,14 +57,14 @@ public class BiomeGenLushDesert extends BOPBiome GeneratorWeighted treeGenerator = new GeneratorWeighted(3); this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); treeGenerator.add("decaying_tree", 4, (new GeneratorBigTree.Builder()).amountPerChunk(1.0F).placeOn(emptyHardenedClay).minHeight(5).log(BlockPlanks.EnumType.ACACIA).leaves(BlockPlanks.EnumType.ACACIA).maxHeight(12).foliageHeight(2).create()); - treeGenerator.add("dead_tree", 2, (new GeneratorBigTree.Builder()).amountPerChunk(0.5F).placeOn(emptyHardenedClay).minHeight(5).maxHeight(12).foliageHeight(0).foliageDensity(0.5D).log(BOPWoods.DEAD).leaves(Blocks.air.getDefaultState()).create()); + treeGenerator.add("dead_tree", 2, (new GeneratorBigTree.Builder()).amountPerChunk(0.5F).placeOn(emptyHardenedClay).minHeight(5).maxHeight(12).foliageHeight(0).foliageDensity(0.5D).log(BOPWoods.DEAD).leaves(Blocks.AIR.getDefaultState()).create()); treeGenerator.add("oak_bush", 5, (new GeneratorBush.Builder()).maxHeight(2).placeOn(emptyHardenedClay).create()); // sand - this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.sand.getDefaultState()).create()); + this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.SAND.getDefaultState()).create()); // oases - this.addGenerator("oases", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(10).maxRadius(7).replace(Blocks.hardened_clay.getDefaultState()).with(Blocks.grass.getDefaultState()).create()); + this.addGenerator("oases", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(10).maxRadius(7).replace(Blocks.HARDENED_CLAY.getDefaultState()).with(Blocks.GRASS.getDefaultState()).create()); // lakes this.addGenerator("lakes", GeneratorStage.SAND, (new GeneratorLakes.Builder()).amountPerChunk(1.5F).waterLakeForBiome(this).create()); @@ -75,8 +75,8 @@ public class BiomeGenLushDesert extends BOPBiome this.addGenerator("leaf_piles", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.75F).with(BOPPlants.LEAFPILE).generationAttempts(32).create()); this.addGenerator("bushes", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.8F).with(BOPPlants.BUSH).create()); this.addGenerator("tiny_cacti", GeneratorStage.FLOWERS, (new GeneratorFlora.Builder()).amountPerChunk(0.9F).with(BOPPlants.TINYCACTUS).create()); - this.addGenerator("dead_bushes", GeneratorStage.FLOWERS, (new GeneratorFlora.Builder()).amountPerChunk(1.0F).with(Blocks.deadbush.getDefaultState()).create()); - this.addGenerator("cacti", GeneratorStage.FLOWERS,(new GeneratorColumns.Builder()).amountPerChunk(1.5F).generationAttempts(3).placeOn(this.topBlock).with(Blocks.cactus.getDefaultState()).minHeight(1).maxHeight(2).create()); + this.addGenerator("dead_bushes", GeneratorStage.FLOWERS, (new GeneratorFlora.Builder()).amountPerChunk(1.0F).with(Blocks.DEADBUSH.getDefaultState()).create()); + this.addGenerator("cacti", GeneratorStage.FLOWERS,(new GeneratorColumns.Builder()).amountPerChunk(1.5F).generationAttempts(3).placeOn(this.topBlock).with(Blocks.CACTUS.getDefaultState()).minHeight(1).maxHeight(2).create()); // flowers GeneratorWeighted flowerGenerator = new GeneratorWeighted(4.0F); @@ -87,7 +87,7 @@ public class BiomeGenLushDesert extends BOPBiome flowerGenerator.add("poppy", 1, (new GeneratorFlora.Builder().with(BlockFlower.EnumFlowerType.POPPY).create())); // water plants - this.addGenerator("algae", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).replace(Blocks.water).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.ALGAE)).scatterYMethod(ScatterYMethod.AT_GROUND).create()); + this.addGenerator("algae", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).replace(Blocks.WATER).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.ALGAE)).scatterYMethod(ScatterYMethod.AT_GROUND).create()); this.addGenerator("water_reeds", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BOPPlants.REED).generationAttempts(32).create()); // grasses (note weighting must be quite high as the grasses will only grow on the splattered grass blocks) @@ -123,7 +123,7 @@ public class BiomeGenLushDesert extends BOPBiome GeneratorWeighted treeGenerator = new GeneratorWeighted(3); this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); treeGenerator.add("decaying_tree", 4, (new GeneratorBigTree.Builder()).amountPerChunk(1.0F).placeOn(emptyHardenedClay).minHeight(5).log(BlockPlanks.EnumType.ACACIA).leaves(BlockPlanks.EnumType.ACACIA).maxHeight(12).foliageHeight(2).create()); - treeGenerator.add("dead_tree", 2, (new GeneratorBigTree.Builder()).amountPerChunk(0.5F).placeOn(emptyHardenedClay).minHeight(5).maxHeight(12).foliageHeight(0).foliageDensity(0.5D).log(BlockPlanks.EnumType.DARK_OAK).leaves(Blocks.air.getDefaultState()).create()); + treeGenerator.add("dead_tree", 2, (new GeneratorBigTree.Builder()).amountPerChunk(0.5F).placeOn(emptyHardenedClay).minHeight(5).maxHeight(12).foliageHeight(0).foliageDensity(0.5D).log(BlockPlanks.EnumType.DARK_OAK).leaves(Blocks.AIR.getDefaultState()).create()); treeGenerator.add("oak_bush", 5, (new GeneratorBush.Builder()).maxHeight(2).placeOn(emptyHardenedClay).create()); } diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenLushSwamp.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenLushSwamp.java index 94a205e41..2305889bb 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenLushSwamp.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenLushSwamp.java @@ -66,7 +66,7 @@ public class BiomeGenLushSwamp extends BOPBiome this.addGenerator("mud", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(1).maxRadius(8).with(BOPBlocks.mud.getDefaultState()).create()); // sand - this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(1).maxRadius(7).with(Blocks.sand.getDefaultState()).create()); + this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(1).maxRadius(7).with(Blocks.SAND.getDefaultState()).create()); // lakes this.addGenerator("poison_lakes", GeneratorStage.SAND, (new GeneratorLakes.Builder()).amountPerChunk(0.1F).waterLakeForBiome(this).liquid(BOPBlocks.poison).frozenLiquid((IBlockState)null).create()); @@ -74,7 +74,7 @@ public class BiomeGenLushSwamp extends BOPBiome // trees & logs GeneratorWeighted treeGenerator = new GeneratorWeighted(9); this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); - treeGenerator.add("swamp", 5, (new GeneratorBasicTree.Builder()).minHeight(8).maxHeight(12).maxLeavesRadius(2).leaves(Blocks.leaves.getDefaultState().withProperty(BlockOldLeaf.CHECK_DECAY, Boolean.valueOf(false))).vine(Blocks.vine.getDefaultState()).create()); + treeGenerator.add("swamp", 5, (new GeneratorBasicTree.Builder()).minHeight(8).maxHeight(12).maxLeavesRadius(2).leaves(Blocks.LEAVES.getDefaultState().withProperty(BlockOldLeaf.CHECK_DECAY, Boolean.valueOf(false))).vine(Blocks.VINE.getDefaultState()).create()); // grasses GeneratorWeighted grassGenerator = new GeneratorWeighted(5.0F); @@ -101,23 +101,23 @@ public class BiomeGenLushSwamp extends BOPBiome this.addGenerator("cattail", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(6.0F).with(BOPPlants.CATTAIL).create()); this.addGenerator("double_cattail", GeneratorStage.FLOWERS, (new GeneratorDoubleFlora.Builder()).amountPerChunk(6.0F).with(BlockBOPDoublePlant.DoublePlantType.TALL_CATTAIL).create()); this.addGenerator("leaf_piles", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BOPPlants.LEAFPILE).create()); - this.addGenerator("sugar_cane", GeneratorStage.FLOWERS,(new GeneratorColumns.Builder()).amountPerChunk(1.0F).generationAttempts(24).placeOn(BlockQueries.litFertileWaterside).with(Blocks.reeds.getDefaultState()).minHeight(1).maxHeight(3).create()); + this.addGenerator("sugar_cane", GeneratorStage.FLOWERS,(new GeneratorColumns.Builder()).amountPerChunk(1.0F).generationAttempts(24).placeOn(BlockQueries.litFertileWaterside).with(Blocks.REEDS.getDefaultState()).minHeight(1).maxHeight(3).create()); this.addGenerator("river_cane", GeneratorStage.FLOWERS,(new GeneratorColumns.Builder()).amountPerChunk(1.0F).generationAttempts(24).placeOn(BlockQueries.litFertileWaterside).with(BlockBOPPlant.paging.getVariantState(BOPPlants.RIVERCANE)).minHeight(1).maxHeight(3).create()); // water plants - this.addGenerator("lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(Blocks.waterlily.getDefaultState()).create()); + this.addGenerator("lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(Blocks.WATERLILY.getDefaultState()).create()); this.addGenerator("medium_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.3F).with(BlockBOPLilypad.LilypadType.MEDIUM).create()); this.addGenerator("small_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BlockBOPLilypad.LilypadType.SMALL).create()); this.addGenerator("tiny_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BlockBOPLilypad.LilypadType.TINY).create()); - this.addGenerator("algae", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(2.0F).replace(Blocks.water).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.ALGAE)).scatterYMethod(ScatterYMethod.AT_GROUND).create()); + this.addGenerator("algae", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(2.0F).replace(Blocks.WATER).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.ALGAE)).scatterYMethod(ScatterYMethod.AT_GROUND).create()); this.addGenerator("water_reeds", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.7F).with(BOPPlants.REED).generationAttempts(32).create()); this.addGenerator("flower_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.25F).with(BlockBOPLilypad.LilypadType.FLOWER).create()); // shrooms this.addGenerator("toadstools", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.4F).with(BlockBOPMushroom.MushroomType.TOADSTOOL).create()); this.addGenerator("blue_milk_caps", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(BlockBOPMushroom.MushroomType.BLUE_MILK_CAP).create()); - this.addGenerator("red_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.3F).with(Blocks.red_mushroom.getDefaultState()).create()); - this.addGenerator("brown_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(Blocks.brown_mushroom.getDefaultState()).create()); + this.addGenerator("red_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.3F).with(Blocks.RED_MUSHROOM.getDefaultState()).create()); + this.addGenerator("brown_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(Blocks.BROWN_MUSHROOM.getDefaultState()).create()); // gem this.addGenerator("malachite", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(BOPGems.MALACHITE).create()); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMangrove.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMangrove.java index 6762ae83c..d3c3c533d 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMangrove.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMangrove.java @@ -52,7 +52,7 @@ public class BiomeGenMangrove extends BOPBiome this.topBlock = BOPBlocks.mud.getDefaultState(); this.fillerBlock = BOPBlocks.mud.getDefaultState(); this.usualTopBlock = this.topBlock; - this.alternateTopBlock = Blocks.sand.getDefaultState(); + this.alternateTopBlock = Blocks.SAND.getDefaultState(); this.canSpawnInBiome = false; this.canGenerateVillages = false; @@ -98,9 +98,9 @@ public class BiomeGenMangrove extends BOPBiome for (int k = 255; k >= 0; --k) { - if (primer.getBlockState(j, k, i).getMaterial() != Material.air) + if (primer.getBlockState(j, k, i).getMaterial() != Material.AIR) { - if (k == 62 && primer.getBlockState(j, k, i).getBlock() != Blocks.water) + if (k == 62 && primer.getBlockState(j, k, i).getBlock() != Blocks.WATER) { primer.setBlockState(j, k, i, WATER); } diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMapleWoods.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMapleWoods.java index c860e2971..b7d8924f5 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMapleWoods.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMapleWoods.java @@ -43,8 +43,8 @@ public class BiomeGenMapleWoods extends BOPBiome this.spawnableCreatureList.add(new SpawnListEntry(EntityWolf.class, 5, 4, 4)); // sand and gravel - this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.sand.getDefaultState()).create()); - this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(6).maxRadius(7).with(Blocks.gravel.getDefaultState()).create()); + this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.SAND.getDefaultState()).create()); + this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(6).maxRadius(7).with(Blocks.GRAVEL.getDefaultState()).create()); // trees & logs GeneratorWeighted treeGenerator = new GeneratorWeighted(20); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMarsh.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMarsh.java index 428cf6191..879f20541 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMarsh.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMarsh.java @@ -72,7 +72,7 @@ public class BiomeGenMarsh extends BOPBiome this.addGenerator("koru", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(BOPPlants.KORU).create()); // water plants - this.addGenerator("algae", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(10.0F).replace(Blocks.water).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.ALGAE)).generationAttempts(32).scatterYMethod(ScatterYMethod.AT_GROUND).create()); + this.addGenerator("algae", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(10.0F).replace(Blocks.WATER).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.ALGAE)).generationAttempts(32).scatterYMethod(ScatterYMethod.AT_GROUND).create()); this.addGenerator("water_reeds", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(6.0F).with(BOPPlants.REED).generationAttempts(32).create()); // grasses @@ -96,7 +96,7 @@ public class BiomeGenMarsh extends BOPBiome { if (!settings.generateBopGems) {this.removeGenerator("malachite");} - if (!settings.generateBopSoils) {this.topBlock = Blocks.grass.getDefaultState(); this.fillerBlock = Blocks.dirt.getDefaultState();} + if (!settings.generateBopSoils) {this.topBlock = Blocks.GRASS.getDefaultState(); this.fillerBlock = Blocks.DIRT.getDefaultState();} if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMeadow.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMeadow.java index 640e09772..7979b2f92 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMeadow.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMeadow.java @@ -53,7 +53,7 @@ public class BiomeGenMeadow extends BOPBiome this.spawnableCreatureList.add(new SpawnListEntry(EntityButterfly.class, 6, 2, 4)); // sand - this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.sand.getDefaultState()).create()); + this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.SAND.getDefaultState()).create()); // trees & logs GeneratorWeighted treeGenerator = new GeneratorWeighted(2); @@ -94,12 +94,12 @@ public class BiomeGenMeadow extends BOPBiome this.addGenerator("double_cattail", GeneratorStage.FLOWERS, (new GeneratorDoubleFlora.Builder()).amountPerChunk(1.0F).with(BlockBOPDoublePlant.DoublePlantType.TALL_CATTAIL).create()); // water plants - this.addGenerator("lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.25F).with(Blocks.waterlily.getDefaultState()).create()); + this.addGenerator("lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.25F).with(Blocks.WATERLILY.getDefaultState()).create()); this.addGenerator("medium_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BlockBOPLilypad.LilypadType.MEDIUM).create()); this.addGenerator("flower_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.25F).with(BlockBOPLilypad.LilypadType.FLOWER).create()); this.addGenerator("small_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BlockBOPLilypad.LilypadType.SMALL).create()); this.addGenerator("tiny_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.75F).with(BlockBOPLilypad.LilypadType.TINY).create()); - this.addGenerator("algae", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(1.0F).replace(Blocks.water).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.ALGAE)).scatterYMethod(ScatterYMethod.AT_GROUND).create()); + this.addGenerator("algae", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(1.0F).replace(Blocks.WATER).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.ALGAE)).scatterYMethod(ScatterYMethod.AT_GROUND).create()); this.addGenerator("water_reeds", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BOPPlants.REED).generationAttempts(32).create()); // gem diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMoor.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMoor.java index a4893bafc..69a298ad2 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMoor.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMoor.java @@ -77,13 +77,13 @@ public class BiomeGenMoor extends BOPBiome grassGenerator.add("dampgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.DAMPGRASS).create()); // shrooms - this.addGenerator("brown_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(Blocks.brown_mushroom.getDefaultState()).create()); - this.addGenerator("red_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(Blocks.red_mushroom.getDefaultState()).create()); + this.addGenerator("brown_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(Blocks.BROWN_MUSHROOM.getDefaultState()).create()); + this.addGenerator("red_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(Blocks.RED_MUSHROOM.getDefaultState()).create()); // other plants this.addGenerator("koru", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.6F).with(BOPPlants.KORU).create()); this.addGenerator("flax", GeneratorStage.FLOWERS,(new GeneratorDoubleFlora.Builder()).amountPerChunk(0.1F).with(BlockBOPDoublePlant.DoublePlantType.FLAX).generationAttempts(6).create()); - this.addGenerator("algae", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(5.0F).replace(Blocks.water).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.ALGAE)).scatterYMethod(ScatterYMethod.AT_GROUND).create()); + this.addGenerator("algae", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(5.0F).replace(Blocks.WATER).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.ALGAE)).scatterYMethod(ScatterYMethod.AT_GROUND).create()); // gem this.addGenerator("malachite", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(BOPGems.MALACHITE).create()); @@ -96,7 +96,7 @@ public class BiomeGenMoor extends BOPBiome if (!settings.generateBopGems) {this.removeGenerator("malachite");} if (!settings.generateFlax) {this.removeGenerator("flax");} - if (!settings.generateBopSoils) {this.topBlock = Blocks.grass.getDefaultState(); this.fillerBlock = Blocks.dirt.getDefaultState();} + if (!settings.generateBopSoils) {this.topBlock = Blocks.GRASS.getDefaultState(); this.fillerBlock = Blocks.DIRT.getDefaultState();} if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMountain.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMountain.java index 758d8d8f4..c0827ab7c 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMountain.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMountain.java @@ -95,22 +95,22 @@ public class BiomeGenMountain extends BOPBiome this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityWolf.class, 4, 4, 4)); } - this.topBlock = Blocks.grass.getDefaultState(); - this.fillerBlock = Blocks.dirt.getDefaultState(); + this.topBlock = Blocks.GRASS.getDefaultState(); + this.fillerBlock = Blocks.DIRT.getDefaultState(); this.grassBlock = this.topBlock; this.dirtBlock = this.fillerBlock; - this.coarseDirtBlock = Blocks.dirt.getDefaultState().withProperty(BlockDirt.VARIANT, BlockDirt.DirtType.COARSE_DIRT); - this.stoneBlock = Blocks.stone.getDefaultState(); + this.coarseDirtBlock = Blocks.DIRT.getDefaultState().withProperty(BlockDirt.VARIANT, BlockDirt.DirtType.COARSE_DIRT); + this.stoneBlock = Blocks.STONE.getDefaultState(); // gravel - this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(6).maxRadius(7).with(Blocks.gravel.getDefaultState()).create()); - this.addGenerator("gravel_patches", GeneratorStage.SAND_PASS2, (new GeneratorSplotches.Builder()).amountPerChunk(2).splotchSize(16).replace(this.topBlock).with(Blocks.gravel.getDefaultState()).scatterYMethod(ScatterYMethod.AT_SURFACE).create()); + this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(6).maxRadius(7).with(Blocks.GRAVEL.getDefaultState()).create()); + this.addGenerator("gravel_patches", GeneratorStage.SAND_PASS2, (new GeneratorSplotches.Builder()).amountPerChunk(2).splotchSize(16).replace(this.topBlock).with(Blocks.GRAVEL.getDefaultState()).scatterYMethod(ScatterYMethod.AT_SURFACE).create()); // lakes this.addGenerator("lakes", GeneratorStage.SAND, (new GeneratorLakes.Builder()).amountPerChunk(1.8F).waterLakeForBiome(this).create()); // trees & logs - IBlockPosQuery suitableTreePosition = BlockQuery.buildAnd().withAltitudeBetween(64, 140).materials(Material.ground, Material.grass).create(); + IBlockPosQuery suitableTreePosition = BlockQuery.buildAnd().withAltitudeBetween(64, 140).materials(Material.GROUND, Material.GRASS).create(); GeneratorWeighted treeGenerator = new GeneratorWeighted(3); this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); treeGenerator.add("pine", 2, (new GeneratorPineTree.Builder()).minHeight(6).maxHeight(18).log(BOPWoods.PINE).leaves(BOPTrees.PINE).placeOn(suitableTreePosition).create()); @@ -141,7 +141,7 @@ public class BiomeGenMountain extends BOPBiome // TODO: some flowers? // gem - this.addGenerator("emeralds", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(Blocks.emerald_ore.getDefaultState()).create()); + this.addGenerator("emeralds", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(Blocks.EMERALD_ORE.getDefaultState()).create()); } @@ -173,7 +173,7 @@ public class BiomeGenMountain extends BOPBiome GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees"); if (!settings.generateBopTrees) {this.removeGenerator("trees"); - IBlockPosQuery suitableTreePosition = BlockQuery.buildAnd().withAltitudeBetween(64, 140).materials(Material.ground, Material.grass).create(); + IBlockPosQuery suitableTreePosition = BlockQuery.buildAnd().withAltitudeBetween(64, 140).materials(Material.GROUND, Material.GRASS).create(); GeneratorWeighted treeGenerator = new GeneratorWeighted(3); this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); treeGenerator.add("pine", 2, (new GeneratorPineTree.Builder()).minHeight(6).maxHeight(18).log(BlockPlanks.EnumType.SPRUCE).leaves(BlockPlanks.EnumType.SPRUCE).placeOn(suitableTreePosition).create()); @@ -192,7 +192,7 @@ public class BiomeGenMountain extends BOPBiome int localX = x & 15; int localZ = z & 15; int height = 255; - while (height > 0 && primer.getBlockState(localX, height, localZ).getMaterial() == Material.air) {height--;} + while (height > 0 && primer.getBlockState(localX, height, localZ).getMaterial() == Material.AIR) {height--;} int peakLine = 140 + (int)(noise * 5); if (height > peakLine) diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMysticGrove.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMysticGrove.java index bedef1edb..ad9f36366 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMysticGrove.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMysticGrove.java @@ -79,7 +79,7 @@ public class BiomeGenMysticGrove extends BOPBiome // trees & logs GeneratorWeighted treeGenerator = new GeneratorWeighted(10); this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); - treeGenerator.add("flowering_vine", 2, (new GeneratorBasicTree.Builder()).minHeight(8).maxHeight(12).maxLeavesRadius(2).leaves(Blocks.leaves.getDefaultState().withProperty(BlockOldLeaf.CHECK_DECAY, Boolean.valueOf(false))).vine(BOPBlocks.flower_vine.getDefaultState()).create()); + treeGenerator.add("flowering_vine", 2, (new GeneratorBasicTree.Builder()).minHeight(8).maxHeight(12).maxLeavesRadius(2).leaves(Blocks.LEAVES.getDefaultState().withProperty(BlockOldLeaf.CHECK_DECAY, Boolean.valueOf(false))).vine(BOPBlocks.flower_vine.getDefaultState()).create()); treeGenerator.add("magic", 9, (new GeneratorBasicTree.Builder()).log(BOPWoods.MAGIC).leaves(BOPTrees.MAGIC).create()); treeGenerator.add("jacaranda", 1, (new GeneratorBasicTree.Builder()).minHeight(4).maxHeight(7).log(BOPWoods.JACARANDA).leaves(BOPTrees.JACARANDA).create()); treeGenerator.add("oak_large", 3, (new GeneratorBigTree.Builder()).altLeaves(BOPTrees.FLOWERING).create()); @@ -114,17 +114,17 @@ public class BiomeGenMysticGrove extends BOPBiome this.addGenerator("clover_patches", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BOPPlants.CLOVERPATCH).create()); // water plants - this.addGenerator("lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(Blocks.waterlily.getDefaultState()).create()); + this.addGenerator("lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(Blocks.WATERLILY.getDefaultState()).create()); this.addGenerator("medium_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(BlockBOPLilypad.LilypadType.MEDIUM).create()); this.addGenerator("small_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(BlockBOPLilypad.LilypadType.SMALL).create()); this.addGenerator("tiny_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(BlockBOPLilypad.LilypadType.TINY).create()); - this.addGenerator("algae", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(1.0F).replace(Blocks.water).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.ALGAE)).scatterYMethod(ScatterYMethod.AT_GROUND).create()); + this.addGenerator("algae", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(1.0F).replace(Blocks.WATER).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.ALGAE)).scatterYMethod(ScatterYMethod.AT_GROUND).create()); this.addGenerator("flower_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BlockBOPLilypad.LilypadType.FLOWER).create()); // shrooms this.addGenerator("blue_milk_caps", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(BlockBOPMushroom.MushroomType.BLUE_MILK_CAP).create()); - this.addGenerator("red_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(Blocks.red_mushroom.getDefaultState()).create()); - this.addGenerator("brown_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(Blocks.brown_mushroom.getDefaultState()).create()); + this.addGenerator("red_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(Blocks.RED_MUSHROOM.getDefaultState()).create()); + this.addGenerator("brown_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(Blocks.BROWN_MUSHROOM.getDefaultState()).create()); // gem this.addGenerator("topaz", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(BOPGems.TOPAZ).create()); @@ -153,7 +153,7 @@ public class BiomeGenMysticGrove extends BOPBiome GeneratorWeighted treeGenerator = new GeneratorWeighted(10); this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); - treeGenerator.add("flowering_vine", 2, (new GeneratorBasicTree.Builder()).minHeight(8).maxHeight(12).maxLeavesRadius(2).leaves(Blocks.leaves.getDefaultState().withProperty(BlockOldLeaf.CHECK_DECAY, Boolean.valueOf(false))).vine(Blocks.vine.getDefaultState()).create()); + treeGenerator.add("flowering_vine", 2, (new GeneratorBasicTree.Builder()).minHeight(8).maxHeight(12).maxLeavesRadius(2).leaves(Blocks.LEAVES.getDefaultState().withProperty(BlockOldLeaf.CHECK_DECAY, Boolean.valueOf(false))).vine(Blocks.VINE.getDefaultState()).create()); treeGenerator.add("magic", 9, (new GeneratorBasicTree.Builder()).create()); treeGenerator.add("jacaranda", 1, (new GeneratorBasicTree.Builder()).minHeight(4).maxHeight(7).create()); treeGenerator.add("oak_large", 3, (new GeneratorBigTree.Builder()).create()); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOasis.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOasis.java index 1d0fc8383..276ceacaf 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOasis.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOasis.java @@ -8,28 +8,17 @@ package biomesoplenty.common.biome.overworld; -import java.util.Random; - import biomesoplenty.api.biome.BOPBiome; import biomesoplenty.api.biome.generation.GeneratorStage; import biomesoplenty.api.biome.generation.GeneratorWeighted; import biomesoplenty.api.block.BOPBlocks; import biomesoplenty.common.block.BlockBOPCoral; import biomesoplenty.common.block.BlockBOPLeaves; -import biomesoplenty.common.enums.BOPFlowers; -import biomesoplenty.common.enums.BOPGems; -import biomesoplenty.common.enums.BOPPlants; -import biomesoplenty.common.enums.BOPTrees; -import biomesoplenty.common.enums.BOPWoods; +import biomesoplenty.common.enums.*; import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod; import biomesoplenty.common.util.config.BOPConfig.IConfigObj; import biomesoplenty.common.world.BOPWorldSettings; -import biomesoplenty.common.world.feature.GeneratorColumns; -import biomesoplenty.common.world.feature.GeneratorFlora; -import biomesoplenty.common.world.feature.GeneratorGrass; -import biomesoplenty.common.world.feature.GeneratorLakes; -import biomesoplenty.common.world.feature.GeneratorOreSingle; -import biomesoplenty.common.world.feature.GeneratorWaterside; +import biomesoplenty.common.world.feature.*; import biomesoplenty.common.world.feature.tree.GeneratorPalmTree; import biomesoplenty.common.world.feature.tree.GeneratorTwigletTree; import net.minecraft.block.BlockOldLeaf; @@ -39,6 +28,8 @@ import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; import net.minecraft.world.World; import net.minecraft.world.chunk.ChunkPrimer; + +import java.util.Random; public class BiomeGenOasis extends BOPBiome { @@ -56,15 +47,15 @@ public class BiomeGenOasis extends BOPBiome this.canGenerateVillages = false; this.canGenerateRivers = false; - this.topBlock = Blocks.sand.getDefaultState(); - this.fillerBlock = Blocks.sand.getDefaultState(); + this.topBlock = Blocks.SAND.getDefaultState(); + this.fillerBlock = Blocks.SAND.getDefaultState(); this.usualTopBlock = this.topBlock; - this.alternateTopBlock = Blocks.grass.getDefaultState(); + this.alternateTopBlock = Blocks.GRASS.getDefaultState(); clearWeights(); // oases - this.addGenerator("oases", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(20).maxRadius(7).replace(Blocks.sand.getDefaultState()).with(Blocks.grass.getDefaultState()).create()); + this.addGenerator("oases", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(20).maxRadius(7).replace(Blocks.SAND.getDefaultState()).with(Blocks.GRASS.getDefaultState()).create()); // lakes this.addGenerator("lakes", GeneratorStage.SAND, (new GeneratorLakes.Builder()).amountPerChunk(1.5F).waterLakeForBiome(this).create()); @@ -73,7 +64,7 @@ public class BiomeGenOasis extends BOPBiome GeneratorWeighted treeGenerator = new GeneratorWeighted(10.0F); this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); treeGenerator.add("palm", 4, (new GeneratorPalmTree.Builder()).log(BOPWoods.PALM).leaves(BlockBOPLeaves.paging.getVariantState(BOPTrees.PALM).withProperty(BlockOldLeaf.CHECK_DECAY, Boolean.valueOf(false))).create()); - treeGenerator.add("jungle_twiglet", 1, (new GeneratorTwigletTree.Builder()).minHeight(2).maxHeight(2).log(BlockPlanks.EnumType.JUNGLE).leaves(BlockPlanks.EnumType.JUNGLE).trunkFruit(Blocks.cocoa.getDefaultState()).create()); + treeGenerator.add("jungle_twiglet", 1, (new GeneratorTwigletTree.Builder()).minHeight(2).maxHeight(2).log(BlockPlanks.EnumType.JUNGLE).leaves(BlockPlanks.EnumType.JUNGLE).trunkFruit(Blocks.COCOA.getDefaultState()).create()); // grasses GeneratorWeighted grassGenerator = new GeneratorWeighted(4.0F); @@ -88,10 +79,10 @@ public class BiomeGenOasis extends BOPBiome this.addGenerator("desertgrass", GeneratorStage.GRASS, (new GeneratorGrass.Builder()).amountPerChunk(1.5F).with(BOPPlants.DESERTGRASS).generationAttempts(8).create()); this.addGenerator("bromeliad", GeneratorStage.FLOWERS, (new GeneratorFlora.Builder().amountPerChunk(0.5F).with(BOPFlowers.BROMELIAD).generationAttempts(8).create())); this.addGenerator("tiny_cacti", GeneratorStage.FLOWERS, (new GeneratorFlora.Builder()).amountPerChunk(0.6F).with(BOPPlants.TINYCACTUS).create()); - this.addGenerator("cacti", GeneratorStage.FLOWERS,(new GeneratorColumns.Builder()).amountPerChunk(0.4F).generationAttempts(3).placeOn(this.topBlock).with(Blocks.cactus.getDefaultState()).minHeight(1).maxHeight(2).create()); + this.addGenerator("cacti", GeneratorStage.FLOWERS,(new GeneratorColumns.Builder()).amountPerChunk(0.4F).generationAttempts(3).placeOn(this.topBlock).with(Blocks.CACTUS.getDefaultState()).minHeight(1).maxHeight(2).create()); // water plants - this.addGenerator("algae", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(3.0F).replace(Blocks.water).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.ALGAE)).scatterYMethod(ScatterYMethod.AT_GROUND).create()); + this.addGenerator("algae", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(3.0F).replace(Blocks.WATER).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.ALGAE)).scatterYMethod(ScatterYMethod.AT_GROUND).create()); // gem this.addGenerator("ruby", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(BOPGems.RUBY).create()); @@ -122,8 +113,8 @@ public class BiomeGenOasis extends BOPBiome GeneratorWeighted treeGenerator = new GeneratorWeighted(10.0F); this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); - treeGenerator.add("palm", 4, (new GeneratorPalmTree.Builder()).log(BlockPlanks.EnumType.JUNGLE).leaves(Blocks.leaves.getStateFromMeta(BlockPlanks.EnumType.JUNGLE.getMetadata()).withProperty(BlockOldLeaf.CHECK_DECAY, Boolean.valueOf(false))).create()); - treeGenerator.add("jungle_twiglet", 1, (new GeneratorTwigletTree.Builder()).minHeight(2).maxHeight(2).log(BlockPlanks.EnumType.JUNGLE).leaves(BlockPlanks.EnumType.JUNGLE).trunkFruit(Blocks.cocoa.getDefaultState()).create()); + treeGenerator.add("palm", 4, (new GeneratorPalmTree.Builder()).log(BlockPlanks.EnumType.JUNGLE).leaves(Blocks.LEAVES.getStateFromMeta(BlockPlanks.EnumType.JUNGLE.getMetadata()).withProperty(BlockOldLeaf.CHECK_DECAY, Boolean.valueOf(false))).create()); + treeGenerator.add("jungle_twiglet", 1, (new GeneratorTwigletTree.Builder()).minHeight(2).maxHeight(2).log(BlockPlanks.EnumType.JUNGLE).leaves(BlockPlanks.EnumType.JUNGLE).trunkFruit(Blocks.COCOA.getDefaultState()).create()); } GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOminousWoods.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOminousWoods.java index a86e7bd2b..c6343a2ff 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOminousWoods.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOminousWoods.java @@ -70,7 +70,7 @@ public class BiomeGenOminousWoods extends BOPBiome this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); treeGenerator.add("umbran_moss", 4, (new GeneratorBasicTree.Builder()).log(BOPWoods.UMBRAN).leaves(BOPTrees.UMBRAN).minHeight(8).maxHeight(12).leaves(BlockBOPLeaves.paging.getVariantState(BOPTrees.UMBRAN).withProperty(BlockOldLeaf.CHECK_DECAY, Boolean.valueOf(false))).maxLeavesRadius(2).vine(BOPBlocks.tree_moss.getDefaultState()).create()); treeGenerator.add("umbran_spruce", 5, (new GeneratorTaigaTree.Builder()).log(BOPWoods.UMBRAN).leaves(BOPTrees.UMBRAN).maxHeight(20).create()); // TODO: implement pine cones - treeGenerator.add("dead_tree", 3, (new GeneratorBigTree.Builder()).minHeight(5).maxHeight(12).foliageHeight(0).foliageDensity(0.5D).log(BOPWoods.DEAD).leaves(Blocks.air.getDefaultState()).create()); + treeGenerator.add("dead_tree", 3, (new GeneratorBigTree.Builder()).minHeight(5).maxHeight(12).foliageHeight(0).foliageDensity(0.5D).log(BOPWoods.DEAD).leaves(Blocks.AIR.getDefaultState()).create()); treeGenerator.add("mega_umbran", 4, (new GeneratorTaigaTree.Builder()).log(BOPWoods.UMBRAN).leaves(BOPTrees.UMBRAN).minHeight(20).maxHeight(30).trunkWidth(2).create()); treeGenerator.add("dying_tree", 1, (new GeneratorBigTree.Builder()).minHeight(5).maxHeight(12).foliageHeight(1).log(BOPWoods.DEAD).leaves(BOPTrees.DEAD).create()); @@ -92,8 +92,8 @@ public class BiomeGenOminousWoods extends BOPBiome this.addGenerator("dead_leaf_piles", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(BOPPlants.DEADLEAFPILE).create()); // shrooms - this.addGenerator("red_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.3F).with(Blocks.red_mushroom.getDefaultState()).create()); - this.addGenerator("brown_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(Blocks.brown_mushroom.getDefaultState()).create()); + this.addGenerator("red_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.3F).with(Blocks.RED_MUSHROOM.getDefaultState()).create()); + this.addGenerator("brown_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(Blocks.BROWN_MUSHROOM.getDefaultState()).create()); // gem this.addGenerator("malachite", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(BOPGems.MALACHITE).create()); @@ -109,7 +109,7 @@ public class BiomeGenOminousWoods extends BOPBiome if (!settings.generateLiquidPoison) {this.removeGenerator("poison_lakes");} - if (!settings.generateBopSoils) {this.topBlock = Blocks.grass.getDefaultState(); this.fillerBlock = Blocks.dirt.getDefaultState();} + if (!settings.generateBopSoils) {this.topBlock = Blocks.GRASS.getDefaultState(); this.fillerBlock = Blocks.DIRT.getDefaultState();} if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} @@ -124,9 +124,9 @@ public class BiomeGenOminousWoods extends BOPBiome GeneratorWeighted treeGenerator = new GeneratorWeighted(9); this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); - treeGenerator.add("umbran_moss", 4, (new GeneratorBasicTree.Builder()).log(BlockPlanks.EnumType.DARK_OAK).leaves(BlockPlanks.EnumType.DARK_OAK).leaves(Blocks.leaves2.getStateFromMeta(BlockPlanks.EnumType.DARK_OAK.getMetadata()).withProperty(BlockOldLeaf.CHECK_DECAY, Boolean.valueOf(false))).minHeight(8).maxHeight(12).maxLeavesRadius(2).vine(Blocks.vine.getDefaultState()).create()); + treeGenerator.add("umbran_moss", 4, (new GeneratorBasicTree.Builder()).log(BlockPlanks.EnumType.DARK_OAK).leaves(BlockPlanks.EnumType.DARK_OAK).leaves(Blocks.LEAVES2.getStateFromMeta(BlockPlanks.EnumType.DARK_OAK.getMetadata()).withProperty(BlockOldLeaf.CHECK_DECAY, Boolean.valueOf(false))).minHeight(8).maxHeight(12).maxLeavesRadius(2).vine(Blocks.VINE.getDefaultState()).create()); treeGenerator.add("umbran_spruce", 5, (new GeneratorTaigaTree.Builder()).log(BlockPlanks.EnumType.DARK_OAK).leaves(BlockPlanks.EnumType.DARK_OAK).maxHeight(20).create()); // TODO: implement pine cones - treeGenerator.add("dead_tree", 3, (new GeneratorBigTree.Builder()).minHeight(5).maxHeight(12).foliageHeight(0).foliageDensity(0.5D).log(BlockPlanks.EnumType.DARK_OAK).leaves(Blocks.air.getDefaultState()).create()); + treeGenerator.add("dead_tree", 3, (new GeneratorBigTree.Builder()).minHeight(5).maxHeight(12).foliageHeight(0).foliageDensity(0.5D).log(BlockPlanks.EnumType.DARK_OAK).leaves(Blocks.AIR.getDefaultState()).create()); treeGenerator.add("mega_umbran", 4, (new GeneratorTaigaTree.Builder()).log(BlockPlanks.EnumType.DARK_OAK).leaves(BlockPlanks.EnumType.DARK_OAK).minHeight(20).maxHeight(30).trunkWidth(2).create()); treeGenerator.add("dying_tree", 1, (new GeneratorBigTree.Builder()).minHeight(5).maxHeight(12).foliageHeight(1).log(BlockPlanks.EnumType.DARK_OAK).leaves(BlockPlanks.EnumType.DARK_OAK).create()); } diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOutback.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOutback.java index c2e6d56e2..37b0bb6e9 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOutback.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOutback.java @@ -40,8 +40,8 @@ public class BiomeGenOutback extends BOPBiome // terrain this.terrainSettings.avgHeight(72).heightVariation(8, 10).octaves(0, 1, 2, 1, 0, 2); - this.topBlock = Blocks.sand.getDefaultState().withProperty(BlockSand.VARIANT, BlockSand.EnumType.RED_SAND); - this.fillerBlock = Blocks.sand.getDefaultState().withProperty(BlockSand.VARIANT, BlockSand.EnumType.RED_SAND); + this.topBlock = Blocks.SAND.getDefaultState().withProperty(BlockSand.VARIANT, BlockSand.EnumType.RED_SAND); + this.fillerBlock = Blocks.SAND.getDefaultState().withProperty(BlockSand.VARIANT, BlockSand.EnumType.RED_SAND); this.addWeight(BOPClimates.HOT_DESERT, 7); @@ -71,8 +71,8 @@ public class BiomeGenOutback extends BOPBiome // other plants this.addGenerator("shrubs", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BOPPlants.SHRUB).create()); this.addGenerator("tiny_cacti", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(1.0F).with(BOPPlants.TINYCACTUS).create()); - this.addGenerator("dead_bushes", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(2.0F).with(Blocks.deadbush.getDefaultState()).create()); - this.addGenerator("cacti", GeneratorStage.FLOWERS,(new GeneratorColumns.Builder()).amountPerChunk(0.5F).generationAttempts(24).placeOn(this.topBlock).with(Blocks.cactus.getDefaultState()).minHeight(1).maxHeight(2).create()); + this.addGenerator("dead_bushes", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(2.0F).with(Blocks.DEADBUSH.getDefaultState()).create()); + this.addGenerator("cacti", GeneratorStage.FLOWERS,(new GeneratorColumns.Builder()).amountPerChunk(0.5F).generationAttempts(24).placeOn(this.topBlock).with(Blocks.CACTUS.getDefaultState()).minHeight(1).maxHeight(2).create()); this.addGenerator("desertgrass", GeneratorStage.GRASS, (new GeneratorGrass.Builder()).amountPerChunk(10.0F).with(BOPPlants.DESERTGRASS).generationAttempts(8).create()); // gem @@ -87,7 +87,7 @@ public class BiomeGenOutback extends BOPBiome if (!settings.generateBopGems) {this.removeGenerator("ruby");} IBlockPosQuery emptyRedSand = BlockQuery.buildAnd().withAirAbove().states(this.topBlock).create(); - if (!settings.generateBopSoils) {this.removeGenerator("grass_splatter"); this.addGenerator("grass_splatter_new", GeneratorStage.SAND, (new GeneratorSplatter.Builder()).amountPerChunk(8.0F).generationAttempts(128).replace(emptyRedSand).with(Blocks.grass.getDefaultState()).create());} + if (!settings.generateBopSoils) {this.removeGenerator("grass_splatter"); this.addGenerator("grass_splatter_new", GeneratorStage.SAND, (new GeneratorSplatter.Builder()).amountPerChunk(8.0F).generationAttempts(128).replace(emptyRedSand).with(Blocks.GRASS.getDefaultState()).create());} if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOvergrownCliffs.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOvergrownCliffs.java index fcc65412e..ba4ebdd2f 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOvergrownCliffs.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOvergrownCliffs.java @@ -52,7 +52,7 @@ public class BiomeGenOvergrownCliffs extends BOPBiome this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); treeGenerator.add("mahogany", 1, (new GeneratorMahoganyTree.Builder()).minHeight(5).maxHeight(10).create()); treeGenerator.add("oak_bush", 8, (new GeneratorBush.Builder()).maxHeight(2).create()); - treeGenerator.add("jungle_twiglet", 2, (new GeneratorTwigletTree.Builder()).minHeight(2).maxHeight(2).log(BlockPlanks.EnumType.JUNGLE).leaves(BlockPlanks.EnumType.JUNGLE).trunkFruit(Blocks.cocoa.getDefaultState()).create()); + treeGenerator.add("jungle_twiglet", 2, (new GeneratorTwigletTree.Builder()).minHeight(2).maxHeight(2).log(BlockPlanks.EnumType.JUNGLE).leaves(BlockPlanks.EnumType.JUNGLE).trunkFruit(Blocks.COCOA.getDefaultState()).create()); // other plants this.addGenerator("shrubs", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.4F).with(BOPPlants.SHRUB).create()); @@ -75,7 +75,7 @@ public class BiomeGenOvergrownCliffs extends BOPBiome grassGenerator.add("tallgrass", 1, (new GeneratorGrass.Builder()).with(BlockTallGrass.EnumType.GRASS).create()); // gem - this.addGenerator("emeralds", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(Blocks.emerald_ore.getDefaultState()).create()); + this.addGenerator("emeralds", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(Blocks.EMERALD_ORE.getDefaultState()).create()); } @@ -95,7 +95,7 @@ public class BiomeGenOvergrownCliffs extends BOPBiome this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); treeGenerator.add("mahogany", 1, (new GeneratorMahoganyTree.Builder()).minHeight(5).maxHeight(10).log(BlockPlanks.EnumType.JUNGLE).leaves(BlockPlanks.EnumType.JUNGLE).create()); treeGenerator.add("oak_bush", 8, (new GeneratorBush.Builder()).maxHeight(2).create()); - treeGenerator.add("jungle_twiglet", 2, (new GeneratorTwigletTree.Builder()).minHeight(2).maxHeight(2).log(BlockPlanks.EnumType.JUNGLE).leaves(BlockPlanks.EnumType.JUNGLE).trunkFruit(Blocks.cocoa.getDefaultState()).create()); + treeGenerator.add("jungle_twiglet", 2, (new GeneratorTwigletTree.Builder()).minHeight(2).maxHeight(2).log(BlockPlanks.EnumType.JUNGLE).leaves(BlockPlanks.EnumType.JUNGLE).trunkFruit(Blocks.COCOA.getDefaultState()).create()); } GeneratorWeighted flowerGen = (GeneratorWeighted)this.getGenerator("flowers"); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenPrairie.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenPrairie.java index b2e87967a..7de0a315e 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenPrairie.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenPrairie.java @@ -47,7 +47,7 @@ public class BiomeGenPrairie extends BOPBiome this.spawnableCreatureList.add(new SpawnListEntry(EntityButterfly.class, 6, 2, 4)); // sand - this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.sand.getDefaultState()).create()); + this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.SAND.getDefaultState()).create()); // trees this.addGenerator("trees", GeneratorStage.TREE, (new GeneratorTaigaTree.Builder()).amountPerChunk(1).minHeight(6).maxHeight(8).log(EnumType.OAK).leaves(EnumType.OAK).create()); // TODO: implement pine cones @@ -92,7 +92,7 @@ public class BiomeGenPrairie extends BOPBiome if (!settings.generateFlax) {this.removeGenerator("flax");} if (!settings.generateBerryBushes) {this.removeGenerator("berry_bushes");} - if (!settings.generateBopSoils) {this.topBlock = Blocks.grass.getDefaultState(); this.fillerBlock = Blocks.dirt.getDefaultState();} + if (!settings.generateBopSoils) {this.topBlock = Blocks.GRASS.getDefaultState(); this.fillerBlock = Blocks.DIRT.getDefaultState();} if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenQuagmire.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenQuagmire.java index ae2563ab8..b69d4b222 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenQuagmire.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenQuagmire.java @@ -73,11 +73,11 @@ public class BiomeGenQuagmire extends BOPBiome this.addGenerator("koru", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.3F).with(BOPPlants.KORU).create()); // water plants - this.addGenerator("lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(Blocks.waterlily.getDefaultState()).create()); + this.addGenerator("lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(Blocks.WATERLILY.getDefaultState()).create()); this.addGenerator("medium_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(BlockBOPLilypad.LilypadType.MEDIUM).create()); this.addGenerator("small_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(BlockBOPLilypad.LilypadType.SMALL).create()); this.addGenerator("tiny_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.3F).with(BlockBOPLilypad.LilypadType.TINY).create()); - this.addGenerator("algae", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.1F).replace(Blocks.water).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.ALGAE)).scatterYMethod(ScatterYMethod.AT_GROUND).create()); + this.addGenerator("algae", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.1F).replace(Blocks.WATER).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.ALGAE)).scatterYMethod(ScatterYMethod.AT_GROUND).create()); this.addGenerator("water_reeds", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.4F).with(BOPPlants.REED).generationAttempts(32).create()); // gem @@ -91,7 +91,7 @@ public class BiomeGenQuagmire extends BOPBiome if (!settings.generateBopGems) {this.removeGenerator("malachite");} IBlockPosQuery emptyMud = BlockQuery.buildAnd().withAirAbove().states(this.topBlock).create(); - if (!settings.generateBopSoils) {this.removeGenerator("grass_splatter"); this.addGenerator("grass_splatter_new", GeneratorStage.SAND, (new GeneratorSplatter.Builder()).amountPerChunk(1.0F).generationAttempts(128).replace(emptyMud).with(Blocks.grass.getDefaultState()).create());} + if (!settings.generateBopSoils) {this.removeGenerator("grass_splatter"); this.addGenerator("grass_splatter_new", GeneratorStage.SAND, (new GeneratorSplatter.Builder()).amountPerChunk(1.0F).generationAttempts(128).replace(emptyMud).with(Blocks.GRASS.getDefaultState()).create());} if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenRainforest.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenRainforest.java index 21068f623..48d40a937 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenRainforest.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenRainforest.java @@ -46,14 +46,14 @@ public class BiomeGenRainforest extends BOPBiome this.spawnableCreatureList.add(new SpawnListEntry(EntityButterfly.class, 6, 2, 4)); // aand - this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.sand.getDefaultState()).create()); + this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.SAND.getDefaultState()).create()); // trees & logs GeneratorWeighted treeGenerator = new GeneratorWeighted(20); this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); treeGenerator.add("birch", 4, (new GeneratorBasicTree.Builder()).log(BlockPlanks.EnumType.BIRCH).leaves(BlockPlanks.EnumType.BIRCH).minHeight(5).maxHeight(8).create()); treeGenerator.add("oak", 7, (new GeneratorBasicTree.Builder()).minHeight(8).maxHeight(12).altLeaves(BOPTrees.FLOWERING).create()); - treeGenerator.add("jungle", 1, (new GeneratorBasicTree.Builder()).minHeight(8).maxHeight(12).log(BlockPlanks.EnumType.JUNGLE).leaves(BlockPlanks.EnumType.JUNGLE).trunkFruit(Blocks.cocoa.getDefaultState()).create()); + treeGenerator.add("jungle", 1, (new GeneratorBasicTree.Builder()).minHeight(8).maxHeight(12).log(BlockPlanks.EnumType.JUNGLE).leaves(BlockPlanks.EnumType.JUNGLE).trunkFruit(Blocks.COCOA.getDefaultState()).create()); treeGenerator.add("large_oak", 4, (new GeneratorBigTree.Builder()).log(BlockPlanks.EnumType.OAK).leaves(BlockPlanks.EnumType.OAK).create()); // grasses @@ -80,10 +80,10 @@ public class BiomeGenRainforest extends BOPBiome this.addGenerator("leaf_piles", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(1.5F).with(BOPPlants.LEAFPILE).generationAttempts(64).create()); this.addGenerator("clover_patches", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(1.0F).with(BOPPlants.CLOVERPATCH).create()); this.addGenerator("rafflesia", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.3F).with(BOPPlants.RAFFLESIA).create()); - this.addGenerator("melons", GeneratorStage.FLOWERS, (new GeneratorFlora.Builder()).amountPerChunk(0.015625F).placeOn(this.topBlock).with(Blocks.melon_block.getDefaultState()).create()); + this.addGenerator("melons", GeneratorStage.FLOWERS, (new GeneratorFlora.Builder()).amountPerChunk(0.015625F).placeOn(this.topBlock).with(Blocks.MELON_BLOCK.getDefaultState()).create()); // water plants - this.addGenerator("lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(Blocks.waterlily.getDefaultState()).create()); + this.addGenerator("lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(Blocks.WATERLILY.getDefaultState()).create()); this.addGenerator("medium_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.3F).with(BlockBOPLilypad.LilypadType.MEDIUM).create()); this.addGenerator("small_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BlockBOPLilypad.LilypadType.SMALL).create()); this.addGenerator("tiny_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BlockBOPLilypad.LilypadType.TINY).create()); @@ -112,7 +112,7 @@ public class BiomeGenRainforest extends BOPBiome this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); treeGenerator.add("birch", 4, (new GeneratorBasicTree.Builder()).log(BlockPlanks.EnumType.BIRCH).leaves(BlockPlanks.EnumType.BIRCH).minHeight(5).maxHeight(8).create()); treeGenerator.add("oak", 7, (new GeneratorBasicTree.Builder()).minHeight(8).maxHeight(12).create()); - treeGenerator.add("jungle", 1, (new GeneratorBasicTree.Builder()).minHeight(8).maxHeight(12).log(BlockPlanks.EnumType.JUNGLE).leaves(BlockPlanks.EnumType.JUNGLE).trunkFruit(Blocks.cocoa.getDefaultState()).create()); + treeGenerator.add("jungle", 1, (new GeneratorBasicTree.Builder()).minHeight(8).maxHeight(12).log(BlockPlanks.EnumType.JUNGLE).leaves(BlockPlanks.EnumType.JUNGLE).trunkFruit(Blocks.COCOA.getDefaultState()).create()); treeGenerator.add("large_oak", 4, (new GeneratorBigTree.Builder()).log(BlockPlanks.EnumType.OAK).leaves(BlockPlanks.EnumType.OAK).create()); } diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenRedwoodForest.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenRedwoodForest.java index b4c619e49..72ab0eb42 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenRedwoodForest.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenRedwoodForest.java @@ -42,9 +42,9 @@ public class BiomeGenRedwoodForest extends BOPBiome // terrain this.terrainSettings.avgHeight(64).heightVariation(3, 7).octaves(0, 1, 2, 2, 1, 0); - this.topBlock = Blocks.grass.getDefaultState(); + this.topBlock = Blocks.GRASS.getDefaultState(); this.usualTopBlock = this.topBlock; - this.alternateTopBlock = Blocks.dirt.getDefaultState().withProperty(BlockDirt.VARIANT, BlockDirt.DirtType.PODZOL); + this.alternateTopBlock = Blocks.DIRT.getDefaultState().withProperty(BlockDirt.VARIANT, BlockDirt.DirtType.PODZOL); this.canGenerateVillages = false; @@ -53,7 +53,7 @@ public class BiomeGenRedwoodForest extends BOPBiome this.spawnableCreatureList.add(new SpawnListEntry(EntitySnail.class, 6, 1, 2)); // sand - this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.sand.getDefaultState()).create()); + this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.SAND.getDefaultState()).create()); // trees GeneratorWeighted treeGenerator = new GeneratorWeighted(25.0F); @@ -75,8 +75,8 @@ public class BiomeGenRedwoodForest extends BOPBiome this.addGenerator("leaf_piles", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.8F).with(BOPPlants.LEAFPILE).generationAttempts(64).create()); // shrooms - this.addGenerator("brown_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(Blocks.brown_mushroom.getDefaultState()).create()); - this.addGenerator("red_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(Blocks.red_mushroom.getDefaultState()).create()); + this.addGenerator("brown_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(Blocks.BROWN_MUSHROOM.getDefaultState()).create()); + this.addGenerator("red_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(Blocks.RED_MUSHROOM.getDefaultState()).create()); // grasses GeneratorWeighted grassGenerator = new GeneratorWeighted(10.0F); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenSacredSprings.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenSacredSprings.java index 15aa9d578..cbf5e1408 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenSacredSprings.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenSacredSprings.java @@ -78,7 +78,7 @@ public class BiomeGenSacredSprings extends BOPBiome this.addGenerator("rafflesia", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(BOPPlants.RAFFLESIA).create()); // water plants - this.addGenerator("lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(Blocks.waterlily.getDefaultState()).create()); + this.addGenerator("lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(Blocks.WATERLILY.getDefaultState()).create()); this.addGenerator("medium_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.3F).with(BlockBOPLilypad.LilypadType.MEDIUM).create()); this.addGenerator("small_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BlockBOPLilypad.LilypadType.SMALL).create()); this.addGenerator("tiny_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BlockBOPLilypad.LilypadType.TINY).create()); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenSeasonalForest.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenSeasonalForest.java index d5d04987e..1151f9b12 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenSeasonalForest.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenSeasonalForest.java @@ -48,7 +48,7 @@ public class BiomeGenSeasonalForest extends BOPBiome this.spawnableCreatureList.add(new SpawnListEntry(EntitySnail.class, 6, 1, 2)); // sand - this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.sand.getDefaultState()).create()); + this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.SAND.getDefaultState()).create()); // trees & logs GeneratorWeighted treeGenerator = new GeneratorWeighted(15); @@ -86,8 +86,8 @@ public class BiomeGenSeasonalForest extends BOPBiome this.addGenerator("flat_mushroom", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(BlockBOPMushroom.MushroomType.FLAT_MUSHROOM).create()); this.addGenerator("toadstools", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.4F).with(BlockBOPMushroom.MushroomType.TOADSTOOL).create()); this.addGenerator("blue_milk_caps", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(BlockBOPMushroom.MushroomType.BLUE_MILK_CAP).create()); - this.addGenerator("brown_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(Blocks.brown_mushroom.getDefaultState()).create()); - this.addGenerator("red_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(Blocks.red_mushroom.getDefaultState()).create()); + this.addGenerator("brown_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(Blocks.BROWN_MUSHROOM.getDefaultState()).create()); + this.addGenerator("red_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(Blocks.RED_MUSHROOM.getDefaultState()).create()); // water plants this.addGenerator("water_reeds", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(2.0F).with(BOPPlants.REED).generationAttempts(32).create()); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenShield.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenShield.java index cca9f9894..2e6ac9dd1 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenShield.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenShield.java @@ -53,9 +53,9 @@ public class BiomeGenShield extends BOPBiome // terrain this.terrainSettings.avgHeight(63).heightVariation(10, 10).sidewaysNoise(0.1D).octaves(1, 4, 3, 1, 1, 0); - this.topBlock = Blocks.grass.getDefaultState(); + this.topBlock = Blocks.GRASS.getDefaultState(); this.usualTopBlock = this.topBlock; - this.alternateTopBlock = Blocks.stone.getDefaultState(); + this.alternateTopBlock = Blocks.STONE.getDefaultState(); this.canGenerateVillages = false; @@ -67,7 +67,7 @@ public class BiomeGenShield extends BOPBiome this.addWeight(BOPClimates.BOREAL, 5); // gravel - this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(12).maxRadius(7).with(Blocks.gravel.getDefaultState()).create()); + this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(12).maxRadius(7).with(Blocks.GRAVEL.getDefaultState()).create()); // grasses GeneratorWeighted grassGenerator = new GeneratorWeighted(2.0F); @@ -99,11 +99,11 @@ public class BiomeGenShield extends BOPBiome // shrooms this.addGenerator("flat_mushroom", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(BlockBOPMushroom.MushroomType.FLAT_MUSHROOM).create()); this.addGenerator("toadstools", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(BlockBOPMushroom.MushroomType.TOADSTOOL).create()); - this.addGenerator("brown_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(Blocks.brown_mushroom.getDefaultState()).create()); - this.addGenerator("red_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(Blocks.red_mushroom.getDefaultState()).create()); + this.addGenerator("brown_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(Blocks.BROWN_MUSHROOM.getDefaultState()).create()); + this.addGenerator("red_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(Blocks.RED_MUSHROOM.getDefaultState()).create()); // water plants - this.addGenerator("algae", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).replace(Blocks.water).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.ALGAE)).scatterYMethod(ScatterYMethod.AT_GROUND).create()); + this.addGenerator("algae", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).replace(Blocks.WATER).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.ALGAE)).scatterYMethod(ScatterYMethod.AT_GROUND).create()); this.addGenerator("water_reeds", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(1.4F).with(BOPPlants.REED).generationAttempts(32).create()); // gem diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenShrubland.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenShrubland.java index 7fc83c76e..18ce2714c 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenShrubland.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenShrubland.java @@ -52,8 +52,8 @@ public class BiomeGenShrubland extends BOPBiome this.spawnableCreatureList.add(new SpawnListEntry(EntityHorse.class, 5, 2, 6)); // sand and gravel - this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.sand.getDefaultState()).create()); - this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(4).maxRadius(7).with(Blocks.gravel.getDefaultState()).create()); + this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.SAND.getDefaultState()).create()); + this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(4).maxRadius(7).with(Blocks.GRAVEL.getDefaultState()).create()); // other plants this.addGenerator("berry_bushes", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(BOPPlants.BERRYBUSH).create()); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenSnowyConiferousForest.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenSnowyConiferousForest.java index 487359e0d..958126a9c 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenSnowyConiferousForest.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenSnowyConiferousForest.java @@ -44,7 +44,7 @@ public class BiomeGenSnowyConiferousForest extends BOPBiome this.spawnableCreatureList.add(new SpawnListEntry(EntityWolf.class, 8, 4, 4)); // gravel - this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(4).maxRadius(7).with(Blocks.gravel.getDefaultState()).create()); + this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(4).maxRadius(7).with(Blocks.GRAVEL.getDefaultState()).create()); // trees GeneratorWeighted treeGenerator = new GeneratorWeighted(8.0F); @@ -58,8 +58,8 @@ public class BiomeGenSnowyConiferousForest extends BOPBiome this.addGenerator("leaf_piles", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(BOPPlants.LEAFPILE).generationAttempts(64).create()); // shrooms - this.addGenerator("brown_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(Blocks.brown_mushroom.getDefaultState()).create()); - this.addGenerator("red_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(Blocks.red_mushroom.getDefaultState()).create()); + this.addGenerator("brown_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(Blocks.BROWN_MUSHROOM.getDefaultState()).create()); + this.addGenerator("red_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(Blocks.RED_MUSHROOM.getDefaultState()).create()); // flowers GeneratorWeighted flowerGenerator = new GeneratorWeighted(0.1F); @@ -88,7 +88,7 @@ public class BiomeGenSnowyConiferousForest extends BOPBiome { if (!settings.generateBopGems) {this.removeGenerator("tanzanite");} - if (!settings.generateBopSoils) {this.topBlock = Blocks.grass.getDefaultState(); this.fillerBlock = Blocks.dirt.getDefaultState();} + if (!settings.generateBopSoils) {this.topBlock = Blocks.GRASS.getDefaultState(); this.fillerBlock = Blocks.DIRT.getDefaultState();} if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenSteppe.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenSteppe.java index da102b35a..75bdebd60 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenSteppe.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenSteppe.java @@ -8,8 +8,6 @@ package biomesoplenty.common.biome.overworld; -import java.util.Random; - import biomesoplenty.api.biome.BOPBiome; import biomesoplenty.api.biome.BOPBiomes; import biomesoplenty.api.biome.generation.GeneratorStage; @@ -34,6 +32,8 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraft.world.chunk.ChunkPrimer; +import java.util.Random; + public class BiomeGenSteppe extends BOPBiome { public IBlockState usualTopBlock; @@ -66,10 +66,10 @@ public class BiomeGenSteppe extends BOPBiome // should the Steppe not have some splattered gravel and coarse dirt? // sand - this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.sand.getDefaultState()).create()); + this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.SAND.getDefaultState()).create()); // other plants - this.addGenerator("dead_bushes", GeneratorStage.DEAD_BUSH,(new GeneratorFlora.Builder()).amountPerChunk(0.3F).with(Blocks.deadbush.getDefaultState()).generationAttempts(4).create()); + this.addGenerator("dead_bushes", GeneratorStage.DEAD_BUSH,(new GeneratorFlora.Builder()).amountPerChunk(0.3F).with(Blocks.DEADBUSH.getDefaultState()).generationAttempts(4).create()); this.addGenerator("desertgrass", GeneratorStage.GRASS, (new GeneratorGrass.Builder()).amountPerChunk(12.0F).with(BOPPlants.DESERTGRASS).generationAttempts(8).create()); // grasses @@ -97,7 +97,7 @@ public class BiomeGenSteppe extends BOPBiome { if (!settings.generateBopGems) {this.removeGenerator("ruby");} - if (!settings.generateBopSoils) {this.topBlock = Blocks.grass.getDefaultState(); this.usualTopBlock = Blocks.grass.getDefaultState(); this.fillerBlock = Blocks.dirt.getDefaultState();} + if (!settings.generateBopSoils) {this.topBlock = Blocks.GRASS.getDefaultState(); this.usualTopBlock = Blocks.GRASS.getDefaultState(); this.fillerBlock = Blocks.DIRT.getDefaultState();} if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenTemperateRainforest.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenTemperateRainforest.java index aac24e936..f22e15efc 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenTemperateRainforest.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenTemperateRainforest.java @@ -56,8 +56,8 @@ public class BiomeGenTemperateRainforest extends BOPBiome this.spawnableCreatureList.add(new SpawnListEntry(EntitySnail.class, 6, 1, 2)); // sand and gravel - this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.sand.getDefaultState()).create()); - this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(4).maxRadius(7).with(Blocks.gravel.getDefaultState()).create()); + this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.SAND.getDefaultState()).create()); + this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(4).maxRadius(7).with(Blocks.GRAVEL.getDefaultState()).create()); // trees GeneratorWeighted treeGenerator = new GeneratorWeighted(20.0F); @@ -81,8 +81,8 @@ public class BiomeGenTemperateRainforest extends BOPBiome this.addGenerator("flat_mushroom", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(BlockBOPMushroom.MushroomType.FLAT_MUSHROOM).create()); this.addGenerator("toadstools", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.4F).with(BlockBOPMushroom.MushroomType.TOADSTOOL).create()); this.addGenerator("blue_milk_caps", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(BlockBOPMushroom.MushroomType.BLUE_MILK_CAP).create()); - this.addGenerator("brown_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(Blocks.brown_mushroom.getDefaultState()).create()); - this.addGenerator("red_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(Blocks.red_mushroom.getDefaultState()).create()); + this.addGenerator("brown_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(Blocks.BROWN_MUSHROOM.getDefaultState()).create()); + this.addGenerator("red_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(Blocks.RED_MUSHROOM.getDefaultState()).create()); // flowers GeneratorWeighted flowerGenerator = new GeneratorWeighted(0.5F); @@ -91,11 +91,11 @@ public class BiomeGenTemperateRainforest extends BOPBiome flowerGenerator.add("poppy", 1, (new GeneratorFlora.Builder().with(BlockFlower.EnumFlowerType.POPPY).create())); // water plants - this.addGenerator("lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(Blocks.waterlily.getDefaultState()).create()); + this.addGenerator("lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(Blocks.WATERLILY.getDefaultState()).create()); this.addGenerator("medium_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.3F).with(BlockBOPLilypad.LilypadType.MEDIUM).create()); this.addGenerator("small_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BlockBOPLilypad.LilypadType.SMALL).create()); this.addGenerator("tiny_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BlockBOPLilypad.LilypadType.TINY).create()); - this.addGenerator("algae", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(3.0F).replace(Blocks.water).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.ALGAE)).scatterYMethod(ScatterYMethod.AT_GROUND).create()); + this.addGenerator("algae", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(3.0F).replace(Blocks.WATER).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.ALGAE)).scatterYMethod(ScatterYMethod.AT_GROUND).create()); this.addGenerator("water_reeds", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BOPPlants.REED).generationAttempts(32).create()); this.addGenerator("flower_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.25F).with(BlockBOPLilypad.LilypadType.FLOWER).create()); @@ -137,7 +137,7 @@ public class BiomeGenTemperateRainforest extends BOPBiome treeGenerator.add("small_cedar", 3, (new GeneratorTaigaTree.Builder()).log(BlockPlanks.EnumType.OAK).leaves(BlockPlanks.EnumType.OAK).minHeight(5).maxHeight(15).create()); treeGenerator.add("cedar", 5, (new GeneratorTaigaTree.Builder()).log(BlockPlanks.EnumType.OAK).leaves(BlockPlanks.EnumType.OAK).minHeight(20).maxHeight(40).create()); treeGenerator.add("oak_bush", 5, (new GeneratorBush.Builder()).maxHeight(2).create()); - treeGenerator.add("willow", 1, (new GeneratorBasicTree.Builder()).log(BlockPlanks.EnumType.OAK).leaves(Blocks.leaves.getStateFromMeta(BlockPlanks.EnumType.OAK.getMetadata()).withProperty(BlockOldLeaf.CHECK_DECAY, Boolean.valueOf(false))).vine(Blocks.leaves.getStateFromMeta(BlockPlanks.EnumType.OAK.getMetadata()).withProperty(BlockOldLeaf.CHECK_DECAY, Boolean.valueOf(false))).leavesOffset(0).create()); + treeGenerator.add("willow", 1, (new GeneratorBasicTree.Builder()).log(BlockPlanks.EnumType.OAK).leaves(Blocks.LEAVES.getStateFromMeta(BlockPlanks.EnumType.OAK.getMetadata()).withProperty(BlockOldLeaf.CHECK_DECAY, Boolean.valueOf(false))).vine(Blocks.LEAVES.getStateFromMeta(BlockPlanks.EnumType.OAK.getMetadata()).withProperty(BlockOldLeaf.CHECK_DECAY, Boolean.valueOf(false))).leavesOffset(0).create()); } GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass"); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenTropicalIsland.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenTropicalIsland.java index 242d55f1a..bdedf3d72 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenTropicalIsland.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenTropicalIsland.java @@ -13,18 +13,13 @@ import biomesoplenty.api.biome.generation.GeneratorStage; import biomesoplenty.api.biome.generation.GeneratorWeighted; import biomesoplenty.common.block.BlockBOPLeaves; import biomesoplenty.common.entities.EntityButterfly; -import biomesoplenty.common.enums.BOPFlowers; -import biomesoplenty.common.enums.BOPGems; -import biomesoplenty.common.enums.BOPPlants; -import biomesoplenty.common.enums.BOPTrees; -import biomesoplenty.common.enums.BOPWoods; +import biomesoplenty.common.enums.*; import biomesoplenty.common.world.BOPWorldSettings; import biomesoplenty.common.world.feature.GeneratorFlora; import biomesoplenty.common.world.feature.GeneratorGrass; import biomesoplenty.common.world.feature.GeneratorOreSingle; import biomesoplenty.common.world.feature.GeneratorWaterside; import biomesoplenty.common.world.feature.tree.GeneratorPalmTree; -import biomesoplenty.common.world.feature.tree.GeneratorTaigaTree; import biomesoplenty.common.world.feature.tree.GeneratorTwigletTree; import net.minecraft.block.BlockFlower; import net.minecraft.block.BlockOldLeaf; @@ -54,13 +49,13 @@ public class BiomeGenTropicalIsland extends BOPBiome clearWeights(); // sand - this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(10).maxRadius(7).with(Blocks.sand.getDefaultState()).create()); + this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(10).maxRadius(7).with(Blocks.SAND.getDefaultState()).create()); // trees GeneratorWeighted treeGenerator = new GeneratorWeighted(25.0F); this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); treeGenerator.add("palm", 4, (new GeneratorPalmTree.Builder()).log(BOPWoods.PALM).leaves(BlockBOPLeaves.paging.getVariantState(BOPTrees.PALM).withProperty(BlockOldLeaf.CHECK_DECAY, Boolean.valueOf(false))).create()); - treeGenerator.add("jungle_twiglet", 2, (new GeneratorTwigletTree.Builder()).minHeight(2).maxHeight(2).log(BlockPlanks.EnumType.JUNGLE).leaves(BlockPlanks.EnumType.JUNGLE).trunkFruit(Blocks.cocoa.getDefaultState()).create()); + treeGenerator.add("jungle_twiglet", 2, (new GeneratorTwigletTree.Builder()).minHeight(2).maxHeight(2).log(BlockPlanks.EnumType.JUNGLE).leaves(BlockPlanks.EnumType.JUNGLE).trunkFruit(Blocks.COCOA.getDefaultState()).create()); // grasses GeneratorWeighted grassGenerator = new GeneratorWeighted(4.0F); @@ -74,7 +69,7 @@ public class BiomeGenTropicalIsland extends BOPBiome this.addGenerator("leaf_piles", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(BOPPlants.LEAFPILE).create()); this.addGenerator("sprouts", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(BOPPlants.SPROUT).create()); this.addGenerator("shrubs", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(BOPPlants.SHRUB).create()); - this.addGenerator("melons", GeneratorStage.FLOWERS, (new GeneratorFlora.Builder()).amountPerChunk(0.015625F).placeOn(this.topBlock).with(Blocks.melon_block.getDefaultState()).create()); + this.addGenerator("melons", GeneratorStage.FLOWERS, (new GeneratorFlora.Builder()).amountPerChunk(0.015625F).placeOn(this.topBlock).with(Blocks.MELON_BLOCK.getDefaultState()).create()); // flowers GeneratorWeighted flowerGenerator = new GeneratorWeighted(2.0F); @@ -103,8 +98,8 @@ public class BiomeGenTropicalIsland extends BOPBiome GeneratorWeighted treeGenerator = new GeneratorWeighted(25.0F); this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); - treeGenerator.add("palm", 4, (new GeneratorPalmTree.Builder()).log(BlockPlanks.EnumType.JUNGLE).leaves(Blocks.leaves.getStateFromMeta(BlockPlanks.EnumType.JUNGLE.getMetadata()).withProperty(BlockOldLeaf.CHECK_DECAY, Boolean.valueOf(false))).create()); - treeGenerator.add("jungle_twiglet", 2, (new GeneratorTwigletTree.Builder()).minHeight(2).maxHeight(2).log(BlockPlanks.EnumType.JUNGLE).leaves(BlockPlanks.EnumType.JUNGLE).trunkFruit(Blocks.cocoa.getDefaultState()).create()); + treeGenerator.add("palm", 4, (new GeneratorPalmTree.Builder()).log(BlockPlanks.EnumType.JUNGLE).leaves(Blocks.LEAVES.getStateFromMeta(BlockPlanks.EnumType.JUNGLE.getMetadata()).withProperty(BlockOldLeaf.CHECK_DECAY, Boolean.valueOf(false))).create()); + treeGenerator.add("jungle_twiglet", 2, (new GeneratorTwigletTree.Builder()).minHeight(2).maxHeight(2).log(BlockPlanks.EnumType.JUNGLE).leaves(BlockPlanks.EnumType.JUNGLE).trunkFruit(Blocks.COCOA.getDefaultState()).create()); } GeneratorWeighted flowerGen = (GeneratorWeighted)this.getGenerator("flowers"); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenTropicalRainforest.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenTropicalRainforest.java index c9d890169..7c123447c 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenTropicalRainforest.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenTropicalRainforest.java @@ -49,7 +49,7 @@ public class BiomeGenTropicalRainforest extends BOPBiome this.spawnableMonsterList.add(new SpawnListEntry(EntityOcelot.class, 2, 1, 1)); // sand - this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.sand.getDefaultState()).create()); + this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.SAND.getDefaultState()).create()); // quicksand this.addGenerator("quicksand", GeneratorStage.SAND, (new GeneratorLakes.Builder()).amountPerChunk(0.2F).waterLakeForBiome(this).liquid(BOPBlocks.sand.getDefaultState().withProperty(BlockBOPSand.VARIANT, BlockBOPSand.SandType.QUICKSAND)).frozenLiquid((IBlockState)null).create()); @@ -58,7 +58,7 @@ public class BiomeGenTropicalRainforest extends BOPBiome GeneratorWeighted treeGenerator = new GeneratorWeighted(15.0F); this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); treeGenerator.add("mahogany", 6, (new GeneratorMahoganyTree.Builder()).create()); - treeGenerator.add("jungle", 2, (new GeneratorBasicTree.Builder()).log(BlockPlanks.EnumType.JUNGLE).leaves(BlockPlanks.EnumType.JUNGLE).minHeight(8).maxHeight(12).trunkFruit(Blocks.cocoa.getDefaultState()).vine(Blocks.vine.getDefaultState()).create()); + treeGenerator.add("jungle", 2, (new GeneratorBasicTree.Builder()).log(BlockPlanks.EnumType.JUNGLE).leaves(BlockPlanks.EnumType.JUNGLE).minHeight(8).maxHeight(12).trunkFruit(Blocks.COCOA.getDefaultState()).vine(Blocks.VINE.getDefaultState()).create()); // flowers GeneratorWeighted flowerGenerator = new GeneratorWeighted(1.5F); @@ -74,18 +74,18 @@ public class BiomeGenTropicalRainforest extends BOPBiome this.addGenerator("double_fern", GeneratorStage.FLOWERS, (new GeneratorDoubleFlora.Builder()).amountPerChunk(0.2F).with(BlockDoublePlant.EnumPlantType.FERN).create()); this.addGenerator("sprouts", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(1.0F).with(BOPPlants.SPROUT).create()); this.addGenerator("rafflesia", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.3F).with(BOPPlants.RAFFLESIA).create()); - this.addGenerator("melons", GeneratorStage.FLOWERS, (new GeneratorFlora.Builder()).amountPerChunk(0.015625F).placeOn(this.topBlock).with(Blocks.melon_block.getDefaultState()).create()); + this.addGenerator("melons", GeneratorStage.FLOWERS, (new GeneratorFlora.Builder()).amountPerChunk(0.015625F).placeOn(this.topBlock).with(Blocks.MELON_BLOCK.getDefaultState()).create()); // shrooms - this.addGenerator("brown_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(Blocks.brown_mushroom.getDefaultState()).create()); - this.addGenerator("red_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(Blocks.red_mushroom.getDefaultState()).create()); + this.addGenerator("brown_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(Blocks.BROWN_MUSHROOM.getDefaultState()).create()); + this.addGenerator("red_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(Blocks.RED_MUSHROOM.getDefaultState()).create()); // water plants - this.addGenerator("lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(Blocks.waterlily.getDefaultState()).create()); + this.addGenerator("lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(Blocks.WATERLILY.getDefaultState()).create()); this.addGenerator("medium_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.3F).with(BlockBOPLilypad.LilypadType.MEDIUM).create()); this.addGenerator("small_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BlockBOPLilypad.LilypadType.SMALL).create()); this.addGenerator("tiny_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BlockBOPLilypad.LilypadType.TINY).create()); - this.addGenerator("algae", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(3.0F).replace(Blocks.water).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.ALGAE)).scatterYMethod(ScatterYMethod.AT_GROUND).create()); + this.addGenerator("algae", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(3.0F).replace(Blocks.WATER).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.ALGAE)).scatterYMethod(ScatterYMethod.AT_GROUND).create()); this.addGenerator("flower_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.25F).with(BlockBOPLilypad.LilypadType.FLOWER).create()); // grasses @@ -120,7 +120,7 @@ public class BiomeGenTropicalRainforest extends BOPBiome GeneratorWeighted treeGenerator = new GeneratorWeighted(15.0F); this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); treeGenerator.add("mahogany", 6, (new GeneratorMahoganyTree.Builder()).log(BlockPlanks.EnumType.JUNGLE).leaves(BlockPlanks.EnumType.JUNGLE).create()); - treeGenerator.add("jungle", 2, (new GeneratorBasicTree.Builder()).log(BlockPlanks.EnumType.JUNGLE).leaves(BlockPlanks.EnumType.JUNGLE).minHeight(8).maxHeight(12).trunkFruit(Blocks.cocoa.getDefaultState()).vine(Blocks.vine.getDefaultState()).create()); + treeGenerator.add("jungle", 2, (new GeneratorBasicTree.Builder()).log(BlockPlanks.EnumType.JUNGLE).leaves(BlockPlanks.EnumType.JUNGLE).minHeight(8).maxHeight(12).trunkFruit(Blocks.COCOA.getDefaultState()).vine(Blocks.VINE.getDefaultState()).create()); } GeneratorWeighted flowerGen = (GeneratorWeighted)this.getGenerator("flowers"); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenTundra.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenTundra.java index e1ecefe1a..e5e9b3a2f 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenTundra.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenTundra.java @@ -52,10 +52,10 @@ public class BiomeGenTundra extends BOPBiome this.spawnableCreatureList.clear(); // boulders - this.addGenerator("boulders", GeneratorStage.SAND, (new GeneratorBlobs.Builder()).amountPerChunk(0.5F).placeOn(Blocks.grass).with(Blocks.cobblestone.getDefaultState()).minRadius(0.3F).maxRadius(1.2F).numBalls(1).scatterYMethod(ScatterYMethod.AT_SURFACE).create()); + this.addGenerator("boulders", GeneratorStage.SAND, (new GeneratorBlobs.Builder()).amountPerChunk(0.5F).placeOn(Blocks.GRASS).with(Blocks.COBBLESTONE.getDefaultState()).minRadius(0.3F).maxRadius(1.2F).numBalls(1).scatterYMethod(ScatterYMethod.AT_SURFACE).create()); // gravel - this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(12).maxRadius(7).with(Blocks.gravel.getDefaultState()).create()); + this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(12).maxRadius(7).with(Blocks.GRAVEL.getDefaultState()).create()); // lakes this.addGenerator("lakes", GeneratorStage.SAND, (new GeneratorLakes.Builder()).amountPerChunk(0.3F).waterLakeForBiome(this).create()); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenVolcanicIsland.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenVolcanicIsland.java index cab6b1ad9..ea8d2cb16 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenVolcanicIsland.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenVolcanicIsland.java @@ -48,10 +48,10 @@ public class BiomeGenVolcanicIsland extends BOPBiome // lava IBlockPosQuery emptyAshBlock = BlockQuery.buildAnd().withAirAbove().states(this.topBlock).create(); - this.addGenerator("lava_flows", GeneratorStage.FLOWERS,(new GeneratorSplotches.Builder()).placeOn(emptyAshBlock).replace(BOPBlocks.ash_block).amountPerChunk(0.1F).splotchSize(12).scatterYMethod(ScatterYMethod.AT_SURFACE).with(Blocks.flowing_lava.getDefaultState()).create()); + this.addGenerator("lava_flows", GeneratorStage.FLOWERS,(new GeneratorSplotches.Builder()).placeOn(emptyAshBlock).replace(BOPBlocks.ash_block).amountPerChunk(0.1F).splotchSize(12).scatterYMethod(ScatterYMethod.AT_SURFACE).with(Blocks.FLOWING_LAVA.getDefaultState()).create()); this.addGenerator("lava_lakes", GeneratorStage.SAND, (new GeneratorLakes.Builder()).amountPerChunk(2.5F).lavaLake().create()); // gem - this.addGenerator("emeralds", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(Blocks.emerald_ore.getDefaultState()).create()); + this.addGenerator("emeralds", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(Blocks.EMERALD_ORE.getDefaultState()).create()); } } diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenWasteland.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenWasteland.java index 39836bb29..8008a6d64 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenWasteland.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenWasteland.java @@ -60,7 +60,7 @@ public class BiomeGenWasteland extends BOPBiome IBlockPosQuery emptyDriedSand = BlockQuery.buildAnd().withAirAbove().states(this.topBlock).create(); GeneratorWeighted treeGenerator = new GeneratorWeighted(0.3F); this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); - treeGenerator.add("dead_tree", 3, (new GeneratorBigTree.Builder()).placeOn(emptyDriedSand).minHeight(5).maxHeight(12).foliageHeight(0).foliageDensity(0.5D).log(BOPWoods.DEAD).leaves(Blocks.air.getDefaultState()).create()); + treeGenerator.add("dead_tree", 3, (new GeneratorBigTree.Builder()).placeOn(emptyDriedSand).minHeight(5).maxHeight(12).foliageHeight(0).foliageDensity(0.5D).log(BOPWoods.DEAD).leaves(Blocks.AIR.getDefaultState()).create()); treeGenerator.add("dying_tree", 1, (new GeneratorBigTree.Builder()).placeOn(emptyDriedSand).minHeight(5).maxHeight(12).foliageHeight(1).log(BOPWoods.DEAD).leaves(BOPTrees.DEAD).create()); // other plants @@ -103,7 +103,7 @@ public class BiomeGenWasteland extends BOPBiome IBlockPosQuery emptyDriedSand = BlockQuery.buildAnd().withAirAbove().states(this.topBlock).create(); GeneratorWeighted treeGenerator = new GeneratorWeighted(0.3F); this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); - treeGenerator.add("dead_tree", 3, (new GeneratorBigTree.Builder()).placeOn(emptyDriedSand).minHeight(5).maxHeight(12).foliageHeight(0).foliageDensity(0.5D).log(BlockPlanks.EnumType.OAK).leaves(Blocks.air.getDefaultState()).create()); + treeGenerator.add("dead_tree", 3, (new GeneratorBigTree.Builder()).placeOn(emptyDriedSand).minHeight(5).maxHeight(12).foliageHeight(0).foliageDensity(0.5D).log(BlockPlanks.EnumType.OAK).leaves(Blocks.AIR.getDefaultState()).create()); treeGenerator.add("dying_tree", 1, (new GeneratorBigTree.Builder()).placeOn(emptyDriedSand).minHeight(5).maxHeight(12).foliageHeight(1).log(BlockPlanks.EnumType.DARK_OAK).leaves(BlockPlanks.EnumType.DARK_OAK).create()); } diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenWetland.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenWetland.java index 9a9b93207..c3f7df8fd 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenWetland.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenWetland.java @@ -103,15 +103,15 @@ public class BiomeGenWetland extends BOPBiome this.addGenerator("double_cattail", GeneratorStage.FLOWERS, (new GeneratorDoubleFlora.Builder()).amountPerChunk(10.0F).with(BlockBOPDoublePlant.DoublePlantType.TALL_CATTAIL).create()); this.addGenerator("leaf_piles", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BOPPlants.LEAFPILE).create()); this.addGenerator("dead_leaf_piles", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(BOPPlants.DEADLEAFPILE).create()); - this.addGenerator("sugar_cane", GeneratorStage.FLOWERS,(new GeneratorColumns.Builder()).amountPerChunk(1.0F).generationAttempts(24).placeOn(BlockQueries.litFertileWaterside).with(Blocks.reeds.getDefaultState()).minHeight(1).maxHeight(3).create()); + this.addGenerator("sugar_cane", GeneratorStage.FLOWERS,(new GeneratorColumns.Builder()).amountPerChunk(1.0F).generationAttempts(24).placeOn(BlockQueries.litFertileWaterside).with(Blocks.REEDS.getDefaultState()).minHeight(1).maxHeight(3).create()); this.addGenerator("river_cane", GeneratorStage.FLOWERS,(new GeneratorColumns.Builder()).amountPerChunk(2.0F).generationAttempts(24).placeOn(BlockQueries.litFertileWaterside).with(BlockBOPPlant.paging.getVariantState(BOPPlants.RIVERCANE)).minHeight(1).maxHeight(3).create()); // water plants - this.addGenerator("lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(Blocks.waterlily.getDefaultState()).create()); + this.addGenerator("lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(Blocks.WATERLILY.getDefaultState()).create()); this.addGenerator("medium_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.3F).with(BlockBOPLilypad.LilypadType.MEDIUM).create()); this.addGenerator("small_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BlockBOPLilypad.LilypadType.SMALL).create()); this.addGenerator("tiny_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BlockBOPLilypad.LilypadType.TINY).create()); - this.addGenerator("algae", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(3.0F).replace(Blocks.water).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.ALGAE)).scatterYMethod(ScatterYMethod.AT_GROUND).create()); + this.addGenerator("algae", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(3.0F).replace(Blocks.WATER).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.ALGAE)).scatterYMethod(ScatterYMethod.AT_GROUND).create()); this.addGenerator("water_reeds", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(1.0F).with(BOPPlants.REED).generationAttempts(32).create()); this.addGenerator("flower_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.35F).with(BlockBOPLilypad.LilypadType.FLOWER).create()); @@ -119,8 +119,8 @@ public class BiomeGenWetland extends BOPBiome this.addGenerator("flat_mushroom", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(BlockBOPMushroom.MushroomType.FLAT_MUSHROOM).create()); this.addGenerator("toadstools", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.4F).with(BlockBOPMushroom.MushroomType.TOADSTOOL).create()); this.addGenerator("blue_milk_caps", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(BlockBOPMushroom.MushroomType.BLUE_MILK_CAP).create()); - this.addGenerator("red_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.3F).with(Blocks.red_mushroom.getDefaultState()).create()); - this.addGenerator("brown_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(Blocks.brown_mushroom.getDefaultState()).create()); + this.addGenerator("red_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.3F).with(Blocks.RED_MUSHROOM.getDefaultState()).create()); + this.addGenerator("brown_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(Blocks.BROWN_MUSHROOM.getDefaultState()).create()); // gem this.addGenerator("malachite", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(BOPGems.MALACHITE).create()); @@ -145,7 +145,7 @@ public class BiomeGenWetland extends BOPBiome GeneratorWeighted treeGenerator = new GeneratorWeighted(10); this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); - treeGenerator.add("willow", 3, (new GeneratorBasicTree.Builder()).log(BlockPlanks.EnumType.OAK).leaves(Blocks.leaves.getStateFromMeta(BlockPlanks.EnumType.OAK.getMetadata()).withProperty(BlockOldLeaf.CHECK_DECAY, Boolean.valueOf(false))).minHeight(8).maxHeight(12).maxLeavesRadius(2).vine(Blocks.leaves.getStateFromMeta(BlockPlanks.EnumType.OAK.getMetadata()).withProperty(BlockOldLeaf.CHECK_DECAY, Boolean.valueOf(false))).leavesOffset(0).create()); + treeGenerator.add("willow", 3, (new GeneratorBasicTree.Builder()).log(BlockPlanks.EnumType.OAK).leaves(Blocks.LEAVES.getStateFromMeta(BlockPlanks.EnumType.OAK.getMetadata()).withProperty(BlockOldLeaf.CHECK_DECAY, Boolean.valueOf(false))).minHeight(8).maxHeight(12).maxLeavesRadius(2).vine(Blocks.LEAVES.getStateFromMeta(BlockPlanks.EnumType.OAK.getMetadata()).withProperty(BlockOldLeaf.CHECK_DECAY, Boolean.valueOf(false))).leavesOffset(0).create()); treeGenerator.add("spruce", 5, (new GeneratorTaigaTree.Builder()).maxHeight(13).create()); // TODO: implement pine cones } diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenWoodland.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenWoodland.java index 81d254467..b9f460be5 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenWoodland.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenWoodland.java @@ -56,7 +56,7 @@ public class BiomeGenWoodland extends BOPBiome this.spawnableCreatureList.add(new SpawnListEntry(EntityButterfly.class, 6, 2, 4)); // sand - this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.sand.getDefaultState()).create()); + this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.SAND.getDefaultState()).create()); // trees GeneratorWeighted treeGenerator = new GeneratorWeighted(10); @@ -73,7 +73,7 @@ public class BiomeGenWoodland extends BOPBiome grassGenerator.add("tallgrass", 2, (new GeneratorGrass.Builder()).with(BlockTallGrass.EnumType.GRASS).create()); // gravel - this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(4).maxRadius(7).with(Blocks.gravel.getDefaultState()).create()); + this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(4).maxRadius(7).with(Blocks.GRAVEL.getDefaultState()).create()); // flowers GeneratorWeighted flowerGenerator = new GeneratorWeighted(0.5F); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenXericShrubland.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenXericShrubland.java index 216e503de..882d83f61 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenXericShrubland.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenXericShrubland.java @@ -8,8 +8,6 @@ package biomesoplenty.common.biome.overworld; -import java.util.Random; - import biomesoplenty.api.biome.BOPBiome; import biomesoplenty.api.biome.generation.GeneratorStage; import biomesoplenty.api.biome.generation.GeneratorWeighted; @@ -36,6 +34,8 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraft.world.chunk.ChunkPrimer; +import java.util.Random; + public class BiomeGenXericShrubland extends BOPBiome { public IBlockState usualTopBlock; @@ -48,8 +48,8 @@ public class BiomeGenXericShrubland extends BOPBiome // terrain this.terrainSettings.avgHeight(64).heightVariation(1, 5); - this.topBlock = Blocks.sand.getDefaultState(); - this.fillerBlock = Blocks.sand.getDefaultState(); + this.topBlock = Blocks.SAND.getDefaultState(); + this.fillerBlock = Blocks.SAND.getDefaultState(); this.usualTopBlock = this.topBlock; this.alternateTopBlock = BOPBlocks.grass.getDefaultState().withProperty(BlockBOPGrass.VARIANT, BlockBOPGrass.BOPGrassType.SANDY); @@ -64,7 +64,7 @@ public class BiomeGenXericShrubland extends BOPBiome GeneratorWeighted treeGenerator = new GeneratorWeighted(5.0F); this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); treeGenerator.add("brush_twiglet", 1, (new GeneratorTwigletTree.Builder()).placeOn(this.topBlock).minHeight(1).maxHeight(2).log(BlockPlanks.EnumType.ACACIA).leaves(BlockPlanks.EnumType.ACACIA).create()); - treeGenerator.add("brush_bush", 3, (new GeneratorFlora.Builder()).placeOn(this.topBlock).replace(Material.air).withNonDecayingLeaf(BlockPlanks.EnumType.ACACIA).create()); + treeGenerator.add("brush_bush", 3, (new GeneratorFlora.Builder()).placeOn(this.topBlock).replace(Material.AIR).withNonDecayingLeaf(BlockPlanks.EnumType.ACACIA).create()); treeGenerator.add("oak_bush", 2, (new GeneratorBush.Builder()).maxHeight(2).create()); // other plants @@ -74,8 +74,8 @@ public class BiomeGenXericShrubland extends BOPBiome this.addGenerator("bromeliad", GeneratorStage.FLOWERS, (new GeneratorFlora.Builder().amountPerChunk(0.5F).with(BOPFlowers.BROMELIAD).generationAttempts(8).create())); this.addGenerator("bushes", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.8F).with(BOPPlants.BUSH).create()); this.addGenerator("tiny_cacti", GeneratorStage.FLOWERS, (new GeneratorFlora.Builder()).amountPerChunk(0.9F).with(BOPPlants.TINYCACTUS).create()); - this.addGenerator("dead_bushes", GeneratorStage.FLOWERS, (new GeneratorFlora.Builder()).amountPerChunk(1.0F).with(Blocks.deadbush.getDefaultState()).create()); - this.addGenerator("cacti", GeneratorStage.FLOWERS,(new GeneratorColumns.Builder()).amountPerChunk(1.5F).generationAttempts(3).placeOn(this.topBlock).with(Blocks.cactus.getDefaultState()).minHeight(1).maxHeight(2).create()); + this.addGenerator("dead_bushes", GeneratorStage.FLOWERS, (new GeneratorFlora.Builder()).amountPerChunk(1.0F).with(Blocks.DEADBUSH.getDefaultState()).create()); + this.addGenerator("cacti", GeneratorStage.FLOWERS,(new GeneratorColumns.Builder()).amountPerChunk(1.5F).generationAttempts(3).placeOn(this.topBlock).with(Blocks.CACTUS.getDefaultState()).minHeight(1).maxHeight(2).create()); // grasses (note weighting must be quite high as the grasses will only grow on the splattered grass blocks) GeneratorWeighted grassGenerator = new GeneratorWeighted(12.0F); @@ -104,7 +104,7 @@ public class BiomeGenXericShrubland extends BOPBiome if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");} - if (!settings.generateBopSoils) {this.alternateTopBlock = Blocks.grass.getDefaultState();} + if (!settings.generateBopSoils) {this.alternateTopBlock = Blocks.GRASS.getDefaultState();} if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");} diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtBirchForest.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtBirchForest.java index 8d0b001d8..bddd051a2 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtBirchForest.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtBirchForest.java @@ -21,7 +21,7 @@ public class BiomeExtBirchForest extends ExtendedBiomeWrapper { public BiomeExtBirchForest() { - super(Biomes.birchForest); + super(Biomes.BIRCH_FOREST); if (BOPBiomes.gravel_beach.isPresent()) { diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtBirchForestHills.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtBirchForestHills.java index 0e37a55cb..00603afa1 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtBirchForestHills.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtBirchForestHills.java @@ -21,7 +21,7 @@ public class BiomeExtBirchForestHills extends ExtendedBiomeWrapper { public BiomeExtBirchForestHills() { - super(Biomes.birchForestHills); + super(Biomes.BIRCH_FOREST_HILLS); if (BOPBiomes.gravel_beach.isPresent()) { diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtColdTaiga.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtColdTaiga.java index aabbc4b88..e74b9a6b0 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtColdTaiga.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtColdTaiga.java @@ -16,7 +16,7 @@ public class BiomeExtColdTaiga extends ExtendedBiomeWrapper { public BiomeExtColdTaiga() { - super(Biomes.coldTaiga); + super(Biomes.COLD_TAIGA); // grasses GeneratorWeighted grassGenerator = new GeneratorWeighted(0.5F); diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtColdTaigaHills.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtColdTaigaHills.java index d51c5a961..02d4f0d85 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtColdTaigaHills.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtColdTaigaHills.java @@ -16,7 +16,7 @@ public class BiomeExtColdTaigaHills extends ExtendedBiomeWrapper { public BiomeExtColdTaigaHills() { - super(Biomes.coldTaigaHills); + super(Biomes.COLD_TAIGA_HILLS); // grasses GeneratorWeighted grassGenerator = new GeneratorWeighted(0.5F); diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtDesert.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtDesert.java index 4528d6dc3..1cfd3bda6 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtDesert.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtDesert.java @@ -17,7 +17,7 @@ public class BiomeExtDesert extends ExtendedBiomeWrapper { public BiomeExtDesert() { - super(Biomes.desert); + super(Biomes.DESERT); // quicksand this.addGenerator("quicksand", GeneratorStage.SAND, (new GeneratorLakes.Builder()).amountPerChunk(0.2F).liquid(BOPBlocks.sand.getDefaultState().withProperty(BlockBOPSand.VARIANT, BlockBOPSand.SandType.QUICKSAND)).frozenLiquid((IBlockState)null).create()); diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtDesertHills.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtDesertHills.java index 9a55f21cf..f11e2f8d4 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtDesertHills.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtDesertHills.java @@ -13,7 +13,7 @@ public class BiomeExtDesertHills extends ExtendedBiomeWrapper { public BiomeExtDesertHills() { - super(Biomes.desertHills); + super(Biomes.DESERT_HILLS); // other plants this.addGenerator("tiny_cacti", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.3F).with(BOPPlants.TINYCACTUS).create()); diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtEnd.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtEnd.java index 2384dde54..3e348c731 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtEnd.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtEnd.java @@ -16,17 +16,17 @@ public class BiomeExtEnd extends ExtendedBiomeWrapper { public BiomeExtEnd() { - super(Biomes.sky); + super(Biomes.SKY); //celestial crystals - IBlockPosQuery emptyEndstone = BlockQuery.buildAnd().withAltitudeBetween(0, 50).withAirBelow().states(Blocks.end_stone.getDefaultState()).create(); + IBlockPosQuery emptyEndstone = BlockQuery.buildAnd().withAltitudeBetween(0, 50).withAirBelow().states(Blocks.END_STONE.getDefaultState()).create(); this.addGenerator("crystals", GeneratorStage.ORE_PRE, (new GeneratorCrystals.Builder()).amountPerChunk(12.0F).placeOn(emptyEndstone).with(BOPBlocks.crystal.getDefaultState()).create()); // gem - this.addGenerator("amethyst", GeneratorStage.ORE_PRE, (new GeneratorOreSingle.Builder()).replace(Blocks.end_stone.getDefaultState()).amountPerChunk(24).with(BOPGems.AMETHYST).create()); + this.addGenerator("amethyst", GeneratorStage.ORE_PRE, (new GeneratorOreSingle.Builder()).replace(Blocks.END_STONE.getDefaultState()).amountPerChunk(24).with(BOPGems.AMETHYST).create()); // biome essence - this.addGenerator("biome_essence", GeneratorStage.ORE_PRE, (new GeneratorOreSingle.Builder()).replace(Blocks.end_stone.getDefaultState()).amountPerChunk(24).with(BOPBlocks.biome_block.getDefaultState()).create()); + this.addGenerator("biome_essence", GeneratorStage.ORE_PRE, (new GeneratorOreSingle.Builder()).replace(Blocks.END_STONE.getDefaultState()).amountPerChunk(24).with(BOPBlocks.biome_block.getDefaultState()).create()); } @Override diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtExtremeHills.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtExtremeHills.java index 2c44699e6..b4e710be7 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtExtremeHills.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtExtremeHills.java @@ -17,7 +17,7 @@ public class BiomeExtExtremeHills extends ExtendedBiomeWrapper { public BiomeExtExtremeHills() { - super(Biomes.extremeHills); + super(Biomes.EXTREME_HILLS); // trees GeneratorWeighted treeGenerator = new GeneratorWeighted(0.3F); diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtExtremeHillsPlus.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtExtremeHillsPlus.java index 7d0a7a374..572ad955b 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtExtremeHillsPlus.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtExtremeHillsPlus.java @@ -17,7 +17,7 @@ public class BiomeExtExtremeHillsPlus extends ExtendedBiomeWrapper { public BiomeExtExtremeHillsPlus() { - super(Biomes.extremeHillsPlus); + super(Biomes.EXTREME_HILLS_WITH_TREES); // trees GeneratorWeighted treeGenerator = new GeneratorWeighted(0.3F); diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtForest.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtForest.java index 5d44f0cd6..c53bbee06 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtForest.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtForest.java @@ -23,7 +23,7 @@ public class BiomeExtForest extends ExtendedBiomeWrapper { public BiomeExtForest() { - super(Biomes.forest); + super(Biomes.FOREST); if (BOPBiomes.gravel_beach.isPresent()) { diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtForestHills.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtForestHills.java index a12d8bfc0..03b9b69e3 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtForestHills.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtForestHills.java @@ -23,7 +23,7 @@ public class BiomeExtForestHills extends ExtendedBiomeWrapper { public BiomeExtForestHills() { - super(Biomes.forestHills); + super(Biomes.FOREST_HILLS); if (BOPBiomes.gravel_beach.isPresent()) { diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtIceMountains.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtIceMountains.java index c26ef345e..36e39bffe 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtIceMountains.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtIceMountains.java @@ -16,7 +16,7 @@ public class BiomeExtIceMountains extends ExtendedBiomeWrapper { public BiomeExtIceMountains() { - super(Biomes.iceMountains); + super(Biomes.ICE_MOUNTAINS); // grasses GeneratorWeighted grassGenerator = new GeneratorWeighted(0.1F); diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtIcePlains.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtIcePlains.java index ecf81c680..7cf9e21ee 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtIcePlains.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtIcePlains.java @@ -16,7 +16,7 @@ public class BiomeExtIcePlains extends ExtendedBiomeWrapper { public BiomeExtIcePlains() { - super(Biomes.icePlains); + super(Biomes.ICE_PLAINS); // grasses GeneratorWeighted grassGenerator = new GeneratorWeighted(0.1F); diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtJungle.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtJungle.java index cb0bf5770..c61c90772 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtJungle.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtJungle.java @@ -16,7 +16,7 @@ public class BiomeExtJungle extends ExtendedBiomeWrapper { public BiomeExtJungle() { - super(Biomes.jungle); + super(Biomes.JUNGLE); // grasses GeneratorWeighted grassGenerator = new GeneratorWeighted(5.0F); diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtJungleHills.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtJungleHills.java index 64fe3c1ca..946621ab2 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtJungleHills.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtJungleHills.java @@ -16,7 +16,7 @@ public class BiomeExtJungleHills extends ExtendedBiomeWrapper { public BiomeExtJungleHills() { - super(Biomes.jungleHills); + super(Biomes.JUNGLE_HILLS); // grasses GeneratorWeighted grassGenerator = new GeneratorWeighted(5.0F); diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtMegaTaiga.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtMegaTaiga.java index e3f50abb1..c7d5b9c9b 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtMegaTaiga.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtMegaTaiga.java @@ -18,7 +18,7 @@ public class BiomeExtMegaTaiga extends ExtendedBiomeWrapper { public BiomeExtMegaTaiga() { - super(Biomes.megaTaiga); + super(Biomes.REDWOOD_TAIGA); if (BOPBiomes.gravel_beach.isPresent()) { diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtMegaTaigaHills.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtMegaTaigaHills.java index 4f3d4d2bf..2a16766d4 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtMegaTaigaHills.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtMegaTaigaHills.java @@ -18,7 +18,7 @@ public class BiomeExtMegaTaigaHills extends ExtendedBiomeWrapper { public BiomeExtMegaTaigaHills() { - super(Biomes.megaTaigaHills); + super(Biomes.REDWOOD_TAIGA_HILLS); if (BOPBiomes.gravel_beach.isPresent()) { diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtMesa.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtMesa.java index cb3974a34..eb3e6ff33 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtMesa.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtMesa.java @@ -16,7 +16,7 @@ public class BiomeExtMesa extends ExtendedBiomeWrapper { public BiomeExtMesa() { - super(Biomes.mesa); + super(Biomes.MESA); // other plants this.addGenerator("desertgrass", GeneratorStage.GRASS, (new GeneratorGrass.Builder()).amountPerChunk(0.5F).with(BOPPlants.DESERTGRASS).generationAttempts(8).create()); diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtMesaPlateau.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtMesaPlateau.java index 1c95dd515..d3ded33f8 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtMesaPlateau.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtMesaPlateau.java @@ -16,7 +16,7 @@ public class BiomeExtMesaPlateau extends ExtendedBiomeWrapper { public BiomeExtMesaPlateau() { - super(Biomes.mesaPlateau); + super(Biomes.MESA_CLEAR_ROCK); // other plants this.addGenerator("desertgrass", GeneratorStage.GRASS, (new GeneratorGrass.Builder()).amountPerChunk(0.5F).with(BOPPlants.DESERTGRASS).generationAttempts(8).create()); diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtMushroomIsland.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtMushroomIsland.java index 068825f2b..f21f38216 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtMushroomIsland.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtMushroomIsland.java @@ -13,7 +13,7 @@ public class BiomeExtMushroomIsland extends ExtendedBiomeWrapper { public BiomeExtMushroomIsland() { - super(Biomes.mushroomIsland); + super(Biomes.MUSHROOM_ISLAND); // shrooms this.addGenerator("flat_mushroom", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.4F).with(BlockBOPMushroom.MushroomType.FLAT_MUSHROOM).create()); diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtOcean.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtOcean.java index 7112eedf7..2595c7a80 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtOcean.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtOcean.java @@ -11,7 +11,7 @@ public class BiomeExtOcean extends ExtendedBiomeWrapper { public BiomeExtOcean() { - super(Biomes.ocean); + super(Biomes.OCEAN); // gem this.addGenerator("sapphire", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(BOPGems.SAPPHIRE).create()); diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtPlains.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtPlains.java index b05ed0b1d..ecaa3827a 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtPlains.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtPlains.java @@ -16,7 +16,7 @@ public class BiomeExtPlains extends ExtendedBiomeWrapper { public BiomeExtPlains() { - super(Biomes.plains); + super(Biomes.PLAINS); // grasses GeneratorWeighted grassGenerator = new GeneratorWeighted(5.0F); diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtRoofedForest.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtRoofedForest.java index e66d07f53..118b24b0d 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtRoofedForest.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtRoofedForest.java @@ -16,7 +16,7 @@ public class BiomeExtRoofedForest extends ExtendedBiomeWrapper { public BiomeExtRoofedForest() { - super(Biomes.roofedForest); + super(Biomes.ROOFED_FOREST); // grasses GeneratorWeighted grassGenerator = new GeneratorWeighted(2.0F); diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtSavanna.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtSavanna.java index 8fb6e387f..28bfd9769 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtSavanna.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtSavanna.java @@ -20,7 +20,7 @@ public class BiomeExtSavanna extends ExtendedBiomeWrapper { public BiomeExtSavanna() { - super(Biomes.savanna); + super(Biomes.SAVANNA); // quicksand this.addGenerator("quicksand", GeneratorStage.SAND, (new GeneratorLakes.Builder()).amountPerChunk(0.1F).liquid(BOPBlocks.sand.getDefaultState().withProperty(BlockBOPSand.VARIANT, BlockBOPSand.SandType.QUICKSAND)).frozenLiquid((IBlockState)null).create()); diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtSavannaPlateau.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtSavannaPlateau.java index 949700921..d5cbcfabd 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtSavannaPlateau.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtSavannaPlateau.java @@ -16,7 +16,7 @@ public class BiomeExtSavannaPlateau extends ExtendedBiomeWrapper { public BiomeExtSavannaPlateau() { - super(Biomes.savannaPlateau); + super(Biomes.SAVANNA_PLATEAU); // grasses GeneratorWeighted grassGenerator = new GeneratorWeighted(4.0F); diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtSwampland.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtSwampland.java index 7d57fc2e1..b55da0ef0 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtSwampland.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtSwampland.java @@ -30,7 +30,7 @@ public class BiomeExtSwampland extends ExtendedBiomeWrapper { public BiomeExtSwampland() { - super(Biomes.swampland); + super(Biomes.SWAMPLAND); // trees GeneratorWeighted treeGenerator = new GeneratorWeighted(0.5F); @@ -63,7 +63,7 @@ public class BiomeExtSwampland extends ExtendedBiomeWrapper this.addGenerator("blue_milk_caps", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(BlockBOPMushroom.MushroomType.BLUE_MILK_CAP).create()); // water plants - this.addGenerator("algae", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(10.0F).replace(Blocks.water).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.ALGAE)).generationAttempts(32).scatterYMethod(ScatterYMethod.AT_GROUND).create()); + this.addGenerator("algae", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(10.0F).replace(Blocks.WATER).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.ALGAE)).generationAttempts(32).scatterYMethod(ScatterYMethod.AT_GROUND).create()); this.addGenerator("water_reeds", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.3F).with(BOPPlants.REED).generationAttempts(32).create()); this.addGenerator("medium_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(BlockBOPLilypad.LilypadType.MEDIUM).create()); this.addGenerator("small_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(BlockBOPLilypad.LilypadType.SMALL).create()); diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtTaiga.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtTaiga.java index 4966aa4cb..9116bd628 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtTaiga.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtTaiga.java @@ -18,7 +18,7 @@ public class BiomeExtTaiga extends ExtendedBiomeWrapper { public BiomeExtTaiga() { - super(Biomes.taiga); + super(Biomes.TAIGA); if (BOPBiomes.gravel_beach.isPresent()) { diff --git a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtTaigaHills.java b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtTaigaHills.java index cf2a7297e..4ee65da38 100644 --- a/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtTaigaHills.java +++ b/src/main/java/biomesoplenty/common/biome/vanilla/BiomeExtTaigaHills.java @@ -18,7 +18,7 @@ public class BiomeExtTaigaHills extends ExtendedBiomeWrapper { public BiomeExtTaigaHills() { - super(Biomes.taigaHills); + super(Biomes.TAIGA_HILLS); if (BOPBiomes.gravel_beach.isPresent()) { diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPAsh.java b/src/main/java/biomesoplenty/common/block/BlockBOPAsh.java index 7d1e7b81b..699de9a4c 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPAsh.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPAsh.java @@ -8,8 +8,6 @@ package biomesoplenty.common.block; -import java.util.Random; - import biomesoplenty.api.item.BOPItems; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; @@ -26,13 +24,15 @@ import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import java.util.Random; + public class BlockBOPAsh extends BlockBOPGeneric { protected static final AxisAlignedBB COLLISION_BOX = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.875D, 1.0D); public BlockBOPAsh() { - super(Material.sand, SoundType.SAND); + super(Material.SAND, SoundType.SAND); this.setHardness(0.4F); this.setHarvestLevel("shovel", 0); diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPBamboo.java b/src/main/java/biomesoplenty/common/block/BlockBOPBamboo.java index 811358e84..6b0191cea 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPBamboo.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPBamboo.java @@ -8,15 +8,12 @@ package biomesoplenty.common.block; -import java.util.Random; - import biomesoplenty.api.block.BOPBlocks; import net.minecraft.block.Block; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; import net.minecraft.block.properties.IProperty; import net.minecraft.block.properties.PropertyInteger; -import net.minecraft.block.state.BlockStateBase; import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; @@ -28,6 +25,8 @@ import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import java.util.Random; + public class BlockBOPBamboo extends BlockBOPDecoration { protected static final AxisAlignedBB BOUNDING_BOX = new AxisAlignedBB(0.1875D, 0.0D, 0.1875D, 0.8125D, 1.0D, 0.8125D); @@ -40,7 +39,7 @@ public class BlockBOPBamboo extends BlockBOPDecoration public BlockBOPBamboo() { - super(Material.wood); + super(Material.WOOD); this.setHardness(0.2F); this.setSoundType(SoundType.WOOD); @@ -78,7 +77,7 @@ public class BlockBOPBamboo extends BlockBOPDecoration return true; } // can place on various soil blocks - if (groundBlock == Blocks.dirt || groundBlock == Blocks.farmland || groundBlock == BOPBlocks.farmland_0 || groundBlock == BOPBlocks.farmland_1 || groundBlock == BOPBlocks.dirt || groundBlock == Blocks.grass) + if (groundBlock == Blocks.DIRT || groundBlock == Blocks.FARMLAND || groundBlock == BOPBlocks.farmland_0 || groundBlock == BOPBlocks.farmland_1 || groundBlock == BOPBlocks.dirt || groundBlock == Blocks.GRASS) { return true; } diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPBiomeBlock.java b/src/main/java/biomesoplenty/common/block/BlockBOPBiomeBlock.java index 6900a01e8..94f428357 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPBiomeBlock.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPBiomeBlock.java @@ -8,15 +8,9 @@ package biomesoplenty.common.block; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Random; - import biomesoplenty.api.biome.BOPBiome; import biomesoplenty.api.item.BOPItems; import biomesoplenty.common.util.biome.BiomeUtils; -import net.minecraft.block.Block; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; @@ -28,11 +22,16 @@ import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraft.world.biome.BiomeGenBase; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Random; + public class BlockBOPBiomeBlock extends BlockBOPGeneric { public BlockBOPBiomeBlock() { - super(Material.glass, SoundType.GLASS); + super(Material.GLASS, SoundType.GLASS); this.setHardness(0.6F); this.setSoundType(SoundType.GLASS); } @@ -49,16 +48,16 @@ public class BlockBOPBiomeBlock extends BlockBOPGeneric List vanillaBiomesToExclude = Arrays.asList( new BiomeGenBase[] { - Biomes.sky, - Biomes.hell, - Biomes.beach, - Biomes.coldBeach, - Biomes.stoneBeach, - Biomes.ocean, - Biomes.frozenOcean, - Biomes.deepOcean, - Biomes.river, - Biomes.frozenRiver + Biomes.SKY, + Biomes.HELL, + Biomes.BEACH, + Biomes.COLD_BEACH, + Biomes.STONE_BEACH, + Biomes.OCEAN, + Biomes.FROZEN_OCEAN, + Biomes.DEEP_OCEAN, + Biomes.RIVER, + Biomes.FROZEN_RIVER } ); diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPBones.java b/src/main/java/biomesoplenty/common/block/BlockBOPBones.java index a84d08563..0879d6d0e 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPBones.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPBones.java @@ -28,8 +28,6 @@ import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; public class BlockBOPBones extends Block implements IBOPBlock { @@ -82,7 +80,7 @@ public class BlockBOPBones extends Block implements IBOPBlock public BlockBOPBones() { - super(Material.rock); + super(Material.ROCK); // set some defaults this.setHardness(3.0F); diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPCoral.java b/src/main/java/biomesoplenty/common/block/BlockBOPCoral.java index 8abecd72e..bda6cde67 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPCoral.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPCoral.java @@ -8,8 +8,6 @@ package biomesoplenty.common.block; -import static net.minecraft.block.BlockLiquid.LEVEL; - import biomesoplenty.api.block.BlockQueries; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; @@ -19,9 +17,10 @@ import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block.state.IBlockState; import net.minecraft.util.IStringSerializable; import net.minecraft.util.math.BlockPos; -import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; +import static net.minecraft.block.BlockLiquid.LEVEL; + public class BlockBOPCoral extends BlockBOPDecoration { @@ -64,7 +63,7 @@ public class BlockBOPCoral extends BlockBOPDecoration public BlockBOPCoral() { - super(Material.water); + super(Material.WATER); // set some defaults this.setHardness(0.6F); diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPCrystal.java b/src/main/java/biomesoplenty/common/block/BlockBOPCrystal.java index 63560ab38..a5e5063ed 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPCrystal.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPCrystal.java @@ -8,8 +8,6 @@ package biomesoplenty.common.block; -import java.util.Random; - import biomesoplenty.api.block.IBOPBlock; import biomesoplenty.api.item.BOPItems; import biomesoplenty.common.item.ItemBOPBlock; @@ -27,6 +25,8 @@ import net.minecraft.item.ItemBlock; import net.minecraft.util.math.BlockPos; import net.minecraft.world.IBlockAccess; +import java.util.Random; + public class BlockBOPCrystal extends Block implements IBOPBlock { @@ -45,7 +45,7 @@ public class BlockBOPCrystal extends Block implements IBOPBlock public IItemColor getItemColor() { return null; } public BlockBOPCrystal() { - super(Material.glass); + super(Material.GLASS); this.setHardness(0.15F); this.setResistance(5.0F); this.setLightLevel(1.0F); diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPDecoration.java b/src/main/java/biomesoplenty/common/block/BlockBOPDecoration.java index bfaf27bc5..92add5468 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPDecoration.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPDecoration.java @@ -8,10 +8,7 @@ package biomesoplenty.common.block; -import java.util.Random; - import biomesoplenty.api.block.IBOPBlock; -import biomesoplenty.common.init.ModBlocks; import biomesoplenty.common.item.ItemBOPBlock; import net.minecraft.block.Block; import net.minecraft.block.SoundType; @@ -27,11 +24,12 @@ import net.minecraft.util.BlockRenderLayer; import net.minecraft.util.EnumFacing; import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; -import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import java.util.Random; + public class BlockBOPDecoration extends Block implements IBOPBlock { @@ -51,7 +49,7 @@ public class BlockBOPDecoration extends Block implements IBOPBlock // constructor public BlockBOPDecoration() { - this(Material.plants); + this(Material.PLANTS); } public BlockBOPDecoration(Material material) { @@ -141,7 +139,7 @@ public class BlockBOPDecoration extends Block implements IBOPBlock else { this.dropBlockAsItem(worldIn, pos, state, 0); - worldIn.setBlockState(pos, Blocks.air.getDefaultState(), 3); + worldIn.setBlockState(pos, Blocks.AIR.getDefaultState(), 3); return false; } } diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPDirt.java b/src/main/java/biomesoplenty/common/block/BlockBOPDirt.java index c82e54f76..90c5afec7 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPDirt.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPDirt.java @@ -75,7 +75,7 @@ public class BlockBOPDirt extends Block implements IBOPBlock, ISustainsPlantType public BlockBOPDirt() { - super(Material.ground); + super(Material.GROUND); // set some defaults this.setTickRandomly(true); @@ -118,10 +118,10 @@ public class BlockBOPDirt extends Block implements IBOPBlock, ISustainsPlantType // support beach plants if there's water alongside case Beach: return ( - world.getBlockState(pos.east()).getMaterial() == Material.water || - world.getBlockState(pos.west()).getMaterial() == Material.water || - world.getBlockState(pos.north()).getMaterial() == Material.water || - world.getBlockState(pos.south()).getMaterial() == Material.water + world.getBlockState(pos.east()).getMaterial() == Material.WATER || + world.getBlockState(pos.west()).getMaterial() == Material.WATER || + world.getBlockState(pos.north()).getMaterial() == Material.WATER || + world.getBlockState(pos.south()).getMaterial() == Material.WATER ); // don't support nether plants, water plants, or crops (require farmland), or anything else by default default: @@ -163,7 +163,7 @@ public class BlockBOPDirt extends Block implements IBOPBlock, ISustainsPlantType { // count only vanilla grass blocks with enough light (BOP Grass 'pushes' itself onto dirt, no need to 'pull' it) pos1 = pos.add(dx, dy, dz); - if (world.getBlockState(pos1).getBlock() == Blocks.grass && world.getLightFromNeighbors(pos1.up()) >= 9) + if (world.getBlockState(pos1).getBlock() == Blocks.GRASS && world.getLightFromNeighbors(pos1.up()) >= 9) { numNearbyGrassSpreadingBlocks++; } @@ -201,7 +201,7 @@ public class BlockBOPDirt extends Block implements IBOPBlock, ISustainsPlantType return BOPBlocks.grass.getDefaultState().withProperty(BlockBOPGrass.VARIANT, BlockBOPGrass.BOPGrassType.SILTY); default: // return vanilla grass as a backup - return Blocks.grass.getDefaultState(); + return Blocks.GRASS.getDefaultState(); } } diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPDoor.java b/src/main/java/biomesoplenty/common/block/BlockBOPDoor.java index 6489db64e..2a0da103a 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPDoor.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPDoor.java @@ -8,10 +8,6 @@ package biomesoplenty.common.block; -import java.util.HashMap; -import java.util.Map; -import java.util.Random; - import biomesoplenty.api.block.IBOPBlock; import biomesoplenty.common.enums.BOPWoods; import net.minecraft.block.BlockDoor; @@ -31,6 +27,10 @@ import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import java.util.HashMap; +import java.util.Map; +import java.util.Random; + public class BlockBOPDoor extends BlockDoor implements IBOPBlock { @@ -67,7 +67,7 @@ public class BlockBOPDoor extends BlockDoor implements IBOPBlock public BlockBOPDoor(BOPWoods wood) { - super(Material.wood); + super(Material.WOOD); this.setHardness(3.0F); this.setHarvestLevel("axe", 0); @@ -82,7 +82,7 @@ public class BlockBOPDoor extends BlockDoor implements IBOPBlock public Item getDoorItem() { - return this.doorItem == null ? Items.oak_door : this.doorItem; + return this.doorItem == null ? Items.OAK_DOOR : this.doorItem; } @Override diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPDoubleDecoration.java b/src/main/java/biomesoplenty/common/block/BlockBOPDoubleDecoration.java index c652ea709..c6fe53d8c 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPDoubleDecoration.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPDoubleDecoration.java @@ -8,8 +8,6 @@ package biomesoplenty.common.block; -import java.util.List; - import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.block.properties.IProperty; @@ -25,6 +23,8 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; +import java.util.List; + public class BlockBOPDoubleDecoration extends BlockBOPDecoration { // add half property @@ -54,7 +54,7 @@ public class BlockBOPDoubleDecoration extends BlockBOPDecoration { public BlockBOPDoubleDecoration() { - this(Material.plants); + this(Material.PLANTS); } public BlockBOPDoubleDecoration(Material material) { @@ -123,7 +123,7 @@ public class BlockBOPDoubleDecoration extends BlockBOPDecoration { else { this.dropBlockAsItem(worldIn, pos, state, 0); - worldIn.setBlockState(pos, Blocks.air.getDefaultState(), 3); + worldIn.setBlockState(pos, Blocks.AIR.getDefaultState(), 3); return false; } } diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPDoublePlant.java b/src/main/java/biomesoplenty/common/block/BlockBOPDoublePlant.java index 109ef1316..c4fc24f81 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPDoublePlant.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPDoublePlant.java @@ -8,14 +8,11 @@ package biomesoplenty.common.block; -import java.util.List; - -import com.google.common.collect.ImmutableSet; - import biomesoplenty.api.block.BOPBlocks; import biomesoplenty.api.block.BlockQueries; import biomesoplenty.common.enums.BOPPlants; import biomesoplenty.common.util.block.BlockStateUtils; +import com.google.common.collect.ImmutableSet; import net.minecraft.block.properties.IProperty; import net.minecraft.block.properties.PropertyEnum; import net.minecraft.block.state.BlockStateContainer; @@ -28,11 +25,9 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumFacing; import net.minecraft.util.IStringSerializable; -import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.RayTraceResult; import net.minecraft.world.ColorizerFoliage; -import net.minecraft.world.ColorizerGrass; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraft.world.biome.BiomeColorHelper; @@ -40,6 +35,8 @@ import net.minecraftforge.common.IShearable; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import java.util.List; + public class BlockBOPDoublePlant extends BlockBOPDoubleDecoration implements IShearable { // add properties (note we inherit HALF from BlockDoubleDecoration) @@ -263,12 +260,12 @@ public class BlockBOPDoublePlant extends BlockBOPDoubleDecoration implements ISh @Override public int getFlammability(IBlockAccess world, BlockPos pos, EnumFacing face) { - return Blocks.tallgrass.getFlammability(world, pos, face); + return Blocks.TALLGRASS.getFlammability(world, pos, face); } @Override public int getFireSpreadSpeed(IBlockAccess world, BlockPos pos, EnumFacing face) { - return Blocks.tallgrass.getFlammability(world, pos, face); + return Blocks.TALLGRASS.getFlammability(world, pos, face); } } \ No newline at end of file diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPDoubleWoodSlab.java b/src/main/java/biomesoplenty/common/block/BlockBOPDoubleWoodSlab.java index 56960d1cb..9f6ee3543 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPDoubleWoodSlab.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPDoubleWoodSlab.java @@ -8,15 +8,11 @@ package biomesoplenty.common.block; -import java.util.ArrayList; -import java.util.List; - -import com.google.common.collect.ImmutableSet; - import biomesoplenty.api.block.IBOPBlock; import biomesoplenty.common.enums.BOPWoods; import biomesoplenty.common.util.block.BlockStateUtils; import biomesoplenty.common.util.block.VariantPagingHelper; +import com.google.common.collect.ImmutableSet; import net.minecraft.block.BlockSlab; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; @@ -36,6 +32,9 @@ import net.minecraft.world.IBlockAccess; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import java.util.ArrayList; +import java.util.List; + public class BlockBOPDoubleWoodSlab extends BlockSlab implements IBOPBlock { @@ -94,7 +93,7 @@ public class BlockBOPDoubleWoodSlab extends BlockSlab implements IBOPBlock private BlockBOPDoubleWoodSlab() { - super(Material.wood); + super(Material.WOOD); this.useNeighborBrightness = true; this.setHardness(2.0F).setResistance(5.0F); this.setSoundType(SoundType.WOOD); @@ -173,7 +172,7 @@ public class BlockBOPDoubleWoodSlab extends BlockSlab implements IBOPBlock case HELLBARK: return 0; default: - return Blocks.double_wooden_slab.getFlammability(world, pos, face); + return Blocks.DOUBLE_WOODEN_SLAB.getFlammability(world, pos, face); } } @@ -186,7 +185,7 @@ public class BlockBOPDoubleWoodSlab extends BlockSlab implements IBOPBlock case HELLBARK: return 0; default: - return Blocks.double_wooden_slab.getFireSpreadSpeed(world, pos, face); + return Blocks.DOUBLE_WOODEN_SLAB.getFireSpreadSpeed(world, pos, face); } } diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPFarmland.java b/src/main/java/biomesoplenty/common/block/BlockBOPFarmland.java index d5f9c9767..cb6d72322 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPFarmland.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPFarmland.java @@ -135,7 +135,7 @@ public class BlockBOPFarmland extends BlockFarmland implements IBOPBlock { for (BlockPos.MutableBlockPos mutableblockpos : BlockPos.getAllInBoxMutable(pos.add(-4, 0, -4), pos.add(4, 1, 4))) { - if (world.getBlockState(mutableblockpos).getMaterial() == Material.water) + if (world.getBlockState(mutableblockpos).getMaterial() == Material.WATER) { return true; } @@ -221,7 +221,7 @@ public class BlockBOPFarmland extends BlockFarmland implements IBOPBlock case SILTY: return BOPBlocks.dirt.getDefaultState().withProperty(BlockBOPDirt.VARIANT, BlockBOPDirt.BOPDirtType.SILTY); default: - return Blocks.dirt.getStateFromMeta(BlockDirt.DirtType.DIRT.getMetadata()); + return Blocks.DIRT.getStateFromMeta(BlockDirt.DirtType.DIRT.getMetadata()); } } } \ No newline at end of file diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPFence.java b/src/main/java/biomesoplenty/common/block/BlockBOPFence.java index 451b42599..f8ab79727 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPFence.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPFence.java @@ -8,9 +8,6 @@ package biomesoplenty.common.block; -import java.util.HashMap; -import java.util.Map; - import biomesoplenty.api.block.IBOPBlock; import biomesoplenty.common.enums.BOPWoods; import biomesoplenty.common.item.ItemBOPBlock; @@ -28,6 +25,9 @@ import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; import net.minecraft.world.IBlockAccess; +import java.util.HashMap; +import java.util.Map; + public class BlockBOPFence extends BlockFence implements IBOPBlock { @@ -59,7 +59,7 @@ public class BlockBOPFence extends BlockFence implements IBOPBlock public BlockBOPFence(BOPWoods wood) { - super(Material.wood, MapColor.woodColor); + super(Material.WOOD, MapColor.WOOD); this.setHarvestLevel("axe", 0); this.wood = wood; @@ -73,13 +73,13 @@ public class BlockBOPFence extends BlockFence implements IBOPBlock @Override public int getFlammability(IBlockAccess world, BlockPos pos, EnumFacing face) { - return Blocks.planks.getFlammability(world, pos, face); + return Blocks.PLANKS.getFlammability(world, pos, face); } @Override public int getFireSpreadSpeed(IBlockAccess world, BlockPos pos, EnumFacing face) { - return Blocks.planks.getFireSpreadSpeed(world, pos, face); + return Blocks.PLANKS.getFireSpreadSpeed(world, pos, face); } } \ No newline at end of file diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPFenceGate.java b/src/main/java/biomesoplenty/common/block/BlockBOPFenceGate.java index 86c6b248b..105805cf6 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPFenceGate.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPFenceGate.java @@ -74,13 +74,13 @@ public class BlockBOPFenceGate extends BlockFenceGate implements IBOPBlock public int getFlammability(IBlockAccess world, BlockPos pos, EnumFacing face) { - return Blocks.planks.getFlammability(world, pos, face); + return Blocks.PLANKS.getFlammability(world, pos, face); } @Override public int getFireSpreadSpeed(IBlockAccess world, BlockPos pos, EnumFacing face) { - return Blocks.planks.getFireSpreadSpeed(world, pos, face); + return Blocks.PLANKS.getFireSpreadSpeed(world, pos, face); } } \ No newline at end of file diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPFlesh.java b/src/main/java/biomesoplenty/common/block/BlockBOPFlesh.java index d7bca0f49..5edabaefd 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPFlesh.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPFlesh.java @@ -8,8 +8,6 @@ package biomesoplenty.common.block; -import java.util.Random; - import biomesoplenty.api.block.IBOPBlock; import biomesoplenty.api.item.BOPItems; import biomesoplenty.common.item.ItemBOPBlock; @@ -32,6 +30,8 @@ import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import java.util.Random; + public class BlockBOPFlesh extends Block implements IBOPBlock { @@ -50,7 +50,7 @@ public class BlockBOPFlesh extends Block implements IBOPBlock public IItemColor getItemColor() { return null; } public BlockBOPFlesh() { - super(Material.sponge); + super(Material.SPONGE); this.setHardness(0.4F); this.setSoundType(SoundType.GROUND); } diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPFlower.java b/src/main/java/biomesoplenty/common/block/BlockBOPFlower.java index 6f887931c..e74ad7a85 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPFlower.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPFlower.java @@ -8,14 +8,9 @@ package biomesoplenty.common.block; -import java.util.ArrayList; -import java.util.List; -import java.util.Random; - import biomesoplenty.api.block.BOPBlocks; import biomesoplenty.common.config.GameplayConfigurationHandler; import biomesoplenty.common.enums.BOPFlowers; -import biomesoplenty.common.enums.BOPPlants; import biomesoplenty.common.item.ItemBOPFlower; import biomesoplenty.common.util.block.VariantPagingHelper; import net.minecraft.block.Block; @@ -30,7 +25,6 @@ import net.minecraft.init.MobEffects; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemShears; import net.minecraft.item.ItemStack; -import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumFacing; @@ -44,6 +38,10 @@ import net.minecraftforge.common.IShearable; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import java.util.ArrayList; +import java.util.List; +import java.util.Random; + public class BlockBOPFlower extends BlockBOPDecoration implements IShearable { @@ -171,7 +169,7 @@ public class BlockBOPFlower extends BlockBOPDecoration implements IShearable { // suffer wither effect if you harvest deathbloom without shears case DEATHBLOOM: - player.addPotionEffect(new PotionEffect(MobEffects.wither, 300)); + player.addPotionEffect(new PotionEffect(MobEffects.WITHER, 300)); break; // catch on fire if you harvest burning_blossom without shears @@ -193,7 +191,7 @@ public class BlockBOPFlower extends BlockBOPDecoration implements IShearable // suffer wither effect if you walk on deathbloom case DEATHBLOOM: if (entity instanceof EntityLivingBase) { - ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(MobEffects.wither, 200)); + ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(MobEffects.WITHER, 200)); } break; @@ -245,10 +243,10 @@ public class BlockBOPFlower extends BlockBOPDecoration implements IShearable IBlockState groundState = world.getBlockState(pos.down()); Block groundBlock = groundState.getBlock(); - boolean onFertile = (groundBlock == Blocks.dirt || groundBlock == Blocks.farmland || groundBlock == BOPBlocks.farmland_0 || groundBlock == BOPBlocks.farmland_1 || groundBlock == BOPBlocks.dirt || groundBlock == Blocks.grass); - boolean onDry = (groundBlock == Blocks.hardened_clay || groundBlock == BOPBlocks.sand || groundBlock == Blocks.sand); - boolean onNetherrack = (groundBlock == Blocks.netherrack); - boolean onStone = (groundBlock == Blocks.stone); + boolean onFertile = (groundBlock == Blocks.DIRT || groundBlock == Blocks.FARMLAND || groundBlock == BOPBlocks.farmland_0 || groundBlock == BOPBlocks.farmland_1 || groundBlock == BOPBlocks.dirt || groundBlock == Blocks.GRASS); + boolean onDry = (groundBlock == Blocks.HARDENED_CLAY || groundBlock == BOPBlocks.sand || groundBlock == Blocks.SAND); + boolean onNetherrack = (groundBlock == Blocks.NETHERRACK); + boolean onStone = (groundBlock == Blocks.STONE); boolean onDriedSand = (groundBlock == BOPBlocks.dried_sand); boolean onSpectralMoss = false; @@ -325,7 +323,7 @@ public class BlockBOPFlower extends BlockBOPDecoration implements IShearable case BURNING_BLOSSOM: return 0; default: - return Blocks.red_flower.getFlammability(world, pos, face); + return Blocks.RED_FLOWER.getFlammability(world, pos, face); } } @@ -338,7 +336,7 @@ public class BlockBOPFlower extends BlockBOPDecoration implements IShearable case BURNING_BLOSSOM: return 0; default: - return Blocks.red_flower.getFireSpreadSpeed(world, pos, face); + return Blocks.RED_FLOWER.getFireSpreadSpeed(world, pos, face); } } diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPGem.java b/src/main/java/biomesoplenty/common/block/BlockBOPGem.java index d5d339aad..afffc02bf 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPGem.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPGem.java @@ -49,7 +49,7 @@ public class BlockBOPGem extends Block implements IBOPBlock public BlockBOPGem() { - super(Material.rock); + super(Material.ROCK); // set some defaults this.setHardness(5.0F); diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPGemOre.java b/src/main/java/biomesoplenty/common/block/BlockBOPGemOre.java index 9f4cf1eba..8275a18e1 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPGemOre.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPGemOre.java @@ -59,7 +59,7 @@ public class BlockBOPGemOre extends Block implements IBOPBlock public BlockBOPGemOre() { - super(Material.rock); + super(Material.ROCK); // set some defaults this.setHardness(3.0F); diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPGeneric.java b/src/main/java/biomesoplenty/common/block/BlockBOPGeneric.java index 7cb87a524..f47e7e6a3 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPGeneric.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPGeneric.java @@ -46,7 +46,7 @@ public class BlockBOPGeneric extends Block implements IBOPBlock, ISustainsPlantT public BlockBOPGeneric() { // use rock as default material - this(Material.rock, SoundType.STONE); + this(Material.ROCK, SoundType.STONE); } public BlockBOPGeneric(Material material, SoundType soundType) diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPGrass.java b/src/main/java/biomesoplenty/common/block/BlockBOPGrass.java index d687d83aa..b77f931c2 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPGrass.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPGrass.java @@ -8,19 +8,12 @@ package biomesoplenty.common.block; -import java.util.Random; - import biomesoplenty.api.block.BOPBlocks; import biomesoplenty.api.block.BOPBlocks.Coloring; import biomesoplenty.api.block.IBOPBlock; import biomesoplenty.api.block.ISustainsPlantType; -import biomesoplenty.common.init.ModBlocks; import biomesoplenty.common.item.ItemBOPBlock; -import net.minecraft.block.Block; -import net.minecraft.block.BlockDirt; -import net.minecraft.block.BlockGrass; -import net.minecraft.block.BlockTallGrass; -import net.minecraft.block.SoundType; +import net.minecraft.block.*; import net.minecraft.block.material.Material; import net.minecraft.block.properties.IProperty; import net.minecraft.block.properties.PropertyEnum; @@ -39,7 +32,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.IStringSerializable; -import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.RayTraceResult; import net.minecraft.world.IBlockAccess; @@ -48,6 +40,8 @@ import net.minecraftforge.common.EnumPlantType; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import java.util.Random; + public class BlockBOPGrass extends BlockGrass implements IBOPBlock, ISustainsPlantType { // add properties (note we also inherit the SNOWY property from BlockGrass) @@ -151,10 +145,10 @@ public class BlockBOPGrass extends BlockGrass implements IBOPBlock, ISustainsPla // support beach plants if there's water alongside case Beach: return ( - (!world.isAirBlock(pos.east()) && world.getBlockState(pos.east()).getMaterial() == Material.water) || - (!world.isAirBlock(pos.west()) && world.getBlockState(pos.west()).getMaterial() == Material.water) || - (!world.isAirBlock(pos.north()) && world.getBlockState(pos.north()).getMaterial() == Material.water) || - (!world.isAirBlock(pos.south()) && world.getBlockState(pos.south()).getMaterial() == Material.water) + (!world.isAirBlock(pos.east()) && world.getBlockState(pos.east()).getMaterial() == Material.WATER) || + (!world.isAirBlock(pos.west()) && world.getBlockState(pos.west()).getMaterial() == Material.WATER) || + (!world.isAirBlock(pos.north()) && world.getBlockState(pos.north()).getMaterial() == Material.WATER) || + (!world.isAirBlock(pos.south()) && world.getBlockState(pos.south()).getMaterial() == Material.WATER) ); // don't support nether plants, water plants, or crops (require farmland), or anything else by default default: @@ -244,7 +238,7 @@ public class BlockBOPGrass extends BlockGrass implements IBOPBlock, ISustainsPla // spectral moss in the nether catches on fire and turns to smoldering grass if (world.provider instanceof net.minecraft.world.WorldProviderHell) { - world.setBlockState(pos.up(), Blocks.fire.getDefaultState()); // might need to set fire AGE value... not sure + world.setBlockState(pos.up(), Blocks.FIRE.getDefaultState()); // might need to set fire AGE value... not sure world.setBlockState(pos, this.getDefaultState().withProperty(VARIANT, BOPGrassType.SMOLDERING)); } break; @@ -252,7 +246,7 @@ public class BlockBOPGrass extends BlockGrass implements IBOPBlock, ISustainsPla case SMOLDERING: // smoldering grass melts snow IBlockState stateAbove = world.getBlockState(pos.up()); - if (stateAbove.getMaterial() == Material.snow) + if (stateAbove.getMaterial() == Material.SNOW) { world.setBlockToAir(pos.up()); } @@ -359,7 +353,7 @@ public class BlockBOPGrass extends BlockGrass implements IBOPBlock, ISustainsPla // shift a random distance currPos = currPos.add(rand.nextInt(3) - 1, (rand.nextInt(3) - 1) * rand.nextInt(3) / 2, rand.nextInt(3) - 1); Block currBlockBelow = worldIn.getBlockState(currPos.down()).getBlock(); - if ( (currBlockBelow != Blocks.grass && currBlockBelow != BOPBlocks.grass) || worldIn.getBlockState(currPos).isNormalCube()) + if ( (currBlockBelow != Blocks.GRASS && currBlockBelow != BOPBlocks.grass) || worldIn.getBlockState(currPos).isNormalCube()) { // this block can't spread the growth walkOk = false; @@ -376,8 +370,8 @@ public class BlockBOPGrass extends BlockGrass implements IBOPBlock, ISustainsPla else { // otherwise plant tall grass - IBlockState tallgrassState = Blocks.tallgrass.getDefaultState().withProperty(BlockTallGrass.TYPE, BlockTallGrass.EnumType.GRASS); - if (Blocks.tallgrass.canBlockStay(worldIn, currPos, tallgrassState)) + IBlockState tallgrassState = Blocks.TALLGRASS.getDefaultState().withProperty(BlockTallGrass.TYPE, BlockTallGrass.EnumType.GRASS); + if (Blocks.TALLGRASS.canBlockStay(worldIn, currPos, tallgrassState)) { worldIn.setBlockState(currPos, tallgrassState); } @@ -469,7 +463,7 @@ public class BlockBOPGrass extends BlockGrass implements IBOPBlock, ISustainsPla switch ((BOPGrassType) state.getValue(VARIANT)) { case SPECTRAL_MOSS: - return Blocks.end_stone.getDefaultState(); + return Blocks.END_STONE.getDefaultState(); case LOAMY: return BOPBlocks.dirt.getDefaultState().withProperty(BlockBOPDirt.VARIANT, BlockBOPDirt.BOPDirtType.LOAMY); case SANDY: @@ -477,9 +471,9 @@ public class BlockBOPGrass extends BlockGrass implements IBOPBlock, ISustainsPla case SILTY: return BOPBlocks.dirt.getDefaultState().withProperty(BlockBOPDirt.VARIANT, BlockBOPDirt.BOPDirtType.SILTY); case OVERGROWN_NETHERRACK: - return Blocks.netherrack.getDefaultState(); + return Blocks.NETHERRACK.getDefaultState(); case SMOLDERING: case ORIGIN: case DAISY: default: - return Blocks.dirt.getStateFromMeta(BlockDirt.DirtType.DIRT.getMetadata()); + return Blocks.DIRT.getStateFromMeta(BlockDirt.DirtType.DIRT.getMetadata()); } } @@ -503,14 +497,14 @@ public class BlockBOPGrass extends BlockGrass implements IBOPBlock, ISustainsPla { // spectral moss only spreads to end stone case SPECTRAL_MOSS: - if (target.getBlock()==Blocks.end_stone) + if (target.getBlock()== Blocks.END_STONE) { return BOPBlocks.grass.getDefaultState().withProperty(BlockBOPGrass.VARIANT, BlockBOPGrass.BOPGrassType.SPECTRAL_MOSS); } break; case OVERGROWN_NETHERRACK: - if (target.getBlock()==Blocks.netherrack) + if (target.getBlock()== Blocks.NETHERRACK) { return BOPBlocks.grass.getDefaultState().withProperty(BlockBOPGrass.VARIANT, BlockBOPGrass.BOPGrassType.OVERGROWN_NETHERRACK); } @@ -519,9 +513,9 @@ public class BlockBOPGrass extends BlockGrass implements IBOPBlock, ISustainsPla // loamy/sandy/silty grasses spread to any kind of dirt case LOAMY: case SANDY: case SILTY: // vanilla dirt gets vanilla grass spread to it - if (target.getBlock() == Blocks.dirt && target.getValue(BlockDirt.VARIANT) == BlockDirt.DirtType.DIRT) + if (target.getBlock() == Blocks.DIRT && target.getValue(BlockDirt.VARIANT) == BlockDirt.DirtType.DIRT) { - return Blocks.grass.getDefaultState(); + return Blocks.GRASS.getDefaultState(); } // BOP dirt get's the corresponding BOP grass spread to it (unless it's coarse - grass doesn't grow on coarse dirt) if (target.getBlock() == BOPBlocks.dirt) @@ -532,7 +526,7 @@ public class BlockBOPGrass extends BlockGrass implements IBOPBlock, ISustainsPla // origin grass spreads to any kind of dirt case ORIGIN: case DAISY: - if ((target.getBlock() == Blocks.dirt && target.getValue(BlockDirt.VARIANT) == BlockDirt.DirtType.DIRT) || (target.getBlock() == BOPBlocks.dirt && Boolean.FALSE.equals(target.getValue(BlockBOPDirt.COARSE)))) + if ((target.getBlock() == Blocks.DIRT && target.getValue(BlockDirt.VARIANT) == BlockDirt.DirtType.DIRT) || (target.getBlock() == BOPBlocks.dirt && Boolean.FALSE.equals(target.getValue(BlockBOPDirt.COARSE)))) { return BOPBlocks.grass.getDefaultState().withProperty(BlockBOPGrass.VARIANT, BlockBOPGrass.BOPGrassType.ORIGIN); } diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPHalfOtherSlab.java b/src/main/java/biomesoplenty/common/block/BlockBOPHalfOtherSlab.java index 84d5f6803..595eb187d 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPHalfOtherSlab.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPHalfOtherSlab.java @@ -120,7 +120,7 @@ public class BlockBOPHalfOtherSlab extends BlockSlab implements IBOPBlock public BlockBOPHalfOtherSlab() { - super(Material.rock); + super(Material.ROCK); this.useNeighborBrightness = true; this.setSoundType(SoundType.STONE); // TODO: should depend on variant really, but that's quite hard to achieve... diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPHalfWoodSlab.java b/src/main/java/biomesoplenty/common/block/BlockBOPHalfWoodSlab.java index a8d307d6a..cb8be9e57 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPHalfWoodSlab.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPHalfWoodSlab.java @@ -8,14 +8,11 @@ package biomesoplenty.common.block; -import java.util.List; - -import com.google.common.collect.ImmutableSet; - import biomesoplenty.api.block.IBOPBlock; import biomesoplenty.common.enums.BOPWoods; import biomesoplenty.common.util.block.BlockStateUtils; import biomesoplenty.common.util.block.VariantPagingHelper; +import com.google.common.collect.ImmutableSet; import net.minecraft.block.BlockSlab; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; @@ -35,6 +32,8 @@ import net.minecraft.world.IBlockAccess; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import java.util.List; + public class BlockBOPHalfWoodSlab extends BlockSlab implements IBOPBlock { @@ -92,7 +91,7 @@ public class BlockBOPHalfWoodSlab extends BlockSlab implements IBOPBlock private BlockBOPHalfWoodSlab() { - super(Material.wood); + super(Material.WOOD); this.useNeighborBrightness = true; this.setHardness(2.0F).setResistance(5.0F); this.setSoundType(SoundType.WOOD); @@ -165,7 +164,7 @@ public class BlockBOPHalfWoodSlab extends BlockSlab implements IBOPBlock case HELLBARK: return 0; default: - return Blocks.wooden_slab.getFlammability(world, pos, face); + return Blocks.WOODEN_SLAB.getFlammability(world, pos, face); } } @@ -178,7 +177,7 @@ public class BlockBOPHalfWoodSlab extends BlockSlab implements IBOPBlock case HELLBARK: return 0; default: - return Blocks.wooden_slab.getFireSpreadSpeed(world, pos, face); + return Blocks.WOODEN_SLAB.getFireSpreadSpeed(world, pos, face); } } diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPHive.java b/src/main/java/biomesoplenty/common/block/BlockBOPHive.java index 687c40567..a56d3d607 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPHive.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPHive.java @@ -71,7 +71,7 @@ public class BlockBOPHive extends Block implements IBOPBlock public BlockBOPHive() { - super(Material.wood); + super(Material.WOOD); // set some defaults this.setHardness(0.5F); diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPHoney.java b/src/main/java/biomesoplenty/common/block/BlockBOPHoney.java index 3ac11b467..b847dc794 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPHoney.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPHoney.java @@ -40,7 +40,7 @@ public class BlockBOPHoney extends Block implements IBOPBlock public IItemColor getItemColor() { return null; } public BlockBOPHoney() { - super(Material.glass); + super(Material.GLASS); this.setHardness(0.5F); this.setSoundType(SoundType.STONE); } diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPLeaves.java b/src/main/java/biomesoplenty/common/block/BlockBOPLeaves.java index ef401d08d..0cc8062f8 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPLeaves.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPLeaves.java @@ -288,7 +288,7 @@ public class BlockBOPLeaves extends BlockLeaves implements IBOPBlock case ORIGIN: if (worldIn.rand.nextInt(chance) == 0) { - fruit = new ItemStack(Items.apple, 1, 0); + fruit = new ItemStack(Items.APPLE, 1, 0); } break; case PINK_CHERRY: @@ -352,7 +352,7 @@ public class BlockBOPLeaves extends BlockLeaves implements IBOPBlock default: if (worldIn.rand.nextInt(chance) == 0) { - fruit = new ItemStack(Items.apple, 1, 0); + fruit = new ItemStack(Items.APPLE, 1, 0); } break; } @@ -387,7 +387,7 @@ public class BlockBOPLeaves extends BlockLeaves implements IBOPBlock case HELLBARK: return 0; default: - return Blocks.leaves.getFlammability(world, pos, face); + return Blocks.LEAVES.getFlammability(world, pos, face); } } @@ -400,31 +400,31 @@ public class BlockBOPLeaves extends BlockLeaves implements IBOPBlock case HELLBARK: return 0; default: - return Blocks.leaves.getFireSpreadSpeed(world, pos, face); + return Blocks.LEAVES.getFireSpreadSpeed(world, pos, face); } } - //The fields used by getBlockLayer(), isOpaqueCube() and shouldSideBeRendered are set externally for Blocks.leaves *specifically*. As a result, we do not inherit + //The fields used by getBlockLayer(), isOpaqueCube() and shouldSideBeRendered are set externally for Blocks.LEAVES *specifically*. As a result, we do not inherit //it simply be extending BlockLeaves. @Override @SideOnly(Side.CLIENT) public BlockRenderLayer getBlockLayer() { - return Blocks.leaves.getBlockLayer(); + return Blocks.LEAVES.getBlockLayer(); } @Override public boolean isOpaqueCube(IBlockState state) { - return Blocks.leaves.isOpaqueCube(state); + return Blocks.LEAVES.isOpaqueCube(state); } @SideOnly(Side.CLIENT) @Override public boolean shouldSideBeRendered(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing side) { - return Blocks.leaves.shouldSideBeRendered(state, world, pos, side); + return Blocks.LEAVES.shouldSideBeRendered(state, world, pos, side); } // We are forced to implement the method below in order to extend the BlockLeaves abstract class diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPLog.java b/src/main/java/biomesoplenty/common/block/BlockBOPLog.java index 52adf62f7..54f391e39 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPLog.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPLog.java @@ -120,7 +120,7 @@ public class BlockBOPLog extends BlockLog implements IBOPBlock case HELLBARK: return 0; default: - return Blocks.log.getFlammability(world, pos, face); + return Blocks.LOG.getFlammability(world, pos, face); } } @@ -133,7 +133,7 @@ public class BlockBOPLog extends BlockLog implements IBOPBlock case HELLBARK: return 0; default: - return Blocks.log.getFireSpreadSpeed(world, pos, face); + return Blocks.LOG.getFireSpreadSpeed(world, pos, face); } } diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPMud.java b/src/main/java/biomesoplenty/common/block/BlockBOPMud.java index b2a9fbe13..4afb4b264 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPMud.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPMud.java @@ -80,7 +80,7 @@ public class BlockBOPMud extends Block implements IBOPBlock, ISustainsPlantType public BlockBOPMud() { // TODO: use a custom material and sount type for mud? A squelching sound? - super(Material.ground); + super(Material.GROUND); // set some defaults this.setHardness(0.6F); diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPMushroom.java b/src/main/java/biomesoplenty/common/block/BlockBOPMushroom.java index 7308f4b86..313d1e5eb 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPMushroom.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPMushroom.java @@ -120,7 +120,7 @@ public class BlockBOPMushroom extends BlockBOPDecoration case TOADSTOOL: return BlockQueries.fertileOrNetherrack.matches(world, pos.down()); case GLOWSHROOM: - return (BlockQueries.sustainsCave.matches(world, pos.down()) || world.getBlockState(pos.down()).getBlock() == Blocks.stone); + return (BlockQueries.sustainsCave.matches(world, pos.down()) || world.getBlockState(pos.down()).getBlock() == Blocks.STONE); case SHADOW_SHROOM: return BlockQueries.endish.matches(world, pos.down()); default: diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPPlanks.java b/src/main/java/biomesoplenty/common/block/BlockBOPPlanks.java index 404317fd0..a2ce87cb4 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPPlanks.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPPlanks.java @@ -82,7 +82,7 @@ public class BlockBOPPlanks extends Block implements IBOPBlock public BlockBOPPlanks() { - super(Material.wood); + super(Material.WOOD); this.setDefaultState(this.blockState.getBaseState()); this.setHardness(2.0F).setResistance(5.0F); this.setSoundType(SoundType.WOOD); @@ -117,7 +117,7 @@ public class BlockBOPPlanks extends Block implements IBOPBlock case HELLBARK: return 0; default: - return Blocks.planks.getFlammability(world, pos, face); + return Blocks.PLANKS.getFlammability(world, pos, face); } } @@ -130,7 +130,7 @@ public class BlockBOPPlanks extends Block implements IBOPBlock case HELLBARK: return 0; default: - return Blocks.planks.getFireSpreadSpeed(world, pos, face); + return Blocks.PLANKS.getFireSpreadSpeed(world, pos, face); } } diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPPlant.java b/src/main/java/biomesoplenty/common/block/BlockBOPPlant.java index 219ea7484..440c091b7 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPPlant.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPPlant.java @@ -8,9 +8,11 @@ package biomesoplenty.common.block; -import java.util.List; -import java.util.Random; - +import biomesoplenty.api.block.BlockQueries; +import biomesoplenty.api.item.BOPItems; +import biomesoplenty.common.enums.BOPPlants; +import biomesoplenty.common.item.ItemBOPPlant; +import biomesoplenty.common.util.block.VariantPagingHelper; import net.minecraft.block.Block; import net.minecraft.block.properties.IProperty; import net.minecraft.block.state.BlockStateContainer; @@ -46,11 +48,9 @@ import net.minecraftforge.common.IShearable; import net.minecraftforge.common.util.FakePlayer; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import biomesoplenty.api.block.BlockQueries; -import biomesoplenty.api.item.BOPItems; -import biomesoplenty.common.enums.BOPPlants; -import biomesoplenty.common.item.ItemBOPPlant; -import biomesoplenty.common.util.block.VariantPagingHelper; + +import java.util.List; +import java.util.Random; // TODO: pick block? @@ -218,7 +218,7 @@ public class BlockBOPPlant extends BlockBOPDecoration implements IShearable if (rand.nextInt(50) == 0) { // in in 50 chance of getting a carrot or potato from SPROUT - ret.add(new ItemStack(rand.nextInt(2) == 0 ? Items.carrot : Items.potato)); + ret.add(new ItemStack(rand.nextInt(2) == 0 ? Items.CARROT : Items.POTATO)); } break; @@ -438,7 +438,7 @@ public class BlockBOPPlant extends BlockBOPDecoration implements IShearable if (inventory.armorInventory[0] != null && inventory.armorInventory[1] != null) { break; } - ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(MobEffects.poison, 100)); + ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(MobEffects.POISON, 100)); } break; case THORN: case TINYCACTUS: @@ -540,7 +540,7 @@ public class BlockBOPPlant extends BlockBOPDecoration implements IShearable case RAFFLESIA: return 0; default: - return Blocks.tallgrass.getFlammability(world, pos, face); + return Blocks.TALLGRASS.getFlammability(world, pos, face); } } @@ -565,7 +565,7 @@ public class BlockBOPPlant extends BlockBOPDecoration implements IShearable case RAFFLESIA: return 0; default: - return Blocks.tallgrass.getFireSpreadSpeed(world, pos, face); + return Blocks.TALLGRASS.getFireSpreadSpeed(world, pos, face); } } diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPSand.java b/src/main/java/biomesoplenty/common/block/BlockBOPSand.java index 27a09c939..8dab5ff72 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPSand.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPSand.java @@ -72,7 +72,7 @@ public class BlockBOPSand extends BlockFalling implements IBOPBlock, ISustainsPl public BlockBOPSand() { - super(Material.sand); + super(Material.SAND); // set some defaults this.setHardness(0.6F); @@ -136,10 +136,10 @@ public class BlockBOPSand extends BlockFalling implements IBOPBlock, ISustainsPl return true; case Beach: return ( - world.getBlockState(pos.east()).getMaterial() == Material.water || - world.getBlockState(pos.west()).getMaterial() == Material.water || - world.getBlockState(pos.north()).getMaterial() == Material.water || - world.getBlockState(pos.south()).getMaterial() == Material.water + world.getBlockState(pos.east()).getMaterial() == Material.WATER || + world.getBlockState(pos.west()).getMaterial() == Material.WATER || + world.getBlockState(pos.north()).getMaterial() == Material.WATER || + world.getBlockState(pos.south()).getMaterial() == Material.WATER ); // don't support anything else by default default: diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPSapling.java b/src/main/java/biomesoplenty/common/block/BlockBOPSapling.java index a1dfb848a..78212338a 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPSapling.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPSapling.java @@ -310,7 +310,7 @@ public class BlockBOPSapling extends BlockBOPDecoration implements IGrowable { public boolean generateSmallOrBigTree(World worldIn, BlockPos pos, IBlockState state, Random rand, WorldGenerator generator) { // remove the sapling - worldIn.setBlockState(pos, Blocks.air.getDefaultState(), 4); + worldIn.setBlockState(pos, Blocks.AIR.getDefaultState(), 4); // try to grow the tree boolean success = generator.generate(worldIn, rand, pos); // put the sapling back if we failed @@ -321,7 +321,7 @@ public class BlockBOPSapling extends BlockBOPDecoration implements IGrowable { public boolean generateMegaTree(World worldIn, BlockPos pos, IBlockState state, Random rand, WorldGenerator generator) { // remove the saplings - IBlockState air = Blocks.air.getDefaultState(); + IBlockState air = Blocks.AIR.getDefaultState(); worldIn.setBlockState(pos, air, 4); worldIn.setBlockState(pos.add(1, 0, 0), air, 4); worldIn.setBlockState(pos.add(0, 0, 1), air, 4); diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPSeaweed.java b/src/main/java/biomesoplenty/common/block/BlockBOPSeaweed.java index 262c2b5ef..571e03b69 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPSeaweed.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPSeaweed.java @@ -84,7 +84,7 @@ public class BlockBOPSeaweed extends BlockBOPDecoration implements IBOPBlock public BlockBOPSeaweed() { - super(Material.water); + super(Material.WATER); // set some defaults this.setSoundType(SoundType.PLANT); @@ -139,7 +139,7 @@ public class BlockBOPSeaweed extends BlockBOPDecoration implements IBOPBlock @Override public void onBlockDestroyedByPlayer(World world, BlockPos pos, IBlockState state) { - world.setBlockState(pos, Blocks.water.getDefaultState() ); + world.setBlockState(pos, Blocks.WATER.getDefaultState() ); } diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPStone.java b/src/main/java/biomesoplenty/common/block/BlockBOPStone.java index 3fec22dfb..e5d3a484c 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPStone.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPStone.java @@ -70,7 +70,7 @@ public class BlockBOPStone extends Block implements IBOPBlock public BlockBOPStone() { - super(Material.rock); + super(Material.ROCK); // set some defaults this.setSoundType(SoundType.STONE); diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPStoneFormations.java b/src/main/java/biomesoplenty/common/block/BlockBOPStoneFormations.java index 4b8c04c46..d583d26df 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPStoneFormations.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPStoneFormations.java @@ -85,7 +85,7 @@ public class BlockBOPStoneFormations extends BlockBOPDecoration implements IBOPB public BlockBOPStoneFormations() { - super(Material.rock); + super(Material.ROCK); // set some defaults this.setHardness(1.0F); this.setSoundType(SoundType.STONE); @@ -98,8 +98,8 @@ public class BlockBOPStoneFormations extends BlockBOPDecoration implements IBOPB boolean formationAbove = (worldIn.getBlockState(pos.up()).getBlock() == this); boolean formationBelow = (worldIn.getBlockState(pos.down()).getBlock() == this); - boolean groundAbove = (worldIn.getBlockState(pos.up()).getBlock() == Blocks.stone); - boolean groundBelow = (worldIn.getBlockState(pos.down()).getBlock() == Blocks.stone); + boolean groundAbove = (worldIn.getBlockState(pos.up()).getBlock() == Blocks.STONE); + boolean groundBelow = (worldIn.getBlockState(pos.down()).getBlock() == Blocks.STONE); FormationPosition position; position = FormationPosition.STALAGMITE_SMALL; @@ -173,7 +173,7 @@ public class BlockBOPStoneFormations extends BlockBOPDecoration implements IBOPB @Override public boolean canBlockStay(World world, BlockPos pos, IBlockState state) { - return world.getBlockState(pos.down()).getBlock() == Blocks.stone || world.getBlockState(pos.down()) == state || world.getBlockState(pos.up()).getBlock() == Blocks.stone || world.getBlockState(pos.up()) == state; + return world.getBlockState(pos.down()).getBlock() == Blocks.STONE || world.getBlockState(pos.down()) == state || world.getBlockState(pos.up()).getBlock() == Blocks.STONE || world.getBlockState(pos.up()) == state; } @Override diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPTerrarium.java b/src/main/java/biomesoplenty/common/block/BlockBOPTerrarium.java index 5675dcadb..179f4bdf5 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPTerrarium.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPTerrarium.java @@ -74,7 +74,7 @@ public class BlockBOPTerrarium extends Block implements IBOPBlock public BlockBOPTerrarium() { - super(Material.glass); + super(Material.GLASS); this.setHardness(1.0F); this.setDefaultState(this.blockState.getBaseState().withProperty(VARIANT, TerrariumType.FERN)); } diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPVine.java b/src/main/java/biomesoplenty/common/block/BlockBOPVine.java index 58bdb3ae9..bf3a1c279 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPVine.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPVine.java @@ -10,7 +10,6 @@ package biomesoplenty.common.block; import biomesoplenty.api.block.BOPBlocks.Coloring; import biomesoplenty.api.block.IBOPBlock; -import biomesoplenty.common.init.ModBlocks; import biomesoplenty.common.item.ItemBOPBlock; import net.minecraft.block.BlockVine; import net.minecraft.block.SoundType; @@ -22,11 +21,7 @@ import net.minecraft.init.Blocks; import net.minecraft.item.ItemBlock; import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; -import net.minecraft.world.ColorizerGrass; import net.minecraft.world.IBlockAccess; -import net.minecraft.world.biome.BiomeColorHelper; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; public class BlockBOPVine extends BlockVine implements IBOPBlock { @@ -65,13 +60,13 @@ public class BlockBOPVine extends BlockVine implements IBOPBlock @Override public int getFlammability(IBlockAccess world, BlockPos pos, EnumFacing face) { - return Blocks.vine.getFlammability(world, pos, face); + return Blocks.VINE.getFlammability(world, pos, face); } @Override public int getFireSpreadSpeed(IBlockAccess world, BlockPos pos, EnumFacing face) { - return Blocks.vine.getFlammability(world, pos, face); + return Blocks.VINE.getFlammability(world, pos, face); } } \ No newline at end of file diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPWoodStairs.java b/src/main/java/biomesoplenty/common/block/BlockBOPWoodStairs.java index 039334c93..32c89bc96 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPWoodStairs.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPWoodStairs.java @@ -68,13 +68,13 @@ public class BlockBOPWoodStairs extends BlockStairs implements IBOPBlock @Override public int getFlammability(IBlockAccess world, BlockPos pos, EnumFacing face) { - return Blocks.planks.getFlammability(world, pos, face); + return Blocks.PLANKS.getFlammability(world, pos, face); } @Override public int getFireSpreadSpeed(IBlockAccess world, BlockPos pos, EnumFacing face) { - return Blocks.planks.getFireSpreadSpeed(world, pos, face); + return Blocks.PLANKS.getFireSpreadSpeed(world, pos, face); } } \ No newline at end of file diff --git a/src/main/java/biomesoplenty/common/command/BOPCommand.java b/src/main/java/biomesoplenty/common/command/BOPCommand.java index e644b044f..8e030627b 100644 --- a/src/main/java/biomesoplenty/common/command/BOPCommand.java +++ b/src/main/java/biomesoplenty/common/command/BOPCommand.java @@ -8,18 +8,11 @@ package biomesoplenty.common.command; -import java.util.List; - -import com.google.common.collect.Lists; - import biomesoplenty.common.util.biome.BiomeUtils; +import com.google.common.collect.Lists; import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; -import net.minecraft.command.CommandBase; -import net.minecraft.command.CommandException; -import net.minecraft.command.ICommandSender; -import net.minecraft.command.NumberInvalidException; -import net.minecraft.command.WrongUsageException; +import net.minecraft.command.*; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.init.Blocks; import net.minecraft.server.MinecraftServer; @@ -32,6 +25,8 @@ import net.minecraft.world.biome.BiomeGenBase; import net.minecraft.world.chunk.Chunk; import net.minecraft.world.chunk.storage.ExtendedBlockStorage; +import java.util.List; + public class BOPCommand extends CommandBase { public static int blockCount = 0; @@ -143,19 +138,19 @@ public class BOPCommand extends CommandBase { TextComponentTranslation text = new TextComponentTranslation("commands.biomesoplenty.stats.blocks", blockCount); - text.getChatStyle().setColor(TextFormatting.GREEN); + text.getStyle().setColor(TextFormatting.GREEN); sender.addChatMessage(text); text = new TextComponentTranslation("commands.biomesoplenty.stats.items", itemCount); - text.getChatStyle().setColor(TextFormatting.GREEN); + text.getStyle().setColor(TextFormatting.GREEN); sender.addChatMessage(text); text = new TextComponentTranslation("commands.biomesoplenty.stats.entities", entityCount); - text.getChatStyle().setColor(TextFormatting.GREEN); + text.getStyle().setColor(TextFormatting.GREEN); sender.addChatMessage(text); text = new TextComponentTranslation("commands.biomesoplenty.stats.biomes", biomeCount); - text.getChatStyle().setColor(TextFormatting.GREEN); + text.getStyle().setColor(TextFormatting.GREEN); sender.addChatMessage(text); } @@ -214,9 +209,9 @@ public class BOPCommand extends CommandBase if (((!blacklist && stateList.contains(state)) || (blacklist && !stateList.contains(state))) && pos.getY() > 0) { - blockStorage.set(x, y, z, Blocks.air.getDefaultState()); - world.notifyBlockUpdate(pos, state, Blocks.air.getDefaultState(), 3); - world.notifyNeighborsRespectDebug(pos, Blocks.air); + blockStorage.set(x, y, z, Blocks.AIR.getDefaultState()); + world.notifyBlockUpdate(pos, state, Blocks.AIR.getDefaultState(), 3); + world.notifyNeighborsRespectDebug(pos, Blocks.AIR); } } } diff --git a/src/main/java/biomesoplenty/common/entities/EntityButterfly.java b/src/main/java/biomesoplenty/common/entities/EntityButterfly.java index b9a99dbc1..61aa00081 100644 --- a/src/main/java/biomesoplenty/common/entities/EntityButterfly.java +++ b/src/main/java/biomesoplenty/common/entities/EntityButterfly.java @@ -8,19 +8,12 @@ package biomesoplenty.common.entities; -import java.util.Arrays; -import java.util.Collections; -import java.util.List; -import java.util.Random; - import net.minecraft.entity.EntityFlying; import net.minecraft.entity.IEntityLivingData; import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.ai.EntityAIBase; import net.minecraft.entity.ai.EntityMoveHelper; -import net.minecraft.entity.ai.EntityMoveHelper.Action; import net.minecraft.entity.monster.IMob; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.network.datasync.DataParameter; import net.minecraft.network.datasync.DataSerializers; @@ -32,6 +25,11 @@ import net.minecraft.util.math.MathHelper; import net.minecraft.world.DifficultyInstance; import net.minecraft.world.World; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Random; + public class EntityButterfly extends EntityFlying implements IMob { private static final DataParameter TYPE = EntityDataManager.createKey(EntityButterfly.class, DataSerializers.BYTE); @@ -190,7 +188,7 @@ public class EntityButterfly extends EntityFlying implements IMob { public boolean isBoxBlocked(AxisAlignedBB box) { - return !this.butterfly.worldObj.getCubes(this.butterfly, box).isEmpty(); + return !this.butterfly.worldObj.getCollisionBoxes(this.butterfly, box).isEmpty(); } // check nothing will collide with the butterfly in the direction of aim, for howFar units (or until the destination - whichever is closer) diff --git a/src/main/java/biomesoplenty/common/entities/EntityPixie.java b/src/main/java/biomesoplenty/common/entities/EntityPixie.java index 3deb131c6..b7c249987 100644 --- a/src/main/java/biomesoplenty/common/entities/EntityPixie.java +++ b/src/main/java/biomesoplenty/common/entities/EntityPixie.java @@ -8,11 +8,6 @@ package biomesoplenty.common.entities; -import java.util.Arrays; -import java.util.Collections; -import java.util.List; -import java.util.Random; - import biomesoplenty.api.item.BOPItems; import biomesoplenty.api.particle.BOPParticleTypes; import biomesoplenty.core.BiomesOPlenty; @@ -28,6 +23,11 @@ import net.minecraft.util.math.MathHelper; import net.minecraft.world.EnumSkyBlock; import net.minecraft.world.World; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Random; + public class EntityPixie extends EntityFlying implements IMob { public EntityPixie(World worldIn) { @@ -166,7 +166,7 @@ public class EntityPixie extends EntityFlying implements IMob { public boolean isBoxBlocked(AxisAlignedBB box) { - return !this.pixie.worldObj.getCubes(this.pixie, box).isEmpty(); + return !this.pixie.worldObj.getCollisionBoxes(this.pixie, box).isEmpty(); } // check nothing will collide with the pixie in the direction of aim, for howFar units (or until the destination - whichever is closer) diff --git a/src/main/java/biomesoplenty/common/entities/EntitySnail.java b/src/main/java/biomesoplenty/common/entities/EntitySnail.java index 04d997b88..3d0f11470 100644 --- a/src/main/java/biomesoplenty/common/entities/EntitySnail.java +++ b/src/main/java/biomesoplenty/common/entities/EntitySnail.java @@ -39,7 +39,7 @@ public class EntitySnail extends EntityLiving implements IMob { int y = MathHelper.floor_double(this.getEntityBoundingBox().minY); int z = MathHelper.floor_double(this.posZ); BlockPos blockpos = new BlockPos(x, y, z); - if (this.worldObj.getBlockState(blockpos.down()).getBlock() != Blocks.grass && this.worldObj.getBlockState(blockpos.down()).getBlock() != BOPBlocks.grass) + if (this.worldObj.getBlockState(blockpos.down()).getBlock() != Blocks.GRASS && this.worldObj.getBlockState(blockpos.down()).getBlock() != BOPBlocks.grass) { return false; } diff --git a/src/main/java/biomesoplenty/common/entities/EntityWasp.java b/src/main/java/biomesoplenty/common/entities/EntityWasp.java index 415ed7e6a..23fcfb1b4 100644 --- a/src/main/java/biomesoplenty/common/entities/EntityWasp.java +++ b/src/main/java/biomesoplenty/common/entities/EntityWasp.java @@ -8,11 +8,6 @@ package biomesoplenty.common.entities; -import java.util.Arrays; -import java.util.Collections; -import java.util.List; -import java.util.Random; - import biomesoplenty.api.sound.BOPSounds; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityFlying; @@ -21,7 +16,6 @@ import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.ai.EntityAIBase; import net.minecraft.entity.ai.EntityAIFindEntityNearestPlayer; import net.minecraft.entity.ai.EntityMoveHelper; -import net.minecraft.entity.ai.EntityMoveHelper.Action; import net.minecraft.entity.monster.IMob; import net.minecraft.util.DamageSource; import net.minecraft.util.EnumFacing; @@ -30,6 +24,11 @@ import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.MathHelper; import net.minecraft.world.World; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Random; + public class EntityWasp extends EntityFlying implements IMob { public EntityWasp(World worldIn) { @@ -129,7 +128,8 @@ public class EntityWasp extends EntityFlying implements IMob { public boolean isBoxBlocked(AxisAlignedBB box) { - return !this.wasp.worldObj.getCubes(this.wasp, box).isEmpty(); + //Im assuming this does what getCubes did. If not, im terribly sorry - Topisani + return !this.wasp.worldObj.getCollisionBoxes(this.wasp, box).isEmpty(); } // check nothing will collide with the wasp in the direction of aim, for howFar units (or until the destination - whichever is closer) diff --git a/src/main/java/biomesoplenty/common/entities/projectiles/EntityDart.java b/src/main/java/biomesoplenty/common/entities/projectiles/EntityDart.java index 6ecfebb25..b01f0751f 100644 --- a/src/main/java/biomesoplenty/common/entities/projectiles/EntityDart.java +++ b/src/main/java/biomesoplenty/common/entities/projectiles/EntityDart.java @@ -8,8 +8,6 @@ package biomesoplenty.common.entities.projectiles; -import java.util.List; - import biomesoplenty.api.item.BOPItems; import biomesoplenty.api.potion.BOPPotions; import biomesoplenty.common.item.ItemDart; @@ -34,6 +32,8 @@ import net.minecraft.util.math.RayTraceResult; import net.minecraft.util.math.Vec3d; import net.minecraft.world.World; +import java.util.List; + public class EntityDart extends EntityArrow { private static final DataParameter TYPE = EntityDataManager.createKey(EntityDart.class, DataSerializers.BYTE); @@ -77,7 +77,7 @@ public class EntityDart extends EntityArrow // Called from onUpdate when it is detected that the dart has hit a solid block public void onHitSolidBlock() { - this.playSound(SoundEvents.entity_arrow_hit, 1.0F, 1.2F / (this.rand.nextFloat() * 0.2F + 0.9F)); + this.playSound(SoundEvents.ENTITY_ARROW_HIT, 1.0F, 1.2F / (this.rand.nextFloat() * 0.2F + 0.9F)); int itemId = Item.getIdFromItem(BOPItems.dart); int itemMeta = this.getDartType().ordinal(); for (int i = 0; i < 16; ++i) @@ -126,7 +126,7 @@ public class EntityDart extends EntityArrow } } - this.playSound(SoundEvents.entity_arrow_hit, 1.0F, 1.2F / (this.rand.nextFloat() * 0.2F + 0.9F)); + this.playSound(SoundEvents.ENTITY_ARROW_HIT, 1.0F, 1.2F / (this.rand.nextFloat() * 0.2F + 0.9F)); this.setDead(); } else diff --git a/src/main/java/biomesoplenty/common/entities/projectiles/EntityMudball.java b/src/main/java/biomesoplenty/common/entities/projectiles/EntityMudball.java index fb816446b..d3666906b 100644 --- a/src/main/java/biomesoplenty/common/entities/projectiles/EntityMudball.java +++ b/src/main/java/biomesoplenty/common/entities/projectiles/EntityMudball.java @@ -5,7 +5,6 @@ import biomesoplenty.core.BiomesOPlenty; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.projectile.EntityThrowable; import net.minecraft.init.MobEffects; -import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.util.DamageSource; import net.minecraft.util.math.RayTraceResult; @@ -38,7 +37,7 @@ public class EntityMudball extends EntityThrowable hit.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), 0.0F); if (hit.entityHit instanceof EntityLivingBase) { - ((EntityLivingBase)hit.entityHit).addPotionEffect(new PotionEffect(MobEffects.moveSlowdown, 400, 2)); + ((EntityLivingBase)hit.entityHit).addPotionEffect(new PotionEffect(MobEffects.SLOWNESS, 400, 2)); } } diff --git a/src/main/java/biomesoplenty/common/entities/projectiles/RenderMudball.java b/src/main/java/biomesoplenty/common/entities/projectiles/RenderMudball.java index 8aa37a114..54a3b04a4 100644 --- a/src/main/java/biomesoplenty/common/entities/projectiles/RenderMudball.java +++ b/src/main/java/biomesoplenty/common/entities/projectiles/RenderMudball.java @@ -33,7 +33,7 @@ public class RenderMudball extends Render GlStateManager.scale(0.5F, 0.5F, 0.5F); GlStateManager.rotate(-this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F); GlStateManager.rotate(this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F); - this.bindTexture(TextureMap.locationBlocksTexture); + this.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE); this.renderItem.renderItem(this.getItemStack(entity), ItemCameraTransforms.TransformType.GROUND); GlStateManager.disableRescaleNormal(); GlStateManager.popMatrix(); @@ -48,6 +48,6 @@ public class RenderMudball extends Render @Override protected ResourceLocation getEntityTexture(EntityMudball entity) { - return TextureMap.locationBlocksTexture; + return TextureMap.LOCATION_BLOCKS_TEXTURE; } } \ No newline at end of file diff --git a/src/main/java/biomesoplenty/common/enums/BOPClimates.java b/src/main/java/biomesoplenty/common/enums/BOPClimates.java index bc774347e..e576cd285 100644 --- a/src/main/java/biomesoplenty/common/enums/BOPClimates.java +++ b/src/main/java/biomesoplenty/common/enums/BOPClimates.java @@ -1,13 +1,13 @@ package biomesoplenty.common.enums; -import java.util.ArrayList; -import java.util.Iterator; - import biomesoplenty.common.world.layer.BOPGenLayer; import net.minecraft.init.Biomes; import net.minecraft.world.biome.BiomeGenBase; import net.minecraftforge.common.BiomeManager.BiomeType; +import java.util.ArrayList; +import java.util.Iterator; + public enum BOPClimates { ICE_CAP (BiomeType.ICY), @@ -65,11 +65,11 @@ public enum BOPClimates { switch (this) { case ICE_CAP: - return (layer.nextInt(2)==0) ? this.getRandomLandBiome(layer) : Biomes.frozenOcean; + return (layer.nextInt(2)==0) ? this.getRandomLandBiome(layer) : Biomes.FROZEN_OCEAN; case TUNDRA: case BOREAL: - return (layer.nextInt(3)!=0) ? (deep ? Biomes.deepOcean : Biomes.ocean) : Biomes.frozenOcean; + return (layer.nextInt(3)!=0) ? (deep ? Biomes.DEEP_OCEAN : Biomes.OCEAN) : Biomes.FROZEN_OCEAN; default: - return (deep ? Biomes.deepOcean : Biomes.ocean); + return (deep ? Biomes.DEEP_OCEAN : Biomes.OCEAN); } } @@ -77,20 +77,20 @@ public enum BOPClimates { { // set up vanilla biomes - BOPClimates.ICE_CAP.addLandBiome(10,Biomes.icePlains); - BOPClimates.TUNDRA.addLandBiome(10, Biomes.coldTaiga).addLandBiome(10, Biomes.extremeHills); - BOPClimates.BOREAL.addLandBiome(5, Biomes.megaTaiga).addLandBiome(5, Biomes.extremeHills).addLandBiome(20, Biomes.taiga); - BOPClimates.COLD_SWAMP.addLandBiome(5, Biomes.swampland); - BOPClimates.WET_TEMPERATE.addLandBiome(20, Biomes.roofedForest).addLandBiome(5, Biomes.forest); - BOPClimates.DRY_TEMPERATE.addLandBiome(5, Biomes.plains); - BOPClimates.COOL_TEMPERATE.addLandBiome(15, Biomes.forest).addLandBiome(10, Biomes.birchForest); - BOPClimates.WARM_TEMPERATE.addLandBiome(20, Biomes.plains).addLandBiome(5, Biomes.birchForest); - BOPClimates.HOT_SWAMP.addLandBiome(5, Biomes.swampland); - BOPClimates.TROPICAL.addLandBiome(15, Biomes.jungle); - BOPClimates.MEDITERANEAN.addLandBiome(5, Biomes.plains); - BOPClimates.SAVANNA.addLandBiome(20, Biomes.savanna); - BOPClimates.HOT_DESERT.addLandBiome(30, Biomes.desert).addLandBiome(10, Biomes.mesaPlateau); - BOPClimates.WASTELAND.addLandBiome(1, Biomes.desert); + BOPClimates.ICE_CAP.addLandBiome(10,Biomes.ICE_PLAINS); + BOPClimates.TUNDRA.addLandBiome(10, Biomes.COLD_TAIGA).addLandBiome(10, Biomes.EXTREME_HILLS); + BOPClimates.BOREAL.addLandBiome(5, Biomes.REDWOOD_TAIGA).addLandBiome(5, Biomes.EXTREME_HILLS).addLandBiome(20, Biomes.TAIGA); + BOPClimates.COLD_SWAMP.addLandBiome(5, Biomes.SWAMPLAND); + BOPClimates.WET_TEMPERATE.addLandBiome(20, Biomes.ROOFED_FOREST).addLandBiome(5, Biomes.FOREST); + BOPClimates.DRY_TEMPERATE.addLandBiome(5, Biomes.PLAINS); + BOPClimates.COOL_TEMPERATE.addLandBiome(15, Biomes.FOREST).addLandBiome(10, Biomes.BIRCH_FOREST); + BOPClimates.WARM_TEMPERATE.addLandBiome(20, Biomes.PLAINS).addLandBiome(5, Biomes.BIRCH_FOREST); + BOPClimates.HOT_SWAMP.addLandBiome(5, Biomes.SWAMPLAND); + BOPClimates.TROPICAL.addLandBiome(15, Biomes.JUNGLE); + BOPClimates.MEDITERANEAN.addLandBiome(5, Biomes.PLAINS); + BOPClimates.SAVANNA.addLandBiome(20, Biomes.SAVANNA); + BOPClimates.HOT_DESERT.addLandBiome(30, Biomes.DESERT).addLandBiome(10, Biomes.MESA_CLEAR_ROCK); + BOPClimates.WASTELAND.addLandBiome(1, Biomes.DESERT); } diff --git a/src/main/java/biomesoplenty/common/fluids/blocks/BlockBloodFluid.java b/src/main/java/biomesoplenty/common/fluids/blocks/BlockBloodFluid.java index d4726db23..72bfbfd95 100644 --- a/src/main/java/biomesoplenty/common/fluids/blocks/BlockBloodFluid.java +++ b/src/main/java/biomesoplenty/common/fluids/blocks/BlockBloodFluid.java @@ -21,7 +21,7 @@ public class BlockBloodFluid extends BlockFluidClassic { public BlockBloodFluid(Fluid fluid) { - super(fluid, Material.water); + super(fluid, Material.WATER); } @Override diff --git a/src/main/java/biomesoplenty/common/fluids/blocks/BlockHoneyFluid.java b/src/main/java/biomesoplenty/common/fluids/blocks/BlockHoneyFluid.java index 336667f47..2efac46d4 100644 --- a/src/main/java/biomesoplenty/common/fluids/blocks/BlockHoneyFluid.java +++ b/src/main/java/biomesoplenty/common/fluids/blocks/BlockHoneyFluid.java @@ -13,7 +13,6 @@ import net.minecraft.block.state.IBlockState; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.init.MobEffects; -import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; @@ -26,18 +25,19 @@ public class BlockHoneyFluid extends BlockFluidFinite { public BlockHoneyFluid(Fluid fluid) { - super(fluid, Material.water); + super(fluid, Material.WATER); this.setLightOpacity(1); // default state should be a 'full block' of honey this.setDefaultState(this.blockState.getBaseState().withProperty(LEVEL, this.quantaPerBlock - 1)); } - - @Override + + //TODO: whats happened here? - Topisani + // @Override public void onEntityCollidedWithBlock(World world, BlockPos pos, Entity entity) { if (entity instanceof EntityLivingBase) { - ((EntityLivingBase)entity).addPotionEffect(new PotionEffect(MobEffects.moveSlowdown, 200, 2)); + ((EntityLivingBase)entity).addPotionEffect(new PotionEffect(MobEffects.SLOWNESS, 200, 2)); } } diff --git a/src/main/java/biomesoplenty/common/fluids/blocks/BlockHotSpringWaterFluid.java b/src/main/java/biomesoplenty/common/fluids/blocks/BlockHotSpringWaterFluid.java index 3c3dc3843..03c74d16a 100644 --- a/src/main/java/biomesoplenty/common/fluids/blocks/BlockHotSpringWaterFluid.java +++ b/src/main/java/biomesoplenty/common/fluids/blocks/BlockHotSpringWaterFluid.java @@ -8,14 +8,11 @@ package biomesoplenty.common.fluids.blocks; -import java.util.Random; - import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.init.MobEffects; -import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.math.AxisAlignedBB; @@ -27,19 +24,22 @@ import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import java.util.Random; + public class BlockHotSpringWaterFluid extends BlockFluidClassic { public BlockHotSpringWaterFluid(Fluid fluid) { - super(fluid, Material.water); + super(fluid, Material.WATER); } - - @Override + + //TODO: this no longer exists. Fix? - Topisani + //@Override public void onEntityCollidedWithBlock(World world, BlockPos pos, Entity entity) { if (entity instanceof EntityLivingBase) { - ((EntityLivingBase)entity).addPotionEffect(new PotionEffect(MobEffects.regeneration, 100)); + ((EntityLivingBase)entity).addPotionEffect(new PotionEffect(MobEffects.REGENERATION, 100)); } } diff --git a/src/main/java/biomesoplenty/common/fluids/blocks/BlockPoisonFluid.java b/src/main/java/biomesoplenty/common/fluids/blocks/BlockPoisonFluid.java index 330dce4d9..7c598623d 100644 --- a/src/main/java/biomesoplenty/common/fluids/blocks/BlockPoisonFluid.java +++ b/src/main/java/biomesoplenty/common/fluids/blocks/BlockPoisonFluid.java @@ -13,7 +13,6 @@ import net.minecraft.block.state.IBlockState; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.init.MobEffects; -import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; @@ -26,18 +25,19 @@ public class BlockPoisonFluid extends BlockFluidClassic { public BlockPoisonFluid(Fluid fluid) { - super(fluid, Material.water); + super(fluid, Material.WATER); this.setLightOpacity(3); this.quantaPerBlock = 4; } - @Override + //TODO: this probably moved somewhere else, find out what it is and where - Topisani + // @Override public void onEntityCollidedWithBlock(World world, BlockPos pos, Entity entity) { if (entity instanceof EntityLivingBase) { - ((EntityLivingBase)entity).addPotionEffect(new PotionEffect(MobEffects.poison, 100)); - ((EntityLivingBase)entity).addPotionEffect(new PotionEffect(MobEffects.hunger, 100)); + ((EntityLivingBase)entity).addPotionEffect(new PotionEffect(MobEffects.POISON, 100)); + ((EntityLivingBase)entity).addPotionEffect(new PotionEffect(MobEffects.HUNGER, 100)); } } diff --git a/src/main/java/biomesoplenty/common/handler/AchievementEventHandler.java b/src/main/java/biomesoplenty/common/handler/AchievementEventHandler.java index c8554d74a..0b776c1cf 100644 --- a/src/main/java/biomesoplenty/common/handler/AchievementEventHandler.java +++ b/src/main/java/biomesoplenty/common/handler/AchievementEventHandler.java @@ -7,11 +7,6 @@ ******************************************************************************/ package biomesoplenty.common.handler; -import java.util.Iterator; -import java.util.Set; - -import com.google.common.collect.Sets; - import biomesoplenty.api.achievement.BOPAchievements; import biomesoplenty.api.biome.BOPBiomes; import biomesoplenty.api.block.BOPBlocks; @@ -24,6 +19,7 @@ import biomesoplenty.common.enums.BOPFlowers; import biomesoplenty.common.enums.BOPPlants; import biomesoplenty.common.enums.BOPTrees; import biomesoplenty.common.item.ItemJarFilled; +import com.google.common.collect.Sets; import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; @@ -44,9 +40,12 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.gameevent.PlayerEvent; import net.minecraftforge.fml.common.gameevent.PlayerEvent.ItemCraftedEvent; +import java.util.Iterator; +import java.util.Set; + public class AchievementEventHandler { - private static final Set BOP_BIOMES_TO_EXPLORE = Sets.union(BOPBiomes.REG_INSTANCE.getPresentBiomes(), BiomeGenBase.explorationBiomesList); + private static final Set BOP_BIOMES_TO_EXPLORE = Sets.union(BOPBiomes.REG_INSTANCE.getPresentBiomes(), BiomeGenBase.EXPLORATION_BIOMES_LIST); @SubscribeEvent public void onItemPickup(PlayerEvent.ItemPickupEvent event) @@ -60,11 +59,11 @@ public class AchievementEventHandler if (block != null && block instanceof BlockBOPLog) { - player.addStat(AchievementList.mineWood); + player.addStat(AchievementList.MINE_WOOD); } //Flower Child Achievement - if (block != null && block instanceof BlockBOPFlower || block == Blocks.red_flower || block == Blocks.yellow_flower) + if (block != null && block instanceof BlockBOPFlower || block == Blocks.RED_FLOWER || block == Blocks.YELLOW_FLOWER) { player.addStat(BOPAchievements.obtain_flowers); } diff --git a/src/main/java/biomesoplenty/common/handler/BucketEventHandler.java b/src/main/java/biomesoplenty/common/handler/BucketEventHandler.java index 80b1f606b..982030983 100644 --- a/src/main/java/biomesoplenty/common/handler/BucketEventHandler.java +++ b/src/main/java/biomesoplenty/common/handler/BucketEventHandler.java @@ -18,7 +18,6 @@ import net.minecraft.block.state.IBlockState; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.stats.StatList; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.RayTraceResult; import net.minecraftforge.event.entity.player.FillBucketEvent; @@ -32,7 +31,7 @@ public class BucketEventHandler public void onRightClickHoldingBucket(FillBucketEvent event) { // check we're using a bucket, on a block we can modify - if (event.getEmptyBucket().getItem() != Items.bucket) {return;} + if (event.getEmptyBucket().getItem() != Items.BUCKET) {return;} if (event.getTarget() == null || event.getTarget().typeOfHit != RayTraceResult.Type.BLOCK) {return;} BlockPos blockpos = event.getTarget().getBlockPos(); if (!event.getWorld().isBlockModifiable(event.getEntityPlayer(), blockpos)) {return;} @@ -55,7 +54,7 @@ public class BucketEventHandler } else if (iblockstate.getBlock() == BOPBlocks.hot_spring_water && ((Integer)iblockstate.getValue(BlockHotSpringWaterFluid.LEVEL)).intValue() == 0) { - filled_bucket = Items.water_bucket; + filled_bucket = Items.WATER_BUCKET; } else { diff --git a/src/main/java/biomesoplenty/common/handler/UseHoeEventHandler.java b/src/main/java/biomesoplenty/common/handler/UseHoeEventHandler.java index 9aee43968..a3645b069 100644 --- a/src/main/java/biomesoplenty/common/handler/UseHoeEventHandler.java +++ b/src/main/java/biomesoplenty/common/handler/UseHoeEventHandler.java @@ -64,7 +64,7 @@ public class UseHoeEventHandler } else if (dirtBlock instanceof BlockDirt && state.getValue(BlockBOPGrass.VARIANT) != BlockBOPGrass.BOPGrassType.SMOLDERING) { - world.setBlockState(pos, Blocks.farmland.getDefaultState()); + world.setBlockState(pos, Blocks.FARMLAND.getDefaultState()); } } diff --git a/src/main/java/biomesoplenty/common/init/ModAchievements.java b/src/main/java/biomesoplenty/common/init/ModAchievements.java index aa15c8cee..27188262d 100644 --- a/src/main/java/biomesoplenty/common/init/ModAchievements.java +++ b/src/main/java/biomesoplenty/common/init/ModAchievements.java @@ -59,7 +59,7 @@ public class ModAchievements private static void addAchievements() { - obtain_flowers = addAchievement("achievement.obtain_flowers", "obtain_flowers", 0, 0, new ItemStack(Blocks.red_flower), null); + obtain_flowers = addAchievement("achievement.obtain_flowers", "obtain_flowers", 0, 0, new ItemStack(Blocks.RED_FLOWER), null); craft_muddy_pickaxe = addAchievement("achievement.craft_muddy_pickaxe", "craft_muddy_pickaxe", -1, -4, new ItemStack(BOPItems.mud_pickaxe), obtain_flowers); obtain_turnip = addAchievement("achievement.obtain_turnip", "obtain_turnip", -1, -6, new ItemStack(BOPItems.turnip), craft_muddy_pickaxe); diff --git a/src/main/java/biomesoplenty/common/init/ModBiomes.java b/src/main/java/biomesoplenty/common/init/ModBiomes.java index 3dbe8ff91..2b3bd8583 100644 --- a/src/main/java/biomesoplenty/common/init/ModBiomes.java +++ b/src/main/java/biomesoplenty/common/init/ModBiomes.java @@ -8,212 +8,19 @@ package biomesoplenty.common.init; -import static biomesoplenty.api.biome.BOPBiomes.alps; -import static biomesoplenty.api.biome.BOPBiomes.bamboo_forest; -import static biomesoplenty.api.biome.BOPBiomes.bayou; -import static biomesoplenty.api.biome.BOPBiomes.birch_forest_extension; -import static biomesoplenty.api.biome.BOPBiomes.birch_forest_hills_extension; -import static biomesoplenty.api.biome.BOPBiomes.bog; -import static biomesoplenty.api.biome.BOPBiomes.boreal_forest; -import static biomesoplenty.api.biome.BOPBiomes.brushland; -import static biomesoplenty.api.biome.BOPBiomes.chaparral; -import static biomesoplenty.api.biome.BOPBiomes.cherry_blossom_grove; -import static biomesoplenty.api.biome.BOPBiomes.cold_desert; -import static biomesoplenty.api.biome.BOPBiomes.cold_taiga_extension; -import static biomesoplenty.api.biome.BOPBiomes.cold_taiga_hills_extension; -import static biomesoplenty.api.biome.BOPBiomes.coniferous_forest; -import static biomesoplenty.api.biome.BOPBiomes.coral_reef; -import static biomesoplenty.api.biome.BOPBiomes.crag; -import static biomesoplenty.api.biome.BOPBiomes.dead_forest; -import static biomesoplenty.api.biome.BOPBiomes.dead_swamp; -import static biomesoplenty.api.biome.BOPBiomes.desert_extension; -import static biomesoplenty.api.biome.BOPBiomes.desert_hills_extension; -import static biomesoplenty.api.biome.BOPBiomes.end_extension; -import static biomesoplenty.api.biome.BOPBiomes.eucalyptus_forest; -import static biomesoplenty.api.biome.BOPBiomes.excludedDecoratedWorldTypes; -import static biomesoplenty.api.biome.BOPBiomes.extreme_hills_extension; -import static biomesoplenty.api.biome.BOPBiomes.extreme_hills_plus_extension; -import static biomesoplenty.api.biome.BOPBiomes.fen; -import static biomesoplenty.api.biome.BOPBiomes.flower_field; -import static biomesoplenty.api.biome.BOPBiomes.flower_island; -import static biomesoplenty.api.biome.BOPBiomes.forest_extension; -import static biomesoplenty.api.biome.BOPBiomes.forest_hills_extension; -import static biomesoplenty.api.biome.BOPBiomes.glacier; -import static biomesoplenty.api.biome.BOPBiomes.grassland; -import static biomesoplenty.api.biome.BOPBiomes.gravel_beach; -import static biomesoplenty.api.biome.BOPBiomes.grove; -import static biomesoplenty.api.biome.BOPBiomes.heathland; -import static biomesoplenty.api.biome.BOPBiomes.highland; -import static biomesoplenty.api.biome.BOPBiomes.ice_mountains_extension; -import static biomesoplenty.api.biome.BOPBiomes.ice_plains_extension; -import static biomesoplenty.api.biome.BOPBiomes.jungle_extension; -import static biomesoplenty.api.biome.BOPBiomes.jungle_hills_extension; -import static biomesoplenty.api.biome.BOPBiomes.kelp_forest; -import static biomesoplenty.api.biome.BOPBiomes.land_of_lakes; -import static biomesoplenty.api.biome.BOPBiomes.lavender_fields; -import static biomesoplenty.api.biome.BOPBiomes.lush_desert; -import static biomesoplenty.api.biome.BOPBiomes.lush_swamp; -import static biomesoplenty.api.biome.BOPBiomes.mangrove; -import static biomesoplenty.api.biome.BOPBiomes.maple_woods; -import static biomesoplenty.api.biome.BOPBiomes.marsh; -import static biomesoplenty.api.biome.BOPBiomes.meadow; -import static biomesoplenty.api.biome.BOPBiomes.mega_taiga_extension; -import static biomesoplenty.api.biome.BOPBiomes.mega_taiga_hills_extension; -import static biomesoplenty.api.biome.BOPBiomes.mesa_extension; -import static biomesoplenty.api.biome.BOPBiomes.mesa_plateau_extension; -import static biomesoplenty.api.biome.BOPBiomes.moor; -import static biomesoplenty.api.biome.BOPBiomes.mountain; -import static biomesoplenty.api.biome.BOPBiomes.mountain_foothills; -import static biomesoplenty.api.biome.BOPBiomes.mushroom_island_extension; -import static biomesoplenty.api.biome.BOPBiomes.mystic_grove; -import static biomesoplenty.api.biome.BOPBiomes.oasis; -import static biomesoplenty.api.biome.BOPBiomes.ocean_extension; -import static biomesoplenty.api.biome.BOPBiomes.ominous_woods; -import static biomesoplenty.api.biome.BOPBiomes.orchard; -import static biomesoplenty.api.biome.BOPBiomes.origin_island; -import static biomesoplenty.api.biome.BOPBiomes.outback; -import static biomesoplenty.api.biome.BOPBiomes.overgrown_cliffs; -import static biomesoplenty.api.biome.BOPBiomes.plains_extension; -import static biomesoplenty.api.biome.BOPBiomes.prairie; -import static biomesoplenty.api.biome.BOPBiomes.quagmire; -import static biomesoplenty.api.biome.BOPBiomes.rainforest; -import static biomesoplenty.api.biome.BOPBiomes.redwood_forest; -import static biomesoplenty.api.biome.BOPBiomes.roofed_forest_extension; -import static biomesoplenty.api.biome.BOPBiomes.sacred_springs; -import static biomesoplenty.api.biome.BOPBiomes.savanna_extension; -import static biomesoplenty.api.biome.BOPBiomes.savanna_plateau_extension; -import static biomesoplenty.api.biome.BOPBiomes.seasonal_forest; -import static biomesoplenty.api.biome.BOPBiomes.shield; -import static biomesoplenty.api.biome.BOPBiomes.shrubland; -import static biomesoplenty.api.biome.BOPBiomes.snowy_coniferous_forest; -import static biomesoplenty.api.biome.BOPBiomes.snowy_forest; -import static biomesoplenty.api.biome.BOPBiomes.steppe; -import static biomesoplenty.api.biome.BOPBiomes.swampland_extension; -import static biomesoplenty.api.biome.BOPBiomes.taiga_extension; -import static biomesoplenty.api.biome.BOPBiomes.taiga_hills_extension; -import static biomesoplenty.api.biome.BOPBiomes.temperate_rainforest; -import static biomesoplenty.api.biome.BOPBiomes.tropical_island; -import static biomesoplenty.api.biome.BOPBiomes.tropical_rainforest; -import static biomesoplenty.api.biome.BOPBiomes.tundra; -import static biomesoplenty.api.biome.BOPBiomes.volcanic_island; -import static biomesoplenty.api.biome.BOPBiomes.wasteland; -import static biomesoplenty.api.biome.BOPBiomes.wetland; -import static biomesoplenty.api.biome.BOPBiomes.woodland; -import static biomesoplenty.api.biome.BOPBiomes.xeric_shrubland; - -import java.io.File; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.google.common.base.Optional; -import com.google.common.collect.ImmutableSet; -import com.google.common.collect.Sets; - import biomesoplenty.api.biome.BOPBiome; import biomesoplenty.api.biome.BOPBiomes; import biomesoplenty.api.biome.IExtendedBiome; -import biomesoplenty.common.biome.overworld.BiomeGenAlps; -import biomesoplenty.common.biome.overworld.BiomeGenBambooForest; -import biomesoplenty.common.biome.overworld.BiomeGenBayou; -import biomesoplenty.common.biome.overworld.BiomeGenBog; -import biomesoplenty.common.biome.overworld.BiomeGenBorealForest; -import biomesoplenty.common.biome.overworld.BiomeGenBrushland; -import biomesoplenty.common.biome.overworld.BiomeGenChaparral; -import biomesoplenty.common.biome.overworld.BiomeGenCherryBlossomGrove; -import biomesoplenty.common.biome.overworld.BiomeGenColdDesert; -import biomesoplenty.common.biome.overworld.BiomeGenConiferousForest; -import biomesoplenty.common.biome.overworld.BiomeGenCoralReef; -import biomesoplenty.common.biome.overworld.BiomeGenCrag; -import biomesoplenty.common.biome.overworld.BiomeGenDeadForest; -import biomesoplenty.common.biome.overworld.BiomeGenDeadSwamp; -import biomesoplenty.common.biome.overworld.BiomeGenEucalyptusForest; -import biomesoplenty.common.biome.overworld.BiomeGenFen; -import biomesoplenty.common.biome.overworld.BiomeGenFlowerField; -import biomesoplenty.common.biome.overworld.BiomeGenFlowerIsland; -import biomesoplenty.common.biome.overworld.BiomeGenGlacier; -import biomesoplenty.common.biome.overworld.BiomeGenGrassland; -import biomesoplenty.common.biome.overworld.BiomeGenGravelBeach; -import biomesoplenty.common.biome.overworld.BiomeGenGrove; -import biomesoplenty.common.biome.overworld.BiomeGenHeathland; -import biomesoplenty.common.biome.overworld.BiomeGenHighland; -import biomesoplenty.common.biome.overworld.BiomeGenKelpForest; -import biomesoplenty.common.biome.overworld.BiomeGenLandOfLakes; -import biomesoplenty.common.biome.overworld.BiomeGenLavenderFields; -import biomesoplenty.common.biome.overworld.BiomeGenLushDesert; -import biomesoplenty.common.biome.overworld.BiomeGenLushSwamp; -import biomesoplenty.common.biome.overworld.BiomeGenMangrove; -import biomesoplenty.common.biome.overworld.BiomeGenMapleWoods; -import biomesoplenty.common.biome.overworld.BiomeGenMarsh; -import biomesoplenty.common.biome.overworld.BiomeGenMeadow; -import biomesoplenty.common.biome.overworld.BiomeGenMoor; -import biomesoplenty.common.biome.overworld.BiomeGenMountain; -import biomesoplenty.common.biome.overworld.BiomeGenMysticGrove; -import biomesoplenty.common.biome.overworld.BiomeGenOasis; -import biomesoplenty.common.biome.overworld.BiomeGenOminousWoods; -import biomesoplenty.common.biome.overworld.BiomeGenOrchard; -import biomesoplenty.common.biome.overworld.BiomeGenOriginIsland; -import biomesoplenty.common.biome.overworld.BiomeGenOutback; -import biomesoplenty.common.biome.overworld.BiomeGenOvergrownCliffs; -import biomesoplenty.common.biome.overworld.BiomeGenPrairie; -import biomesoplenty.common.biome.overworld.BiomeGenQuagmire; -import biomesoplenty.common.biome.overworld.BiomeGenRainforest; -import biomesoplenty.common.biome.overworld.BiomeGenRedwoodForest; -import biomesoplenty.common.biome.overworld.BiomeGenSacredSprings; -import biomesoplenty.common.biome.overworld.BiomeGenSeasonalForest; -import biomesoplenty.common.biome.overworld.BiomeGenShield; -import biomesoplenty.common.biome.overworld.BiomeGenShrubland; -import biomesoplenty.common.biome.overworld.BiomeGenSnowyConiferousForest; -import biomesoplenty.common.biome.overworld.BiomeGenSnowyForest; -import biomesoplenty.common.biome.overworld.BiomeGenSteppe; -import biomesoplenty.common.biome.overworld.BiomeGenTemperateRainforest; -import biomesoplenty.common.biome.overworld.BiomeGenTropicalIsland; -import biomesoplenty.common.biome.overworld.BiomeGenTropicalRainforest; -import biomesoplenty.common.biome.overworld.BiomeGenTundra; -import biomesoplenty.common.biome.overworld.BiomeGenVolcanicIsland; -import biomesoplenty.common.biome.overworld.BiomeGenWasteland; -import biomesoplenty.common.biome.overworld.BiomeGenWetland; -import biomesoplenty.common.biome.overworld.BiomeGenWoodland; -import biomesoplenty.common.biome.overworld.BiomeGenXericShrubland; -import biomesoplenty.common.biome.vanilla.BiomeExtBirchForest; -import biomesoplenty.common.biome.vanilla.BiomeExtBirchForestHills; -import biomesoplenty.common.biome.vanilla.BiomeExtColdTaiga; -import biomesoplenty.common.biome.vanilla.BiomeExtColdTaigaHills; -import biomesoplenty.common.biome.vanilla.BiomeExtDesert; -import biomesoplenty.common.biome.vanilla.BiomeExtDesertHills; -import biomesoplenty.common.biome.vanilla.BiomeExtEnd; -import biomesoplenty.common.biome.vanilla.BiomeExtExtremeHills; -import biomesoplenty.common.biome.vanilla.BiomeExtExtremeHillsPlus; -import biomesoplenty.common.biome.vanilla.BiomeExtForest; -import biomesoplenty.common.biome.vanilla.BiomeExtForestHills; -import biomesoplenty.common.biome.vanilla.BiomeExtIceMountains; -import biomesoplenty.common.biome.vanilla.BiomeExtIcePlains; -import biomesoplenty.common.biome.vanilla.BiomeExtJungle; -import biomesoplenty.common.biome.vanilla.BiomeExtJungleHills; -import biomesoplenty.common.biome.vanilla.BiomeExtMegaTaiga; -import biomesoplenty.common.biome.vanilla.BiomeExtMegaTaigaHills; -import biomesoplenty.common.biome.vanilla.BiomeExtMesa; -import biomesoplenty.common.biome.vanilla.BiomeExtMesaPlateau; -import biomesoplenty.common.biome.vanilla.BiomeExtMushroomIsland; -import biomesoplenty.common.biome.vanilla.BiomeExtOcean; -import biomesoplenty.common.biome.vanilla.BiomeExtPlains; -import biomesoplenty.common.biome.vanilla.BiomeExtRoofedForest; -import biomesoplenty.common.biome.vanilla.BiomeExtSavanna; -import biomesoplenty.common.biome.vanilla.BiomeExtSavannaPlateau; -import biomesoplenty.common.biome.vanilla.BiomeExtSwampland; -import biomesoplenty.common.biome.vanilla.BiomeExtTaiga; -import biomesoplenty.common.biome.vanilla.BiomeExtTaigaHills; +import biomesoplenty.common.biome.overworld.*; +import biomesoplenty.common.biome.vanilla.*; import biomesoplenty.common.command.BOPCommand; import biomesoplenty.common.enums.BOPClimates; -import biomesoplenty.common.util.biome.BiomeUtils; import biomesoplenty.common.util.config.BOPConfig; import biomesoplenty.common.world.WorldTypeBOP; import biomesoplenty.core.BiomesOPlenty; +import com.google.common.base.Optional; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Sets; import net.minecraft.init.Biomes; import net.minecraft.world.WorldType; import net.minecraft.world.biome.BiomeGenBase; @@ -221,6 +28,13 @@ import net.minecraftforge.common.BiomeDictionary; import net.minecraftforge.common.BiomeDictionary.Type; import net.minecraftforge.common.BiomeManager; +import java.io.File; +import java.io.IOException; +import java.util.*; +import java.util.Map.Entry; + +import static biomesoplenty.api.biome.BOPBiomes.*; + public class ModBiomes implements BOPBiomes.IBiomeRegistry { public static WorldTypeBOP worldTypeBOP; @@ -299,23 +113,23 @@ public class ModBiomes implements BOPBiomes.IBiomeRegistry // Add vanilla sub biomes - setSubBiome(Biomes.desert, Biomes.desertHills); - setSubBiome(Biomes.forest, Biomes.forestHills); - setSubBiome(Biomes.birchForest, Biomes.birchForestHills); - setSubBiome(Biomes.roofedForest, Biomes.plains); - setSubBiome(Biomes.taiga, Biomes.taigaHills); - setSubBiome(Biomes.megaTaiga, Biomes.megaTaigaHills); - setSubBiome(Biomes.coldTaiga, Biomes.coldTaigaHills); - setSubBiome(Biomes.plains, Biomes.forestHills, Biomes.forest); - setSubBiome(Biomes.icePlains, Biomes.iceMountains); - setSubBiome(Biomes.jungle, Biomes.jungleHills); - setSubBiome(Biomes.extremeHills, Biomes.extremeHillsPlus); - setSubBiome(Biomes.savanna, Biomes.savannaPlateau); - setSubBiome(Biomes.mesaPlateau_F, Biomes.mesa); + setSubBiome(Biomes.DESERT, Biomes.DESERT_HILLS); + setSubBiome(Biomes.FOREST, Biomes.FOREST_HILLS); + setSubBiome(Biomes.BIRCH_FOREST, Biomes.BIRCH_FOREST_HILLS); + setSubBiome(Biomes.ROOFED_FOREST, Biomes.PLAINS); + setSubBiome(Biomes.TAIGA, Biomes.TAIGA_HILLS); + setSubBiome(Biomes.REDWOOD_TAIGA, Biomes.REDWOOD_TAIGA_HILLS); + setSubBiome(Biomes.COLD_TAIGA, Biomes.COLD_TAIGA_HILLS); + setSubBiome(Biomes.PLAINS, Biomes.FOREST_HILLS, Biomes.FOREST); + setSubBiome(Biomes.ICE_PLAINS, Biomes.ICE_MOUNTAINS); + setSubBiome(Biomes.JUNGLE, Biomes.JUNGLE_HILLS); + setSubBiome(Biomes.EXTREME_HILLS, Biomes.EXTREME_HILLS_WITH_TREES); + setSubBiome(Biomes.SAVANNA, Biomes.SAVANNA_PLATEAU); + setSubBiome(Biomes.MESA_ROCK, Biomes.MESA); // oceans get occasional patches of deep ocean // don't add any islands - those are done per climate in GenLayerBiomeIslands - setSubBiome(Biomes.ocean, Biomes.deepOcean); + setSubBiome(Biomes.OCEAN, Biomes.DEEP_OCEAN); } @@ -387,10 +201,10 @@ public class ModBiomes implements BOPBiomes.IBiomeRegistry coral_reef = registerBOPBiome(new BiomeGenCoralReef()); kelp_forest = registerBOPBiome(new BiomeGenKelpForest()); - setSubBiome(Optional.of(Biomes.icePlains), BOPBiomes.glacier); - setSubBiome(Optional.of(Biomes.desert), BOPBiomes.oasis); - setSubBiome(Optional.of(Biomes.ocean), BOPBiomes.coral_reef); - setSubBiome(Optional.of(Biomes.ocean), BOPBiomes.kelp_forest); + setSubBiome(Optional.of(Biomes.ICE_PLAINS), BOPBiomes.glacier); + setSubBiome(Optional.of(Biomes.DESERT), BOPBiomes.oasis); + setSubBiome(Optional.of(Biomes.OCEAN), BOPBiomes.coral_reef); + setSubBiome(Optional.of(Biomes.OCEAN), BOPBiomes.kelp_forest); // island biomes diff --git a/src/main/java/biomesoplenty/common/init/ModBlockQueries.java b/src/main/java/biomesoplenty/common/init/ModBlockQueries.java index c5bb75936..ed2b793a0 100644 --- a/src/main/java/biomesoplenty/common/init/ModBlockQueries.java +++ b/src/main/java/biomesoplenty/common/init/ModBlockQueries.java @@ -8,36 +8,6 @@ package biomesoplenty.common.init; -import static biomesoplenty.api.block.BlockQueries.air; -import static biomesoplenty.api.block.BlockQueries.airAbove; -import static biomesoplenty.api.block.BlockQueries.airBelow; -import static biomesoplenty.api.block.BlockQueries.airOrLeaves; -import static biomesoplenty.api.block.BlockQueries.anything; -import static biomesoplenty.api.block.BlockQueries.breakable; -import static biomesoplenty.api.block.BlockQueries.endish; -import static biomesoplenty.api.block.BlockQueries.fertile; -import static biomesoplenty.api.block.BlockQueries.fertileOrNetherrack; -import static biomesoplenty.api.block.BlockQueries.fertileSeaBed; -import static biomesoplenty.api.block.BlockQueries.groundBlocks; -import static biomesoplenty.api.block.BlockQueries.hasWater; -import static biomesoplenty.api.block.BlockQueries.hellish; -import static biomesoplenty.api.block.BlockQueries.litBeach; -import static biomesoplenty.api.block.BlockQueries.litDry; -import static biomesoplenty.api.block.BlockQueries.litFertile; -import static biomesoplenty.api.block.BlockQueries.litFertileOrDry; -import static biomesoplenty.api.block.BlockQueries.litFertileWaterside; -import static biomesoplenty.api.block.BlockQueries.litSand; -import static biomesoplenty.api.block.BlockQueries.nothing; -import static biomesoplenty.api.block.BlockQueries.replaceable; -import static biomesoplenty.api.block.BlockQueries.rootsCanDigThrough; -import static biomesoplenty.api.block.BlockQueries.solid; -import static biomesoplenty.api.block.BlockQueries.spectralMoss; -import static biomesoplenty.api.block.BlockQueries.suitableForReed; -import static biomesoplenty.api.block.BlockQueries.surfaceBlocks; -import static biomesoplenty.api.block.BlockQueries.sustainsCave; -import static biomesoplenty.api.block.BlockQueries.sustainsNether; -import static biomesoplenty.api.block.BlockQueries.underwater; -import static biomesoplenty.api.block.BlockQueries.waterCovered; import biomesoplenty.api.block.BOPBlocks; import biomesoplenty.common.block.BlockBOPGrass; import biomesoplenty.common.util.block.BlockQuery; @@ -52,6 +22,8 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraftforge.common.EnumPlantType; +import static biomesoplenty.api.block.BlockQueries.*; + public class ModBlockQueries { @@ -67,7 +39,7 @@ public class ModBlockQueries @Override public boolean matches(World world, BlockPos pos) { - return (world.getBlockState(pos.west()).getMaterial() == Material.water || world.getBlockState(pos.east()).getMaterial() == Material.water || world.getBlockState(pos.north()).getMaterial() == Material.water || world.getBlockState(pos.south()).getMaterial() == Material.water); + return (world.getBlockState(pos.west()).getMaterial() == Material.WATER || world.getBlockState(pos.east()).getMaterial() == Material.WATER || world.getBlockState(pos.north()).getMaterial() == Material.WATER || world.getBlockState(pos.south()).getMaterial() == Material.WATER); } }; @@ -97,7 +69,7 @@ public class ModBlockQueries @Override public boolean matches(World world, BlockPos pos) { - return world.getBlockState(pos).getMaterial() == Material.water && world.getBlockState(pos.up()).getMaterial() == Material.water; + return world.getBlockState(pos).getMaterial() == Material.WATER && world.getBlockState(pos.up()).getMaterial() == Material.WATER; } }; @@ -134,38 +106,38 @@ public class ModBlockQueries } }; - air = new BlockQueryMaterial(Material.air); - airOrLeaves = new BlockQueryMaterial(Material.air, Material.leaves); + air = new BlockQueryMaterial(Material.AIR); + airOrLeaves = new BlockQueryMaterial(Material.AIR, Material.LEAVES); // Match blocks which count as 'the surface' - useful for finding places to put plants, trees, lilypads etc - note plants, trees, snow all excluded because they sit or grow 'on' the surface - surfaceBlocks = new BlockQueryMaterial(Material.barrier, Material.clay, Material.grass, Material.ground, Material.ice, Material.lava, Material.packedIce, Material.rock, Material.sand, Material.water); + surfaceBlocks = new BlockQueryMaterial(Material.BARRIER, Material.CLAY, Material.GRASS, Material.GROUND, Material.ICE, Material.LAVA, Material.PACKED_ICE, Material.ROCK, Material.SAND, Material.WATER); // As above but without the liquids - useful for placing stuff on the sea floor - groundBlocks = new BlockQueryMaterial(Material.barrier, Material.clay, Material.grass, Material.ground, Material.packedIce, Material.rock, Material.sand); + groundBlocks = new BlockQueryMaterial(Material.BARRIER, Material.CLAY, Material.GRASS, Material.GROUND, Material.PACKED_ICE, Material.ROCK, Material.SAND); fertile = BlockQuery.buildAnd().sustainsPlant(EnumPlantType.Plains).create(); - fertileOrNetherrack = BlockQuery.buildOr().sustainsPlant(EnumPlantType.Plains).blocks(Blocks.netherrack).states(BOPBlocks.grass.getDefaultState().withProperty(BlockBOPGrass.VARIANT, BlockBOPGrass.BOPGrassType.OVERGROWN_NETHERRACK)).create(); + fertileOrNetherrack = BlockQuery.buildOr().sustainsPlant(EnumPlantType.Plains).blocks(Blocks.NETHERRACK).states(BOPBlocks.grass.getDefaultState().withProperty(BlockBOPGrass.VARIANT, BlockBOPGrass.BOPGrassType.OVERGROWN_NETHERRACK)).create(); sustainsCave = BlockQuery.buildAnd().sustainsPlant(EnumPlantType.Cave).create(); sustainsNether = BlockQuery.buildAnd().sustainsPlant(EnumPlantType.Nether).create(); - endish = BlockQuery.buildOr().blocks(Blocks.end_stone).states(BOPBlocks.grass.getDefaultState().withProperty(BlockBOPGrass.VARIANT, BlockBOPGrass.BOPGrassType.SPECTRAL_MOSS)).create(); - hellish = BlockQuery.buildOr().blocks(Blocks.netherrack, BOPBlocks.flesh).states(BOPBlocks.grass.getDefaultState().withProperty(BlockBOPGrass.VARIANT, BlockBOPGrass.BOPGrassType.OVERGROWN_NETHERRACK)).create(); + endish = BlockQuery.buildOr().blocks(Blocks.END_STONE).states(BOPBlocks.grass.getDefaultState().withProperty(BlockBOPGrass.VARIANT, BlockBOPGrass.BOPGrassType.SPECTRAL_MOSS)).create(); + hellish = BlockQuery.buildOr().blocks(Blocks.NETHERRACK, BOPBlocks.flesh).states(BOPBlocks.grass.getDefaultState().withProperty(BlockBOPGrass.VARIANT, BlockBOPGrass.BOPGrassType.OVERGROWN_NETHERRACK)).create(); litBeach = BlockQuery.buildAnd().sustainsPlant(EnumPlantType.Beach).withLightAboveAtLeast(8).create(); litFertileWaterside = BlockQuery.buildAnd().sustainsPlant(EnumPlantType.Plains).byWater().create(); litFertile = BlockQuery.buildAnd().sustainsPlant(EnumPlantType.Plains).withLightAboveAtLeast(8).create(); - litSand = BlockQuery.buildAnd().materials(Material.sand).withLightAboveAtLeast(8).create(); + litSand = BlockQuery.buildAnd().materials(Material.SAND).withLightAboveAtLeast(8).create(); litDry = BlockQuery.buildAnd().sustainsPlant(EnumPlantType.Desert).withLightAboveAtLeast(8).create(); litFertileOrDry = BlockQuery.buildOr().add(litFertile).add(litDry).create(); spectralMoss = new BlockQueryState(BOPBlocks.grass.getDefaultState().withProperty(BlockBOPGrass.VARIANT, BlockBOPGrass.BOPGrassType.SPECTRAL_MOSS)); - underwater = new BlockQueryMaterial(Material.water); - fertileSeaBed = new BlockQueryMaterial(Material.ground, Material.sand, Material.clay, Material.sponge); + underwater = new BlockQueryMaterial(Material.WATER); + fertileSeaBed = new BlockQueryMaterial(Material.GROUND, Material.SAND, Material.CLAY, Material.SPONGE); suitableForReed = BlockQuery.buildAnd().add(new IBlockPosQuery() { // reed needs the ground block to be water, but the block below that to NOT be water @Override public boolean matches(World world, BlockPos pos) { BlockPos groundPos = pos.down(); - return (world.getBlockState(pos).getMaterial() == Material.water && ((Integer)world.getBlockState(pos).getValue(BlockLiquid.LEVEL)).intValue() == 0 || world.getBlockState(pos).getMaterial() == Material.ice) && - (world.getBlockState(groundPos).getBlock() != Blocks.water && world.getBlockState(groundPos).isSideSolid(world, groundPos, EnumFacing.UP)); + return (world.getBlockState(pos).getMaterial() == Material.WATER && ((Integer)world.getBlockState(pos).getValue(BlockLiquid.LEVEL)).intValue() == 0 || world.getBlockState(pos).getMaterial() == Material.ICE) && + (world.getBlockState(groundPos).getBlock() != Blocks.WATER && world.getBlockState(groundPos).isSideSolid(world, groundPos, EnumFacing.UP)); } }).withLightAboveAtLeast(8).create(); - rootsCanDigThrough = new BlockQueryMaterial(Material.air, Material.water, Material.ground, Material.grass, Material.sand, Material.clay, Material.plants, Material.leaves); + rootsCanDigThrough = new BlockQueryMaterial(Material.AIR, Material.WATER, Material.GROUND, Material.GRASS, Material.SAND, Material.CLAY, Material.PLANTS, Material.LEAVES); } } \ No newline at end of file diff --git a/src/main/java/biomesoplenty/common/init/ModBlocks.java b/src/main/java/biomesoplenty/common/init/ModBlocks.java index 4a1cdf8ba..fef19f0dc 100644 --- a/src/main/java/biomesoplenty/common/init/ModBlocks.java +++ b/src/main/java/biomesoplenty/common/init/ModBlocks.java @@ -8,73 +8,9 @@ package biomesoplenty.common.init; -import static biomesoplenty.api.block.BOPBlocks.*; -import static biomesoplenty.api.item.BOPItems.blood_bucket; -import static biomesoplenty.api.item.BOPItems.honey_bucket; -import static biomesoplenty.api.item.BOPItems.hot_spring_water_bucket; -import static biomesoplenty.api.item.BOPItems.poison_bucket; -import net.minecraft.block.Block; -import net.minecraft.block.BlockSlab; -import net.minecraft.block.BlockStairs; -import net.minecraft.block.SoundType; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.init.Items; -import net.minecraft.item.Item; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemBucket; -import net.minecraft.item.ItemDoor; -import net.minecraft.item.ItemSlab; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.common.EnumPlantType; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidContainerRegistry; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fml.common.registry.GameRegistry; import biomesoplenty.api.block.IBOPBlock; import biomesoplenty.api.item.BOPItems; -import biomesoplenty.common.block.BlockBOPAsh; -import biomesoplenty.common.block.BlockBOPBamboo; -import biomesoplenty.common.block.BlockBOPBiomeBlock; -import biomesoplenty.common.block.BlockBOPBones; -import biomesoplenty.common.block.BlockBOPCoral; -import biomesoplenty.common.block.BlockBOPCrystal; -import biomesoplenty.common.block.BlockBOPDirt; -import biomesoplenty.common.block.BlockBOPDoor; -import biomesoplenty.common.block.BlockBOPDoubleOtherSlab; -import biomesoplenty.common.block.BlockBOPDoublePlant; -import biomesoplenty.common.block.BlockBOPDoubleWoodSlab; -import biomesoplenty.common.block.BlockBOPFarmland; -import biomesoplenty.common.block.BlockBOPFence; -import biomesoplenty.common.block.BlockBOPFenceGate; -import biomesoplenty.common.block.BlockBOPFlesh; -import biomesoplenty.common.block.BlockBOPFlower; -import biomesoplenty.common.block.BlockBOPGem; -import biomesoplenty.common.block.BlockBOPGemOre; -import biomesoplenty.common.block.BlockBOPGeneric; -import biomesoplenty.common.block.BlockBOPGrass; -import biomesoplenty.common.block.BlockBOPHalfOtherSlab; -import biomesoplenty.common.block.BlockBOPHalfWoodSlab; -import biomesoplenty.common.block.BlockBOPHive; -import biomesoplenty.common.block.BlockBOPHoney; -import biomesoplenty.common.block.BlockBOPLeaves; -import biomesoplenty.common.block.BlockBOPLilypad; -import biomesoplenty.common.block.BlockBOPLog; -import biomesoplenty.common.block.BlockBOPMud; -import biomesoplenty.common.block.BlockBOPMushroom; -import biomesoplenty.common.block.BlockBOPPlanks; -import biomesoplenty.common.block.BlockBOPPlant; -import biomesoplenty.common.block.BlockBOPSand; -import biomesoplenty.common.block.BlockBOPSapling; -import biomesoplenty.common.block.BlockBOPSeaweed; -import biomesoplenty.common.block.BlockBOPStone; -import biomesoplenty.common.block.BlockBOPStoneFormations; -import biomesoplenty.common.block.BlockBOPTerrarium; -import biomesoplenty.common.block.BlockBOPTurnip; -import biomesoplenty.common.block.BlockBOPVine; -import biomesoplenty.common.block.BlockBOPWoodStairs; +import biomesoplenty.common.block.*; import biomesoplenty.common.command.BOPCommand; import biomesoplenty.common.enums.BOPWoods; import biomesoplenty.common.fluids.BloodFluid; @@ -89,8 +25,44 @@ import biomesoplenty.common.util.BOPReflectionHelper; import biomesoplenty.common.util.block.BlockStateUtils; import biomesoplenty.common.util.inventory.CreativeTabBOP; import biomesoplenty.core.BiomesOPlenty; - import com.google.common.collect.ImmutableSet; +import net.minecraft.block.Block; +import net.minecraft.block.BlockSlab; +import net.minecraft.block.BlockStairs; +import net.minecraft.block.SoundType; +import net.minecraft.block.material.Material; +import net.minecraft.block.state.IBlockState; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.init.Items; +import net.minecraft.item.*; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.common.EnumPlantType; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidContainerRegistry; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fml.common.registry.GameRegistry; + +import static biomesoplenty.api.block.BOPBlocks.*; +import static biomesoplenty.api.block.BOPBlocks.cherry_door; +import static biomesoplenty.api.block.BOPBlocks.ebony_door; +import static biomesoplenty.api.block.BOPBlocks.ethereal_door; +import static biomesoplenty.api.block.BOPBlocks.eucalyptus_door; +import static biomesoplenty.api.block.BOPBlocks.fir_door; +import static biomesoplenty.api.block.BOPBlocks.hellbark_door; +import static biomesoplenty.api.block.BOPBlocks.jacaranda_door; +import static biomesoplenty.api.block.BOPBlocks.magic_door; +import static biomesoplenty.api.block.BOPBlocks.mahogany_door; +import static biomesoplenty.api.block.BOPBlocks.mangrove_door; +import static biomesoplenty.api.block.BOPBlocks.other_slab; +import static biomesoplenty.api.block.BOPBlocks.palm_door; +import static biomesoplenty.api.block.BOPBlocks.pine_door; +import static biomesoplenty.api.block.BOPBlocks.redwood_door; +import static biomesoplenty.api.block.BOPBlocks.sacred_oak_door; +import static biomesoplenty.api.block.BOPBlocks.umbran_door; +import static biomesoplenty.api.block.BOPBlocks.willow_door; +import static biomesoplenty.api.block.BOPBlocks.wood_slab_0; +import static biomesoplenty.api.block.BOPBlocks.wood_slab_1; +import static biomesoplenty.api.item.BOPItems.*; public class ModBlocks { @@ -113,7 +85,7 @@ public class ModBlocks stone = registerBlock( new BlockBOPStone(), "stone" ); crag_rock = registerBlock( (new BlockBOPGeneric()), "crag_rock" ); dried_sand = registerBlock( (new BlockBOPGeneric()).addSupportedPlantType(EnumPlantType.Desert), "dried_sand"); dried_sand.setHarvestLevel("pickaxe",0); - hard_ice = registerBlock( (new BlockBOPGeneric(Material.packedIce, SoundType.STONE)).setHardness(0.75F), "hard_ice" ); + hard_ice = registerBlock( (new BlockBOPGeneric(Material.PACKED_ICE, SoundType.STONE)).setHardness(0.75F), "hard_ice" ); ash_block = registerBlock( new BlockBOPAsh(), "ash_block" ); mud = registerBlock( new BlockBOPMud(), "mud" ); sand = registerBlock( new BlockBOPSand(), "sand" ); @@ -129,7 +101,7 @@ public class ModBlocks bone_segment = registerBlock( new BlockBOPBones(), "bone_segment" ); //Material Blocks - bamboo_thatching = registerBlock( (new BlockBOPGeneric(Material.wood, SoundType.WOOD)).setHardness(2.0F), "bamboo_thatching"); bamboo_thatching.setHarvestLevel("axe", 0); + bamboo_thatching = registerBlock( (new BlockBOPGeneric(Material.WOOD, SoundType.WOOD)).setHardness(2.0F), "bamboo_thatching"); bamboo_thatching.setHarvestLevel("axe", 0); mud_brick_block = registerBlock( (new BlockBOPGeneric()).setResistance(2.0F), "mud_brick_block" ); mud_brick_stairs = registerBlock( BOPReflectionHelper.construct(BlockStairs.class, (IBlockState)mud_brick_block.getDefaultState()), "mud_brick_stairs"); @@ -303,10 +275,10 @@ public class ModBlocks FluidRegistry.registerFluid(hot_spring_water_fluid); hot_spring_water = registerFluidBlock(hot_spring_water_fluid, new BlockHotSpringWaterFluid(hot_spring_water_fluid), "hot_spring_water"); - honey_bucket = ModItems.registerItem((new ItemBucket(honey)).setContainerItem(Items.bucket), "honey_bucket"); - blood_bucket = ModItems.registerItem((new ItemBucket(blood)).setContainerItem(Items.bucket), "blood_bucket"); - poison_bucket = ModItems.registerItem((new ItemBucket(poison)).setContainerItem(Items.bucket), "poison_bucket"); - hot_spring_water_bucket = ModItems.registerItem((new ItemBucket(hot_spring_water)).setContainerItem(Items.bucket), "hot_spring_water_bucket"); + honey_bucket = ModItems.registerItem((new ItemBucket(honey)).setContainerItem(Items.BUCKET), "honey_bucket"); + blood_bucket = ModItems.registerItem((new ItemBucket(blood)).setContainerItem(Items.BUCKET), "blood_bucket"); + poison_bucket = ModItems.registerItem((new ItemBucket(poison)).setContainerItem(Items.BUCKET), "poison_bucket"); + hot_spring_water_bucket = ModItems.registerItem((new ItemBucket(hot_spring_water)).setContainerItem(Items.BUCKET), "hot_spring_water_bucket"); FluidContainerRegistry.registerFluidContainer(honey_fluid, new ItemStack(honey_bucket)); FluidContainerRegistry.registerFluidContainer(blood_fluid, new ItemStack(blood_bucket)); diff --git a/src/main/java/biomesoplenty/common/init/ModCrafting.java b/src/main/java/biomesoplenty/common/init/ModCrafting.java index de083dd11..688f480ef 100644 --- a/src/main/java/biomesoplenty/common/init/ModCrafting.java +++ b/src/main/java/biomesoplenty/common/init/ModCrafting.java @@ -68,40 +68,40 @@ public class ModCrafting /*** Dyes ***/ // Flower1 - GameRegistry.addShapelessRecipe(new ItemStack(Items.dye, 2, EnumDyeColor.SILVER.getDyeDamage()), new Object[] {BlockBOPFlower.paging.getVariantItem(BOPFlowers.CLOVER)}); - GameRegistry.addShapelessRecipe(new ItemStack(Items.dye, 2, EnumDyeColor.CYAN.getDyeDamage()), new Object[] {BlockBOPFlower.paging.getVariantItem(BOPFlowers.SWAMPFLOWER)}); + GameRegistry.addShapelessRecipe(new ItemStack(Items.DYE, 2, EnumDyeColor.SILVER.getDyeDamage()), new Object[] {BlockBOPFlower.paging.getVariantItem(BOPFlowers.CLOVER)}); + GameRegistry.addShapelessRecipe(new ItemStack(Items.DYE, 2, EnumDyeColor.CYAN.getDyeDamage()), new Object[] {BlockBOPFlower.paging.getVariantItem(BOPFlowers.SWAMPFLOWER)}); GameRegistry.addShapelessRecipe(new ItemStack(BOPItems.black_dye, 2), new Object[] {BlockBOPFlower.paging.getVariantItem(BOPFlowers.DEATHBLOOM)}); - GameRegistry.addShapelessRecipe(new ItemStack(Items.dye, 2, EnumDyeColor.CYAN.getDyeDamage()), new Object[] {BlockBOPFlower.paging.getVariantItem(BOPFlowers.GLOWFLOWER)}); - GameRegistry.addShapelessRecipe(new ItemStack(Items.dye, 2, EnumDyeColor.LIGHT_BLUE.getDyeDamage()), new Object[] {BlockBOPFlower.paging.getVariantItem(BOPFlowers.BLUE_HYDRANGEA)}); - GameRegistry.addShapelessRecipe(new ItemStack(Items.dye, 2, EnumDyeColor.ORANGE.getDyeDamage()), new Object[] {BlockBOPFlower.paging.getVariantItem(BOPFlowers.ORANGE_COSMOS)}); - GameRegistry.addShapelessRecipe(new ItemStack(Items.dye, 2, EnumDyeColor.PINK.getDyeDamage()), new Object[] {BlockBOPFlower.paging.getVariantItem(BOPFlowers.PINK_DAFFODIL)}); - GameRegistry.addShapelessRecipe(new ItemStack(Items.dye, 2, EnumDyeColor.MAGENTA.getDyeDamage()), new Object[] {BlockBOPFlower.paging.getVariantItem(BOPFlowers.WILDFLOWER)}); - GameRegistry.addShapelessRecipe(new ItemStack(Items.dye, 2, EnumDyeColor.PURPLE.getDyeDamage()), new Object[] {BlockBOPFlower.paging.getVariantItem(BOPFlowers.VIOLET)}); + GameRegistry.addShapelessRecipe(new ItemStack(Items.DYE, 2, EnumDyeColor.CYAN.getDyeDamage()), new Object[] {BlockBOPFlower.paging.getVariantItem(BOPFlowers.GLOWFLOWER)}); + GameRegistry.addShapelessRecipe(new ItemStack(Items.DYE, 2, EnumDyeColor.LIGHT_BLUE.getDyeDamage()), new Object[] {BlockBOPFlower.paging.getVariantItem(BOPFlowers.BLUE_HYDRANGEA)}); + GameRegistry.addShapelessRecipe(new ItemStack(Items.DYE, 2, EnumDyeColor.ORANGE.getDyeDamage()), new Object[] {BlockBOPFlower.paging.getVariantItem(BOPFlowers.ORANGE_COSMOS)}); + GameRegistry.addShapelessRecipe(new ItemStack(Items.DYE, 2, EnumDyeColor.PINK.getDyeDamage()), new Object[] {BlockBOPFlower.paging.getVariantItem(BOPFlowers.PINK_DAFFODIL)}); + GameRegistry.addShapelessRecipe(new ItemStack(Items.DYE, 2, EnumDyeColor.MAGENTA.getDyeDamage()), new Object[] {BlockBOPFlower.paging.getVariantItem(BOPFlowers.WILDFLOWER)}); + GameRegistry.addShapelessRecipe(new ItemStack(Items.DYE, 2, EnumDyeColor.PURPLE.getDyeDamage()), new Object[] {BlockBOPFlower.paging.getVariantItem(BOPFlowers.VIOLET)}); GameRegistry.addShapelessRecipe(new ItemStack(BOPItems.white_dye, 2), new Object[] {BlockBOPFlower.paging.getVariantItem(BOPFlowers.WHITE_ANEMONE)}); GameRegistry.addShapelessRecipe(new ItemStack(BOPItems.black_dye, 2), new Object[] {BlockBOPFlower.paging.getVariantItem(BOPFlowers.ENDERLOTUS)}); - GameRegistry.addShapelessRecipe(new ItemStack(Items.dye, 2, EnumDyeColor.RED.getDyeDamage()), new Object[] {BlockBOPFlower.paging.getVariantItem(BOPFlowers.BROMELIAD)}); - GameRegistry.addShapelessRecipe(new ItemStack(Items.dye, 2, EnumDyeColor.GRAY.getDyeDamage()), new Object[] {BlockBOPFlower.paging.getVariantItem(BOPFlowers.WILTED_LILY)}); - GameRegistry.addShapelessRecipe(new ItemStack(Items.dye, 2, EnumDyeColor.PINK.getDyeDamage()), new Object[] {BlockBOPFlower.paging.getVariantItem(BOPFlowers.PINK_HIBISCUS)}); + GameRegistry.addShapelessRecipe(new ItemStack(Items.DYE, 2, EnumDyeColor.RED.getDyeDamage()), new Object[] {BlockBOPFlower.paging.getVariantItem(BOPFlowers.BROMELIAD)}); + GameRegistry.addShapelessRecipe(new ItemStack(Items.DYE, 2, EnumDyeColor.GRAY.getDyeDamage()), new Object[] {BlockBOPFlower.paging.getVariantItem(BOPFlowers.WILTED_LILY)}); + GameRegistry.addShapelessRecipe(new ItemStack(Items.DYE, 2, EnumDyeColor.PINK.getDyeDamage()), new Object[] {BlockBOPFlower.paging.getVariantItem(BOPFlowers.PINK_HIBISCUS)}); GameRegistry.addShapelessRecipe(new ItemStack(BOPItems.white_dye, 2), new Object[] {BlockBOPFlower.paging.getVariantItem(BOPFlowers.LILY_OF_THE_VALLEY)}); - GameRegistry.addShapelessRecipe(new ItemStack(Items.dye, 2, EnumDyeColor.ORANGE.getDyeDamage()), new Object[] {BlockBOPFlower.paging.getVariantItem(BOPFlowers.BURNING_BLOSSOM)}); + GameRegistry.addShapelessRecipe(new ItemStack(Items.DYE, 2, EnumDyeColor.ORANGE.getDyeDamage()), new Object[] {BlockBOPFlower.paging.getVariantItem(BOPFlowers.BURNING_BLOSSOM)}); // Flower 2 - GameRegistry.addShapelessRecipe(new ItemStack(Items.dye, 2, EnumDyeColor.PURPLE.getDyeDamage()), new Object[] {BlockBOPFlower.paging.getVariantItem(BOPFlowers.LAVENDER)}); - GameRegistry.addShapelessRecipe(new ItemStack(Items.dye, 2, EnumDyeColor.YELLOW.getDyeDamage()), new Object[] {BlockBOPFlower.paging.getVariantItem(BOPFlowers.GOLDENROD)}); + GameRegistry.addShapelessRecipe(new ItemStack(Items.DYE, 2, EnumDyeColor.PURPLE.getDyeDamage()), new Object[] {BlockBOPFlower.paging.getVariantItem(BOPFlowers.LAVENDER)}); + GameRegistry.addShapelessRecipe(new ItemStack(Items.DYE, 2, EnumDyeColor.YELLOW.getDyeDamage()), new Object[] {BlockBOPFlower.paging.getVariantItem(BOPFlowers.GOLDENROD)}); GameRegistry.addShapelessRecipe(new ItemStack(BOPItems.blue_dye, 2), new Object[] {BlockBOPFlower.paging.getVariantItem(BOPFlowers.BLUEBELLS)}); - GameRegistry.addShapelessRecipe(new ItemStack(Items.dye, 2, EnumDyeColor.PINK.getDyeDamage()), new Object[] {BlockBOPFlower.paging.getVariantItem(BOPFlowers.MINERS_DELIGHT)}); - GameRegistry.addShapelessRecipe(new ItemStack(Items.dye, 2, EnumDyeColor.LIGHT_BLUE.getDyeDamage()), new Object[] {BlockBOPFlower.paging.getVariantItem(BOPFlowers.ICY_IRIS)}); - GameRegistry.addShapelessRecipe(new ItemStack(Items.dye, 2, EnumDyeColor.RED.getDyeDamage()), new Object[] {BlockBOPFlower.paging.getVariantItem(BOPFlowers.ROSE)}); + GameRegistry.addShapelessRecipe(new ItemStack(Items.DYE, 2, EnumDyeColor.PINK.getDyeDamage()), new Object[] {BlockBOPFlower.paging.getVariantItem(BOPFlowers.MINERS_DELIGHT)}); + GameRegistry.addShapelessRecipe(new ItemStack(Items.DYE, 2, EnumDyeColor.LIGHT_BLUE.getDyeDamage()), new Object[] {BlockBOPFlower.paging.getVariantItem(BOPFlowers.ICY_IRIS)}); + GameRegistry.addShapelessRecipe(new ItemStack(Items.DYE, 2, EnumDyeColor.RED.getDyeDamage()), new Object[] {BlockBOPFlower.paging.getVariantItem(BOPFlowers.ROSE)}); // Others - GameRegistry.addShapelessRecipe(new ItemStack(Items.dye, 2, EnumDyeColor.GRAY.getDyeDamage()), new Object[] {new ItemStack(BOPItems.ash)}); - GameRegistry.addShapelessRecipe(new ItemStack(Items.dye, 2, EnumDyeColor.LIME.getDyeDamage()), new Object[] {new ItemStack(BOPBlocks.mushroom, 1, BlockBOPMushroom.MushroomType.GLOWSHROOM.ordinal())}); + GameRegistry.addShapelessRecipe(new ItemStack(Items.DYE, 2, EnumDyeColor.GRAY.getDyeDamage()), new Object[] {new ItemStack(BOPItems.ash)}); + GameRegistry.addShapelessRecipe(new ItemStack(Items.DYE, 2, EnumDyeColor.LIME.getDyeDamage()), new Object[] {new ItemStack(BOPBlocks.mushroom, 1, BlockBOPMushroom.MushroomType.GLOWSHROOM.ordinal())}); GameRegistry.addShapelessRecipe(new ItemStack(BOPItems.brown_dye, 2), new Object[] {new ItemStack(BOPBlocks.mushroom, 1, BlockBOPMushroom.MushroomType.FLAT_MUSHROOM.ordinal())}); GameRegistry.addShapelessRecipe(new ItemStack(BOPItems.blue_dye, 2), new Object[] {new ItemStack(BOPBlocks.mushroom, 1, BlockBOPMushroom.MushroomType.BLUE_MILK_CAP.ordinal())}); GameRegistry.addShapelessRecipe(new ItemStack(BOPItems.brown_dye, 2), new Object[] {BlockBOPPlant.paging.getVariantItem(BOPPlants.CATTAIL)}); GameRegistry.addShapelessRecipe(new ItemStack(BOPItems.brown_dye, 2), new Object[] {((BlockBOPDoublePlant)BOPBlocks.double_plant).getVariantItem(BlockBOPDoublePlant.DoublePlantType.TALL_CATTAIL)}); - GameRegistry.addShapelessRecipe(new ItemStack(Items.dye, 2, EnumDyeColor.LIGHT_BLUE.getDyeDamage()), new Object[] {((BlockBOPDoublePlant)BOPBlocks.double_plant).getVariantItem(BlockBOPDoublePlant.DoublePlantType.FLAX)}); - GameRegistry.addShapelessRecipe(new ItemStack(Items.dye, 2, EnumDyeColor.RED.getDyeDamage()), new Object[] {BlockBOPPlant.paging.getVariantItem(BOPPlants.RAFFLESIA)}); + GameRegistry.addShapelessRecipe(new ItemStack(Items.DYE, 2, EnumDyeColor.LIGHT_BLUE.getDyeDamage()), new Object[] {((BlockBOPDoublePlant)BOPBlocks.double_plant).getVariantItem(BlockBOPDoublePlant.DoublePlantType.FLAX)}); + GameRegistry.addShapelessRecipe(new ItemStack(Items.DYE, 2, EnumDyeColor.RED.getDyeDamage()), new Object[] {BlockBOPPlant.paging.getVariantItem(BOPPlants.RAFFLESIA)}); GameRegistry.addShapelessRecipe(new ItemStack(BOPItems.brown_dye, 2), new Object[] {new ItemStack(BOPItems.pinecone)}); /*** BOP brick and stone stairs and slabs ***/ @@ -119,7 +119,7 @@ public class ModCrafting /*** Wood stairs and slabs ***/ // Make sticks from any BOP plank - GameRegistry.addShapedRecipe(new ItemStack(Items.stick, 4), new Object[] {"#", "#", '#', BOPBlocks.planks_0}); + GameRegistry.addShapedRecipe(new ItemStack(Items.STICK, 4), new Object[] {"#", "#", '#', BOPBlocks.planks_0}); // Note you can't make planks (and therefore doors, fences etc) from GIANT_FLOWER and DEAD logs @@ -130,8 +130,8 @@ public class ModCrafting GameRegistry.addShapedRecipe(BlockBOPHalfWoodSlab.paging.getVariantItem(wood, 6), new Object[] {"###", '#', BlockBOPPlanks.paging.getVariantItem(wood)}); GameRegistry.addShapedRecipe(new ItemStack(BlockBOPWoodStairs.getBlock(wood), 4), new Object[] {"# ", "## ", "###", '#', BlockBOPPlanks.paging.getVariantItem(wood)}); GameRegistry.addShapedRecipe(new ItemStack(BlockBOPDoor.getBlock(wood).getDoorItem(), 3), new Object[] {"##", "##", "##", '#', BlockBOPPlanks.paging.getVariantItem(wood)}); - GameRegistry.addShapedRecipe(new ItemStack(BlockBOPFence.getBlock(wood), 3), new Object[] {"W#W", "W#W", '#', Items.stick, 'W', BlockBOPPlanks.paging.getVariantItem(wood)}); - GameRegistry.addShapedRecipe(new ItemStack(BlockBOPFenceGate.getBlock(wood), 1), new Object[] {"#W#", "#W#", '#', Items.stick, 'W', BlockBOPPlanks.paging.getVariantItem(wood)}); + GameRegistry.addShapedRecipe(new ItemStack(BlockBOPFence.getBlock(wood), 3), new Object[] {"W#W", "W#W", '#', Items.STICK, 'W', BlockBOPPlanks.paging.getVariantItem(wood)}); + GameRegistry.addShapedRecipe(new ItemStack(BlockBOPFenceGate.getBlock(wood), 1), new Object[] {"#W#", "#W#", '#', Items.STICK, 'W', BlockBOPPlanks.paging.getVariantItem(wood)}); } @@ -147,16 +147,16 @@ public class ModCrafting // Scythes GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(BOPItems.wood_scythe), new Object [] {" MM", "M S", " S", 'M', "plankWood", 'S', "stickWood" })); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(BOPItems.stone_scythe), new Object [] {" MM", "M S", " S", 'M', Blocks.cobblestone, 'S', "stickWood" })); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(BOPItems.iron_scythe), new Object [] {" MM", "M S", " S", 'M', Items.iron_ingot, 'S', "stickWood" })); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(BOPItems.gold_scythe), new Object [] {" MM", "M S", " S", 'M', Items.gold_ingot, 'S', "stickWood" })); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(BOPItems.diamond_scythe), new Object [] {" MM", "M S", " S", 'M', Items.diamond, 'S', "stickWood" })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(BOPItems.stone_scythe), new Object [] {" MM", "M S", " S", 'M', Blocks.COBBLESTONE, 'S', "stickWood" })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(BOPItems.iron_scythe), new Object [] {" MM", "M S", " S", 'M', Items.IRON_INGOT, 'S', "stickWood" })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(BOPItems.gold_scythe), new Object [] {" MM", "M S", " S", 'M', Items.GOLD_INGOT, 'S', "stickWood" })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(BOPItems.diamond_scythe), new Object [] {" MM", "M S", " S", 'M', Items.DIAMOND, 'S', "stickWood" })); // and in reverse.. GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(BOPItems.wood_scythe), new Object [] {"MM ", "S M", "S ", 'M', "plankWood", 'S', "stickWood" })); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(BOPItems.stone_scythe), new Object [] {"MM ", "S M", "S ", 'M', Blocks.cobblestone, 'S', "stickWood" })); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(BOPItems.iron_scythe), new Object [] {"MM ", "S M", "S ", 'M', Items.iron_ingot, 'S', "stickWood" })); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(BOPItems.gold_scythe), new Object [] {"MM ", "S M", "S ", 'M', Items.gold_ingot, 'S', "stickWood" })); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(BOPItems.diamond_scythe), new Object [] {"MM ", "S M", "S ", 'M', Items.diamond, 'S', "stickWood" })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(BOPItems.stone_scythe), new Object [] {"MM ", "S M", "S ", 'M', Blocks.COBBLESTONE, 'S', "stickWood" })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(BOPItems.iron_scythe), new Object [] {"MM ", "S M", "S ", 'M', Items.IRON_INGOT, 'S', "stickWood" })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(BOPItems.gold_scythe), new Object [] {"MM ", "S M", "S ", 'M', Items.GOLD_INGOT, 'S', "stickWood" })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(BOPItems.diamond_scythe), new Object [] {"MM ", "S M", "S ", 'M', Items.DIAMOND, 'S', "stickWood" })); // Mud Tools and Armor GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(BOPItems.mud_pickaxe), new Object [] {"###", " X ", " X ", '#', BOPItems.mudball, 'X', "stickWood" })); @@ -172,17 +172,17 @@ public class ModCrafting GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(BOPItems.mud_scythe), new Object [] {"MM ", "S M", "S ", 'M', BOPItems.mudball, 'S', "stickWood" })); // Amethyst Tools and Armor - GameRegistry.addShapedRecipe(new ItemStack(BOPItems.amethyst_pickaxe), new Object [] {"###", " X ", " X ", '#', new ItemStack(BOPItems.gem, 1, BOPGems.AMETHYST.ordinal()), 'X', Items.iron_ingot}); - GameRegistry.addShapedRecipe(new ItemStack(BOPItems.amethyst_shovel), new Object [] {"#", "X", "X", '#', new ItemStack(BOPItems.gem, 1, BOPGems.AMETHYST.ordinal()), 'X', Items.iron_ingot}); - GameRegistry.addShapedRecipe(new ItemStack(BOPItems.amethyst_sword), new Object [] {"#", "#", "X", '#', new ItemStack(BOPItems.gem, 1, BOPGems.AMETHYST.ordinal()), 'X', Items.iron_ingot}); - GameRegistry.addShapedRecipe(new ItemStack(BOPItems.amethyst_axe), new Object [] {"##", "#X", " X", '#', new ItemStack(BOPItems.gem, 1, BOPGems.AMETHYST.ordinal()), 'X', Items.iron_ingot}); - GameRegistry.addShapedRecipe(new ItemStack(BOPItems.amethyst_hoe), new Object [] {"##", " X", " X", '#', new ItemStack(BOPItems.gem, 1, BOPGems.AMETHYST.ordinal()), 'X', Items.iron_ingot}); + GameRegistry.addShapedRecipe(new ItemStack(BOPItems.amethyst_pickaxe), new Object [] {"###", " X ", " X ", '#', new ItemStack(BOPItems.gem, 1, BOPGems.AMETHYST.ordinal()), 'X', Items.IRON_INGOT}); + GameRegistry.addShapedRecipe(new ItemStack(BOPItems.amethyst_shovel), new Object [] {"#", "X", "X", '#', new ItemStack(BOPItems.gem, 1, BOPGems.AMETHYST.ordinal()), 'X', Items.IRON_INGOT}); + GameRegistry.addShapedRecipe(new ItemStack(BOPItems.amethyst_sword), new Object [] {"#", "#", "X", '#', new ItemStack(BOPItems.gem, 1, BOPGems.AMETHYST.ordinal()), 'X', Items.IRON_INGOT}); + GameRegistry.addShapedRecipe(new ItemStack(BOPItems.amethyst_axe), new Object [] {"##", "#X", " X", '#', new ItemStack(BOPItems.gem, 1, BOPGems.AMETHYST.ordinal()), 'X', Items.IRON_INGOT}); + GameRegistry.addShapedRecipe(new ItemStack(BOPItems.amethyst_hoe), new Object [] {"##", " X", " X", '#', new ItemStack(BOPItems.gem, 1, BOPGems.AMETHYST.ordinal()), 'X', Items.IRON_INGOT}); GameRegistry.addShapedRecipe(new ItemStack(BOPItems.amethyst_helmet), new Object [] {"###", "# #", '#', new ItemStack(BOPItems.gem, 1, BOPGems.AMETHYST.ordinal())}); GameRegistry.addShapedRecipe(new ItemStack(BOPItems.amethyst_chestplate), new Object [] {"# #", "###", "###", '#', new ItemStack(BOPItems.gem, 1, BOPGems.AMETHYST.ordinal())}); GameRegistry.addShapedRecipe(new ItemStack(BOPItems.amethyst_leggings), new Object [] {"###", "# #", "# #", '#', new ItemStack(BOPItems.gem, 1, BOPGems.AMETHYST.ordinal())}); GameRegistry.addShapedRecipe(new ItemStack(BOPItems.amethyst_boots), new Object [] {"# #", "# #", '#', new ItemStack(BOPItems.gem, 1, BOPGems.AMETHYST.ordinal())}); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(BOPItems.amethyst_scythe), new Object [] {" MM", "M S", " S", 'M', new ItemStack(BOPItems.gem, 1, BOPGems.AMETHYST.ordinal()), 'S', Items.iron_ingot})); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(BOPItems.amethyst_scythe), new Object [] {"MM ", "S M", "S ", 'M', new ItemStack(BOPItems.gem, 1, BOPGems.AMETHYST.ordinal()), 'S', Items.iron_ingot})); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(BOPItems.amethyst_scythe), new Object [] {" MM", "M S", " S", 'M', new ItemStack(BOPItems.gem, 1, BOPGems.AMETHYST.ordinal()), 'S', Items.IRON_INGOT})); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(BOPItems.amethyst_scythe), new Object [] {"MM ", "S M", "S ", 'M', new ItemStack(BOPItems.gem, 1, BOPGems.AMETHYST.ordinal()), 'S', Items.IRON_INGOT})); // Flower Bands GameRegistry.addShapedRecipe(new ItemStack(BOPItems.dull_flower_band), new Object [] {"CCC", "C C", "CCC", 'C', BlockBOPFlower.paging.getVariantItem(BOPFlowers.CLOVER)}); @@ -191,7 +191,7 @@ public class ModCrafting // Dart Blower GameRegistry.addShapedRecipe(new ItemStack(BOPItems.dart_blower), new Object[] {"R R", "R R", "R R", 'R', BlockBOPPlant.paging.getVariantItem(BOPPlants.RIVERCANE)}); - GameRegistry.addShapedRecipe(new ItemStack(BOPItems.dart, 4, ItemDart.DartType.DART.ordinal()), new Object[] {"T", "R", "F", 'T', BlockBOPPlant.paging.getVariantItem(BOPPlants.THORN), 'R', BlockBOPPlant.paging.getVariantItem(BOPPlants.RIVERCANE), 'F', Items.feather}); + GameRegistry.addShapedRecipe(new ItemStack(BOPItems.dart, 4, ItemDart.DartType.DART.ordinal()), new Object[] {"T", "R", "F", 'T', BlockBOPPlant.paging.getVariantItem(BOPPlants.THORN), 'R', BlockBOPPlant.paging.getVariantItem(BOPPlants.RIVERCANE), 'F', Items.FEATHER}); GameRegistry.addShapelessRecipe(new ItemStack(BOPItems.dart, 1, ItemDart.DartType.POISONDART.ordinal()), new Object[] {new ItemStack(BOPItems.jar_filled, 1, ItemJarFilled.JarContents.POISON.ordinal()), new ItemStack(BOPItems.dart, 1, ItemDart.DartType.DART.ordinal())}); @@ -210,16 +210,16 @@ public class ModCrafting GameRegistry.addShapedRecipe(new ItemStack(BOPItems.flax_string), new Object[] {"FFF", "FFF", "FFF", 'F', ((BlockBOPDoublePlant)BOPBlocks.double_plant).getVariantItem(BlockBOPDoublePlant.DoublePlantType.FLAX)}); // Flax String - GameRegistry.addShapedRecipe(new ItemStack(Items.string), new Object[] {"S", "S", "S", 'S', new ItemStack(BOPItems.flax_string)}); + GameRegistry.addShapedRecipe(new ItemStack(Items.STRING), new Object[] {"S", "S", "S", 'S', new ItemStack(BOPItems.flax_string)}); // Overgrown Netherrack - GameRegistry.addShapedRecipe(new ItemStack(BOPBlocks.grass, 1, BlockBOPGrass.BOPGrassType.OVERGROWN_NETHERRACK.ordinal()), new Object[] {"SSS", "SNS", "SSS", 'S', Items.wheat_seeds, 'N', Blocks.netherrack}); + GameRegistry.addShapedRecipe(new ItemStack(BOPBlocks.grass, 1, BlockBOPGrass.BOPGrassType.OVERGROWN_NETHERRACK.ordinal()), new Object[] {"SSS", "SNS", "SSS", 'S', Items.WHEAT_SEEDS, 'N', Blocks.NETHERRACK}); // Cattail Wool - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Blocks.wool), new Object [] {"CCC", "CCC", "CCC", 'C', "plantCattail"})); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Blocks.WOOL), new Object [] {"CCC", "CCC", "CCC", 'C', "plantCattail"})); // Ash Coal - GameRegistry.addShapedRecipe(new ItemStack(Items.coal), new Object[] {"AAA", "AAA", "AAA", 'A', new ItemStack(BOPItems.ash)}); + GameRegistry.addShapedRecipe(new ItemStack(Items.COAL), new Object[] {"AAA", "AAA", "AAA", 'A', new ItemStack(BOPItems.ash)}); // Ash Block GameRegistry.addShapedRecipe(new ItemStack(BOPBlocks.ash_block), new Object[] {"AA", "AA", 'A', new ItemStack(BOPItems.ash)}); @@ -234,17 +234,17 @@ public class ModCrafting GameRegistry.addShapedRecipe(new ItemStack(BOPBlocks.crystal), new Object[] {"CC", "CC", 'C', new ItemStack(BOPItems.crystal_shard)}); //Coarse Dirts - GameRegistry.addShapedRecipe(new ItemStack(BOPBlocks.dirt, 4, BOPBlocks.dirt.getMetaFromState(BOPBlocks.dirt.getDefaultState().withProperty(BlockBOPDirt.VARIANT, BlockBOPDirt.BOPDirtType.LOAMY).withProperty(BlockBOPDirt.COARSE, true))), new Object[] {"GD", "DG", 'G', Blocks.gravel, 'D', new ItemStack(BOPBlocks.dirt, 4, BlockBOPDirt.BOPDirtType.LOAMY.ordinal())}); - GameRegistry.addShapedRecipe(new ItemStack(BOPBlocks.dirt, 4, BOPBlocks.dirt.getMetaFromState(BOPBlocks.dirt.getDefaultState().withProperty(BlockBOPDirt.VARIANT, BlockBOPDirt.BOPDirtType.LOAMY).withProperty(BlockBOPDirt.COARSE, true))), new Object[] {"DG", "GD", 'G', Blocks.gravel, 'D', new ItemStack(BOPBlocks.dirt, 4, BlockBOPDirt.BOPDirtType.LOAMY.ordinal())}); + GameRegistry.addShapedRecipe(new ItemStack(BOPBlocks.dirt, 4, BOPBlocks.dirt.getMetaFromState(BOPBlocks.dirt.getDefaultState().withProperty(BlockBOPDirt.VARIANT, BlockBOPDirt.BOPDirtType.LOAMY).withProperty(BlockBOPDirt.COARSE, true))), new Object[] {"GD", "DG", 'G', Blocks.GRAVEL, 'D', new ItemStack(BOPBlocks.dirt, 4, BlockBOPDirt.BOPDirtType.LOAMY.ordinal())}); + GameRegistry.addShapedRecipe(new ItemStack(BOPBlocks.dirt, 4, BOPBlocks.dirt.getMetaFromState(BOPBlocks.dirt.getDefaultState().withProperty(BlockBOPDirt.VARIANT, BlockBOPDirt.BOPDirtType.LOAMY).withProperty(BlockBOPDirt.COARSE, true))), new Object[] {"DG", "GD", 'G', Blocks.GRAVEL, 'D', new ItemStack(BOPBlocks.dirt, 4, BlockBOPDirt.BOPDirtType.LOAMY.ordinal())}); - GameRegistry.addShapedRecipe(new ItemStack(BOPBlocks.dirt, 4, BOPBlocks.dirt.getMetaFromState(BOPBlocks.dirt.getDefaultState().withProperty(BlockBOPDirt.VARIANT, BlockBOPDirt.BOPDirtType.SANDY).withProperty(BlockBOPDirt.COARSE, true))), new Object[] {"GD", "DG", 'G', Blocks.gravel, 'D', new ItemStack(BOPBlocks.dirt, 4, BlockBOPDirt.BOPDirtType.SANDY.ordinal())}); - GameRegistry.addShapedRecipe(new ItemStack(BOPBlocks.dirt, 4, BOPBlocks.dirt.getMetaFromState(BOPBlocks.dirt.getDefaultState().withProperty(BlockBOPDirt.VARIANT, BlockBOPDirt.BOPDirtType.SANDY).withProperty(BlockBOPDirt.COARSE, true))), new Object[] {"DG", "GD", 'G', Blocks.gravel, 'D', new ItemStack(BOPBlocks.dirt, 4, BlockBOPDirt.BOPDirtType.SANDY.ordinal())}); + GameRegistry.addShapedRecipe(new ItemStack(BOPBlocks.dirt, 4, BOPBlocks.dirt.getMetaFromState(BOPBlocks.dirt.getDefaultState().withProperty(BlockBOPDirt.VARIANT, BlockBOPDirt.BOPDirtType.SANDY).withProperty(BlockBOPDirt.COARSE, true))), new Object[] {"GD", "DG", 'G', Blocks.GRAVEL, 'D', new ItemStack(BOPBlocks.dirt, 4, BlockBOPDirt.BOPDirtType.SANDY.ordinal())}); + GameRegistry.addShapedRecipe(new ItemStack(BOPBlocks.dirt, 4, BOPBlocks.dirt.getMetaFromState(BOPBlocks.dirt.getDefaultState().withProperty(BlockBOPDirt.VARIANT, BlockBOPDirt.BOPDirtType.SANDY).withProperty(BlockBOPDirt.COARSE, true))), new Object[] {"DG", "GD", 'G', Blocks.GRAVEL, 'D', new ItemStack(BOPBlocks.dirt, 4, BlockBOPDirt.BOPDirtType.SANDY.ordinal())}); - GameRegistry.addShapedRecipe(new ItemStack(BOPBlocks.dirt, 4, BOPBlocks.dirt.getMetaFromState(BOPBlocks.dirt.getDefaultState().withProperty(BlockBOPDirt.VARIANT, BlockBOPDirt.BOPDirtType.SILTY).withProperty(BlockBOPDirt.COARSE, true))), new Object[] {"GD", "DG", 'G', Blocks.gravel, 'D', new ItemStack(BOPBlocks.dirt, 4, BlockBOPDirt.BOPDirtType.SILTY.ordinal())}); - GameRegistry.addShapedRecipe(new ItemStack(BOPBlocks.dirt, 4, BOPBlocks.dirt.getMetaFromState(BOPBlocks.dirt.getDefaultState().withProperty(BlockBOPDirt.VARIANT, BlockBOPDirt.BOPDirtType.SILTY).withProperty(BlockBOPDirt.COARSE, true))), new Object[] {"DG", "GD", 'G', Blocks.gravel, 'D', new ItemStack(BOPBlocks.dirt, 4, BlockBOPDirt.BOPDirtType.SILTY.ordinal())}); + GameRegistry.addShapedRecipe(new ItemStack(BOPBlocks.dirt, 4, BOPBlocks.dirt.getMetaFromState(BOPBlocks.dirt.getDefaultState().withProperty(BlockBOPDirt.VARIANT, BlockBOPDirt.BOPDirtType.SILTY).withProperty(BlockBOPDirt.COARSE, true))), new Object[] {"GD", "DG", 'G', Blocks.GRAVEL, 'D', new ItemStack(BOPBlocks.dirt, 4, BlockBOPDirt.BOPDirtType.SILTY.ordinal())}); + GameRegistry.addShapedRecipe(new ItemStack(BOPBlocks.dirt, 4, BOPBlocks.dirt.getMetaFromState(BOPBlocks.dirt.getDefaultState().withProperty(BlockBOPDirt.VARIANT, BlockBOPDirt.BOPDirtType.SILTY).withProperty(BlockBOPDirt.COARSE, true))), new Object[] {"DG", "GD", 'G', Blocks.GRAVEL, 'D', new ItemStack(BOPBlocks.dirt, 4, BlockBOPDirt.BOPDirtType.SILTY.ordinal())}); // Enderporter - GameRegistry.addShapedRecipe(new ItemStack(BOPItems.enderporter), new Object[] {"IOI", "OTO", "IOI", 'I', Items.ender_eye, 'O', BOPItems.soul, 'T', BOPItems.terrestrial_artifact}); + GameRegistry.addShapedRecipe(new ItemStack(BOPItems.enderporter), new Object[] {"IOI", "OTO", "IOI", 'I', Items.ENDER_EYE, 'O', BOPItems.soul, 'T', BOPItems.terrestrial_artifact}); // Records GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(BOPItems.record_wanderer), new Object [] {"TTT", "TRT", "TTT", 'T', BOPItems.terrestrial_artifact, 'R', "record"})); @@ -258,24 +258,24 @@ public class ModCrafting GameRegistry.addShapedRecipe(new ItemStack(BOPBlocks.bamboo, 8), new Object [] {"# ", " #", '#', new ItemStack(BOPBlocks.bamboo_thatching)}); // Empty Jar - GameRegistry.addShapedRecipe(new ItemStack(BOPItems.jar_empty, 3, 0), new Object[] {"# #", "# #", "###", '#', Blocks.glass}); + GameRegistry.addShapedRecipe(new ItemStack(BOPItems.jar_empty, 3, 0), new Object[] {"# #", "# #", "###", '#', Blocks.GLASS}); // Ambrosia - GameRegistry.addShapelessRecipe(new ItemStack(BOPItems.ambrosia), new Object[] {new ItemStack(BOPItems.pixie_dust), new ItemStack(Items.potionitem, 1, 0), new ItemStack(BOPItems.ichor), new ItemStack(BOPBlocks.seaweed, 1, BlockBOPSeaweed.SeaweedType.KELP.ordinal()), BlockBOPPlant.paging.getVariantItem(BOPPlants.ROOT), new ItemStack(BOPItems.crystal_shard), new ItemStack(BOPItems.jar_filled, 1, ItemJarFilled.JarContents.HONEY.ordinal()), new ItemStack(BOPItems.berries), Items.sugar}); + GameRegistry.addShapelessRecipe(new ItemStack(BOPItems.ambrosia), new Object[] {new ItemStack(BOPItems.pixie_dust), new ItemStack(Items.POTIONITEM, 1, 0), new ItemStack(BOPItems.ichor), new ItemStack(BOPBlocks.seaweed, 1, BlockBOPSeaweed.SeaweedType.KELP.ordinal()), BlockBOPPlant.paging.getVariantItem(BOPPlants.ROOT), new ItemStack(BOPItems.crystal_shard), new ItemStack(BOPItems.jar_filled, 1, ItemJarFilled.JarContents.HONEY.ordinal()), new ItemStack(BOPItems.berries), Items.SUGAR}); // Oranmental Artifact - GameRegistry.addShapelessRecipe(new ItemStack(BOPItems.terrestrial_artifact), new Object[] {new ItemStack(BOPItems.gem, 1, BOPGems.RUBY.ordinal()), new ItemStack(BOPItems.gem, 1, BOPGems.TOPAZ.ordinal()), new ItemStack(BOPItems.gem, 1, BOPGems.AMBER.ordinal()), new ItemStack(BOPItems.gem, 1, BOPGems.PERIDOT.ordinal()), new ItemStack(BOPItems.gem, 1, BOPGems.MALACHITE.ordinal()), new ItemStack(BOPItems.gem, 1, BOPGems.SAPPHIRE.ordinal()), new ItemStack(BOPItems.gem, 1, BOPGems.TANZANITE.ordinal()), Items.emerald}); + GameRegistry.addShapelessRecipe(new ItemStack(BOPItems.terrestrial_artifact), new Object[] {new ItemStack(BOPItems.gem, 1, BOPGems.RUBY.ordinal()), new ItemStack(BOPItems.gem, 1, BOPGems.TOPAZ.ordinal()), new ItemStack(BOPItems.gem, 1, BOPGems.AMBER.ordinal()), new ItemStack(BOPItems.gem, 1, BOPGems.PERIDOT.ordinal()), new ItemStack(BOPItems.gem, 1, BOPGems.MALACHITE.ordinal()), new ItemStack(BOPItems.gem, 1, BOPGems.SAPPHIRE.ordinal()), new ItemStack(BOPItems.gem, 1, BOPGems.TANZANITE.ordinal()), Items.EMERALD}); // Flesh Block GameRegistry.addShapedRecipe(new ItemStack(BOPBlocks.flesh), new Object[] {"##", "##", '#', new ItemStack(BOPItems.fleshchunk)}); // Rotten Flesh - GameRegistry.addShapedRecipe(new ItemStack(Items.rotten_flesh), new Object[] {"FFF", "FPF", "FFF", 'F', new ItemStack(BOPItems.fleshchunk), 'P', new ItemStack(BOPItems.jar_filled, 1, ItemJarFilled.JarContents.POISON.ordinal())}); + GameRegistry.addShapedRecipe(new ItemStack(Items.ROTTEN_FLESH), new Object[] {"FFF", "FPF", "FFF", 'F', new ItemStack(BOPItems.fleshchunk), 'P', new ItemStack(BOPItems.jar_filled, 1, ItemJarFilled.JarContents.POISON.ordinal())}); // Bone Segments > Bonemeal - GameRegistry.addShapelessRecipe(new ItemStack(Items.dye, 3, EnumDyeColor.WHITE.getDyeDamage()), new Object[] {((BlockBOPBones)BOPBlocks.bone_segment).getVariantItem(BlockBOPBones.BoneType.SMALL)}); - GameRegistry.addShapelessRecipe(new ItemStack(Items.dye, 6, EnumDyeColor.WHITE.getDyeDamage()), new Object[] {((BlockBOPBones)BOPBlocks.bone_segment).getVariantItem(BlockBOPBones.BoneType.MEDIUM)}); - GameRegistry.addShapelessRecipe(new ItemStack(Items.dye, 12, EnumDyeColor.WHITE.getDyeDamage()), new Object[] {((BlockBOPBones)BOPBlocks.bone_segment).getVariantItem(BlockBOPBones.BoneType.LARGE)}); + GameRegistry.addShapelessRecipe(new ItemStack(Items.DYE, 3, EnumDyeColor.WHITE.getDyeDamage()), new Object[] {((BlockBOPBones)BOPBlocks.bone_segment).getVariantItem(BlockBOPBones.BoneType.SMALL)}); + GameRegistry.addShapelessRecipe(new ItemStack(Items.DYE, 6, EnumDyeColor.WHITE.getDyeDamage()), new Object[] {((BlockBOPBones)BOPBlocks.bone_segment).getVariantItem(BlockBOPBones.BoneType.MEDIUM)}); + GameRegistry.addShapelessRecipe(new ItemStack(Items.DYE, 12, EnumDyeColor.WHITE.getDyeDamage()), new Object[] {((BlockBOPBones)BOPBlocks.bone_segment).getVariantItem(BlockBOPBones.BoneType.LARGE)}); // Honeycombs GameRegistry.addShapedRecipe(new ItemStack(BOPBlocks.hive, 1, BlockBOPHive.HiveType.HONEYCOMB.ordinal()), new Object [] {"##", "##", '#', new ItemStack(BOPItems.honeycomb)}); @@ -284,24 +284,24 @@ public class ModCrafting // Food GameRegistry.addShapelessRecipe(new ItemStack(BOPItems.shroompowder), new Object[] {new ItemStack(BOPBlocks.mushroom, 1, BlockBOPMushroom.MushroomType.TOADSTOOL.ordinal())}); GameRegistry.addShapelessRecipe(new ItemStack(BOPItems.jar_filled, 1, ItemJarFilled.JarContents.POISON.ordinal()), new Object[] {BlockBOPPlant.paging.getVariantItem(BOPPlants.POISONIVY), new ItemStack(BOPItems.jar_empty)}); - GameRegistry.addShapelessRecipe(new ItemStack(BOPItems.ricebowl), new Object[] {Items.bowl, BlockBOPPlant.paging.getVariantItem(BOPPlants.WILDRICE)}); - GameRegistry.addShapelessRecipe(new ItemStack(BOPItems.saladfruit), new Object[] {Items.bowl, BOPItems.peach, Items.apple, BOPItems.pear}); - GameRegistry.addShapelessRecipe(new ItemStack(BOPItems.saladveggie), new Object[] {Items.bowl, BOPItems.turnip, Items.carrot, Items.potato}); - GameRegistry.addShapelessRecipe(new ItemStack(BOPItems.saladshroom), new Object[] {Items.bowl, new ItemStack(BOPBlocks.mushroom, 1, BlockBOPMushroom.MushroomType.TOADSTOOL.ordinal()), new ItemStack(BOPBlocks.mushroom, 1, BlockBOPMushroom.MushroomType.PORTOBELLO.ordinal()), new ItemStack(BOPBlocks.mushroom, 1, BlockBOPMushroom.MushroomType.BLUE_MILK_CAP.ordinal())}); + GameRegistry.addShapelessRecipe(new ItemStack(BOPItems.ricebowl), new Object[] {Items.BOWL, BlockBOPPlant.paging.getVariantItem(BOPPlants.WILDRICE)}); + GameRegistry.addShapelessRecipe(new ItemStack(BOPItems.saladfruit), new Object[] {Items.BOWL, BOPItems.peach, Items.APPLE, BOPItems.pear}); + GameRegistry.addShapelessRecipe(new ItemStack(BOPItems.saladveggie), new Object[] {Items.BOWL, BOPItems.turnip, Items.CARROT, Items.POTATO}); + GameRegistry.addShapelessRecipe(new ItemStack(BOPItems.saladshroom), new Object[] {Items.BOWL, new ItemStack(BOPBlocks.mushroom, 1, BlockBOPMushroom.MushroomType.TOADSTOOL.ordinal()), new ItemStack(BOPBlocks.mushroom, 1, BlockBOPMushroom.MushroomType.PORTOBELLO.ordinal()), new ItemStack(BOPBlocks.mushroom, 1, BlockBOPMushroom.MushroomType.BLUE_MILK_CAP.ordinal())}); // Terrariums - GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(BOPBlocks.terrarium, 1, BlockBOPTerrarium.TerrariumType.FERN.ordinal()), new Object[] {"blockGrass", new ItemStack(Blocks.tallgrass, 1, 2), new ItemStack(BOPItems.jar_empty)})); - GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(BOPBlocks.terrarium, 1, BlockBOPTerrarium.TerrariumType.MUSHROOM.ordinal()), new Object[] {"blockGrass", new ItemStack(Blocks.red_mushroom), new ItemStack(BOPItems.jar_empty)})); + GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(BOPBlocks.terrarium, 1, BlockBOPTerrarium.TerrariumType.FERN.ordinal()), new Object[] {"blockGrass", new ItemStack(Blocks.TALLGRASS, 1, 2), new ItemStack(BOPItems.jar_empty)})); + GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(BOPBlocks.terrarium, 1, BlockBOPTerrarium.TerrariumType.MUSHROOM.ordinal()), new Object[] {"blockGrass", new ItemStack(Blocks.RED_MUSHROOM), new ItemStack(BOPItems.jar_empty)})); GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(BOPBlocks.terrarium, 1, BlockBOPTerrarium.TerrariumType.CACTUS.ordinal()), new Object[] {"blockGrass", BlockBOPPlant.paging.getVariantItem(BOPPlants.TINYCACTUS), new ItemStack(BOPItems.jar_empty)})); GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(BOPBlocks.terrarium, 1, BlockBOPTerrarium.TerrariumType.FLAX.ordinal()), new Object[] {"blockGrass", ((BlockBOPDoublePlant)BOPBlocks.double_plant).getVariantItem(BlockBOPDoublePlant.DoublePlantType.FLAX), new ItemStack(BOPItems.jar_empty)})); GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(BOPBlocks.terrarium, 1, BlockBOPTerrarium.TerrariumType.SAPLING.ordinal()), new Object[] {"blockGrass", "treeSapling", new ItemStack(BOPItems.jar_empty)})); GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(BOPBlocks.terrarium, 1, BlockBOPTerrarium.TerrariumType.KORU.ordinal()), new Object[] {"blockGrass", BlockBOPPlant.paging.getVariantItem(BOPPlants.KORU), new ItemStack(BOPItems.jar_empty)})); - GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(BOPBlocks.terrarium, 1, BlockBOPTerrarium.TerrariumType.FLOWER.ordinal()), new Object[] {"blockGrass", new ItemStack(Blocks.red_flower), new ItemStack(BOPItems.jar_empty)})); - GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(BOPBlocks.terrarium, 1, BlockBOPTerrarium.TerrariumType.FLOWER.ordinal()), new Object[] {"blockGrass", new ItemStack(Blocks.yellow_flower), new ItemStack(BOPItems.jar_empty)})); + GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(BOPBlocks.terrarium, 1, BlockBOPTerrarium.TerrariumType.FLOWER.ordinal()), new Object[] {"blockGrass", new ItemStack(Blocks.RED_FLOWER), new ItemStack(BOPItems.jar_empty)})); + GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(BOPBlocks.terrarium, 1, BlockBOPTerrarium.TerrariumType.FLOWER.ordinal()), new Object[] {"blockGrass", new ItemStack(Blocks.YELLOW_FLOWER), new ItemStack(BOPItems.jar_empty)})); GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(BOPBlocks.terrarium, 1, BlockBOPTerrarium.TerrariumType.FLOWER.ordinal()), new Object[] {"blockGrass", new ItemStack(BOPBlocks.flower_0), new ItemStack(BOPItems.jar_empty)})); GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(BOPBlocks.terrarium, 1, BlockBOPTerrarium.TerrariumType.FLOWER.ordinal()), new Object[] {"blockGrass", new ItemStack(BOPBlocks.flower_1), new ItemStack(BOPItems.jar_empty)})); - GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(BOPBlocks.terrarium, 1, BlockBOPTerrarium.TerrariumType.BAMBOO.ordinal()), new Object[] {new ItemStack(Blocks.dirt, 1, 2), new ItemStack(BOPBlocks.bamboo), new ItemStack(BOPItems.jar_empty)})); - GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(BOPBlocks.terrarium, 1, BlockBOPTerrarium.TerrariumType.DEAD.ordinal()), new Object[] {"blockGrass", new ItemStack(Blocks.deadbush), new ItemStack(BOPItems.jar_empty)})); + GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(BOPBlocks.terrarium, 1, BlockBOPTerrarium.TerrariumType.BAMBOO.ordinal()), new Object[] {new ItemStack(Blocks.DIRT, 1, 2), new ItemStack(BOPBlocks.bamboo), new ItemStack(BOPItems.jar_empty)})); + GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(BOPBlocks.terrarium, 1, BlockBOPTerrarium.TerrariumType.DEAD.ordinal()), new Object[] {"blockGrass", new ItemStack(Blocks.DEADBUSH), new ItemStack(BOPItems.jar_empty)})); GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(BOPBlocks.terrarium, 1, BlockBOPTerrarium.TerrariumType.GLOWSHROOM.ordinal()), new Object[] {"stone", new ItemStack(BOPBlocks.mushroom, 1, BlockBOPMushroom.MushroomType.GLOWSHROOM.ordinal()), new ItemStack(BOPItems.jar_empty)})); GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(BOPBlocks.terrarium, 1, BlockBOPTerrarium.TerrariumType.MYSTIC.ordinal()), new Object[] {"blockGrass", BlockBOPFlower.paging.getVariantItem(BOPFlowers.GLOWFLOWER), new ItemStack(BOPItems.jar_empty)})); GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(BOPBlocks.terrarium, 1, BlockBOPTerrarium.TerrariumType.OMINOUS.ordinal()), new Object[] {"blockGrass", BlockBOPFlower.paging.getVariantItem(BOPFlowers.DEATHBLOOM), new ItemStack(BOPItems.jar_empty)})); @@ -316,15 +316,15 @@ public class ModCrafting { // Register smelting recipes - GameRegistry.addSmelting(new ItemStack(BOPBlocks.sand, 1, BlockBOPSand.SandType.QUICKSAND.ordinal()), new ItemStack(Blocks.sand), 0F); - GameRegistry.addSmelting(new ItemStack(BOPBlocks.mud), new ItemStack(Blocks.dirt), 0F); - GameRegistry.addSmelting(BlockBOPPlant.paging.getVariantItem(BOPPlants.TINYCACTUS), new ItemStack(Items.dye, 1, EnumDyeColor.GREEN.getDyeDamage()), 0.2F); + GameRegistry.addSmelting(new ItemStack(BOPBlocks.sand, 1, BlockBOPSand.SandType.QUICKSAND.ordinal()), new ItemStack(Blocks.SAND), 0F); + GameRegistry.addSmelting(new ItemStack(BOPBlocks.mud), new ItemStack(Blocks.DIRT), 0F); + GameRegistry.addSmelting(BlockBOPPlant.paging.getVariantItem(BOPPlants.TINYCACTUS), new ItemStack(Items.DYE, 1, EnumDyeColor.GREEN.getDyeDamage()), 0.2F); GameRegistry.addSmelting(BOPItems.mudball, new ItemStack(BOPItems.mud_brick), 0F); for (BOPWoods wood : BOPWoods.values()) { if (wood.canMakeCharcoal()) { - GameRegistry.addSmelting(BlockBOPLog.paging.getVariantItem(wood), new ItemStack(Items.coal, 1, 1), 0.15F); + GameRegistry.addSmelting(BlockBOPLog.paging.getVariantItem(wood), new ItemStack(Items.COAL, 1, 1), 0.15F); } } @@ -359,9 +359,9 @@ public class ModCrafting OreDictionary.registerOre("blockGrass", new ItemStack(BOPBlocks.grass, 1, BlockBOPGrass.BOPGrassType.SANDY.ordinal())); OreDictionary.registerOre("blockGrass", new ItemStack(BOPBlocks.grass, 1, BlockBOPGrass.BOPGrassType.DAISY.ordinal())); OreDictionary.registerOre("blockGrass", new ItemStack(BOPBlocks.grass, 1, BlockBOPGrass.BOPGrassType.ORIGIN.ordinal())); - OreDictionary.registerOre("blockGrass", new ItemStack(Blocks.grass)); + OreDictionary.registerOre("blockGrass", new ItemStack(Blocks.GRASS)); - OreDictionary.registerOre("blockDirt", new ItemStack(Blocks.dirt)); + OreDictionary.registerOre("blockDirt", new ItemStack(Blocks.DIRT)); OreDictionary.registerOre("foodMushroompowder", new ItemStack(BOPItems.shroompowder)); OreDictionary.registerOre("foodFruitsalad", new ItemStack(BOPItems.saladfruit)); diff --git a/src/main/java/biomesoplenty/common/init/ModItems.java b/src/main/java/biomesoplenty/common/init/ModItems.java index 829c6b6c4..ebca89461 100644 --- a/src/main/java/biomesoplenty/common/init/ModItems.java +++ b/src/main/java/biomesoplenty/common/init/ModItems.java @@ -8,146 +8,28 @@ package biomesoplenty.common.init; -import static biomesoplenty.api.item.BOPItemHelper.amethyst_armor_material; -import static biomesoplenty.api.item.BOPItemHelper.amethyst_tool_material; -import static biomesoplenty.api.item.BOPItemHelper.dull_flower_band_material; -import static biomesoplenty.api.item.BOPItemHelper.exotic_flower_band_material; -import static biomesoplenty.api.item.BOPItemHelper.flippers_material; -import static biomesoplenty.api.item.BOPItemHelper.lush_flower_band_material; -import static biomesoplenty.api.item.BOPItemHelper.mud_armor_material; -import static biomesoplenty.api.item.BOPItemHelper.mud_tool_material; -import static biomesoplenty.api.item.BOPItemHelper.plain_flower_band_material; -import static biomesoplenty.api.item.BOPItemHelper.wading_boots_material; -import static biomesoplenty.api.item.BOPItems.ambrosia; -import static biomesoplenty.api.item.BOPItems.amethyst_axe; -import static biomesoplenty.api.item.BOPItems.amethyst_boots; -import static biomesoplenty.api.item.BOPItems.amethyst_chestplate; -import static biomesoplenty.api.item.BOPItems.amethyst_helmet; -import static biomesoplenty.api.item.BOPItems.amethyst_hoe; -import static biomesoplenty.api.item.BOPItems.amethyst_leggings; -import static biomesoplenty.api.item.BOPItems.amethyst_pickaxe; -import static biomesoplenty.api.item.BOPItems.amethyst_scythe; -import static biomesoplenty.api.item.BOPItems.amethyst_shovel; -import static biomesoplenty.api.item.BOPItems.amethyst_sword; -import static biomesoplenty.api.item.BOPItems.ash; -import static biomesoplenty.api.item.BOPItems.berries; -import static biomesoplenty.api.item.BOPItems.biome_essence; -import static biomesoplenty.api.item.BOPItems.biome_finder; -import static biomesoplenty.api.item.BOPItems.black_dye; -import static biomesoplenty.api.item.BOPItems.blue_dye; -import static biomesoplenty.api.item.BOPItems.brown_dye; -import static biomesoplenty.api.item.BOPItems.crystal_shard; -import static biomesoplenty.api.item.BOPItems.dart; -import static biomesoplenty.api.item.BOPItems.dart_blower; -import static biomesoplenty.api.item.BOPItems.diamond_scythe; -import static biomesoplenty.api.item.BOPItems.dull_flower_band; -import static biomesoplenty.api.item.BOPItems.earth; -import static biomesoplenty.api.item.BOPItems.enderporter; -import static biomesoplenty.api.item.BOPItems.exotic_flower_band; -import static biomesoplenty.api.item.BOPItems.filled_honeycomb; -import static biomesoplenty.api.item.BOPItems.flax_string; -import static biomesoplenty.api.item.BOPItems.fleshchunk; -import static biomesoplenty.api.item.BOPItems.flippers; -import static biomesoplenty.api.item.BOPItems.flower_basket; -import static biomesoplenty.api.item.BOPItems.gem; -import static biomesoplenty.api.item.BOPItems.gold_scythe; -import static biomesoplenty.api.item.BOPItems.green_dye; -import static biomesoplenty.api.item.BOPItems.honeycomb; -import static biomesoplenty.api.item.BOPItems.ichor; -import static biomesoplenty.api.item.BOPItems.iron_scythe; -import static biomesoplenty.api.item.BOPItems.jar_empty; -import static biomesoplenty.api.item.BOPItems.jar_filled; -import static biomesoplenty.api.item.BOPItems.lush_flower_band; -import static biomesoplenty.api.item.BOPItems.mud_axe; -import static biomesoplenty.api.item.BOPItems.mud_boots; -import static biomesoplenty.api.item.BOPItems.mud_brick; -import static biomesoplenty.api.item.BOPItems.mud_chestplate; -import static biomesoplenty.api.item.BOPItems.mud_helmet; -import static biomesoplenty.api.item.BOPItems.mud_hoe; -import static biomesoplenty.api.item.BOPItems.mud_leggings; -import static biomesoplenty.api.item.BOPItems.mud_pickaxe; -import static biomesoplenty.api.item.BOPItems.mud_scythe; -import static biomesoplenty.api.item.BOPItems.mud_shovel; -import static biomesoplenty.api.item.BOPItems.mud_sword; -import static biomesoplenty.api.item.BOPItems.mudball; -import static biomesoplenty.api.item.BOPItems.peach; -import static biomesoplenty.api.item.BOPItems.pear; -import static biomesoplenty.api.item.BOPItems.persimmon; -import static biomesoplenty.api.item.BOPItems.pinecone; -import static biomesoplenty.api.item.BOPItems.pixie_dust; -import static biomesoplenty.api.item.BOPItems.plain_flower_band; -import static biomesoplenty.api.item.BOPItems.record_corruption; -import static biomesoplenty.api.item.BOPItems.record_wanderer; -import static biomesoplenty.api.item.BOPItems.ricebowl; -import static biomesoplenty.api.item.BOPItems.saladfruit; -import static biomesoplenty.api.item.BOPItems.saladshroom; -import static biomesoplenty.api.item.BOPItems.saladveggie; -import static biomesoplenty.api.item.BOPItems.shroompowder; -import static biomesoplenty.api.item.BOPItems.soul; -import static biomesoplenty.api.item.BOPItems.spawn_egg; -import static biomesoplenty.api.item.BOPItems.stone_scythe; -import static biomesoplenty.api.item.BOPItems.terrestrial_artifact; -import static biomesoplenty.api.item.BOPItems.turnip; -import static biomesoplenty.api.item.BOPItems.turnip_seeds; -import static biomesoplenty.api.item.BOPItems.wading_boots; -import static biomesoplenty.api.item.BOPItems.white_dye; -import static biomesoplenty.api.item.BOPItems.wood_scythe; - -import java.util.ArrayList; -import java.util.List; - import biomesoplenty.api.block.BOPBlocks; import biomesoplenty.api.sound.BOPSounds; import biomesoplenty.common.command.BOPCommand; -import biomesoplenty.common.item.ItemAmbrosia; -import biomesoplenty.common.item.ItemBOPFood; -import biomesoplenty.common.item.ItemBOPRecord; -import biomesoplenty.common.item.ItemBOPScythe; -import biomesoplenty.common.item.ItemBOPSpawnEgg; -import biomesoplenty.common.item.ItemBiomeEssence; -import biomesoplenty.common.item.ItemBiomeFinder; -import biomesoplenty.common.item.ItemDart; -import biomesoplenty.common.item.ItemDartBlower; -import biomesoplenty.common.item.ItemEnderporter; -import biomesoplenty.common.item.ItemFlippers; -import biomesoplenty.common.item.ItemFlowerBand; -import biomesoplenty.common.item.ItemFlowerBasket; -import biomesoplenty.common.item.ItemGem; -import biomesoplenty.common.item.ItemJarEmpty; -import biomesoplenty.common.item.ItemJarFilled; -import biomesoplenty.common.item.ItemMudball; -import biomesoplenty.common.item.ItemWadingBoots; +import biomesoplenty.common.item.*; import biomesoplenty.common.util.BOPReflectionHelper; import biomesoplenty.common.util.inventory.CreativeTabBOP; import biomesoplenty.core.BiomesOPlenty; -import net.minecraft.client.renderer.block.model.ModelBakery; -import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.init.Blocks; import net.minecraft.init.MobEffects; import net.minecraft.init.SoundEvents; import net.minecraft.inventory.EntityEquipmentSlot; -import net.minecraft.item.Item; +import net.minecraft.item.*; import net.minecraft.item.Item.ToolMaterial; -import net.minecraft.item.ItemArmor; -import net.minecraft.item.ItemAxe; -import net.minecraft.item.ItemFood; -import net.minecraft.item.ItemHoe; -import net.minecraft.item.ItemPickaxe; -import net.minecraft.item.ItemSeeds; -import net.minecraft.item.ItemSoup; -import net.minecraft.item.ItemSpade; -import net.minecraft.item.ItemStack; -import net.minecraft.item.ItemSword; -import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.util.ResourceLocation; import net.minecraft.util.SoundEvent; -import net.minecraftforge.client.model.ModelLoader; import net.minecraftforge.common.util.EnumHelper; -import net.minecraftforge.fml.common.FMLCommonHandler; import net.minecraftforge.fml.common.registry.GameRegistry; -import net.minecraftforge.fml.relauncher.Side; + +import static biomesoplenty.api.item.BOPItemHelper.*; +import static biomesoplenty.api.item.BOPItems.*; public class ModItems { @@ -163,21 +45,21 @@ public class ModItems pear = registerItem(new ItemFood(5, 0.3F, false), "pear"); peach = registerItem(new ItemFood(5, 0.2F, false), "peach"); persimmon = registerItem(new ItemFood(5, 0.2F, false), "persimmon"); - turnip_seeds = registerItem(new ItemSeeds(BOPBlocks.turnip_block, Blocks.farmland), "turnip_seeds"); + turnip_seeds = registerItem(new ItemSeeds(BOPBlocks.turnip_block, Blocks.FARMLAND), "turnip_seeds"); turnip = registerItem(new ItemFood(3, 0.4F, false), "turnip"); saladfruit = registerItem(new ItemSoup(6), "saladfruit"); - ((ItemFood)saladfruit).setPotionEffect(new PotionEffect(MobEffects.digSpeed, 775, 1), 0.05F); + ((ItemFood)saladfruit).setPotionEffect(new PotionEffect(MobEffects.HASTE, 775, 1), 0.05F); saladveggie = registerItem(new ItemSoup(6), "saladveggie"); - ((ItemFood)saladveggie).setPotionEffect(new PotionEffect(MobEffects.nightVision, 1100, 1), 0.05F); // TODO: Is this the right potion effect for veggie salad? + ((ItemFood)saladveggie).setPotionEffect(new PotionEffect(MobEffects.NIGHT_VISION, 1100, 1), 0.05F); // TODO: Is this the right potion effect for veggie salad? saladshroom = registerItem(new ItemSoup(6), "saladshroom"); - ((ItemFood)saladshroom).setPotionEffect(new PotionEffect(MobEffects.jump, 550, 1), 0.05F); + ((ItemFood)saladshroom).setPotionEffect(new PotionEffect(MobEffects.JUMP_BOOST, 550, 1), 0.05F); ricebowl = registerItem(new ItemSoup(2), "ricebowl"); honeycomb = registerItem(new Item(), "honeycomb"); filled_honeycomb = registerItem(new ItemBOPFood(3, 0.4F, 16), "filled_honeycomb"); pinecone = registerItem(new Item(), "pinecone"); shroompowder = registerItem(new ItemFood(1, 0.1F, false), "shroompowder"); ((ItemFood)shroompowder).setAlwaysEdible(); - ((ItemFood)shroompowder).setPotionEffect(new PotionEffect(MobEffects.confusion, 225, 0), 0.6F); + ((ItemFood)shroompowder).setPotionEffect(new PotionEffect(MobEffects.NAUSEA, 225, 0), 0.6F); ambrosia = registerItem(new ItemAmbrosia(), "ambrosia"); earth = registerItem(new Item(), "earth"); @@ -215,16 +97,16 @@ public class ModItems // DIAMOND("diamond", 33, new int[]{3, 8, 6, 3}, 10); // TODO: do we really want durability of -1 for these unprotective armor items? does that mean it lasts forever? - wading_boots_material = addArmorMaterial("WADING_BOOTS", "biomesoplenty:wading_boots", -1, new int[]{0,0,0,0}, 0, SoundEvents.item_armor_equip_generic); - flippers_material = addArmorMaterial("FLIPPERS", "biomesoplenty:flippers", -1, new int[]{0,0,0,0}, 0, SoundEvents.item_armor_equip_generic); - plain_flower_band_material = addArmorMaterial("PLAIN_FLOWER_BAND", "biomesoplenty:plain_flower_band", -1, new int[]{0,0,0,0}, 0, SoundEvents.item_armor_equip_generic); - lush_flower_band_material = addArmorMaterial("LUSH_FLOWER_BAND", "biomesoplenty:lush_flower_band", -1, new int[]{0,0,0,0}, 0, SoundEvents.item_armor_equip_generic); - exotic_flower_band_material = addArmorMaterial("EXOTIC_FLOWER_BAND", "biomesoplenty:exotic_flower_band", -1, new int[]{0,0,0,0}, 0, SoundEvents.item_armor_equip_generic); - dull_flower_band_material = addArmorMaterial("DULL_FLOWER_BAND", "biomesoplenty:dull_flower_band", -1, new int[]{0,0,0,0}, 0, SoundEvents.item_armor_equip_generic); + wading_boots_material = addArmorMaterial("WADING_BOOTS", "biomesoplenty:wading_boots", -1, new int[]{0,0,0,0}, 0, SoundEvents.ITEM_ARMOR_EQUIP_GENERIC); + flippers_material = addArmorMaterial("FLIPPERS", "biomesoplenty:flippers", -1, new int[]{0,0,0,0}, 0, SoundEvents.ITEM_ARMOR_EQUIP_GENERIC); + plain_flower_band_material = addArmorMaterial("PLAIN_FLOWER_BAND", "biomesoplenty:plain_flower_band", -1, new int[]{0,0,0,0}, 0, SoundEvents.ITEM_ARMOR_EQUIP_GENERIC); + lush_flower_band_material = addArmorMaterial("LUSH_FLOWER_BAND", "biomesoplenty:lush_flower_band", -1, new int[]{0,0,0,0}, 0, SoundEvents.ITEM_ARMOR_EQUIP_GENERIC); + exotic_flower_band_material = addArmorMaterial("EXOTIC_FLOWER_BAND", "biomesoplenty:exotic_flower_band", -1, new int[]{0,0,0,0}, 0, SoundEvents.ITEM_ARMOR_EQUIP_GENERIC); + dull_flower_band_material = addArmorMaterial("DULL_FLOWER_BAND", "biomesoplenty:dull_flower_band", -1, new int[]{0,0,0,0}, 0, SoundEvents.ITEM_ARMOR_EQUIP_GENERIC); - mud_armor_material = addArmorMaterial("MUD", "biomesoplenty:mud_armor", 2, new int[]{1,1,1,1}, 5, SoundEvents.item_armor_equip_generic); + mud_armor_material = addArmorMaterial("MUD", "biomesoplenty:mud_armor", 2, new int[]{1,1,1,1}, 5, SoundEvents.ITEM_ARMOR_EQUIP_GENERIC); mud_armor_material.customCraftingMaterial = mudball; - amethyst_armor_material = addArmorMaterial("AMETHYST", "biomesoplenty:amethyst_armor", 40, new int[]{3,8,8,3}, 20, SoundEvents.item_armor_equip_generic); + amethyst_armor_material = addArmorMaterial("AMETHYST", "biomesoplenty:amethyst_armor", 40, new int[]{3,8,8,3}, 20, SoundEvents.ITEM_ARMOR_EQUIP_GENERIC); wading_boots = registerItem(new ItemWadingBoots(wading_boots_material, 0), "wading_boots"); flippers = registerItem(new ItemFlippers(flippers_material, 0), "flippers"); diff --git a/src/main/java/biomesoplenty/common/init/ModPotions.java b/src/main/java/biomesoplenty/common/init/ModPotions.java index 90f6d4124..1fef12450 100644 --- a/src/main/java/biomesoplenty/common/init/ModPotions.java +++ b/src/main/java/biomesoplenty/common/init/ModPotions.java @@ -8,17 +8,15 @@ package biomesoplenty.common.init; -import static biomesoplenty.api.potion.BOPPotions.paralysis; -import static biomesoplenty.api.potion.BOPPotions.possession; - import biomesoplenty.common.potion.PotionParalysis; import biomesoplenty.common.potion.PotionPossession; -import biomesoplenty.common.util.BOPReflectionHelper; import biomesoplenty.core.BiomesOPlenty; -import net.minecraft.item.Item; import net.minecraft.potion.Potion; import net.minecraft.util.ResourceLocation; +import static biomesoplenty.api.potion.BOPPotions.paralysis; +import static biomesoplenty.api.potion.BOPPotions.possession; + public class ModPotions { @@ -31,7 +29,7 @@ public class ModPotions public static Potion registerPotion(String name, Potion potion) { - Potion.potionRegistry.register(getSparePotionId(), new ResourceLocation(BiomesOPlenty.MOD_ID, name), potion); + Potion.REGISTRY.register(getSparePotionId(), new ResourceLocation(BiomesOPlenty.MOD_ID, name), potion); return potion; } @@ -45,7 +43,7 @@ public class ModPotions // look for a free slot in the Potions array // (note we start counting from 1 - vanilla MC doens't use ID 0, nor will we) - for (; Potion.potionRegistry.getObjectById(nextId) != null; nextId++) {} + for (; Potion.REGISTRY.getObjectById(nextId) != null; nextId++) {} return nextId; } diff --git a/src/main/java/biomesoplenty/common/init/ModSounds.java b/src/main/java/biomesoplenty/common/init/ModSounds.java index 19deea603..05f66c86f 100644 --- a/src/main/java/biomesoplenty/common/init/ModSounds.java +++ b/src/main/java/biomesoplenty/common/init/ModSounds.java @@ -7,12 +7,12 @@ ******************************************************************************/ package biomesoplenty.common.init; -import static biomesoplenty.api.sound.BOPSounds.*; - import biomesoplenty.core.BiomesOPlenty; import net.minecraft.util.ResourceLocation; import net.minecraft.util.SoundEvent; +import static biomesoplenty.api.sound.BOPSounds.*; + public class ModSounds { public static void init() @@ -29,6 +29,6 @@ public class ModSounds { ResourceLocation location = new ResourceLocation(BiomesOPlenty.MOD_ID, soundName); SoundEvent.registerSound(location.toString()); - return SoundEvent.soundEventRegistry.getObject(location); + return SoundEvent.REGISTRY.getObject(location); } } diff --git a/src/main/java/biomesoplenty/common/init/ModVanillaCompat.java b/src/main/java/biomesoplenty/common/init/ModVanillaCompat.java index ea6e01043..54552e8ea 100644 --- a/src/main/java/biomesoplenty/common/init/ModVanillaCompat.java +++ b/src/main/java/biomesoplenty/common/init/ModVanillaCompat.java @@ -1,15 +1,9 @@ package biomesoplenty.common.init; -import biomesoplenty.api.block.BOPBlocks; import biomesoplenty.api.item.BOPItems; import biomesoplenty.common.entities.projectiles.dispenser.DispenserBehaviorDart; import biomesoplenty.common.entities.projectiles.dispenser.DispenserBehaviorMudball; -import biomesoplenty.common.enums.BOPGems; -import biomesoplenty.common.enums.BOPTrees; import net.minecraft.block.BlockDispenser; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.WeightedRandomChestContent; public class ModVanillaCompat { @@ -21,8 +15,8 @@ public class ModVanillaCompat private static void registerDispenserBehaviors() { - BlockDispenser.dispenseBehaviorRegistry.putObject(BOPItems.mudball, new DispenserBehaviorMudball()); - BlockDispenser.dispenseBehaviorRegistry.putObject(BOPItems.dart, new DispenserBehaviorDart()); + BlockDispenser.DISPENSE_BEHAVIOR_REGISTRY.putObject(BOPItems.mudball, new DispenserBehaviorMudball()); + BlockDispenser.DISPENSE_BEHAVIOR_REGISTRY.putObject(BOPItems.dart, new DispenserBehaviorDart()); } private static void addDungeonLoot() diff --git a/src/main/java/biomesoplenty/common/item/ItemAmbrosia.java b/src/main/java/biomesoplenty/common/item/ItemAmbrosia.java index 29ae30d58..b36df97fc 100644 --- a/src/main/java/biomesoplenty/common/item/ItemAmbrosia.java +++ b/src/main/java/biomesoplenty/common/item/ItemAmbrosia.java @@ -12,11 +12,9 @@ import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Items; import net.minecraft.init.MobEffects; -import net.minecraft.init.PotionTypes; import net.minecraft.item.EnumAction; import net.minecraft.item.ItemFood; import net.minecraft.item.ItemStack; -import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.world.World; @@ -51,11 +49,11 @@ public class ItemAmbrosia extends ItemFood protected void onFoodEaten(ItemStack stack, World worldIn, EntityPlayer player) { if (worldIn.isRemote) {return;} - player.addPotionEffect(new PotionEffect(MobEffects.absorption, 5000, 4)); - player.addPotionEffect(new PotionEffect(MobEffects.saturation, 100, 1)); - player.addPotionEffect(new PotionEffect(MobEffects.regeneration, 500, 2)); - player.addPotionEffect(new PotionEffect(MobEffects.digSpeed, 500, 2)); - player.addPotionEffect(new PotionEffect(MobEffects.resistance, 600, 1)); + player.addPotionEffect(new PotionEffect(MobEffects.ABSORPTION, 5000, 4)); + player.addPotionEffect(new PotionEffect(MobEffects.SATURATION, 100, 1)); + player.addPotionEffect(new PotionEffect(MobEffects.REGENERATION, 500, 2)); + player.addPotionEffect(new PotionEffect(MobEffects.HASTE, 500, 2)); + player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 600, 1)); } // keep the empty bottle after finishing @@ -63,7 +61,7 @@ public class ItemAmbrosia extends ItemFood public ItemStack onItemUseFinish(ItemStack stack, World worldIn, EntityLivingBase playerIn) { super.onItemUseFinish(stack, worldIn, playerIn); - return new ItemStack(Items.glass_bottle); + return new ItemStack(Items.GLASS_BOTTLE); } } \ No newline at end of file diff --git a/src/main/java/biomesoplenty/common/item/ItemBOPLilypad.java b/src/main/java/biomesoplenty/common/item/ItemBOPLilypad.java index 22b7ba01f..a7059a54c 100644 --- a/src/main/java/biomesoplenty/common/item/ItemBOPLilypad.java +++ b/src/main/java/biomesoplenty/common/item/ItemBOPLilypad.java @@ -14,9 +14,7 @@ import net.minecraft.block.BlockLiquid; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.stats.StatList; import net.minecraft.util.ActionResult; import net.minecraft.util.EnumActionResult; import net.minecraft.util.EnumHand; @@ -36,7 +34,7 @@ public class ItemBOPLilypad extends ItemBOPBlock { @Override public ActionResult onItemRightClick(ItemStack itemStackIn, World worldIn, EntityPlayer playerIn, EnumHand hand) { - RayTraceResult movingobjectposition = this.getMovingObjectPositionFromPlayer(worldIn, playerIn, true); + RayTraceResult movingobjectposition = this.rayTrace(worldIn, playerIn, true); if (movingobjectposition == null) { @@ -61,7 +59,7 @@ public class ItemBOPLilypad extends ItemBOPBlock { BlockPos blockpos1 = blockpos.up(); IBlockState iblockstate = worldIn.getBlockState(blockpos); - if (iblockstate.getMaterial() == Material.water && ((Integer)iblockstate.getValue(BlockLiquid.LEVEL)).intValue() == 0 && worldIn.isAirBlock(blockpos1)) + if (iblockstate.getMaterial() == Material.WATER && ((Integer)iblockstate.getValue(BlockLiquid.LEVEL)).intValue() == 0 && worldIn.isAirBlock(blockpos1)) { // special case for handling block placement with water lilies net.minecraftforge.common.util.BlockSnapshot blocksnapshot = net.minecraftforge.common.util.BlockSnapshot.getBlockSnapshot(worldIn, blockpos1); diff --git a/src/main/java/biomesoplenty/common/item/ItemBOPPlant.java b/src/main/java/biomesoplenty/common/item/ItemBOPPlant.java index 57f69ff11..f6bdff5d4 100644 --- a/src/main/java/biomesoplenty/common/item/ItemBOPPlant.java +++ b/src/main/java/biomesoplenty/common/item/ItemBOPPlant.java @@ -15,9 +15,7 @@ import net.minecraft.block.BlockLiquid; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.stats.StatList; import net.minecraft.util.ActionResult; import net.minecraft.util.EnumActionResult; import net.minecraft.util.EnumHand; @@ -44,7 +42,7 @@ public class ItemBOPPlant extends ItemBOPBlock { if (plant == BOPPlants.REED) { - RayTraceResult movingobjectposition = this.getMovingObjectPositionFromPlayer(worldIn, playerIn, true); + RayTraceResult movingobjectposition = this.rayTrace(worldIn, playerIn, true); if (movingobjectposition == null) { @@ -69,7 +67,7 @@ public class ItemBOPPlant extends ItemBOPBlock { BlockPos blockpos1 = blockpos.up(); IBlockState iblockstate = worldIn.getBlockState(blockpos); - if (iblockstate.getMaterial() == Material.water && ((Integer)iblockstate.getValue(BlockLiquid.LEVEL)).intValue() == 0 && worldIn.isAirBlock(blockpos1)) + if (iblockstate.getMaterial() == Material.WATER && ((Integer)iblockstate.getValue(BlockLiquid.LEVEL)).intValue() == 0 && worldIn.isAirBlock(blockpos1)) { // special case for handling block placement with reeds net.minecraftforge.common.util.BlockSnapshot blocksnapshot = net.minecraftforge.common.util.BlockSnapshot.getBlockSnapshot(worldIn, blockpos1); diff --git a/src/main/java/biomesoplenty/common/item/ItemBOPScythe.java b/src/main/java/biomesoplenty/common/item/ItemBOPScythe.java index ec4f6b75a..2325b78f8 100644 --- a/src/main/java/biomesoplenty/common/item/ItemBOPScythe.java +++ b/src/main/java/biomesoplenty/common/item/ItemBOPScythe.java @@ -43,7 +43,7 @@ public class ItemBOPScythe extends Item @Override public float getStrVsBlock(ItemStack stack, IBlockState state) { - return state.getMaterial() == Material.leaves ? 15.0F : super.getStrVsBlock(stack, state); + return state.getMaterial() == Material.LEAVES ? 15.0F : super.getStrVsBlock(stack, state); } @Override @@ -72,7 +72,7 @@ public class ItemBOPScythe extends Item public boolean onBlockDestroyed(ItemStack stack, World worldIn, IBlockState state, BlockPos pos, EntityLivingBase entityLiving) { - if (state.getBlock() == null || worldIn.getBlockState(pos).getBlock() == Blocks.air) {return false;} + if (state.getBlock() == null || worldIn.getBlockState(pos).getBlock() == Blocks.AIR) {return false;} boolean isLeaves = state.getBlock().isLeaves(worldIn.getBlockState(pos), worldIn, pos); @@ -183,7 +183,7 @@ public class ItemBOPScythe extends Item return true; } } - else if (block == Blocks.tallgrass) + else if (block == Blocks.TALLGRASS) { block.dropBlockAsItem(world, pos, state, fortune); world.setBlockState(pos, BlockBOPPlant.paging.getVariantState(BOPPlants.MEDIUMGRASS)); diff --git a/src/main/java/biomesoplenty/common/item/ItemBOPSpawnEgg.java b/src/main/java/biomesoplenty/common/item/ItemBOPSpawnEgg.java index bb5cf752f..6fff52c28 100644 --- a/src/main/java/biomesoplenty/common/item/ItemBOPSpawnEgg.java +++ b/src/main/java/biomesoplenty/common/item/ItemBOPSpawnEgg.java @@ -8,10 +8,6 @@ package biomesoplenty.common.item; -import java.util.Iterator; -import java.util.List; -import java.util.Map.Entry; - import biomesoplenty.api.item.IColoredItem; import biomesoplenty.common.init.ModEntities; import net.minecraft.block.BlockFence; @@ -19,16 +15,11 @@ import net.minecraft.block.BlockLiquid; import net.minecraft.block.state.IBlockState; import net.minecraft.client.renderer.color.IItemColor; import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityList; -import net.minecraft.entity.EntityLiving; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.IEntityLivingData; +import net.minecraft.entity.*; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.stats.StatList; import net.minecraft.tileentity.MobSpawnerBaseLogic; import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntityMobSpawner; @@ -43,6 +34,9 @@ import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import java.util.List; +import java.util.Map.Entry; + public class ItemBOPSpawnEgg extends Item implements IColoredItem { @@ -119,14 +113,14 @@ public class ItemBOPSpawnEgg extends Item implements IColoredItem { IBlockState iblockstate = worldIn.getBlockState(pos); - if (iblockstate.getBlock() == Blocks.mob_spawner) + if (iblockstate.getBlock() == Blocks.MOB_SPAWNER) { TileEntity tileentity = worldIn.getTileEntity(pos); if (tileentity instanceof TileEntityMobSpawner) { MobSpawnerBaseLogic mobspawnerbaselogic = ((TileEntityMobSpawner)tileentity).getSpawnerBaseLogic(); - mobspawnerbaselogic.setEntityName(EntityList.classToStringMapping.get(EntityList.getClassFromID(stack.getMetadata()))); + mobspawnerbaselogic.setEntityName(EntityList.CLASS_TO_NAME.get(EntityList.getClassFromID(stack.getMetadata()))); tileentity.markDirty(); worldIn.notifyBlockUpdate(pos, iblockstate, iblockstate, 3); @@ -175,7 +169,7 @@ public class ItemBOPSpawnEgg extends Item implements IColoredItem } else { - RayTraceResult movingobjectposition = this.getMovingObjectPositionFromPlayer(world, player, true); + RayTraceResult movingobjectposition = this.rayTrace(world, player, true); if (movingobjectposition == null) { diff --git a/src/main/java/biomesoplenty/common/item/ItemBiomeFinder.java b/src/main/java/biomesoplenty/common/item/ItemBiomeFinder.java index 6666fe76b..5ec6ce5e3 100644 --- a/src/main/java/biomesoplenty/common/item/ItemBiomeFinder.java +++ b/src/main/java/biomesoplenty/common/item/ItemBiomeFinder.java @@ -8,9 +8,6 @@ package biomesoplenty.common.item; -import java.util.List; - -import biomesoplenty.common.inventory.InventoryFlowerBasket; import biomesoplenty.common.util.biome.BiomeUtils; import net.minecraft.client.resources.I18n; import net.minecraft.entity.EntityLivingBase; @@ -31,6 +28,8 @@ import net.minecraft.world.biome.BiomeGenBase; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import java.util.List; + public class ItemBiomeFinder extends Item { @@ -155,7 +154,7 @@ public class ItemBiomeFinder extends Item public static void sendChatMessage(EntityPlayer player, String msg, TextFormatting color) { TextComponentTranslation chatComponent = new TextComponentTranslation(msg); - chatComponent.getChatStyle().setColor(color); + chatComponent.getStyle().setColor(color); player.addChatMessage(chatComponent); } diff --git a/src/main/java/biomesoplenty/common/item/ItemDartBlower.java b/src/main/java/biomesoplenty/common/item/ItemDartBlower.java index e8974ac53..eac870051 100644 --- a/src/main/java/biomesoplenty/common/item/ItemDartBlower.java +++ b/src/main/java/biomesoplenty/common/item/ItemDartBlower.java @@ -66,7 +66,7 @@ public class ItemDartBlower extends Item player.inventory.decrStackSize(bestDartSlot, 1); } world.spawnEntityInWorld(entityDart); - world.playSound(player, player.getPosition(), SoundEvents.entity_arrow_shoot, SoundCategory.NEUTRAL, 1.0F, 1.75F); + world.playSound(player, player.getPosition(), SoundEvents.ENTITY_ARROW_SHOOT, SoundCategory.NEUTRAL, 1.0F, 1.75F); } return new ActionResult(EnumActionResult.SUCCESS, stack); diff --git a/src/main/java/biomesoplenty/common/item/ItemEnderporter.java b/src/main/java/biomesoplenty/common/item/ItemEnderporter.java index deb6bbe9d..d95f3876f 100644 --- a/src/main/java/biomesoplenty/common/item/ItemEnderporter.java +++ b/src/main/java/biomesoplenty/common/item/ItemEnderporter.java @@ -13,7 +13,6 @@ import net.minecraft.init.MobEffects; import net.minecraft.init.SoundEvents; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.util.ActionResult; import net.minecraft.util.EnumActionResult; @@ -39,12 +38,12 @@ public class ItemEnderporter extends Item { if (world.provider.isSurfaceWorld()) { stack.damageItem(1, player); - player.addPotionEffect(new PotionEffect(MobEffects.blindness, 30, 999)); - player.addPotionEffect(new PotionEffect(MobEffects.resistance, 200, 999)); - player.addPotionEffect(new PotionEffect(MobEffects.nightVision, 100, 999)); - player.addPotionEffect(new PotionEffect(MobEffects.regeneration, 200, 3)); + player.addPotionEffect(new PotionEffect(MobEffects.BLINDNESS, 30, 999)); + player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 200, 999)); + player.addPotionEffect(new PotionEffect(MobEffects.NIGHT_VISION, 100, 999)); + player.addPotionEffect(new PotionEffect(MobEffects.REGENERATION, 200, 3)); player.setPosition((double)world.getSpawnPoint().getX(), 250, (double)world.getSpawnPoint().getZ()); - world.playSound(player, player.getPosition(), SoundEvents.entity_player_levelup, SoundCategory.NEUTRAL, 1.0F, 5.0F); + world.playSound(player, player.getPosition(), SoundEvents.ENTITY_PLAYER_LEVELUP, SoundCategory.NEUTRAL, 1.0F, 5.0F); //TODO: FEATURE par3EntityPlayer.addStat(BOPAchievements.achEnderporter, 1); } else @@ -53,7 +52,7 @@ public class ItemEnderporter extends Item { if (!world.isRemote) { TextComponentTranslation msg = new TextComponentTranslation("enderporter.prevent"); - msg.getChatStyle().setColor(TextFormatting.DARK_PURPLE); + msg.getStyle().setColor(TextFormatting.DARK_PURPLE); player.addChatMessage(msg); } } diff --git a/src/main/java/biomesoplenty/common/item/ItemJarEmpty.java b/src/main/java/biomesoplenty/common/item/ItemJarEmpty.java index 29a7acf0f..cfbbeb330 100644 --- a/src/main/java/biomesoplenty/common/item/ItemJarEmpty.java +++ b/src/main/java/biomesoplenty/common/item/ItemJarEmpty.java @@ -17,7 +17,6 @@ import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.stats.StatList; import net.minecraft.util.ActionResult; import net.minecraft.util.EnumActionResult; import net.minecraft.util.EnumHand; @@ -40,7 +39,7 @@ public class ItemJarEmpty extends Item public ActionResult onItemRightClick(ItemStack stack, World world, EntityPlayer player, EnumHand hand) { - RayTraceResult hit = this.getMovingObjectPositionFromPlayer(world, player, true); + RayTraceResult hit = this.rayTrace(world, player, true); if (hit == null) {new ActionResult(EnumActionResult.FAIL, stack);} if (hit.typeOfHit != RayTraceResult.Type.BLOCK) {new ActionResult(EnumActionResult.FAIL, stack);} BlockPos pos = hit.getBlockPos(); @@ -76,7 +75,7 @@ public class ItemJarEmpty extends Item else if (!player.inventory.addItemStackToInventory(honeyJar)) { // no room in inventory, so just drop it on the floor - player.dropPlayerItemWithRandomChoice(honeyJar, false); + player.dropItem(honeyJar, false); } } diff --git a/src/main/java/biomesoplenty/common/item/ItemMudball.java b/src/main/java/biomesoplenty/common/item/ItemMudball.java index 0e4d3a018..963bd8a86 100644 --- a/src/main/java/biomesoplenty/common/item/ItemMudball.java +++ b/src/main/java/biomesoplenty/common/item/ItemMudball.java @@ -36,12 +36,13 @@ public class ItemMudball extends Item --stack.stackSize; } - world.playSound(player, player.getPosition(), SoundEvents.entity_arrow_shoot, SoundCategory.NEUTRAL, 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); + world.playSound(player, player.getPosition(), SoundEvents.ENTITY_ARROW_SHOOT, SoundCategory.NEUTRAL, 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); if (!world.isRemote) { EntityMudball mudball = new EntityMudball(world, player); - mudball.func_184538_a(player, player.rotationPitch, player.rotationYaw, 0.0F, 1.5F, 1.0F); + //TODO: replace this + //mudball.func_184538_a(player, player.rotationPitch, player.rotationYaw, 0.0F, 1.5F, 1.0F); world.spawnEntityInWorld(mudball); } diff --git a/src/main/java/biomesoplenty/common/util/biome/BiomeUtils.java b/src/main/java/biomesoplenty/common/util/biome/BiomeUtils.java index dfe96155f..10ea1b320 100644 --- a/src/main/java/biomesoplenty/common/util/biome/BiomeUtils.java +++ b/src/main/java/biomesoplenty/common/util/biome/BiomeUtils.java @@ -8,14 +8,11 @@ package biomesoplenty.common.util.biome; -import com.google.common.base.CaseFormat; - import biomesoplenty.common.world.BOPWorldSettings; import biomesoplenty.common.world.WorldTypeBOP; import biomesoplenty.core.BiomesOPlenty; import com.google.common.base.Function; import com.google.common.collect.Lists; -import com.google.common.collect.Maps; import net.minecraft.util.ResourceLocation; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; @@ -26,7 +23,6 @@ import org.apache.commons.lang3.tuple.Pair; import javax.annotation.Nullable; import java.util.List; -import java.util.Map; public class BiomeUtils { @@ -39,18 +35,18 @@ public class BiomeUtils } else { - return ChunkProviderSettings.Factory.jsonToFactory(generatorSettingsJson).func_177864_b().biomeSize; + return ChunkProviderSettings.Factory.jsonToFactory(generatorSettingsJson).build().biomeSize; } } public static ResourceLocation getLocForBiome(BiomeGenBase biome) { - return BiomeGenBase.biomeRegistry.getNameForObject(biome); + return BiomeGenBase.REGISTRY.getNameForObject(biome); } public static BiomeGenBase getBiomeForLoc(ResourceLocation location) { - return BiomeGenBase.biomeRegistry.getObject(location); + return BiomeGenBase.REGISTRY.getObject(location); } private static final Function> MAPPING_FOR_LOCATION = new Function>() @@ -59,13 +55,13 @@ public class BiomeUtils @Override public Pair apply(@Nullable ResourceLocation input) { - return Pair.of(input, BiomeGenBase.biomeRegistry.getObject(input)); + return Pair.of(input, BiomeGenBase.REGISTRY.getObject(input)); } }; public static List getRegisteredBiomes() { - return Lists.newArrayList(BiomeGenBase.biomeRegistry.iterator()); + return Lists.newArrayList(BiomeGenBase.REGISTRY.iterator()); } public static BlockPos spiralOutwardsLookingForBiome(World world, BiomeGenBase biomeToFind, double startX, double startZ) diff --git a/src/main/java/biomesoplenty/common/util/block/BlockQuery.java b/src/main/java/biomesoplenty/common/util/block/BlockQuery.java index b473a48ae..df2ce2277 100644 --- a/src/main/java/biomesoplenty/common/util/block/BlockQuery.java +++ b/src/main/java/biomesoplenty/common/util/block/BlockQuery.java @@ -8,21 +8,11 @@ package biomesoplenty.common.util.block; -import java.lang.reflect.Field; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import java.util.Set; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.Sets; - import biomesoplenty.api.block.BOPBlocks; import biomesoplenty.api.block.BlockQueries; import biomesoplenty.api.block.ISustainsPlantType; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.Sets; import net.minecraft.block.Block; import net.minecraft.block.BlockLiquid; import net.minecraft.block.material.Material; @@ -34,6 +24,11 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraftforge.common.EnumPlantType; +import java.lang.reflect.Field; +import java.util.*; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + public class BlockQuery { @@ -299,18 +294,18 @@ public class BlockQuery // Otherwise fall back to the vanilla code switch (this.plantType) { - case Desert: return block == Blocks.sand || block == Blocks.hardened_clay || block == Blocks.stained_hardened_clay || block == Blocks.dirt; - case Nether: return block == Blocks.soul_sand; - case Crop: return block == Blocks.farmland || block == BOPBlocks.farmland_0 || block == BOPBlocks.farmland_1; + case Desert: return block == Blocks.SAND || block == Blocks.HARDENED_CLAY || block == Blocks.STAINED_HARDENED_CLAY || block == Blocks.DIRT; + case Nether: return block == Blocks.SOUL_SAND; + case Crop: return block == Blocks.FARMLAND || block == BOPBlocks.farmland_0 || block == BOPBlocks.farmland_1; case Cave: return block.isSideSolid(state, world, pos, EnumFacing.UP); - case Plains: return block == Blocks.grass || block == Blocks.dirt || block == Blocks.farmland || block == BOPBlocks.farmland_0 || block == BOPBlocks.farmland_1 || block == Blocks.mycelium; - case Water: return state.getMaterial() == Material.water && ((Integer)state.getValue(BlockLiquid.LEVEL)) == 0; + case Plains: return block == Blocks.GRASS || block == Blocks.DIRT || block == Blocks.FARMLAND || block == BOPBlocks.farmland_0 || block == BOPBlocks.farmland_1 || block == Blocks.MYCELIUM; + case Water: return state.getMaterial() == Material.WATER && ((Integer)state.getValue(BlockLiquid.LEVEL)) == 0; case Beach: - boolean isBeach = block == Blocks.grass || block == Blocks.dirt || block == Blocks.sand || block == Blocks.mycelium; - boolean hasWater = (world.getBlockState(pos.east()).getMaterial() == Material.water || - world.getBlockState(pos.west()).getMaterial() == Material.water || - world.getBlockState(pos.north()).getMaterial() == Material.water || - world.getBlockState(pos.south()).getMaterial() == Material.water); + boolean isBeach = block == Blocks.GRASS || block == Blocks.DIRT || block == Blocks.SAND || block == Blocks.MYCELIUM; + boolean hasWater = (world.getBlockState(pos.east()).getMaterial() == Material.WATER || + world.getBlockState(pos.west()).getMaterial() == Material.WATER || + world.getBlockState(pos.north()).getMaterial() == Material.WATER || + world.getBlockState(pos.south()).getMaterial() == Material.WATER); return isBeach && hasWater; } return false; diff --git a/src/main/java/biomesoplenty/common/world/ChunkProviderGenerateBOP.java b/src/main/java/biomesoplenty/common/world/ChunkProviderGenerateBOP.java index 472cf8464..edec0bf48 100644 --- a/src/main/java/biomesoplenty/common/world/ChunkProviderGenerateBOP.java +++ b/src/main/java/biomesoplenty/common/world/ChunkProviderGenerateBOP.java @@ -8,24 +8,6 @@ package biomesoplenty.common.world; -import static net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.CAVE; -import static net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.MINESHAFT; -import static net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.OCEAN_MONUMENT; -import static net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.RAVINE; -import static net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.SCATTERED_FEATURE; -import static net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.STRONGHOLD; -import static net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.VILLAGE; -import static net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.ANIMALS; -import static net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.DUNGEON; -import static net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.ICE; -import static net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.LAKE; -import static net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.LAVA; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Random; - import biomesoplenty.api.biome.BOPBiome; import biomesoplenty.common.util.biome.BiomeUtils; import net.minecraft.block.BlockFalling; @@ -33,7 +15,6 @@ import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EnumCreatureType; import net.minecraft.init.Biomes; import net.minecraft.init.Blocks; -import net.minecraft.util.IProgressUpdate; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.MathHelper; import net.minecraft.world.ChunkCoordIntPair; @@ -43,23 +24,21 @@ import net.minecraft.world.biome.BiomeGenBase; import net.minecraft.world.chunk.Chunk; import net.minecraft.world.chunk.ChunkPrimer; import net.minecraft.world.chunk.IChunkGenerator; -import net.minecraft.world.chunk.IChunkProvider; -import net.minecraft.world.gen.MapGenBase; -import net.minecraft.world.gen.MapGenCaves; -import net.minecraft.world.gen.MapGenRavine; -import net.minecraft.world.gen.NoiseGeneratorOctaves; -import net.minecraft.world.gen.NoiseGeneratorPerlin; +import net.minecraft.world.gen.*; import net.minecraft.world.gen.feature.WorldGenDungeons; import net.minecraft.world.gen.feature.WorldGenLakes; -import net.minecraft.world.gen.structure.MapGenMineshaft; -import net.minecraft.world.gen.structure.MapGenScatteredFeature; -import net.minecraft.world.gen.structure.MapGenStronghold; -import net.minecraft.world.gen.structure.MapGenVillage; -import net.minecraft.world.gen.structure.StructureOceanMonument; +import net.minecraft.world.gen.structure.*; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.terraingen.PopulateChunkEvent; import net.minecraftforge.event.terraingen.TerrainGen; -import net.minecraftforge.fml.common.eventhandler.Event.Result; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Random; + +import static net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.*; +import static net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.*; public class ChunkProviderGenerateBOP implements IChunkGenerator { @@ -119,8 +98,8 @@ public class ChunkProviderGenerateBOP implements IChunkGenerator this.noiseArray = new double[825]; // blockstates for stone and sea blocks - this.stoneBlockState = Blocks.stone.getDefaultState(); - this.seaBlockState = Blocks.water.getDefaultState(); + this.stoneBlockState = Blocks.STONE.getDefaultState(); + this.seaBlockState = Blocks.WATER.getDefaultState(); // store a TerrainSettings object for each biome this.biomeTerrainSettings = new HashMap(); @@ -341,7 +320,7 @@ public class ChunkProviderGenerateBOP implements IChunkGenerator // Rivers shouldn't be influenced by the neighbors BiomeGenBase centerBiome = biomes[localX + 2 + (localZ + 2) * 10]; - if (centerBiome == Biomes.river || centerBiome == Biomes.frozenRiver || ((centerBiome instanceof BOPBiome) && ((BOPBiome)centerBiome).noNeighborTerrainInfuence)) + if (centerBiome == Biomes.RIVER || centerBiome == Biomes.FROZEN_RIVER || ((centerBiome instanceof BOPBiome) && ((BOPBiome)centerBiome).noNeighborTerrainInfuence)) { return this.biomeTerrainSettings.get(centerBiome); } @@ -510,10 +489,10 @@ public class ChunkProviderGenerateBOP implements IChunkGenerator BlockPos target; // add water lakes - if (biomegenbase.getRainfall() > 0.01F && biomegenbase != Biomes.desert && biomegenbase != Biomes.desertHills && this.settings.useWaterLakes && !hasVillageGenerated && this.rand.nextInt(this.settings.waterLakeChance) == 0 && TerrainGen.populate(this, worldObj, rand, chunkX, chunkZ, hasVillageGenerated, LAKE)) + if (biomegenbase.getRainfall() > 0.01F && biomegenbase != Biomes.DESERT && biomegenbase != Biomes.DESERT_HILLS && this.settings.useWaterLakes && !hasVillageGenerated && this.rand.nextInt(this.settings.waterLakeChance) == 0 && TerrainGen.populate(this, worldObj, rand, chunkX, chunkZ, hasVillageGenerated, LAKE)) { target = decorateStart.add(this.rand.nextInt(16), this.rand.nextInt(256), this.rand.nextInt(16)); - (new WorldGenLakes(Blocks.water)).generate(this.worldObj, this.rand, target); + (new WorldGenLakes(Blocks.WATER)).generate(this.worldObj, this.rand, target); } // add lava lakes @@ -522,7 +501,7 @@ public class ChunkProviderGenerateBOP implements IChunkGenerator target = decorateStart.add(this.rand.nextInt(16), this.rand.nextInt(248) + 8, this.rand.nextInt(16)); if (target.getY() < 63 || this.rand.nextInt(this.settings.lavaLakeChance / 8) == 0) { - (new WorldGenLakes(Blocks.lava)).generate(this.worldObj, this.rand, target); + (new WorldGenLakes(Blocks.LAVA)).generate(this.worldObj, this.rand, target); } } @@ -557,12 +536,12 @@ public class ChunkProviderGenerateBOP implements IChunkGenerator // if it's cold enough for ice, and there's exposed water, then freeze it if (this.worldObj.canBlockFreezeWater(target.down())) { - this.worldObj.setBlockState(target.down(), Blocks.ice.getDefaultState(), 2); + this.worldObj.setBlockState(target.down(), Blocks.ICE.getDefaultState(), 2); } // if it's cold enough for snow, add a layer of snow if (biome.getRainfall() > 0.01F && this.worldObj.canSnowAt(target, true)) { - this.worldObj.setBlockState(target, Blocks.snow_layer.getDefaultState(), 2); + this.worldObj.setBlockState(target, Blocks.SNOW_LAYER.getDefaultState(), 2); } } } diff --git a/src/main/java/biomesoplenty/common/world/feature/GeneratorBigMushroom.java b/src/main/java/biomesoplenty/common/world/feature/GeneratorBigMushroom.java index 2c3e51311..ee713530d 100644 --- a/src/main/java/biomesoplenty/common/world/feature/GeneratorBigMushroom.java +++ b/src/main/java/biomesoplenty/common/world/feature/GeneratorBigMushroom.java @@ -8,8 +8,6 @@ package biomesoplenty.common.world.feature; -import java.util.Random; - import biomesoplenty.api.biome.generation.BOPGeneratorBase; import biomesoplenty.api.block.BlockQueries; import biomesoplenty.common.util.biome.GeneratorUtils; @@ -26,6 +24,8 @@ import net.minecraft.init.Blocks; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; +import java.util.Random; + public class GeneratorBigMushroom extends BOPGeneratorBase { @@ -37,9 +37,9 @@ public class GeneratorBigMushroom extends BOPGeneratorBase switch (this) { case BROWN: - return Blocks.brown_mushroom_block.getDefaultState(); + return Blocks.BROWN_MUSHROOM_BLOCK.getDefaultState(); case RED: default: - return Blocks.red_mushroom_block.getDefaultState(); + return Blocks.RED_MUSHROOM_BLOCK.getDefaultState(); } } public int getCapHeight(int height) diff --git a/src/main/java/biomesoplenty/common/world/feature/GeneratorBlobs.java b/src/main/java/biomesoplenty/common/world/feature/GeneratorBlobs.java index 48625f9b2..c88a47bcf 100644 --- a/src/main/java/biomesoplenty/common/world/feature/GeneratorBlobs.java +++ b/src/main/java/biomesoplenty/common/world/feature/GeneratorBlobs.java @@ -41,9 +41,9 @@ public class GeneratorBlobs extends GeneratorReplacing { // defaults this.amountPerChunk = 1.0F; - this.placeOn = BlockQuery.buildOr().blocks(Blocks.stone).materials(Material.ground, Material.grass).create(); + this.placeOn = BlockQuery.buildOr().blocks(Blocks.STONE).materials(Material.GROUND, Material.GRASS).create(); this.replace = BlockQueries.breakable; - this.with = Blocks.cobblestone.getDefaultState(); + this.with = Blocks.COBBLESTONE.getDefaultState(); this.scatterYMethod = ScatterYMethod.BELOW_SURFACE; this.minRadius = 2.0F; this.maxRadius = 5.0F; diff --git a/src/main/java/biomesoplenty/common/world/feature/GeneratorColumns.java b/src/main/java/biomesoplenty/common/world/feature/GeneratorColumns.java index e9d31614d..f1bb7c416 100644 --- a/src/main/java/biomesoplenty/common/world/feature/GeneratorColumns.java +++ b/src/main/java/biomesoplenty/common/world/feature/GeneratorColumns.java @@ -42,9 +42,9 @@ public class GeneratorColumns extends GeneratorReplacing { // defaults this.amountPerChunk = 1.0F; - this.placeOn = new BlockQueryMaterial(Material.ground, Material.grass); + this.placeOn = new BlockQueryMaterial(Material.GROUND, Material.GRASS); this.replace = BlockQueries.airOrLeaves; - this.with = Blocks.cobblestone.getDefaultState(); + this.with = Blocks.COBBLESTONE.getDefaultState(); this.scatterYMethod = ScatterYMethod.AT_SURFACE; this.minHeight = 2; this.maxHeight = 4; diff --git a/src/main/java/biomesoplenty/common/world/feature/GeneratorCrystals.java b/src/main/java/biomesoplenty/common/world/feature/GeneratorCrystals.java index b227773ff..15bbe1777 100644 --- a/src/main/java/biomesoplenty/common/world/feature/GeneratorCrystals.java +++ b/src/main/java/biomesoplenty/common/world/feature/GeneratorCrystals.java @@ -1,7 +1,5 @@ package biomesoplenty.common.world.feature; -import java.util.Random; - import biomesoplenty.api.block.BlockQueries; import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod; import biomesoplenty.common.util.block.BlockQuery.BlockQueryMaterial; @@ -14,6 +12,8 @@ import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; +import java.util.Random; + public class GeneratorCrystals extends GeneratorReplacing { public static class Builder extends GeneratorReplacing.InnerBuilder implements IGeneratorBuilder @@ -31,8 +31,8 @@ public class GeneratorCrystals extends GeneratorReplacing // defaults this.amountPerChunk = 1.0F; this.placeOn = BlockQueries.hellish; - this.replace = new BlockQueryMaterial(Material.air); - this.with = Blocks.glowstone.getDefaultState(); + this.replace = new BlockQueryMaterial(Material.AIR); + this.with = Blocks.GLOWSTONE.getDefaultState(); this.scatterYMethod = ScatterYMethod.BELOW_GROUND; this.generationAttempts = 1500; this.maxRadius = 7; diff --git a/src/main/java/biomesoplenty/common/world/feature/GeneratorDoubleFlora.java b/src/main/java/biomesoplenty/common/world/feature/GeneratorDoubleFlora.java index e92afcedd..86c8adc9b 100644 --- a/src/main/java/biomesoplenty/common/world/feature/GeneratorDoubleFlora.java +++ b/src/main/java/biomesoplenty/common/world/feature/GeneratorDoubleFlora.java @@ -8,8 +8,6 @@ package biomesoplenty.common.world.feature; -import java.util.Random; - import biomesoplenty.api.block.BOPBlocks; import biomesoplenty.api.block.BlockQueries; import biomesoplenty.common.block.BlockBOPDecoration; @@ -28,6 +26,8 @@ import net.minecraft.init.Blocks; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; +import java.util.Random; + public class GeneratorDoubleFlora extends GeneratorReplacing { @@ -49,8 +49,8 @@ public class GeneratorDoubleFlora extends GeneratorReplacing } public Builder with(BlockDoublePlant.EnumPlantType type) { - this.with = Blocks.double_plant.getStateFromMeta(type.getMeta()); - this.withTop = Blocks.double_plant.getStateFromMeta(8); + this.with = Blocks.DOUBLE_PLANT.getStateFromMeta(type.getMeta()); + this.withTop = Blocks.DOUBLE_PLANT.getStateFromMeta(8); return this; } @@ -59,7 +59,7 @@ public class GeneratorDoubleFlora extends GeneratorReplacing // defaults this.amountPerChunk = 1.0F; this.placeOn = BlockQueries.anything; - this.replace = new BlockQueryMaterial(Material.air); + this.replace = new BlockQueryMaterial(Material.AIR); this.with = BOPBlocks.double_plant.getDefaultState().withProperty(BlockBOPDoublePlant.VARIANT, BlockBOPDoublePlant.DoublePlantType.FLAX).withProperty(BlockBOPDoublePlant.HALF, BlockBOPDoubleDecoration.Half.LOWER); this.withTop = BOPBlocks.double_plant.getDefaultState().withProperty(BlockBOPDoublePlant.VARIANT, BlockBOPDoublePlant.DoublePlantType.FLAX).withProperty(BlockBOPDoublePlant.HALF, BlockBOPDoubleDecoration.Half.UPPER); this.scatterYMethod = ScatterYMethod.AT_SURFACE; diff --git a/src/main/java/biomesoplenty/common/world/feature/GeneratorFlora.java b/src/main/java/biomesoplenty/common/world/feature/GeneratorFlora.java index 12d7bba3b..7733625b7 100644 --- a/src/main/java/biomesoplenty/common/world/feature/GeneratorFlora.java +++ b/src/main/java/biomesoplenty/common/world/feature/GeneratorFlora.java @@ -56,15 +56,15 @@ public class GeneratorFlora extends GeneratorReplacing this.with = flowerBlock.getDefaultState().withProperty(flowerBlock.getTypeProperty(), a); return this.self(); } - public T with(BlockTallGrass.EnumType a) {this.with = Blocks.tallgrass.getDefaultState().withProperty(BlockTallGrass.TYPE, a); return this.self();} + public T with(BlockTallGrass.EnumType a) {this.with = Blocks.TALLGRASS.getDefaultState().withProperty(BlockTallGrass.TYPE, a); return this.self();} public T withNonDecayingLeaf(BlockPlanks.EnumType a) { IBlockState leafState; if (a.getMetadata() < 4) { - leafState = Blocks.leaves.getDefaultState().withProperty(BlockOldLeaf.VARIANT, a); + leafState = Blocks.LEAVES.getDefaultState().withProperty(BlockOldLeaf.VARIANT, a); } else { - leafState = Blocks.leaves2.getDefaultState().withProperty(BlockNewLeaf.VARIANT, a); + leafState = Blocks.LEAVES2.getDefaultState().withProperty(BlockNewLeaf.VARIANT, a); } this.with = leafState.withProperty(BlockLeaves.CHECK_DECAY, Boolean.valueOf(false)).withProperty(BlockLeaves.DECAYABLE, Boolean.valueOf(false)); return this.self(); @@ -87,8 +87,8 @@ public class GeneratorFlora extends GeneratorReplacing // defaults this.amountPerChunk = 1.0F; this.placeOn = BlockQueries.anything; - this.replace = new BlockQueryMaterial(Material.air); - this.with = Blocks.red_flower.getDefaultState(); + this.replace = new BlockQueryMaterial(Material.AIR); + this.with = Blocks.RED_FLOWER.getDefaultState(); this.scatterYMethod = ScatterYMethod.AT_SURFACE; this.generationAttempts = 32; } diff --git a/src/main/java/biomesoplenty/common/world/feature/GeneratorGrass.java b/src/main/java/biomesoplenty/common/world/feature/GeneratorGrass.java index 4d2c03624..9178723d5 100644 --- a/src/main/java/biomesoplenty/common/world/feature/GeneratorGrass.java +++ b/src/main/java/biomesoplenty/common/world/feature/GeneratorGrass.java @@ -27,8 +27,8 @@ public class GeneratorGrass extends GeneratorFlora // defaults this.amountPerChunk = 1.0F; this.placeOn = BlockQueries.anything; - this.replace = new BlockQueryMaterial(Material.air); - this.with = Blocks.tallgrass.getDefaultState(); + this.replace = new BlockQueryMaterial(Material.AIR); + this.with = Blocks.TALLGRASS.getDefaultState(); this.scatterYMethod = ScatterYMethod.AT_SURFACE; this.generationAttempts = 96; } diff --git a/src/main/java/biomesoplenty/common/world/feature/GeneratorLakes.java b/src/main/java/biomesoplenty/common/world/feature/GeneratorLakes.java index 872b3d47f..e9826a6f6 100644 --- a/src/main/java/biomesoplenty/common/world/feature/GeneratorLakes.java +++ b/src/main/java/biomesoplenty/common/world/feature/GeneratorLakes.java @@ -8,8 +8,6 @@ package biomesoplenty.common.world.feature; -import java.util.Random; - import biomesoplenty.api.biome.generation.BOPGeneratorBase; import biomesoplenty.common.util.biome.GeneratorUtils; import biomesoplenty.common.util.block.BlockQuery; @@ -27,6 +25,8 @@ import net.minecraft.world.EnumSkyBlock; import net.minecraft.world.World; import net.minecraft.world.biome.BiomeGenBase; +import java.util.Random; + public class GeneratorLakes extends BOPGeneratorBase { @@ -53,8 +53,8 @@ public class GeneratorLakes extends BOPGeneratorBase public Builder waterLakeForBiome(BiomeGenBase a) { - this.liquid = Blocks.water.getDefaultState(); - this.frozenLiquid = Blocks.ice.getDefaultState(); + this.liquid = Blocks.WATER.getDefaultState(); + this.frozenLiquid = Blocks.ICE.getDefaultState(); this.grassBorderWith = a.topBlock; this.grassReplace = new BlockQueryBlock(a.fillerBlock.getBlock()); this.lineWith = null; @@ -62,11 +62,11 @@ public class GeneratorLakes extends BOPGeneratorBase } public Builder lavaLake() { - this.liquid = Blocks.lava.getDefaultState(); + this.liquid = Blocks.LAVA.getDefaultState(); this.frozenLiquid = null; this.grassBorderWith = null; this.grassReplace = null; - this.lineWith = Blocks.stone.getDefaultState(); + this.lineWith = Blocks.STONE.getDefaultState(); return this; } @@ -74,10 +74,10 @@ public class GeneratorLakes extends BOPGeneratorBase { // defaults this.amountPerChunk = 1.0F; - this.liquid = Blocks.water.getDefaultState(); - this.frozenLiquid = Blocks.ice.getDefaultState(); - this.grassBorderWith = Blocks.grass.getDefaultState(); - this.grassReplace = new BlockQueryBlock(Blocks.dirt); + this.liquid = Blocks.WATER.getDefaultState(); + this.frozenLiquid = Blocks.ICE.getDefaultState(); + this.grassBorderWith = Blocks.GRASS.getDefaultState(); + this.grassReplace = new BlockQueryBlock(Blocks.DIRT); this.lineWith = null; } @@ -233,7 +233,7 @@ public class GeneratorLakes extends BOPGeneratorBase { if (cavityShape[(x * 16 + z) * 8 + y]) { - world.setBlockState(pos.add(x, y, z), y >= 4 ? Blocks.air.getDefaultState() : this.liquid, 2); + world.setBlockState(pos.add(x, y, z), y >= 4 ? Blocks.AIR.getDefaultState() : this.liquid, 2); } } } diff --git a/src/main/java/biomesoplenty/common/world/feature/GeneratorLogs.java b/src/main/java/biomesoplenty/common/world/feature/GeneratorLogs.java index 4efe6c15f..e7bf4a6d1 100644 --- a/src/main/java/biomesoplenty/common/world/feature/GeneratorLogs.java +++ b/src/main/java/biomesoplenty/common/world/feature/GeneratorLogs.java @@ -41,9 +41,9 @@ public class GeneratorLogs extends GeneratorReplacing { if (a.getMetadata() < 4) { - this.with = Blocks.log.getDefaultState().withProperty(BlockOldLog.VARIANT, a); + this.with = Blocks.LOG.getDefaultState().withProperty(BlockOldLog.VARIANT, a); } else { - this.with = Blocks.log2.getDefaultState().withProperty(BlockNewLog.VARIANT, a); + this.with = Blocks.LOG2.getDefaultState().withProperty(BlockNewLog.VARIANT, a); } return this.self(); } @@ -54,9 +54,9 @@ public class GeneratorLogs extends GeneratorReplacing { // defaults this.amountPerChunk = 1.0F; - this.placeOn = new BlockQueryMaterial(Material.grass, Material.ground); - this.replace = new BlockQueryMaterial(Material.air); - this.with = Blocks.log.getDefaultState(); + this.placeOn = new BlockQueryMaterial(Material.GRASS, Material.GROUND); + this.replace = new BlockQueryMaterial(Material.AIR); + this.with = Blocks.LOG.getDefaultState(); this.scatterYMethod = ScatterYMethod.AT_SURFACE; this.minLength = 3; this.maxLength = 5; diff --git a/src/main/java/biomesoplenty/common/world/feature/GeneratorMixedLily.java b/src/main/java/biomesoplenty/common/world/feature/GeneratorMixedLily.java index 32abca06d..9be951e42 100644 --- a/src/main/java/biomesoplenty/common/world/feature/GeneratorMixedLily.java +++ b/src/main/java/biomesoplenty/common/world/feature/GeneratorMixedLily.java @@ -32,9 +32,9 @@ public class GeneratorMixedLily extends BOPGeneratorBase BOPBlocks.waterlily.getDefaultState().withProperty(BlockBOPLilypad.VARIANT, BlockBOPLilypad.LilypadType.TINY), BOPBlocks.waterlily.getDefaultState().withProperty(BlockBOPLilypad.VARIANT, BlockBOPLilypad.LilypadType.SMALL), BOPBlocks.waterlily.getDefaultState().withProperty(BlockBOPLilypad.VARIANT, BlockBOPLilypad.LilypadType.MEDIUM), - Blocks.waterlily.getDefaultState() + Blocks.WATERLILY.getDefaultState() }; - protected static IBlockPosQuery replace = new BlockQueryMaterial(Material.air); + protected static IBlockPosQuery replace = new BlockQueryMaterial(Material.AIR); protected int generationAttempts; diff --git a/src/main/java/biomesoplenty/common/world/feature/GeneratorOreCluster.java b/src/main/java/biomesoplenty/common/world/feature/GeneratorOreCluster.java index 8be144e92..c7150d6f5 100644 --- a/src/main/java/biomesoplenty/common/world/feature/GeneratorOreCluster.java +++ b/src/main/java/biomesoplenty/common/world/feature/GeneratorOreCluster.java @@ -42,11 +42,11 @@ public class GeneratorOreCluster extends GeneratorOreBase public Builder() { this.amountPerChunk = 1.0F; - this.with = Blocks.emerald_ore.getDefaultState(); + this.with = Blocks.EMERALD_ORE.getDefaultState(); this.minHeight = 4; this.maxHeight = 32; this.clusterSize = 4; - this.replace = new BlockQueryBlock(Blocks.stone); + this.replace = new BlockQueryBlock(Blocks.STONE); } @Override diff --git a/src/main/java/biomesoplenty/common/world/feature/GeneratorOreSingle.java b/src/main/java/biomesoplenty/common/world/feature/GeneratorOreSingle.java index 2c4fe1a4d..07b622793 100644 --- a/src/main/java/biomesoplenty/common/world/feature/GeneratorOreSingle.java +++ b/src/main/java/biomesoplenty/common/world/feature/GeneratorOreSingle.java @@ -39,8 +39,8 @@ public class GeneratorOreSingle extends GeneratorOreBase this.amountPerChunk = 1.0F; this.minHeight = 4; this.maxHeight = 32; - this.with = Blocks.emerald_ore.getDefaultState(); - this.replace = new BlockQueryBlock(Blocks.stone); + this.with = Blocks.EMERALD_ORE.getDefaultState(); + this.replace = new BlockQueryBlock(Blocks.STONE); } @Override diff --git a/src/main/java/biomesoplenty/common/world/feature/GeneratorSpike.java b/src/main/java/biomesoplenty/common/world/feature/GeneratorSpike.java index be17b9c54..6ef4dd448 100644 --- a/src/main/java/biomesoplenty/common/world/feature/GeneratorSpike.java +++ b/src/main/java/biomesoplenty/common/world/feature/GeneratorSpike.java @@ -42,7 +42,7 @@ public class GeneratorSpike extends GeneratorReplacing // defaults this.amountPerChunk = 1.0F; this.placeOn = BlockQueries.solid; - this.replace = new BlockQueryMaterial(Material.air); + this.replace = new BlockQueryMaterial(Material.AIR); this.with = BOPBlocks.dried_sand.getDefaultState(); this.scatterYMethod = ScatterYMethod.AT_SURFACE; this.minHeight = 8; diff --git a/src/main/java/biomesoplenty/common/world/feature/GeneratorSplatter.java b/src/main/java/biomesoplenty/common/world/feature/GeneratorSplatter.java index 420c8edd1..cf100a653 100644 --- a/src/main/java/biomesoplenty/common/world/feature/GeneratorSplatter.java +++ b/src/main/java/biomesoplenty/common/world/feature/GeneratorSplatter.java @@ -34,7 +34,7 @@ public class GeneratorSplatter extends GeneratorReplacing this.amountPerChunk = 1.0F; this.placeOn = BlockQueries.anything; this.replace = BlockQueries.breakable; - this.with = Blocks.stone.getDefaultState(); + this.with = Blocks.STONE.getDefaultState(); this.scatterYMethod = ScatterYMethod.AT_SURFACE; this.generationAttempts = 64; } diff --git a/src/main/java/biomesoplenty/common/world/feature/GeneratorSplotches.java b/src/main/java/biomesoplenty/common/world/feature/GeneratorSplotches.java index 02f643dba..fdeb7585d 100644 --- a/src/main/java/biomesoplenty/common/world/feature/GeneratorSplotches.java +++ b/src/main/java/biomesoplenty/common/world/feature/GeneratorSplotches.java @@ -34,9 +34,9 @@ public class GeneratorSplotches extends GeneratorReplacing { // defaults this.amountPerChunk = 1.0F; - this.placeOn = new BlockQueryMaterial(Material.grass, Material.ground); - this.replace = new BlockQueryMaterial(Material.grass, Material.ground); - this.with = Blocks.cobblestone.getDefaultState(); + this.placeOn = new BlockQueryMaterial(Material.GRASS, Material.GROUND); + this.replace = new BlockQueryMaterial(Material.GRASS, Material.GROUND); + this.with = Blocks.COBBLESTONE.getDefaultState(); this.scatterYMethod = ScatterYMethod.BELOW_SURFACE; this.splotchSize = 8; } diff --git a/src/main/java/biomesoplenty/common/world/feature/GeneratorWaterside.java b/src/main/java/biomesoplenty/common/world/feature/GeneratorWaterside.java index 03a28bc01..93441b45e 100644 --- a/src/main/java/biomesoplenty/common/world/feature/GeneratorWaterside.java +++ b/src/main/java/biomesoplenty/common/world/feature/GeneratorWaterside.java @@ -35,8 +35,8 @@ public class GeneratorWaterside extends GeneratorReplacing // defaults this.amountPerChunk = 1.0F; this.placeOn = BlockQueries.anything; - this.replace = new BlockQueryMaterial(Material.grass, Material.ground); - this.with = Blocks.gravel.getDefaultState(); + this.replace = new BlockQueryMaterial(Material.GRASS, Material.GROUND); + this.with = Blocks.GRAVEL.getDefaultState(); this.scatterYMethod = ScatterYMethod.AT_GROUND; this.maxRadius = 7; } @@ -61,7 +61,7 @@ public class GeneratorWaterside extends GeneratorReplacing public boolean generate(World world, Random random, BlockPos pos) { //Check we are generating around water - if (world.getBlockState(pos).getMaterial() != Material.water) + if (world.getBlockState(pos).getMaterial() != Material.WATER) { return false; } diff --git a/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorBasicTree.java b/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorBasicTree.java index 904517afb..2ed64ee29 100644 --- a/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorBasicTree.java +++ b/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorBasicTree.java @@ -8,18 +8,10 @@ package biomesoplenty.common.world.feature.tree; -import java.util.Random; - -import org.apache.commons.lang3.tuple.Pair; - import biomesoplenty.api.block.BlockQueries; import biomesoplenty.common.util.biome.GeneratorUtils; import biomesoplenty.common.util.block.BlockQuery; -import biomesoplenty.common.util.block.BlockQuery.BlockQueryBlock; -import biomesoplenty.common.util.block.BlockQuery.BlockQueryMaterial; -import biomesoplenty.common.util.block.BlockQuery.BlockQueryParseException; -import biomesoplenty.common.util.block.BlockQuery.BlockQueryState; -import biomesoplenty.common.util.block.BlockQuery.IBlockPosQuery; +import biomesoplenty.common.util.block.BlockQuery.*; import biomesoplenty.common.util.config.BOPConfig.IConfigObj; import net.minecraft.block.Block; import net.minecraft.block.BlockCocoa; @@ -31,6 +23,9 @@ import net.minecraft.init.Blocks; import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; +import org.apache.commons.lang3.tuple.Pair; + +import java.util.Random; public class GeneratorBasicTree extends GeneratorTreeBase { @@ -42,9 +37,9 @@ public class GeneratorBasicTree extends GeneratorTreeBase // defaults this.amountPerChunk = 1.0F; this.placeOn = BlockQueries.anything; - this.replace = new BlockQueryMaterial(Material.air, Material.leaves); - this.log = Blocks.log.getDefaultState(); - this.leaves = Blocks.leaves.getDefaultState(); + this.replace = new BlockQueryMaterial(Material.AIR, Material.LEAVES); + this.log = Blocks.LOG.getDefaultState(); + this.leaves = Blocks.LEAVES.getDefaultState(); this.vine = null; this.hanging = null; this.trunkFruit = null; @@ -165,7 +160,7 @@ public class GeneratorBasicTree extends GeneratorTreeBase { BlockPos soilPos = pos.down(); Block soil = world.getBlockState(soilPos).getBlock(); - boolean isSoil = soil.canSustainPlant(world.getBlockState(soilPos), world, soilPos, EnumFacing.UP, (BlockSapling)Blocks.sapling); + boolean isSoil = soil.canSustainPlant(world.getBlockState(soilPos), world, soilPos, EnumFacing.UP, (BlockSapling)Blocks.SAPLING); if (this.placeOn.matches(world, soilPos) && isSoil && pos.getY() < 256 - height - 1) { @@ -337,7 +332,7 @@ public class GeneratorBasicTree extends GeneratorTreeBase private void generateTrunkFruit(World world, int age, BlockPos pos, EnumFacing direction) { - if (this.trunkFruit == Blocks.cocoa.getDefaultState()) + if (this.trunkFruit == Blocks.COCOA.getDefaultState()) { this.setBlockAndNotifyAdequately(world, pos, this.trunkFruit.withProperty(BlockCocoa.AGE, Integer.valueOf(age)).withProperty(BlockCocoa.FACING, direction)); } diff --git a/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorBayouTree.java b/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorBayouTree.java index 71e4c31b8..dcbeeb23c 100644 --- a/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorBayouTree.java +++ b/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorBayouTree.java @@ -51,9 +51,9 @@ public class GeneratorBayouTree extends GeneratorTreeBase this.placeOn = BlockQueries.fertile; this.replace = BlockQueries.airOrLeaves; this.rootsReplace = BlockQueries.rootsCanDigThrough; - this.log = Blocks.log.getDefaultState(); - this.leaves = Blocks.leaves.getDefaultState(); - this.vine = Blocks.vine.getDefaultState(); + this.log = Blocks.LOG.getDefaultState(); + this.leaves = Blocks.LEAVES.getDefaultState(); + this.vine = Blocks.VINE.getDefaultState(); this.hanging = null; this.trunkFruit = null; this.altLeaves = null; diff --git a/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorBigTree.java b/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorBigTree.java index 0339345ac..12e65897e 100644 --- a/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorBigTree.java +++ b/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorBigTree.java @@ -8,18 +8,12 @@ package biomesoplenty.common.world.feature.tree; -import java.util.List; -import java.util.Random; - -import org.apache.commons.lang3.tuple.Pair; - -import com.google.common.collect.Lists; - import biomesoplenty.api.block.BlockQueries; import biomesoplenty.common.util.biome.GeneratorUtils; import biomesoplenty.common.util.block.BlockQuery.BlockQueryMaterial; import biomesoplenty.common.util.block.BlockQuery.IBlockPosQuery; import biomesoplenty.common.util.config.BOPConfig.IConfigObj; +import com.google.common.collect.Lists; import net.minecraft.block.BlockLeaves; import net.minecraft.block.BlockLog; import net.minecraft.block.BlockSapling; @@ -30,6 +24,10 @@ import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.MathHelper; import net.minecraft.world.World; +import org.apache.commons.lang3.tuple.Pair; + +import java.util.List; +import java.util.Random; /*This class is heavily based on https://gist.github.com/grum/62cfdec0537e8db24eb3#file-bigtreefeature-java additional information has been added from http://pastebin.com/XBLdGqXQ. This class has been cross-checked @@ -49,9 +47,9 @@ public class GeneratorBigTree extends GeneratorTreeBase // defaults this.amountPerChunk = 1.0F; this.placeOn = BlockQueries.fertile; - this.replace = new BlockQueryMaterial(Material.air, Material.leaves); - this.log = Blocks.log.getDefaultState(); - this.leaves = Blocks.leaves.getDefaultState(); + this.replace = new BlockQueryMaterial(Material.AIR, Material.LEAVES); + this.log = Blocks.LOG.getDefaultState(); + this.leaves = Blocks.LEAVES.getDefaultState(); this.vine = null; this.hanging = null; this.trunkFruit = null; @@ -506,7 +504,7 @@ public class GeneratorBigTree extends GeneratorTreeBase { BlockPos down = this.origin.down(); IBlockState state = this.world.getBlockState(down); - boolean isSoil = state.getBlock().canSustainPlant(state, this.world, down, EnumFacing.UP, ((BlockSapling)Blocks.sapling)); + boolean isSoil = state.getBlock().canSustainPlant(state, this.world, down, EnumFacing.UP, ((BlockSapling)Blocks.SAPLING)); //Don't grow the tree here if the location can't sustain a sapling if (!isSoil && !this.placeOn.matches(world, down)) diff --git a/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorBulbTree.java b/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorBulbTree.java index 689992690..9f6e7b382 100644 --- a/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorBulbTree.java +++ b/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorBulbTree.java @@ -32,8 +32,8 @@ public class GeneratorBulbTree extends GeneratorTreeBase this.maxHeight = 12; this.placeOn = BlockQueries.fertile; this.replace = BlockQueries.airOrLeaves; - this.log = Blocks.log.getDefaultState(); - this.leaves = Blocks.leaves.getDefaultState(); + this.log = Blocks.LOG.getDefaultState(); + this.leaves = Blocks.LEAVES.getDefaultState(); this.vine = null; this.hanging = null; this.trunkFruit = null; @@ -55,7 +55,7 @@ public class GeneratorBulbTree extends GeneratorTreeBase public boolean setCocoa(World world, BlockPos pos, EnumFacing side) { - IBlockState cocoaState = Blocks.cocoa.getDefaultState().withProperty(BlockDirectional.FACING, side); + IBlockState cocoaState = Blocks.COCOA.getDefaultState().withProperty(BlockDirectional.FACING, side); if (this.replace.matches(world, pos)) { world.setBlockState(pos, cocoaState); diff --git a/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorBush.java b/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorBush.java index 6ecde2bc7..95d9eb548 100644 --- a/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorBush.java +++ b/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorBush.java @@ -30,8 +30,8 @@ public class GeneratorBush extends GeneratorTreeBase this.maxHeight = 4; this.placeOn = BlockQueries.fertile; this.replace = BlockQueries.airOrLeaves; - this.log = Blocks.log.getDefaultState(); - this.leaves = Blocks.leaves.getDefaultState(); + this.log = Blocks.LOG.getDefaultState(); + this.leaves = Blocks.LEAVES.getDefaultState(); this.vine = null; this.hanging = null; this.trunkFruit = null; diff --git a/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorMahoganyTree.java b/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorMahoganyTree.java index 9a7b5fb56..82ff76eab 100644 --- a/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorMahoganyTree.java +++ b/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorMahoganyTree.java @@ -30,7 +30,7 @@ public class GeneratorMahoganyTree extends GeneratorBasicTree // defaults this.amountPerChunk = 1.0F; this.placeOn = BlockQueries.anything; - this.replace = new BlockQueryMaterial(Material.air, Material.leaves); + this.replace = new BlockQueryMaterial(Material.AIR, Material.LEAVES); this.log = BlockBOPLog.paging.getVariantState(BOPWoods.MAHOGANY); this.leaves = BlockBOPLeaves.paging.getVariantState(BOPTrees.MAHOGANY); this.vine = null; diff --git a/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorMangroveTree.java b/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorMangroveTree.java index b902972ea..9a63a3ed5 100644 --- a/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorMangroveTree.java +++ b/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorMangroveTree.java @@ -51,8 +51,8 @@ public class GeneratorMangroveTree extends GeneratorTreeBase this.placeOn = BlockQueries.fertile; this.replace = BlockQueries.airOrLeaves; this.rootsReplace = BlockQueries.rootsCanDigThrough; - this.log = Blocks.log.getDefaultState(); - this.leaves = Blocks.leaves.getDefaultState(); + this.log = Blocks.LOG.getDefaultState(); + this.leaves = Blocks.LEAVES.getDefaultState(); this.vine = null; this.hanging = null; this.trunkFruit = null; diff --git a/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorMegaJungleTree.java b/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorMegaJungleTree.java index 07b647088..a443083cc 100644 --- a/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorMegaJungleTree.java +++ b/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorMegaJungleTree.java @@ -34,7 +34,7 @@ public class GeneratorMegaJungleTree extends GeneratorHugeTree this.replace = BlockQueries.airOrLeaves; this.log(BlockPlanks.EnumType.JUNGLE); this.leaves(BlockPlanks.EnumType.JUNGLE); - this.vine = Blocks.vine.getDefaultState(); + this.vine = Blocks.VINE.getDefaultState(); this.hanging = null; this.trunkFruit = null; this.altLeaves = null; diff --git a/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorPalmTree.java b/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorPalmTree.java index 8ab5de666..305c50618 100644 --- a/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorPalmTree.java +++ b/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorPalmTree.java @@ -33,8 +33,8 @@ public class GeneratorPalmTree extends GeneratorTreeBase this.maxHeight = 14; this.placeOn = BlockQueries.fertile; this.replace = BlockQueries.replaceable; - this.log = Blocks.log.getDefaultState(); - this.leaves = Blocks.leaves.getDefaultState(); + this.log = Blocks.LOG.getDefaultState(); + this.leaves = Blocks.LEAVES.getDefaultState(); this.vine = null; this.hanging = null; this.trunkFruit = null; diff --git a/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorPineTree.java b/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorPineTree.java index 63f143850..940b78637 100644 --- a/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorPineTree.java +++ b/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorPineTree.java @@ -32,8 +32,8 @@ public class GeneratorPineTree extends GeneratorTreeBase this.maxHeight = 12; this.placeOn = BlockQueries.fertile; this.replace = BlockQueries.airOrLeaves; - this.log = Blocks.log.getDefaultState(); - this.leaves = Blocks.leaves.getDefaultState(); + this.log = Blocks.LOG.getDefaultState(); + this.leaves = Blocks.LEAVES.getDefaultState(); this.vine = null; this.hanging = hanging; this.trunkFruit = null; diff --git a/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorProfileTree.java b/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorProfileTree.java index b8ff71945..184c972ef 100644 --- a/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorProfileTree.java +++ b/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorProfileTree.java @@ -35,8 +35,8 @@ public class GeneratorProfileTree extends GeneratorTreeBase this.maxHeight = 12; this.placeOn = BlockQueries.fertile; this.replace = BlockQueries.airOrLeaves; - this.log = Blocks.log.getDefaultState(); - this.leaves = Blocks.leaves.getDefaultState(); + this.log = Blocks.LOG.getDefaultState(); + this.leaves = Blocks.LEAVES.getDefaultState(); this.vine = null; this.hanging = null; this.trunkFruit = null; diff --git a/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorTaigaTree.java b/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorTaigaTree.java index 29240d3e6..f67947abf 100644 --- a/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorTaigaTree.java +++ b/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorTaigaTree.java @@ -39,9 +39,9 @@ public class GeneratorTaigaTree extends GeneratorTreeBase this.maxHeight = 12; this.placeOn = BlockQueries.fertile; this.replace = BlockQueries.airOrLeaves; - this.log = Blocks.log.getDefaultState().withProperty(BlockOldLog.VARIANT, BlockPlanks.EnumType.SPRUCE); - this.leaves = Blocks.leaves.getDefaultState().withProperty(BlockOldLeaf.VARIANT, BlockPlanks.EnumType.SPRUCE); - this.vine = Blocks.vine.getDefaultState(); + this.log = Blocks.LOG.getDefaultState().withProperty(BlockOldLog.VARIANT, BlockPlanks.EnumType.SPRUCE); + this.leaves = Blocks.LEAVES.getDefaultState().withProperty(BlockOldLeaf.VARIANT, BlockPlanks.EnumType.SPRUCE); + this.vine = Blocks.VINE.getDefaultState(); this.hanging = null; this.trunkFruit = null; this.altLeaves = null; diff --git a/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorTreeBase.java b/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorTreeBase.java index e678111f6..346f204e8 100644 --- a/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorTreeBase.java +++ b/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorTreeBase.java @@ -99,9 +99,9 @@ public abstract class GeneratorTreeBase extends BOPGeneratorBase { if (a.getMetadata() < 4) { - this.log = Blocks.log.getDefaultState().withProperty(BlockOldLog.VARIANT, a); + this.log = Blocks.LOG.getDefaultState().withProperty(BlockOldLog.VARIANT, a); } else { - this.log = Blocks.log2.getDefaultState().withProperty(BlockNewLog.VARIANT, a); + this.log = Blocks.LOG2.getDefaultState().withProperty(BlockNewLog.VARIANT, a); } return this.self(); } @@ -111,9 +111,9 @@ public abstract class GeneratorTreeBase extends BOPGeneratorBase { if (a.getMetadata() < 4) { - this.leaves = Blocks.leaves.getDefaultState().withProperty(BlockLeaves.CHECK_DECAY, false).withProperty(BlockOldLeaf.VARIANT, a); + this.leaves = Blocks.LEAVES.getDefaultState().withProperty(BlockLeaves.CHECK_DECAY, false).withProperty(BlockOldLeaf.VARIANT, a); } else { - this.leaves = Blocks.leaves2.getDefaultState().withProperty(BlockLeaves.CHECK_DECAY, false).withProperty(BlockNewLeaf.VARIANT, a); + this.leaves = Blocks.LEAVES2.getDefaultState().withProperty(BlockLeaves.CHECK_DECAY, false).withProperty(BlockNewLeaf.VARIANT, a); } return this.self(); } @@ -139,9 +139,9 @@ public abstract class GeneratorTreeBase extends BOPGeneratorBase { if (a.getMetadata() < 4) { - this.altLeaves = Blocks.leaves.getDefaultState().withProperty(BlockLeaves.CHECK_DECAY, false).withProperty(BlockOldLeaf.VARIANT, a); + this.altLeaves = Blocks.LEAVES.getDefaultState().withProperty(BlockLeaves.CHECK_DECAY, false).withProperty(BlockOldLeaf.VARIANT, a); } else { - this.altLeaves = Blocks.leaves2.getDefaultState().withProperty(BlockLeaves.CHECK_DECAY, false).withProperty(BlockNewLeaf.VARIANT, a); + this.altLeaves = Blocks.LEAVES2.getDefaultState().withProperty(BlockLeaves.CHECK_DECAY, false).withProperty(BlockNewLeaf.VARIANT, a); } return this.self(); } diff --git a/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorTwigletTree.java b/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorTwigletTree.java index 4d7068a21..ea233cc23 100644 --- a/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorTwigletTree.java +++ b/src/main/java/biomesoplenty/common/world/feature/tree/GeneratorTwigletTree.java @@ -38,8 +38,8 @@ public class GeneratorTwigletTree extends GeneratorTreeBase this.maxHeight = 6; this.placeOn = BlockQueries.fertile; this.replace = BlockQueries.airOrLeaves; - this.log = Blocks.log.getDefaultState(); - this.leaves = Blocks.leaves.getDefaultState(); + this.log = Blocks.LOG.getDefaultState(); + this.leaves = Blocks.LEAVES.getDefaultState(); this.vine = null; this.hanging = null; this.trunkFruit = null; @@ -127,7 +127,7 @@ public class GeneratorTwigletTree extends GeneratorTreeBase private void generateTrunkFruit(World world, int age, BlockPos pos, EnumFacing direction) { - if (this.trunkFruit == Blocks.cocoa.getDefaultState()) + if (this.trunkFruit == Blocks.COCOA.getDefaultState()) { this.setBlockAndNotifyAdequately(world, pos, this.trunkFruit.withProperty(BlockCocoa.AGE, Integer.valueOf(age)).withProperty(BlockCocoa.FACING, direction)); } diff --git a/src/main/java/biomesoplenty/common/world/layer/GenLayerBOPRiver.java b/src/main/java/biomesoplenty/common/world/layer/GenLayerBOPRiver.java index a75c202e6..7490fbe82 100644 --- a/src/main/java/biomesoplenty/common/world/layer/GenLayerBOPRiver.java +++ b/src/main/java/biomesoplenty/common/world/layer/GenLayerBOPRiver.java @@ -39,7 +39,7 @@ public class GenLayerBOPRiver extends BOPGenLayer } else { - out[x + y * areaWidth] = BiomeGenBase.getIdForBiome(Biomes.river); + out[x + y * areaWidth] = BiomeGenBase.getIdForBiome(Biomes.RIVER); } } } diff --git a/src/main/java/biomesoplenty/common/world/layer/GenLayerBiomeBOP.java b/src/main/java/biomesoplenty/common/world/layer/GenLayerBiomeBOP.java index deb55c802..8dde6ce34 100644 --- a/src/main/java/biomesoplenty/common/world/layer/GenLayerBiomeBOP.java +++ b/src/main/java/biomesoplenty/common/world/layer/GenLayerBiomeBOP.java @@ -53,11 +53,11 @@ public class GenLayerBiomeBOP extends BOPGenLayer BOPClimates climate = BOPClimates.lookup(climateValues[index]); // At this point, oceans and land have been assigned, and so have mushroom islands - if (landSeaVal == BiomeGenBase.getIdForBiome(Biomes.deepOcean)) + if (landSeaVal == BiomeGenBase.getIdForBiome(Biomes.DEEP_OCEAN)) { out[index] = BiomeGenBase.getIdForBiome(climate.getRandomOceanBiome(this, true)); } - else if ((landSeaVal == BiomeGenBase.getIdForBiome(Biomes.mushroomIsland) || ModBiomes.islandBiomesMap.containsKey(landSeaVal)) && climate.biomeType != BiomeType.ICY) + else if ((landSeaVal == BiomeGenBase.getIdForBiome(Biomes.MUSHROOM_ISLAND) || ModBiomes.islandBiomesMap.containsKey(landSeaVal)) && climate.biomeType != BiomeType.ICY) { // keep islands, unless it's in an icy climate in which case, replace out[index] = landSeaVal; diff --git a/src/main/java/biomesoplenty/common/world/layer/GenLayerBiomeEdgeBOP.java b/src/main/java/biomesoplenty/common/world/layer/GenLayerBiomeEdgeBOP.java index 697191d06..29ade03c8 100644 --- a/src/main/java/biomesoplenty/common/world/layer/GenLayerBiomeEdgeBOP.java +++ b/src/main/java/biomesoplenty/common/world/layer/GenLayerBiomeEdgeBOP.java @@ -42,24 +42,24 @@ public class GenLayerBiomeEdgeBOP extends BOPGenLayer if (this.replaceBiomeEdge(parentVals, out, x, y, areaWidth, biomeId, BOPBiomes.mountain, BOPBiomes.mountain_foothills)) {continue;} // line BOP wasteland with vanilla desert - if (this.replaceBiomeEdge(parentVals, out, x, y, areaWidth, biomeId, BOPBiomes.wasteland, Optional.of(Biomes.desert))) {continue;} + if (this.replaceBiomeEdge(parentVals, out, x, y, areaWidth, biomeId, BOPBiomes.wasteland, Optional.of(Biomes.DESERT))) {continue;} // line extreme hills with extreme hills edge - if (this.replaceBiomeEdgeIfNecessary(parentVals, out, x, y, areaWidth, biomeId, BiomeGenBase.getIdForBiome(Biomes.extremeHills), BiomeGenBase.getIdForBiome(Biomes.extremeHillsEdge))) {continue;} + if (this.replaceBiomeEdgeIfNecessary(parentVals, out, x, y, areaWidth, biomeId, BiomeGenBase.getIdForBiome(Biomes.EXTREME_HILLS), BiomeGenBase.getIdForBiome(Biomes.EXTREME_HILLS_EDGE))) {continue;} // line mesa plateau with mesa - if (this.replaceBiomeEdge(parentVals, out, x, y, areaWidth, biomeId, BiomeGenBase.getIdForBiome(Biomes.mesaPlateau_F), BiomeGenBase.getIdForBiome(Biomes.mesa))) {continue;} - if (this.replaceBiomeEdge(parentVals, out, x, y, areaWidth, biomeId, BiomeGenBase.getIdForBiome(Biomes.mesaPlateau), BiomeGenBase.getIdForBiome(Biomes.mesa))) {continue;} + if (this.replaceBiomeEdge(parentVals, out, x, y, areaWidth, biomeId, BiomeGenBase.getIdForBiome(Biomes.MESA_ROCK), BiomeGenBase.getIdForBiome(Biomes.MESA))) {continue;} + if (this.replaceBiomeEdge(parentVals, out, x, y, areaWidth, biomeId, BiomeGenBase.getIdForBiome(Biomes.MESA_CLEAR_ROCK), BiomeGenBase.getIdForBiome(Biomes.MESA))) {continue;} // line mega taiga with ordinary taiga - if (this.replaceBiomeEdge(parentVals, out, x, y, areaWidth, biomeId, BiomeGenBase.getIdForBiome(Biomes.megaTaiga), BiomeGenBase.getIdForBiome(Biomes.taiga))) {continue;} + if (this.replaceBiomeEdge(parentVals, out, x, y, areaWidth, biomeId, BiomeGenBase.getIdForBiome(Biomes.REDWOOD_TAIGA), BiomeGenBase.getIdForBiome(Biomes.TAIGA))) {continue;} int northBiomeId; int eastBiomeId; int westBiomeId; int southBiomeId; - if (biomeId == BiomeGenBase.getIdForBiome(Biomes.desert)) + if (biomeId == BiomeGenBase.getIdForBiome(Biomes.DESERT)) { // if desert is next to ice plains turn it into extremeGillsPlus (separate the ice and desert with a big mountain) northBiomeId = parentVals[x + 1 + (y + 1 - 1) * (areaWidth + 2)]; @@ -67,16 +67,16 @@ public class GenLayerBiomeEdgeBOP extends BOPGenLayer westBiomeId = parentVals[x + 1 - 1 + (y + 1) * (areaWidth + 2)]; southBiomeId = parentVals[x + 1 + (y + 1 + 1) * (areaWidth + 2)]; - if (northBiomeId != BiomeGenBase.getIdForBiome(Biomes.icePlains) && eastBiomeId != BiomeGenBase.getIdForBiome(Biomes.icePlains) && westBiomeId != BiomeGenBase.getIdForBiome(Biomes.icePlains) && southBiomeId != BiomeGenBase.getIdForBiome(Biomes.icePlains)) + if (northBiomeId != BiomeGenBase.getIdForBiome(Biomes.ICE_PLAINS) && eastBiomeId != BiomeGenBase.getIdForBiome(Biomes.ICE_PLAINS) && westBiomeId != BiomeGenBase.getIdForBiome(Biomes.ICE_PLAINS) && southBiomeId != BiomeGenBase.getIdForBiome(Biomes.ICE_PLAINS)) { out[x + y * areaWidth] = biomeId; } else { - out[x + y * areaWidth] = BiomeGenBase.getIdForBiome(Biomes.extremeHillsPlus); + out[x + y * areaWidth] = BiomeGenBase.getIdForBiome(Biomes.EXTREME_HILLS_WITH_TREES); } } - else if (biomeId == BiomeGenBase.getIdForBiome(Biomes.swampland)) + else if (biomeId == BiomeGenBase.getIdForBiome(Biomes.SWAMPLAND)) { // if swamp is next to desert, cold taiga or ice planes, turn it into plains // if swamp is next to jungle, turn it into jungle edge @@ -85,20 +85,20 @@ public class GenLayerBiomeEdgeBOP extends BOPGenLayer westBiomeId = parentVals[x + 1 - 1 + (y + 1) * (areaWidth + 2)]; southBiomeId = parentVals[x + 1 + (y + 1 + 1) * (areaWidth + 2)]; - if (northBiomeId != BiomeGenBase.getIdForBiome(Biomes.desert) && eastBiomeId != BiomeGenBase.getIdForBiome(Biomes.desert) && westBiomeId != BiomeGenBase.getIdForBiome(Biomes.desert) && southBiomeId != BiomeGenBase.getIdForBiome(Biomes.desert) && northBiomeId != BiomeGenBase.getIdForBiome(Biomes.coldTaiga) && eastBiomeId != BiomeGenBase.getIdForBiome(Biomes.coldTaiga) && westBiomeId != BiomeGenBase.getIdForBiome(Biomes.coldTaiga) && southBiomeId != BiomeGenBase.getIdForBiome(Biomes.coldTaiga) && northBiomeId != BiomeGenBase.getIdForBiome(Biomes.icePlains) && eastBiomeId != BiomeGenBase.getIdForBiome(Biomes.icePlains) && westBiomeId != BiomeGenBase.getIdForBiome(Biomes.icePlains) && southBiomeId != BiomeGenBase.getIdForBiome(Biomes.icePlains)) + if (northBiomeId != BiomeGenBase.getIdForBiome(Biomes.DESERT) && eastBiomeId != BiomeGenBase.getIdForBiome(Biomes.DESERT) && westBiomeId != BiomeGenBase.getIdForBiome(Biomes.DESERT) && southBiomeId != BiomeGenBase.getIdForBiome(Biomes.DESERT) && northBiomeId != BiomeGenBase.getIdForBiome(Biomes.COLD_TAIGA) && eastBiomeId != BiomeGenBase.getIdForBiome(Biomes.COLD_TAIGA) && westBiomeId != BiomeGenBase.getIdForBiome(Biomes.COLD_TAIGA) && southBiomeId != BiomeGenBase.getIdForBiome(Biomes.COLD_TAIGA) && northBiomeId != BiomeGenBase.getIdForBiome(Biomes.ICE_PLAINS) && eastBiomeId != BiomeGenBase.getIdForBiome(Biomes.ICE_PLAINS) && westBiomeId != BiomeGenBase.getIdForBiome(Biomes.ICE_PLAINS) && southBiomeId != BiomeGenBase.getIdForBiome(Biomes.ICE_PLAINS)) { - if (northBiomeId != BiomeGenBase.getIdForBiome(Biomes.jungle) && southBiomeId != BiomeGenBase.getIdForBiome(Biomes.jungle) && eastBiomeId != BiomeGenBase.getIdForBiome(Biomes.jungle) && westBiomeId != BiomeGenBase.getIdForBiome(Biomes.jungle)) + if (northBiomeId != BiomeGenBase.getIdForBiome(Biomes.JUNGLE) && southBiomeId != BiomeGenBase.getIdForBiome(Biomes.JUNGLE) && eastBiomeId != BiomeGenBase.getIdForBiome(Biomes.JUNGLE) && westBiomeId != BiomeGenBase.getIdForBiome(Biomes.JUNGLE)) { out[x + y * areaWidth] = biomeId; } else { - out[x + y * areaWidth] = BiomeGenBase.getIdForBiome(Biomes.jungleEdge); + out[x + y * areaWidth] = BiomeGenBase.getIdForBiome(Biomes.JUNGLE_EDGE); } } else { - out[x + y * areaWidth] = BiomeGenBase.getIdForBiome(Biomes.plains); + out[x + y * areaWidth] = BiomeGenBase.getIdForBiome(Biomes.PLAINS); } } else diff --git a/src/main/java/biomesoplenty/common/world/layer/GenLayerBiomeIslands.java b/src/main/java/biomesoplenty/common/world/layer/GenLayerBiomeIslands.java index 740722627..6d91e3bcc 100644 --- a/src/main/java/biomesoplenty/common/world/layer/GenLayerBiomeIslands.java +++ b/src/main/java/biomesoplenty/common/world/layer/GenLayerBiomeIslands.java @@ -43,7 +43,7 @@ public class GenLayerBiomeIslands extends BOPGenLayer this.initChunkSeed((long)(x + areaX), (long)(z + areaY)); // if it's an ocean, there's a chance of creating an island here - if ((biomeID == BiomeGenBase.getIdForBiome(Biomes.ocean) || biomeID == BiomeGenBase.getIdForBiome(Biomes.deepOcean)) && (this.nextInt(this.islandChance) == 0)) + if ((biomeID == BiomeGenBase.getIdForBiome(Biomes.OCEAN) || biomeID == BiomeGenBase.getIdForBiome(Biomes.DEEP_OCEAN)) && (this.nextInt(this.islandChance) == 0)) { // check that the tile is surrounded by ocean int biomeNorth = biomeIds[x + 1 + (z + 1 - 1) * (areaWidth + 2)]; @@ -51,10 +51,10 @@ public class GenLayerBiomeIslands extends BOPGenLayer int biomeWest = biomeIds[x + 1 - 1 + (z + 1) * (areaWidth + 2)]; int biomeSouth = biomeIds[x + 1 + (z + 1 + 1) * (areaWidth + 2)]; if ( - (biomeNorth == BiomeGenBase.getIdForBiome(Biomes.ocean) || biomeNorth == BiomeGenBase.getIdForBiome(Biomes.deepOcean)) && - (biomeEast == BiomeGenBase.getIdForBiome(Biomes.ocean) || biomeEast == BiomeGenBase.getIdForBiome(Biomes.deepOcean)) && - (biomeWest == BiomeGenBase.getIdForBiome(Biomes.ocean) || biomeWest == BiomeGenBase.getIdForBiome(Biomes.deepOcean)) && - (biomeSouth == BiomeGenBase.getIdForBiome(Biomes.ocean) || biomeSouth == BiomeGenBase.getIdForBiome(Biomes.deepOcean)) + (biomeNorth == BiomeGenBase.getIdForBiome(Biomes.OCEAN) || biomeNorth == BiomeGenBase.getIdForBiome(Biomes.DEEP_OCEAN)) && + (biomeEast == BiomeGenBase.getIdForBiome(Biomes.OCEAN) || biomeEast == BiomeGenBase.getIdForBiome(Biomes.DEEP_OCEAN)) && + (biomeWest == BiomeGenBase.getIdForBiome(Biomes.OCEAN) || biomeWest == BiomeGenBase.getIdForBiome(Biomes.DEEP_OCEAN)) && + (biomeSouth == BiomeGenBase.getIdForBiome(Biomes.OCEAN) || biomeSouth == BiomeGenBase.getIdForBiome(Biomes.DEEP_OCEAN)) ) { int climateVal = climateVals[x + z * areaWidth]; diff --git a/src/main/java/biomesoplenty/common/world/layer/GenLayerRiverMixBOP.java b/src/main/java/biomesoplenty/common/world/layer/GenLayerRiverMixBOP.java index c6280f7f0..248668000 100644 --- a/src/main/java/biomesoplenty/common/world/layer/GenLayerRiverMixBOP.java +++ b/src/main/java/biomesoplenty/common/world/layer/GenLayerRiverMixBOP.java @@ -44,21 +44,21 @@ public class GenLayerRiverMixBOP extends BOPGenLayer for (int i = 0; i < areaWidth * areaHeight; ++i) { - if (biomeIds[i] != BiomeGenBase.getIdForBiome(Biomes.frozenOcean) && biomeIds[i] != BiomeGenBase.getIdForBiome(Biomes.ocean) && biomeIds[i] != BiomeGenBase.getIdForBiome(Biomes.deepOcean) && biomeSupportsRivers(biomeIds[i])) + if (biomeIds[i] != BiomeGenBase.getIdForBiome(Biomes.FROZEN_OCEAN) && biomeIds[i] != BiomeGenBase.getIdForBiome(Biomes.OCEAN) && biomeIds[i] != BiomeGenBase.getIdForBiome(Biomes.DEEP_OCEAN) && biomeSupportsRivers(biomeIds[i])) { - if (riverValues[i] == BiomeGenBase.getIdForBiome(Biomes.river)) + if (riverValues[i] == BiomeGenBase.getIdForBiome(Biomes.RIVER)) { - if (biomeIds[i] == BiomeGenBase.getIdForBiome(Biomes.icePlains) || (BOPBiomes.snowy_forest.isPresent() && biomeIds[i] == BiomeGenBase.getIdForBiome(BOPBiomes.snowy_forest.get())) || (BOPBiomes.alps.isPresent() && biomeIds[i] == BiomeGenBase.getIdForBiome(BOPBiomes.alps.get()))) + if (biomeIds[i] == BiomeGenBase.getIdForBiome(Biomes.ICE_PLAINS) || (BOPBiomes.snowy_forest.isPresent() && biomeIds[i] == BiomeGenBase.getIdForBiome(BOPBiomes.snowy_forest.get())) || (BOPBiomes.alps.isPresent() && biomeIds[i] == BiomeGenBase.getIdForBiome(BOPBiomes.alps.get()))) { - out[i] = BiomeGenBase.getIdForBiome(Biomes.frozenRiver); + out[i] = BiomeGenBase.getIdForBiome(Biomes.FROZEN_RIVER); } - else if (biomeIds[i] != BiomeGenBase.getIdForBiome(Biomes.mushroomIsland) && biomeIds[i] != BiomeGenBase.getIdForBiome(Biomes.mushroomIslandShore)) + else if (biomeIds[i] != BiomeGenBase.getIdForBiome(Biomes.MUSHROOM_ISLAND) && biomeIds[i] != BiomeGenBase.getIdForBiome(Biomes.MUSHROOM_ISLAND_SHORE)) { out[i] = riverValues[i] & 255; } else { - out[i] = BiomeGenBase.getIdForBiome(Biomes.mushroomIslandShore); + out[i] = BiomeGenBase.getIdForBiome(Biomes.MUSHROOM_ISLAND_SHORE); } } else diff --git a/src/main/java/biomesoplenty/common/world/layer/GenLayerShoreBOP.java b/src/main/java/biomesoplenty/common/world/layer/GenLayerShoreBOP.java index 0f0ebd8f9..bcdd3eafe 100644 --- a/src/main/java/biomesoplenty/common/world/layer/GenLayerShoreBOP.java +++ b/src/main/java/biomesoplenty/common/world/layer/GenLayerShoreBOP.java @@ -42,9 +42,9 @@ public class GenLayerShoreBOP extends BOPGenLayer int biomeId = biomeIds[x + 1 + (z + 1) * (areaWidth + 2)]; BiomeGenBase biome = BiomeGenBase.getBiome(biomeId); - if (biomeId == BiomeGenBase.getIdForBiome(Biomes.mushroomIsland)) + if (biomeId == BiomeGenBase.getIdForBiome(Biomes.MUSHROOM_ISLAND)) { - setBiomeWithAdjacent(biomeIds, out, x, z, areaWidth, biomeId, BiomeGenBase.getIdForBiome(Biomes.mushroomIslandShore), OCEAN_PREDICATE); + setBiomeWithAdjacent(biomeIds, out, x, z, areaWidth, biomeId, BiomeGenBase.getIdForBiome(Biomes.MUSHROOM_ISLAND_SHORE), OCEAN_PREDICATE); } else if (biome != null && biome.getBiomeClass() == BiomeGenJungle.class) { @@ -56,25 +56,25 @@ public class GenLayerShoreBOP extends BOPGenLayer //Ensure the biomes surrounding the jungle are all suitable before generating a beach if (JUNGLE_BORDER_PREDICATE.apply(biomeNorth) && JUNGLE_BORDER_PREDICATE.apply(biomeEast) && JUNGLE_BORDER_PREDICATE.apply(biomeWest) && JUNGLE_BORDER_PREDICATE.apply(biomeSouth)) { - setBiomeWithAdjacent(biomeIds, out, x, z, areaWidth, biomeId, BiomeGenBase.getIdForBiome(Biomes.beach), OCEANIC_PREDICATE); + setBiomeWithAdjacent(biomeIds, out, x, z, areaWidth, biomeId, BiomeGenBase.getIdForBiome(Biomes.BEACH), OCEANIC_PREDICATE); } else //There is a non-jungle/ocean/taiga/forest next to the jungle, generate an edge biome { - out[x + z * areaWidth] = BiomeGenBase.getIdForBiome(Biomes.jungleEdge); + out[x + z * areaWidth] = BiomeGenBase.getIdForBiome(Biomes.JUNGLE_EDGE); } } - else if (biomeId != BiomeGenBase.getIdForBiome(Biomes.extremeHills) && biomeId != BiomeGenBase.getIdForBiome(Biomes.extremeHillsPlus) && biomeId != BiomeGenBase.getIdForBiome(Biomes.extremeHillsEdge)) + else if (biomeId != BiomeGenBase.getIdForBiome(Biomes.EXTREME_HILLS) && biomeId != BiomeGenBase.getIdForBiome(Biomes.EXTREME_HILLS_WITH_TREES) && biomeId != BiomeGenBase.getIdForBiome(Biomes.EXTREME_HILLS_EDGE)) { if (biome != null && biome.isSnowyBiome()) //Snowy biomes should have cold beaches { //Frozen ocean should not have a beach if (isBiomeOceanic(biomeId)) out[x + z * areaWidth] = biomeId; else - setBiomeWithAdjacent(biomeIds, out, x, z, areaWidth, biomeId, BiomeGenBase.getIdForBiome(Biomes.coldBeach), OCEANIC_PREDICATE); + setBiomeWithAdjacent(biomeIds, out, x, z, areaWidth, biomeId, BiomeGenBase.getIdForBiome(Biomes.COLD_BEACH), OCEANIC_PREDICATE); } - else if (biomeId != BiomeGenBase.getIdForBiome(Biomes.mesa) && biomeId != BiomeGenBase.getIdForBiome(Biomes.mesaPlateau_F)) + else if (biomeId != BiomeGenBase.getIdForBiome(Biomes.MESA) && biomeId != BiomeGenBase.getIdForBiome(Biomes.MESA_ROCK)) { - if (biomeId != BiomeGenBase.getIdForBiome(Biomes.ocean) && biomeId != BiomeGenBase.getIdForBiome(Biomes.deepOcean) && biomeId != BiomeGenBase.getIdForBiome(Biomes.river) && biomeId != BiomeGenBase.getIdForBiome(Biomes.swampland)) + if (biomeId != BiomeGenBase.getIdForBiome(Biomes.OCEAN) && biomeId != BiomeGenBase.getIdForBiome(Biomes.DEEP_OCEAN) && biomeId != BiomeGenBase.getIdForBiome(Biomes.RIVER) && biomeId != BiomeGenBase.getIdForBiome(Biomes.SWAMPLAND)) { //Generate custom beaches for our biomes if (biome != null && BOPBiomes.REG_INSTANCE.getExtendedBiome(biome) != null) @@ -85,7 +85,7 @@ public class GenLayerShoreBOP extends BOPGenLayer } else { - setBiomeWithAdjacent(biomeIds, out, x, z, areaWidth, biomeId, BiomeGenBase.getIdForBiome(Biomes.beach), OCEANIC_PREDICATE); + setBiomeWithAdjacent(biomeIds, out, x, z, areaWidth, biomeId, BiomeGenBase.getIdForBiome(Biomes.BEACH), OCEANIC_PREDICATE); } } else //Biome is watery, don't put any beaches next to it @@ -104,7 +104,7 @@ public class GenLayerShoreBOP extends BOPGenLayer if (!isBiomeOceanic(biomeNorth) && !isBiomeOceanic(biomeEast) && !isBiomeOceanic(biomeWest) && !isBiomeOceanic(biomeSouth)) { //If at least one of the surrounding biomes is a non-mesa, set it to desert - setBiomeWithAdjacent(biomeIds, out, x, z, areaWidth, biomeId, BiomeGenBase.getIdForBiome(Biomes.desert), MESA_PREDICATE); + setBiomeWithAdjacent(biomeIds, out, x, z, areaWidth, biomeId, BiomeGenBase.getIdForBiome(Biomes.DESERT), MESA_PREDICATE); } else { @@ -114,7 +114,7 @@ public class GenLayerShoreBOP extends BOPGenLayer } else //Biome is a variant of the extreme hills { - this.setBiomeWithAdjacent(biomeIds, out, x, z, areaWidth, biomeId, BiomeGenBase.getIdForBiome(Biomes.stoneBeach), OCEANIC_PREDICATE); + this.setBiomeWithAdjacent(biomeIds, out, x, z, areaWidth, biomeId, BiomeGenBase.getIdForBiome(Biomes.STONE_BEACH), OCEANIC_PREDICATE); } } } @@ -144,7 +144,7 @@ public class GenLayerShoreBOP extends BOPGenLayer @Override public boolean apply(Integer input) { - return input == BiomeGenBase.getIdForBiome(Biomes.ocean); + return input == BiomeGenBase.getIdForBiome(Biomes.OCEAN); } }; @@ -162,7 +162,7 @@ public class GenLayerShoreBOP extends BOPGenLayer @Override public boolean apply(Integer input) { - return BiomeGenBase.getBiome(input) != null && BiomeGenBase.getBiome(input).getBiomeClass() == BiomeGenJungle.class ? true : input == BiomeGenBase.getIdForBiome(Biomes.jungleEdge) || input == BiomeGenBase.getIdForBiome(Biomes.jungle) || input == BiomeGenBase.getIdForBiome(Biomes.jungleHills) || input == BiomeGenBase.getIdForBiome(Biomes.forest) || input == BiomeGenBase.getIdForBiome(Biomes.taiga) || isBiomeOceanic(input); + return BiomeGenBase.getBiome(input) != null && BiomeGenBase.getBiome(input).getBiomeClass() == BiomeGenJungle.class ? true : input == BiomeGenBase.getIdForBiome(Biomes.JUNGLE_EDGE) || input == BiomeGenBase.getIdForBiome(Biomes.JUNGLE) || input == BiomeGenBase.getIdForBiome(Biomes.JUNGLE_HILLS) || input == BiomeGenBase.getIdForBiome(Biomes.FOREST) || input == BiomeGenBase.getIdForBiome(Biomes.TAIGA) || isBiomeOceanic(input); } }; diff --git a/src/main/java/biomesoplenty/core/ClientProxy.java b/src/main/java/biomesoplenty/core/ClientProxy.java index 0766d8b97..b0cbb185b 100644 --- a/src/main/java/biomesoplenty/core/ClientProxy.java +++ b/src/main/java/biomesoplenty/core/ClientProxy.java @@ -8,10 +8,6 @@ package biomesoplenty.core; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - import biomesoplenty.api.block.IBOPBlock; import biomesoplenty.api.item.BOPItems; import biomesoplenty.api.item.IColoredItem; @@ -20,20 +16,12 @@ import biomesoplenty.client.particle.EntityPixieTrailFX; import biomesoplenty.client.particle.EntityTrailFX; import biomesoplenty.client.texture.ForgeRedirectedResourcePack; import biomesoplenty.common.config.MiscConfigurationHandler; -import biomesoplenty.common.entities.EntityButterfly; -import biomesoplenty.common.entities.EntityPixie; -import biomesoplenty.common.entities.EntitySnail; -import biomesoplenty.common.entities.EntityWasp; -import biomesoplenty.common.entities.RenderButterfly; -import biomesoplenty.common.entities.RenderPixie; -import biomesoplenty.common.entities.RenderSnail; -import biomesoplenty.common.entities.RenderWasp; +import biomesoplenty.common.entities.*; import biomesoplenty.common.entities.projectiles.EntityDart; import biomesoplenty.common.entities.projectiles.EntityMudball; import biomesoplenty.common.entities.projectiles.RenderDart; import biomesoplenty.common.entities.projectiles.RenderMudball; import biomesoplenty.common.util.inventory.CreativeTabBOP; - import com.google.common.collect.Lists; import net.minecraft.block.Block; import net.minecraft.block.properties.IProperty; @@ -64,6 +52,10 @@ import net.minecraftforge.fml.client.registry.RenderingRegistry; import net.minecraftforge.fml.common.FMLCommonHandler; import net.minecraftforge.fml.relauncher.ReflectionHelper; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + public class ClientProxy extends CommonProxy { public static ResourceLocation[] bopTitlePanoramaPaths = new ResourceLocation[] {new ResourceLocation("biomesoplenty:textures/gui/title/background/panorama_0.png"), new ResourceLocation("biomesoplenty:textures/gui/title/background/panorama_1.png"), new ResourceLocation("biomesoplenty:textures/gui/title/background/panorama_2.png"), new ResourceLocation("biomesoplenty:textures/gui/title/background/panorama_3.png"), new ResourceLocation("biomesoplenty:textures/gui/title/background/panorama_4.png"), new ResourceLocation("biomesoplenty:textures/gui/title/background/panorama_5.png")}; @@ -76,7 +68,7 @@ public class ClientProxy extends CommonProxy public void registerRenderers() { if (MiscConfigurationHandler.overrideTitlePanorama) - GuiMainMenu.titlePanoramaPaths = bopTitlePanoramaPaths; + GuiMainMenu.TITLE_PANORAMA_PATHS = bopTitlePanoramaPaths; //Entity rendering and other stuff will go here in future registerEntityRenderer(EntityDart.class, RenderDart.class);