Skip to content
This repository has been archived by the owner on Aug 22, 2019. It is now read-only.

Commit

Permalink
I'm finally finished!
Browse files Browse the repository at this point in the history
  • Loading branch information
Noah Jelen committed Sep 20, 2018
1 parent e8aefd2 commit b90f9cc
Show file tree
Hide file tree
Showing 118 changed files with 3,007 additions and 2,274 deletions.
8 changes: 7 additions & 1 deletion changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,12 @@
Optimized ore generation

1.3.1:
Attempted to optimize cave generation
Optimized cave generation (it should cause less lag now)
Ore cystals no longer generate in ocean biomes
Optimized structure generation
Buried Treasure will now generate 2 meters under grass instead of deep underground
Added Underground Air (mod internal use only)
Added formations to caves and the nether
Added prismarine Crystal Block
Crystals now generate in bunches in caves
Added lava pockets in the deep underground
76 changes: 52 additions & 24 deletions src/main/java/com/NetherNoah/ParadiseMod/ParadiseMod.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import com.NetherNoah.ParadiseMod.creativeTabs.ChristmasTab;
import com.NetherNoah.ParadiseMod.handlers.AntiMobLampHandler;
import com.NetherNoah.ParadiseMod.handlers.CaveGenHandler;
import com.NetherNoah.ParadiseMod.handlers.CustomCraftBenchGuiHandler;
import com.NetherNoah.ParadiseMod.handlers.Events;
import com.NetherNoah.ParadiseMod.handlers.OreDictHandler;
Expand Down Expand Up @@ -37,6 +36,14 @@
import com.NetherNoah.ParadiseMod.tileentity.hopper.TileEntityGoldHopper;
import com.NetherNoah.ParadiseMod.tileentity.hopper.TileEntitySilverHopper;
import com.NetherNoah.ParadiseMod.world.dimension.DimensionRegistry;
import com.NetherNoah.ParadiseMod.world.worldgen.caveGen.CaveGenBase;
import com.NetherNoah.ParadiseMod.world.worldgen.caveGen.CaveGenCrystal;
import com.NetherNoah.ParadiseMod.world.worldgen.caveGen.CaveGenDesert;
import com.NetherNoah.ParadiseMod.world.worldgen.caveGen.CaveGenHumid;
import com.NetherNoah.ParadiseMod.world.worldgen.caveGen.CaveGenIcy;
import com.NetherNoah.ParadiseMod.world.worldgen.caveGen.CaveGenMesa;
import com.NetherNoah.ParadiseMod.world.worldgen.caveGen.CaveGenMushroomIsland;
import com.NetherNoah.ParadiseMod.world.worldgen.caveGen.CaveGenOcean;
import com.NetherNoah.ParadiseMod.world.worldgen.misc.DUTrees;
import com.NetherNoah.ParadiseMod.world.worldgen.misc.DirtGen;
import com.NetherNoah.ParadiseMod.world.worldgen.misc.Rose;
Expand All @@ -45,7 +52,6 @@
import com.NetherNoah.ParadiseMod.world.worldgen.ores.OreGenOverworld;
import com.NetherNoah.ParadiseMod.world.worldgen.structures.Buoy;
import com.NetherNoah.ParadiseMod.world.worldgen.structures.EasterEgg;
import com.NetherNoah.ParadiseMod.world.worldgen.structures.EasterEgg2;
import com.NetherNoah.ParadiseMod.world.worldgen.structures.GiantGrassBlock;
import com.NetherNoah.ParadiseMod.world.worldgen.structures.Home;
import com.NetherNoah.ParadiseMod.world.worldgen.structures.Ocean;
Expand Down Expand Up @@ -122,7 +128,6 @@ public void preInit(FMLPreInitializationEvent event) {

//events
MinecraftForge.EVENT_BUS.register(Events.class);
MinecraftForge.EVENT_BUS.register(CaveGenHandler.class);

//some modifications to vanilla blocks
//This is NOT a coremod!
Expand Down Expand Up @@ -150,8 +155,32 @@ public void preInit(FMLPreInitializationEvent event) {
GameRegistry.registerTileEntity(TEAntiMobLamp.class,"salt_lamp");

//world generators
IWorldGenerator[] generators = {
//structures!
//cave gen
IWorldGenerator[] cavegen= {
new CaveGenBase(),
new CaveGenDesert(),
new CaveGenHumid(),
new CaveGenIcy(),
new CaveGenOcean(),
new CaveGenMesa(),
new CaveGenMushroomIsland(),
new CaveGenCrystal()
};

//ores
IWorldGenerator[] ores= {
//overworld ore gen
new OreGenOverworld(),

//nether ore gen
new OreGenNether(),

//end ore gen
new OreGenEnd()
};

//structures
IWorldGenerator[] structures= {
new Home(),
new WickerMan(),
new Ocean(),
Expand Down Expand Up @@ -180,34 +209,33 @@ public void preInit(FMLPreInitializationEvent event) {
new Shrine(),
new JeffTank(),

//overworld ore gen
new OreGenOverworld(),

//nether ore gen
new OreGenNether(),

//end ore gen
new OreGenEnd(),
//easter egg
new EasterEgg(),

//underground villages
new UndergroundVillage()
};

//miscellaneous
IWorldGenerator[] misc= {
//dirt, gravel, sand, and clay on the ocean floors
new DirtGen(),

//flowers
new Rose(),

//trees in the Deep Underground
new DUTrees(),

//easter egg
new EasterEgg(),
new EasterEgg2(),

//underground villages
new UndergroundVillage()
new DUTrees()
};

for(int i=0;i<generators.length;i++)
GameRegistry.registerWorldGenerator(generators[i],1);

for(int i=0;i<cavegen.length;i++)
GameRegistry.registerWorldGenerator(cavegen[i],2);
for(int i=0;i<ores.length;i++)
GameRegistry.registerWorldGenerator(ores[i],3);
for(int i=0;i<structures.length;i++)
GameRegistry.registerWorldGenerator(structures[i],4);
for(int i=0;i<misc.length;i++)
GameRegistry.registerWorldGenerator(misc[i],5);

//block categories
Lamps.initAndRegister();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.NetherNoah.ParadiseMod.blocks.formations;

import net.minecraft.block.BlockDirectional;
import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material;
import net.minecraft.block.properties.IProperty;
import net.minecraft.block.state.BlockStateContainer;
Expand All @@ -27,6 +28,7 @@ public icicle()
setCreativeTab(CreativeTabs.DECORATIONS);
setUnlocalizedName("Icicle");
setRegistryName("icicle");
setSoundType(SoundType.GLASS);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
package com.NetherNoah.ParadiseMod.blocks.formations;

import net.minecraft.block.BlockDirectional;
import net.minecraft.block.material.Material;
import net.minecraft.block.properties.IProperty;
import net.minecraft.block.state.BlockStateContainer;
import net.minecraft.block.state.IBlockState;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.init.Blocks;
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;

public class mossyStoneFormation extends BlockDirectional {
protected static final AxisAlignedBB END_ROD_VERTICAL_AABB = new AxisAlignedBB(0.375D, 0.0D, 0.375D, 0.625D, 1.0D, 0.625D);
protected static final AxisAlignedBB END_ROD_NS_AABB = new AxisAlignedBB(0.375D, 0.375D, 0.0D, 0.625D, 0.625D, 1.0D);
protected static final AxisAlignedBB END_ROD_EW_AABB = new AxisAlignedBB(0.0D, 0.375D, 0.375D, 1.0D, 0.625D, 0.625D);

public mossyStoneFormation()
{
super(Material.CIRCUITS);
setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.UP));
setCreativeTab(CreativeTabs.DECORATIONS);
setUnlocalizedName("mossyStoneFormation");
setRegistryName("mossy_stone_formation");
}

@Override
public boolean isOpaqueCube(IBlockState state) {
return false;
}

@Override
public boolean isFullCube(IBlockState state) {
return false;
}

@Override
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos)
{
switch (((EnumFacing)state.getValue(FACING)).getAxis())
{
case X:
default:
return END_ROD_EW_AABB;
case Z:
return END_ROD_NS_AABB;
case Y:
return END_ROD_VERTICAL_AABB;
}
}
@Override
public BlockRenderLayer getBlockLayer()
{
return BlockRenderLayer.TRANSLUCENT;
}

@Override
public IBlockState getStateFromMeta(int meta)
{
IBlockState iblockstate = this.getDefaultState();
iblockstate = iblockstate.withProperty(FACING, EnumFacing.getFront(meta));
return iblockstate;
}

@Override
public int getMetaFromState(IBlockState state)
{
return ((EnumFacing)state.getValue(FACING)).getIndex();
}

@Override
public IBlockState getStateForPlacement(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer)
{
IBlockState iblockstate = worldIn.getBlockState(pos.offset(facing.getOpposite()));

if (iblockstate.getBlock() == Blocks.END_ROD)
{
EnumFacing enumfacing = (EnumFacing)iblockstate.getValue(FACING);

if (enumfacing == facing)
{
return this.getDefaultState().withProperty(FACING, facing.getOpposite());
}
}

return this.getDefaultState().withProperty(FACING, facing);
}

@Override
protected BlockStateContainer createBlockState()
{
return new BlockStateContainer(this, new IProperty[] {FACING});
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
package com.NetherNoah.ParadiseMod.blocks.formations;

import net.minecraft.block.BlockDirectional;
import net.minecraft.block.material.Material;
import net.minecraft.block.properties.IProperty;
import net.minecraft.block.state.BlockStateContainer;
import net.minecraft.block.state.IBlockState;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.init.Blocks;
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;

public class netherrackFormation extends BlockDirectional {
protected static final AxisAlignedBB END_ROD_VERTICAL_AABB = new AxisAlignedBB(0.375D, 0.0D, 0.375D, 0.625D, 1.0D, 0.625D);
protected static final AxisAlignedBB END_ROD_NS_AABB = new AxisAlignedBB(0.375D, 0.375D, 0.0D, 0.625D, 0.625D, 1.0D);
protected static final AxisAlignedBB END_ROD_EW_AABB = new AxisAlignedBB(0.0D, 0.375D, 0.375D, 1.0D, 0.625D, 0.625D);

public netherrackFormation()
{
super(Material.CIRCUITS);
setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.UP));
setCreativeTab(CreativeTabs.DECORATIONS);
setUnlocalizedName("netherrackFormation");
setRegistryName("netherrack_formation");
}

@Override
public boolean isOpaqueCube(IBlockState state) {
return false;
}

@Override
public boolean isFullCube(IBlockState state) {
return false;
}

@Override
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos)
{
switch (((EnumFacing)state.getValue(FACING)).getAxis())
{
case X:
default:
return END_ROD_EW_AABB;
case Z:
return END_ROD_NS_AABB;
case Y:
return END_ROD_VERTICAL_AABB;
}
}
@Override
public BlockRenderLayer getBlockLayer()
{
return BlockRenderLayer.TRANSLUCENT;
}

@Override
public IBlockState getStateFromMeta(int meta)
{
IBlockState iblockstate = this.getDefaultState();
iblockstate = iblockstate.withProperty(FACING, EnumFacing.getFront(meta));
return iblockstate;
}

@Override
public int getMetaFromState(IBlockState state)
{
return ((EnumFacing)state.getValue(FACING)).getIndex();
}

@Override
public IBlockState getStateForPlacement(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer)
{
IBlockState iblockstate = worldIn.getBlockState(pos.offset(facing.getOpposite()));

if (iblockstate.getBlock() == Blocks.END_ROD)
{
EnumFacing enumfacing = (EnumFacing)iblockstate.getValue(FACING);

if (enumfacing == facing)
{
return this.getDefaultState().withProperty(FACING, facing.getOpposite());
}
}

return this.getDefaultState().withProperty(FACING, facing);
}

@Override
protected BlockStateContainer createBlockState()
{
return new BlockStateContainer(this, new IProperty[] {FACING});
}

}
Loading

0 comments on commit b90f9cc

Please sign in to comment.