mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-18 11:19:19 +00:00
Fix dirt path and spreader binding. Closes #279
This commit is contained in:
2 files changed
+7
-5
No files matched your search
@@ -44,6 +44,7 @@ public class BlockDirtPath extends BlockMod implements ILexiconable {
|
||||
|
||||
private static final UUID speedBoostUuid = UUID.fromString("c5f17cca-c89f-4f12-81da-8f04b1f27679");
|
||||
private static final AttributeModifier speedBoost = new AttributeModifier(speedBoostUuid, "Trodden dirt speed boost", 0.55, 2).setSaved(false);
|
||||
private static final AxisAlignedBB AABB = new AxisAlignedBB(0, 0, 0, 1, 15F/16F, 1);
|
||||
|
||||
public BlockDirtPath() {
|
||||
super(Material.ground, LibBlockNames.DIRT_PATH);
|
||||
@@ -76,7 +77,7 @@ public class BlockDirtPath extends BlockMod implements ILexiconable {
|
||||
Block blockAbove = stateAbove.getBlock();
|
||||
if(!blockAbove.isAir(stateAbove, world, pos.up()))
|
||||
return FULL_BLOCK_AABB;
|
||||
else return new AxisAlignedBB(0F, 0F, 0F, 1F, 15F / 16F, 1F);
|
||||
else return AABB;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -86,7 +87,7 @@ public class BlockDirtPath extends BlockMod implements ILexiconable {
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBox(IBlockState state, World world, BlockPos pos) {
|
||||
return new AxisAlignedBB(pos, pos.add(1, 1, 1));
|
||||
return FULL_BLOCK_AABB;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -679,9 +679,10 @@ public class TileSpreader extends TileSimpleInventory implements IManaCollector,
|
||||
Vector3 thisVec = Vector3.fromTileEntityCenter(this);
|
||||
Vector3 blockVec = new Vector3(pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5);
|
||||
|
||||
AxisAlignedBB axis = player.worldObj.getBlockState(pos).getCollisionBoundingBox(player.worldObj, pos).offset(pos);
|
||||
if(axis == null)
|
||||
axis = new AxisAlignedBB(pos, pos.add(1, 1, 1));
|
||||
AxisAlignedBB axis = player.worldObj.getBlockState(pos).getCollisionBoundingBox(player.worldObj, pos);
|
||||
if(axis != null)
|
||||
axis = axis.offset(pos);
|
||||
else axis = new AxisAlignedBB(pos, pos.add(1, 1, 1));
|
||||
|
||||
if(!blockVec.isInside(axis))
|
||||
blockVec = new Vector3(axis.minX + (axis.maxX - axis.minX) / 2, axis.minY + (axis.maxY - axis.minY) / 2, axis.minZ + (axis.maxZ - axis.minZ) / 2);
|
||||
|
||||
Reference in new issue
Block a user