Skip to content

Commit

Permalink
Merge branch 'develop' into refactor/remove-usage-ThreadManagerSubsystem
Browse files Browse the repository at this point in the history
  • Loading branch information
pollend authored Jun 27, 2021
2 parents eb44e11 + fbeed19 commit 11a257a
Showing 1 changed file with 3 additions and 39 deletions.
42 changes: 3 additions & 39 deletions engine/src/main/java/org/terasology/engine/world/block/Block.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// SPDX-License-Identifier: Apache-2.0
package org.terasology.engine.world.block;

import com.google.common.collect.Maps;
import org.joml.Quaternionf;
import org.joml.RoundingMode;
import org.joml.Vector3f;
Expand Down Expand Up @@ -33,21 +32,6 @@
*/
public final class Block {

// TODO: Use directional light(s) when rendering instead of this
private static final Map<BlockPart, Float> DIRECTION_LIT_LEVEL = Maps.newEnumMap(BlockPart.class);


// Initialize the LUTs
static {
DIRECTION_LIT_LEVEL.put(BlockPart.TOP, 0.9f);
DIRECTION_LIT_LEVEL.put(BlockPart.BOTTOM, 0.9f);
DIRECTION_LIT_LEVEL.put(BlockPart.FRONT, 1.0f);
DIRECTION_LIT_LEVEL.put(BlockPart.BACK, 1.0f);
DIRECTION_LIT_LEVEL.put(BlockPart.LEFT, 0.75f);
DIRECTION_LIT_LEVEL.put(BlockPart.RIGHT, 0.75f);
DIRECTION_LIT_LEVEL.put(BlockPart.CENTER, 0.8f);
}

private short id;
private BlockUri uri;
private String displayName = "Untitled block";
Expand All @@ -62,7 +46,7 @@ public final class Block {
private boolean replacementAllowed;
private int hardness = 3;
private boolean supportRequired;
private boolean[] fullSide = new boolean[Side.values().length];
private final boolean[] fullSide = new boolean[Side.values().length];
private BlockSounds sounds;

// Special rendering flags (TODO: clean this up)
Expand Down Expand Up @@ -101,8 +85,8 @@ public final class Block {
private boolean stackable = true;

private BlockAppearance primaryAppearance = new BlockAppearance();
private BlockMeshPart[] lowLiquidMesh = new BlockMeshPart[Side.values().length];
private BlockMeshPart[] topLiquidMesh = new BlockMeshPart[Side.values().length];
private final BlockMeshPart[] lowLiquidMesh = new BlockMeshPart[Side.values().length];
private final BlockMeshPart[] topLiquidMesh = new BlockMeshPart[Side.values().length];

/* Collision */
private CollisionShape collisionShape;
Expand Down Expand Up @@ -238,26 +222,6 @@ public void setMeshGenerator(BlockMeshGenerator meshGenerator) {
this.meshGenerator = meshGenerator;
}

/**
* @return Whether this block needs to be rendered at all
* @deprecated Use getMeshGenerator()==null instead.
*/
@Deprecated
public boolean isInvisible() {
return meshGenerator == null;
}

/**
* @param invisible Set if invisible
* @deprecated Use setMeshGenerator() instead.
*/
@Deprecated
public void setInvisible(boolean invisible) {
if (invisible) {
this.meshGenerator = null;
}
}

/**
* A block is penetrable if it does not block solid objects.
*
Expand Down

0 comments on commit 11a257a

Please sign in to comment.