Jump to content

clowcadia

Members
  • Posts

    458
  • Joined

  • Last visited

Everything posted by clowcadia

  1. Ok yea back to same issue improved the code and its now a one timer https://github.com/Clowcadia/MinecraftForge/blob/f58832dc4f01a47d79d81cd1702c3562077cf539/1.11/NPCTesting/src/main/java/com/clowcadia/test/containers/ContainerBasic.java
  2. also most vanila ai have xyz.....
  3. how can store blockPos in nbt then
  4. is there any easier way to do this private Block getBlock(int x, int y, int z){ BlockPos pos = new BlockPos(x, y, z); IBlockState ibs = test.world.getBlockState(pos); Block block = ibs.getBlock(); return block; }
  5. I still am confused why is it not right to have targetXYZ inside the AITask class to hold information from retrived nbt values of an item.
  6. I understand, i just thought there were premade methods in block/blockstates. it would be nice upon building trees there would be a setlist in array of all tree blocks that belong to one tree, like when u chop down all logs of tree all the tree leaves brake. there must be something like that in code somewhere
  7. How exactly would you determine a logs neighbor/s?
  8. Also kinda working on the same thing, just no idea how to find what one block is connected too like log that connected to another log
  9. ok, for some reason it was an issue, i believe it works now but now i have to call the Item Stack and its nbt and nbt values in continue and update task, is there a shorhand method to this
  10. they were commented in ai, and now they are delete...
  11. almost feel like i should pass the itemStackHandler as an argument of AI Task
  12. .. their commented out...ill delete them...what about my issue...
  13. Ok so inside ItemTarget on use when the NBT is called or created and the values have been set the NBT is SET. so now in the ai during in game, after the ai aknoledges the values the first time , after reusing the iteTarget in a different location and having new values set to its nbt and being reinputted into the entity the ai does not register the new nbt values of the item target AI
  14. ok so the compound is set, but i cant read it after changing the target position
  15. ...stack.setNBTCompount(nbt) is a solution
  16. ShareTag i was using ealrier it work for the first time , and yes no idea what exactly it does, i do have the other option getNBTTagCompount as well though and it also returns null and what do u mean forget about it, what else is supposed to be done? https://github.com/Clowcadia/MinecraftForge/blob/master/1.11/NPCTesting/src/main/java/com/clowcadia/test/entities/living/ai/AIGoto.java#L36
  17. https://github.com/Clowcadia/MinecraftForge/blob/master/1.11/NPCTesting/src/main/java/com/clowcadia/test/entities/living/ai/AIGoto.java#L35-L36
  18. Then how do i read the items nbt from the task ai, everything i tried this far bring null on the calling of the nbt i tried ItemStack.getItem().getSharedNBTTag().getInteger("targetX") ItemStack.getNBTCompoundTag().getInteger("targetX") top of my head examples of what i tried
  19. What this mod is supposed to do is allow the user to have a Target Item that is used by right clicking on a block/block position where the item internal nbt records the block position xyz. An entity that has a container with the gui where the player can then insert the Target item after a location in the Target item has been set to pass the location to the entity to go to. Once the entity reaches the target item target position the player then can take the target item back reset to a new target location to the items nbt and again insert to the entity s gui/container to pass another location to have the entity move to( this is where my mod is not functioning, the reset values of my target item are not passing to entity ai like they have the first time), this can be repeated unlimited times
  20. I am probably not the only one stuck on this...
  21. Entity;s AI target not change when the item target pos changed.
  22. i am seriously tried alot of different methods, and the most succestful once only return success one time, where the targetItem is vaible one use, iwant it multiple uses
  23. ok i did so but now its only a one time thing while running the game, i have to exicute out of the game to give new co-ordinates https://github.com/Clowcadia/MinecraftForge/blob/master/1.11/NPCTesting/src/main/java/com/clowcadia/test/entities/living/ai/AIGoto.java
  24. well both would god but invenory right now
×
×
  • Create New...

Important Information

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