Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chunk errors #599

Open
VaporeonScripts opened this issue Nov 21, 2024 · 34 comments
Open

chunk errors #599

VaporeonScripts opened this issue Nov 21, 2024 · 34 comments

Comments

@VaporeonScripts
Copy link

18:47:24] [Server thread/WARN] [minecraft/LevelChunk]: Block entity productivebees:solitary_nest @ BlockPos{x=-399, y=68, z=659} state Block{productivebees:birch_wood_nest}[axis=y,facing=north] invalid for ticking:
[18:47:25] [Server thread/WARN] [minecraft/LevelChunk]: Block entity productivebees:solitary_nest @ BlockPos{x=-558, y=75, z=664} state Block{productivebees:oak_wood_nest}[axis=y,facing=north] invalid for ticking:
[18:47:25] [Server thread/WARN] [minecraft/LevelChunk]: Block entity productivebees:solitary_nest @ BlockPos{x=-566, y=78, z=660} state Block{productivebees:oak_wood_nest}[axis=y,facing=south] invalid for ticking:
[18:47:27] [Server thread/WARN] [minecraft/LevelChunk]: Block entity productivebees:solitary_nest @ BlockPos{x=-607, y=92, z=635} state Block{productivebees:birch_wood_nest}[axis=y,facing=south] invalid for ticking:
[18:47:27] [Server thread/WARN] [minecraft/LevelChunk]: Block entity productivebees:solitary_nest @ BlockPos{x=-619, y=72, z=439} state Block{productivebees:oak_wood_nest}[axis=y,facing=north] invalid for ticking:
[18:47:27] [Server thread/WARN] [minecraft/LevelChunk]: Block entity productivebees:solitary_nest @ BlockPos{x=-612, y=81, z=622} state Block{productivebees:birch_wood_nest}[axis=y,facing=north] invalid for ticking:
[18:47:30] [Server thread/WARN] [minecraft/LevelChunk]: Block entity productivebees:solitary_nest @ BlockPos{x=-319, y=68, z=681} state Block{productivebees:birch_wood_nest}[axis=y,facing=east] invalid for ticking:
[18:47:35] [Server thread/WARN] [minecraft/LevelChunk]: Block entity productivebees:solitary_nest @ BlockPos{x=-414, y=73, z=677} state Block{productivebees:birch_wood_nest}[axis=y,facing=north] invalid for ticking:
[18:47:37] [Server thread/WARN] [minecraft/LevelChunk]: Block entity productivebees:solitary_nest @ BlockPos{x=-621, y=81, z=624} state Block{productivebees:oak_wood_nest}[axis=y,facing=west] invalid for ticking:
[18:47:39] [Server thread/WARN] [minecraft/LevelChunk]: Block entity productivebees:solitary_nest @ BlockPos{x=-588, y=62, z=323} state Block{productivebees:sand_nest}[facing=up] invalid for ticking:

@VaporeonScripts
Copy link
Author

neoforge 1.21.1 .80

@JaisDK
Copy link
Collaborator

JaisDK commented Nov 21, 2024

what else do you have installed?

@VaporeonScripts
Copy link
Author

https://mclo.gs/J1yJ7Mc here, with modlist too

@JaisDK
Copy link
Collaborator

JaisDK commented Nov 21, 2024

there's so much junk output in that log and so many mods I don't know what it could be
it also seems like you sent the client log and not the server log where the errors are

@VaporeonScripts
Copy link
Author

oh, yeah, my bad,sec
https://mclo.gs/A9bKS1h

@JaisDK
Copy link
Collaborator

JaisDK commented Nov 21, 2024

try removing lithium

@VaporeonScripts
Copy link
Author

ill see

@VaporeonScripts
Copy link
Author

testing rn

@VaporeonScripts
Copy link
Author

im almost sure i saw a productive bee for half a sec but now no trace of it 😭

@VaporeonScripts
Copy link
Author

they now spawn

@JaisDK
Copy link
Collaborator

JaisDK commented Nov 21, 2024

gotta love "performance" mods

@VaporeonScripts
Copy link
Author

what can i do to fix it? keeping lithium

@VaporeonScripts
Copy link
Author

@JaisDK
Copy link
Collaborator

JaisDK commented Nov 21, 2024

