mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
shredder recipes, UV lamp class
This commit is contained in:
parent
f186ed7aea
commit
639b2745b8
@ -298,7 +298,9 @@ public class ModBlocks {
|
||||
public static Block lamp_tritium_green_on;
|
||||
public static Block lamp_tritium_blue_off;
|
||||
public static Block lamp_tritium_blue_on;
|
||||
|
||||
|
||||
public static Block lamp_uv_off;
|
||||
public static Block lamp_uv_on;
|
||||
public static Block lamp_demon;
|
||||
|
||||
public static Block reinforced_stone;
|
||||
@ -1447,7 +1449,9 @@ public class ModBlocks {
|
||||
lamp_tritium_green_on = new ReinforcedLamp(Material.redstoneLight, true).setBlockName("lamp_tritium_green_on").setStepSound(Block.soundTypeGlass).setHardness(3.0F).setBlockTextureName(RefStrings.MODID + ":lamp_tritium_green_on");
|
||||
lamp_tritium_blue_off = new ReinforcedLamp(Material.redstoneLight, false).setBlockName("lamp_tritium_blue_off").setStepSound(Block.soundTypeGlass).setCreativeTab(MainRegistry.blockTab).setHardness(3.0F).setBlockTextureName(RefStrings.MODID + ":lamp_tritium_blue_off");
|
||||
lamp_tritium_blue_on = new ReinforcedLamp(Material.redstoneLight, true).setBlockName("lamp_tritium_blue_on").setStepSound(Block.soundTypeGlass).setCreativeTab(MainRegistry.blockTab).setHardness(3.0F).setBlockTextureName(RefStrings.MODID + ":lamp_tritium_blue_on");
|
||||
|
||||
|
||||
lamp_uv_off = new UVLamp(false).setBlockName("lamp_uv_off").setCreativeTab(MainRegistry.blockTab);
|
||||
lamp_uv_on = new UVLamp(true).setBlockName("lamp_uv_on").setCreativeTab(null);
|
||||
lamp_demon = new DemonLamp().addRadiation(100000F).addFire(25).toBlock().setBlockName("lamp_demon").setStepSound(Block.soundTypeMetal).setCreativeTab(MainRegistry.blockTab).setLightLevel(1F).setHardness(3.0F).setBlockTextureName(RefStrings.MODID + ":lamp_demon");
|
||||
|
||||
reinforced_stone = new BlockGeneric(Material.rock).setBlockName("reinforced_stone").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(3000.0F).setBlockTextureName(RefStrings.MODID + ":reinforced_stone");
|
||||
@ -2411,6 +2415,8 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(lamp_tritium_green_on, lamp_tritium_green_on.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(lamp_tritium_blue_off, lamp_tritium_blue_off.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(lamp_tritium_blue_on, lamp_tritium_blue_on.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(lamp_uv_off, lamp_uv_off.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(lamp_uv_on, lamp_uv_on.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(lamp_demon, ItemBlockHazard.class, lamp_demon.getUnlocalizedName());
|
||||
|
||||
//Reinforced Blocks
|
||||
|
||||
37
src/main/java/com/hbm/blocks/machine/UVLamp.java
Normal file
37
src/main/java/com/hbm/blocks/machine/UVLamp.java
Normal file
@ -0,0 +1,37 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.tileentity.machine.TileEntityUVLamp;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class UVLamp extends BlockDummyable {
|
||||
|
||||
public UVLamp(boolean isOn) {
|
||||
super(Material.iron);
|
||||
this.setStepSound(Block.soundTypeMetal);
|
||||
this.setHardness(3.0F);
|
||||
this.setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
|
||||
if(isOn) this.setLightLevel(5F/15F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
return new TileEntityUVLamp();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getDimensions() {
|
||||
return new int[] {1, 0, 0, 0, 0, 0};
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOffset() {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@ -173,6 +173,8 @@ public class ShredderRecipes {
|
||||
ShredderRecipes.setRecipe(Items.reeds, new ItemStack(Items.paper, 3));
|
||||
ShredderRecipes.setRecipe(Items.fermented_spider_eye, new ItemStack(ModItems.powder_poison, 3));
|
||||
ShredderRecipes.setRecipe(Items.poisonous_potato, new ItemStack(ModItems.powder_poison, 1));
|
||||
|
||||
for(int i = 0; i < 5; i++) ShredderRecipes.setRecipe(new ItemStack(Items.skull, 1, i), new ItemStack(ModItems.biomass));
|
||||
|
||||
ShredderRecipes.setRecipe(ModItems.ingot_schraranium, new ItemStack(ModItems.nugget_schrabidium, 2));
|
||||
ShredderRecipes.setRecipe(ModItems.crystal_coal, new ItemStack(ModItems.powder_coal, 3));
|
||||
@ -287,7 +289,7 @@ public class ShredderRecipes {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns null when no ingot or gem is found, for deciding whether the block shredding output shoiuld be 9 or 4 dusts
|
||||
* Returns null when no ingot or gem is found, for deciding whether the block shredding output should be 9 or 4 dusts
|
||||
* @param name
|
||||
* @return
|
||||
*/
|
||||
|
||||
@ -53,30 +53,38 @@ public class ItemCustomMissile extends Item {
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
|
||||
|
||||
ItemMissile chip = (ItemMissile) Item.getItemById(readFromNBT(stack, "chip"));
|
||||
ItemMissile warhead = (ItemMissile) Item.getItemById(readFromNBT(stack, "warhead"));
|
||||
ItemMissile fuselage = (ItemMissile) Item.getItemById(readFromNBT(stack, "fuselage"));
|
||||
ItemMissile stability = (ItemMissile) Item.getItemById(readFromNBT(stack, "stability"));
|
||||
ItemMissile thruster = (ItemMissile) Item.getItemById(readFromNBT(stack, "thruster"));
|
||||
|
||||
list.add(EnumChatFormatting.BOLD + "Warhead: " + EnumChatFormatting.GRAY + warhead.getWarhead((WarheadType)warhead.attributes[0]));
|
||||
list.add(EnumChatFormatting.BOLD + "Strength: " + EnumChatFormatting.GRAY + (Float)warhead.attributes[1]);
|
||||
list.add(EnumChatFormatting.BOLD + "Fuel Type: " + EnumChatFormatting.GRAY + fuselage.getFuel((FuelType)fuselage.attributes[0]));
|
||||
list.add(EnumChatFormatting.BOLD + "Fuel amount: " + EnumChatFormatting.GRAY + (Float)fuselage.attributes[1] + "l");
|
||||
list.add(EnumChatFormatting.BOLD + "Chip inaccuracy: " + EnumChatFormatting.GRAY + (Float)chip.attributes[0] * 100 + "%");
|
||||
if(!stack.hasTagCompound())
|
||||
return;
|
||||
|
||||
if(stability != null)
|
||||
list.add(EnumChatFormatting.BOLD + "Fin inaccuracy: " + EnumChatFormatting.GRAY + (Float)stability.attributes[0] * 100 + "%");
|
||||
else
|
||||
list.add(EnumChatFormatting.BOLD + "Fin inaccuracy: " + EnumChatFormatting.GRAY + "100%");
|
||||
|
||||
list.add(EnumChatFormatting.BOLD + "Size: " + EnumChatFormatting.GRAY + fuselage.getSize(fuselage.top) + "/" + fuselage.getSize(fuselage.bottom));
|
||||
|
||||
float health = warhead.health + fuselage.health + thruster.health;
|
||||
if(stability != null)
|
||||
health += stability.health;
|
||||
|
||||
list.add(EnumChatFormatting.BOLD + "Health: " + EnumChatFormatting.GRAY + health + "HP");
|
||||
try {
|
||||
ItemMissile chip = (ItemMissile) Item.getItemById(readFromNBT(stack, "chip"));
|
||||
ItemMissile warhead = (ItemMissile) Item.getItemById(readFromNBT(stack, "warhead"));
|
||||
ItemMissile fuselage = (ItemMissile) Item.getItemById(readFromNBT(stack, "fuselage"));
|
||||
ItemMissile stability = (ItemMissile) Item.getItemById(readFromNBT(stack, "stability"));
|
||||
ItemMissile thruster = (ItemMissile) Item.getItemById(readFromNBT(stack, "thruster"));
|
||||
|
||||
list.add(EnumChatFormatting.BOLD + "Warhead: " + EnumChatFormatting.GRAY + warhead.getWarhead((WarheadType)warhead.attributes[0]));
|
||||
list.add(EnumChatFormatting.BOLD + "Strength: " + EnumChatFormatting.GRAY + (Float)warhead.attributes[1]);
|
||||
list.add(EnumChatFormatting.BOLD + "Fuel Type: " + EnumChatFormatting.GRAY + fuselage.getFuel((FuelType)fuselage.attributes[0]));
|
||||
list.add(EnumChatFormatting.BOLD + "Fuel amount: " + EnumChatFormatting.GRAY + (Float)fuselage.attributes[1] + "l");
|
||||
list.add(EnumChatFormatting.BOLD + "Chip inaccuracy: " + EnumChatFormatting.GRAY + (Float)chip.attributes[0] * 100 + "%");
|
||||
|
||||
if(stability != null)
|
||||
list.add(EnumChatFormatting.BOLD + "Fin inaccuracy: " + EnumChatFormatting.GRAY + (Float)stability.attributes[0] * 100 + "%");
|
||||
else
|
||||
list.add(EnumChatFormatting.BOLD + "Fin inaccuracy: " + EnumChatFormatting.GRAY + "100%");
|
||||
|
||||
list.add(EnumChatFormatting.BOLD + "Size: " + EnumChatFormatting.GRAY + fuselage.getSize(fuselage.top) + "/" + fuselage.getSize(fuselage.bottom));
|
||||
|
||||
float health = warhead.health + fuselage.health + thruster.health;
|
||||
if(stability != null)
|
||||
health += stability.health;
|
||||
|
||||
list.add(EnumChatFormatting.BOLD + "Health: " + EnumChatFormatting.GRAY + health + "HP");
|
||||
|
||||
} catch(Exception ex) {
|
||||
list.add(EnumChatFormatting.RED + "### I AM ERROR ###");
|
||||
}
|
||||
}
|
||||
|
||||
public static MissileStruct getStruct(ItemStack stack) {
|
||||
|
||||
@ -126,6 +126,7 @@ public class CraftingManager {
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.biomass, 1), new Object[] { Items.wheat_seeds, Items.wheat_seeds, Items.wheat_seeds, Items.wheat_seeds, Items.wheat_seeds, Items.wheat_seeds, Items.wheat_seeds, Items.wheat_seeds, Items.wheat_seeds });
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.biomass, 2), new Object[] { Items.pumpkin_seeds, Items.pumpkin_seeds, Items.pumpkin_seeds, Items.pumpkin_seeds, Items.pumpkin_seeds, Items.pumpkin_seeds, Items.pumpkin_seeds, Items.pumpkin_seeds, Items.pumpkin_seeds });
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.biomass, 2), new Object[] { Items.melon_seeds, Items.melon_seeds, Items.melon_seeds, Items.melon_seeds, Items.melon_seeds, Items.melon_seeds, Items.melon_seeds, Items.melon_seeds, Items.melon_seeds });
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.biomass, 3), new Object[] { Items.rotten_flesh, Items.rotten_flesh, Items.rotten_flesh, Items.rotten_flesh });
|
||||
|
||||
//GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.part_lithium), new Object[] { "P", "D", "P", 'P', "plateSteel", 'D', "dustLithium" }));
|
||||
//GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.part_beryllium), new Object[] { "P", "D", "P", 'P', "plateSteel", 'D', "dustBeryllium" }));
|
||||
|
||||
@ -34,7 +34,7 @@ public class RenderItemStack {
|
||||
}
|
||||
}
|
||||
|
||||
public static void renderItemStackDry(int x, int y, float f0, ItemStack stack) {
|
||||
public static void renderItemStackNoEffect(int x, int y, float f0, ItemStack stack) {
|
||||
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
|
||||
|
||||
@ -0,0 +1,7 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
public class TileEntityUVLamp extends TileEntity {
|
||||
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.0 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.0 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.9 KiB |
Loading…
x
Reference in New Issue
Block a user