Class InstanceWorld
java.lang.Object
com.jozufozu.flywheel.backend.instancing.InstanceWorld
A manager class for a single world where instancing is supported.
The material manager is shared between the different instance managers.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final InstanceManager<net.minecraft.world.level.block.entity.BlockEntity>protected final Engineprotected final InstanceManager<net.minecraft.world.entity.Entity>final ParallelTaskEngine -
Constructor Summary
ConstructorsConstructorDescriptionInstanceWorld(Engine engine, InstanceManager<net.minecraft.world.entity.Entity> entityInstanceManager, InstanceManager<net.minecraft.world.level.block.entity.BlockEntity> blockEntityInstanceManager) -
Method Summary
Modifier and TypeMethodDescriptionvoidbeginFrame(BeginFrameEvent event) Get ready to render a frame.static InstanceWorldcreate(net.minecraft.world.level.LevelAccessor level) voiddelete()Free all acquired resources and invalidate this instance world.InstanceManager<net.minecraft.world.level.block.entity.BlockEntity>InstanceManager<net.minecraft.world.entity.Entity>voidloadEntities(net.minecraft.client.multiplayer.ClientLevel world) Instantiate all the necessary instances to render the given world.voidrenderLayer(RenderLayerEvent event) Draw the given layer.voidtick()Tick the renderers after the game has ticked:
-
Field Details
-
engine
-
entityInstanceManager
-
blockEntityInstanceManager
protected final InstanceManager<net.minecraft.world.level.block.entity.BlockEntity> blockEntityInstanceManager -
taskEngine
-
-
Constructor Details
-
InstanceWorld
public InstanceWorld(Engine engine, InstanceManager<net.minecraft.world.entity.Entity> entityInstanceManager, InstanceManager<net.minecraft.world.level.block.entity.BlockEntity> blockEntityInstanceManager)
-
-
Method Details
-
create
-
getEntityInstanceManager
-
getBlockEntityInstanceManager
public InstanceManager<net.minecraft.world.level.block.entity.BlockEntity> getBlockEntityInstanceManager() -
delete
public void delete()Free all acquired resources and invalidate this instance world. -
beginFrame
Get ready to render a frame.Check and shift the origin coordinate.
CallDynamicInstance.beginFrame()on all instances in this world. -
tick
public void tick()Tick the renderers after the game has ticked:Call
TickableInstance.tick()on all instances in this world. -
renderLayer
Draw the given layer. -
loadEntities
public void loadEntities(net.minecraft.client.multiplayer.ClientLevel world) Instantiate all the necessary instances to render the given world.
-