Class SimpleBlockEntityInstancingController<T extends net.minecraft.world.level.block.entity.BlockEntity>

java.lang.Object
com.jozufozu.flywheel.backend.instancing.blockentity.SimpleBlockEntityInstancingController<T>
All Implemented Interfaces:
BlockEntityInstancingController<T>

public class SimpleBlockEntityInstancingController<T extends net.minecraft.world.level.block.entity.BlockEntity> extends Object implements BlockEntityInstancingController<T>
  • Field Details

    • instanceFactory

      protected BiFunction<MaterialManager,T extends net.minecraft.world.level.block.entity.BlockEntity,BlockEntityInstance<? super T extends net.minecraft.world.level.block.entity.BlockEntity>> instanceFactory
    • skipRender

      protected Predicate<T extends net.minecraft.world.level.block.entity.BlockEntity> skipRender
  • Constructor Details

  • Method Details

    • createInstance

      public BlockEntityInstance<? super T> createInstance(MaterialManager materialManager, T blockEntity)
      Description copied from interface: BlockEntityInstancingController
      Given a block entity and a material manager, constructs an instance for the block entity.
      Specified by:
      createInstance in interface BlockEntityInstancingController<T extends net.minecraft.world.level.block.entity.BlockEntity>
      Parameters:
      materialManager - The material manager to use.
      blockEntity - The block entity to construct an instance for.
      Returns:
      The instance.
    • shouldSkipRender

      public boolean shouldSkipRender(T blockEntity)
      Description copied from interface: BlockEntityInstancingController
      Checks if the given block entity should not be rendered normally.
      Specified by:
      shouldSkipRender in interface BlockEntityInstancingController<T extends net.minecraft.world.level.block.entity.BlockEntity>
      Parameters:
      blockEntity - The block entity to check.
      Returns:
      true if the block entity should not be rendered normally, false if it should.