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

Commit 932312c

Browse files
committed
Added Soul glass for #12
Still needs custom texture (animated) Still needs recipe Bumped version to 1.3.3
1 parent 4c8d090 commit 932312c

File tree

10 files changed

+78
-5
lines changed

10 files changed

+78
-5
lines changed

build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
mod_version=1.3.2
1+
mod_version=1.3.3
22
minecraft_version=1.8.9
33
forge_version=11.15.1.1764
44
mappings=stable_20

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#Mon Feb 15 14:56:28 PST 2016
1+
#Thu Mar 17 15:55:11 PDT 2016
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME

gradlew

100644100755
File mode changed.
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
package com.renevo.nethercore.blocks;
2+
3+
import com.renevo.nethercore.NetherCoreRegistry;
4+
import net.minecraft.block.Block;
5+
import net.minecraft.block.material.MapColor;
6+
import net.minecraft.block.material.Material;
7+
import net.minecraft.block.state.IBlockState;
8+
import net.minecraft.entity.EntityLiving;
9+
import net.minecraft.util.BlockPos;
10+
import net.minecraft.util.EnumFacing;
11+
import net.minecraft.util.EnumWorldBlockLayer;
12+
import net.minecraft.world.IBlockAccess;
13+
import net.minecraftforge.fml.relauncher.Side;
14+
import net.minecraftforge.fml.relauncher.SideOnly;
15+
16+
public class BlockOpaqueGlass extends Block {
17+
18+
public BlockOpaqueGlass() {
19+
super(Material.glass, MapColor.grayColor);
20+
21+
this.setHardness(0.3F);
22+
this.setCreativeTab(NetherCoreRegistry.tabNetherCore);
23+
this.setStepSound(Block.soundTypeGlass);
24+
this.setLightOpacity(255); // block all light
25+
}
26+
27+
@Override
28+
public boolean isOpaqueCube() {
29+
return false;
30+
}
31+
32+
@Override
33+
public boolean canCreatureSpawn(IBlockAccess blockAccess, BlockPos blockPos, EntityLiving.SpawnPlacementType spawnPlacementType) {
34+
return false;
35+
}
36+
37+
@SideOnly(Side.CLIENT)
38+
public EnumWorldBlockLayer getBlockLayer() {
39+
return EnumWorldBlockLayer.TRANSLUCENT;
40+
}
41+
42+
@SideOnly(Side.CLIENT)
43+
public boolean shouldSideBeRendered(IBlockAccess blockAccess, BlockPos blockPos, EnumFacing facing) {
44+
IBlockState blockState = blockAccess.getBlockState(blockPos);
45+
Block block = blockState.getBlock();
46+
47+
return !(block instanceof BlockOpaqueGlass) && super.shouldSideBeRendered(blockAccess, blockPos, facing);
48+
}
49+
}

src/main/java/com/renevo/nethercore/blocks/NetherCoreBlocks.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ private NetherCoreBlocks() {
3737
public static BlockNetherFurnace blockNetherFurnaceLit;
3838

3939
public static BlockLightRod blockLightRod;
40+
public static BlockOpaqueGlass blockSoulGlass;
41+
4042

4143
public static void init() {
4244
blockNetherOre = registerEnumBlock(new BlockNetherOre(), "ore");
@@ -63,6 +65,7 @@ public static void init() {
6365
blockNetherFurnaceLit = registerBlock(new BlockNetherFurnace(true), "nether_furnace_lit");
6466

6567
blockLightRod = registerBlock(new BlockLightRod(), "nether_rod");
68+
blockSoulGlass = registerBlock(new BlockOpaqueGlass(), "soul_glass");
6669

6770
GameRegistry.registerTileEntity(TileEntityNetherFurnace.class, "nether_furnace");
6871
}

src/main/java/com/renevo/nethercore/common/ClientProxy.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ public void registerModels() {
6363
itemToAdd = Item.getItemFromBlock(NetherCoreBlocks.blockLightRod);
6464
ModelLoader.setCustomModelResourceLocation(itemToAdd, 0, new ModelResourceLocation(Util.getResource("nether_rod"), "inventory"));
6565

66+
itemToAdd = Item.getItemFromBlock(NetherCoreBlocks.blockSoulGlass);
67+
ModelLoader.setCustomModelResourceLocation(itemToAdd, 0, new ModelResourceLocation(Util.getResource("soul_glass"), "inventory"));
68+
6669
// items
6770
itemToAdd = NetherCoreItems.netherSpore;
6871
ModelLoader.setCustomModelResourceLocation(itemToAdd, 0, new ModelResourceLocation(Util.getResource("nether_spore"), "inventory"));

src/main/java/com/renevo/nethercore/item/NetherCoreItems.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ private NetherCoreItems() {}
5555
public static ItemStack netherFurnace;
5656

5757
public static ItemStack netherRod;
58+
public static ItemStack soulGlass;
5859

5960
public static void init() {
6061
GameRegistry.registerItem(netherSpore = new ItemNetherSpore().setUnlocalizedName(Util.prefix("nether_spore")), "nether_spore");
@@ -103,5 +104,6 @@ public static void init() {
103104
netherFurnace = new ItemStack(NetherCoreBlocks.blockNetherFurnace);
104105

105106
netherRod = new ItemStack(NetherCoreBlocks.blockLightRod);
107+
soulGlass = new ItemStack(NetherCoreBlocks.blockSoulGlass);
106108
}
107109
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"forge_marker": 1,
3+
"defaults": {
4+
"transform": "forge:default-block",
5+
"model": "minecraft:cube_all",
6+
"textures": {
7+
"all": "minecraft:blocks/glass_black"
8+
}
9+
},
10+
"variants": {
11+
"inventory": [{}],
12+
"normal": [{}]
13+
}
14+
}

src/main/resources/assets/nethercore/lang/en_US.lang

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ tile.nethercore.nether_furnace.name=Nether Furnace
5454
tile.nethercore.nether_furnace_lit.name=Nether Furnace
5555

5656
tile.nethercore.nether_rod.name=Nether Rod
57+
tile.nethercore.soul_glass.name=Soul Glass
5758

5859
item.nethercore.nether_spore.name=Nether Spore
5960
item.nethercore.nether_spore.tooltip=When used will turn Netherrack into Nether Growth

update.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"homepage": "https://github.com/RenEvo/nethercore/releases",
33
"promos": {
4-
"1.8.9-latest": "1.3.2",
4+
"1.8.9-latest": "1.3.3",
55
"1.8.9-recommended": "1.3.2",
6-
"latest": "1.3.2",
6+
"latest": "1.3.3",
77
"recommended": "1.3.2"
88
},
99
"1.8.9": {
@@ -17,6 +17,7 @@
1717
"1.2.2": "Nether Growth Tweaks",
1818
"1.3.0": "Added Nether Furnace",
1919
"1.3.1": "Hotfix for startup crash",
20-
"1.3.2": "Added Nether Rods"
20+
"1.3.2": "Added Nether Rods",
21+
"1.3.3": "Added Soul Glass"
2122
}
2223
}

0 commit comments

Comments
 (0)