block remapping, steel alloy blocks, osmiridium cast plates

This commit is contained in:
Boblet 2023-06-02 14:22:29 +02:00
parent b9d159bffe
commit 2d3217c96b
15 changed files with 147 additions and 12 deletions

View File

@ -3,6 +3,7 @@
* A new variant of reinforced glass with higher blast resistance
* Chlorocalcite
* A new bedrock ore, the powder can be heated in the combination furnace to make calcium and chlorine
* Blocks for cadmium, TC and CD alloy
## Changed
* Updated russian localization

View File

@ -0,0 +1,41 @@
package com.hbm.blocks;
import java.util.ArrayList;
import java.util.Random;
import com.hbm.lib.RefStrings;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.world.World;
import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre;
public class BlockRemap extends Block implements ILookOverlay {
public Block remapBlock;
public int remapMeta;
protected BlockRemap(Block block, int meta) {
super(Material.tnt);
this.remapBlock = block;
this.remapMeta = meta;
this.setTickRandomly(true);
}
@Override
public Block setBlockName(String name) {
super.setBlockName(name);
this.setBlockTextureName(RefStrings.MODID + ":" + name);
return this;
}
@Override
public void updateTick(World world, int x, int y, int z, Random rand) {
world.setBlock(x, y, z, this.remapBlock, this.remapMeta, 2);
}
@Override
public void printHook(Pre event, World world, int x, int y, int z) {
ILookOverlay.printGeneric(event, "Compatibility block, will convert on update tick.", 0xffff00, 0x404000, new ArrayList());
}
}

View File

