Better Dropped Items

Better Dropped Items

1M Downloads

Can you give me some pointers on how to not render items at all?

PandaTobi opened this issue ยท 1 comments

commented

Basically the title. I'm working with large amounts of dropped items, and they lag out my PC sometimes. I have a little idea on how to use MixIns, but everything that I've tried has completely failed (as in, no change at all.)

commented
@Mixin(ItemEntityRenderer.class)
public abstract class ItemEntityRendererMixin extends EntityRenderer<ItemEntity> {
    @Inject(at = @At("HEAD"), method = "render", cancellable = true)
    private void render(ItemEntity dropped, float f, float delta, MatrixStack matrix, VertexConsumerProvider vertexConsumerProvider, int i, CallbackInfo callback) {
        callback.cancel();
    }
}

For assistance on mixins in the future, visit the Fabric Discord and head over to the mixin development channel. :)