Belting these bugs.

- Belts now always render their items again.
 - Items on belts on contraptions are now at least somewhat lit.
This commit is contained in:
JozsefA 2021-03-06 15:08:46 -08:00
parent 25b4e4d5be
commit e930e62436
3 changed files with 7 additions and 3 deletions

View file

@ -225,6 +225,7 @@ public abstract class KineticTileEntity extends SmartTileEntity
boolean overStressedBefore = overStressed;
clearKineticInformation();
cachedBoundingBox = null;
// DO NOT READ kinetic information when placed after movement
if (wasMoved) {
super.read(compound, clientPacket);

View file

@ -20,6 +20,7 @@ import com.simibubi.create.foundation.utility.AnimationTickHolder;
import com.simibubi.create.foundation.utility.Iterate;
import com.simibubi.create.foundation.utility.MatrixStacker;
import com.simibubi.create.foundation.utility.worldWrappers.WrappedWorld;
import net.minecraft.block.BlockState;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.IRenderTypeBuffer;
@ -45,7 +46,7 @@ public class BeltRenderer extends SafeTileEntityRenderer<BeltTileEntity> {
@Override
public boolean isGlobalRenderer(BeltTileEntity te) {
return BeltBlock.canTransportObjects(te.getBlockState());
return te.isController();
}
@Override
@ -189,6 +190,8 @@ public class BeltRenderer extends SafeTileEntityRenderer<BeltTileEntity> {
boolean slopeAlongX = beltFacing
.getAxis() == Axis.X;
boolean onContraption = te.getWorld() instanceof WrappedWorld;
for (TransportedItemStack transported : te.getInventory()
.getTransportedItems()) {
ms.push();
@ -203,7 +206,7 @@ public class BeltRenderer extends SafeTileEntityRenderer<BeltTileEntity> {
sideOffset = transported.sideOffset;
}
int stackLight = getPackedLight(te, offset);
int stackLight = onContraption ? light : getPackedLight(te, offset);
if (offset < .5)
verticalMovement = 0;

View file

@ -521,7 +521,7 @@ public class BeltTileEntity extends KineticTileEntity {
@Override
public boolean shouldRenderAsTE() {
return BeltBlock.canTransportObjects(getBlockState());
return isController();
}
private void updateLight() {