Skip to content

Commit

Permalink
Fixin' all yo shit.
Browse files Browse the repository at this point in the history
-Added Cobblestone Stairs for each Stone type.
-Minestrapp Ores now have variants for each Stone type.
-Fixed Moss cutting recipes for the new Stone types only giving 1 per
cut.
-Stone-based structures (such as Villages, Dungeons, Strongholds, etc)
now generate out of the same stone type as the biome they generated in.
-Made Sunstone Ore generate a bit more commonly.
  • Loading branch information
Delocuro committed Sep 21, 2014
1 parent deca770 commit 9bb8796
Show file tree
Hide file tree
Showing 20 changed files with 293 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public class Minestrappolation extends BaseMod

public static MelterRecipeLoader melter = new MelterRecipeLoader("melter");

public static OreBase stone = new OreBase("stone").setIconName(MAssetManager.getStonecutterTexture("stone")).register(OreBase.TYPE_OVERWORLD, 0);
public static OreBase deepStone = new OreBase("deepstone").setIconName(MAssetManager.getStonecutterTexture("deepstone")).register(OreBase.TYPE_OVERWORLD, 5);
public static OreBase redrock = new OreBase("redrock").setIconName(MAssetManager.getStonecutterTexture("redrock")).register(OreBase.TYPE_OVERWORLD, 6);
public static OreBase deepRedrock = new OreBase("deepredrock").setIconName(MAssetManager.getStonecutterTexture("deepredrock")).register(OreBase.TYPE_OVERWORLD, 7);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;

