Skip to content
This repository has been archived by the owner on Mar 9, 2024. It is now read-only.

Commit

Permalink
Updated to 1.9.4 #29
Browse files Browse the repository at this point in the history
Fixed an issue where the brick recipes returned the wrong amounts Closes #34
Added cobblestone to ore dictionary Closes #33
  • Loading branch information
renevo committed Jul 5, 2016
1 parent 4c2b971 commit 4c9e8e8
Show file tree
Hide file tree
Showing 22 changed files with 138 additions and 136 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ buildscript {
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT'
classpath 'net.minecraftforge.gradle:ForgeGradle:2.2-SNAPSHOT'
}
}

Expand Down
16 changes: 8 additions & 8 deletions build.properties
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
mod_version=2.0.1
minecraft_version=1.9
forge_version=12.16.1.1905
mappings=snapshot_20160312
mod_version=2.0.2
minecraft_version=1.9.4
forge_version=12.17.0.1976
mappings=snapshot_20160518

mantle_version=0.9.+
tinkers_version=2.2.+
jei_version=3.3.+
waila_version=1.7.0-B2_1.9
mantle_version=0.10.+
tinkers_version=2.3.+
jei_version=3.6.+
waila_version=1.7.0-B3_1.9.4

4 changes: 2 additions & 2 deletions src/main/java/com/renevo/nethercore/NetherCore.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

