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

Commit

Permalink
I have made another release!
Browse files Browse the repository at this point in the history
  • Loading branch information
Noah Jelen committed Jul 1, 2018
1 parent cb14d2b commit e6495b1
Show file tree
Hide file tree
Showing 53 changed files with 827 additions and 129 deletions.
5 changes: 4 additions & 1 deletion changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -216,4 +216,7 @@
1.2.2:
Added Cooked Eggs
The mod displays its correct version again (I'm always forgetting to update the mcmod.info file, dang it!)
Finally added slabs for end stone, compressed cactus, glowing obsidian, obsidian, void stone, and void stone bricks!
Finally added slabs for Bedrock, end stone, compressed cactus, glowing obsidian, obsidian, void stone, and void stone bricks!
Made Obsidian, Glowing Obsidian, and Bedrock Stairs immovable by pistons (they're made of immovable materials)
Changed the mechanic of gold and silver hoppers from transferring multiple items at to tranferring items faster than regular hoppers
Added mesa biome geneeration to the deep underground
31 changes: 0 additions & 31 deletions src/main/java/com/NetherNoah/ParadiseMod/DummyProperty.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,56 +9,25 @@

import net.minecraft.block.properties.PropertyHelper;

/**
* Used purely for the slabs. Every slab requires a variant so this is a great
* class to use if you have no variant
*
* @author CJMinecraft
*
*/
public class DummyProperty extends PropertyHelper<Boolean> {

/**
* Initialise the dummy property
*
* @param name
* The name of the property
*/
protected DummyProperty(String name) {
super(name, Boolean.class);
}

/**
* Say that we only allow false as a valid value
*/
@Override
public Collection<Boolean> getAllowedValues() {
return ImmutableSet.<Boolean>of(Boolean.valueOf(false));
}

/**
* Parse a value. Will always be false
*/
@Override
public Optional<Boolean> parseValue(String value) {
return Optional.<Boolean>of(Boolean.valueOf(false));
}

/**
* The name from the value. Will always be false
*/
@Override
public String getName(Boolean value) {
return "false";
}

/**
* Create a new dummy property
*
* @param name
* The name of the property
* @return the new dummy property
*/
public static DummyProperty create(String name) {
return new DummyProperty(name);
}
Expand Down
13 changes: 8 additions & 5 deletions src/main/java/com/NetherNoah/ParadiseMod/ParadiseMod.java
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ public void preInit(FMLPreInitializationEvent event) {
Blocks.CHAIN_COMMAND_BLOCK.setCreativeTab(CreativeTabs.REDSTONE);
Blocks.BARRIER.setCreativeTab(CreativeTabs.BUILDING_BLOCKS);
Blocks.MOB_SPAWNER.setCreativeTab(CreativeTabs.DECORATIONS);

//liquids
LiquidRedstone.register();
FluidRegistry.addBucketForFluid(LiquidRedstone.FluidLiquidRedstone.instance);
Expand Down Expand Up @@ -191,10 +192,12 @@ public void preInit(FMLPreInitializationEvent event) {

//trees in the Deep Underground
new DUTrees()
};
};

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

//block categories
Lamps.initAndRegister();
Ores.initAndRegister();
Expand All @@ -221,14 +224,14 @@ public void preInit(FMLPreInitializationEvent event) {
@EventHandler
public void Init(FMLInitializationEvent event) {
OreDictHandler.registerOreDict();

NetworkRegistry.INSTANCE.registerGuiHandler(instance, new CustomCraftBenchGuiHandler());
proxy.init();

ModSmelting.register();

DimensionRegistry.registerDimensions();

//spawn mobs in the deep void dimension
EntityRegistry.addSpawn(EntityZombie.class, 10, 0, 10, EnumCreatureType.MONSTER, Biomes.VOID);
EntityRegistry.addSpawn(EntityCreeper.class, 10, 0, 10, EnumCreatureType.MONSTER, Biomes.VOID);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ public VoidStone() {
setUnlocalizedName("VoidStone");
setRegistryName("void_stone");
setHardness(5F);
setResistance(10F);
setResistance(15F);
setCreativeTab(CreativeTabs.BUILDING_BLOCKS);
setSoundType(SoundType.STONE);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.NetherNoah.ParadiseMod.tileentity.hopper.TileEntityGoldHopper;

import net.minecraft.block.Block;
import net.minecraft.block.BlockHopper;
import net.minecraft.block.SoundType;
import net.minecraft.block.state.IBlockState;
Expand All @@ -17,7 +18,6 @@

public class GoldHopper extends BlockHopper {
public GoldHopper() {
super();
setUnlocalizedName("GoldHopper");
setRegistryName("gold_hopper");
setHardness(5F);
Expand All @@ -26,10 +26,18 @@ public GoldHopper() {
setSoundType(SoundType.METAL);
setHarvestLevel("pickaxe", 2);
}

@Override
public TileEntity createNewTileEntity(World worldIn, int meta) {
return new TileEntityGoldHopper();
}

@Override
public void neighborChanged(IBlockState state, World worldIn, BlockPos pos, Block blockIn, BlockPos fromPos)
{
return;
}

@Override
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ)
{
Expand All @@ -40,12 +48,13 @@ public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state,
else
{
TileEntity tileentity = worldIn.getTileEntity(pos);
if (tileentity instanceof TileEntityHopper)
if (tileentity instanceof TileEntityGoldHopper)
{
playerIn.displayGUIChest((TileEntityHopper)tileentity);
playerIn.displayGUIChest((TileEntityGoldHopper)tileentity);
playerIn.addStat(StatList.HOPPER_INSPECTED);
}
return true;
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.NetherNoah.ParadiseMod.tileentity.hopper.TileEntitySilverHopper;

import net.minecraft.block.Block;
import net.minecraft.block.BlockHopper;
import net.minecraft.block.SoundType;
import net.minecraft.block.state.IBlockState;
Expand All @@ -17,7 +18,6 @@

public class SilverHopper extends BlockHopper {
public SilverHopper() {
super();
setUnlocalizedName("SilverHopper");
setRegistryName("silver_hopper");
setHardness(5F);
Expand All @@ -26,10 +26,18 @@ public SilverHopper() {
setSoundType(SoundType.METAL);
setHarvestLevel("pickaxe", 2);
}

@Override
public TileEntity createNewTileEntity(World worldIn, int meta) {
return new TileEntitySilverHopper();
}

@Override
public void neighborChanged(IBlockState state, World worldIn, BlockPos pos, Block blockIn, BlockPos fromPos)
{
return;
}

@Override
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ)
{
Expand All @@ -40,12 +48,13 @@ public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state,
else
{
TileEntity tileentity = worldIn.getTileEntity(pos);
if (tileentity instanceof TileEntityHopper)
if (tileentity instanceof TileEntitySilverHopper)
{
playerIn.displayGUIChest((TileEntityHopper)tileentity);
playerIn.displayGUIChest((TileEntitySilverHopper)tileentity);
playerIn.addStat(StatList.HOPPER_INSPECTED);
}
return true;
}
}

}
101 changes: 101 additions & 0 deletions src/main/java/com/NetherNoah/ParadiseMod/blocks/slabs/BedrockSlab.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
//this class is based off of CJMinecraft's example mod
//https://github.com/CJMinecraft01/BitOfEverything
package com.NetherNoah.ParadiseMod.blocks.slabs;

import java.util.Random;

import com.NetherNoah.ParadiseMod.DummyProperty;
import com.NetherNoah.ParadiseMod.Reference;
import com.NetherNoah.ParadiseMod.init.ModBlocks.Slabs;

import net.minecraft.block.BlockSlab;
import net.minecraft.block.SoundType;
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.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;

public class BedrockSlab extends BlockSlab {

public static final DummyProperty DUMMY_VARIANT = DummyProperty.create("dummy");

public BedrockSlab(String name) {
super(Material.BARRIER);
setUnlocalizedName(name);
setRegistryName(name);
setHardness(-1F);
setResistance(6000000F);
setCreativeTab(CreativeTabs.BUILDING_BLOCKS);

IBlockState state = this.blockState.getBaseState();
if (!this.isDouble())
state = state.withProperty(HALF, EnumBlockHalf.BOTTOM);
setDefaultState(state);
this.useNeighborBrightness = true;
}

@Override
public String getUnlocalizedName(int meta) {
return this.getUnlocalizedName();
}

@Override
public IProperty<?> getVariantProperty() {
return DUMMY_VARIANT;
}

@Override
public Comparable<?> getTypeForItem(ItemStack stack) {
return false;
}

@Override
public int damageDropped(IBlockState state) {
return 0;
}

@Override
public IBlockState getStateFromMeta(int meta) {
if (!this.isDouble())
return this.getDefaultState().withProperty(HALF,
EnumBlockHalf.values()[meta % EnumBlockHalf.values().length]);
return this.getDefaultState();
}

@Override
public int getMetaFromState(IBlockState state) {
if (this.isDouble())
return 0;
return ((EnumBlockHalf) state.getValue(HALF)).ordinal() + 1;
}

@Override
public Item getItemDropped(IBlockState state, Random rand, int fortune) {
return Item.getItemFromBlock(Slabs.end_slab);
}

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

@Override
public boolean isDouble() {
return false;
}

//@Override
//public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ)
//{
// return false;
//}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,19 @@ public class GlowingObsidianSlab extends BlockSlab {
public static final DummyProperty DUMMY_VARIANT = DummyProperty.create("dummy");

public GlowingObsidianSlab(String name) {
super(Material.ROCK);
super(Material.BARRIER);
setUnlocalizedName(name);
setRegistryName(name);
setHardness(3);
setResistance(15);
setHardness(51);
setResistance(2000);
setLightLevel(.46666667F);
setCreativeTab(CreativeTabs.BUILDING_BLOCKS);

IBlockState state = this.blockState.getBaseState();
if (!this.isDouble())
state = state.withProperty(HALF, EnumBlockHalf.BOTTOM);
setDefaultState(state);
this.useNeighborBrightness = true; // Makes it so that you don't get dark patches on the block
this.useNeighborBrightness = true;
}

@Override
Expand Down
Loading

0 comments on commit e6495b1

Please sign in to comment.