productive-bees icon indicating copy to clipboard operation
productive-bees copied to clipboard

chunk errors

Open VaporeonScripts opened this issue 1 year ago • 34 comments

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 avatar Nov 21 '24 17:11 VaporeonScripts

neoforge 1.21.1 .80

VaporeonScripts avatar Nov 21 '24 17:11 VaporeonScripts

what else do you have installed?

JaisDK avatar Nov 21 '24 17:11 JaisDK

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

VaporeonScripts avatar Nov 21 '24 18:11 VaporeonScripts

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

JaisDK avatar Nov 21 '24 18:11 JaisDK

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

VaporeonScripts avatar Nov 21 '24 18:11 VaporeonScripts

try removing lithium

JaisDK avatar Nov 21 '24 18:11 JaisDK

ill see

VaporeonScripts avatar Nov 21 '24 18:11 VaporeonScripts

testing rn

VaporeonScripts avatar Nov 21 '24 19:11 VaporeonScripts

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

VaporeonScripts avatar Nov 21 '24 19:11 VaporeonScripts

they now spawn

VaporeonScripts avatar Nov 21 '24 19:11 VaporeonScripts

gotta love "performance" mods

JaisDK avatar Nov 21 '24 19:11 JaisDK

what can i do to fix it? keeping lithium

VaporeonScripts avatar Nov 21 '24 19:11 VaporeonScripts

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

VaporeonScripts avatar Nov 21 '24 19:11 VaporeonScripts

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

JaisDK avatar Nov 21 '24 19:11 JaisDK

image oof

VaporeonScripts avatar Nov 21 '24 19:11 VaporeonScripts

what oof? just add the line

JaisDK avatar Nov 21 '24 19:11 JaisDK

ooh it works like that? ill see rn

VaporeonScripts avatar Nov 21 '24 19:11 VaporeonScripts

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

VaporeonScripts avatar Nov 21 '24 19:11 VaporeonScripts

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

JaisDK avatar Nov 21 '24 19:11 JaisDK

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

VaporeonScripts avatar Nov 21 '24 19:11 VaporeonScripts

image now i get spammed with this lol

VaporeonScripts avatar Nov 21 '24 19:11 VaporeonScripts

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

JaisDK avatar Nov 21 '24 19:11 JaisDK

yeah ik xd, reported it to them

VaporeonScripts avatar Nov 21 '24 19:11 VaporeonScripts

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

2No2Name avatar Nov 21 '24 22:11 2No2Name

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.

JaisDK avatar Nov 21 '24 22:11 JaisDK

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

2No2Name avatar Nov 21 '24 22:11 2No2Name

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?

JaisDK avatar Nov 22 '24 12:11 JaisDK

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

2No2Name avatar Nov 22 '24 13:11 2No2Name

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

JaisDK avatar Nov 22 '24 23:11 JaisDK

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

2No2Name avatar Nov 22 '24 23:11 2No2Name