Fix bad particle light colouring
Swapped the light variables by accident
This commit is contained in:
@@ -57,17 +57,17 @@ public abstract class LevelMixin implements CollisionLevel, CollisionEntityGette
|
||||
private int maxSection;
|
||||
|
||||
@Override
|
||||
public EntityLookup getCollisionLookup() {
|
||||
public final EntityLookup getCollisionLookup() {
|
||||
return this.collisionLookup;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMinSectionMoonrise() {
|
||||
public final int getMinSectionMoonrise() {
|
||||
return this.minSection;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxSectionMoonrise() {
|
||||
public final int getMaxSectionMoonrise() {
|
||||
return this.maxSection;
|
||||
}
|
||||
|
||||
|
||||
@@ -123,9 +123,9 @@ public abstract class ParticleMixin {
|
||||
|
||||
final StarLightInterface lightEngine = ((StarLightLightingProvider)this.level.getLightEngine()).getLightEngine();
|
||||
|
||||
final int blockLight = Math.max(lightEngine.getBlockLightValue(pos, chunk), blockState == null ? 0 : blockState.getLightEmission());
|
||||
final int skyLight = lightEngine.getSkyLightValue(pos, chunk);
|
||||
final int skyLight = chunk == null ? 0 : lightEngine.getSkyLightValue(pos, chunk);
|
||||
final int blockLight = Math.max(chunk == null ? 0 : lightEngine.getBlockLightValue(pos, chunk), blockState == null ? 0 : blockState.getLightEmission());
|
||||
|
||||
return blockLight << 20 | skyLight << 4;
|
||||
return skyLight << 20 | blockLight << 4;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -249,10 +249,15 @@ public abstract class ExplosionMixin {
|
||||
if (!((CollisionBlockState)blockState).emptyCollisionShape()) {
|
||||
VoxelShape collision = cachedBlock.cachedCollisionShape;
|
||||
if (collision == null) {
|
||||
collision = blockState.getCollisionShape(this.level, currPos, context);
|
||||
if (!context.isDelegated()) {
|
||||
// if it was not delegated during this call, assume that for any future ones it will not be delegated
|
||||
// again, and cache the result
|
||||
collision = ((CollisionBlockState)blockState).getConstantCollisionShape();
|
||||
if (collision == null) {
|
||||
collision = blockState.getCollisionShape(this.level, currPos, context);
|
||||
if (!context.isDelegated()) {
|
||||
// if it was not delegated during this call, assume that for any future ones it will not be delegated
|
||||
// again, and cache the result
|
||||
cachedBlock.cachedCollisionShape = collision;
|
||||
}
|
||||
} else {
|
||||
cachedBlock.cachedCollisionShape = collision;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user