mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-14 12:43:49 +01:00
Mopping up
- Fixes contraption world leak twofold. - Bump flywheel - 0.6.3.81
This commit is contained in:
parent
cdadd12b41
commit
dc20f7091c
3 changed files with 46 additions and 4 deletions
|
@ -19,7 +19,7 @@ parchment_version = 2022.03.13
|
|||
|
||||
# dependency versions
|
||||
registrate_version = MC1.18.2-1.0.25
|
||||
flywheel_version = 1.18-0.6.2.66
|
||||
flywheel_version = 1.18-0.6.3.81
|
||||
jei_minecraft_version = 1.18.2
|
||||
jei_version = 9.5.3.143
|
||||
curios_minecraft_version = 1.18.2
|
||||
|
|
|
@ -8,6 +8,8 @@ import org.apache.commons.lang3.tuple.Pair;
|
|||
|
||||
import com.jozufozu.flywheel.api.MaterialManager;
|
||||
import com.jozufozu.flywheel.api.instance.DynamicInstance;
|
||||
import com.jozufozu.flywheel.api.instance.TickableInstance;
|
||||
import com.jozufozu.flywheel.backend.instancing.AbstractInstance;
|
||||
import com.jozufozu.flywheel.backend.instancing.TaskEngine;
|
||||
import com.jozufozu.flywheel.backend.instancing.blockentity.BlockEntityInstanceManager;
|
||||
import com.jozufozu.flywheel.core.virtual.VirtualRenderWorld;
|
||||
|
@ -75,5 +77,45 @@ public class ContraptionInstanceManager extends BlockEntityInstanceManager {
|
|||
|
||||
return null;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------
|
||||
// The following methods should be identical to the base methods,
|
||||
// but without reference to LightUpdater.
|
||||
// -----------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
protected AbstractInstance createInternal(BlockEntity obj) {
|
||||
AbstractInstance renderer = createRaw(obj);
|
||||
|
||||
if (renderer != null) {
|
||||
renderer.init();
|
||||
renderer.updateLight();
|
||||
instances.put(obj, renderer);
|
||||
|
||||
if (renderer instanceof TickableInstance r) {
|
||||
tickableInstances.put(obj, r);
|
||||
r.tick();
|
||||
}
|
||||
|
||||
if (renderer instanceof DynamicInstance r) {
|
||||
dynamicInstances.put(obj, r);
|
||||
r.beginFrame();
|
||||
}
|
||||
}
|
||||
|
||||
return renderer;
|
||||
}
|
||||
|
||||
protected void removeInternal(BlockEntity obj, AbstractInstance instance) {
|
||||
instance.remove();
|
||||
instances.remove(obj);
|
||||
dynamicInstances.remove(obj);
|
||||
tickableInstances.remove(obj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void detachLightListeners() {
|
||||
// noop
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -32,6 +32,6 @@ Technology that empowers the player.'''
|
|||
[[dependencies.create]]
|
||||
modId="flywheel"
|
||||
mandatory=true
|
||||
versionRange="[1.18-0.6.2,1.18-0.6.3)"
|
||||
versionRange="[1.18-0.6.3,1.18-0.6.4)"
|
||||
ordering="AFTER"
|
||||
side="CLIENT"
|
||||
|
|
Loading…
Reference in a new issue