Jump to content

XBeast

Members
  • Posts

    3
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

XBeast's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Can You please tell me how can i store data for entity before spawning them and after that access that data from another class where the same entity has given as argument in method...
  2. That Means i should stop doing this and start modding in 1.14.4 Right? is this as simple as 1.12.2 or its tedious?
  3. First of all Thanks a lot to helping nooobie like me... Minecraft 1.12.2 and forge Version 14.23.5.2768 And if you can guide me tell me hot to do so. I made an custom spawn egg which has all data of entity like texture path and custom name of entity... i am currently trying to spawn my custom entity using that custom egg but i don't know how to set all these attributes of custom entity individually? @Override public EnumActionResult onItemUse(EntityPlayer player, World worldIn, BlockPos pos, EnumHand hand,EnumFacing facing, float hitX, float hitY, float hitZ) { if(!worldIn.isRemote) { name = player.getHeldItem(hand).getTagCompound().getString("Name"); NPC npc = new NPC(worldIn, name); npc.getEntityData().setString("Name", name); npc.setPosition(pos.getX(), pos.getY() + 1, pos.getZ()); if(worldIn.spawnEntity(npc)) { System.out.println(npc.getEntityData().getString("Name")); return EnumActionResult.SUCCESS; } else return EnumActionResult.FAIL; } return EnumActionResult.FAIL; } But this is printing name of that egg properly even i first setting it into entity and then accessing it...
  4. I have made an custom entity which extends entityzombie, Now i want to spawn that entity with nbt data(setting nbt data before spawning) so that i can set different textures to entity in render class(dorender method) according to nbt of that particular entity. I don't know how to do this... please help me...
×
×
  • Create New...

Important Information

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