Woot

Woot

24M Downloads

[nvestigation] New dimension for loot learning

Ipsis opened this issue ยท 3 comments

commented

Look at the possibility of using a woot dimension to handle the loot learning problems.

My initial reservation regarding using a new dimension will be mitigated by the ideas below.

Each factory will need its own loot learning box, so that items dont get mixed up.
Dimension must be a void one.
No players allowed.
When a factory needs to learn loot drops due to a new mob/enachant combination then it is allocated a fixed size box in the dimension. The boxes will be allocated in a single chunk in the dimension and be stacked one on top of the other. The box will not be related to the position of the factory - you just get a free one.

This should keep the resource usage down and it should be possible to unload the dimension when no boxes are being used.

There should be enough space in one chunk, bedrock to world height to handle all the boxes needed at one time.

Again, this is only to learn the loot that is spawned in the world on death, rather than the loot that is added to the event when a mob dies.

commented

So this will not be in the first alpha of 1.12, but I aim to have it in 1.12.
The plan is

New dimension that is void.
Any non-creative player will be killed immediately if they try and enter.
The dimension will only be loaded when there is at least one learning process needed, possibly on a short timer to avoid thrashing.
The dimension will only actively use a single chunk.
Each 16x16x16 area will contain 8 7x7x7 kill rooms, that I can allocate to learn the drops from a mob.
(That gives 128 kill rooms)
A kill room is only allocated when a factory needs to learn a mob.
There is no association between position of the factory and its kill room.
Kill rooms are given up when the mob learning is finished.

commented

Now up and running with the dimension Tartarus.
A factory is assigned a spawn killbox when it needs to learn loot.
It frees the killbox when the learning process has finished.
Dimension is always loaded and a single chunk is always kept loaded.
Only this single chunk is used to learn the drops.

commented

0e1780f

Tested in single and multiplayer.
Time will tell how correct it is.