Fix #1254 Chest bounding boxes are too large

This commit is contained in:
mezz committed 2016-06-03 06:22:14 -07:00
1 parent ef4c65c6e6
commit 32f295b16c
2 files changed
+10 -6

No files matched your search

@@ -33,12 +33,8 @@ public enum BlockTypeApicultureTesr implements IBlockTypeTesr {
@Nonnull
private final IMachinePropertiesTesr<?> machineProperties;
<T extends TileForestry> BlockTypeApicultureTesr(@Nonnull Class<T> teClass, @Nonnull String name, @Nullable TileEntitySpecialRenderer<? super T> renderer, @Nullable AxisAlignedBB boundingBox) {
if (boundingBox != null) {
this.machineProperties = new MachinePropertiesTesr<>(teClass, name, renderer, boundingBox, Constants.MOD_ID + ":blocks/" + name + ".0");
} else {
this.machineProperties = new MachinePropertiesTesr<>(teClass, name, renderer, Constants.MOD_ID + ":blocks/" + name + ".0");
}
<T extends TileForestry> BlockTypeApicultureTesr(@Nonnull Class<T> teClass, @Nonnull String name, @Nullable TileEntitySpecialRenderer<? super T> renderer, AxisAlignedBB boundingBox) {
this.machineProperties = new MachinePropertiesTesr<>(teClass, name, renderer, boundingBox, Constants.MOD_ID + ":blocks/" + name + ".0");
}
@Nonnull
@@ -124,6 +124,14 @@ public class BlockBase<P extends Enum<P> & IBlockType & IStringSerializable> ext
return definition.getBoundingBox(pos, blockState);
}
@Nonnull
@Override
@SideOnly(Side.CLIENT)
public AxisAlignedBB getSelectedBoundingBox(IBlockState state, World worldIn, BlockPos pos) {
IMachineProperties definition = getDefinition();
return definition.getBoundingBox(pos, state).offset(pos);
}
@Override
public RayTraceResult collisionRayTrace(IBlockState blockState, World worldIn, BlockPos pos, Vec3d start, Vec3d end) {
IMachineProperties definition = getDefinition();