Jump to content

Chlod

Members
  • Posts

    9
  • Joined

  • Last visited

Posts posted by Chlod

  1. I have a cow. He's just basic, doesn't even have a walking animation. So, I want to get a custom milk bucket from him, the filled bucket is named "GMMilk."

     

    What I wish to learn: How to get that milk bucket instead of the normal one

    So... breakdown.

    1. Right click the custom cow with an empty vanilla bucket

    2. Get a "GMMilk" bucket but NOT a "milk_bucket" bucket

     

    Thanks in advance! Have a nice day :)

  2. I did it! Thanks guys! :D

    Here's the results:

    @EventHandler
    public void getPlayer(EntityJoinWorldEvent event){
    	//Credits: Matryoshika, Ernio and coolAlias on the Minecraft Forge Forums
            if(event.entity instanceof EntityPlayer){
                    EntityPlayer player = Minecraft.getMinecraft().thePlayer; 
                        player.addChatMessage(new ChatComponentText("text));
            }
    }

  3. PlayerLoggedInEvent, though I believe this event is fired only on the server side; if so and you absolutely must have an event that is fired on the client side (i.e. your mod is a client-side only mod), you can use EntityJoinWorldEvent and check for EntityPlayer before sending the message.

    So now, what do I do to check if the Entity is a player, and how do I send the message?

     

    EDIT: I can't find a tutorial for this exact version and topic on Google, so don't ask me to Google it. Done that already.

  4. What do I do if I want a block to rotate. Similar to the furnace, when you place it, it always gets placed with the front facing you. Thanks.

     

    package com.chlod.golf.Blocks;
    
    import cpw.mods.fml.relauncher.Side;
    import cpw.mods.fml.relauncher.SideOnly;
    import net.minecraft.block.Block;
    import net.minecraft.block.material.Material;
    import net.minecraft.client.renderer.texture.IIconRegister;
    import net.minecraft.entity.EntityLivingBase;
    import net.minecraft.item.ItemStack;
    import net.minecraft.util.IIcon;
    import net.minecraft.util.MathHelper;
    import net.minecraft.world.World;
    
    public class Slide extends Block{
    
    protected Slide(Material p_i45394_1_) {
    	super(p_i45394_1_);
            this.slipperiness = 1.5F;
            this.setTickRandomly(true);
    }
    
    }
    

×
×
  • Create New...

Important Information

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