JDKDigital / productive-bees

Useful bees
https://www.curseforge.com/minecraft/mc-mods/productivebees
Other
64 stars 42 forks source link

chunk errors #599

Open VaporeonScripts opened 1 day ago

VaporeonScripts commented 1 day ago

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 commented 1 day ago

neoforge 1.21.1 .80

JaisDK commented 1 day ago

what else do you have installed?

VaporeonScripts commented 1 day ago

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

JaisDK commented 1 day ago

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 commented 1 day ago

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

JaisDK commented 1 day ago

try removing lithium

VaporeonScripts commented 1 day ago

ill see

VaporeonScripts commented 1 day ago

testing rn

VaporeonScripts commented 1 day ago

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

VaporeonScripts commented 1 day ago

they now spawn

JaisDK commented 1 day ago

gotta love "performance" mods

VaporeonScripts commented 1 day ago

what can i do to fix it? keeping lithium

VaporeonScripts commented 1 day ago

https://github.com/CaffeineMC/lithium-fabric/issues/589

JaisDK commented 1 day ago

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

VaporeonScripts commented 1 day ago

image oof

JaisDK commented 1 day ago

what oof? just add the line

VaporeonScripts commented 1 day ago

ooh it works like that? ill see rn

VaporeonScripts commented 1 day ago

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

JaisDK commented 1 day ago

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 commented 1 day ago

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

VaporeonScripts commented 1 day ago

image now i get spammed with this lol

JaisDK commented 1 day ago

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

VaporeonScripts commented 1 day ago

yeah ik xd, reported it to them

2No2Name commented 1 day ago

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 commented 1 day ago

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 commented 1 day ago

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 commented 13 hours ago

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 commented 12 hours ago

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 commented 2 hours ago

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

2No2Name commented 2 hours ago

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();
}