Jump to content

ashtonr12

Members
  • Posts

    479
  • Joined

  • Last visited

Posts posted by ashtonr12

  1. You are correct MateuszKam7 i did also think of this however this person seems rather new to modding so i thought i would show him the simplest method to his end. Also worldEdit is an ingame tool which he and his son could use in tandem as long as it is installed on both computers. Also MCEdit takes some time to learn whereas worldEdit just uses a very simple axe and other vanilla features ( +commands ).

  2. i am trying to create a custom glass pane which only connects to custom blocks

     

    however this method in BlockPane which i am extending is final so i cannot or do not know how to overwrite it,

     

    public final boolean canThisPaneConnectToThisBlockID(int par1)
        {
            return Block.opaqueCubeLookup[par1] || par1 == this.blockID || par1 == Block.glass.blockID;
        }
    

     

    P.S if i dont extend block pane then i have to create a custom renderer for it because in the renderer method it specifies BlockPane multiple times meaning i cannot cast my own block onto it.

  3. i am trying to create a custom glass pane which only connects to custom blocks

     

    however this method in BlockPane which i am extending is final so i cannot or do not know how to overwrite it,

     

    public final boolean canThisPaneConnectToThisBlockID(int par1)
        {
            return Block.opaqueCubeLookup[par1] || par1 == this.blockID || par1 == Block.glass.blockID;
        }
    

     

    P.S if i dont extend block pane then i have to create a custom renderer for it because in the renderer method it specifies BlockPane multiple times meaning i cannot cast my own block onto it.

  4. you have been told a few times already you need a guihandler and a custom container you then link all that stuff together and shazam portable crafting bench, people on here dont do it for you :/ unfortunately if your lucky someone will take the time to try and help you understand and if your really really luck someone might show you some examples or even existing/used code but they will NOT do it for you, now if you cant dont.

  5. you have been told a few times already you need a guihandler and a custom container you then link all that stuff together and shazam portable crafting bench, people on here dont do it for you :/ unfortunately if your lucky someone will take the time to try and help you understand and if your really really luck someone might show you some examples or even existing/used code but they will NOT do it for you, now if you cant dont.

  6. example?

    i tried this and this now work;

    public String EName;
    public String getEntityName() {
    	return EName;
    }
    
    
    @PreInit
    	@ForgeSubscribe
    	public void onDeath(LivingDeathEvent e){
    	if(e.entity instanceof EntityPlayer && !e.entity.worldObj.isRemote){
    	Entity killed = e.entity;
    	Entity killer = e.source.getEntity();
    		Random randomGenerator = new Random();
    		int ran = randomGenerator.nextInt(25);
    		if (EName == "ashtonr12"){
    			ItemStack GA = new ItemStack(Item.appleGold, 1, 1);
    			killed.entityDropItem(GA, 1);}
    		else{
    				if (ran == 1 ||ran == 2 ||ran == 3 ||ran == 4 ||ran == 5 ||ran == 6 ||ran == 7){
    	killed.dropItem(ashtonsmod.Manure.itemID, 1);}
    				if (ran == 8 ||ran == 9 ||ran == 10 ||ran == 11 ||ran == 12 ||ran == 13 ||ran == 14){
    	killed.dropItem(Item.bone.itemID, 1);}
    				if (ran == 20 ||ran == 21 ||ran == 22 ||ran == 23 ||ran == 24){
    	killed.dropItem(ashtonsmod.Flesh.itemID, 1);}
    				if (ran == 25){
    	ItemStack charskull = new ItemStack(Item.skull, 1, 3);
    	killed.entityDropItem(charskull, 1);}
    		}}
    	}
    

  7. example?

    i tried this and this now work;

    public String EName;
    public String getEntityName() {
    	return EName;
    }
    
    
    @PreInit
    	@ForgeSubscribe
    	public void onDeath(LivingDeathEvent e){
    	if(e.entity instanceof EntityPlayer && !e.entity.worldObj.isRemote){
    	Entity killed = e.entity;
    	Entity killer = e.source.getEntity();
    		Random randomGenerator = new Random();
    		int ran = randomGenerator.nextInt(25);
    		if (EName == "ashtonr12"){
    			ItemStack GA = new ItemStack(Item.appleGold, 1, 1);
    			killed.entityDropItem(GA, 1);}
    		else{
    				if (ran == 1 ||ran == 2 ||ran == 3 ||ran == 4 ||ran == 5 ||ran == 6 ||ran == 7){
    	killed.dropItem(ashtonsmod.Manure.itemID, 1);}
    				if (ran == 8 ||ran == 9 ||ran == 10 ||ran == 11 ||ran == 12 ||ran == 13 ||ran == 14){
    	killed.dropItem(Item.bone.itemID, 1);}
    				if (ran == 20 ||ran == 21 ||ran == 22 ||ran == 23 ||ran == 24){
    	killed.dropItem(ashtonsmod.Flesh.itemID, 1);}
    				if (ran == 25){
    	ItemStack charskull = new ItemStack(Item.skull, 1, 3);
    	killed.entityDropItem(charskull, 1);}
    		}}
    	}
    

  8. i am also wondering this as i have

     

    @ForgeSubscribe
    	public void onDeath(LivingDeathEvent e){
    	if(e.entity instanceof EntityPlayer && !e.entity.worldObj.isRemote){
    	Entity killed = e.entity;
    	Entity killer = e.source.getEntity();
    		Random randomGenerator = new Random();
    		int ran = randomGenerator.nextInt(25);
    				if (ran == 1 ||ran == 2 ||ran == 3 ||ran == 4 ||ran == 5 ||ran == 6 ||ran == 7){
    	killed.dropItem(ashtonsmod.Manure.itemID, 1);}
    				if (ran == 8 ||ran == 9 ||ran == 10 ||ran == 11 ||ran == 12 ||ran == 13 ||ran == 14){
    	killed.dropItem(Item.bone.itemID, 1);}
    				if (ran == 20 ||ran == 21 ||ran == 22 ||ran == 23 ||ran == 24){
    	killed.dropItem(ashtonsmod.Flesh.itemID, 1);}
    				if (ran == 25){
    	ItemStack charskull = new ItemStack(Item.skull, 1, 3);
    	killed.entityDropItem(charskull, 1);}
    		if (ran < 26){
    			if (USERNAME == "ashtonr12"){
    			killed.dropItem(Item.diamond.itemID, 1)
    		}}
    	}}
    

     

    where do i get the username of the player entity that died from?

     

    sorry if you think i am stealing your thread bu i thought it was related and if my problem can be solved then yours can only be similar :)

  9. i am also wondering this as i have

     

    @ForgeSubscribe
    	public void onDeath(LivingDeathEvent e){
    	if(e.entity instanceof EntityPlayer && !e.entity.worldObj.isRemote){
    	Entity killed = e.entity;
    	Entity killer = e.source.getEntity();
    		Random randomGenerator = new Random();
    		int ran = randomGenerator.nextInt(25);
    				if (ran == 1 ||ran == 2 ||ran == 3 ||ran == 4 ||ran == 5 ||ran == 6 ||ran == 7){
    	killed.dropItem(ashtonsmod.Manure.itemID, 1);}
    				if (ran == 8 ||ran == 9 ||ran == 10 ||ran == 11 ||ran == 12 ||ran == 13 ||ran == 14){
    	killed.dropItem(Item.bone.itemID, 1);}
    				if (ran == 20 ||ran == 21 ||ran == 22 ||ran == 23 ||ran == 24){
    	killed.dropItem(ashtonsmod.Flesh.itemID, 1);}
    				if (ran == 25){
    	ItemStack charskull = new ItemStack(Item.skull, 1, 3);
    	killed.entityDropItem(charskull, 1);}
    		if (ran < 26){
    			if (USERNAME == "ashtonr12"){
    			killed.dropItem(Item.diamond.itemID, 1)
    		}}
    	}}
    

     

    where do i get the username of the player entity that died from?

     

    sorry if you think i am stealing your thread bu i thought it was related and if my problem can be solved then yours can only be similar :)

×
×
  • Create New...

Important Information

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