try setting mixin.world.block_entity_ticking=false in the Lithium config

@VaporeonScripts
Copy link
Author

image
oof

@JaisDK
Copy link
Collaborator

JaisDK commented Nov 21, 2024

what oof? just add the line

@VaporeonScripts
Copy link
Author

ooh it works like that? ill see rn

@VaporeonScripts
Copy link
Author

altough i dont see them anymore, like, kinda sure that bee disappeared somehow, and i cant locate any bumble bee or advanced nest

@JaisDK
Copy link
Collaborator

JaisDK commented Nov 21, 2024

lithium probably fucked the existing chunks, try new chunks

if you continue having issues then I can't help as long as Lithium is installed

@VaporeonScripts
Copy link
Author

aight, ima see, altough i dont get those warns again 😁
image
ima generate chunks rn

@VaporeonScripts
Copy link
Author

image
now i get spammed with this lol

@JaisDK
Copy link
Collaborator

JaisDK commented Nov 21, 2024

that says towns and towers, it has nothing to do with bees

@VaporeonScripts
Copy link
Author

yeah ik xd, reported it to them

@2No2Name
Copy link

2No2Name commented Nov 21, 2024

I suggest you replace your BlockEntity::getType() override with a modifyArg mixin in BeehiveBlockEntity.
Lithium assumes that the Type of a BlockEntity is constant at the end of the BlockEntity super-constructor. The type of your custom bee hive is not constant, as it is only initialized after calling the super constructor and returns an incorrect value (vanilla Beehive block entity type) beforehand: https://github.com/JDKDigital/productive-bees/blob/dev-1.21.0/src/main/java/cy/jdkdigital/productivebees/common/block/entity/AdvancedBeehiveBlockEntityAbstract.java#L90 . You could also just always return the constant by overriding the method in each of the custom block bee hive types. If you don't want to change this, I will try to work around this on lithium's side

@JaisDK
Copy link
Collaborator

JaisDK commented Nov 21, 2024

Overwriting getType is a perfectly valid method and it’s used by a lot of mods and is sometimes the only way to do it, like for customs signs. I’m not changing anything so it would be best if you handle it on your side.

@2No2Name
Copy link

If you override getType, please make sure to return the correct type. You are already hacking around the validity check because you are returning the wrong type:
https://github.com/JDKDigital/productive-bees/blob/dev-1.21.0/src/main/java/cy/jdkdigital/productivebees/common/block/entity/AdvancedBeehiveBlockEntityAbstract.java#L84

@JaisDK
Copy link
Collaborator

JaisDK commented Nov 22, 2024

I'm hacking around the validity check because at the time NF had not patched it. I have a null check because Botania was also expecting the correct type to be present after super constructor. Other than that I don't see how I'm returning the wrong type anywhere?

@2No2Name
Copy link

Lithium adds another method that is similar to the block validity check but actually uses the entity type to precompute whether the block state supports the block entity. At the time of that computation, it receives the vanilla bee hive block entity type. The check whether the modded bee hive supports the vanilla bee hive block entity type fails. This result is cached and only computed again when the supporting block is replaced

@JaisDK
Copy link
Collaborator

JaisDK commented Nov 22, 2024

ok, but you said I need to "make sure to return the correct type", which I am already in getType

@2No2Name
Copy link

2No2Name commented Nov 22, 2024

You are returning the vanilla bee hive block entity type if getType is called inside a method added to the end of the BlockEntity super-constructor of your custom bee hive block entity, because your custom field is still null and then you return super.getType(), which returns the vanilla bee hive block entity type.
To fix this I suggest that each of your non-abstract bee hive block entity classes returns their type immediately, without any field initialization. E.g for Bumble bee nest:

@Override
public BlockEntityType<?> getType() {
  return ModBlockEntityTypes.BUMBLE_BEE_NEST.get();
}

@JaisDK
Copy link
Collaborator

JaisDK commented Nov 26, 2024

576ee12

will this be all that's needed?

@2No2Name
Copy link

2No2Name commented Nov 26, 2024

Yes I think that is sufficient. Thank you very much

@VaporeonScripts
Copy link
Author

does this mean i can re-enable the lithium cache optimization thingy?

@JaisDK
Copy link
Collaborator

JaisDK commented Nov 29, 2024

if you update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants