clowcadia
-
Posts
458 -
Joined
-
Last visited
Posts posted by clowcadia
-
-
also most vanila ai have xyz.....
-
how can store blockPos in nbt then
-
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; }
-
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.
-
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
-
On 2017-03-15 at 10:52 AM, Draco18s said:
TL;DR: You can't insure you only get this tree's leaves. But you can get all of the log blocks.
Every log in a tree is connected to every other log in one of the following ways:
Up
North
South
East
West
NE
NW
SE
SW
Up+North
Up+South
Up+East
Up+West
Up+NE
Up+NW
Up+SE
Up+SW
How exactly would you determine a logs neighbor/s?
-
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
-
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
-
they were commented in ai, and now they are delete...
-
almost feel like i should pass the itemStackHandler as an argument of AI Task
-
.. their commented out...ill delete them...what about my issue...
-
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
-
ok so the compound is set, but i cant read it after changing the target position
-
...stack.setNBTCompount(nbt) is a solution
-
7 minutes ago, diesieben07 said:
- Why are you calling getNBTShareTag? I don't think you know what it does...
- In onItemUse you check if the stack already has an NBT tag. If it doesn't, you create a new NBT tag, put data into it and then just forget about it.
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?
-
-
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
-
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
-
I am probably not the only one stuck on this...
-
-
Entity;s AI target not change when the item target pos changed.
-
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
-
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
-
well both would god but invenory right now
Cant figure out how to pass Entity targetPos to task AIGoto
in Modder Support
Posted
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