Jump to content

Ischta

Members
  • Posts

    9
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

Ischta's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Ischta

    StoneWall

    Thanks for hint in last step i had to replace "getBlockTextureFromSide(side)" with "getIcon(side,meta)" and now i can catch textures form metablocks and all works fine ... greetings /closed
  2. Ischta

    StoneWall

    package net.kaldarin.compilation; import java.util.List; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.BlockWall; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.init.Blocks; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; public class StoneWall extends BlockWall { public StoneWall(Block block) { super(Blocks.sandstone); } @SideOnly(Side.CLIENT) public IIcon getIcon(int p_149691_1_, int p_149691_2_) { return Blocks.sandstone.getBlockTextureFromSide(p_149691_1_); } @SideOnly(Side.CLIENT) public void getSubBlocks(Item p_149666_1_, CreativeTabs p_149666_2_, List p_149666_3_) { p_149666_3_.add(new ItemStack(p_149666_1_, 1, 0)); } } ok, it works, but not so i'd like it. I had delete the subID from stonewall and set the sandstone. So fare so good. but how can i make a multiclass for different wall block textures. I know i must use for "Blocks.sandstone" a placeholder variable to manage different textures ... but how ? ...
  3. Ischta

    StoneWall

    every time i got a "java.lang.NullPointerException" -.- i would like to create only a new wallblock with sandstone texture ... and if its possible with one classs to set diffrenet blocks with different textures ... the multi-texture blocks are very simple ... but the stonewall is horrible
  4. package net.my.compilation; import net.minecraft.block.BlockWall; import net.minecraft.creativetab.CreativeTabs; public class StoneWall extends BlockWall { public StoneWall(Block p_i45435_1_) { super(p_i45435_1_); } @Override public boolean isOpaqueCube() { return false; } } and sandstonewall = (StoneWall) new StoneWall().setBlockName("sandstonewall").setCreativeTab(tabNewBlocks).setResistance(5.0F); Question ... what means "p_i45435_1_" and what must passt to BlockWall class ?? i will try to get a new wall block to set with new textures like sandstone or something else ...
  5. Hi, i had a new Class for consumable Items. And now i would like to get back a empty bottle (glassbottle) if the item was used (like the potions). I had find at the potion code something like: but i get several errors if i try to implement this in my class so i need some help or ideas. package mymodding; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumAction; import net.minecraft.item.Item; import net.minecraft.item.ItemFood; import net.minecraft.item.ItemStack; import net.minecraft.world.World; public class DrinkBasis extends ItemFood { private String filename; public DrinkBasis(int par1, int par2, float par3, boolean par4) { super(par1, par2, par3, par4); } public EnumAction getItemUseAction(ItemStack par1ItemStack) { + Attachments and other options return EnumAction.drink; } @SideOnly(Side.CLIENT) public void registerIcons(IconRegister reg){ this.itemIcon = reg.registerIcon(filename); } public void setIconFile(String name){ filename = name; } }
  6. nope ... the same as if() ... the default would only used, when side is something other then 0 till 5 ... but i would like to check IF the side is 1 but ther is no top-texture in folder ... THEN he should use the BlockIcon ...
  7. register Textures: @SideOnly(Side.CLIENT) public void registerIcons(IconRegister reg){ this.blockIcon = reg.registerIcon(textureName); this.topTexture = reg.registerIcon(textureName + "_top"); this.bottomTexture = reg.registerIcon(textureName + "_bottom"); this.northTexture = reg.registerIcon(textureName + "_north"); this.southTexture = reg.registerIcon(textureName + "_south"); this.westTexture = reg.registerIcon(textureName + "_west"); this.eastTexture = reg.registerIcon(textureName + "_east"); } 1: yes, i do 2: with registerIcons() 3: yes ... assets/mymod/texture/blocks/xyz.png if i put all 6 textures in this folder the block looks fine. But if i only use different textures for 1 oder 2 different sides, i must make every time 6 textures ... and that's the point.
  8. if ( this.bottomTexture == null ) { return this.blockIcon; } else { return this.bottomTexture; } like this ?? doesn't work ! i get textures of emptyness
  9. public Icon getIcon(int side, int meta){ if (side == 0){ return this.bottomTexture; } else if(side == 1){ return this.topTexture; } else if(side == 2){ return this.northTexture; } else if(side == 3){ return this.southTexture; } else if(side == 4){ return this.westTexture; } else if(side == 5){ return this.eastTexture; } return this.blockIcon; } Thats what i have. how could i change it, so that if a side-texture not exist (the file), MC fall back to blockIcon ... in my case i will always see missing-black-pink-texture instead of the default i have tryed to set a "if exist()" file proof but without a solvation.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.