@ -33,6 +33,7 @@ import net.minecraft.block.Block;
import net.minecraft.block.BlockFalling;
import net.minecraft.block.material.*;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.ItemBlock;
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidRegistry;
@ -207,8 +208,11 @@ public class ModBlocks {
public static Block block_aluminium;
public static Block block_fluorite;
public static Block block_steel;
public static Block block_tcalloy;
public static Block block_cdalloy;
public static Block block_lead;
public static Block block_bismuth;
public static Block block_cadmium;
public static Block block_coltan;
public static Block block_tantalium;
public static Block block_niobium;
@ -1395,8 +1399,11 @@ public class ModBlocks {
block_aluminium = new BlockBeaconable(Material.iron).setBlockName("block_aluminium").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_aluminium");
block_fluorite = new BlockBeaconable(Material.iron).setBlockName("block_fluorite").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_fluorite");
block_steel = new BlockBeaconable(Material.iron).setBlockName("block_steel").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_steel");
block_tcalloy = new BlockBeaconable(Material.iron).setBlockName("block_tcalloy").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_tcalloy");
block_cdalloy = new BlockBeaconable(Material.iron).setBlockName("block_cdalloy").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_cdalloy");
block_lead = new BlockBeaconable(Material.iron).setBlockName("block_lead").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(30.0F).setBlockTextureName(RefStrings.MODID + ":block_lead");
block_bismuth = new BlockBeaconable(Material.iron).setBlockName("block_bismuth").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(30.0F).setBlockTextureName(RefStrings.MODID + ":block_bismuth");
block_cadmium = new BlockBeaconable(Material.iron).setBlockName("block_cadmium").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(30.0F).setBlockTextureName(RefStrings.MODID + ":block_cadmium");
block_coltan = new BlockBeaconable(Material.iron).setBlockName("block_coltan").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(30.0F).setBlockTextureName(RefStrings.MODID + ":block_coltan");
block_tantalium = new BlockBeaconable(Material.iron).setBlockName("block_tantalium").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(30.0F).setBlockTextureName(RefStrings.MODID + ":block_tantalium");
block_niobium = new BlockBeaconable(Material.iron).setBlockName("block_niobium").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(30.0F);
@ -2533,8 +2540,11 @@ public class ModBlocks {
GameRegistry.registerBlock(block_beryllium, block_beryllium.getUnlocalizedName());
GameRegistry.registerBlock(block_cobalt, block_cobalt.getUnlocalizedName());
GameRegistry.registerBlock(block_steel, block_steel.getUnlocalizedName());
GameRegistry.registerBlock(block_tcalloy, block_tcalloy.getUnlocalizedName());
GameRegistry.registerBlock(block_cdalloy, block_cdalloy.getUnlocalizedName());
GameRegistry.registerBlock(block_lead, block_lead.getUnlocalizedName());
GameRegistry.registerBlock(block_bismuth, block_bismuth.getUnlocalizedName());
GameRegistry.registerBlock(block_cadmium, block_cadmium.getUnlocalizedName());
GameRegistry.registerBlock(block_coltan, block_coltan.getUnlocalizedName());
GameRegistry.registerBlock(block_tantalium, block_tantalium.getUnlocalizedName());
GameRegistry.registerBlock(block_niobium, block_niobium.getUnlocalizedName());
@ -3451,7 +3461,12 @@ public class ModBlocks {
GameRegistry.registerBlock(b, ItemBlockBase.class, b.getUnlocalizedName());
}
/*private static void register(Block b, Class<? extends ItemBlock> clazz) {
private static void register(Block b, Class<? extends ItemBlock> clazz) {
GameRegistry.registerBlock(b, clazz, b.getUnlocalizedName());
}*/
}
public static void addRemap(String unloc, Block block, int meta) {
Block remap = new BlockRemap(block, meta).setBlockName(unloc);
register(remap, ItemBlockRemap.class);
}
}

View File

@ -51,6 +51,9 @@ public class MineralRecipes {
add1To9Pair(ModBlocks.block_polymer, ModItems.ingot_polymer);
add1To9Pair(ModBlocks.block_bakelite, ModItems.ingot_bakelite);
add1To9Pair(ModBlocks.block_rubber, ModItems.ingot_rubber);
add1To9Pair(ModBlocks.block_cadmium, ModItems.ingot_cadmium);
add1To9Pair(ModBlocks.block_tcalloy, ModItems.ingot_tcalloy);
add1To9Pair(ModBlocks.block_cdalloy, ModItems.ingot_cdalloy);
for(int i = 0; i < EnumCokeType.values().length; i++) {
add1To9PairSameMeta(Item.getItemFromBlock(ModBlocks.block_coke), ModItems.coke, i);

View File

@ -0,0 +1,36 @@
package com.hbm.explosion.vanillant.standard;
import com.hbm.explosion.vanillant.ExplosionVNT;
import com.hbm.explosion.vanillant.interfaces.IBlockMutator;
import com.hbm.inventory.RecipesCommon.MetaBlock;
import net.minecraft.block.Block;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
public class BlockMutatorDebris implements IBlockMutator {
protected MetaBlock metaBlock;
public BlockMutatorDebris(Block block) {
this(block, 0);
}
public BlockMutatorDebris(Block block, int meta) {
this.metaBlock = new MetaBlock(block, meta);
}
@Override public void mutatePre(ExplosionVNT explosion, Block block, int meta, int x, int y, int z) { }
@Override public void mutatePost(ExplosionVNT explosion, int x, int y, int z) {
World world = explosion.world;
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
Block b = world.getBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ);
if(b.isNormalCube()) {
world.setBlock(x, y, z, metaBlock.block, metaBlock.meta, 3);
return;
}
}
}
}

View File

@ -352,7 +352,7 @@ public class OreDictManager {
BI .nugget(nugget_bismuth) .ingot(ingot_bismuth) .dust(powder_bismuth);
AS .nugget(nugget_arsenic) .ingot(ingot_arsenic);
CA .ingot(ingot_calcium) .dust(powder_calcium);
CD .ingot(ingot_cadmium) .dust(powder_cadmium);
CD .ingot(ingot_cadmium) .dust(powder_cadmium) .block(block_cadmium);
TA .nugget(nugget_tantalium) .gem(gem_tantalium) .ingot(ingot_tantalium) .dust(powder_tantalium) .block(block_tantalium);
COLTAN .ingot(fragment_coltan) .dust(powder_coltan_ore) .block(block_coltan) .ore(ore_coltan);
NB .nugget(fragment_niobium) .ingot(ingot_niobium) .dustSmall(powder_niobium_tiny) .dust(powder_niobium) .block(block_niobium);

View File

@ -99,7 +99,7 @@ public class Mats {
public static final NTMMaterial MAT_TUNGSTEN = makeSmeltable(7400, W, 0x868686, 0x000000, 0x977474).setShapes(WIRE, INGOT, DUST, BLOCK);
public static final NTMMaterial MAT_ALUMINIUM = makeSmeltable(1300, AL, 0xFFFFFF, 0x344550, 0xD0B8EB).setShapes(WIRE, INGOT, DUST, PLATE, CASTPLATE, BLOCK);
public static final NTMMaterial MAT_LEAD = makeSmeltable(8200, PB, 0xA6A6B2, 0x03030F, 0x646470).setShapes(NUGGET, INGOT, DUST, PLATE, CASTPLATE, BLOCK);
public static final NTMMaterial MAT_BISMUTH = makeSmeltable(8300, df("Bismuth"), 0xB200FF).setShapes(NUGGET, BILLET, INGOT, DUST, BLOCK);
public static final NTMMaterial MAT_BISMUTH = makeSmeltable(8300, BI, 0xB200FF).setShapes(NUGGET, BILLET, INGOT, DUST, BLOCK);
public static final NTMMaterial MAT_ARSENIC = makeSmeltable(3300, AS, 0x6CBABA, 0x242525, 0x558080).setShapes(NUGGET, INGOT);
public static final NTMMaterial MAT_TANTALIUM = makeSmeltable(7300, TA, 0xFFFFFF, 0x1D1D36, 0xA89B74).setShapes(NUGGET, INGOT, DUST, BLOCK);
public static final NTMMaterial MAT_NIOBIUM = makeSmeltable(4100, NB, 0xB76EC9, 0x2F2D42, 0xD576B1).setShapes(NUGGET, DUSTTINY, INGOT, DUST, BLOCK);
@ -107,6 +107,7 @@ public class Mats {
public static final NTMMaterial MAT_COBALT = makeSmeltable(2700, CO, 0xC2D1EE, 0x353554, 0x8F72AE).setShapes(NUGGET, DUSTTINY, BILLET, INGOT, DUST, BLOCK);
public static final NTMMaterial MAT_BORON = makeSmeltable(500, B, 0xBDC8D2, 0x29343E, 0xAD72AE).setShapes(DUSTTINY, INGOT, DUST, BLOCK);
public static final NTMMaterial MAT_CADMIUM = makeSmeltable(4800, CD, 0xFFFADE, 0x350000, 0xA85600).setShapes(INGOT, DUST);
public static final NTMMaterial MAT_OSMIRIDIUM = makeSmeltable(7699, OSMIRIDIUM, 0xDBE3EF, 0x7891BE, 0xACBDD9).setShapes(NUGGET, INGOT, CASTPLATE);
//Alloys
public static final NTMMaterial MAT_STEEL = makeSmeltable(_AS + 0, STEEL, 0xAFAFAF, 0x0F0F0F, 0x4A4A4A).setShapes(DUSTTINY, INGOT, DUST, PLATE, CASTPLATE, BLOCK);

View File

@ -8107,10 +8107,6 @@ public class ModItems {
addRemap("gas_lpg", gas_full, Fluids.LPG.getID());
}
public static void addRemap(String unloc, int removoingTheseWouldTakeForever, Item item, Enum sub) {
addRemap(unloc, item, sub.ordinal());
}
public static void addRemap(String unloc, Item item, Enum sub) {
addRemap(unloc, item, sub.ordinal());
}

View File

@ -0,0 +1,34 @@
package com.hbm.items.block;
import java.util.List;
import com.hbm.blocks.BlockRemap;
import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.world.World;
public class ItemBlockRemap extends ItemBlockBase {
public ItemBlockRemap(Block block) {
super(block);
}
@Override
public void onUpdate(ItemStack stack, World world, Entity entity, int slot, boolean held) {
if(!(entity instanceof EntityPlayer) || !(this.field_150939_a instanceof BlockRemap)) return;
EntityPlayer player = (EntityPlayer) entity;
BlockRemap remap = (BlockRemap) this.field_150939_a;
player.inventory.setInventorySlotContents(slot, new ItemStack(remap.remapBlock, stack.stackSize, remap.remapMeta));
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
list.add(EnumChatFormatting.RED + "Compatibility item, hold in inventory to convert!");
}
}

View File

@ -764,10 +764,10 @@ public class CraftingManager {
addShapelessAuto(new ItemStack(ModItems.ams_catalyst_schrabidium, 1), new Object[] { ModItems.ams_catalyst_blank, ModItems.rune_dagaz, ModItems.rune_hagalaz, ModItems.rune_thurisaz, ModItems.rune_thurisaz, SA326.dust(), SA326.dust(), SA326.dust(), SA326.dust() });
addShapelessAuto(new ItemStack(ModItems.ams_catalyst_dineutronium, 1), new Object[] { ModItems.ams_catalyst_blank, ModItems.rune_hagalaz, ModItems.rune_hagalaz, ModItems.rune_thurisaz, ModItems.rune_thurisaz, DNT.dust(), DNT.dust(), DNT.dust(), DNT.dust() });
addRecipeAuto(new ItemStack(ModBlocks.dfc_core, 1), new Object[] { "DLD", "LML", "DLD", 'D', ModItems.ingot_bismuth, 'L', DNT.block(), 'M', KEY_CIRCUIT_BISMUTH });
addRecipeAuto(new ItemStack(ModBlocks.dfc_emitter, 1), new Object[] { "SDS", "TXL", "SDS", 'S', OSMIRIDIUM.ingot(), 'D', ModItems.plate_desh, 'T', ModBlocks.machine_transformer_dnt, 'X', ModItems.crystal_xen, 'L', ModItems.sat_head_laser });
addRecipeAuto(new ItemStack(ModBlocks.dfc_receiver, 1), new Object[] { "SDS", "TXL", "SDS", 'S', OSMIRIDIUM.ingot(), 'D', ModItems.plate_desh, 'T', ModBlocks.machine_transformer_dnt, 'X', new ItemStack(ModBlocks.sellafield, 1, 5), 'L', ModItems.hull_small_steel });
addRecipeAuto(new ItemStack(ModBlocks.dfc_injector, 1), new Object[] { "SDS", "TXL", "SDS", 'S', OSMIRIDIUM.ingot(), 'D', CMB.plate(), 'T', ModBlocks.machine_fluidtank, 'X', ModItems.motor, 'L', ModItems.pipes_steel });
addRecipeAuto(new ItemStack(ModBlocks.dfc_stabilizer, 1), new Object[] { "SDS", "TXL", "SDS", 'S', OSMIRIDIUM.ingot(), 'D', ModItems.plate_desh, 'T', ModItems.singularity_spark, 'X', ModItems.magnet_circular, 'L', ModItems.crystal_xen });
addRecipeAuto(new ItemStack(ModBlocks.dfc_emitter, 1), new Object[] { "SDS", "TXL", "SDS", 'S', OSMIRIDIUM.plateCast(), 'D', ModItems.plate_desh, 'T', ModBlocks.machine_transformer_dnt, 'X', ModItems.crystal_xen, 'L', ModItems.sat_head_laser });
addRecipeAuto(new ItemStack(ModBlocks.dfc_receiver, 1), new Object[] { "SDS", "TXL", "SDS", 'S', OSMIRIDIUM.plateCast(), 'D', ModItems.plate_desh, 'T', ModBlocks.machine_transformer_dnt, 'X', new ItemStack(ModBlocks.sellafield, 1, 5), 'L', ModItems.hull_small_steel });
addRecipeAuto(new ItemStack(ModBlocks.dfc_injector, 1), new Object[] { "SDS", "TXL", "SDS", 'S', OSMIRIDIUM.plateCast(), 'D', CMB.plate(), 'T', ModBlocks.machine_fluidtank, 'X', ModItems.motor, 'L', ModItems.pipes_steel });
addRecipeAuto(new ItemStack(ModBlocks.dfc_stabilizer, 1), new Object[] { "SDS", "TXL", "SDS", 'S', OSMIRIDIUM.plateCast(), 'D', ModItems.plate_desh, 'T', ModItems.singularity_spark, 'X', ModItems.magnet_circular, 'L', ModItems.crystal_xen });
addRecipeAuto(new ItemStack(ModBlocks.barrel_plastic, 1), new Object[] { "IPI", "I I", "IPI", 'I', ModItems.plate_polymer, 'P', AL.plate() });
addRecipeAuto(new ItemStack(ModBlocks.barrel_iron, 1), new Object[] { "IPI", "I I", "IPI", 'I', IRON.plate(), 'P', IRON.ingot() });
addShapelessAuto(new ItemStack(ModBlocks.barrel_iron, 1), new Object[] { ModBlocks.barrel_corroded, ANY_TAR.any() });

View File

@ -22,6 +22,8 @@ public class RenderStandardStraightRail implements ISimpleBlockRenderingHandler
Tessellator tessellator = Tessellator.instance;
GL11.glTranslated(0, -0.0625, 0);
GL11.glRotated(90, 0, 1, 0);
GL11.glScaled(0.3, 0.3, 0.3);
tessellator.startDrawingQuads();
ObjUtil.renderWithIcon((WavefrontObject) ResourceManager.rail_standard_straight, block.getIcon(1, 0), tessellator, 0, false);
tessellator.draw();

View File

@ -3432,6 +3432,7 @@ tile.block_beryllium.name=Berylliumblock
tile.block_bismuth.name=Bismutblock
tile.block_boron.name=Borblock
tile.block_c4.name=C4-Block
tile.block_cadmium.name=Cadmiumblock
tile.block_cap_fritz.name=Fritz-Kola Kronkorkenblock
tile.block_cap_korl.name=Korl Kronkorkenblock
tile.block_cap_nuka.name=Nuka Kronkorkenblock
@ -3440,6 +3441,7 @@ tile.block_cap_rad.name=S~Cola RAD Kronkorkenblock
tile.block_cap_sparkle.name=S~Cola Kronkorkenblock
tile.block_cap_star.name=Sunset Sarsaparilla Kronkorkenblock
tile.block_cap_sunset.name=Sunset Sarsaparilla Sternkronkorkenblock
tile.block_cdalloy.name=Cadmiumstahlblock
tile.block_cobalt.name=Kobaltblock
tile.block_coke.coal.name=Kohlekoksblock
tile.block_coke.lignite.name=Braunkohlekoksblock
@ -3507,6 +3509,7 @@ tile.block_starmetal.name=§9Sternenmetallblock§r
tile.block_steel.name=Stahlblock
tile.block_sulfur.name=Schwefelblock
tile.block_tantalium.name=Tantalblock
tile.block_tcalloy.name=Technetiumstahlblock
tile.block_thorium.name=Thorium-232-Block
tile.block_thorium_fuel.name=Thoriumkernbrennstoffblock
tile.block_titanium.name=Titanblock

View File

@ -4240,6 +4240,7 @@ tile.block_beryllium.name=Block of Beryllium
tile.block_bismuth.name=Block of Bismuth
tile.block_boron.name=Block of Boron
tile.block_c4.name=Block of C-4
tile.block_cadmium.name=Block of Cadmium
tile.block_cap_fritz.name=Block of Fritz Cola Bottle Caps
tile.block_cap_korl.name=Block of Korl Bottle Caps
tile.block_cap_nuka.name=Block of Nuka Cola Bottle Caps
@ -4248,6 +4249,7 @@ tile.block_cap_rad.name=Block of S~Cola RAD Bottle Caps
tile.block_cap_sparkle.name=Block of S~Cola Bottle Caps
tile.block_cap_star.name=Block of Sunset Sarsaparilla Star Caps
tile.block_cap_sunset.name=Block of Sunset Sarsaparilla Bottle Caps
tile.block_cdalloy.name=Block of Cadmium Steel
tile.block_cobalt.name=Block of Cobalt
tile.block_coke.coal.name=Block of Coal Coke
tile.block_coke.lignite.name=Block of Lignite Coke
@ -4319,6 +4321,7 @@ tile.block_starmetal.name=§9Block of Starmetal§r
tile.block_steel.name=Block of Steel
tile.block_sulfur.name=Block of Sulfur
tile.block_tantalium.name=Block of Tantalium
tile.block_tcalloy.name=Block of Technetium Steel
tile.block_thorium.name=Block of Thorium-232
tile.block_thorium_fuel.name=Block of Thorium Fuel
tile.block_titanium.name=Block of Titanium

Binary file not shown.

After

Width:  |  Height:  |  Size: 288 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 265 B