mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-16 22:33:42 +01:00
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:
parent
25b4e4d5be
commit
e930e62436
3 changed files with 7 additions and 3 deletions
|
@ -225,6 +225,7 @@ public abstract class KineticTileEntity extends SmartTileEntity
|
||||||
boolean overStressedBefore = overStressed;
|
boolean overStressedBefore = overStressed;
|
||||||
clearKineticInformation();
|
clearKineticInformation();
|
||||||
|
|
||||||
|
cachedBoundingBox = null;
|
||||||
// DO NOT READ kinetic information when placed after movement
|
// DO NOT READ kinetic information when placed after movement
|
||||||
if (wasMoved) {
|
if (wasMoved) {
|
||||||
super.read(compound, clientPacket);
|
super.read(compound, clientPacket);
|
||||||
|
|
|
@ -20,6 +20,7 @@ import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||||
import com.simibubi.create.foundation.utility.Iterate;
|
import com.simibubi.create.foundation.utility.Iterate;
|
||||||
import com.simibubi.create.foundation.utility.MatrixStacker;
|
import com.simibubi.create.foundation.utility.MatrixStacker;
|
||||||
|
|
||||||
|
import com.simibubi.create.foundation.utility.worldWrappers.WrappedWorld;
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
||||||
|
@ -45,7 +46,7 @@ public class BeltRenderer extends SafeTileEntityRenderer<BeltTileEntity> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isGlobalRenderer(BeltTileEntity te) {
|
public boolean isGlobalRenderer(BeltTileEntity te) {
|
||||||
return BeltBlock.canTransportObjects(te.getBlockState());
|
return te.isController();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -189,6 +190,8 @@ public class BeltRenderer extends SafeTileEntityRenderer<BeltTileEntity> {
|
||||||
boolean slopeAlongX = beltFacing
|
boolean slopeAlongX = beltFacing
|
||||||
.getAxis() == Axis.X;
|
.getAxis() == Axis.X;
|
||||||
|
|
||||||
|
boolean onContraption = te.getWorld() instanceof WrappedWorld;
|
||||||
|
|
||||||
for (TransportedItemStack transported : te.getInventory()
|
for (TransportedItemStack transported : te.getInventory()
|
||||||
.getTransportedItems()) {
|
.getTransportedItems()) {
|
||||||
ms.push();
|
ms.push();
|
||||||
|
@ -203,7 +206,7 @@ public class BeltRenderer extends SafeTileEntityRenderer<BeltTileEntity> {
|
||||||
sideOffset = transported.sideOffset;
|
sideOffset = transported.sideOffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
int stackLight = getPackedLight(te, offset);
|
int stackLight = onContraption ? light : getPackedLight(te, offset);
|
||||||
|
|
||||||
if (offset < .5)
|
if (offset < .5)
|
||||||
verticalMovement = 0;
|
verticalMovement = 0;
|
||||||
|
|
|
@ -521,7 +521,7 @@ public class BeltTileEntity extends KineticTileEntity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean shouldRenderAsTE() {
|
public boolean shouldRenderAsTE() {
|
||||||
return BeltBlock.canTransportObjects(getBlockState());
|
return isController();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateLight() {
|
private void updateLight() {
|
||||||
|
|
Loading…
Reference in a new issue