mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2025-01-11 14:56:12 +01:00
9e066f8d41
- Add a package-info.java to many packages. - Annotate the world parameter in Backend#canUseInstancing as nullable. - New utility constructor for BlockModel - Note that IDynamicInstance#beginFrame and ITickableInstance#tick are run in parallel. - Refactor internals of InstancedRenderDispatcher to group things by InstanceWorlds. - InstanceWorlds take over most responsibility for dispatching calls. - Simplify massive private call chains in InstanceMaterial. - Reorganize methods and add some documentation in MaterialManager, MaterialGroup, InstanceMaterial, and Instancer. - Remove unused field from MaterialSpec. - Remove unused fields from Instancer and InstanceMaterial - Document RenderLayer - Add RenderLayer field to RenderLayerEvent
60 lines
1.3 KiB
Java
60 lines
1.3 KiB
Java
package com.jozufozu.flywheel.event;
|
|
|
|
import javax.annotation.Nullable;
|
|
|
|
import com.jozufozu.flywheel.backend.state.RenderLayer;
|
|
|
|
import net.minecraft.client.renderer.RenderType;
|
|
import net.minecraft.client.world.ClientWorld;
|
|
import net.minecraft.util.math.vector.Matrix4f;
|
|
import net.minecraftforge.eventbus.api.Event;
|
|
|
|
public class RenderLayerEvent extends Event {
|
|
private final ClientWorld world;
|
|
public final RenderType type;
|
|
public final Matrix4f viewProjection;
|
|
public final double camX;
|
|
public final double camY;
|
|
public final double camZ;
|
|
public final RenderLayer layer;
|
|
|
|
public RenderLayerEvent(ClientWorld world, RenderType type, Matrix4f viewProjection, double camX, double camY, double camZ) {
|
|
this.world = world;
|
|
this.type = type;
|
|
this.viewProjection = viewProjection;
|
|
this.camX = camX;
|
|
this.camY = camY;
|
|
this.camZ = camZ;
|
|
|
|
this.layer = RenderLayer.fromRenderType(type);
|
|
}
|
|
|
|
@Nullable
|
|
public RenderLayer getLayer() {
|
|
return layer;
|
|
}
|
|
|
|
public ClientWorld getWorld() {
|
|
return world;
|
|
}
|
|
|
|
public RenderType getType() {
|
|
return type;
|
|
}
|
|
|
|
public Matrix4f getViewProjection() {
|
|
return viewProjection;
|
|
}
|
|
|
|
public double getCamX() {
|
|
return camX;
|
|
}
|
|
|
|
public double getCamY() {
|
|
return camY;
|
|
}
|
|
|
|
public double getCamZ() {
|
|
return camZ;
|
|
}
|
|
}
|