Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Flockshot

Members
  • Posts

    22
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

Flockshot's Achievements

Tree Puncher

Tree Puncher (2/8)

1

Reputation

  1. What i said previosly about the .zip file working it wasnt that it was the folder of my mod that was working .zip isnt working
  2. I dont think so.Because the armors texture were working fine in eclipse.
  3. I know that but it didnt worked for me until it wasnt in a .zip file extension
  4. Okay sorry i fixed that. If anyone is having the same problem he can do what i did. When i built my mod it give me a .jar file. I just changed the .jar file to .zip file and it worked. Now how to change .jar to .zip. It is simple Extract the files form .jar and then archive it. Well sorry for disturbing guys.
  5. I am facing a very strange problem I created a armor and it worked perfectly in eclipse. But when i built that the texture of the armors were not loading. Here is my armor class public class BlazeArmor extends ItemArmor { public String TexturePath = Refrence.MODID + ":" + "/textures/armors/" ; public BlazeArmor(int par1, EnumArmorMaterial par2EnumArmorMaterial, int par3, int part4, String type) { super(par1, par2EnumArmorMaterial, par3, part4); this.setCreativeTab(CreativeTabs.tabCombat); this.setMaxStackSize(1); this.setTextureName(type, part4); } public void setTextureName( String Type, int part ){ if( armorType == 0 || armorType == 1 || armorType == 3 ){ this.TexturePath += "Armor_1.png"; } else{ this.TexturePath += "Armor_2.png"; } } // public String getArmorTexture( ItemStack itemstack, Entity entity, int slot, int layer){ return this.TexturePath; } @SideOnly(Side.CLIENT) public void registerIcons(IconRegister register){ this.itemIcon = register.registerIcon( Refrence.MODID + ":" + this.getUnlocalizedName().substring( 5 ) ); } }
  6. Can you give example on how to use that
  7. Well as it is a food item so i wanna check if player has ever eaten this which i am storing in the nbt then on tickhandler i wanna check that if the player has ever eaten that and if true then the process carry on if false than break. Actually i am trying to make an infinite potioneffect for the food. That can last even after the player die or close the game or drink milk. I will add a new item which will break this process.
  8. Thanks i am able to add data to nbt but how can i take data from there. I want to use the if statement for the data in TickHandler. I dont know how can i check that. If that nbt key have the proper data saved in it.
  9. I want to do it on an food item. Can you give an example on how can i do this.
  10. Well i want to save a variable that even after user quit the game it remain the same.So how could i make a file in which i could save it.
  11. Can somebody tell me how can i generate my custom fluid pools in overworld
  12. Helo i made a custom fluid but when ever i throw a bucket of water the fluid the water spawn and then become the fluid how can i solve it ,
  13. Here is an example well it will add potion effect ressisstence for some seconds when you are holding the specific item.The seconds will not decrease until you dont have that specific item in hand Its using ClientTickHandler see here how to make 1. In the video he is using server proxy if you are using client proxy change do it in client proxy. Then in TickHandler Class add this package com.Flockshot.UltraDaimond.Proxy; import java.util.EnumSet; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.world.World; import cpw.mods.fml.common.ITickHandler; import cpw.mods.fml.common.TickType; public class ClientTickHandler implements ITickHandler { @Override public void tickStart(EnumSet<TickType> type, Object... tickData) { if(type.equals(EnumSet.of(TickType.PLAYER))) { onPlayerTick((EntityPlayer) tickData[0]); } @Override public void tickEnd(EnumSet<TickType> type, Object... tickData) { } @Override public EnumSet<TickType> ticks() { return EnumSet.of(TickType.PLAYER, TickType.CLIENT); } @Override public String getLabel() { return null; } private void onPlayerTick(EntityPlayer player){ if(player.getCurrentItemOrArmor(0) != null){ ItemStack hand = player.getCurrentItemOrArmor(0); if(hand.getItem() == Your item here ){ //Your item here player.addPotionEffect(new PotionEffect(Potion.resistance.getId(), 10, 0 ) ); } } } }
  14. Thanks i have found the solution @Override public void onEntityCollidedWithBlock( World world, int x, int y, int z, Entity entity ) { entity.attackEntityFrom(DamageSource.magic, 3); //((EntityLiving)entity).addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 200, 1)); }
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.