Jump to content

sorash67

Members
  • Posts

    85
  • Joined

  • Last visited

Posts posted by sorash67

  1. hehe seen every single one of them as i said in the OP! :P the tutorial one explained very little! i did try using his method and went a little further, but it doesnt load properly on the player, even though it does as an item with special render in the hand! :/

     

    thanks anyways! :)

     

    -sorash67 || Skorpio

  2. I know this has been asked many times before, because i've looked at every single topic relating to this! However after trying many things, i failed to get it working! I would provide any code if i had anything relevant that could lead to something, but i really dont think i got far! I've looked at the source for MachineMuse's mod, but its too complicated and i couldnt take much from it! i've also seen LexManos' comment on "getArmorModel()" in Item.class but messed around with that and nothing! Just to make sure it even works, i assigned the model and render classes to an item and it works fine! however when equipped as armor, it manages to not work! Any suggestions would be absolutely appreciated!

     

    -sorash67 || Skorpio

  3. to be honest, your code seems to look like it's from 1.5.2! what i suggest is try copying the 1.6 files for the furnace and tweak them and see how that goes! also one more thing! in your main mod class, make sure your instance goes with your mod id! so like this:

    @Instance(machines) //machines is the modID
    

     

    -sorash67 || Skorpio

  4. im not entirely sure what you did with the code but this is what i use:

        public void registerIcons(IconRegister par1IconRegister)
        {
            this.itemIcon = par1IconRegister.registerIcon("mymod:myItem|Block");
        }
    

     

    and as for where the textures go, no they don't go in a "bin" folder anymore! you put them in "mcp\src\minecraft\assets\yourmod(with NO CAPITALS)\items|blocks\.png files"

     

    -sorash67 || Skorpio

  5. hmm... in your block class, this might work:

    public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9)
    {
    	if (par1World.isRemote)
    	{
    		return true;
    	}
    	else
    	{
    		TileEntityYourFurnace tileentityfurnace = (TileEntityYourFurnace)par1World.getBlockTileEntity(par2, par3, par4);
    
    		if (tileentityfurnace != null)
    		{
    			par5EntityPlayer.openGui(YourMod.instance, 0, par1World, par2, par3, par4);
    		}
    
    		return true;
    	}
    }
    

     

    -sorash67 || Skorpio

  6. i believe the problems with your gui handler! try doing this instead of what you have:

     

     

    @Override
    public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
    	TileEntity tile_entity = world.getBlockTileEntity(x, y, z);
    
    	if(tile_entity instanceof TileEntityYourFurnace){
    		return new ContainerYourFurnace(player.inventory, (TileEntityYourFurnace) tile_entity);
    	}
    
    	return null;
            }
    
    @Override
    public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
    	TileEntity tile_entity = world.getBlockTileEntity(x, y, z);
    
    	if(tile_entity instanceof TileEntityYourFurnace){
    		return new GuiYourFurnace(player.inventory, (TileEntityYourFurnace) tile_entity);
    	}
    
    	return null;
             }
    

     

     

     

    hope this helped! :)

     

    -sorash67 || Skorpio

  7. there's 3 different items that are declared as horse armor:

    Item.field_111215_ce (iron)

    Item.field_111216_cf (gold)

    Item.field_111213_cg (diamond)

     

    now the problem is, the way the horse figures out what items are counted as horse armor is in the actual entity class:

        public int func_110260_d(ItemStack par1ItemStack)
        {
            return par1ItemStack == null ? 0 : (par1ItemStack.itemID == Item.field_111215_ce.itemID ? 1 : (par1ItemStack.itemID == Item.field_111216_cf.itemID ? 2 : (par1ItemStack.itemID == Item.field_111213_cg.itemID ? 3 : 0)));
        }
    

     

    so that leaves us with only 2 ways of adding custom horse armor:

    1) screw it and just make a coremod and edit base class files, or

    2) make a new entity that copies horses, but changes what items are its armor, and disable vanilla horses, that way no base class edits are done, however, it could still cause problems!

     

    it's up to you what you do! :P

     

    -sorash67 || Skorpio

  8. feels weird to bump an old topic, but im having the error of "Attempted to load class net/minecraft/client/multiplayer/WorldClient for invalid side SERVER" and "java.lang.ClassNotFoundException: net.minecraft.client.multiplayer.WorldClient" when i put the effect on one of my entities! and no i didn't declare it like he did! this is my main particle class:

     

     

    package moreores.particles;
    
    public class MoreOresParticleEffects
    {
    private static Minecraft mc = Minecraft.getMinecraft();
    private static World theWorld = mc.theWorld;
    
    public static EntityFX spawnParticle(String particleName, double par2, double par4, double par6, double par8, double par10, double par12)
    {
    if (mc != null && mc.renderViewEntity != null && mc.effectRenderer != null)
    {
    int var14 = mc.gameSettings.particleSetting;
    
    if (var14 == 1 && theWorld.rand.nextInt(3) == 0)
    {
    var14 = 2;
    }
    
    double var15 = mc.renderViewEntity.posX - par2;
    double var17 = mc.renderViewEntity.posY - par4;
    double var19 = mc.renderViewEntity.posZ - par6;
    EntityFX var21 = null;
    double var22 = 16.0D;
    
    if (var15 * var15 + var17 * var17 + var19 * var19 > var22 * var22)
    {
    return null;
    }
    else if (var14 > 1)
    {
    return null;
    }
    else
    {
    if (particleName.equals("blueSlime"))
    {
    				var21 = new EntityBreakingFX(theWorld, par2, par4, par6, MoreOres.blueJelly);
    			}
    
    
    mc.effectRenderer.addEffect((EntityFX)var21);
    return (EntityFX)var21;
    }
    }
    return null;
    }
    }
    

     

     

     

    and this is how i put it in my entity class:

     

     

                    MoreOresParticleEffects.spawnParticle("blueSlime", this.posX + (double)f2, this.boundingBox.minY, this.posZ + (double)f3, 0.0D, 0.0D, 0.0D); //i dont think the params matter much for this case
    

     

     

     

    any ideas what i could do to make it not crash the server? xD

     

    -sorash67 || Skorpio

     

×
×
  • Create New...

Important Information

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