Dunkmania101 / SpatialHarvesters

A Minecraft mod that adds harvesters that gather resources from space-time itself!
https://www.curseforge.com/minecraft/mc-mods/spatial-harvesters
MIT License
3 stars 5 forks source link

[Major issue] Item Stacking #50

Closed TheRealM18 closed 2 years ago

TheRealM18 commented 3 years ago

If you kill 5 "minecraft:white_sheep" you will end up with 5-10 different stacks of 1 - 2 items in each. This is probably with the same issue you have with the harvesters. if you have 10 iron or come up, it every few will generate multiple stacks. This is your mod, as I have had it by itself, and still will do it.

the temp fix i have for the harvesters was to use a hopper, instead of straight to a storage unit.

By the way, this is Fabric issue, not sure if it is on forge too.

Dunkmania101 commented 3 years ago

I'm not sure if you're saying this is the same issue as #49, but I think it is different and it does sound like a real problem. Just to clarify, #49 wasn't an issue, it just looked like one but is actually normal Minecraft stacking logic. I'm not entirely sure I've correctly understood what you're reporting as I can interpret it in two different ways: The mob harvesters are outputting excessive numbers of items or actually killing entities by hand is giving excessive drops. Is it one of those? I'll look at my code and see if I can figure it out myself too.

Dunkmania101 commented 3 years ago

Wait, you said you fixed it by using a hopper. That makes me think that it isn't actually this mod as the harvesters don't have inventories, they only send items to adjacent blocks that do, meaning that the issue didn't happen when a different inventory was used. What did you use other than a vanilla hopper? Did you try a vanilla chest or barrel or something like that?

Dunkmania101 commented 3 years ago

I did some testing and couldn't reproduce what I think I understand you described. You might have meant something else though, so I'll wait to close this until you respond.

TheRealM18 commented 3 years ago

The issue is not just with the harvesters of the ores, it also affects the killing of some mobs in survival... if you do not use hoppers it will do weird stacking issues. I know for a fact that the meta data, and nbt data is correct, because you can restack them afterwards and they will work fine. The issue is that the stacking is coming from your mod, I have had to temporally remove it from the pack, as it was causing too much issues. when i removed it, the issues with the pickup inventory went away... so i know for a fact it was your mod.

DudeRush666 commented 3 years ago

I can confirm the stacking issues for the following mob dropped items when mobs are killed, Arrows, Wool, Tropical Fish, Bones, Rotton Flesh, Cobwebs. I have done extensive testing and can also confirm that it is not a Meta or ID issue as I have also tested for that, I have tested using just this mod on its own and also with a tons of mods and this only happens when this mod is included in the mod folder. I hope this problem can be fixed because I am excited to use this mod more than most mods out there. To reiterate the problem is either the items don't stack at all and have to be manually stacked or they stack in random numbers before creating a different stack. I Am Using Fabric 1.17.1

Dunkmania101 commented 2 years ago

I just noticed this is still open. I'm pretty sure I managed to fix it in version 0.11.12c, so I'll close it now. Feel free to reopen if it turns out my fix didn't work. For anyone who's curious, the problem was that I calling ItemStack.getNbt instead of ItemStack.writeNbt, so it was trying to recreate the drops based on the NBT data that was saved to them instead of their full representation. Reading over that, it seems like it shouldn't have produced any drops at all, but I guess we'll see what happens.