more laser things.

This commit is contained in:
Flanks255 2022-09-01 18:26:54 -05:00
parent c6f226c2da
commit 773d723ce0
2 changed files with 15 additions and 0 deletions

View file

@ -78,4 +78,9 @@ public class ReconstructorRenderer extends TileEntityRenderer<TileEntityAtomicRe
matrices.popPose();
}
@Override
public boolean shouldRenderOffScreen(TileEntityAtomicReconstructor tile) {
return tile.getProgress() > 0.0f;
}
}

View file

@ -23,8 +23,10 @@ import de.ellpeck.actuallyadditions.mod.util.WorldUtil;
import net.minecraft.block.BlockState;
import net.minecraft.item.Item;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.state.properties.BlockStateProperties;
import net.minecraft.util.Direction;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper;
import net.minecraft.world.World;
@ -56,6 +58,14 @@ public class TileEntityAtomicReconstructor extends TileEntityInventoryBase imple
AssetUtil.spawnLaserWithTimeServer(world, startX, startY, startZ, endX, endY, endZ, currentLens.getColor(), 25, 0, 0.2F, 0.8F);
}
@Override
public AxisAlignedBB getRenderBoundingBox() {
if (getProgress() > 0.0f)
return new AxisAlignedBB(getPosition(), getPosition().offset(1,1,1).relative(getBlockState().getValue(BlockStateProperties.FACING), 11));
else
return super.getRenderBoundingBox();
}
@Override
public int getTTL() {
return this.ttl;