Alright, so im trying to make a custom pressure plate for a mod. And i got everything working but the texture. Ive messed around with it a little bit and learned that it draws on the texture from the block name, or something like that. with regular minecraft blocks they have a string at the front and the pressure plate uses that to call on the texture. so i tried to have it call on my block's name many different ways, ive tried scorchstone_default, scorchstone.default, and tile.scorchstone.default.name. but none of them worked. so then i tried to have it call on the texture using setBlockTextureName(), but that didnt work either. So finally i tried to use the register IIcon to call on the blocks texture and then the texture file, but that didnt work either. So i was wondering if anyone knew how to get a custom texture working for a pressure plate?
MainRegistry Code:
ScorchStonePlate = new BlockScorchStonePressurePlate(Material.rock, BlockScorchStonePressurePlate.Sensitivity.players).setHardness(0.5F).setStepSound(Block.soundTypePiston).setBlockName("scorchstoneplate").setBlockTextureName("thepaleogamer:scorchstone").setCreativeTab(MainRegistry.tabScorchStone);
public class BlockScorchStonePressurePlate extends BlockPressurePlate {
public BlockScorchStonePressurePlate(Material par3Material, BlockPressurePlate.Sensitivity par4) {
super("scorchstone_default", par3Material, par4);
}
//I have run the PROGRAM with nothing below this comment and without @SideOnly or @Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister par1IconRegister)
{
this.blockIcon = MainRegistry.ScorchStone.getBlockTextureFromSide(0);
}
}
Alright, so im trying to make a custom pressure plate for a mod. And i got everything working but the texture. Ive messed around with it a little bit and learned that it draws on the texture from the block name, or something like that. with regular minecraft blocks they have a string at the front and the pressure plate uses that to call on the texture. so i tried to have it call on my block's name many different ways, ive tried scorchstone_default, scorchstone.default, and tile.scorchstone.default.name. but none of them worked. so then i tried to have it call on the texture using setBlockTextureName(), but that didnt work either. So finally i tried to use the register IIcon to call on the blocks texture and then the texture file, but that didnt work either. So i was wondering if anyone knew how to get a custom texture working for a pressure plate?
MainRegistry Code:
ScorchStonePlate = new BlockScorchStonePressurePlate(Material.rock, BlockScorchStonePressurePlate.Sensitivity.players).setHardness(0.5F).setStepSound(Block.soundTypePiston).setBlockName("scorchstoneplate").setBlockTextureName("thepaleogamer:scorchstone").setCreativeTab(MainRegistry.tabScorchStone);
GameRegistry.registerBlock(ScorchStonePlate, ScorchStonePlate.getUnlocalizedName().substring(5));
Block Code
package com.ScorchStoneMod;
import java.util.Iterator;
import java.util.List;
import net.minecraft.block.BlockBasePressurePlate;
import net.minecraft.block.BlockPressurePlate;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.EnumCreatureType;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class BlockScorchStonePressurePlate extends BlockPressurePlate {
public BlockScorchStonePressurePlate(Material par3Material, BlockPressurePlate.Sensitivity par4) {
super("scorchstone_default", par3Material, par4);
}
//I have run the PROGRAM with nothing below this comment and without @SideOnly or @Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister par1IconRegister)
{
this.blockIcon = MainRegistry.ScorchStone.getBlockTextureFromSide(0);
}
}