Unable to get list of list.
For some reason its not letting me .get() any of the inner-most lists.
36 Replies
ā
This post has been reserved for your question.
Hey @špothicon! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./close
or theClose Post
button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
I tried taking away the List.of(0) in the test and putting a breakpoint and it showed that 'test' was indeed a list containing two lists
but when I try to .get() either list it doesnt return a list
not even this works
doing the .get(0) directly instead of doing it like test.get(0) does get the list
very strange
Unknown Userā¢11mo ago
Message Not Public
Sign In & Join Server To View
well i cant specify a specific type because there are several different types of objects in the list
Unknown Userā¢11mo ago
Message Not Public
Sign In & Join Server To View
I have a list of maps that each contain a list of lists
list > map > list > list
Unknown Userā¢11mo ago
Message Not Public
Sign In & Join Server To View
whats difficult about it?
only other thing i could think of was doing List<List<?>> instead of List<?> but that didnt solve it either (without the .get(0))
Unknown Userā¢11mo ago
Message Not Public
Sign In & Join Server To View
nope
they both implement FeatureElement but they dont extend the same of anything
Unknown Userā¢11mo ago
Message Not Public
Sign In & Join Server To View
im not
im putting a list of entitytype blocks and a number into the same list
Unknown Userā¢11mo ago
Message Not Public
Sign In & Join Server To View
so really the datastructure is more like
list>map>block/list>list>entitytype/int/list>block
bc ive never heard of a record before lol
Unknown Userā¢11mo ago
Message Not Public
Sign In & Join Server To View
never heard of that before
Unknown Userā¢11mo ago
Message Not Public
Sign In & Join Server To View
the number is how many of the block needs to be surrounding the position in order for the mob to spawn there
so
means that there needs to be 4 grass or tall grass next to the position for the chicken to spawn
Unknown Userā¢11mo ago
Message Not Public
Sign In & Join Server To View
ye
Unknown Userā¢11mo ago
Message Not Public
Sign In & Join Server To View
Unknown Userā¢11mo ago
Message Not Public
Sign In & Join Server To View
well the map still needs a list of 'SpawnGenerator"
but yeah
Unknown Userā¢11mo ago
Message Not Public
Sign In & Join Server To View
how? I did list.of() and seperated them with commas lol
Unknown Userā¢11mo ago
Message Not Public
Sign In & Join Server To View
see this example
there is a list containing two SpawnParameters records
aka they are seperate elments
However I now can't get that list of spawn parameters for some reason
its saying this is a List<capture of ?>
instead of a List<SpawnParameters>
(and I can try changing it to want a list<?> but then I cant do .get() on it)
Unknown Userā¢11mo ago
Message Not Public
Sign In & Join Server To View
ah
š¤
Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping
.
Warning: abusing this will result in moderative actions taken against you.