mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
Revert "Merge remote-tracking branch 'origin/master'"
This reverts commit e62144b627398e8e2fa39be3d686ee963fa631c1.
This commit is contained in:
parent
e62144b627
commit
c47072ab1d
@ -888,8 +888,6 @@ public class ModBlocks {
|
||||
public static Block machine_powerrtg;
|
||||
public static Block machine_radiolysis;
|
||||
|
||||
public static Block custom_part_assembler;
|
||||
|
||||
public static Block machine_well;
|
||||
public static Block oil_pipe;
|
||||
public static final int guiID_machine_well = 40;
|
||||
@ -1827,8 +1825,6 @@ public class ModBlocks {
|
||||
machine_powerrtg = new MachineMiniRTG(Material.iron).setBlockName("machine_powerrtg").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":rtg_polonium");
|
||||
machine_radiolysis = new MachineRadiolysis(Material.iron).setBlockName("machine_radiolysis").setHardness(10.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel_machine");
|
||||
|
||||
custom_part_assembler = new CustomPartAssembler(Material.iron).setBlockName("custom_part_assembler").setHardness(10.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel_machine");
|
||||
|
||||
red_wire_coated = new WireCoated(Material.iron).setBlockName("red_wire_coated").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":red_wire_coated");
|
||||
red_cable = new BlockCable(Material.iron).setBlockName("red_cable").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":cable_neo");
|
||||
rf_cable = new BlockRFCable(Material.iron).setBlockName("rf_cable").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":rf_cable_icon");
|
||||
@ -2880,7 +2876,6 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(machine_radiolysis, machine_radiolysis.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_spp_bottom, machine_spp_bottom.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_spp_top, machine_spp_top.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(custom_part_assembler, custom_part_assembler.getUnlocalizedName());
|
||||
|
||||
GameRegistry.registerBlock(hadron_plating, hadron_plating.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(hadron_plating_blue, hadron_plating_blue.getUnlocalizedName());
|
||||
|
||||
@ -1,121 +0,0 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.machine.TileEntityCustomPartAssembler;
|
||||
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class CustomPartAssembler extends BlockContainer {
|
||||
|
||||
public CustomPartAssembler(Material mat) {
|
||||
super(mat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int type) {
|
||||
return new TileEntityCustomPartAssembler();
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
private IIcon iconBottom;
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister reg) {
|
||||
this.blockIcon = reg.registerIcon(RefStrings.MODID + ":block_steel_machine");
|
||||
this.iconTop = reg.registerIcon(RefStrings.MODID + ":block_steel");
|
||||
//this.blockIcon = reg.registerIcon(RefStrings.MODID + ":custom_part_assembler_side");
|
||||
//this.iconTop = reg.registerIcon(RefStrings.MODID + ":custom_part_assembler_top");
|
||||
this.iconBottom = reg.registerIcon(RefStrings.MODID + ":block_steel");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
|
||||
switch(side) {
|
||||
case 0:
|
||||
return iconBottom;
|
||||
case 1:
|
||||
return iconTop;
|
||||
default:
|
||||
return blockIcon;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
if(world.isRemote) {
|
||||
return true;
|
||||
} else if(!player.isSneaking()) {
|
||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, x, y, z);
|
||||
return true;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void breakBlock(World world, int x, int y, int z, Block b, int i) {
|
||||
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
|
||||
if(te instanceof ISidedInventory) {
|
||||
|
||||
ISidedInventory sidedinv = (ISidedInventory) te;
|
||||
|
||||
if(sidedinv != null) {
|
||||
for(int i1 = 0; i1 < sidedinv.getSizeInventory(); ++i1) {
|
||||
ItemStack itemstack = sidedinv.getStackInSlot(i1);
|
||||
|
||||
if(itemstack != null) {
|
||||
float f = world.rand.nextFloat() * 0.8F + 0.1F;
|
||||
float f1 = world.rand.nextFloat() * 0.8F + 0.1F;
|
||||
float f2 = world.rand.nextFloat() * 0.8F + 0.1F;
|
||||
|
||||
while(itemstack.stackSize > 0) {
|
||||
int j1 = world.rand.nextInt(21) + 10;
|
||||
|
||||
if(j1 > itemstack.stackSize) {
|
||||
j1 = itemstack.stackSize;
|
||||
}
|
||||
|
||||
itemstack.stackSize -= j1;
|
||||
EntityItem entityitem = new EntityItem(world, x + f, y + f1, z + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage()));
|
||||
|
||||
if(itemstack.hasTagCompound()) {
|
||||
entityitem.getEntityItem().setTagCompound((NBTTagCompound) itemstack.getTagCompound().copy());
|
||||
}
|
||||
|
||||
float f3 = 0.05F;
|
||||
entityitem.motionX = (float) world.rand.nextGaussian() * f3;
|
||||
entityitem.motionY = (float) world.rand.nextGaussian() * f3 + 0.2F;
|
||||
entityitem.motionZ = (float) world.rand.nextGaussian() * f3;
|
||||
world.spawnEntityInWorld(entityitem);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
world.func_147453_f(x, y, z, b);
|
||||
}
|
||||
}
|
||||
|
||||
super.breakBlock(world, x, y, z, b, i);
|
||||
}
|
||||
}
|
||||
@ -515,11 +515,7 @@ public class OreDictManager {
|
||||
public DictFrame(String... mats) {
|
||||
this.mats = mats;
|
||||
}
|
||||
|
||||
public String[] getMaterials() {
|
||||
return this.mats;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Quick access methods to grab ore names for recipes.
|
||||
*/
|
||||
|
||||
@ -1,77 +0,0 @@
|
||||
package com.hbm.inventory.recipes;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import com.hbm.inventory.OreDictManager;
|
||||
import com.hbm.inventory.OreDictManager.DictFrame;
|
||||
|
||||
public class CustomNukeRecipes {
|
||||
|
||||
//a bit hacky, i'll probably just straight copy that system bob has yet to make
|
||||
public static float getQuantity(String key) {
|
||||
if(key.startsWith("nugget")) {
|
||||
return 1;
|
||||
} else if(key.startsWith("billet")) {
|
||||
return 6;
|
||||
} else if(key.startsWith("ingot")) {
|
||||
return 9;
|
||||
} else if(key.startsWith("block")) {
|
||||
return 81;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the OreDict key fits the material, but not the form
|
||||
* @param frame DictFrame
|
||||
* @param key Input key
|
||||
*/
|
||||
private static boolean containsMatch(DictFrame frame, String key) {
|
||||
String[] mats = frame.getMaterials();
|
||||
|
||||
for(String mat : mats) {
|
||||
if(key.contains(mat)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the OreDict key fits the material and the form thereof.
|
||||
* @param mats Ore names
|
||||
* @param key Input key
|
||||
*/
|
||||
private static boolean containsMatch(String[] mats, String key) {
|
||||
|
||||
for(String mat : mats) {
|
||||
if(mat.contains(key)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static float nonPredetonatingFissile(String key) {
|
||||
float multiplier = getQuantity(key);
|
||||
if(multiplier == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if(containsMatch(OreDictManager.U233, key)) {
|
||||
return 1.05f * multiplier;
|
||||
} else if(containsMatch(OreDictManager.U235, key)) {
|
||||
return 1.0f * multiplier;
|
||||
} else if(containsMatch(OreDictManager.NP237, key)) {
|
||||
return 0.95f * multiplier;
|
||||
} else if(containsMatch(OreDictManager.SA326, key)) {
|
||||
return 10.0f * multiplier;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
@ -1818,7 +1818,7 @@ public class ModItems {
|
||||
public static Item n2_charge;
|
||||
public static Item egg_balefire_shard;
|
||||
public static Item egg_balefire;
|
||||
|
||||
|
||||
public static Item custom_tnt;
|
||||
public static Item custom_nuke;
|
||||
public static Item custom_hydro;
|
||||
|
||||
@ -1,61 +0,0 @@
|
||||
package com.hbm.items.bomb;
|
||||
|
||||
import com.hbm.tileentity.bomb.TileEntityNukeCustom.EnumBombType;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.ChatStyle;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ItemCustomNukeComponent extends Item {
|
||||
|
||||
//Use getItemDamage() for the boolean type
|
||||
public void writeToNBT(ItemStack stack, EnumBombType stage, float value, float multiplier) {
|
||||
|
||||
if(!stack.hasTagCompound())
|
||||
stack.stackTagCompound = new NBTTagCompound();
|
||||
|
||||
stack.stackTagCompound.setByte("stage", (byte)stage.ordinal());
|
||||
stack.stackTagCompound.setFloat("value", value);
|
||||
stack.stackTagCompound.setFloat("multiplier", multiplier);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
|
||||
|
||||
if(!world.isRemote) {
|
||||
player.addChatComponentMessage(new ChatComponentText("eat this, you gay pony").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)));
|
||||
}
|
||||
|
||||
return stack;
|
||||
}
|
||||
|
||||
private IIcon secondaryIcon;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister reg) {
|
||||
super.registerIcons(reg);
|
||||
|
||||
if(getHasSubtypes()) {
|
||||
secondaryIcon = reg.registerIcon(this.getIconString() + ".secondary");
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIconFromDamage(int meta) {
|
||||
|
||||
if(meta == 1 && secondaryIcon != null) {
|
||||
return this.secondaryIcon;
|
||||
} else {
|
||||
return this.itemIcon;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -271,8 +271,7 @@ public class CraftingManager {
|
||||
addRecipeAuto(new ItemStack(ModBlocks.anvil_murky, 1), new Object[] { "UUU", "UAU", "UUU", 'U', ModItems.undefined, 'A', ModBlocks.anvil_steel });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.machine_fraction_tower), new Object[] { "SHS", "SGS", "SHS", 'S', STEEL.plate(), 'H', ModItems.hull_big_steel, 'G', ModBlocks.steel_grate });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.fraction_spacer), new Object[] { "BHB", 'H', ModItems.hull_big_steel, 'B', Blocks.iron_bars });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.custom_part_assembler), new Object[] { "HBH", "STD", "PCP", 'H', ModItems.coil_tungsten, 'B', ItemBattery.getFullBattery(ModItems.battery_advanced), 'S', ModItems.screwdriver, 'T', ModBlocks.machine_armor_table, 'D', ModItems.hand_drill, 'P', ModItems.plate_steel, 'C', ModItems.circuit_copper });
|
||||
|
||||
|
||||
addRecipeAuto(new ItemStack(ModBlocks.muffler, 1), new Object[] { "III", "IWI", "III", 'I', ModItems.plate_polymer, 'W', Blocks.wool });
|
||||
|
||||
addRecipeAuto(new ItemStack(Item.getItemFromBlock(ModBlocks.factory_titanium_hull), 1), new Object[] { "PIP", "I I", "PIP", 'P', TI.plate(), 'I', TI.ingot() });
|
||||
|
||||
@ -1,68 +0,0 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
public class TileEntityCustomPartAssembler extends TileEntityMachineBase {
|
||||
|
||||
//Save the item and the mode for automation purposes
|
||||
public byte item;
|
||||
public byte mode;
|
||||
|
||||
private static final int[] slot_io = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 };
|
||||
|
||||
public TileEntityCustomPartAssembler() {
|
||||
super(17); //16 input, 1 output
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "container.customPartAssembler";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int i, ItemStack itemStack) {
|
||||
return i <= 15;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getAccessibleSlotsFromSide(int side) {
|
||||
return slot_io;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canExtractItem(int i, ItemStack itemStack, int j) {
|
||||
return i == 16;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
/*
|
||||
* String troll = "trolling";
|
||||
*
|
||||
* System.Console.WriteLine($"We do a little bit of {troll}!");
|
||||
*/
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canUpdate() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
item = nbt.getByte("item");
|
||||
mode = nbt.getByte("mode");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbt) {
|
||||
super.writeToNBT(nbt);
|
||||
nbt.setByte("item", item);
|
||||
nbt.setByte("mode", mode);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user