2
0
Fork 0

Broken chains

frozen
KeyLime17 1 year ago
parent 2046fb8636
commit 8e5974b019

@ -131,11 +131,13 @@ public class CinderLoE {
public static Block mistBlock; public static Block mistBlock;
public static Block cutDrystone; public static Block cutDrystone;
public static Block cindercobble; public static Block cindercobble;
public static Block cinderfur;
public static Block reeflessCoral; public static Block reeflessCoral;
public static Block silverChain; public static Block silverChain;
public static Block goldChain; public static Block goldChain;
public static Block ironChain; public static Block ironChain;
public static Block bronzeChain; public static Block bronzeChain;
public static Block plaster; public static Block plaster;
public static Block voidblock; public static Block voidblock;
public static Block entityBarrier; public static Block entityBarrier;
@ -189,6 +191,7 @@ public class CinderLoE {
// Misc // Misc
public static Item forgingKit; public static Item forgingKit;
public static Item cinderFurItem;
// Common tools/weapons // Common tools/weapons
public static Item whip; public static Item whip;
@ -461,6 +464,7 @@ public class CinderLoE {
bronzeChain = (new bronzeChain()); bronzeChain = (new bronzeChain());
GameRegistry.registerBlock(bronzeChain, "bronzeChain"); GameRegistry.registerBlock(bronzeChain, "bronzeChain");
// Staff // Staff
mistBlock = (new MistBlock()); mistBlock = (new MistBlock());
GameRegistry.registerBlock(mistBlock, "mist"); GameRegistry.registerBlock(mistBlock, "mist");
@ -476,6 +480,9 @@ public class CinderLoE {
cindercobble = (new CobbleBlock()); cindercobble = (new CobbleBlock());
GameRegistry.registerBlock(cindercobble, CinderBlockMetaData.class, "cindercobble"); GameRegistry.registerBlock(cindercobble, CinderBlockMetaData.class, "cindercobble");
cinderfur = (new CinderFurBlock());
GameRegistry.registerBlock(cinderfur, CinderBlockMetaData.class, "cinderfur");
plaster = (new plaster()); plaster = (new plaster());
GameRegistry.registerBlock(plaster, "plaster"); GameRegistry.registerBlock(plaster, "plaster");
@ -601,6 +608,9 @@ public class CinderLoE {
linkLOTRWeapon(welfRelic, "welfRelic"); linkLOTRWeapon(welfRelic, "welfRelic");
// Misc // Misc
cinderFurItem = (new CinderFurItem()).setUnlocalizedName("cinder_fur_item").setTextureName("lotr:cinder_fur_item_0");
ItemRegistration.register(cinderFurItem,"cinderFurItem",6004);
EVENT = getLOTRMaterialByName("EVENT"); EVENT = getLOTRMaterialByName("EVENT");
MATERIAL_JADE = getLOTRMaterialByName("JADE"); MATERIAL_JADE = getLOTRMaterialByName("JADE");
@ -1097,6 +1107,7 @@ public class CinderLoE {
CinderCore.registerItemFallback(Block.getIdFromBlock(mistBlock), Block.getIdFromBlock(LOTRMod.utumnoPortal), "cinder_loe", "1.1"); CinderCore.registerItemFallback(Block.getIdFromBlock(mistBlock), Block.getIdFromBlock(LOTRMod.utumnoPortal), "cinder_loe", "1.1");
CinderCore.registerItemFallback(Block.getIdFromBlock(cutDrystone), Block.getIdFromBlock(LOTRMod.cobblebrick), "cinder_loe", "1.2"); CinderCore.registerItemFallback(Block.getIdFromBlock(cutDrystone), Block.getIdFromBlock(LOTRMod.cobblebrick), "cinder_loe", "1.2");
CinderCore.registerItemFallback(Block.getIdFromBlock(cindercobble), Block.getIdFromBlock(LOTRMod.cobblebrick), "cinder_loe", "1.2"); CinderCore.registerItemFallback(Block.getIdFromBlock(cindercobble), Block.getIdFromBlock(LOTRMod.cobblebrick), "cinder_loe", "1.2");
CinderCore.registerItemFallback(Block.getIdFromBlock(cinderfur), Block.getIdFromBlock(Blocks.wool), "cinder_loe", "1.2.4");
CinderCore.registerItemFallback(Block.getIdFromBlock(reeflessCoral), Block.getIdFromBlock(LOTRMod.coralReef), "cinder_loe", "1.2"); CinderCore.registerItemFallback(Block.getIdFromBlock(reeflessCoral), Block.getIdFromBlock(LOTRMod.coralReef), "cinder_loe", "1.2");
CinderCore.registerItemFallback(Block.getIdFromBlock(plaster), Block.getIdFromBlock(Blocks.brick_block), "cinder_loe", "1.2.1"); CinderCore.registerItemFallback(Block.getIdFromBlock(plaster), Block.getIdFromBlock(Blocks.brick_block), "cinder_loe", "1.2.1");
CinderCore.registerItemFallback(Block.getIdFromBlock(voidblock), Block.getIdFromBlock(Blocks.coal_block), "cinder_loe", "1.2.1"); CinderCore.registerItemFallback(Block.getIdFromBlock(voidblock), Block.getIdFromBlock(Blocks.coal_block), "cinder_loe", "1.2.1");

@ -28,7 +28,7 @@ public class LoECreativeTabs extends CreativeTabs {
tabSpawnLoE.theIcon = new ItemStack(CinderLoE.spawnEgg); tabSpawnLoE.theIcon = new ItemStack(CinderLoE.spawnEgg);
tabMiscLoE.theIcon = new ItemStack(CinderLoE.bonemold); tabMiscLoE.theIcon = new ItemStack(CinderLoE.bonemold);
tabFoodLoE.theIcon = new ItemStack(CinderLoE.onion); tabFoodLoE.theIcon = new ItemStack(CinderLoE.onion);
tabDecoLoE.theIcon = new ItemStack(CinderLoE.silverChain); tabDecoLoE.theIcon = new ItemStack(CinderLoE.cinderchain);
tabCharacterLoE.theIcon = new ItemStack(CinderLoE.sarumanStaff); tabCharacterLoE.theIcon = new ItemStack(CinderLoE.sarumanStaff);
} }

@ -1,5 +1,6 @@
package com.zivilon.cinder_loe.blocks; package com.zivilon.cinder_loe.blocks;
import com.zivilon.cinder_loe.LoECreativeTabs;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
@ -26,7 +27,7 @@ public abstract class BarsBase extends BlockPane {
super("", "", Material.iron, true); super("", "", Material.iron, true);
this.textureName = Utilities.toSnakeCase(blockName); this.textureName = Utilities.toSnakeCase(blockName);
this.setBlockName(blockName); this.setBlockName(blockName);
setCreativeTab((CreativeTabs)LOTRCreativeTabs.tabDeco); this.setCreativeTab(LoECreativeTabs.tabBlockLoE);
setHardness(5.0F); setHardness(5.0F);
setResistance(10.0F); setResistance(10.0F);
setStepSound(Block.soundTypeMetal); setStepSound(Block.soundTypeMetal);

@ -1,5 +1,6 @@
package com.zivilon.cinder_loe.blocks; package com.zivilon.cinder_loe.blocks;
import com.zivilon.cinder_loe.LoECreativeTabs;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.client.renderer.texture.IIconRegister;
@ -16,13 +17,7 @@ public class BlockRedDwarfSteel extends Block {
public BlockRedDwarfSteel() { public BlockRedDwarfSteel() {
super(Material.iron); // Choose the appropriate material super(Material.iron); // Choose the appropriate material
try { this.setCreativeTab(LoECreativeTabs.tabBlockLoE);
Field tabField = LOTRCreativeTabs.class.getDeclaredField("tabBlock"); // Stupid workaround because ForgeGradle tries to obfuscate field LOTRCreativeTabs.tabBlock when it's not supposed to
LOTRCreativeTabs tab = (LOTRCreativeTabs)tabField.get(null);
setCreativeTab((CreativeTabs)tab);
} catch (NoSuchFieldException | IllegalAccessException e) {
e.printStackTrace();
}
setHardness(5.0F); setHardness(5.0F);
setResistance(15.0F); setResistance(15.0F);
setStepSound(Block.soundTypeMetal); setStepSound(Block.soundTypeMetal);

@ -1,5 +1,6 @@
package com.zivilon.cinder_loe.blocks; package com.zivilon.cinder_loe.blocks;
import com.zivilon.cinder_loe.LoECreativeTabs;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
@ -29,7 +30,7 @@ public abstract class ChandelierBase extends Block {
super(Material.circuits); super(Material.circuits);
this.textureName = Utilities.toSnakeCase(blockName); this.textureName = Utilities.toSnakeCase(blockName);
this.setBlockName(blockName); this.setBlockName(blockName);
setCreativeTab((CreativeTabs)LOTRCreativeTabs.tabDeco); this.setCreativeTab(LoECreativeTabs.tabBlockLoE);
setHardness(0.0F); setHardness(0.0F);
setResistance(2.0F); setResistance(2.0F);
setStepSound(Block.soundTypeMetal); setStepSound(Block.soundTypeMetal);

@ -0,0 +1,149 @@
package com.zivilon.cinder_loe.blocks;
import com.zivilon.cinder_loe.LoECreativeTabs;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import lotr.common.block.LOTRBlockOrcChain;
import net.minecraft.block.*;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import java.util.List;
public class CinderChain extends LOTRBlockOrcChain {
public static final String[] chainTypes = {"bronze", "gold", "silver", "iron"};
@SideOnly(value= Side.CLIENT)
private IIcon[] iconMiddle;
@SideOnly(value=Side.CLIENT)
private IIcon[] iconTop;
@SideOnly(value=Side.CLIENT)
private IIcon[] iconBottom;
@SideOnly(value=Side.CLIENT)
private IIcon[] iconSingle;
@SideOnly(Side.CLIENT)
private IIcon[] iconItem;
public CinderChain() {
this.setCreativeTab(LoECreativeTabs.tabDecoLoE);
this.setHardness(1.0f);
this.setStepSound(Block.soundTypeMetal);
setBlockName("lotr:cinderchain");
setBlockTextureName("lotr:cinderchain");
float f = 0.2f;
this.setBlockBounds(0.5f - f, 0.0f, 0.5f - f, 0.5f + f, 1.0f, 0.5f + f);
}
@SideOnly(Side.CLIENT)
@Override
public void registerBlockIcons(IIconRegister iconRegister) {
this.iconItem = new IIcon[chainTypes.length];
for (int i = 0; i < chainTypes.length; ++i) {
this.iconItem[i] = iconRegister.registerIcon(this.getTextureName() + "_" + chainTypes[i] + "_item");
}
this.iconMiddle = new IIcon[chainTypes.length];
this.iconTop = new IIcon[chainTypes.length];
this.iconBottom = new IIcon[chainTypes.length];
this.iconSingle = new IIcon[chainTypes.length];
for (int i = 0; i < chainTypes.length; ++i) {
this.iconMiddle[i] = iconRegister.registerIcon(this.getTextureName() + "_" + chainTypes[i] + "_mid");
this.iconTop[i] = iconRegister.registerIcon(this.getTextureName() + "_" + chainTypes[i] + "_top");
this.iconBottom[i] = iconRegister.registerIcon(this.getTextureName() + "_" + chainTypes[i] + "_bottom");
this.iconSingle[i] = iconRegister.registerIcon(this.getTextureName() + "_" + chainTypes[i] + "_single");
}
}
@SideOnly(Side.CLIENT)
@Override
public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side) {
Block above = world.getBlock(x, y + 1, z);
Block below = world.getBlock(x, y - 1, z);
boolean chainAbove = above instanceof CinderChain;
boolean chainBelow = below instanceof CinderChain;
int meta = world.getBlockMetadata(x, y, z);
if (chainAbove && chainBelow) {
return this.iconMiddle[meta];
}
if (chainAbove) {
return this.iconBottom[meta];
}
if (chainBelow) {
return this.iconTop[meta];
}
return this.iconSingle[meta];
}
@SideOnly(value=Side.CLIENT)
public IIcon getIcon(int i, int j) {
return i == 1 ? this.iconItem[0] : this.iconItem[1];
}
@SideOnly(value=Side.CLIENT)
public String getItemIconName() {
return this.getTextureName();
}
@Override
public int damageDropped(int meta) {
return meta;
}
@SideOnly(Side.CLIENT)
@Override
public void getSubBlocks(Item item, CreativeTabs tab, List list) {
for (int i = 0; i < chainTypes.length; ++i) {
list.add(new ItemStack(item, 1, i));
}
}
@Override
public int onBlockPlaced(World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ, int metadata) {
// The metadata provided here is the metadata of the block being placed (from the item stack).
return metadata; // Return the metadata of the block that should be placed.
}
@Override
public boolean canPlaceBlockAt(World world, int x, int y, int z) {
Block blockAbove = world.getBlock(x, y + 1, z);
int metaAbove = world.getBlockMetadata(x, y + 1, z);
// Get the metadata of the block to be placed (already handled by onBlockPlaced)
int currentMeta = world.getBlockMetadata(x, y, z); // Metadata of the block being placed
// Check if the block above is a chain block and if the metadata matches
if (blockAbove instanceof CinderChain) {
if (metaAbove != currentMeta) {
return false; // Prevent placement of different types of chains
}
return true; // Same type, allow placement
}
// Other checks for fences, walls, slabs, etc.
if (blockAbove instanceof BlockFence || blockAbove instanceof BlockWall) {
return true;
}
if (blockAbove instanceof BlockSlab && !blockAbove.isOpaqueCube() && (metaAbove & 8) == 0) {
return true;
}
if (blockAbove instanceof BlockStairs && (metaAbove & 4) == 0) {
return true;
}
// Check if the block above is solid on the bottom
return blockAbove.isSideSolid(world, x, y + 1, z, ForgeDirection.DOWN);
}
}

@ -0,0 +1,64 @@
package com.zivilon.cinder_loe.blocks;
import com.zivilon.cinder_loe.LoECreativeTabs;
import com.zivilon.cinder_loe.util.Utilities;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import lotr.common.LOTRCreativeTabs;
import lotr.common.block.LOTRBlockBrickBase;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import java.lang.reflect.Field;
import java.util.List;
public class CinderFurBlock extends Block {
protected IIcon[] brickIcons;
protected String[] brickNames;
public CinderFurBlock() {
super(Material.cloth);
this.setCreativeTab(LoECreativeTabs.tabBlockLoE);
setBlockTextureName("lotr:cinderfur");
setBlockName("lotr:cinderfur");
setStepSound(Block.soundTypeCloth);
this.setBrickNames("brown", "gray", "black", "white", "obsidian", "bearblack", "bearbrown", "lion", "lioness");
}
protected void setBrickNames(String ... names) {
this.brickNames = names;
}
@SideOnly(Side.CLIENT)
@Override
public void registerBlockIcons(IIconRegister iconregister) {
this.brickIcons = new IIcon[this.brickNames.length];
for (int i = 0; i < this.brickNames.length; ++i) {
String texturePath = this.getTextureName() + "_" + this.brickNames[i];
System.out.println("Registering texture: " + texturePath); // Debug log
this.brickIcons[i] = iconregister.registerIcon(texturePath);
}
}
@Override
public IIcon getIcon(int side, int meta) {
return this.brickIcons[meta];
}
@Override
public int damageDropped(int meta) {
return meta;
}
@SideOnly(Side.CLIENT)
@Override
public void getSubBlocks(Item item, CreativeTabs tab, List list) {
for (int i = 0; i < this.brickNames.length; ++i) {
list.add(new ItemStack(item, 1, i));
}
}
}

@ -1,5 +1,6 @@
package com.zivilon.cinder_loe.blocks; package com.zivilon.cinder_loe.blocks;
import com.zivilon.cinder_loe.LoECreativeTabs;
import com.zivilon.cinder_loe.util.Utilities; import com.zivilon.cinder_loe.util.Utilities;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
@ -26,15 +27,7 @@ public class CobbleBlock extends Block {
this.setHardness(1.5f); this.setHardness(1.5f);
this.setResistance(10.0f); this.setResistance(10.0f);
this.setStepSound(Block.soundTypeStone); this.setStepSound(Block.soundTypeStone);
this.setCreativeTab(LoECreativeTabs.tabBlockLoE);
try {
Field tabField = LOTRCreativeTabs.class.getDeclaredField("tabBlock"); // Stupid workaround because ForgeGradle tries to obfuscate field LOTRCreativeTabs.tabBlock when it's not supposed to
LOTRCreativeTabs tab = (LOTRCreativeTabs)tabField.get(null);
setCreativeTab((CreativeTabs)tab);
} catch (NoSuchFieldException | IllegalAccessException e) {
e.printStackTrace();
}
setBlockTextureName("lotr:cindercobble"); setBlockTextureName("lotr:cindercobble");
setBlockName("lotr:cindercobble"); setBlockName("lotr:cindercobble");
this.setBrickNames("drystone", "mordor"); this.setBrickNames("drystone", "mordor");

@ -1,5 +1,6 @@
package com.zivilon.cinder_loe.blocks; package com.zivilon.cinder_loe.blocks;
import com.zivilon.cinder_loe.LoECreativeTabs;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
import lotr.common.LOTRCreativeTabs; import lotr.common.LOTRCreativeTabs;
@ -15,13 +16,7 @@ public class FishBarrel extends StaticBlockBase3 {
public FishBarrel() { public FishBarrel() {
super(Material.wood, "lotr:fishbarrel"); super(Material.wood, "lotr:fishbarrel");
try { this.setCreativeTab(LoECreativeTabs.tabDecoLoE);
Field tabField = LOTRCreativeTabs.class.getDeclaredField("tabDeco"); // Stupid workaround because ForgeGradle tries to obfuscate field LOTRCreativeTabs.tabBlock when it's not supposed to
LOTRCreativeTabs tab = (LOTRCreativeTabs)tabField.get(null);
setCreativeTab((CreativeTabs)tab);
} catch (NoSuchFieldException | IllegalAccessException e) {
e.printStackTrace();
}
setStepSound(Block.soundTypeWood); setStepSound(Block.soundTypeWood);
setBlockName("lotr:fishbarrel"); setBlockName("lotr:fishbarrel");
setHardness(1.0F); setHardness(1.0F);

@ -1,5 +1,6 @@
package com.zivilon.cinder_loe.blocks; package com.zivilon.cinder_loe.blocks;
import com.zivilon.cinder_loe.LoECreativeTabs;
import com.zivilon.cinder_loe.blocks.RotatableBlockBase3; import com.zivilon.cinder_loe.blocks.RotatableBlockBase3;
import lotr.common.LOTRCreativeTabs; import lotr.common.LOTRCreativeTabs;
import net.minecraft.block.Block; import net.minecraft.block.Block;
@ -12,13 +13,7 @@ import java.lang.reflect.Field;
public class FurBundle extends RotatableBlockBase3 { public class FurBundle extends RotatableBlockBase3 {
public FurBundle() { public FurBundle() {
super(Material.cloth, "lotr:furBundle"); super(Material.cloth, "lotr:furBundle");
try { this.setCreativeTab(LoECreativeTabs.tabDecoLoE);
Field tabField = LOTRCreativeTabs.class.getDeclaredField("tabDeco"); // Stupid workaround because ForgeGradle tries to obfuscate field LOTRCreativeTabs.tabBlock when it's not supposed to
LOTRCreativeTabs tab = (LOTRCreativeTabs)tabField.get(null);
setCreativeTab((CreativeTabs)tab);
} catch (NoSuchFieldException | IllegalAccessException e) {
e.printStackTrace();
}
setStepSound(Block.soundTypeCloth); setStepSound(Block.soundTypeCloth);
setBlockName("lotr:furBundle"); setBlockName("lotr:furBundle");
setHardness(0.5F); setHardness(0.5F);

@ -1,5 +1,6 @@
package com.zivilon.cinder_loe.blocks; package com.zivilon.cinder_loe.blocks;
import com.zivilon.cinder_loe.LoECreativeTabs;
import com.zivilon.cinder_loe.blocks.RotatableBlockBase3; import com.zivilon.cinder_loe.blocks.RotatableBlockBase3;
import lotr.common.LOTRCreativeTabs; import lotr.common.LOTRCreativeTabs;
import net.minecraft.block.Block; import net.minecraft.block.Block;
@ -12,13 +13,7 @@ import java.lang.reflect.Field;
public class LeatherBundle extends RotatableBlockBase3 { public class LeatherBundle extends RotatableBlockBase3 {
public LeatherBundle() { public LeatherBundle() {
super(Material.cloth, "lotr:leatherBundle"); super(Material.cloth, "lotr:leatherBundle");
try { this.setCreativeTab(LoECreativeTabs.tabDecoLoE);
Field tabField = LOTRCreativeTabs.class.getDeclaredField("tabDeco"); // Stupid workaround because ForgeGradle tries to obfuscate field LOTRCreativeTabs.tabBlock when it's not supposed to
LOTRCreativeTabs tab = (LOTRCreativeTabs)tabField.get(null);
setCreativeTab((CreativeTabs)tab);
} catch (NoSuchFieldException | IllegalAccessException e) {
e.printStackTrace();
}
setStepSound(Block.soundTypeCloth); setStepSound(Block.soundTypeCloth);
setBlockName("lotr:leatherBundle"); setBlockName("lotr:leatherBundle");
setHardness(0.5F); setHardness(0.5F);

@ -1,5 +1,6 @@
package com.zivilon.cinder_loe.blocks; package com.zivilon.cinder_loe.blocks;
import com.zivilon.cinder_loe.LoECreativeTabs;
import com.zivilon.cinder_loe.blocks.RotatableBlockBase3; import com.zivilon.cinder_loe.blocks.RotatableBlockBase3;
import lotr.common.LOTRCreativeTabs; import lotr.common.LOTRCreativeTabs;
import net.minecraft.block.Block; import net.minecraft.block.Block;
@ -12,13 +13,7 @@ import java.lang.reflect.Field;
public class ReedBale extends RotatableBlockBase3 { public class ReedBale extends RotatableBlockBase3 {
public ReedBale() { public ReedBale() {
super(Material.grass, "lotr:reedBale"); super(Material.grass, "lotr:reedBale");
try { setCreativeTab(LoECreativeTabs.tabDecoLoE);
Field tabField = LOTRCreativeTabs.class.getDeclaredField("tabDeco"); // Stupid workaround because ForgeGradle tries to obfuscate field LOTRCreativeTabs.tabBlock when it's not supposed to
LOTRCreativeTabs tab = (LOTRCreativeTabs)tabField.get(null);
setCreativeTab((CreativeTabs)tab);
} catch (NoSuchFieldException | IllegalAccessException e) {
e.printStackTrace();
}
setStepSound(Block.soundTypeGrass); setStepSound(Block.soundTypeGrass);
setBlockName("lotr:reedBale"); setBlockName("lotr:reedBale");
setHardness(0.5F); setHardness(0.5F);

@ -1,5 +1,6 @@
package com.zivilon.cinder_loe.blocks; package com.zivilon.cinder_loe.blocks;
import com.zivilon.cinder_loe.LoECreativeTabs;
import lotr.common.LOTRCreativeTabs; import lotr.common.LOTRCreativeTabs;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
@ -19,13 +20,7 @@ public class RunedDwarvenBrick extends Block {
public RunedDwarvenBrick() { public RunedDwarvenBrick() {
super(Material.rock); // Choose the appropriate material super(Material.rock); // Choose the appropriate material
try { setCreativeTab(LoECreativeTabs.tabDecoLoE);
Field tabField = LOTRCreativeTabs.class.getDeclaredField("tabDeco"); // Stupid workaround because ForgeGradle tries to obfuscate field LOTRCreativeTabs.tabBlock when it's not supposed to
LOTRCreativeTabs tab = (LOTRCreativeTabs)tabField.get(null);
setCreativeTab((CreativeTabs)tab);
} catch (NoSuchFieldException | IllegalAccessException e) {
e.printStackTrace();
}
// Set other properties like hardness, resistance, name, etc. // Set other properties like hardness, resistance, name, etc.
setHardness(2.0F); setHardness(2.0F);
setResistance(5.0F); setResistance(5.0F);

@ -1,5 +1,6 @@
package com.zivilon.cinder_loe.blocks; package com.zivilon.cinder_loe.blocks;
import com.zivilon.cinder_loe.LoECreativeTabs;
import com.zivilon.cinder_loe.util.Utilities; import com.zivilon.cinder_loe.util.Utilities;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
@ -16,13 +17,7 @@ public class cutDrystone extends Block {
public cutDrystone() { public cutDrystone() {
super(Material.rock); // Choose the appropriate material super(Material.rock); // Choose the appropriate material
// Set other properties like hardness, resistance, name, etc. // Set other properties like hardness, resistance, name, etc.
try { this.setCreativeTab(LoECreativeTabs.tabBlockLoE);
Field tabField = LOTRCreativeTabs.class.getDeclaredField("tabBlock"); // Stupid workaround because ForgeGradle tries to obfuscate field LOTRCreativeTabs.tabBlock when it's not supposed to
LOTRCreativeTabs tab = (LOTRCreativeTabs)tabField.get(null);
setCreativeTab((CreativeTabs)tab);
} catch (NoSuchFieldException | IllegalAccessException e) {
e.printStackTrace();
}
setHardness(2.0F); setHardness(2.0F);
setResistance(5.0F); setResistance(5.0F);
setBlockTextureName(Utilities.toSnakeCase("lotr:cut_drystone")); setBlockTextureName(Utilities.toSnakeCase("lotr:cut_drystone"));

@ -1,5 +1,6 @@
package com.zivilon.cinder_loe.blocks; package com.zivilon.cinder_loe.blocks;
import com.zivilon.cinder_loe.LoECreativeTabs;
import com.zivilon.cinder_loe.util.Utilities; import com.zivilon.cinder_loe.util.Utilities;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
@ -15,13 +16,7 @@ public class reeflessCoral extends Block {
public reeflessCoral() { public reeflessCoral() {
super(Material.rock); // Choose the appropriate material super(Material.rock); // Choose the appropriate material
try { setCreativeTab(LoECreativeTabs.tabBlockLoE);
Field tabField = LOTRCreativeTabs.class.getDeclaredField("tabDeco"); // Stupid workaround because ForgeGradle tries to obfuscate field LOTRCreativeTabs.tabBlock when it's not supposed to
LOTRCreativeTabs tab = (LOTRCreativeTabs)tabField.get(null);
setCreativeTab((CreativeTabs)tab);
} catch (NoSuchFieldException | IllegalAccessException e) {
e.printStackTrace();
}
// Set other properties like hardness, resistance, name, etc. // Set other properties like hardness, resistance, name, etc.
setHardness(2.0F); setHardness(2.0F);
setResistance(5.0F); setResistance(5.0F);

@ -0,0 +1,56 @@
package com.zivilon.cinder_loe.items;
import com.zivilon.cinder_loe.LoECreativeTabs;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import java.util.List;
public class CinderFurItem extends Item {
public IIcon[] icons;
public CinderFurItem() {
super();
this.setCreativeTab(LoECreativeTabs.tabMiscLoE);
setHasSubtypes(true);
}
@Override
public void registerIcons(IIconRegister iconRegister) {
icons = new IIcon[7];
for (int i = 0; i < 7; i++) {
icons[i] = iconRegister.registerIcon("lotr:cinder_fur_item_" + i);
}
}
@Override
public String getUnlocalizedName(ItemStack item) {
return "item.cinder_fur_item_" + item.getItemDamage();
}
@Override
public IIcon getIconIndex(ItemStack item) {
return getIcon(item, 0);
}
@Override
public IIcon getIcon(ItemStack stack, int renderPass) {
int dmg = stack.getItemDamage();
// Ensure dmg is within the expected range of subtypes
if (dmg < 7) {
return icons[dmg];
}
return icons[0]; // Default to 0 if out of bounds
}
@Override
public void getSubItems(Item item, CreativeTabs tab, List list) {
for (int i = 0; i < 7; i++) {
list.add(new ItemStack(item, 1, i));
}
}
}

@ -163,14 +163,18 @@ public class recipes {
'X', Items.fish)); 'X', Items.fish));
//GameRegistry.addRecipe((IRecipe)new ShapedOreRecipe(new ItemStack(CinderLoE.rustedsword, 8), new Object[] { "X", "y", "y", //GameRegistry.addRecipe((IRecipe)new ShapedOreRecipe(new ItemStack(CinderLoE.rustedsword, 8), new Object[] { "X", "y", "y",
//Character.valueOf('Y'), Items.iron_ingot, Character.valueOf('X'), "stickWood"})); //Character.valueOf('Y'), Items.iron_ingot, Character.valueOf('X'), "stickWood"}));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(CinderLoE.silverChain, 8), "X", "X", "X", GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(CinderLoE.cinderchain, 8, 0),
'X', LOTRMod.silver)); "X", "X", "X",
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(CinderLoE.goldChain, 8), "X", "X", "X", 'X', LOTRMod.bronze));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(CinderLoE.cinderchain, 8, 1),
"X", "X", "X",
'X', Items.gold_ingot)); 'X', Items.gold_ingot));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(CinderLoE.ironChain, 8), "X", "X", "X", GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(CinderLoE.cinderchain, 8, 2),
"X", "X", "X",
'X', LOTRMod.silver));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(CinderLoE.cinderchain, 8, 3),
"X", "X", "X",
'X', Items.iron_ingot)); 'X', Items.iron_ingot));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(CinderLoE.bronzeChain, 8), "X", "X", "X",
'X', LOTRMod.bronze));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(CinderLoE.cindercobble, 4, 0), "XX", "XX", GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(CinderLoE.cindercobble, 4, 0), "XX", "XX",
'X', LOTRMod.cobblebrick)); 'X', LOTRMod.cobblebrick));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(CinderLoE.cutDrystone, 4), "XX", "XX", GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(CinderLoE.cutDrystone, 4), "XX", "XX",

Binary file not shown.

After

Width:  |  Height:  |  Size: 955 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 980 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 237 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 266 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 266 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 215 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 212 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 235 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 235 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 941 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 933 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 365 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 328 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

Loading…
Cancel
Save