mirror of
https://github.com/Ellpeck/PrettyPipes.git
synced 2024-12-22 15:39:22 +01:00
finished up render bounding box
This commit is contained in:
parent
c8fee33ca5
commit
9be1e0ce2d
2 changed files with 7 additions and 9 deletions
|
@ -399,14 +399,6 @@ public class PipeBlockEntity extends BlockEntity implements MenuProvider, IPipeC
|
|||
return new MainPipeContainer(Registry.pipeContainer, window, player, PipeBlockEntity.this.worldPosition);
|
||||
}
|
||||
|
||||
// TODO render bounding box?
|
||||
/* @Override
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public AABB getRenderBoundingBox() {
|
||||
// our render bounding box should always be the full block in case we're covered
|
||||
return new AABB(this.worldPosition);
|
||||
}*/
|
||||
|
||||
@Override
|
||||
public ConnectionType getConnectionType(BlockPos pipePos, Direction direction) {
|
||||
var state = this.level.getBlockState(pipePos.relative(direction));
|
||||
|
|
|
@ -6,6 +6,7 @@ import net.minecraft.client.renderer.MultiBufferSource;
|
|||
import net.minecraft.client.renderer.blockentity.BlockEntityRenderer;
|
||||
import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.phys.AABB;
|
||||
import net.neoforged.neoforge.client.model.data.ModelData;
|
||||
|
||||
import java.util.Random;
|
||||
|
@ -41,5 +42,10 @@ public class PipeRenderer implements BlockEntityRenderer<PipeBlockEntity> {
|
|||
}
|
||||
}
|
||||
|
||||
}
|
||||
@Override
|
||||
public AABB getRenderBoundingBox(PipeBlockEntity blockEntity) {
|
||||
// our render bounding box should always be the full block in case we're covered
|
||||
return new AABB(blockEntity.getBlockPos());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue