This repository has been archived by the owner on Aug 22, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Noah Jelen
committed
Jun 30, 2018
1 parent
da6b0a7
commit cb14d2b
Showing
55 changed files
with
698 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
Nether Noah's Paradise Mod is a mod I decided to make for the heck of it! I started from the idea of me adding my own custom things to minecraft just like I can create my own custom textures for it in my resource pack! My friends and I currently use it in our Minecraft worlds. I even restored some old features like glowing obsidian from Minecraft Pocket Edition and the brick pyramid from Indev! | ||
|
||
Hopefully, having created this mod could help me get a high paying job in future since my brother told me that java programmers make about $100K USD per year! | ||
Hopefully, having created this mod could help me get a high paying job in future since my brother told me that java programmers make about $100K USD per year! |
66 changes: 66 additions & 0 deletions
66
src/main/java/com/NetherNoah/ParadiseMod/DummyProperty.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
//this class is based off of CJMinecraft's example mod | ||
//https://github.com/CJMinecraft01/BitOfEverything | ||
package com.NetherNoah.ParadiseMod; | ||
|
||
import java.util.Collection; | ||
|
||
import com.google.common.base.Optional; | ||
import com.google.common.collect.ImmutableSet; | ||
|
||
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); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
102 changes: 102 additions & 0 deletions
102
src/main/java/com/NetherNoah/ParadiseMod/blocks/slabs/CactusSlab.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
//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 CactusSlab extends BlockSlab { | ||
|
||
public static final DummyProperty DUMMY_VARIANT = DummyProperty.create("dummy"); | ||
|
||
public CactusSlab(String name) { | ||
super(Material.WOOD); | ||
setUnlocalizedName(name); | ||
setRegistryName(name); | ||
setHardness(3); | ||
setResistance(15); | ||
setCreativeTab(CreativeTabs.BUILDING_BLOCKS); | ||
setSoundType(SoundType.WOOD); | ||
|
||
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 | ||
} | ||
|
||
@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; | ||
//} | ||
} |
33 changes: 33 additions & 0 deletions
33
src/main/java/com/NetherNoah/ParadiseMod/blocks/slabs/CactusSlabDouble.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
//this class is based off of CJMinecraft's example mod | ||
//https://github.com/CJMinecraft01/BitOfEverything | ||
package com.NetherNoah.ParadiseMod.blocks.slabs; | ||
|
||
import com.NetherNoah.ParadiseMod.init.ModBlocks.Slabs; | ||
|
||
import net.minecraft.block.SoundType; | ||
import net.minecraft.block.state.IBlockState; | ||
import net.minecraft.creativetab.CreativeTabs; | ||
import net.minecraft.entity.player.EntityPlayer; | ||
import net.minecraft.item.ItemStack; | ||
import net.minecraft.util.math.BlockPos; | ||
import net.minecraft.util.math.RayTraceResult; | ||
import net.minecraft.world.World; | ||
|
||
public class CactusSlabDouble extends CactusSlab { | ||
|
||
public CactusSlabDouble() { | ||
super("double_cactus_slab"); | ||
setSoundType(SoundType.WOOD); | ||
} | ||
|
||
@Override | ||
public boolean isDouble() { | ||
return true; | ||
} | ||
@Override | ||
public ItemStack getPickBlock(IBlockState state, RayTraceResult target, World world, BlockPos pos, EntityPlayer player) | ||
{ | ||
return new ItemStack(Slabs.cactus_slab); | ||
} | ||
|
||
} |
99 changes: 99 additions & 0 deletions
99
src/main/java/com/NetherNoah/ParadiseMod/blocks/slabs/EndSlab.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
//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.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 EndSlab extends BlockSlab { | ||
|
||
public static final DummyProperty DUMMY_VARIANT = DummyProperty.create("dummy"); | ||
|
||
public EndSlab(String name) { | ||
super(Material.ROCK); | ||
setUnlocalizedName(name); | ||
setRegistryName(name); | ||
setHardness(3); | ||
setResistance(15); | ||
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 | ||
} | ||
|
||
@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; | ||
//} | ||
} |
30 changes: 30 additions & 0 deletions
30
src/main/java/com/NetherNoah/ParadiseMod/blocks/slabs/EndSlabDouble.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
//this class is based off of CJMinecraft's example mod | ||
//https://github.com/CJMinecraft01/BitOfEverything | ||
package com.NetherNoah.ParadiseMod.blocks.slabs; | ||
|
||
import com.NetherNoah.ParadiseMod.init.ModBlocks.Slabs; | ||
|
||
import net.minecraft.block.state.IBlockState; | ||
import net.minecraft.entity.player.EntityPlayer; | ||
import net.minecraft.item.ItemStack; | ||
import net.minecraft.util.math.BlockPos; | ||
import net.minecraft.util.math.RayTraceResult; | ||
import net.minecraft.world.World; | ||
|
||
public class EndSlabDouble extends EndSlab { | ||
|
||
public EndSlabDouble() { | ||
super("double_end_slab"); | ||
} | ||
|
||
@Override | ||
public boolean isDouble() { | ||
return true; | ||
} | ||
@Override | ||
public ItemStack getPickBlock(IBlockState state, RayTraceResult target, World world, BlockPos pos, EntityPlayer player) | ||
{ | ||
return new ItemStack(Slabs.end_slab); | ||
} | ||
|
||
} |
Oops, something went wrong.