mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-18 11:29:30 +00:00
Added 'Enlightened Glass/Fussed Quartz'
This commit is contained in:
1 parent
5dc271e4cd
commit
fb883b42a1
5 files changed
+41
-8
No files matched your search
@@ -32,7 +32,9 @@ public class BlockFusedQuartz extends BlockEio {
|
||||
public enum Type {
|
||||
|
||||
FUSED_QUARTZ("fusedQuartz", "enderio:fusedQuartz", "enderio:fusedQuartzFrame", "enderio:fusedQuartzItem"),
|
||||
GLASS("fusedGlass", "enderio:fusedGlass", "enderio:fusedGlassFrame", "enderio:fusedGlassItem");
|
||||
GLASS("fusedGlass", "enderio:fusedGlass", "enderio:fusedGlassFrame", "enderio:fusedGlassItem"),
|
||||
ENLIGHTENED_FUSED_QUARTZ("enlightenedFusedQuartz", "enderio:fusedQuartz", "enderio:fusedQuartzFrame", "enderio:fusedQuartzItem"),
|
||||
ENLIGHTENED_GLASS("enlightenedFusedGlass", "enderio:fusedGlass", "enderio:fusedGlassFrame", "enderio:fusedGlassItem");
|
||||
|
||||
final String unlocalisedName;
|
||||
final String blockIcon;
|
||||
@@ -70,7 +72,7 @@ public class BlockFusedQuartz extends BlockEio {
|
||||
GameRegistry.registerTileEntity(teClass, name + "TileEntity");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public float getExplosionResistance(Entity par1Entity, World world, int x, int y, int z, double explosionX, double explosionY, double explosionZ) {
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
@@ -115,6 +117,19 @@ public class BlockFusedQuartz extends BlockEio {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLightValue(IBlockAccess world, int x, int y, int z) {
|
||||
Block block = world.getBlock(x, y, z);
|
||||
if(block != this) {
|
||||
return super.getLightValue(world, x, y, z);
|
||||
}
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
if(meta > 1) {
|
||||
return 15;
|
||||
}
|
||||
return super.getLightValue(world, x, y, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped(int par1) {
|
||||
return par1;
|
||||
|
||||
@@ -43,9 +43,12 @@ public class ItemFusedQuartz extends ItemBlockWithMetadata {
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
int meta = par1ItemStack.getItemDamage();
|
||||
meta = MathHelper.clamp_int(meta, 0, BlockFusedQuartz.Type.values().length - 1);
|
||||
if(meta == 0) {
|
||||
if(meta == 0 || meta == 2) {
|
||||
par3List.add(Lang.localize("blastResistant"));
|
||||
}
|
||||
if(meta > 1) {
|
||||
par3List.add(Lang.localize("lightEmitter"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ public class MaterialRecipes {
|
||||
OreDictionary.registerOre("glass", Blocks.glass);
|
||||
OreDictionary.registerOre("stickWood", Items.stick);
|
||||
OreDictionary.registerOre("woodStick", Items.stick);
|
||||
OreDictionary.registerOre("sand", Blocks.sand);
|
||||
|
||||
ItemStack pureGlass = new ItemStack(EnderIO.blockFusedQuartz, 1, BlockFusedQuartz.Type.GLASS.ordinal());
|
||||
OreDictionary.registerOre("glass", pureGlass);
|
||||
|
||||
Reference in new issue
Block a user