Jump to content

piotr_a3

Members
  • Posts

    6
  • Joined

  • Last visited

Everything posted by piotr_a3

  1. So, can you please tell me how I should do this?
  2. But, Jacky said that Minecraft.getMinecraft() is clientside only. What should I do with this?
  3. How I can get the Wolf entity at the server? btw. wolf.setOwner do not exist aiSit is not visible playTameEffect is not visible too
  4. Hi What's wrong with this piece of code? I just want to have a sword which behaves like a Bone, so you can tame a wolf with this sword using right click. package xeno.mci.swords2; import java.util.List; import java.util.Random; import scala.Int; import net.minecraft.client.Minecraft; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.boss.EntityWither; import net.minecraft.entity.passive.EntityWolf; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.item.ItemSword; import net.minecraft.pathfinding.PathEntity; import net.minecraft.util.DamageSource; import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.MovingObjectPosition.MovingObjectType; import net.minecraft.world.World; import xeno.mci.swords.mciSwords; public class sWilczyMiecz extends ItemSword { public sWilczyMiecz(ToolMaterial material) { super(material); //setMaxStackSize(1); this.setCreativeTab(mciSwords.ctab2); this.setUnlocalizedName("wilczymiecz"); this.setTextureName("mciswords:2wilczymiecz"); } public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) { par3List.add("MCI #2 - Miecze"); par3List.add("Miejsce #3"); par3List.add("Autor: HeadPhoneKiller"); } @Override public boolean itemInteractionForEntity(ItemStack p1, EntityPlayer p2, EntityLivingBase p3) { return true; } public ItemStack onItemRightClick(ItemStack p1, World p2, EntityPlayer p3) { if(Minecraft.getMinecraft().objectMouseOver.entityHit != null){ if(Minecraft.getMinecraft().objectMouseOver.entityHit instanceof EntityLiving){ EntityLiving ent = (EntityLiving) Minecraft.getMinecraft().objectMouseOver.entityHit; //System.out.println("DEBUG1"); ItemStack bone = new ItemStack(Items.bone, 32); p3.setCurrentItemOrArmor(0, bone); p3.interactWith(ent); } } return p1; } }
  5. ok, it finally worked I've made a fresh install of ForgeGradle, and then did again setupDecompWorkspace with --refresh-dependencies. Before reinstalling forgegradle it didn't work.
  6. @up it didn't help I have the same problem. [15:32:28] [main/INFO] [GradleStart]: No arguments specified, assuming client. [15:32:28] [main/INFO] [GradleStart]: Extra: [] Exception in thread "main" java.lang.RuntimeException: java.io.FileNotFoundException: C:\Users\Xeno\.gradle\caches\minecraft\assets\indexes\{ASSET_INDEX}.json (Nie można odnaleźć określonego pliku) at com.google.common.base.Throwables.propagate(Throwables.java:160) at GradleStart.setupAssets(GradleStart.java:274) at GradleStart.startClient(GradleStart.java:82) at GradleStart.main(GradleStart.java:56) Caused by: java.io.FileNotFoundException: C:\Users\Xeno\.gradle\caches\minecraft\assets\indexes\{ASSET_INDEX}.json (Nie można odnaleźć określonego pliku) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(Unknown Source) at java.io.FileReader.<init>(Unknown Source) at GradleStart.loadAssetsIndex(GradleStart.java:280) at GradleStart.setupAssets(GradleStart.java:218) ... 2 more
×
×
  • Create New...

Important Information

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