public class BlockPlutoniumOre extends BlockRadiation
public class BlockPlutoniumOre extends BlockRadiationOre
{
public BlockPlutoniumOre(Material material)
public BlockPlutoniumOre()
{
super(material);

}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
package minestrapteam.minestrappolation.block;

import java.util.List;
import java.util.Random;

import clashsoft.cslib.minecraft.block.ore.BlockOre2;
import clashsoft.cslib.minecraft.block.ore.OreBase;

import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.World;

public abstract class BlockRadiationOre extends BlockOre2
{
protected BlockRadiationOre()
{
super(OreBase.TYPE_OVERWORLD);
}

@Override
public void onBlockAdded(World random, int x, int y, int z)
{
random.scheduleBlockUpdate(x, y, z, this, 1);
}

@Override
public void updateTick(World world, int x, int y, int z, Random random)
{
if (!world.isRemote)
{
world.scheduleBlockUpdate(x, y, z, this, 1);

float range = this.getRange();
AxisAlignedBB axisalignedbb = this.getCollisionBoundingBoxFromPool(world, x, y, z).expand(range, range, range);
List<EntityLivingBase> list = world.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb);

for (EntityLivingBase living : list)
{
this.addPotionEffect(living);
}
}
}

public abstract void addPotionEffect(EntityLivingBase living);

public abstract float getRange();
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import java.util.Random;

import clashsoft.cslib.minecraft.block.ore.OreBase;

import minestrapteam.minestrappolation.Minestrappolation;
import minestrapteam.minestrappolation.lib.MItems;
import minestrapteam.minestrappolation.util.MUtil;
Expand All @@ -16,11 +18,11 @@
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;

public class BlockUraniumOre extends BlockRadiation
public class BlockUraniumOre extends BlockRadiationOre
{
public BlockUraniumOre(Material material)
public BlockUraniumOre()
{
super(material);

}

@Override
Expand Down
13 changes: 11 additions & 2 deletions src/main/java/minestrapteam/minestrappolation/block/MBlockOre.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

import java.util.Random;

import clashsoft.cslib.minecraft.block.ore.BlockOre2;
import clashsoft.cslib.minecraft.block.ore.OreBase;

import minestrapteam.minestrappolation.lib.MBlocks;
import minestrapteam.minestrappolation.lib.MItems;

Expand All @@ -11,11 +14,11 @@
import net.minecraft.world.IBlockAccess;

// FIXME extends BlockOre2
public class MBlockOre extends Block
public class MBlockOre extends BlockOre2
{
public MBlockOre()
{
super(Material.rock);
super(OreBase.TYPE_OVERWORLD);
}

@Override
Expand Down Expand Up @@ -43,6 +46,12 @@ else if (this == MBlocks.radiantQuartzOre)
return Item.getItemFromBlock(this);
}

@Override
public int damageDropped(int metadata)
{
return metadata;
}

@Override
protected boolean canSilkHarvest()
{
Expand Down

Large diffs are not rendered by default.

22 changes: 20 additions & 2 deletions src/main/java/minestrapteam/minestrappolation/lib/MBlocks.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,54 +56,63 @@ public class MBlocks
public static Block deepstoneStairsRaw;
public static Block deepstoneStairsBricks;
public static Block deepstoneStairsTiles;
public static Block deepstoneStairsCracked;
public static Block deepstone2;

public static MBlockCustom redrock;
public static Block redrockStairsRaw;
public static Block redrockStairsBricks;
public static Block redrockStairsTiles;
public static Block redrockStairsCracked;
public static Block redrock2;

public static MBlockCustom deepRedrock;
public static Block deepRedrockStairsRaw;
public static Block deepRedrockStairsBricks;
public static Block deepRedrockStairsTiles;
public static Block deepRedrockStairsCracked;
public static Block deepRedrock2;

public static MBlockCustom coldstone;
public static Block coldstoneStairsRaw;
public static Block coldstoneStairsBricks;
public static Block coldstoneStairsTiles;
public static Block coldstoneStairsCracked;
public static Block coldstone2;

public static MBlockCustom deepColdstone;
public static Block deepColdstoneStairsRaw;
public static Block deepColdstoneStairsBricks;
public static Block deepColdstoneStairsTiles;
public static Block deepColdstoneStairsCracked;
public static Block deepColdstone2;

public static MBlockCustom icestone;
public static Block icestoneStairsRaw;
public static Block icestoneStairsBricks;
public static Block icestoneStairsTiles;
public static Block icestoneStairsCracked;
public static Block icestone2;

public static MBlockCustom glacierrock;
public static Block glacierrockStairsRaw;
public static Block glacierrockStairsBricks;
public static Block glacierrockStairsTiles;
public static Block glacierrockStairsCracked;
public static Block glacierrock2;

public static MBlockCustom oceanstone;
public static Block oceanstoneStairsRaw;
public static Block oceanstoneStairsBricks;
public static Block oceanstoneStairsTiles;
public static Block oceanstoneStairsCracked;
public static Block oceanstone2;

public static MBlockCustom pressurizedOceanstone;
public static Block pressurizedOceanstoneStairsRaw;
public static Block pressurizedOceanstoneStairsBricks;
public static Block pressurizedOceanstoneStairsTiles;
public static Block pressurizedOceanstoneStairsCracked;
public static Block pressurizedOceanstone2;

public static MBlockCustom graniteSlate;
Expand Down Expand Up @@ -401,8 +410,8 @@ public static void init()
copperOre = new MBlockOre().setHardness(3F).setResistance(5F).setStepSound(Block.soundTypeStone).setCreativeTab(Minestrappolation.tabBuildingBlocks).setBlockTextureName(MAssetManager.getMineralTexture("copper_ore"));
tinOre = new MBlockOre().setHardness(3F).setResistance(4F).setStepSound(Block.soundTypeStone).setCreativeTab(Minestrappolation.tabBuildingBlocks).setBlockTextureName(MAssetManager.getMineralTexture("tin_ore"));
titaniumOre = new MBlockOre().setHardness(6F).setResistance(6000000.0F).setStepSound(Block.soundTypeStone).setCreativeTab(Minestrappolation.tabBuildingBlocks).setBlockTextureName(MAssetManager.getMineralTexture("titanium_ore"));
uraniumOre = new BlockUraniumOre(Material.rock).setHardness(3F).setResistance(5F).setStepSound(Block.soundTypeStone).setCreativeTab(Minestrappolation.tabBuildingBlocks).setBlockTextureName(MAssetManager.getMineralTexture("uranium_ore"));
plutoniumOre = new BlockPlutoniumOre(Material.rock).setHardness(3F).setResistance(5F).setStepSound(Block.soundTypeStone).setCreativeTab(Minestrappolation.tabBuildingBlocks).setBlockTextureName(MAssetManager.getMineralTexture("plutonium_ore"));
uraniumOre = new BlockUraniumOre().setHardness(3F).setResistance(5F).setStepSound(Block.soundTypeStone).setCreativeTab(Minestrappolation.tabBuildingBlocks).setBlockTextureName(MAssetManager.getMineralTexture("uranium_ore"));
plutoniumOre = new BlockPlutoniumOre().setHardness(3F).setResistance(5F).setStepSound(Block.soundTypeStone).setCreativeTab(Minestrappolation.tabBuildingBlocks).setBlockTextureName(MAssetManager.getMineralTexture("plutonium_ore"));
meuroditeOre = new MBlockOre().setHardness(3F).setResistance(5F).setStepSound(Block.soundTypeStone).setCreativeTab(Minestrappolation.tabBuildingBlocks).setBlockTextureName(MAssetManager.getMineralTexture("meurodite_ore"));
sunstoneOre = new BlockSunstoneOre().setHardness(3F).setResistance(5F).setStepSound(Block.soundTypeStone).setCreativeTab(Minestrappolation.tabBuildingBlocks).setBlockTextureName(MAssetManager.getMineralTexture("sunstone_ore"));
toriteOre = new MBlockOre().setHardness(3F).setResistance(5F).setStepSound(Block.soundTypeStone).setCreativeTab(Minestrappolation.tabBuildingBlocks).setBlockTextureName(MAssetManager.getMineralTexture("torite_ore"));
Expand Down Expand Up @@ -680,46 +689,55 @@ private static void addStoneBlocks()
deepstoneStairsRaw = MBlockHelper.createStoneStair(deepstone, 0, tab);
deepstoneStairsBricks = MBlockHelper.createStoneStair(deepstone, 1, tab);
deepstoneStairsTiles = MBlockHelper.createStoneStair(deepstone, 3, tab);
deepstoneStairsCracked = MBlockHelper.createStoneStair(deepstone, 7, tab);
redrock = MBlockHelper.createStoneBlock(types_redrock, "redrock", 1.1F, 8.0F, 0, tab).setIsStone().setRoadWalkSpeed(1.25F);
redrock2 = MBlockHelper.createStoneBlock2(types_redrock_2, "redrock", 1.1F, 8.0F, 0, tab);
redrockStairsRaw = MBlockHelper.createStoneStair(redrock, 0, tab);
redrockStairsBricks = MBlockHelper.createStoneStair(redrock, 1, tab);
redrockStairsTiles = MBlockHelper.createStoneStair(redrock, 3, tab);
redrockStairsCracked = MBlockHelper.createStoneStair(redrock, 7, tab);
deepRedrock = MBlockHelper.createStoneBlock(types_redrock, "deepredrock", 2.2F, 11.0F, 2, tab).setIsStone().setRoadWalkSpeed(1.25F);
deepRedrock2 = MBlockHelper.createStoneBlock2(types_redrock_2, "deepredrock", 2.2F, 11.0F, 2, tab);
deepRedrockStairsRaw = MBlockHelper.createStoneStair(deepRedrock, 0, tab);
deepRedrockStairsBricks = MBlockHelper.createStoneStair(deepRedrock, 1, tab);
deepRedrockStairsTiles = MBlockHelper.createStoneStair(deepRedrock, 3, tab);
deepRedrockStairsCracked = MBlockHelper.createStoneStair(deepRedrock, 7, tab);
coldstone = MBlockHelper.createStoneBlock(types_redrock, "coldstone", 1.5F, 10.0F, 0, tab).setIsStone().setRoadWalkSpeed(1.25F);
coldstone2 = MBlockHelper.createStoneBlock2(types_redrock_2, "coldstone", 1.5F, 10.0F, 0, tab);
coldstoneStairsRaw = MBlockHelper.createStoneStair(coldstone, 0, tab);
coldstoneStairsBricks = MBlockHelper.createStoneStair(coldstone, 1, tab);
coldstoneStairsTiles = MBlockHelper.createStoneStair(coldstone, 3, tab);
coldstoneStairsCracked = MBlockHelper.createStoneStair(coldstone, 7, tab);
deepColdstone = MBlockHelper.createStoneBlock(types_redrock, "deepcoldstone", 3F, 13.0F, 2, tab).setIsStone().setRoadWalkSpeed(1.25F);
deepColdstone2 = MBlockHelper.createStoneBlock2(types_redrock_2, "deepcoldstone", 3F, 13.0F, 2, tab);
deepColdstoneStairsRaw = MBlockHelper.createStoneStair(deepColdstone, 0, tab);
deepColdstoneStairsBricks = MBlockHelper.createStoneStair(deepColdstone, 1, tab);
deepColdstoneStairsTiles = MBlockHelper.createStoneStair(deepColdstone, 3, tab);
deepColdstoneStairsCracked = MBlockHelper.createStoneStair(deepColdstone, 7, tab);
icestone = MBlockHelper.createStoneBlock(types_icestone, "icestone", 1.7F, 10.0F, 0, tab).setIsStone().setRoadWalkSpeed(1.25F);
icestone2 = MBlockHelper.createStoneBlock2(types_icestone_2, "icestone", 1.7F, 10.0F, 0, tab);
icestoneStairsRaw = MBlockHelper.createStoneStair(icestone, 0, tab);
icestoneStairsBricks = MBlockHelper.createStoneStair(icestone, 1, tab);
icestoneStairsTiles = MBlockHelper.createStoneStair(icestone, 3, tab);
icestoneStairsCracked = MBlockHelper.createStoneStair(icestone, 7, tab);
glacierrock = MBlockHelper.createStoneBlock(types_icestone, "glacierrock", 3.4F, 13.0F, 2, tab).setIsStone().setRoadWalkSpeed(1.25F);
glacierrock2 = MBlockHelper.createStoneBlock2(types_icestone_2, "glacierrock", 3.4F, 13.0F, 2, tab);
glacierrockStairsRaw = MBlockHelper.createStoneStair(glacierrock, 0, tab);
glacierrockStairsBricks = MBlockHelper.createStoneStair(glacierrock, 1, tab);
glacierrockStairsTiles = MBlockHelper.createStoneStair(glacierrock, 3, tab);
glacierrockStairsCracked = MBlockHelper.createStoneStair(glacierrock, 7, tab);
oceanstone = MBlockHelper.createStoneBlock(types_redrock, "oceanstone", 1.3F, 12.0F, 0, tab).setIsStone().setRoadWalkSpeed(1.25F);
oceanstone2 = MBlockHelper.createStoneBlock2(types_redrock_2, "oceanstone", 1.3F, 12.0F, 0, tab);
oceanstoneStairsRaw = MBlockHelper.createStoneStair(oceanstone, 0, tab);
oceanstoneStairsBricks = MBlockHelper.createStoneStair(oceanstone, 1, tab);
oceanstoneStairsTiles = MBlockHelper.createStoneStair(oceanstone, 3, tab);
oceanstoneStairsCracked = MBlockHelper.createStoneStair(oceanstone, 7, tab);
pressurizedOceanstone = MBlockHelper.createStoneBlock(types_redrock, "pressurizedoceanstone", 2.6F, 15.0F, 2, tab).setIsStone().setRoadWalkSpeed(1.25F);
pressurizedOceanstone2 = MBlockHelper.createStoneBlock2(types_redrock_2, "pressurizedoceanstone", 2.6F, 15.0F, 2, tab);
pressurizedOceanstoneStairsRaw = MBlockHelper.createStoneStair(pressurizedOceanstone, 0, tab);
pressurizedOceanstoneStairsBricks = MBlockHelper.createStoneStair(pressurizedOceanstone, 1, tab);
pressurizedOceanstoneStairsTiles = MBlockHelper.createStoneStair(pressurizedOceanstone, 3, tab);
pressurizedOceanstoneStairsCracked = MBlockHelper.createStoneStair(pressurizedOceanstone, 7, tab);

graniteSlate = MBlockHelper.createStoneBlock(types_granite, "granite", 2F, 15.0F, 0, tab).setRoadWalkSpeed(1.33F);
graniteSlate2 = MBlockHelper.createStoneBlock2("granite", 2F, 15.0F, 0, tab);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import minestrapteam.minestrappolation.world.gen.WorldGenDesertQuartz;
import minestrapteam.minestrappolation.world.gen.WorldGenRedSandstone;
import minestrapteam.minestrappolation.world.gen.WorldGenRedWoodTreeSmall;
import minestrapteam.minestrappolation.world.gen.WorldGenStructureStone;

import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
Expand Down Expand Up @@ -41,6 +42,7 @@ public class MOreGenerator implements IWorldGenerator
public static WorldGenMinable sandstoneGen = new WorldGenMinable(MBlocks.sandstone, 6, 7, Blocks.sandstone);
public static WorldGenMinable sandstoneGen2 = new WorldGenMinable(MBlocks.sandstone, 7, 7, Blocks.sandstone);
public static WorldGenRedSandstone redSandstoneGen = new WorldGenRedSandstone();
public static WorldGenStructureStone stoneStructureGen = new WorldGenStructureStone();
public static WorldGenDesertQuartz desertQuartzGen = new WorldGenDesertQuartz();
public static WorldGenMinable blaziumGen = new WorldGenMinable(MBlocks.blaziumOre, 8, Blocks.netherrack);
public static WorldGenMinable soulOreGen = new WorldGenMinable(MBlocks.soulOre, 15, Blocks.soul_sand);
Expand Down Expand Up @@ -172,7 +174,7 @@ public void generateSurface(World world, Random rand, int chunkX, int chunkZ)
}

// Sunstone Ore
for (int i = 0; i < 10; i++)
for (int i = 0; i < 15; i++)
{
x1 = chunkX + rand.nextInt(16);
y1 = rand.nextInt(256);
Expand Down Expand Up @@ -204,6 +206,14 @@ public void generateSurface(World world, Random rand, int chunkX, int chunkZ)
}
}

//Structure Gen

x1 = chunkX + rand.nextInt(16);
y1 = rand.nextInt(256);
z1 = chunkZ + rand.nextInt(16);
stoneStructureGen.generate(world, rand, x1, y1, z1);


// Red Sandstone
if (biome instanceof BiomeGenMesa)
{
Expand Down
Loading

0 comments on commit 9bb8796

Please sign in to comment.