improve quarry frame look, fix bedrock being breakable for some reason

This commit is contained in:
asiekierka 2015-09-30 16:46:35 +02:00
parent 15c008b1d4
commit bd2c625cec
7 changed files with 15 additions and 9 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 260 B

After

Width:  |  Height:  |  Size: 316 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

View file

@ -604,6 +604,7 @@ public class BuildCraftBuilders extends BuildCraftMod {
if (evt.map.getTextureType() == 0) {
TextureMap terrainTextures = evt.map;
BuilderProxyClient.drillTexture = terrainTextures.registerIcon("buildcraftbuilders:machineBlock/drill");
BuilderProxyClient.drillXzTexture = terrainTextures.registerIcon("buildcraftbuilders:machineBlock/drill_xz");
BuilderProxyClient.drillHeadTexture = terrainTextures.registerIcon("buildcraftbuilders:machineBlock/drill_head");
}
}

View file

@ -28,7 +28,7 @@ public class BuilderProxy {
}
public EntityBlock newDrill(World w, double i, double j, double k,
double l, double d, double e) {
double l, double d, double e, boolean xz) {
return new EntityBlock(w, i, j, k, l, d, e);
}

View file

@ -28,7 +28,7 @@ import buildcraft.core.render.RenderBuilder;
import buildcraft.core.render.RenderLEDTile;
public class BuilderProxyClient extends BuilderProxy {
public static IIcon drillTexture;
public static IIcon drillTexture, drillXzTexture;
public static IIcon drillHeadTexture;
@Override
@ -66,9 +66,9 @@ public class BuilderProxyClient extends BuilderProxy {
@Override
public EntityBlock newDrill(World w, double i, double j, double k, double l, double d, double e) {
EntityBlock eb = super.newDrill(w, i, j, k, l, d, e);
eb.texture = drillTexture;
public EntityBlock newDrill(World w, double i, double j, double k, double l, double d, double e, boolean xz) {
EntityBlock eb = super.newDrill(w, i, j, k, l, d, e, xz);
eb.texture = xz ? drillXzTexture : drillTexture;
return eb;
}

View file

@ -65,9 +65,9 @@ public class EntityMechanicalArm extends Entity {
}
private void makeParts(World world) {
xArm = BuilderProxy.proxy.newDrill(world, 0, 0, 0, 1, 0.5, 0.5);
yArm = BuilderProxy.proxy.newDrill(world, 0, 0, 0, 0.5, 1, 0.5);
zArm = BuilderProxy.proxy.newDrill(world, 0, 0, 0, 0.5, 0.5, 1);
xArm = BuilderProxy.proxy.newDrill(world, 0, 0, 0, 1, 0.5, 0.5, true);
yArm = BuilderProxy.proxy.newDrill(world, 0, 0, 0, 0.5, 1, 0.5, false);
zArm = BuilderProxy.proxy.newDrill(world, 0, 0, 0, 0.5, 0.5, 1, true);
head = BuilderProxy.proxy.newDrillHead(world, 0, 0, 0, 0.2, 1, 0.2);
head.shadowSize = 1.0F;

View file

@ -146,7 +146,12 @@ public final class BlockUtils {
public static float getBlockHardnessMining(World world, int x, int y, int z, Block b) {
if (world instanceof WorldServer && !BuildCraftCore.miningAllowPlayerProtectedBlocks) {
return b.getPlayerRelativeBlockHardness(CoreProxy.proxy.getBuildCraftPlayer((WorldServer) world).get(), world, x, y, z);
float relativeHardness = b.getPlayerRelativeBlockHardness(CoreProxy.proxy.getBuildCraftPlayer((WorldServer) world).get(), world, x, y, z);
if (relativeHardness <= 0.0F) { // Forge's getPlayerRelativeBlockHardness hook returns 0.0F if the hardness is < 0.0F.
return -1.0F;
} else {
return relativeHardness;
}
} else {
return b.getBlockHardness(world, x, y, z);
}