@Mod(
modid = Util.MODID,
dependencies = "required-after:Forge@[12.16.1,);required-after:mantle@[1.9-0.9,)",
acceptedMinecraftVersions = "1.9",
dependencies = "required-after:Forge@[12.17,);required-after:mantle@[1.9.4-0.10,)",
acceptedMinecraftVersions = "1.9.4",
updateJSON = "https://raw.githubusercontent.com/RenEvo/nethercore/master/update.json",
useMetadata = true,
guiFactory="com.renevo.nethercore.client.gui.config.ModGuiFactory")
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/com/renevo/nethercore/NetherCoreAchievements.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,22 @@ private NetherCoreAchievements() {

public static void init() {

netherSporeAchievement = new Achievement("achievement.netherspore", "netherspore", 0, 12, NetherCoreItems.netherSpore, AchievementList.blazeRod);
netherSporeAchievement = new Achievement("achievement.netherspore", "netherspore", 0, 12, NetherCoreItems.netherSpore, AchievementList.BLAZE_ROD);
netherSporeAchievement.registerStat();

netherStoneAchievement = new Achievement("achievement.netherstone", "netherstone", -2, 10, NetherCoreItems.stoneCobble, AchievementList.portal);
netherStoneAchievement = new Achievement("achievement.netherstone", "netherstone", -2, 10, NetherCoreItems.stoneCobble, AchievementList.PORTAL);
netherStoneAchievement.registerStat();

netherFurnaceAchievement = new Achievement("achievement.netherfurnace", "netherfurnace", -4, 10, NetherCoreBlocks.blockNetherFurnace, netherStoneAchievement);
netherFurnaceAchievement.registerStat();

netherOreAchievement = new Achievement("achievement.netherore", "netherore", -2, 12, NetherCoreItems.netherOreIron, AchievementList.portal);
netherOreAchievement = new Achievement("achievement.netherore", "netherore", -2, 12, NetherCoreItems.netherOreIron, AchievementList.PORTAL);
netherOreAchievement.registerStat();

compressionAchievement = new Achievement("achievement.compressednether", "compressednether", -4, 12, NetherCoreBlocks.blockCompressedNetherrack, netherOreAchievement);
compressionAchievement.registerStat();

xbAchievement = new Achievement("achievement.xbcrafted", "xbcrafted", -6, 12, Items.nether_star, compressionAchievement);
xbAchievement = new Achievement("achievement.xbcrafted", "xbcrafted", -6, 12, Items.NETHER_STAR, compressionAchievement);
xbAchievement.registerStat().setSpecial();

MinecraftForge.EVENT_BUS.register(new NetherCoreAchievements());
Expand Down Expand Up @@ -82,7 +82,7 @@ public void onCraftItem(PlayerEvent.ItemCraftedEvent event) {

@SubscribeEvent
public void onSmeltItem(PlayerEvent.ItemSmeltedEvent event) {
if (event.smelting.getItem() == Items.nether_star) {
if (event.smelting.getItem() == Items.NETHER_STAR) {
event.player.addStat(xbAchievement, 1);
return;
}
Expand Down
83 changes: 51 additions & 32 deletions src/main/java/com/renevo/nethercore/NetherCoreRegistry.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,28 @@ public final class NetherCoreRegistry {
private NetherCoreRegistry() {
}

public static CreativeTab tabNetherCore = new CreativeTab("NetherCore", new ItemStack(Blocks.netherrack));
public static CreativeTab tabNetherCore = new CreativeTab("NetherCore", new ItemStack(Blocks.NETHERRACK));

public static void registerSmelting() {
GameRegistry.addSmelting(NetherCoreItems.netherOreCoal.copy(), new ItemStack(Items.coal, 2), 0.0f);
GameRegistry.addSmelting(NetherCoreItems.netherOreIron.copy(), new ItemStack(Blocks.iron_ore, 2), 0.2f);
GameRegistry.addSmelting(NetherCoreItems.netherOreGold.copy(), new ItemStack(Blocks.gold_ore, 2), 0.2f);
GameRegistry.addSmelting(NetherCoreItems.netherOreRedstone.copy(), new ItemStack(Items.redstone, 2), 0.2f);
GameRegistry.addSmelting(NetherCoreItems.netherOreLapis.copy(), new ItemStack(Items.dye, 2, EnumDyeColor.BLUE.getDyeDamage()), 0.2f);
GameRegistry.addSmelting(NetherCoreItems.netherOreDiamond.copy(), new ItemStack(Items.diamond, 2), 0.2f);
GameRegistry.addSmelting(NetherCoreItems.netherOreEmerald.copy(), new ItemStack(Items.emerald, 2), 0.2f);
GameRegistry.addSmelting(NetherCoreItems.netherOreCoal.copy(), new ItemStack(Items.COAL, 2), 0.0f);
GameRegistry.addSmelting(NetherCoreItems.netherOreIron.copy(), new ItemStack(Blocks.IRON_ORE, 2), 0.2f);
GameRegistry.addSmelting(NetherCoreItems.netherOreGold.copy(), new ItemStack(Blocks.GOLD_ORE, 2), 0.2f);
GameRegistry.addSmelting(NetherCoreItems.netherOreRedstone.copy(), new ItemStack(Items.REDSTONE, 2), 0.2f);
GameRegistry.addSmelting(NetherCoreItems.netherOreLapis.copy(), new ItemStack(Items.DYE, 2, EnumDyeColor.BLUE.getDyeDamage()), 0.2f);
GameRegistry.addSmelting(NetherCoreItems.netherOreDiamond.copy(), new ItemStack(Items.DIAMOND, 2), 0.2f);
GameRegistry.addSmelting(NetherCoreItems.netherOreEmerald.copy(), new ItemStack(Items.EMERALD, 2), 0.2f);

GameRegistry.addSmelting(NetherCoreItems.stoneCobble, NetherCoreItems.stone, 0.2F);
GameRegistry.addSmelting(NetherCoreItems.stoneBrick, NetherCoreItems.stoneBrickCracked, 0.0F);

// collides with Soul Shards - The old way, need to adjust if present
// TODO: Alternate recipe - not sure
if (Config.enableSoulGlassRecipe) {
GameRegistry.addSmelting(Blocks.soul_sand, NetherCoreItems.soulGlass, 0.0F);
GameRegistry.addSmelting(Blocks.SOUL_SAND, NetherCoreItems.soulGlass, 0.0F);
}

if (Config.enableSmeltedNetherStar) {
GameRegistry.addSmelting(NetherCoreItems.compressedNetherrackOctuple, new ItemStack(Items.nether_star, 1), 10.0f);
GameRegistry.addSmelting(NetherCoreItems.compressedNetherrackOctuple, new ItemStack(Items.NETHER_STAR, 1), 10.0f);
}
}

Expand All @@ -51,47 +52,65 @@ public static void registerOreDictionary() {
OreDictionary.registerOre("oreNetherDiamond", NetherCoreItems.netherOreDiamond.copy());
OreDictionary.registerOre("oreNetherEmerald", NetherCoreItems.netherOreEmerald.copy());
OreDictionary.registerOre("oreNetherNetherCoal", NetherCoreItems.netherOreNetherCoal.copy());

OreDictionary.registerOre("cobblestone", NetherCoreItems.stoneCobble.copy());
}

public static void registerFuels() {
GameRegistry.registerFuelHandler(new FuelHandler());
}

public static void registerRecipes() {
GameRegistry.addRecipe(NetherCoreItems.stoneCobble,
ItemStack result;

result = NetherCoreItems.stoneCobble.copy();
result.stackSize = 1;
GameRegistry.addRecipe(result,
"##",
"##",
'#', Blocks.netherrack);
'#', Blocks.NETHERRACK);

GameRegistry.addRecipe(NetherCoreItems.stoneBrick,
result = NetherCoreItems.stoneBrick.copy();
result.stackSize = 4;
GameRegistry.addRecipe(result,
"##",
"##",
'#', NetherCoreItems.stone);

GameRegistry.addRecipe(NetherCoreItems.stoneRoad,
result = NetherCoreItems.stoneRoad.copy();
result.stackSize = 4;
GameRegistry.addRecipe(result,
"##",
"##",
'#', NetherCoreItems.stoneBrick);

GameRegistry.addRecipe(NetherCoreItems.stoneCreeper,
result = NetherCoreItems.stoneCreeper.copy();
result.stackSize = 1;
GameRegistry.addRecipe(result,
"#",
"G",
'#', NetherCoreItems.stonePaver,
'G', Items.gunpowder);
'G', Items.GUNPOWDER);

GameRegistry.addRecipe(NetherCoreItems.stoneBrickSquare,
result = NetherCoreItems.stoneBrickSquare.copy();
result.stackSize = 8;
GameRegistry.addRecipe(result,
"###",
"# #",
"###",
'#', NetherCoreItems.stoneBrick);

GameRegistry.addRecipe(NetherCoreItems.stoneBrickFancy,
result = NetherCoreItems.stoneBrickFancy.copy();
result.stackSize = 5;
GameRegistry.addRecipe(result,
"## ",
" # ",
" ##",
'#', NetherCoreItems.stoneBrick);

GameRegistry.addRecipe(NetherCoreItems.stonePaver,
result = NetherCoreItems.stonePaver.copy();
result.stackSize = 7;
GameRegistry.addRecipe(result,
"###",
" # ",
"###",
Expand All @@ -102,11 +121,11 @@ public static void registerRecipes() {
"MGM",
"WSW",
"BGB",
'M', Items.magma_cream,
'G', Items.ghast_tear,
'S', Items.wheat_seeds,
'B', Items.blaze_powder,
'W', Items.nether_wart);
'M', Items.MAGMA_CREAM,
'G', Items.GHAST_TEAR,
'S', Items.WHEAT_SEEDS,
'B', Items.BLAZE_POWDER,
'W', Items.NETHER_WART);
}

if (Config.enableNetherFurnaceRecipe) {
Expand All @@ -115,21 +134,21 @@ public static void registerRecipes() {
"CMC",
"CCC",
'C', NetherCoreItems.stoneCobble,
'M', Items.magma_cream);
'M', Items.MAGMA_CREAM);
}

ItemStack netherRods = NetherCoreItems.netherRod.copy();
netherRods.stackSize = 4;
GameRegistry.addRecipe(netherRods,
result = NetherCoreItems.netherRod.copy();
result.stackSize = 4;
GameRegistry.addRecipe(result,
"R",
"B",
'R', Items.blaze_rod,
'B', Blocks.nether_brick);
'R', Items.BLAZE_ROD,
'B', Blocks.NETHER_BRICK);

addCompressedRecipe(new ItemStack(NetherCoreItems.netherCoal), NetherCoreItems.netherCoalBlock);

if (Config.enableCompressedNetherrackRecipes) {
addCompressedRecipe(new ItemStack(Blocks.netherrack), NetherCoreItems.compressedNetherrackSingle);
addCompressedRecipe(new ItemStack(Blocks.NETHERRACK), NetherCoreItems.compressedNetherrackSingle);
addCompressedRecipe(NetherCoreItems.compressedNetherrackSingle, NetherCoreItems.compressedNetherrackDouble);
addCompressedRecipe(NetherCoreItems.compressedNetherrackDouble, NetherCoreItems.compressedNetherrackTriple);
addCompressedRecipe(NetherCoreItems.compressedNetherrackTriple, NetherCoreItems.compressedNetherrackQuadruple);
Expand All @@ -150,7 +169,7 @@ public static void registerRecipes() {

addWallRecipe(NetherCoreItems.stone, NetherCoreItems.wallStone, false);
addWallRecipe(NetherCoreItems.stoneCobble, NetherCoreItems.wallStoneCobble, false);
addWallRecipe(new ItemStack(Blocks.nether_brick), NetherCoreItems.wallNetherBrick, true);
addWallRecipe(new ItemStack(Blocks.NETHER_BRICK), NetherCoreItems.wallNetherBrick, true);
}

public static void registerIntegrations() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ public class BlockCompressedNetherrack extends EnumBlock<BlockCompressedNetherra
public static final PropertyEnum<CompressionDepth> TYPE = PropertyEnum.create("type", CompressionDepth.class);

public BlockCompressedNetherrack() {
this(Material.rock);
this(Material.ROCK);
}

public BlockCompressedNetherrack(Material material) {
super(material, TYPE, CompressionDepth.class);

setHardness(2.0f);
setResistance(5.0F);
setStepSound(NetherCoreBlocks.soundTypeNetherStone);
setSoundType(NetherCoreBlocks.soundTypeNetherStone);
setHarvestLevel("pickaxe", 1); // 1 is stone required (0 wood, 1 stone, 2 iron)
setCreativeTab(NetherCoreRegistry.tabNetherCore);
}
Expand Down
10 changes: 3 additions & 7 deletions src/main/java/com/renevo/nethercore/blocks/BlockLightRod.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ public class BlockLightRod extends BlockDirectional {
protected static final AxisAlignedBB BB_AXIS_Z = new AxisAlignedBB(0.375D, 0.375D, 0.0D, 0.625D, 0.625D, 1.0D);
protected static final AxisAlignedBB BB_AXIS_X = new AxisAlignedBB(0.0D, 0.375D, 0.375D, 1.0D, 0.625D, 0.625D);

private MapColor mapColor = MapColor.sandColor;
private MapColor mapColor = MapColor.SAND;

public BlockLightRod() {
super(Material.circuits);
super(Material.CIRCUITS);
this.setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.UP));
this.setCreativeTab(NetherCoreRegistry.tabNetherCore);
this.setHardness(0.3F);
Expand All @@ -38,7 +38,7 @@ public BlockLightRod() {

@SuppressWarnings("unused")
public BlockLightRod(MapColor color) {
super(Material.circuits);
super(Material.CIRCUITS);
mapColor = color;
this.setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.UP));
this.setCreativeTab(NetherCoreRegistry.tabNetherCore);
Expand Down Expand Up @@ -108,10 +108,6 @@ public IBlockState onBlockPlaced(World world, BlockPos blockPos, EnumFacing faci
public void onBlockAdded(World world, BlockPos blockPos, IBlockState state) {
}

@Override
public void onNeighborBlockChange(World worldIn, BlockPos pos, IBlockState state, Block neighborBlock) {
}

@Override
public IBlockState getStateFromMeta(int meta) {
IBlockState state = this.getDefaultState();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,16 @@ public class BlockNetherFurnace extends BlockContainer {
private static boolean keepInventory;

protected BlockNetherFurnace(boolean isBurning) {
super(Material.rock);
super(Material.ROCK);
this.setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH));
this.setHardness(3.5F);
this.setStepSound(NetherCoreBlocks.soundTypeNetherStone);
this.setSoundType(NetherCoreBlocks.soundTypeNetherStone);
this.isBurning = isBurning;

if (!this.isBurning) {
this.setCreativeTab(NetherCoreRegistry.tabNetherCore);
} else {
this.setCreativeTab(null);
//this.setCreativeTab(null);
}

if (this.isBurning) {
Expand Down
25 changes: 13 additions & 12 deletions src/main/java/com/renevo/nethercore/blocks/BlockNetherGrass.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ public class BlockNetherGrass extends Block {
public static final PropertyBool BURNING = PropertyBool.create("burning");

public BlockNetherGrass() {
super(Material.rock);
super(Material.ROCK);

this.setTickRandomly(true);

this.setHarvestLevel("pickaxe", 1); // 1 is stone required (0 wood, 1 stone, 2 iron)
this.setHardness(Blocks.netherrack.getBlockHardness(null, null, null));
this.setResistance(Blocks.netherrack.getExplosionResistance(null));
this.setHardness(Blocks.NETHERRACK.getBlockHardness(null, null, null));
this.setResistance(Blocks.NETHERRACK.getExplosionResistance(null));

this.setDefaultState(this.blockState.getBaseState().withProperty(BURNING, false));
this.setStepSound(NetherCoreBlocks.soundTypeNetherStone);
this.setSoundType(NetherCoreBlocks.soundTypeNetherStone);
this.setCreativeTab(NetherCoreRegistry.tabNetherCore);
}

Expand All @@ -42,7 +42,7 @@ public void updateTick(World world, BlockPos blockPos, IBlockState blockState, R
int rate = blockState.getValue(BURNING) ? 12 : 4;
IBlockState blockUp = world.getBlockState(blockPos.up());
if (blockUp.isOpaqueCube()) {
world.setBlockState(blockPos, Blocks.netherrack.getDefaultState());
world.setBlockState(blockPos, Blocks.NETHERRACK.getDefaultState());
return;
}

Expand All @@ -55,17 +55,17 @@ public void updateTick(World world, BlockPos blockPos, IBlockState blockState, R

IBlockState iblockstate = world.getBlockState(blockpos);

if (iblockstate.getBlock() == Blocks.netherrack) {
if (iblockstate.getBlock() == Blocks.NETHERRACK) {
world.setBlockState(blockpos, NetherCoreBlocks.blockNetherGrass.getDefaultState());
if (blockOnTop.getMaterial() == Material.air) {
world.setBlockState(blockpos.up(), Blocks.fire.getDefaultState());
if (blockOnTop.getMaterial() == Material.AIR) {
world.setBlockState(blockpos.up(), Blocks.FIRE.getDefaultState());
}
}

if (iblockstate.getBlock() == NetherCoreBlocks.blockNetherOre && iblockstate.getBlock().getMetaFromState(iblockstate) == BlockNetherOre.OreTypes.COAL.getMeta()) {
world.setBlockState(blockpos, NetherCoreBlocks.blockNetherOre.getDefaultState().withProperty(BlockNetherOre.TYPE, BlockNetherOre.OreTypes.NETHERCOAL));
if (blockOnTop.getMaterial() == Material.air) {
world.setBlockState(blockpos.up(), Blocks.fire.getDefaultState());
if (blockOnTop.getMaterial() == Material.AIR) {
world.setBlockState(blockpos.up(), Blocks.FIRE.getDefaultState());
}
}
}
Expand All @@ -76,12 +76,12 @@ public void updateTick(World world, BlockPos blockPos, IBlockState blockState, R
@Override
public IBlockState getActualState(IBlockState blockState, IBlockAccess blockAccess, BlockPos blockPos) {
Block block = blockAccess.getBlockState(blockPos.up()).getBlock();
return blockState.withProperty(BURNING, block == Blocks.fire || block == Blocks.lava || block == Blocks.flowing_lava);
return blockState.withProperty(BURNING, block == Blocks.FIRE || block == Blocks.LAVA || block == Blocks.FLOWING_LAVA);
}

@Override
public Item getItemDropped(IBlockState blockState, Random random, int meta) {
return Blocks.netherrack.getItemDropped(Blocks.netherrack.getDefaultState(), random, meta);
return Blocks.NETHERRACK.getItemDropped(Blocks.NETHERRACK.getDefaultState(), random, meta);
}

@Override
Expand All @@ -94,6 +94,7 @@ public boolean canCreatureSpawn(IBlockState blockState, IBlockAccess blockAccess
public BlockRenderLayer getBlockLayer() {
return BlockRenderLayer.CUTOUT_MIPPED;
}

@Override
public int getMetaFromState(IBlockState blockState) {
return 0;
Expand Down
Loading

0 comments on commit 4c9e8e8

Please sign in to comment.