Better texture-colors for regular metals. Added bismuth texture to tool. Fixed explosion of tiberiumOre.

This commit is contained in:
Robert Sosnitzka
2016-05-18 12:09:35 +02:00
parent 3216033ad4
commit 1dc0a57085
10 changed files with 15 additions and 5 deletions

View File

@@ -43,15 +43,19 @@ public class BlockTiberium extends BasicBlock {
@Override @Override
public void onBlockDestroyedByExplosion(World worldIn, BlockPos pos, Explosion explosionIn) { public void onBlockDestroyedByExplosion(World worldIn, BlockPos pos, Explosion explosionIn) {
if (MathHelper.getRandomIntegerInRange(random, 1, 15) > 10) { if (!worldIn.isRemote) {
worldIn.newExplosion(null, pos.getX(), pos.getY(), pos.getZ(), 1.3f, true, true); if (MathHelper.getRandomIntegerInRange(random, 1, 15) > 10) {
worldIn.newExplosion(null, pos.getX(), pos.getY(), pos.getZ(), 1.6f, true, true);
}
} }
} }
@Override @Override
public void onBlockDestroyedByPlayer(World worldIn, BlockPos pos, IBlockState state) { public void onBlockDestroyedByPlayer(World worldIn, BlockPos pos, IBlockState state) {
if (MathHelper.getRandomIntegerInRange(random, 1, 30) < 3) { if (MathHelper.getRandomIntegerInRange(random, 1, 30) < 3) {
worldIn.newExplosion(null, pos.getX(), pos.getY(), pos.getZ(), 1.0f, true, true); if (!worldIn.isRemote) {
worldIn.newExplosion(null, pos.getX(), pos.getY() + 1 / 16f, pos.getZ(), 1.1f, true, true);
}
} }
} }

View File

@@ -7,10 +7,13 @@ import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.Fluid;
import slimeknights.tconstruct.library.client.MaterialRenderInfo;
import slimeknights.tconstruct.library.materials.Material; import slimeknights.tconstruct.library.materials.Material;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import static com.sosnitzka.ztic_addon.Materials.bismuth;
public class ClientProxy extends ServerProxy { public class ClientProxy extends ServerProxy {
private static void registerBlockModel(Block block) { private static void registerBlockModel(Block block) {
@@ -53,6 +56,10 @@ public class ClientProxy extends ServerProxy {
} }
public void setRenderInfo(Material material, Fluid fluid) { public void setRenderInfo(Material material, Fluid fluid) {
material.setRenderInfo(fluid.getColor()); if (material != bismuth) {
material.setRenderInfo(new MaterialRenderInfo.Metal(fluid.getColor(), 0.8f, 0.2f, 0f));
} else bismuth.setRenderInfo(new MaterialRenderInfo.BlockTexture("ztic_addon:blocks/bismuth_block"));
} }
} }

View File

@@ -16,7 +16,6 @@ public class Utils {
public static String PREFIX_ORE = "ore"; public static String PREFIX_ORE = "ore";
public static String PREFIX_BLOCK = "block"; public static String PREFIX_BLOCK = "block";
public static void registerBlockWithItem(Block block) { public static void registerBlockWithItem(Block block) {
System.out.println(String.format("Register Block: %s", block.getUnlocalizedName())); System.out.println(String.format("Register Block: %s", block.getUnlocalizedName()));
GameRegistry.register(block); GameRegistry.register(block);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB