Merge remote-tracking branch 'origin/AAAAAAAAAAAAAAA' into AAAAAAAAAAAAAAA

This commit is contained in:
Lazzzycatwastaken 2025-03-30 00:36:18 +01:00
commit 7e54c5478b
144 changed files with 3372 additions and 997 deletions

View File

@ -12,7 +12,7 @@
* NTM Reloaded: https://github.com/TheOriginalGolem/Hbm-s-Nuclear-Tech-GIT/releases
* NTM Extended Edition (Alcater): https://github.com/Alcatergit/Hbm-s-Nuclear-Tech-GIT/releases
* NTM WarFactory: https://github.com/MisterNorwood/Hbm-s-Nuclear-Tech-GIT/releases
* NTM Community Edition (WarFactory): https://codeberg.org/MrNorwood/Hbm-s-Nuclear-Tech-CE
For 1.18, try Martin's remake: https://codeberg.org/MartinTheDragon/Nuclear-Tech-Mod-Remake/releases

View File

@ -1,12 +1,17 @@
## Changed
* The toolbox' functionality has been completely changed (thanks gamma)
* Instead of a crappy backpack substitute that doesn't work half the time, the toolbox can quickly swap out the hotbar when used
* Updated StG 77 recipe to use two grips and a proper scope
* Buffed the RPA set
* Tiered damage and durability weapon mods are now craftable
* Duct tape is now cheaper and less ugly
* .75 bolts now work as advertised
* Updated lead pipe texture
* Removed recipes from a few ancient melee weapons, as well as the creative tab listing
* Removed flat magnets
* Taint should now also affect non-solid blocks that are full cubes
* Reduced the AoE size of 7.62mm, .50 BMG and 10 gauge explosive projectiles
* Removed the old gun mechanism items, turrets now use the new cast parts
* A secret weapon and its variant have become craftable
* NEI now shows RBMK fuel rod recycling and cooling
* Removed most of the old unused siege mobs
## Fixed
* Fixed a bunch of singleblocks not accepting fluids (thanks mellow)
* Fixed fluid valves not properly disconnecting
* Fixed a dupe regarding the weapon mod table
* Fixed taint destroying bedrock
* Fixed ferrouranium plate not being castable
* Fixed bayonet not rendering properly in third person
* Fixed xenon poison gauge in the RBMK control panel not showing up on colums (oops)

View File

@ -276,6 +276,7 @@ public class ModBlocks {
public static Block part_emitter;
public static Block deco_loot;
public static Block pedestal;
public static Block skeleton_holder;
public static Block bobblehead;
public static Block snowglobe;
public static Block plushie;
@ -1467,6 +1468,7 @@ public class ModBlocks {
part_emitter = new PartEmitter().setBlockName("part_emitter").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(20.0F).setBlockTextureName(RefStrings.MODID + ":part_top");
deco_loot = new BlockLoot().setBlockName("deco_loot").setCreativeTab(null).setHardness(0.0F).setResistance(0.0F).setBlockTextureName(RefStrings.MODID + ":block_steel");
pedestal = new BlockPedestal().setBlockName("pedestal").setCreativeTab(null).setHardness(2.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":pedestal_top");
skeleton_holder = new BlockSkeletonHolder().setBlockName("skeleton_holder").setCreativeTab(null).setHardness(2.0F).setResistance(10.0F).setBlockTextureName("soul_sand");
bobblehead = new BlockBobble().setBlockName("bobblehead").setCreativeTab(MainRegistry.blockTab).setHardness(0.0F).setResistance(0.0F).setBlockTextureName(RefStrings.MODID + ":block_steel");
snowglobe = new BlockSnowglobe().setBlockName("snowglobe").setCreativeTab(MainRegistry.blockTab).setHardness(0.0F).setResistance(0.0F).setBlockTextureName(RefStrings.MODID + ":glass_boron");
plushie = new BlockPlushie().setBlockName("plushie").setStepSound(Block.soundTypeCloth).setResistance(50_0000.0F).setCreativeTab(MainRegistry.blockTab).setHardness(0.0F).setResistance(0.0F).setBlockTextureName(RefStrings.MODID + ":block_fiberglass_side");
@ -2613,6 +2615,7 @@ public class ModBlocks {
GameRegistry.registerBlock(part_emitter, ItemBlockBase.class, part_emitter.getUnlocalizedName());
GameRegistry.registerBlock(deco_loot, deco_loot.getUnlocalizedName());
GameRegistry.registerBlock(pedestal, pedestal.getUnlocalizedName());
register(skeleton_holder);
GameRegistry.registerBlock(bobblehead, ItemBlockMeta.class, bobblehead.getUnlocalizedName());
GameRegistry.registerBlock(snowglobe, ItemBlockMeta.class, snowglobe.getUnlocalizedName());
GameRegistry.registerBlock(plushie, ItemBlockBase.class, plushie.getUnlocalizedName());

View File

@ -19,6 +19,7 @@ import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.item.EntityFallingBlock;
import net.minecraft.entity.monster.EntityCreeper;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.PotionEffect;
@ -46,7 +47,7 @@ public class BlockTaint extends Block implements ITooltipProvider {
if(Math.abs(i) + Math.abs(j) + Math.abs(k) > 4) continue;
if(rand.nextFloat() > 0.25F) continue;
Block b = world.getBlock(x + i, y + j, z + k);
if(!b.isNormalCube() || b.isAir(world, x + i, y + j, z + k)) continue;
if(!b.renderAsNormalBlock() || b.isAir(world, x + i, y + j, z + k) || b == Blocks.bedrock) continue;
int targetMeta = meta + 1;
boolean hasAir = false;
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {

View File

@ -4,6 +4,7 @@ import java.util.Random;
import com.hbm.blocks.ModBlocks;
import com.hbm.items.ModItems;
import com.hbm.world.gen.INBTTransformable;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@ -20,7 +21,7 @@ import net.minecraft.util.Vec3;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
public class BlockModDoor extends Block {
public class BlockModDoor extends Block implements INBTTransformable {
@SideOnly(Side.CLIENT)
private IIcon[] field_150017_a;
@SideOnly(Side.CLIENT)
@ -234,7 +235,7 @@ public class BlockModDoor extends Block {
}
p_149727_1_.playSoundEffect(p_149727_2_, p_149727_3_, p_149727_4_, "hbm:block.openDoor", 1.0F, p_149727_1_.rand.nextFloat() * 0.1F + 0.9F);
return true;
}
@ -311,10 +312,10 @@ public class BlockModDoor extends Block {
}
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) {
if((p_149650_1_ & 8) != 0)
return null;
if (this == ModBlocks.door_metal)
return ModItems.door_metal;
else if (this == ModBlocks.door_office)
@ -396,4 +397,9 @@ public class BlockModDoor extends Block {
p_149681_1_.setBlockToAir(p_149681_2_, p_149681_3_ - 1, p_149681_4_);
}
}
}
@Override
public int transformMeta(int meta, int coordBaseMode) {
return INBTTransformable.transformMetaDoor(meta, coordBaseMode);
}
}

View File

@ -5,6 +5,8 @@ import java.util.Random;
import com.hbm.blocks.IBlockMulti;
import com.hbm.blocks.ITooltipProvider;
import com.hbm.world.gen.INBTTileEntityTransformable;
import com.hbm.world.gen.INBTTransformable;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@ -27,7 +29,7 @@ import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
public class BlockPlushie extends BlockContainer implements IBlockMulti, ITooltipProvider {
public class BlockPlushie extends BlockContainer implements IBlockMulti, ITooltipProvider, INBTTransformable {
public BlockPlushie() {
super(Material.cloth);
@ -37,7 +39,7 @@ public class BlockPlushie extends BlockContainer implements IBlockMulti, IToolti
@Override public boolean isOpaqueCube() { return false; }
@Override public boolean renderAsNormalBlock() { return false; }
@Override public Item getItemDropped(int i, Random rand, int j) { return null; }
@Override
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z, EntityPlayer player) {
TileEntityPlushie entity = (TileEntityPlushie) world.getTileEntity(x, y, z);
@ -47,7 +49,7 @@ public class BlockPlushie extends BlockContainer implements IBlockMulti, IToolti
@Override
public void onBlockHarvested(World world, int x, int y, int z, int meta, EntityPlayer player) {
if(!player.capabilities.isCreativeMode) {
harvesters.set(player);
if(!world.isRemote) {
@ -63,7 +65,7 @@ public class BlockPlushie extends BlockContainer implements IBlockMulti, IToolti
harvesters.set(null);
}
}
@Override
public void harvestBlock(World world, EntityPlayer player, int x, int y, int z, int meta) {
player.addStat(StatList.mineBlockStatArray[getIdFromBlock(this)], 1);
@ -80,7 +82,7 @@ public class BlockPlushie extends BlockContainer implements IBlockMulti, IToolti
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack stack) {
int meta = MathHelper.floor_double((double)((player.rotationYaw + 180.0F) * 16.0F / 360.0F) + 0.5D) & 15;
world.setBlockMetadataWithNotify(x, y, z, meta, 2);
TileEntityPlushie plushie = (TileEntityPlushie) world.getTileEntity(x, y, z);
plushie.type = PlushieType.values()[Math.abs(stack.getItemDamage()) % PlushieType.values().length];
plushie.markDirty();
@ -93,7 +95,7 @@ public class BlockPlushie extends BlockContainer implements IBlockMulti, IToolti
@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) {
TileEntityPlushie plushie = (TileEntityPlushie) world.getTileEntity(x, y, z);
plushie.squishTimer = 11;
@ -104,8 +106,13 @@ public class BlockPlushie extends BlockContainer implements IBlockMulti, IToolti
}
}
public static class TileEntityPlushie extends TileEntity {
@Override
public int transformMeta(int meta, int coordBaseMode) {
return (meta + coordBaseMode * 4) % 16;
}
public static class TileEntityPlushie extends TileEntity implements INBTTileEntityTransformable {
public PlushieType type = PlushieType.NONE;
public int squishTimer;
@ -120,7 +127,7 @@ public class BlockPlushie extends BlockContainer implements IBlockMulti, IToolti
this.writeToNBT(nbt);
return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, 0, nbt);
}
@Override
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) {
this.readFromNBT(pkt.func_148857_g());
@ -137,8 +144,13 @@ public class BlockPlushie extends BlockContainer implements IBlockMulti, IToolti
super.writeToNBT(nbt);
nbt.setByte("type", (byte) type.ordinal());
}
@Override
public void transformTE(World world, int coordBaseMode) {
type = PlushieType.values()[world.rand.nextInt(PlushieType.values().length - 1) + 1];
}
}
public static enum PlushieType {
NONE( "NONE", null),
YOMI( "Yomi", "Hi! Can I be your rabbit friend?"),
@ -147,7 +159,7 @@ public class BlockPlushie extends BlockContainer implements IBlockMulti, IToolti
public String label;
public String inscription;
private PlushieType(String label, String inscription) {
this.label = label;
this.inscription = inscription;

View File

@ -0,0 +1,114 @@
package com.hbm.blocks.generic;
import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.network.NetworkManager;
import net.minecraft.network.Packet;
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
public class BlockSkeletonHolder extends BlockContainer {
public BlockSkeletonHolder() {
super(Material.rock);
}
@Override
public TileEntity createNewTileEntity(World world, int meta) {
return new TileEntitySkeletonHolder();
}
@Override public int getRenderType() { return -1; }
@Override public boolean isOpaqueCube() { return false; }
@Override public boolean renderAsNormalBlock() { return false; }
@Override
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) {
int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;
if(i == 0) world.setBlockMetadataWithNotify(x, y, z, 5, 2);
if(i == 1) world.setBlockMetadataWithNotify(x, y, z, 3, 2);
if(i == 2) world.setBlockMetadataWithNotify(x, y, z, 4, 2);
if(i == 3) world.setBlockMetadataWithNotify(x, y, z, 2, 2);
}
@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;
if(player.isSneaking()) return false;
TileEntitySkeletonHolder pedestal = (TileEntitySkeletonHolder) world.getTileEntity(x, y, z);
if(pedestal.item == null && player.getHeldItem() != null) {
pedestal.item = player.getHeldItem().copy();
player.inventory.mainInventory[player.inventory.currentItem] = null;
pedestal.markDirty();
world.markBlockForUpdate(x, y, z);
return true;
} else if(pedestal.item != null && player.getHeldItem() == null) {
player.inventory.mainInventory[player.inventory.currentItem] = pedestal.item.copy();
pedestal.item = null;
pedestal.markDirty();
world.markBlockForUpdate(x, y, z);
return true;
}
return false;
}
@Override
public void breakBlock(World world, int x, int y, int z, Block block, int meta) {
if(!world.isRemote) {
TileEntitySkeletonHolder entity = (TileEntitySkeletonHolder) world.getTileEntity(x, y, z);
if(entity != null && entity.item != null) {
EntityItem item = new EntityItem(world, x + 0.5, y, z + 0.5, entity.item.copy());
world.spawnEntityInWorld(item);
}
}
super.breakBlock(world, x, y, z, block, meta);
}
public static class TileEntitySkeletonHolder extends TileEntity {
public ItemStack item;
@Override public boolean canUpdate() { return false; }
@Override
public Packet getDescriptionPacket() {
NBTTagCompound nbt = new NBTTagCompound();
this.writeToNBT(nbt);
return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, 0, nbt);
}
@Override
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) {
this.readFromNBT(pkt.func_148857_g());
}
@Override
public void readFromNBT(NBTTagCompound nbt) {
super.readFromNBT(nbt);
this.item = ItemStack.loadItemStackFromNBT(nbt.getCompoundTag("item"));
}
@Override
public void writeToNBT(NBTTagCompound nbt) {
super.writeToNBT(nbt);
if(this.item != null) {
NBTTagCompound stack = new NBTTagCompound();
this.item.writeToNBT(stack);
nbt.setTag("item", stack);
}
}
}
}

View File

@ -9,6 +9,7 @@ import com.hbm.blocks.IBlockSideRotation;
import com.hbm.blocks.ILookOverlay;
import com.hbm.blocks.ModBlocks;
import com.hbm.interfaces.IControlReceiver;
import com.hbm.items.ModItems;
import com.hbm.lib.RefStrings;
import com.hbm.main.MainRegistry;
import com.hbm.packet.PacketDispatcher;
@ -144,6 +145,8 @@ public class BlockWandJigsaw extends BlockContainer implements IBlockSideRotatio
return true;
}
if(player.getHeldItem() != null && player.getHeldItem().getItem() == ModItems.wand_s) return false;
if(world.isRemote) FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, x, y, z);
return true;

View File

@ -12,6 +12,7 @@ import com.hbm.blocks.ModBlocks;
import com.hbm.config.StructureConfig;
import com.hbm.itempool.ItemPool;
import com.hbm.lib.RefStrings;
import com.hbm.main.MainRegistry;
import com.hbm.tileentity.TileEntityLoadedBase;
import com.hbm.util.BufferUtil;
import com.hbm.util.I18nUtil;
@ -248,6 +249,11 @@ public class BlockWandLoot extends BlockContainer implements ILookOverlay, ITool
}
private void replace() {
if(!(worldObj.getBlock(xCoord, yCoord, zCoord) instanceof BlockWandLoot)) {
MainRegistry.logger.warn("Somehow the block at: " + xCoord + ", " + yCoord + ", " + zCoord + " isn't a loot block but we're doing a TE update as if it is, cancelling!");
return;
}
WeightedRandomChestContent[] pool = ItemPool.getPool(poolName);
worldObj.setBlock(xCoord, yCoord, zCoord, replaceBlock, replaceMeta, 2);

View File

@ -1,6 +1,7 @@
package com.hbm.blocks.machine;
import com.hbm.main.MainRegistry;
import com.hbm.world.gen.INBTTransformable;
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
import net.minecraft.block.Block;
@ -16,8 +17,8 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
public abstract class BlockMachineBase extends BlockContainer {
public abstract class BlockMachineBase extends BlockContainer implements INBTTransformable {
int guiID = -1;
protected boolean rotatable = false;
@ -25,13 +26,13 @@ public abstract class BlockMachineBase extends BlockContainer {
super(mat);
this.guiID = guiID;
}
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
if(guiID == -1)
return false;
if(world.isRemote) {
return true;
} else if(!player.isSneaking()) {
@ -41,9 +42,9 @@ public abstract class BlockMachineBase extends BlockContainer {
return false;
}
}
private static boolean keepInventory;
@Override
public void breakBlock(World world, int x, int y, int z, Block block, int meta) {
@ -96,18 +97,24 @@ public abstract class BlockMachineBase extends BlockContainer {
super.breakBlock(world, x, y, z, block, meta);
}
@Override
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) {
if(!rotatable)
return;
int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;
if(i == 0) world.setBlockMetadataWithNotify(x, y, z, 2, 2);
if(i == 1) world.setBlockMetadataWithNotify(x, y, z, 5, 2);
if(i == 2) world.setBlockMetadataWithNotify(x, y, z, 3, 2);
if(i == 3) world.setBlockMetadataWithNotify(x, y, z, 4, 2);
}
}
@Override
public int transformMeta(int meta, int coordBaseMode) {
if(!rotatable) return meta;
return INBTTransformable.transformMetaDeco(meta, coordBaseMode);
}
}

View File

@ -4,6 +4,7 @@ import java.util.Random;
import com.hbm.main.MainRegistry;
import com.hbm.tileentity.machine.TileEntityMachineEPress;
import com.hbm.world.gen.INBTTransformable;
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
import net.minecraft.block.Block;
@ -19,7 +20,7 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
public class MachineEPress extends BlockContainer {
public class MachineEPress extends BlockContainer implements INBTTransformable {
private final Random field_149933_a = new Random();
private static boolean keepInventory;
@ -120,4 +121,9 @@ public class MachineEPress extends BlockContainer {
return false;
}
}
}
@Override
public int transformMeta(int meta, int coordBaseMode) {
return INBTTransformable.transformMetaDeco(meta, coordBaseMode);
}
}

View File

@ -15,6 +15,7 @@ import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.block.BlockSlab;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
@ -26,6 +27,8 @@ import net.minecraftforge.common.util.ForgeDirection;
public class Spotlight extends Block implements ISpotlight, INBTTransformable {
public static boolean disableOnGeneration = true;
// I'd be extending the ReinforcedLamp class if it wasn't for the inverted behaviour of these specific lights
// I want these blocks to be eminently useful, so removing the need for redstone by default is desired,
// these act more like redstone torches, in that applying a signal turns them off
@ -220,6 +223,31 @@ public class Spotlight extends Block implements ISpotlight, INBTTransformable {
return ForgeDirection.getOrientation(metadata >> 1);
}
// Replace bulbs on broken lights with a click
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
int meta = world.getBlockMetadata(x, y, z);
if(!isBroken(meta)) return false;
repair(world, x, y, z);
return true;
}
private void repair(World world, int x, int y, int z) {
int meta = world.getBlockMetadata(x, y, z);
if(!isBroken(meta)) return;
world.setBlock(x, y, z, getOn(), meta - 1, 2);
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
int ox = x + dir.offsetX;
int oy = y + dir.offsetY;
int oz = z + dir.offsetZ;
Block block = world.getBlock(ox, oy, oz);
if(block == this) repair(world, ox, oy, oz);
}
}
public boolean isBroken(int metadata) {
return (metadata & 1) == 1;
}
@ -326,11 +354,13 @@ public class Spotlight extends Block implements ISpotlight, INBTTransformable {
@Override
public int transformMeta(int meta, int coordBaseMode) {
// +1 to set as broken, won't turn on until broken and replaced
return (INBTTransformable.transformMetaDeco(meta >> 1, coordBaseMode) << 1) + 1;
int disabled = disableOnGeneration ? 1 : 0;
return (INBTTransformable.transformMetaDeco(meta >> 1, coordBaseMode) << 1) + disabled;
}
@Override
public Block transformBlock(Block block) {
if(!disableOnGeneration) return block;
if(block == ModBlocks.spotlight_incandescent) return ModBlocks.spotlight_incandescent_off;
if(block == ModBlocks.spotlight_fluoro) return ModBlocks.spotlight_fluoro_off;
if(block == ModBlocks.spotlight_halogen) return ModBlocks.spotlight_halogen_off;

View File

@ -206,4 +206,9 @@ public abstract class RBMKBase extends BlockDummyable implements IToolable, ILoo
public static int renderIDRods = RenderingRegistry.getNextAvailableRenderId();
public static int renderIDPassive = RenderingRegistry.getNextAvailableRenderId();
public static int renderIDControl = RenderingRegistry.getNextAvailableRenderId();
}
@Override
public int transformMeta(int meta, int coordBaseMode) {
return meta;
}
}

View File

@ -108,11 +108,6 @@ public class ToolRecipes {
CraftingManager.addRecipeAuto(new ItemStack(ModItems.lead_gavel, 1), new Object[] { "PIP", "IGI", "PIP", 'P', ModItems.pellet_buckshot, 'I', PB.ingot(), 'G', ModItems.wood_gavel });
//Misc weapons
CraftingManager.addRecipeAuto(new ItemStack(ModItems.saw, 1), new Object[] { "IIL", "PP ", 'P', STEEL.plate(), 'I', STEEL.ingot(), 'L', Items.leather });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.bat, 1), new Object[] { "P", "P", "S", 'S', STEEL.plate(), 'P', KEY_PLANKS });
CraftingManager.addShapelessAuto(new ItemStack(ModItems.bat_nail, 1), new Object[] { ModItems.bat, STEEL.plate() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.golf_club, 1), new Object[] { "IP", " P", " P", 'P', STEEL.plate(), 'I', STEEL.ingot() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.pipe_rusty, 1), new Object[] { "II", " I", " I", 'I', IRON.pipe() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.pipe_lead, 1), new Object[] { "II", " I", " I", 'I', PB.pipe() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ullapool_caber, 1), new Object[] { "ITI", " S ", " S ", 'I', IRON.plate(), 'T', Blocks.tnt, 'S', KEY_STICK });
@ -197,14 +192,6 @@ public class ToolRecipes {
addShovel( SA326.ingot(), ModItems.schrabidium_shovel);
addHoe( SA326.ingot(), ModItems.schrabidium_hoe);
} else {
/*
CraftingManager.addRecipeAuto(new ItemStack(ModItems.cobalt_decorated_sword, 1), new Object[] { " I ", " I ", "SBS", 'I', CO.ingot(), 'S', ModItems.ingot_meteorite_forged, 'B', ModItems.cobalt_sword });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.cobalt_decorated_pickaxe, 1), new Object[] { "III", " B ", " S ", 'I', CO.ingot(), 'S', ModItems.ingot_meteorite_forged, 'B', ModItems.cobalt_pickaxe });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.cobalt_decorated_axe, 1), new Object[] { "II", "IB", " S", 'I', CO.ingot(), 'S', ModItems.ingot_meteorite_forged, 'B', ModItems.cobalt_axe });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.cobalt_decorated_shovel, 1), new Object[] { "I", "B", "S", 'I', CO.ingot(), 'S', ModItems.ingot_meteorite_forged, 'B', ModItems.cobalt_shovel });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.cobalt_decorated_hoe, 1), new Object[] { "II", " B", " S", 'I', CO.ingot(), 'S', ModItems.ingot_meteorite_forged, 'B', ModItems.cobalt_hoe });
*/
CraftingManager.addRecipeAuto(new ItemStack(ModItems.starmetal_sword, 1), new Object[] { " I ", " B ", "ISI", 'I', STAR.ingot(), 'S', ModItems.ring_starmetal, 'B', ModItems.cobalt_decorated_sword });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.starmetal_pickaxe, 1), new Object[] { "ISI", " B ", " I ", 'I', STAR.ingot(), 'S', ModItems.ring_starmetal, 'B', ModItems.cobalt_decorated_pickaxe });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.starmetal_axe, 1), new Object[] { "IS", "IB", " I", 'I', STAR.ingot(), 'S', ModItems.ring_starmetal, 'B', ModItems.cobalt_decorated_axe });

View File

@ -187,7 +187,7 @@ public class WeaponRecipes {
CraftingManager.addRecipeAuto(new ItemStack(ModItems.mp_chip_5, 1), new Object[] { "P", "C", "S", 'P', ANY_RUBBER.ingot(), 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.BISMOID), 'S', ModBlocks.steel_scaffold });
//Turrets
CraftingManager.addRecipeAuto(new ItemStack(ModBlocks.turret_sentry, 1), new Object[] { "PPL", " MD", " SC", 'P', STEEL.plate(), 'M', ModItems.motor, 'L', ModItems.mechanism_rifle_1, 'S', ModBlocks.steel_scaffold, 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.BASIC), 'D', ModItems.crt_display });
CraftingManager.addRecipeAuto(new ItemStack(ModBlocks.turret_sentry, 1), new Object[] { "PPL", " MD", " SC", 'P', STEEL.plate(), 'M', ModItems.motor, 'L', GUNMETAL.mechanism(), 'S', ModBlocks.steel_scaffold, 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.BASIC), 'D', ModItems.crt_display });
//Guns
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_b92), new Object[] { "DDD", "SSC", " R", 'D', ModItems.plate_dineutronium, 'S', STAR.ingot(), 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.BISMOID), 'R', ModItems.gun_lasrifle });

View File

@ -17,7 +17,6 @@ import com.hbm.entity.missile.EntityMissileTier4.*;
import com.hbm.entity.mob.*;
import com.hbm.entity.mob.botprime.*;
import com.hbm.entity.mob.glyphid.*;
import com.hbm.entity.mob.siege.*;
import com.hbm.entity.particle.*;
import com.hbm.entity.projectile.*;
import com.hbm.entity.train.EntityRailCarBase.BoundingBoxDummyEntity;
@ -198,7 +197,6 @@ public class EntityMappings {
addEntity(EntityNukeTorex.class, "entity_effect_torex", 250, false);
addEntity(EntityArtilleryShell.class, "entity_artillery_shell", 1000);
addEntity(EntityArtilleryRocket.class, "entity_himars", 1000);
addEntity(EntitySiegeTunneler.class, "entity_meme_tunneler", 1000);
addEntity(EntityCog.class, "entity_stray_cog", 1000);
addEntity(EntitySawblade.class, "entity_stray_saw", 1000);
addEntity(EntityChemical.class, "entity_chemthrower_splash", 1000);
@ -237,10 +235,6 @@ public class EntityMappings {
addMob(EntityFBI.class, "entity_ntm_fbi", 0x008000, 0x404040);
addMob(EntityFBIDrone.class, "entity_ntm_fbi_drone", 0x008000, 0x404040);
addMob(EntityRADBeast.class, "entity_ntm_radiation_blaze", 0x303030, 0x008000);
addMob(EntitySiegeZombie.class, "entity_meme_zombie", 0x303030, 0x008000);
addMob(EntitySiegeSkeleton.class, "entity_meme_skeleton", 0x303030, 0x000080);
addMob(EntitySiegeUFO.class, "entity_meme_ufo", 0x303030, 0x800000);
addMob(EntitySiegeCraft.class, "entity_meme_craft", 0x303030, 0x808000);
addMob(EntityGlyphid.class, "entity_glyphid", 0x724A21, 0xD2BB72);
addMob(EntityGlyphidBrawler.class, "entity_glyphid_brawler", 0x273038, 0xD2BB72);
addMob(EntityGlyphidBehemoth.class, "entity_glyphid_behemoth", 0x267F00, 0xD2BB72);
@ -253,6 +247,7 @@ public class EntityMappings {
addMob(EntityPlasticBag.class, "entity_plastic_bag", 0xd0d0d0, 0x808080);
addMob(EntityParasiteMaggot.class, "entity_parasite_maggot", 0xd0d0d0, 0x808080);
addMob(EntityDummy.class, "entity_ntm_test_dummy", 0xffffff, 0x000000);
addMob(EntityUndeadSoldier.class, "entity_ntm_undead_soldier", 0x749F30, 0x6C5B44);
addSpawn(EntityCreeperPhosgene.class, 5, 1, 1, EnumCreatureType.monster, BiomeGenBase.getBiomeGenArray());
addSpawn(EntityCreeperVolatile.class, 10, 1, 1, EnumCreatureType.monster, BiomeGenBase.getBiomeGenArray());

View File

@ -0,0 +1,111 @@
package com.hbm.entity.mob;
import com.hbm.items.ModItems;
import net.minecraft.block.Block;
import net.minecraft.entity.EnumCreatureAttribute;
import net.minecraft.entity.IEntityLivingData;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.EntityAIHurtByTarget;
import net.minecraft.entity.ai.EntityAILookIdle;
import net.minecraft.entity.ai.EntityAINearestAttackableTarget;
import net.minecraft.entity.ai.EntityAISwimming;
import net.minecraft.entity.ai.EntityAIWander;
import net.minecraft.entity.ai.EntityAIWatchClosest;
import net.minecraft.entity.monster.EntityMob;
import net.minecraft.entity.passive.EntityVillager;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
public class EntityUndeadSoldier extends EntityMob {
public static final int DW_TYPE = 12;
public static final byte TYPE_ZOMBIE = 0;
public static final byte TYPE_SKELETON = 1;
public EntityUndeadSoldier(World world) {
super(world);
this.tasks.addTask(0, new EntityAISwimming(this));
this.tasks.addTask(4, new EntityAIWander(this, 1.0D));
this.tasks.addTask(5, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
this.tasks.addTask(6, new EntityAILookIdle(this));
this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, false));
this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 0, true));
this.targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, EntityVillager.class, 0, true));
}
protected void entityInit() {
super.entityInit();
this.getDataWatcher().addObject(DW_TYPE, Byte.valueOf((byte) 0));
}
@Override
protected void applyEntityAttributes() {
super.applyEntityAttributes();
this.getEntityAttribute(SharedMonsterAttributes.followRange).setBaseValue(40.0D);
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.25D);
this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(5.0D);
}
@Override
protected boolean isAIEnabled() {
return true;
}
@Override
public IEntityLivingData onSpawnWithEgg(IEntityLivingData data) {
this.addRandomArmor();
this.dataWatcher.updateObject(DW_TYPE, rand.nextBoolean() ? TYPE_ZOMBIE : TYPE_SKELETON);
return super.onSpawnWithEgg(data);
}
@Override
protected void addRandomArmor() {
this.setCurrentItemOrArmor(4, new ItemStack(ModItems.taurun_helmet));
this.setCurrentItemOrArmor(3, new ItemStack(ModItems.taurun_plate));
this.setCurrentItemOrArmor(2, new ItemStack(ModItems.taurun_legs));
this.setCurrentItemOrArmor(1, new ItemStack(ModItems.taurun_boots));
this.setCurrentItemOrArmor(0, new ItemStack(ModItems.gun_heavy_revolver));
}
@Override
protected String getLivingSound() {
byte type = this.dataWatcher.getWatchableObjectByte(DW_TYPE);
if(type == TYPE_ZOMBIE) return "mob.zombie.say";
if(type == TYPE_SKELETON) return "mob.skeleton.say";
return super.getLivingSound();
}
@Override
protected String getHurtSound() {
byte type = this.dataWatcher.getWatchableObjectByte(DW_TYPE);
if(type == TYPE_ZOMBIE) return "mob.zombie.hurt";
if(type == TYPE_SKELETON) return "mob.skeleton.hurt";
return super.getHurtSound();
}
@Override
protected String getDeathSound() {
byte type = this.dataWatcher.getWatchableObjectByte(DW_TYPE);
if(type == TYPE_ZOMBIE) return "mob.zombie.death";
if(type == TYPE_SKELETON) return "mob.skeleton.death";
return super.getDeathSound();
}
@Override
protected void func_145780_a(int x, int y, int z, Block blck) {
byte type = this.dataWatcher.getWatchableObjectByte(DW_TYPE);
if(type == TYPE_ZOMBIE) this.playSound("mob.zombie.step", 0.15F, 1.0F);
if(type == TYPE_SKELETON) this.playSound("mob.skeleton.step", 0.15F, 1.0F);
}
@Override
public EnumCreatureAttribute getCreatureAttribute() {
return EnumCreatureAttribute.UNDEAD;
}
@Override protected void dropFewItems(boolean player, int loot) { }
@Override protected void dropEquipment(boolean player, int loot) { }
}

View File

@ -1,181 +0,0 @@
package com.hbm.entity.mob.siege;
import com.hbm.entity.projectile.EntitySiegeLaser;
import com.hbm.items.ModItems;
import api.hbm.entity.IRadiationImmune;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.IEntityLivingData;
import net.minecraft.entity.IRangedAttackMob;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.EntityAIArrowAttack;
import net.minecraft.entity.ai.EntityAIHurtByTarget;
import net.minecraft.entity.ai.EntityAILookIdle;
import net.minecraft.entity.ai.EntityAINearestAttackableTarget;
import net.minecraft.entity.ai.EntityAISwimming;
import net.minecraft.entity.ai.EntityAIWander;
import net.minecraft.entity.ai.EntityAIWatchClosest;
import net.minecraft.entity.ai.attributes.AttributeModifier;
import net.minecraft.entity.monster.EntityMob;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.DamageSource;
import net.minecraft.util.EntityDamageSource;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
public class EntitySiegeSkeleton extends EntityMob implements IRangedAttackMob, IRadiationImmune {
public EntitySiegeSkeleton(World world) {
super(world);
this.tasks.addTask(1, new EntityAISwimming(this));
this.tasks.addTask(2, new EntityAIArrowAttack(this, 1.0D, 20, 60, 15.0F));
this.tasks.addTask(3, new EntityAIWander(this, 1.0D));
this.tasks.addTask(5, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
this.tasks.addTask(5, new EntityAILookIdle(this));
this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, false));
this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 0, true));
}
@Override
public boolean attackEntityFrom(DamageSource source, float damage) {
if(this.isEntityInvulnerable())
return false;
SiegeTier tier = this.getTier();
if(tier.fireProof && source.isFireDamage()) {
this.extinguish();
return false;
}
if(tier.noFall && source == DamageSource.fall)
return false;
//noFF can't be harmed by other mobs
if(tier.noFriendlyFire && source instanceof EntityDamageSource && !(((EntityDamageSource) source).getEntity() instanceof EntityPlayer))
return false;
damage -= tier.dt;
if(damage < 0) {
worldObj.playSoundAtEntity(this, "random.break", 5F, 1.0F + rand.nextFloat() * 0.5F);
return false;
}
damage *= (1F - tier.dr);
return super.attackEntityFrom(source, damage);
}
@Override
protected void entityInit() {
super.entityInit();
this.getDataWatcher().addObject(12, (int) 0);
}
@Override
protected void applyEntityAttributes() {
super.applyEntityAttributes();
this.getEntityAttribute(SharedMonsterAttributes.followRange).setBaseValue(40.0D);
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.23D);
this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(3.0D);
}
public void setTier(SiegeTier tier) {
this.getDataWatcher().updateObject(12, tier.id);
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).applyModifier(new AttributeModifier("Tier Speed Mod", tier.speedMod, 1));
this.getEntityAttribute(SharedMonsterAttributes.attackDamage).applyModifier(new AttributeModifier("Tier Damage Mod", tier.damageMod, 1));
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(tier.health);
this.setHealth(this.getMaxHealth());
}
public SiegeTier getTier() {
SiegeTier tier = SiegeTier.tiers[this.getDataWatcher().getWatchableObjectInt(12)];
return tier != null ? tier : SiegeTier.CLAY;
}
@Override
protected void addRandomArmor() {
super.addRandomArmor();
this.setCurrentItemOrArmor(0, new ItemStack(ModItems.detonator_laser));
}
@Override
public void writeEntityToNBT(NBTTagCompound nbt) {
super.writeEntityToNBT(nbt);
nbt.setInteger("siegeTier", this.getTier().id);
}
@Override
public void readEntityFromNBT(NBTTagCompound nbt) {
super.readEntityFromNBT(nbt);
this.setTier(SiegeTier.tiers[nbt.getInteger("siegeTier")]);
}
@Override
public IEntityLivingData onSpawnWithEgg(IEntityLivingData data) {
this.setTier(SiegeTier.tiers[rand.nextInt(SiegeTier.getLength())]);
this.addRandomArmor();
return super.onSpawnWithEgg(data);
}
@Override
public void attackEntityWithRangedAttack(EntityLivingBase target, float f) {
double x = posX;
double y = posY + this.getEyeHeight();
double z = posZ;
Vec3 vec = Vec3.createVectorHelper(target.posX - x, target.posY + target.getYOffset() + target.height * 0.5 - y, target.posZ - z).normalize();
SiegeTier tier = this.getTier();
for(int i = 0; i < 3; i++) {
EntitySiegeLaser laser = new EntitySiegeLaser(worldObj, this);
laser.setPosition(x, y, z);
laser.setThrowableHeading(vec.xCoord, vec.yCoord, vec.zCoord, 1F, i == 1 ? 0.15F : 5F);
laser.setColor(0x808000);
laser.setDamage(tier.damageMod);
laser.setExplosive(tier.laserExplosive);
laser.setBreakChance(tier.laserBreak);
if(tier.laserIncendiary) laser.setIncendiary();
worldObj.spawnEntityInWorld(laser);
}
this.playSound("hbm:weapon.ballsLaser", 2.0F, 0.9F + rand.nextFloat() * 0.2F);
}
@Override
protected boolean isAIEnabled() {
return true;
}
@Override
protected String getLivingSound() {
return "hbm:entity.siegeIdle";
}
@Override
protected String getHurtSound() {
return "hbm:entity.siegeHurt";
}
@Override
protected String getDeathSound() {
return "hbm:entity.siegeDeath";
}
@Override
protected void dropFewItems(boolean byPlayer, int fortune) {
if(byPlayer) {
for(ItemStack drop : this.getTier().dropItem) {
this.entityDropItem(drop.copy(), 0F);
}
}
}
}

View File

@ -1,144 +0,0 @@
package com.hbm.entity.mob.siege;
import com.hbm.entity.mob.EntityUFOBase;
import com.hbm.entity.projectile.EntitySiegeLaser;
import api.hbm.entity.IRadiationImmune;
import net.minecraft.entity.IEntityLivingData;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.DamageSource;
import net.minecraft.util.EntityDamageSource;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
public class EntitySiegeUFO extends EntityUFOBase implements IRadiationImmune {
private int attackCooldown;
public EntitySiegeUFO(World world) {
super(world);
this.setSize(1.5F, 1F);
}
@Override
protected void entityInit() {
super.entityInit();
this.getDataWatcher().addObject(12, (int) 0);
}
public void setTier(SiegeTier tier) {
this.getDataWatcher().updateObject(12, tier.id);
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(tier.speedMod);
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(tier.health * 0.25);
this.setHealth(this.getMaxHealth());
}
public SiegeTier getTier() {
SiegeTier tier = SiegeTier.tiers[this.getDataWatcher().getWatchableObjectInt(12)];
return tier != null ? tier : SiegeTier.CLAY;
}
@Override
public boolean attackEntityFrom(DamageSource source, float damage) {
if(this.isEntityInvulnerable())
return false;
SiegeTier tier = this.getTier();
if(tier.fireProof && source.isFireDamage()) {
this.extinguish();
return false;
}
//noFF can't be harmed by other mobs
if(tier.noFriendlyFire && source instanceof EntityDamageSource && !(((EntityDamageSource) source).getEntity() instanceof EntityPlayer))
return false;
damage -= tier.dt;
if(damage < 0) {
worldObj.playSoundAtEntity(this, "random.break", 5F, 1.0F + rand.nextFloat() * 0.5F);
return false;
}
damage *= (1F - tier.dr);
return super.attackEntityFrom(source, damage);
}
@Override
protected void updateEntityActionState() {
super.updateEntityActionState();
if(this.courseChangeCooldown > 0) {
this.courseChangeCooldown--;
}
if(this.scanCooldown > 0) {
this.scanCooldown--;
}
if(!worldObj.isRemote) {
if(this.attackCooldown > 0) {
this.attackCooldown--;
}
if(this.attackCooldown == 0 && this.target != null) {
this.attackCooldown = 20 + rand.nextInt(5);
double x = posX;
double y = posY;
double z = posZ;
Vec3 vec = Vec3.createVectorHelper(target.posX - x, target.posY + target.height * 0.5 - y, target.posZ - z).normalize();
SiegeTier tier = this.getTier();
EntitySiegeLaser laser = new EntitySiegeLaser(worldObj, this);
laser.setPosition(x, y, z);
laser.setThrowableHeading(vec.xCoord, vec.yCoord, vec.zCoord, 1F, 0.15F);
laser.setColor(0x802000);
laser.setDamage(tier.damageMod);
laser.setExplosive(tier.laserExplosive);
laser.setBreakChance(tier.laserBreak);
if(tier.laserIncendiary) laser.setIncendiary();
worldObj.spawnEntityInWorld(laser);
this.playSound("hbm:weapon.ballsLaser", 2.0F, 1.0F);
}
}
if(this.courseChangeCooldown > 0) {
approachPosition(this.target == null ? 0.25D : 0.5D + this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).getAttributeValue() * 1);
}
}
@Override
public void writeEntityToNBT(NBTTagCompound nbt) {
super.writeEntityToNBT(nbt);
nbt.setInteger("siegeTier", this.getTier().id);
}
@Override
public void readEntityFromNBT(NBTTagCompound nbt) {
super.readEntityFromNBT(nbt);
this.setTier(SiegeTier.tiers[nbt.getInteger("siegeTier")]);
}
@Override
public IEntityLivingData onSpawnWithEgg(IEntityLivingData data) {
this.setTier(SiegeTier.tiers[rand.nextInt(SiegeTier.getLength())]);
return super.onSpawnWithEgg(data);
}
@Override
protected void dropFewItems(boolean byPlayer, int fortune) {
if(byPlayer) {
for(ItemStack drop : this.getTier().dropItem) {
this.entityDropItem(drop.copy(), 0F);
}
}
}
}

View File

@ -1,156 +0,0 @@
package com.hbm.entity.mob.siege;
import api.hbm.entity.IRadiationImmune;
import net.minecraft.entity.IEntityLivingData;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.EntityAIAttackOnCollide;
import net.minecraft.entity.ai.EntityAIHurtByTarget;
import net.minecraft.entity.ai.EntityAILookIdle;
import net.minecraft.entity.ai.EntityAIMoveTowardsRestriction;
import net.minecraft.entity.ai.EntityAINearestAttackableTarget;
import net.minecraft.entity.ai.EntityAISwimming;
import net.minecraft.entity.ai.EntityAIWander;
import net.minecraft.entity.ai.EntityAIWatchClosest;
import net.minecraft.entity.ai.attributes.AttributeModifier;
import net.minecraft.entity.monster.EntityMob;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.DamageSource;
import net.minecraft.util.EntityDamageSource;
import net.minecraft.world.World;
public class EntitySiegeZombie extends EntityMob implements IRadiationImmune {
public EntitySiegeZombie(World world) {
super(world);
this.getNavigator().setBreakDoors(true);
this.tasks.addTask(0, new EntityAISwimming(this));
this.tasks.addTask(2, new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.0D, false));
this.tasks.addTask(3, new EntityAIMoveTowardsRestriction(this, 1.0D));
this.tasks.addTask(4, new EntityAIWander(this, 1.0D));
this.tasks.addTask(5, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
this.tasks.addTask(5, new EntityAILookIdle(this));
this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, true));
this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 0, true));
this.setSize(0.6F, 1.8F);
}
@Override
public boolean attackEntityFrom(DamageSource source, float damage) {
if(this.isEntityInvulnerable())
return false;
SiegeTier tier = this.getTier();
if(tier.fireProof && source.isFireDamage()) {
this.extinguish();
return false;
}
if(tier.noFall && source == DamageSource.fall)
return false;
//noFF can't be harmed by other mobs
if(tier.noFriendlyFire && source instanceof EntityDamageSource && !(((EntityDamageSource) source).getEntity() instanceof EntityPlayer))
return false;
damage -= tier.dt;
if(damage < 0) {
worldObj.playSoundAtEntity(this, "random.break", 5F, 1.0F + rand.nextFloat() * 0.5F);
return false;
}
damage *= (1F - tier.dr);
return super.attackEntityFrom(source, damage);
}
@Override
protected void entityInit() {
super.entityInit();
this.getDataWatcher().addObject(12, (int) 0);
this.getDataWatcher().addObject(13, (byte) 0);
}
@Override
protected void applyEntityAttributes() {
super.applyEntityAttributes();
this.getEntityAttribute(SharedMonsterAttributes.followRange).setBaseValue(40.0D);
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.23D);
this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(3.0D);
}
public void setTier(SiegeTier tier) {
this.getDataWatcher().updateObject(12, tier.id);
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).applyModifier(new AttributeModifier("Tier Speed Mod", tier.speedMod, 1));
this.getEntityAttribute(SharedMonsterAttributes.attackDamage).applyModifier(new AttributeModifier("Tier Damage Mod", tier.damageMod, 1));
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(tier.health);
this.setHealth(this.getMaxHealth());
}
public SiegeTier getTier() {
SiegeTier tier = SiegeTier.tiers[this.getDataWatcher().getWatchableObjectInt(12)];
return tier != null ? tier : SiegeTier.CLAY;
}
@Override
protected boolean isAIEnabled() {
return true;
}
@Override
protected String getLivingSound() {
return "hbm:entity.siegeIdle";
}
@Override
protected String getHurtSound() {
return "hbm:entity.siegeHurt";
}
@Override
protected String getDeathSound() {
return "hbm:entity.siegeDeath";
}
@Override
protected void dropFewItems(boolean byPlayer, int fortune) {
if(byPlayer) {
for(ItemStack drop : this.getTier().dropItem) {
this.entityDropItem(drop.copy(), 0F);
}
}
}
@Override
public void onUpdate() {
super.onUpdate();
if(!worldObj.isRemote) {
this.dataWatcher.updateObject(13, (byte)(this.getAttackTarget() != null ? 1 : 0));
}
}
@Override
public void writeEntityToNBT(NBTTagCompound nbt) {
super.writeEntityToNBT(nbt);
nbt.setInteger("siegeTier", this.getTier().id);
}
@Override
public void readEntityFromNBT(NBTTagCompound nbt) {
super.readEntityFromNBT(nbt);
this.setTier(SiegeTier.tiers[nbt.getInteger("siegeTier")]);
}
@Override
public IEntityLivingData onSpawnWithEgg(IEntityLivingData data) {
this.setTier(SiegeTier.tiers[rand.nextInt(SiegeTier.getLength())]);
return super.onSpawnWithEgg(data);
}
}

View File

@ -2,6 +2,9 @@ package com.hbm.handler.nei;
import com.hbm.blocks.ModBlocks;
import com.hbm.inventory.recipes.FuelPoolRecipes;
import com.hbm.items.machine.ItemRBMKRod;
import net.minecraft.item.ItemStack;
public class FuelPoolHandler extends NEIUniversalHandler {
@ -13,4 +16,22 @@ public class FuelPoolHandler extends NEIUniversalHandler {
public String getKey() {
return "ntmSpentDrum";
}
@Override
public void loadUsageRecipes(ItemStack ingredient) {
if(ingredient != null && ingredient.getItem() != null && ingredient.getItem() instanceof ItemRBMKRod) {
if(ItemRBMKRod.getCoreHeat(ingredient) < 50 && ItemRBMKRod.getHullHeat(ingredient) < 50) return;
}
super.loadUsageRecipes(ingredient);
}
@Override
public void loadCraftingRecipes(ItemStack ingredient) {
if(ingredient != null && ingredient.getItem() != null && ingredient.getItem() instanceof ItemRBMKRod) {
if(ItemRBMKRod.getCoreHeat(ingredient) >= 50 || ItemRBMKRod.getHullHeat(ingredient) >= 50) return;
}
super.loadCraftingRecipes(ingredient);
}
}

View File

@ -0,0 +1,94 @@
package com.hbm.handler.nei;
import java.util.HashMap;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.items.machine.ItemRBMKRod;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
public class RBMKRodDisassemblyHandler extends NEIUniversalHandler {
public RBMKRodDisassemblyHandler() {
super("RBMK Rod Disassembly", Blocks.crafting_table, getRecipes());
}
@Override
public String getKey() {
return "ntmRBMKDisassembly";
}
public static HashMap<ComparableStack, ItemStack> getRecipes() {
HashMap<ComparableStack, ItemStack> map = new HashMap<>();
for(ItemRBMKRod rod : ItemRBMKRod.craftableRods) {
for(int enrichment = 0; enrichment <= 4; enrichment++) {
ItemStack result = new ItemStack(rod.pellet, 8, enrichment);
map.put(new ComparableStackHeat(rod, false, enrichment, false), result);
if(rod.pellet.isXenonEnabled()) {
ItemStack resultPoison = new ItemStack(rod.pellet, 8, enrichment + 5);
map.put(new ComparableStackHeat(rod, false, enrichment, true), resultPoison);
}
}
}
return map;
}
// Don't show recipes for hot rods (which will cause it to only show cooling recipes)
@Override
public void loadUsageRecipes(ItemStack ingredient) {
if(ingredient != null && ingredient.getItem() != null && ingredient.getItem() instanceof ItemRBMKRod) {
if(ItemRBMKRod.getCoreHeat(ingredient) > 50 || ItemRBMKRod.getHullHeat(ingredient) > 50) return;
}
super.loadUsageRecipes(ingredient);
}
public static class ComparableStackHeat extends ComparableStack {
// I was going to filter by all of these, but found it is just best to show all possible recipes for everything but heat
private final boolean isHot;
private final int enrichment;
private final boolean hasPoison;
public ComparableStackHeat(Item item, boolean isHot) {
this(item, isHot, -1, false);
}
public ComparableStackHeat(Item item, boolean isHot, int enrichment, boolean hasPoison) {
super(item);
this.isHot = isHot;
this.enrichment = enrichment;
this.hasPoison = hasPoison;
}
public ItemStack toStack() {
ItemStack stack = super.toStack();
ItemRBMKRod rod = (ItemRBMKRod) stack.getItem();
if(enrichment >= 0) {
ItemRBMKRod.setYield(stack, Math.min(1 - ((double) enrichment) / 5, 0.99) * rod.yield);
} else {
ItemRBMKRod.setYield(stack, 0.2 * rod.yield);
}
if(hasPoison) ItemRBMKRod.setPoison(stack, 50);
if(!isHot) return stack;
ItemRBMKRod.setCoreHeat(stack, 100);
ItemRBMKRod.setHullHeat(stack, 50);
return stack;
}
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result + enrichment;
result = prime * result + (hasPoison ? 1 : 0);
return result;
}
}
}

View File

@ -0,0 +1,40 @@
package com.hbm.handler.nei;
import java.util.HashMap;
import com.hbm.blocks.ModBlocks;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.items.ModItems;
import com.hbm.items.special.ItemWasteLong;
import com.hbm.items.special.ItemWasteShort;
import net.minecraft.item.ItemStack;
public class RBMKWasteDecayHandler extends NEIUniversalHandler {
public RBMKWasteDecayHandler() {
super("Nuclear Waste Decay", ModBlocks.machine_storage_drum, getRecipes());
}
@Override
public String getKey() {
return "ntmRBMKWaste";
}
public static HashMap<ComparableStack, ItemStack> getRecipes() {
HashMap<ComparableStack, ItemStack> map = new HashMap<>();
for(ItemWasteShort.WasteClass waste : ItemWasteShort.WasteClass.values()) {
map.put(new ComparableStack(ModItems.nuclear_waste_short, 1, waste), new ItemStack(ModItems.nuclear_waste_short_depleted, 1, waste.ordinal()));
map.put(new ComparableStack(ModItems.nuclear_waste_short_tiny, 1, waste), new ItemStack(ModItems.nuclear_waste_short_depleted_tiny, 1, waste.ordinal()));
}
for(ItemWasteLong.WasteClass waste : ItemWasteLong.WasteClass.values()) {
map.put(new ComparableStack(ModItems.nuclear_waste_long, 1, waste), new ItemStack(ModItems.nuclear_waste_long_depleted, 1, waste.ordinal()));
map.put(new ComparableStack(ModItems.nuclear_waste_long_tiny, 1, waste), new ItemStack(ModItems.nuclear_waste_long_depleted_tiny, 1, waste.ordinal()));
}
return map;
}
}

View File

@ -1,5 +1,6 @@
package com.hbm.inventory.container;
import com.hbm.items.block.ItemBlockStorageCrate;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.IInventory;
@ -18,8 +19,15 @@ public class ContainerCrateBase extends ContainerBase {
@Override
public ItemStack slotClick(int index, int button, int mode, EntityPlayer player) {
// prevents the player from moving around the currently open box
if(mode == 2 && button == player.inventory.currentItem) return null;
if(index == player.inventory.currentItem + 27 + this.tile.getSizeInventory()) return null;
if(player.inventory.getStackInSlot(player.inventory.currentItem) != null &&
player.inventory.getStackInSlot(player.inventory.currentItem).getItem() instanceof ItemBlockStorageCrate) {
if (mode == 2 && button == player.inventory.currentItem) {
return null;
}
if (index == player.inventory.currentItem + 27 + this.tile.getSizeInventory()) {
return null;
}
}
return super.slotClick(index, button, mode, player);
}

View File

@ -366,6 +366,10 @@ public class GUIRBMKConsole extends GuiScreen {
int fe = (int)Math.ceil((col.data.getDouble("enrichment")) * 8);
if(fe > 8) fe = 8;
drawTexturedModalRect(guiLeft + x + 4, guiTop + y + size - fe - 1, 14, 191 - fe, 2, fe);
int fx = (int)Math.ceil((col.data.getDouble("xenon")) * 8 / 100);
if(fx > 8) fx = 8;
drawTexturedModalRect(guiLeft + x + 7, guiTop + y + size - fx - 1, 17, 191 - fx, 2, fx);
}
break;

View File

@ -141,7 +141,7 @@ public class Mats {
public static final NTMMaterial MAT_DURA = makeSmeltable(_AS + 3, DURA, 0x183039, 0x030B0B, 0x376373).setAutogen(BOLT, DUST, PLATE, CASTPLATE, PIPE, BLOCK, LIGHTBARREL, HEAVYBARREL, LIGHTRECEIVER, HEAVYRECEIVER, GRIP).m();
public static final NTMMaterial MAT_DESH = makeSmeltable(_AS + 12, DESH, 0xFF6D6D, 0x720000, 0xF22929).setAutogen(DUST, CASTPLATE, BLOCK, HEAVY_COMPONENT, LIGHTBARREL, HEAVYBARREL, LIGHTRECEIVER, STOCK, GRIP).m();
public static final NTMMaterial MAT_STAR = makeSmeltable(_AS + 5, STAR, 0xCCCCEA, 0x11111A, 0xA5A5D3).setAutogen(DUST, DENSEWIRE, BLOCK).m();
public static final NTMMaterial MAT_FERRO = makeSmeltable(_AS + 7, FERRO, 0xB7B7C9, 0x101022, 0x6B6B8B).setAutogen(HEAVYBARREL, HEAVYRECEIVER).m();
public static final NTMMaterial MAT_FERRO = makeSmeltable(_AS + 7, FERRO, 0xB7B7C9, 0x101022, 0x6B6B8B).setAutogen(CASTPLATE, HEAVYBARREL, HEAVYRECEIVER).m();
public static final NTMMaterial MAT_TCALLOY = makeSmeltable(_AS + 6, TCALLOY, 0xD4D6D6, 0x323D3D, 0x9CA6A6).setAutogen(DUST, CASTPLATE, WELDEDPLATE, HEAVY_COMPONENT, LIGHTBARREL, HEAVYBARREL, LIGHTRECEIVER, HEAVYRECEIVER).m();
public static final NTMMaterial MAT_CDALLOY = makeSmeltable(_AS + 13, CDALLOY, 0xF7DF8F, 0x604308, 0xFBD368).setAutogen(CASTPLATE, WELDEDPLATE, HEAVY_COMPONENT, LIGHTBARREL, HEAVYBARREL, LIGHTRECEIVER, HEAVYRECEIVER).m();
public static final NTMMaterial MAT_BBRONZE = makeSmeltable(_AS + 16, BBRONZE, 0xE19A69, 0x485353, 0x987D65).setAutogen(CASTPLATE, LIGHTBARREL, LIGHTRECEIVER).m();

View File

@ -74,7 +74,6 @@ public class AssemblerRecipes extends SerializableRecipe {
makeRecipe(new ComparableStack(ModItems.asbestos_cloth, 4), new AStack[] {new OreDictStack(ASBESTOS.ingot(), 2), new ComparableStack(Items.string, 6), new ComparableStack(Blocks.wool, 1), },50);
makeRecipe(new ComparableStack(ModItems.filter_coal, 1), new AStack[] {new OreDictStack(COAL.dust(), 4), new ComparableStack(Items.string, 2), new ComparableStack(Items.paper, 1), },50);
makeRecipe(new ComparableStack(ModItems.centrifuge_element, 1), new AStack[] {new OreDictStack(STEEL.plate528(), 4), new OreDictStack(TI.plate528(), 4), new ComparableStack(ModItems.motor, 1), }, 100);
makeRecipe(new ComparableStack(ModItems.magnet_circular, 1), new AStack[] {new ComparableStack(ModBlocks.fusion_conductor, 5), new OreDictStack(STEEL.ingot(), 4), new OreDictStack(ALLOY.plate(), 6), },150);
makeRecipe(new ComparableStack(ModItems.reactor_core, 1), new AStack[] {new OreDictStack(PB.ingot(), 8), new OreDictStack(BE.ingot(), 6), new OreDictStack(STEEL.plate(), 16), new OreDictStack(OreDictManager.getReflector(), 8), new OreDictStack(FIBER.ingot(), 2) },100);
makeRecipe(new ComparableStack(ModItems.rtg_unit, 1), new AStack[] {new ComparableStack(ModItems.thermo_element, 2), new OreDictStack(CU.plateCast(), 1), new OreDictStack(PB.ingot(), 2), new OreDictStack(STEEL.plate(), 2), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.CAPACITOR.ordinal()), },100);
makeRecipe(new ComparableStack(ModItems.levitation_unit, 1), new AStack[] {new ComparableStack(ModItems.coil_copper, 4), new ComparableStack(ModItems.coil_tungsten, 2), new OreDictStack(TI.plate(), 6), new ComparableStack(ModItems.nugget_schrabidium, 2), },100);
@ -626,34 +625,31 @@ public class AssemblerRecipes extends SerializableRecipe {
makeRecipe(new ComparableStack(ModBlocks.turret_chekhov, 1), new AStack[] {
new ComparableStack(ModBlocks.machine_battery, 1),
new OreDictStack(STEEL.ingot(), 16),
new OreDictStack(DURA.ingot(), 4),
new ComparableStack(ModItems.motor, 3),
new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED),
new OreDictStack(STEEL.pipe(), 3),
new ComparableStack(ModItems.mechanism_rifle_2, 1),
new OreDictStack(GUNMETAL.mechanism(), 3),
new ComparableStack(ModBlocks.crate_iron, 1),
new ComparableStack(ModItems.crt_display, 1)
}, 200);
makeRecipe(new ComparableStack(ModBlocks.turret_friendly, 1), new AStack[] {
new ComparableStack(ModBlocks.machine_battery, 1),
new OreDictStack(STEEL.ingot(), 16),
new OreDictStack(DURA.ingot(), 4),
new ComparableStack(ModItems.motor, 3),
new ComparableStack(ModItems.circuit, 1, EnumCircuitType.BASIC),
new OreDictStack(STEEL.pipe(), 3),
new ComparableStack(ModItems.mechanism_rifle_1, 1),
new OreDictStack(GUNMETAL.mechanism(), 1),
new ComparableStack(ModBlocks.crate_iron, 1),
new ComparableStack(ModItems.crt_display, 1)
}, 200);
makeRecipe(new ComparableStack(ModBlocks.turret_jeremy, 1), new AStack[] {
new ComparableStack(ModBlocks.machine_battery, 1),
new OreDictStack(STEEL.ingot(), 16),
new OreDictStack(DURA.ingot(), 4),
new ComparableStack(ModItems.motor, 2),
new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED),
new ComparableStack(ModItems.motor_desh, 1),
new OreDictStack(STEEL.shell(), 3),
new ComparableStack(ModItems.mechanism_launcher_2, 1),
new OreDictStack(WEAPONSTEEL.mechanism(), 3),
new ComparableStack(ModBlocks.crate_steel, 1),
new ComparableStack(ModItems.crt_display, 1)
}, 200);
@ -665,42 +661,39 @@ public class AssemblerRecipes extends SerializableRecipe {
new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED),
new ComparableStack(ModItems.motor_desh, 1),
new OreDictStack(CU.ingot(), 32),
new ComparableStack(ModItems.mechanism_special, 1),
new OreDictStack(BIGMT.mechanism(), 3),
new ComparableStack(ModItems.battery_lithium, 1),
new ComparableStack(ModItems.crt_display, 1)
}, 200);
makeRecipe(new ComparableStack(ModBlocks.turret_richard, 1), new AStack[] {
new ComparableStack(ModBlocks.machine_battery, 1),
new OreDictStack(STEEL.ingot(), 16),
new OreDictStack(DURA.ingot(), 4),
new ComparableStack(ModItems.motor, 2),
new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED),
new OreDictStack(ANY_PLASTIC.ingot(), 2),
new OreDictStack(STEEL.shell(), 8),
new ComparableStack(ModItems.mechanism_launcher_2, 1),
new OreDictStack(WEAPONSTEEL.mechanism(), 3),
new ComparableStack(ModBlocks.crate_steel, 1),
new ComparableStack(ModItems.crt_display, 1)
}, 200);
makeRecipe(new ComparableStack(ModBlocks.turret_howard, 1), new AStack[] {
new ComparableStack(ModBlocks.machine_battery, 1),
new OreDictStack(STEEL.ingot(), 24),
new OreDictStack(DURA.ingot(), 6),
new ComparableStack(ModItems.motor, 2),
new ComparableStack(ModItems.motor_desh, 2),
new ComparableStack(ModItems.circuit, 3, EnumCircuitType.ADVANCED),
new OreDictStack(STEEL.pipe(), 10),
new ComparableStack(ModItems.mechanism_rifle_2, 2),
new OreDictStack(WEAPONSTEEL.mechanism(), 3),
new ComparableStack(ModBlocks.crate_steel, 1),
new ComparableStack(ModItems.crt_display, 1)
}, 200);
makeRecipe(new ComparableStack(ModBlocks.turret_maxwell, 1), new AStack[] {
new ComparableStack(ModBlocks.machine_lithium_battery, 1),
new OreDictStack(STEEL.ingot(), 24),
new OreDictStack(DURA.ingot(), 6),
new ComparableStack(ModItems.motor, 2),
new ComparableStack(ModItems.circuit, 2, EnumCircuitType.ADVANCED),
new OreDictStack(STEEL.pipe(), 4),
new ComparableStack(ModItems.mechanism_special, 3),
new OreDictStack(BIGMT.mechanism(), 3),
new ComparableStack(ModItems.magnetron, 16),
new OreDictStack(ANY_RESISTANTALLOY.ingot(), 8),
new ComparableStack(ModItems.crt_display, 1)
@ -708,33 +701,30 @@ public class AssemblerRecipes extends SerializableRecipe {
makeRecipe(new ComparableStack(ModBlocks.turret_fritz, 1), new AStack[] {
new ComparableStack(ModBlocks.machine_battery, 1),
new OreDictStack(STEEL.ingot(), 16),
new OreDictStack(DURA.ingot(), 4),
new ComparableStack(ModItems.motor, 3),
new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED),
new OreDictStack(STEEL.pipe(), 8),
new ComparableStack(ModItems.mechanism_launcher_1, 1),
new OreDictStack(GUNMETAL.mechanism(), 3),
new ComparableStack(ModBlocks.barrel_steel, 1),
new ComparableStack(ModItems.crt_display, 1)
}, 200);
makeRecipe(new ComparableStack(ModBlocks.turret_arty, 1), new AStack[] {
new ComparableStack(ModBlocks.machine_battery, 1),
new OreDictStack(STEEL.ingot(), 128),
new OreDictStack(DURA.ingot(), 32),
new ComparableStack(ModItems.motor_desh, 5),
new ComparableStack(ModItems.circuit, 3, EnumCircuitType.ADVANCED),
new OreDictStack(STEEL.pipe(), 12),
new ComparableStack(ModItems.mechanism_launcher_2, 3),
new OreDictStack(WEAPONSTEEL.mechanism(), 16),
new ComparableStack(ModBlocks.machine_radar, 1),
new ComparableStack(ModItems.crt_display, 1)
}, 200);
makeRecipe(new ComparableStack(ModBlocks.turret_himars, 1), new AStack[] {
new ComparableStack(ModBlocks.machine_battery, 1),
new OreDictStack(STEEL.ingot(), 128),
new OreDictStack(DURA.ingot(), 64),
new OreDictStack(ANY_PLASTIC.ingot(), 64),
new ComparableStack(ModItems.motor_desh, 5),
new ComparableStack(ModItems.circuit, 8, EnumCircuitType.ADVANCED),
new ComparableStack(ModItems.mechanism_launcher_2, 5),
new OreDictStack(BIGMT.mechanism(), 8),
new ComparableStack(ModBlocks.machine_radar, 1),
new ComparableStack(ModItems.crt_display, 1)
}, 300);

View File

@ -8,15 +8,17 @@ import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.stream.JsonWriter;
import com.hbm.handler.nei.RBMKRodDisassemblyHandler;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.inventory.recipes.loader.SerializableRecipe;
import com.hbm.items.ModItems;
import com.hbm.items.machine.ItemPWRFuel.EnumPWRFuel;
import com.hbm.items.machine.ItemRBMKRod;
import net.minecraft.item.ItemStack;
public class FuelPoolRecipes extends SerializableRecipe {
public static final HashMap<ComparableStack, ItemStack> recipes = new HashMap<ComparableStack, ItemStack>();
public static final FuelPoolRecipes instance = new FuelPoolRecipes();
@ -38,8 +40,14 @@ public class FuelPoolRecipes extends SerializableRecipe {
recipes.put(new ComparableStack(ModItems.waste_plate_sa326, 1, 1), new ItemStack(ModItems.waste_plate_sa326));
recipes.put(new ComparableStack(ModItems.waste_plate_ra226be, 1, 1), new ItemStack(ModItems.waste_plate_ra226be));
recipes.put(new ComparableStack(ModItems.waste_plate_pu238be, 1, 1), new ItemStack(ModItems.waste_plate_pu238be));
for(EnumPWRFuel pwr : EnumPWRFuel.values()) recipes.put(new ComparableStack(ModItems.pwr_fuel_hot, 1, pwr.ordinal()), new ItemStack(ModItems.pwr_fuel_depleted, 1, pwr.ordinal()));
for(ItemRBMKRod rod : ItemRBMKRod.craftableRods) {
ItemStack result = new ItemStack(rod);
ItemRBMKRod.setYield(result, 0.2 * rod.yield);
recipes.put(new RBMKRodDisassemblyHandler.ComparableStackHeat(rod, true), result);
}
}
@Override

View File

@ -74,6 +74,15 @@ public class PedestalRecipes extends SerializableRecipe {
new ComparableStack(ModItems.item_secret, 4, EnumSecretType.SELENIUM_STEEL), new ComparableStack(ModItems.item_secret, 2, EnumSecretType.CONTROLLER), new ComparableStack(ModItems.item_secret, 4, EnumSecretType.SELENIUM_STEEL))
.extra(PedestalExtraCondition.FULL_MOON));
recipes.add(new PedestalRecipe(new ItemStack(ModItems.gun_aberrator),
null, new ComparableStack(ModItems.item_secret, 1, EnumSecretType.ABERRATOR), null,
new ComparableStack(ModItems.item_secret, 1, EnumSecretType.ABERRATOR), new OreDictStack(BIGMT.mechanism(), 4), new ComparableStack(ModItems.item_secret, 1, EnumSecretType.ABERRATOR),
null, new ComparableStack(ModItems.item_secret, 1, EnumSecretType.ABERRATOR), null));
recipes.add(new PedestalRecipe(new ItemStack(ModItems.gun_aberrator_eott),
new ComparableStack(ModItems.item_secret, 1, EnumSecretType.ABERRATOR), new ComparableStack(ModItems.item_secret, 1, EnumSecretType.ABERRATOR), new ComparableStack(ModItems.item_secret, 1, EnumSecretType.ABERRATOR),
new ComparableStack(ModItems.item_secret, 1, EnumSecretType.ABERRATOR), new OreDictStack(BIGMT.mechanism(), 16), new ComparableStack(ModItems.item_secret, 1, EnumSecretType.ABERRATOR),
new ComparableStack(ModItems.item_secret, 1, EnumSecretType.ABERRATOR), new ComparableStack(ModItems.item_secret, 1, EnumSecretType.ABERRATOR), new ComparableStack(ModItems.item_secret, 1, EnumSecretType.ABERRATOR)));
recipes.add(new PedestalRecipe(new ItemStack(ModItems.ammo_secret, 1, EnumAmmoSecret.FOLLY_SM.ordinal()),
new OreDictStack(STAR.ingot(), 1), new ComparableStack(ModItems.powder_magic), new OreDictStack(STAR.ingot(), 1),
new ComparableStack(ModItems.powder_magic), new ComparableStack(ModBlocks.moon_turf), new ComparableStack(ModItems.powder_magic),
@ -84,6 +93,10 @@ public class PedestalRecipes extends SerializableRecipe {
new ComparableStack(ModItems.powder_magic), new ComparableStack(ModItems.ammo_standard, 4, EnumAmmo.NUKE_HIGH), new ComparableStack(ModItems.powder_magic),
new OreDictStack(STAR.ingot(), 1), new ComparableStack(ModItems.powder_magic), new OreDictStack(STAR.ingot(), 1))
.extra(PedestalExtraCondition.FULL_MOON));
recipes.add(new PedestalRecipe(new ItemStack(ModItems.ammo_secret, 5, EnumAmmoSecret.P35_800.ordinal()),
null, null, null,
null, new ComparableStack(ModItems.item_secret, 1, EnumSecretType.ABERRATOR), null,
null, null, null));
}
@Override

View File

@ -79,7 +79,7 @@ public class ItemEnums {
}
public static enum EnumSecretType {
CANISTER, CONTROLLER, SELENIUM_STEEL
CANISTER, CONTROLLER, SELENIUM_STEEL, ABERRATOR
}
public static enum EnumCasingType {

View File

@ -570,7 +570,6 @@ public class ModItems {
public static Item coil_magnetized_tungsten;
public static Item coil_gold;
public static Item coil_gold_torus;
public static Item magnet_circular;
public static Item component_limiter;
public static Item component_emitter;
public static Item chlorine_pinwheel;
@ -585,14 +584,6 @@ public class ModItems {
public static ItemEnumMulti circuit_star_component;
public static Item circuit_star;
public static Item mechanism_revolver_1;
public static Item mechanism_revolver_2;
public static Item mechanism_rifle_1;
public static Item mechanism_rifle_2;
public static Item mechanism_launcher_1;
public static Item mechanism_launcher_2;
public static Item mechanism_special;
public static Item assembly_nuke;
public static Item casing;
@ -1864,6 +1855,10 @@ public class ModItems {
public static Item dns_plate;
public static Item dns_legs;
public static Item dns_boots;
public static Item taurun_helmet;
public static Item taurun_plate;
public static Item taurun_legs;
public static Item taurun_boots;
public static Item trenchmaster_helmet;
public static Item trenchmaster_plate;
public static Item trenchmaster_legs;
@ -2747,7 +2742,6 @@ public class ModItems {
coil_magnetized_tungsten = new Item().setUnlocalizedName("coil_magnetized_tungsten").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":coil_magnetized_tungsten");
coil_gold = new Item().setUnlocalizedName("coil_gold").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":coil_gold");
coil_gold_torus = new Item().setUnlocalizedName("coil_gold_torus").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":coil_gold_torus");
magnet_circular = new Item().setUnlocalizedName("magnet_circular").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":magnet_circular");
component_limiter = new Item().setUnlocalizedName("component_limiter").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":component_limiter");
component_emitter = new Item().setUnlocalizedName("component_emitter").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":component_emitter");
chlorine_pinwheel = new ItemInfiniteFluid(Fluids.CHLORINE, 1, 2).setUnlocalizedName("chlorine_pinwheel").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":chlorine_pinwheel");
@ -2832,13 +2826,6 @@ public class ModItems {
circuit_star_piece = (ItemEnumMulti) new ItemEnumMulti(ScrapType.class, true, true).setUnlocalizedName("circuit_star_piece").setCreativeTab(null);
circuit_star_component = (ItemEnumMulti) new ItemCircuitStarComponent().setUnlocalizedName("circuit_star_component").setCreativeTab(null);
circuit_star = new ItemCustomLore().setRarity(EnumRarity.uncommon).setUnlocalizedName("circuit_star").setCreativeTab(null).setTextureName(RefStrings.MODID + ":circuit_star");
mechanism_revolver_1 = new Item().setUnlocalizedName("mechanism_revolver_1").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":mechanism_1");
mechanism_revolver_2 = new Item().setUnlocalizedName("mechanism_revolver_2").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":mechanism_3");
mechanism_rifle_1 = new Item().setUnlocalizedName("mechanism_rifle_1").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":mechanism_2");
mechanism_rifle_2 = new Item().setUnlocalizedName("mechanism_rifle_2").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":mechanism_4");
mechanism_launcher_1 = new Item().setUnlocalizedName("mechanism_launcher_1").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":mechanism_5");
mechanism_launcher_2 = new Item().setUnlocalizedName("mechanism_launcher_2").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":mechanism_6");
mechanism_special = new Item().setUnlocalizedName("mechanism_special").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":mechanism_7");
assembly_nuke = new Item().setUnlocalizedName("assembly_nuke").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":assembly_nuke");
casing = new ItemEnumMulti(ItemEnums.EnumCasingType.class, true, true).setUnlocalizedName("casing").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":casing");
@ -4495,6 +4482,16 @@ public class ModItems {
dns_legs = new ArmorDNT(aMatDNS, 2, RefStrings.MODID + ":textures/armor/starmetal_2.png", 1000000000, 1000000, 100000, 115).cloneStats((ArmorFSB) dns_helmet).setUnlocalizedName("dns_legs").setTextureName(RefStrings.MODID + ":dns_legs");
dns_boots = new ArmorDNT(aMatDNS, 3, RefStrings.MODID + ":textures/armor/starmetal_1.png", 1000000000, 1000000, 100000, 115).cloneStats((ArmorFSB) dns_helmet).setUnlocalizedName("dns_boots").setTextureName(RefStrings.MODID + ":dns_boots");
ArmorMaterial aMatTaurun = EnumHelper.addArmorMaterial("HBM_TRENCH", 150, new int[] { 3, 8, 6, 3 }, 100);
aMatTaurun.customCraftingMaterial = ModItems.plate_iron;
taurun_helmet = new ArmorTaurun(aMatTaurun, 0, RefStrings.MODID + ":textures/armor/starmetal_1.png")
.addEffect(new PotionEffect(Potion.damageBoost.id, 20, 0))
.setStepSize(1)
.hides(EnumPlayerPart.HAT)
.setUnlocalizedName("taurun_helmet").setTextureName(RefStrings.MODID + ":taurun_helmet");
taurun_plate = new ArmorTaurun(aMatTaurun, 1, RefStrings.MODID + ":textures/armor/starmetal_1.png").cloneStats((ArmorFSB) taurun_helmet).setUnlocalizedName("taurun_plate").setTextureName(RefStrings.MODID + ":taurun_plate");
taurun_legs = new ArmorTaurun(aMatTaurun, 2, RefStrings.MODID + ":textures/armor/starmetal_2.png").cloneStats((ArmorFSB) taurun_helmet).setUnlocalizedName("taurun_legs").setTextureName(RefStrings.MODID + ":taurun_legs");
taurun_boots = new ArmorTaurun(aMatTaurun, 3, RefStrings.MODID + ":textures/armor/starmetal_1.png").cloneStats((ArmorFSB) taurun_helmet).setUnlocalizedName("taurun_boots").setTextureName(RefStrings.MODID + ":taurun_boots");
ArmorMaterial aMatTrench = EnumHelper.addArmorMaterial("HBM_TRENCH", 150, new int[] { 3, 8, 6, 3 }, 100);
aMatTrench.customCraftingMaterial = ModItems.plate_iron;
trenchmaster_helmet = new ArmorTrenchmaster(aMatTrench, 0, RefStrings.MODID + ":textures/armor/starmetal_1.png")
@ -4940,11 +4937,11 @@ public class ModItems {
multitool_joule = new ItemMultitoolPassive().setUnlocalizedName("multitool_joule").setCreativeTab(null).setTextureName(RefStrings.MODID + ":multitool_fist");
multitool_decon = new ItemMultitoolPassive().setUnlocalizedName("multitool_decon").setCreativeTab(null).setTextureName(RefStrings.MODID + ":multitool_fist");
saw = new ModSword(MainRegistry.enumToolMaterialSaw).setUnlocalizedName("weapon_saw").setFull3D().setTextureName(RefStrings.MODID + ":saw");
bat = new ModSword(MainRegistry.enumToolMaterialBat).setUnlocalizedName("weapon_bat").setFull3D().setTextureName(RefStrings.MODID + ":bat");
bat_nail = new ModSword(MainRegistry.enumToolMaterialBatNail).setUnlocalizedName("weapon_bat_nail").setFull3D().setTextureName(RefStrings.MODID + ":bat_nail");
golf_club = new ModSword(MainRegistry.enumToolMaterialGolfClub).setUnlocalizedName("weapon_golf_club").setFull3D().setTextureName(RefStrings.MODID + ":golf_club");
pipe_rusty = new ModSword(MainRegistry.enumToolMaterialPipeRusty).setUnlocalizedName("weapon_pipe_rusty").setFull3D().setTextureName(RefStrings.MODID + ":pipe_rusty");
saw = new ModSword(MainRegistry.enumToolMaterialSaw).setUnlocalizedName("weapon_saw").setCreativeTab(null).setFull3D().setTextureName(RefStrings.MODID + ":saw");
bat = new ModSword(MainRegistry.enumToolMaterialBat).setUnlocalizedName("weapon_bat").setCreativeTab(null).setFull3D().setTextureName(RefStrings.MODID + ":bat");
bat_nail = new ModSword(MainRegistry.enumToolMaterialBatNail).setUnlocalizedName("weapon_bat_nail").setCreativeTab(null).setFull3D().setTextureName(RefStrings.MODID + ":bat_nail");
golf_club = new ModSword(MainRegistry.enumToolMaterialGolfClub).setUnlocalizedName("weapon_golf_club").setCreativeTab(null).setFull3D().setTextureName(RefStrings.MODID + ":golf_club");
pipe_rusty = new ModSword(MainRegistry.enumToolMaterialPipeRusty).setUnlocalizedName("weapon_pipe_rusty").setCreativeTab(null).setFull3D().setTextureName(RefStrings.MODID + ":pipe_rusty");
pipe_lead = new ModSword(MainRegistry.enumToolMaterialPipeLead).setUnlocalizedName("weapon_pipe_lead").setFull3D().setTextureName(RefStrings.MODID + ":pipe_lead");
reer_graar = new ModSword(MainRegistry.tMatTitan).setUnlocalizedName("reer_graar").setFull3D().setTextureName(RefStrings.MODID + ":reer_graar_hd");
stopsign = new WeaponSpecial(MainRegistry.tMatAlloy).setUnlocalizedName("stopsign").setTextureName(RefStrings.MODID + ":stopsign");
@ -5562,7 +5559,6 @@ public class ModItems {
GameRegistry.registerItem(motor_desh, motor_desh.getUnlocalizedName());
GameRegistry.registerItem(motor_bismuth, motor_bismuth.getUnlocalizedName());
GameRegistry.registerItem(centrifuge_element, centrifuge_element.getUnlocalizedName());
GameRegistry.registerItem(magnet_circular, magnet_circular.getUnlocalizedName());
GameRegistry.registerItem(reactor_core, reactor_core.getUnlocalizedName());
GameRegistry.registerItem(rtg_unit, rtg_unit.getUnlocalizedName());
GameRegistry.registerItem(levitation_unit, levitation_unit.getUnlocalizedName());
@ -5669,15 +5665,6 @@ public class ModItems {
GameRegistry.registerItem(circuit_star_component, circuit_star_component.getUnlocalizedName());
GameRegistry.registerItem(circuit_star, circuit_star.getUnlocalizedName());
//Gun Mechanisms
GameRegistry.registerItem(mechanism_revolver_1, mechanism_revolver_1.getUnlocalizedName());
GameRegistry.registerItem(mechanism_revolver_2, mechanism_revolver_2.getUnlocalizedName());
GameRegistry.registerItem(mechanism_rifle_1, mechanism_rifle_1.getUnlocalizedName());
GameRegistry.registerItem(mechanism_rifle_2, mechanism_rifle_2.getUnlocalizedName());
GameRegistry.registerItem(mechanism_launcher_1, mechanism_launcher_1.getUnlocalizedName());
GameRegistry.registerItem(mechanism_launcher_2, mechanism_launcher_2.getUnlocalizedName());
GameRegistry.registerItem(mechanism_special, mechanism_special.getUnlocalizedName());
//Casing
GameRegistry.registerItem(casing, casing.getUnlocalizedName());
@ -7023,6 +7010,10 @@ public class ModItems {
GameRegistry.registerItem(dns_plate, dns_plate.getUnlocalizedName());
GameRegistry.registerItem(dns_legs, dns_legs.getUnlocalizedName());
GameRegistry.registerItem(dns_boots, dns_boots.getUnlocalizedName());
GameRegistry.registerItem(taurun_helmet, taurun_helmet.getUnlocalizedName());
GameRegistry.registerItem(taurun_plate, taurun_plate.getUnlocalizedName());
GameRegistry.registerItem(taurun_legs, taurun_legs.getUnlocalizedName());
GameRegistry.registerItem(taurun_boots, taurun_boots.getUnlocalizedName());
GameRegistry.registerItem(trenchmaster_helmet, trenchmaster_helmet.getUnlocalizedName());
GameRegistry.registerItem(trenchmaster_plate, trenchmaster_plate.getUnlocalizedName());
GameRegistry.registerItem(trenchmaster_legs, trenchmaster_legs.getUnlocalizedName());

View File

@ -0,0 +1,34 @@
package com.hbm.items.armor;
import com.hbm.render.model.ModelArmorTaurun;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.item.ItemStack;
public class ArmorTaurun extends ArmorFSB {
public ArmorTaurun(ArmorMaterial material, int slot, String texture) {
super(material, slot, texture);
this.setMaxDamage(0);
}
@SideOnly(Side.CLIENT)
ModelArmorTaurun[] models;
@Override
@SideOnly(Side.CLIENT)
public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) {
if(models == null) {
models = new ModelArmorTaurun[4];
for(int i = 0; i < 4; i++)
models[i] = new ModelArmorTaurun(i);
}
return models[armorSlot];
}
}

View File

@ -16,7 +16,7 @@ import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.IIcon;
public class ItemRBMKPellet extends ItemNuclearWaste {
public String fullName = "";
protected boolean hasXenon = true;
@ -26,12 +26,16 @@ public class ItemRBMKPellet extends ItemNuclearWaste {
this.setMaxDamage(0);
this.setCreativeTab(MainRegistry.controlTab);
}
public ItemRBMKPellet disableXenon() {
this.hasXenon = false;
return this;
}
public boolean isXenonEnabled() {
return hasXenon;
}
@Override
@SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs tabs, List list) {
@ -39,10 +43,10 @@ public class ItemRBMKPellet extends ItemNuclearWaste {
list.add(new ItemStack(item, 1, i));
}
}
@SideOnly(Side.CLIENT)
private IIcon[] enrichmentOverlays;
@SideOnly(Side.CLIENT)
private IIcon xenonOverlay;
@ -50,13 +54,13 @@ public class ItemRBMKPellet extends ItemNuclearWaste {
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister iconRegister) {
super.registerIcons(iconRegister);
this.enrichmentOverlays = new IIcon[5];
for(int i = 0; i < enrichmentOverlays.length; i++) {
enrichmentOverlays[i] = iconRegister.registerIcon("hbm:rbmk_pellet_overlay_e" + i);
}
if(this.hasXenon)
xenonOverlay = iconRegister.registerIcon("hbm:rbmk_pellet_overlay_xenon");
}
@ -71,16 +75,16 @@ public class ItemRBMKPellet extends ItemNuclearWaste {
public int getRenderPasses(int meta) {
return hasXenon(meta) ? 3 : 2;
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
super.addInformation(stack, player, list, bool);
list.add(EnumChatFormatting.ITALIC + this.fullName);
list.add(EnumChatFormatting.DARK_GRAY + "" + EnumChatFormatting.ITALIC + "Pellet for recycling");
int meta = rectify(stack.getItemDamage());
switch(meta % 5) {
case 0: list.add(EnumChatFormatting.GOLD + "Brand New"); break;
case 1: list.add(EnumChatFormatting.YELLOW + "Barely Depleted"); break;
@ -88,7 +92,7 @@ public class ItemRBMKPellet extends ItemNuclearWaste {
case 3: list.add(EnumChatFormatting.DARK_GREEN + "Highly Depleted"); break;
case 4: list.add(EnumChatFormatting.DARK_GRAY + "Fully Depleted"); break;
}
if(hasXenon(meta))
list.add(EnumChatFormatting.DARK_PURPLE + "High Xenon Poison");
}
@ -96,20 +100,20 @@ public class ItemRBMKPellet extends ItemNuclearWaste {
@Override
@SideOnly(Side.CLIENT)
public IIcon getIconFromDamageForRenderPass(int meta, int pass) {
if(pass == 0)
return this.itemIcon;
if(pass == 2)
return this.xenonOverlay;
return this.enrichmentOverlays[rectify(meta) % 5];
}
public static boolean hasXenon(int meta) {
return rectify(meta) >= 5;
}
public static int rectify(int meta) {
return Math.abs(meta) % 10;
}

View File

@ -1,5 +1,6 @@
package com.hbm.items.machine;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import java.util.function.BiFunction;
@ -20,7 +21,7 @@ import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
public class ItemRBMKRod extends Item {
public ItemRBMKPellet pellet;
public String fullName = ""; //full name of the fuel rod
public double reactivity; //endpoint of the function
@ -35,7 +36,7 @@ public class ItemRBMKRod extends Item {
public double diffusion = 0.02D; //the speed at which the core heats the hull
public NType nType = NType.SLOW; //neutronType, the most efficient neutron type for fission
public NType rType = NType.FAST; //releaseType, the type of neutrons released by this fuel
/* _____
* ,I I I I,
* |'-----'|
@ -52,18 +53,22 @@ public class ItemRBMKRod extends Item {
* | |
* '-----'
* I I I I
*
*
* i drew a fuel rod yay
*/
public static List<ItemRBMKRod> craftableRods = new ArrayList<>();
public ItemRBMKRod(ItemRBMKPellet pellet) {
this(pellet.fullName);
this.pellet = pellet;
craftableRods.add(this);
}
public ItemRBMKRod(String fullName) {
this.fullName = fullName;
this.setContainerItem(ModItems.rbmk_fuel_empty);
this.setMaxStackSize(1);
this.setCreativeTab(MainRegistry.controlTab);
@ -93,7 +98,7 @@ public class ItemRBMKRod extends Item {
this.depFunc = func;
return this;
}
public ItemRBMKRod setXenon(double gen, double burn) {
this.xGen = gen;
this.xBurn = burn;
@ -120,7 +125,7 @@ public class ItemRBMKRod extends Item {
this.rType = rType;
return this;
}
/**
* Adjusts the input flux using the poison level
* Generates, then burns poison
@ -131,82 +136,82 @@ public class ItemRBMKRod extends Item {
* @return outFlux
*/
public double burn(World world, ItemStack stack, double inFlux) {
inFlux += selfRate;
//if xenon poison is enabled
if(RBMKDials.getXenon(world)) {
double xenon = getPoison(stack);
xenon -= xenonBurnFunc(inFlux);
inFlux *= (1D - getPoisonLevel(stack));
xenon += xenonGenFunc(inFlux);
if(xenon < 0D) xenon = 0D;
if(xenon > 100D) xenon = 100D;
setPoison(stack, xenon);
}
double outFlux = reactivityFunc(inFlux, getEnrichment(stack)) * RBMKDials.getReactivityMod(world);
//if depletion is enabled
if(RBMKDials.getDepletion(world)) {
double y = getYield(stack);
y -= inFlux;
if(y < 0D) y = 0D;
setYield(stack, y);
}
double coreHeat = this.getCoreHeat(stack);
coreHeat += outFlux * heat;
this.setCoreHeat(stack, rectify(coreHeat));
return outFlux;
}
private double rectify(double num) {
if(num > 1_000_000D) num = 1_000_000D;
if(num < 20D || Double.isNaN(num)) num = 20D;
return num;
}
/**
* Heat up the core based on the outFlux, then move some heat to the hull
* @param stack
*/
public void updateHeat(World world, ItemStack stack, double mod) {
double coreHeat = this.getCoreHeat(stack);
double hullHeat = this.getHullHeat(stack);
if(coreHeat > hullHeat) {
double mid = (coreHeat - hullHeat) / 2D;
coreHeat -= mid * this.diffusion * RBMKDials.getFuelDiffusionMod(world) * mod;
hullHeat += mid * this.diffusion * RBMKDials.getFuelDiffusionMod(world) * mod;
this.setCoreHeat(stack, rectify(coreHeat));
this.setHullHeat(stack, rectify(hullHeat));
}
}
/**
* return one tick's worth of heat and cool the hull of the fuel rod, this heat goes into the fuel rod assembly block
* @param stack
* @return
*/
public double provideHeat(World world, ItemStack stack, double heat, double mod) {
double hullHeat = this.getHullHeat(stack);
//metldown! the hull melts so the entire structure stops making sense
//hull and core heats are instantly equalized into 33% of their sum each,
//the rest is sent to the component which is always fatal
@ -217,20 +222,20 @@ public class ItemRBMKRod extends Item {
this.setHullHeat(stack, avg);
return avg - heat;
}
if(hullHeat <= heat)
return 0;
double ret = (hullHeat - heat) / 2;
ret *= RBMKDials.getFuelHeatProvision(world) * mod;
hullHeat -= ret;
this.setHullHeat(stack, hullHeat);
return ret;
}
public static enum EnumBurnFunc {
PASSIVE(EnumChatFormatting.DARK_GREEN + "SAFE / PASSIVE"), //const, no reactivity
LOG_TEN(EnumChatFormatting.YELLOW + "MEDIUM / LOGARITHMIC"), //log10(x + 1) * reactivity * 50
@ -241,22 +246,22 @@ public class ItemRBMKRod extends Item {
LINEAR(EnumChatFormatting.RED + "DANGEROUS / LINEAR"), //x * reactivity
QUADRATIC(EnumChatFormatting.RED + "DANGEROUS / QUADRATIC"), //x^2 / 100 * reactivity
EXPERIMENTAL(EnumChatFormatting.RED + "EXPERIMENTAL / SINE SLOPE"); //x * (sin(x) + 1)
public String title = "";
private EnumBurnFunc(String title) {
this.title = title;
}
}
/**
* @param enrichment [0;100] ...or at least those are sane levels
* @return the amount of reactivity yielded, unmodified by xenon
*/
public double reactivityFunc(double in, double enrichment) {
double flux = in * reactivityModByEnrichment(enrichment);
switch(this.function) {
case PASSIVE: return selfRate * enrichment;
case LOG_TEN: return Math.log10(flux + 1) * 0.5D * reactivity;
@ -268,20 +273,20 @@ public class ItemRBMKRod extends Item {
case QUADRATIC: return flux * flux / 10000D * reactivity;
case EXPERIMENTAL: return flux * (Math.sin(flux) + 1) * reactivity;
}
return 0;
}
public String getFuncDescription(ItemStack stack) {
String function;
switch(this.function) {
case PASSIVE: function = EnumChatFormatting.RED + "" + selfRate;
break;
case LOG_TEN: function = "log10(%1$s + 1) * 0.5 * %2$s";
break;
case PLATEU: function = "(1 - e^-%1$s / 25)) * %2$s";
case PLATEU: function = "(1 - e^(-%1$s / 25)) * %2$s";
break;
case ARCH: function = "(%1$s - %1$s² / 10000) / 100 * %2$s [0;∞]";
break;
@ -297,20 +302,20 @@ public class ItemRBMKRod extends Item {
break;
default: function = "ERROR";
}
double enrichment = getEnrichment(stack);
if(enrichment < 1) {
enrichment = reactivityModByEnrichment(enrichment);
String reactivity = EnumChatFormatting.YELLOW + "" + ((int)(this.reactivity * enrichment * 1000D) / 1000D) + EnumChatFormatting.WHITE;
String enrichmentPer = EnumChatFormatting.GOLD + " (" + ((int)(enrichment * 1000D) / 10D) + "%)";
return String.format(Locale.US, function, selfRate > 0 ? "(x" + EnumChatFormatting.RED + " + " + selfRate + "" + EnumChatFormatting.WHITE + ")" : "x", reactivity).concat(enrichmentPer);
}
return String.format(Locale.US, function, selfRate > 0 ? "(x" + EnumChatFormatting.RED + " + " + selfRate + "" + EnumChatFormatting.WHITE + ")" : "x", reactivity);
}
public static enum EnumDepleteFunc {
LINEAR, //old function
RAISING_SLOPE, //for breeding fuels such as MEU, maximum of 110% at 28% depletion
@ -318,9 +323,9 @@ public class ItemRBMKRod extends Item {
GENTLE_SLOPE, //recommended for most fuels, maximum barely over the start, near the beginning
STATIC; //for arcade-style neutron sources
}
public double reactivityModByEnrichment(double enrichment) {
switch(this.depFunc) {
default:
case LINEAR: return enrichment;
@ -330,7 +335,7 @@ public class ItemRBMKRod extends Item {
case GENTLE_SLOPE: return enrichment + (Math.sin(enrichment * Math.PI) / 3D); //x + (sin(x * pi) / 3) also works
}
}
/**
* Xenon generated per tick, linear function
* @param flux
@ -339,7 +344,7 @@ public class ItemRBMKRod extends Item {
public double xenonGenFunc(double flux) {
return flux * xGen;
}
/**
* Xenon burned away per tick, quadratic function
* @param flux
@ -348,7 +353,7 @@ public class ItemRBMKRod extends Item {
public double xenonBurnFunc(double flux) {
return (flux * flux) / xBurn;
}
/**
* @param stack
* @return enrichment [0;1]
@ -356,7 +361,7 @@ public class ItemRBMKRod extends Item {
public static double getEnrichment(ItemStack stack) {
return getYield(stack) / ((ItemRBMKRod) stack.getItem()).yield;
}
/**
* @param stack
* @return poison [0;1]
@ -415,15 +420,19 @@ public class ItemRBMKRod extends Item {
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
list.add(EnumChatFormatting.ITALIC + this.fullName);
if(this == ModItems.rbmk_fuel_drx) {
if(ItemRBMKRod.getHullHeat(stack) >= 50 || ItemRBMKRod.getCoreHeat(stack) >= 50) {
list.add(EnumChatFormatting.GOLD + I18nUtil.resolveKey("desc.item.wasteCooling"));
}
if(selfRate > 0 || this.function == EnumBurnFunc.SIGMOID) {
list.add(EnumChatFormatting.RED + I18nUtil.resolveKey("trait.rbmx.source"));
}
list.add(EnumChatFormatting.GREEN + I18nUtil.resolveKey("trait.rbmx.depletion", ((int)(((yield - getYield(stack)) / yield) * 100000)) / 1000D + "%"));
list.add(EnumChatFormatting.DARK_PURPLE + I18nUtil.resolveKey("trait.rbmx.xenon", ((int)(getPoison(stack) * 1000D) / 1000D) + "%"));
list.add(EnumChatFormatting.BLUE + I18nUtil.resolveKey("trait.rbmx.splitsWith", I18nUtil.resolveKey(nType.unlocalized + ".x")));
@ -437,13 +446,17 @@ public class ItemRBMKRod extends Item {
list.add(EnumChatFormatting.RED + I18nUtil.resolveKey("trait.rbmx.skinTemp", ((int)(getHullHeat(stack) * 10D) / 10D) + "m"));
list.add(EnumChatFormatting.RED + I18nUtil.resolveKey("trait.rbmx.coreTemp", ((int)(getCoreHeat(stack) * 10D) / 10D) + "m"));
list.add(EnumChatFormatting.DARK_RED + I18nUtil.resolveKey("trait.rbmx.melt", meltingPoint + "m"));
} else {
if(ItemRBMKRod.getHullHeat(stack) >= 50 || ItemRBMKRod.getCoreHeat(stack) >= 50) {
list.add(EnumChatFormatting.GOLD + I18nUtil.resolveKey("desc.item.wasteCooling"));
}
if(selfRate > 0 || this.function == EnumBurnFunc.SIGMOID) {
list.add(EnumChatFormatting.RED + I18nUtil.resolveKey("trait.rbmk.source"));
}
list.add(EnumChatFormatting.GREEN + I18nUtil.resolveKey("trait.rbmk.depletion", ((int)(((yield - getYield(stack)) / yield) * 100000D)) / 1000D + "%"));
list.add(EnumChatFormatting.DARK_PURPLE + I18nUtil.resolveKey("trait.rbmk.xenon", ((int)(getPoison(stack) * 1000D) / 1000D) + "%"));
list.add(EnumChatFormatting.BLUE + I18nUtil.resolveKey("trait.rbmk.splitsWith", I18nUtil.resolveKey(nType.unlocalized)));
@ -471,10 +484,10 @@ public class ItemRBMKRod extends Item {
list.add(EnumChatFormatting.RED + "Skin temp: " + ((int)(getHullHeat(stack) * 10D) / 10D) + "°C");
list.add(EnumChatFormatting.RED + "Core temp: " + ((int)(getCoreHeat(stack) * 10D) / 10D) + "°C");
list.add(EnumChatFormatting.DARK_RED + "Melting point: " + meltingPoint + "°C");*/
super.addInformation(stack, player, list, bool);
}
/* __ __ ____ ________
* | \ | | | __ \ |__ __|
* | \ | | | |__| | | |
@ -482,40 +495,40 @@ public class ItemRBMKRod extends Item {
* | | \ | | |__| | | |
* |__| \__| |_____/ |__|
*/
public static void setYield(ItemStack stack, double yield) {
setDouble(stack, "yield", yield);
}
public static double getYield(ItemStack stack) {
if(stack.getItem() instanceof ItemRBMKRod) {
return getDouble(stack, "yield");
}
return 0;
}
public static void setPoison(ItemStack stack, double xenon) {
setDouble(stack, "xenon", xenon);
}
public static double getPoison(ItemStack stack) {
return getDouble(stack, "xenon");
}
public static void setCoreHeat(ItemStack stack, double heat) {
setDouble(stack, "core", heat);
}
public static double getCoreHeat(ItemStack stack) {
return getDouble(stack, "core");
}
public static void setHullHeat(ItemStack stack, double heat) {
setDouble(stack, "hull", heat);
}
public static double getHullHeat(ItemStack stack) {
return getDouble(stack, "hull");
}
@ -529,23 +542,23 @@ public class ItemRBMKRod extends Item {
public double getDurabilityForDisplay(ItemStack stack) {
return 1D - getEnrichment(stack);
}
public static void setDouble(ItemStack stack, String key, double yield) {
if(!stack.hasTagCompound())
setNBTDefaults(stack);
stack.stackTagCompound.setDouble(key, yield);
}
public static double getDouble(ItemStack stack, String key) {
if(!stack.hasTagCompound())
setNBTDefaults(stack);
return stack.stackTagCompound.getDouble(key);
}
/**
* Sets up the default values for all NBT data because doing it one-by-one will only correctly set the first called value and the rest stays 0 which is very not good
* @param stack
@ -557,7 +570,7 @@ public class ItemRBMKRod extends Item {
setCoreHeat(stack, 20.0D);
setHullHeat(stack, 20.0D);
}
@Override
public void onCreated(ItemStack stack, World world, EntityPlayer player) {
setNBTDefaults(stack); //minimize the window where NBT screwups can happen

View File

@ -2,8 +2,11 @@ package com.hbm.items.tool;
import java.util.List;
import com.hbm.blocks.ModBlocks;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
@ -11,98 +14,87 @@ import net.minecraft.util.ChatComponentText;
import net.minecraft.world.World;
public class ItemWand extends Item {
@SuppressWarnings({ "unchecked", "rawtypes" })
@Override
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool)
{
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
list.add("Creative-only item");
list.add("\"Destruction brings creation\"");
list.add("(Set positions with right click,");
list.add("set block with shift-right click!)");
if(itemstack.stackTagCompound != null &&
!(itemstack.stackTagCompound.getInteger("x") == 0 &&
itemstack.stackTagCompound.getInteger("y") == 0 &&
itemstack.stackTagCompound.getInteger("z") == 0))
{
list.add("Pos: " + itemstack.stackTagCompound.getInteger("x") + ", " + itemstack.stackTagCompound.getInteger("y") + ", " + itemstack.stackTagCompound.getInteger("z"));
if(stack.stackTagCompound != null && !(stack.stackTagCompound.getInteger("x") == 0 && stack.stackTagCompound.getInteger("y") == 0 && stack.stackTagCompound.getInteger("z") == 0)) {
list.add("Pos: " + stack.stackTagCompound.getInteger("x") + ", " + stack.stackTagCompound.getInteger("y") + ", " + stack.stackTagCompound.getInteger("z"));
} else {
list.add("Positions not set!");
}
if(itemstack.stackTagCompound != null)
list.add("Block saved: " + Block.getBlockById(itemstack.stackTagCompound.getInteger("block")).getUnlocalizedName());
if(stack.stackTagCompound != null)
list.add("Block saved: " + Block.getBlockById(stack.stackTagCompound.getInteger("block")).getUnlocalizedName());
}
@Override
public boolean onItemUse(ItemStack p_77648_1_, EntityPlayer p_77648_2_, World p_77648_3_, int p_77648_4_, int p_77648_5_, int p_77648_6_, int p_77648_7_, float p_77648_8_, float p_77648_9_, float p_77648_10_)
{
if(p_77648_1_.stackTagCompound == null)
{
p_77648_1_.stackTagCompound = new NBTTagCompound();
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float fx, float fy, float fz) {
if(stack.stackTagCompound == null) {
stack.stackTagCompound = new NBTTagCompound();
}
if(p_77648_2_.isSneaking())
{
p_77648_1_.stackTagCompound.setInteger("block", Block.getIdFromBlock(p_77648_3_.getBlock(p_77648_4_, p_77648_5_, p_77648_6_)));
p_77648_1_.stackTagCompound.setInteger("meta", p_77648_3_.getBlockMetadata(p_77648_4_, p_77648_5_, p_77648_6_));
if(p_77648_3_.isRemote)
p_77648_2_.addChatMessage(new ChatComponentText("Set block " + Block.getBlockById(p_77648_1_.stackTagCompound.getInteger("block")).getUnlocalizedName()));
if(player.isSneaking()) {
stack.stackTagCompound.setInteger("block", Block.getIdFromBlock(world.getBlock(x, y, z)));
stack.stackTagCompound.setInteger("meta", world.getBlockMetadata(x, y, z));
if(world.isRemote)
player.addChatMessage(new ChatComponentText("Set block " + Block.getBlockById(stack.stackTagCompound.getInteger("block")).getUnlocalizedName()));
} else {
if(p_77648_1_.stackTagCompound.getInteger("x") == 0 &&
p_77648_1_.stackTagCompound.getInteger("y") == 0 &&
p_77648_1_.stackTagCompound.getInteger("z") == 0)
{
p_77648_1_.stackTagCompound.setInteger("x", p_77648_4_);
p_77648_1_.stackTagCompound.setInteger("y", p_77648_5_);
p_77648_1_.stackTagCompound.setInteger("z", p_77648_6_);
if(p_77648_3_.isRemote)
p_77648_2_.addChatMessage(new ChatComponentText("Position set!"));
if(stack.stackTagCompound.getInteger("x") == 0 && stack.stackTagCompound.getInteger("y") == 0 && stack.stackTagCompound.getInteger("z") == 0) {
stack.stackTagCompound.setInteger("x", x);
stack.stackTagCompound.setInteger("y", y);
stack.stackTagCompound.setInteger("z", z);
if(world.isRemote)
player.addChatMessage(new ChatComponentText("Position set!"));
} else {
int x = p_77648_1_.stackTagCompound.getInteger("x");
int y = p_77648_1_.stackTagCompound.getInteger("y");
int z = p_77648_1_.stackTagCompound.getInteger("z");
p_77648_1_.stackTagCompound.setInteger("x", 0);
p_77648_1_.stackTagCompound.setInteger("y", 0);
p_77648_1_.stackTagCompound.setInteger("z", 0);
if(!p_77648_3_.isRemote)
{
for(int i = Math.min(x, p_77648_4_); i <= Math.max(x, p_77648_4_); i++)
{
for(int j = Math.min(y, p_77648_5_); j <= Math.max(y, p_77648_5_); j++)
{
for(int k = Math.min(z, p_77648_6_); k <= Math.max(z, p_77648_6_); k++)
{
p_77648_3_.setBlock(i, j, k, Block.getBlockById(p_77648_1_.stackTagCompound.getInteger("block")), p_77648_1_.stackTagCompound.getInteger("meta"), 3);
int ox = stack.stackTagCompound.getInteger("x");
int oy = stack.stackTagCompound.getInteger("y");
int oz = stack.stackTagCompound.getInteger("z");
stack.stackTagCompound.setInteger("x", 0);
stack.stackTagCompound.setInteger("y", 0);
stack.stackTagCompound.setInteger("z", 0);
if(!world.isRemote) {
Block block = Block.getBlockById(stack.stackTagCompound.getInteger("block"));
int meta = stack.stackTagCompound.getInteger("meta");
boolean replaceAir = block == ModBlocks.wand_air;
for(int i = Math.min(ox, x); i <= Math.max(ox, x); i++) {
for(int j = Math.min(oy, y); j <= Math.max(oy, y); j++) {
for(int k = Math.min(oz, z); k <= Math.max(oz, z); k++) {
if(replaceAir && world.getBlock(i, j, k) != Blocks.air) continue;
world.setBlock(i, j, k, block, meta, 3);
}
}
}
}
if(p_77648_3_.isRemote)
p_77648_2_.addChatMessage(new ChatComponentText("Selection filled!"));
if(world.isRemote)
player.addChatMessage(new ChatComponentText("Selection filled!"));
}
}
return true;
}
return true;
}
@Override
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
if(stack.stackTagCompound == null)
{
if(stack.stackTagCompound == null) {
stack.stackTagCompound = new NBTTagCompound();
}
if(player.isSneaking())
{
if(player.isSneaking()) {
stack.stackTagCompound.setInteger("block", 0);
stack.stackTagCompound.setInteger("meta", 0);
if(world.isRemote)
player.addChatMessage(new ChatComponentText("Set block " + Block.getBlockById(stack.stackTagCompound.getInteger("block")).getUnlocalizedName()));
}
return stack;
}
}
}

View File

@ -1301,7 +1301,7 @@ public class Orchestras {
if(timer == 1) {
int cba = (stack.getItem() == ModItems.gun_aberrator_eott && ctx.configIndex == 0) ? -1 : 1;
SpentCasing casing = ctx.config.getReceivers(stack)[0].getMagazine(stack).getCasing(stack, ctx.inventory);
if(casing != null) CasingCreator.composeEffect(entity.worldObj, entity, 0.375, aiming ? 0 : -0.125, aiming ? -0.0625 : -0.25D * cba, -0.05, 0.25, -0.05 * cba, 0.01, -10F + (float)entity.getRNG().nextGaussian() * 10F, (float)entity.getRNG().nextGaussian() * 12.5F, casing.getName());
if(casing != null) CasingCreator.composeEffect(entity.worldObj, entity, 0.5, aiming ? 0 : -0.125, aiming ? -0.0625 : -0.25D * cba, -0.05, 0.25, -0.05 * cba, 0.01, -10F + (float)entity.getRNG().nextGaussian() * 10F, (float)entity.getRNG().nextGaussian() * 12.5F, casing.getName());
}
}

View File

@ -35,7 +35,7 @@ public class XFactory10ga {
public static BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> LAMBDA_TINY_EXPLODE = (bullet, mop) -> {
if(mop.typeOfHit == mop.typeOfHit.ENTITY && bullet.ticksExisted < 3 && mop.entityHit == bullet.getThrower()) return;
Lego.tinyExplode(bullet, mop, 2F); bullet.setDead();
Lego.tinyExplode(bullet, mop, 1.5F); bullet.setDead();
};
public static void init() {

View File

@ -36,7 +36,7 @@ public class XFactory50 {
public static BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> LAMBDA_STANDARD_EXPLODE = (bullet, mop) -> {
if(mop.typeOfHit == mop.typeOfHit.ENTITY && bullet.ticksExisted < 3 && mop.entityHit == bullet.getThrower()) return;
Lego.tinyExplode(bullet, mop, 3.5F); bullet.setDead();
Lego.tinyExplode(bullet, mop, 2F); bullet.setDead();
};
public static void init() {

View File

@ -3,6 +3,8 @@ package com.hbm.items.weapon.sedna.factory;
import java.util.function.BiConsumer;
import java.util.function.BiFunction;
import com.hbm.entity.projectile.EntityBulletBaseMK4;
import com.hbm.extprop.HbmLivingProps;
import com.hbm.items.ModItems;
import com.hbm.items.weapon.sedna.BulletConfig;
import com.hbm.items.weapon.sedna.Crosshair;
@ -19,7 +21,9 @@ import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.HbmAnimations.AnimType;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.item.ItemStack;
import net.minecraft.util.MovingObjectPosition;
public class XFactory75Bolt {
@ -27,15 +31,29 @@ public class XFactory75Bolt {
public static BulletConfig b75_inc;
public static BulletConfig b75_exp;
public static BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> LAMBDA_TINY_EXPLODE = (bullet, mop) -> {
if(mop.typeOfHit == mop.typeOfHit.ENTITY && bullet.ticksExisted < 3 && mop.entityHit == bullet.getThrower()) return;
Lego.tinyExplode(bullet, mop, 2F); bullet.setDead();
};
public static BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> LAMBDA_INC = (bullet, mop) -> {
if(mop.entityHit != null && mop.entityHit instanceof EntityLivingBase) {
HbmLivingProps data = HbmLivingProps.getData((EntityLivingBase) mop.entityHit);
if(data.phosphorus < 300) data.phosphorus = 300;
}
};
public static BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> LAMBDA_STANDARD_EXPLODE = (bullet, mop) -> {
Lego.standardExplode(bullet, mop, 5F); bullet.setDead();
};
public static void init() {
SpentCasing casing75 = new SpentCasing(CasingType.STRAIGHT).setColor(SpentCasing.COLOR_CASE_BRASS).setScale(2F, 2F, 1.5F);
b75 = new BulletConfig().setItem(EnumAmmo.B75)
.setCasing(casing75.clone().register("b75"));
.setCasing(casing75.clone().register("b75")).setOnImpact(LAMBDA_TINY_EXPLODE);
b75_inc = new BulletConfig().setItem(EnumAmmo.B75_INC).setDamage(0.8F).setArmorPiercing(0.1F)
.setCasing(casing75.clone().register("b75inc"));
.setCasing(casing75.clone().register("b75inc")).setOnImpact(LAMBDA_INC);
b75_exp = new BulletConfig().setItem(EnumAmmo.B75_EXP).setDamage(1.5F).setArmorPiercing(-0.25F)
.setCasing(casing75.clone().register("b75exp"));
.setCasing(casing75.clone().register("b75exp")).setOnImpact(LAMBDA_STANDARD_EXPLODE);
ModItems.gun_bolter = new ItemGunBaseNT(WeaponQuality.SPECIAL, new GunConfig()
.dura(3_000).draw(20).inspect(31).crosshair(Crosshair.L_CIRCLE).smoke(LAMBDA_SMOKE)

View File

@ -43,7 +43,7 @@ public class XFactory762mm {
public static BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> LAMBDA_TINY_EXPLODE = (bullet, mop) -> {
if(mop.typeOfHit == mop.typeOfHit.ENTITY && bullet.ticksExisted < 3 && mop.entityHit == bullet.getThrower()) return;
Lego.tinyExplode(bullet, mop, 2F); bullet.setDead();
Lego.tinyExplode(bullet, mop, 1.5F); bullet.setDead();
};
public static void init() {

View File

@ -71,8 +71,7 @@ public class WeaponModManager {
Item[] steelGuns = new Item[] {
ModItems.gun_light_revolver, ModItems.gun_light_revolver_atlas,
ModItems.gun_henry,
ModItems.gun_henry_lincoln,
ModItems.gun_henry, ModItems.gun_henry_lincoln,
ModItems.gun_greasegun,
ModItems.gun_maresleg, ModItems.gun_maresleg_akimbo,
ModItems.gun_flaregun };

View File

@ -6,7 +6,8 @@
import com.hbm.blocks.generic.BlockLoot.TileEntityLoot;
import com.hbm.blocks.generic.BlockPedestal.TileEntityPedestal;
import com.hbm.blocks.generic.BlockPlushie.TileEntityPlushie;
import com.hbm.blocks.generic.BlockSnowglobe.TileEntitySnowglobe;
import com.hbm.blocks.generic.BlockSkeletonHolder.TileEntitySkeletonHolder;
import com.hbm.blocks.generic.BlockSnowglobe.TileEntitySnowglobe;
import com.hbm.blocks.machine.Floodlight.TileEntityFloodlight;
import com.hbm.blocks.machine.MachineFan.TileEntityFan;
import com.hbm.blocks.machine.PistonInserter.TileEntityPistonInserter;
@ -201,6 +202,7 @@ public class ClientProxy extends ServerProxy {
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFloodlight.class, new RenderFloodlight());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityLoot.class, new RenderLoot());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityPedestal.class, new RenderPedestalTile());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySkeletonHolder.class, new RenderSkeletonHolder());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBobble.class, new RenderBobble());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySnowglobe.class, new RenderSnowglobe());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityPlushie.class, new RenderPlushie());
@ -740,10 +742,7 @@ public class ClientProxy extends ServerProxy {
RenderingRegistry.registerEntityRenderingHandler(EntityRADBeast.class, new RenderRADBeast());
RenderingRegistry.registerEntityRenderingHandler(EntityBlockSpider.class, new RenderBlockSpider());
RenderingRegistry.registerEntityRenderingHandler(EntityUFO.class, new RenderUFO());
RenderingRegistry.registerEntityRenderingHandler(EntitySiegeZombie.class, new RenderSiegeZombie());
RenderingRegistry.registerEntityRenderingHandler(EntitySiegeUFO.class, new RenderSiegeUFO());
RenderingRegistry.registerEntityRenderingHandler(EntitySiegeCraft.class, new RenderSiegeCraft());
RenderingRegistry.registerEntityRenderingHandler(EntitySiegeSkeleton.class, new RenderSiegeSkeleton());
RenderingRegistry.registerEntityRenderingHandler(EntitySiegeTunneler.class, new RenderSiegeTunneler());
RenderingRegistry.registerEntityRenderingHandler(EntityGhost.class, new RenderGhost());
RenderingRegistry.registerEntityRenderingHandler(EntityGlyphid.class, new RenderGlyphid());
@ -759,6 +758,7 @@ public class ClientProxy extends ServerProxy {
RenderingRegistry.registerEntityRenderingHandler(EntityPlasticBag.class, new RenderPlasticBag());
RenderingRegistry.registerEntityRenderingHandler(EntityPigeon.class, new RenderPigeon(new ModelPigeon(), 0.3F));
RenderingRegistry.registerEntityRenderingHandler(EntityDummy.class, new RenderDummy());
RenderingRegistry.registerEntityRenderingHandler(EntityUndeadSoldier.class, new RenderUndeadSoldier());
//"particles"
RenderingRegistry.registerEntityRenderingHandler(EntityChlorineFX.class, new MultiCloudRenderer(new Item[] { ModItems.chlorine1, ModItems.chlorine2, ModItems.chlorine3, ModItems.chlorine4, ModItems.chlorine5, ModItems.chlorine6, ModItems.chlorine7, ModItems.chlorine8 }));
RenderingRegistry.registerEntityRenderingHandler(EntityPinkCloudFX.class, new MultiCloudRenderer(new Item[] { ModItems.pc1, ModItems.pc2, ModItems.pc3, ModItems.pc4, ModItems.pc5, ModItems.pc6, ModItems.pc7, ModItems.pc8 }));

View File

@ -351,14 +351,6 @@ public class CraftingManager {
addRecipeAuto(new ItemStack(ModItems.stamp_desh_flat, 1), new Object[] { "BDB", "DSD", "BDB", 'B', brick, 'D', DESH.ingot(), 'S', FERRO.ingot() });
}
addRecipeAuto(new ItemStack(ModItems.mechanism_revolver_1, 1), new Object[] { "ICI", "CAC", "ICI", 'I', IRON.plate(), 'C', CU.ingot(), 'A', AL.ingot() });
addRecipeAuto(new ItemStack(ModItems.mechanism_revolver_2, 1), new Object[] { "ATA", "TDT", "ATA", 'A', ALLOY.plate(), 'T', W.ingot(), 'D', DURA.ingot() });
addRecipeAuto(new ItemStack(ModItems.mechanism_rifle_1, 1), new Object[] { "ICI", "MAM", "ICI", 'I', IRON.plate(), 'C', CU.ingot(), 'A', AL.ingot(), 'M', ModItems.mechanism_revolver_1 });
addRecipeAuto(new ItemStack(ModItems.mechanism_rifle_2, 1), new Object[] { "ATA", "MDM", "ATA", 'A', ALLOY.plate(), 'T', W.ingot(), 'D', DURA.ingot(), 'M', ModItems.mechanism_revolver_2 });
addRecipeAuto(new ItemStack(ModItems.mechanism_launcher_1, 1), new Object[] { "TTT", "SSS", "BBI", 'T', TI.plate(), 'S', STEEL.ingot(), 'B', W.bolt(), 'I', MINGRADE.ingot() });
addRecipeAuto(new ItemStack(ModItems.mechanism_launcher_2, 1), new Object[] { "TTT", "SSS", "BBI", 'T', ALLOY.plate(), 'S', ANY_PLASTIC.ingot(), 'B', W.bolt(), 'I', DESH.ingot() });
addRecipeAuto(new ItemStack(ModItems.mechanism_special, 1), new Object[] { "PCI", "ISS", "PCI", 'P', ModItems.plate_desh, 'C', ModItems.coil_advanced_alloy, 'I', STAR.ingot(), 'S', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.ADVANCED) });
addRecipeAuto(new ItemStack(ModBlocks.watz_pump, 1), new Object[] { "MPM", "PCP", "PSP", 'M', ModItems.motor_desh, 'P', ANY_RESISTANTALLOY.plateCast(), 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.BISMOID), 'S', ModItems.pipes_steel });
addRecipeAuto(new ItemStack(ModBlocks.reinforced_stone, 4), new Object[] { "FBF", "BFB", "FBF", 'F', Blocks.cobblestone, 'B', Blocks.stone });
@ -740,7 +732,7 @@ public class CraftingManager {
addRecipeAuto(new ItemStack(ModBlocks.dfc_emitter, 1), new Object[] { "SDS", "TXL", "SDS", 'S', OSMIRIDIUM.plateWelded(), '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.plateWelded(), 'D', ModItems.plate_desh, 'T', ModBlocks.machine_transformer_dnt, 'X', ModBlocks.block_dineutronium, 'L', STEEL.shell() });
addRecipeAuto(new ItemStack(ModBlocks.dfc_injector, 1), new Object[] { "SDS", "TXL", "SDS", 'S', OSMIRIDIUM.plateWelded(), '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.plateWelded(), 'D', ModItems.plate_desh, 'T', ModItems.singularity_spark, 'X', ModItems.magnet_circular, 'L', ModItems.crystal_xen });
addRecipeAuto(new ItemStack(ModBlocks.dfc_stabilizer, 1), new Object[] { "SDS", "TXL", "SDS", 'S', OSMIRIDIUM.plateWelded(), 'D', ModItems.plate_desh, 'T', ModItems.singularity_spark, 'X', ModBlocks.fusion_conductor, '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

@ -131,7 +131,7 @@ public class MainRegistry {
public static ToolMaterial enumToolMaterialBatNail = EnumHelper.addToolMaterial("BATNAIL", 0, 450, 1.0F, 4F, 25);
public static ToolMaterial enumToolMaterialGolfClub = EnumHelper.addToolMaterial("GOLFCLUB", 1, 1000, 2.0F, 5F, 25);
public static ToolMaterial enumToolMaterialPipeRusty = EnumHelper.addToolMaterial("PIPERUSTY", 1, 350, 1.5F, 4.5F, 25);
public static ToolMaterial enumToolMaterialPipeLead = EnumHelper.addToolMaterial("PIPELEAD", 1, 250, 1.5F, 5.5F, 25);
public static ToolMaterial enumToolMaterialPipeLead = EnumHelper.addToolMaterial("PIPELEAD", 1, 250, 1.5F, 3F, 25);
public static ToolMaterial enumToolMaterialBottleOpener = EnumHelper.addToolMaterial("OPENER", 1, 250, 1.5F, 0.5F, 200);
public static ToolMaterial enumToolMaterialSledge = EnumHelper.addToolMaterial("SHIMMERSLEDGE", 1, 0, 25.0F, 26F, 200);
@ -1665,6 +1665,14 @@ public class MainRegistry {
ignoreMappings.add("hbm:item.bobmazon_weapons");
ignoreMappings.add("hbm:item.bobmazon_tools");
ignoreMappings.add("hbm:item.missile_carrier");
ignoreMappings.add("hbm:item.magnet_circular");
ignoreMappings.add("hbm:item.mechanism_revolver_1");
ignoreMappings.add("hbm:item.mechanism_revolver_2");
ignoreMappings.add("hbm:item.mechanism_rifle_1");
ignoreMappings.add("hbm:item.mechanism_rifle_2");
ignoreMappings.add("hbm:item.mechanism_launcher_1");
ignoreMappings.add("hbm:item.mechanism_launcher_2");
ignoreMappings.add("hbm:item.mechanism_special");
/// REMAP ///
remapItems.put("hbm:item.gadget_explosive8", ModItems.early_explosive_lenses);

View File

@ -370,12 +370,10 @@ public class ModEventHandler {
if(rand.nextInt(1024) == 0)
entity.setCurrentItemOrArmor(3, new ItemStack(ModItems.starmetal_plate, 1, world.rand.nextInt(ModItems.starmetal_plate.getMaxDamage())));
if(rand.nextInt(128) == 0)
if(rand.nextInt(64) == 0)
entity.setCurrentItemOrArmor(0, new ItemStack(ModItems.pipe_lead, 1, world.rand.nextInt(100)));
if(rand.nextInt(128) == 0)
entity.setCurrentItemOrArmor(0, new ItemStack(ModItems.reer_graar, 1, world.rand.nextInt(100)));
if(rand.nextInt(128) == 0)
entity.setCurrentItemOrArmor(0, new ItemStack(ModItems.pipe_rusty, 1, world.rand.nextInt(100)));
if(rand.nextInt(128) == 0)
entity.setCurrentItemOrArmor(0, new ItemStack(ModItems.crowbar, 1, world.rand.nextInt(100)));
if(rand.nextInt(128) == 0)

View File

@ -38,6 +38,8 @@ public class NEIRegistry {
handlers.add(new FusionRecipeHandler());
handlers.add(new SILEXRecipeHandler());
handlers.add(new FuelPoolHandler());
handlers.add(new RBMKRodDisassemblyHandler());
handlers.add(new RBMKWasteDecayHandler());
handlers.add(new CrucibleSmeltingHandler());
handlers.add(new CrucibleAlloyingHandler());
handlers.add(new CrucibleCastingHandler());

View File

@ -351,6 +351,9 @@ public class ResourceManager {
public static IModelCustomNamed silo_hatch_large = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/doors/silo_hatch_large.obj")).asVBO();
//Skeleton
public static final IModelCustom skeleton_holder = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/blocks/skeleton_holder.obj"),false).asVBO();
//Lights
public static final IModelCustom lantern = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/trinkets/lantern.obj"));
public static final IModelCustom cage_lamp = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/lights/cage_lamp.obj"));
@ -763,6 +766,9 @@ public class ResourceManager {
public static final ResourceLocation transition_seal_tex = new ResourceLocation(RefStrings.MODID, "textures/models/doors/transition_seal.png");
public static final ResourceLocation fire_door_tex = new ResourceLocation(RefStrings.MODID, "textures/models/doors/fire_door.png");
//Skeleton
public static final ResourceLocation skeleton_holder_tex = new ResourceLocation(RefStrings.MODID, "textures/particle/skeleton.png");
//Lantern
public static final ResourceLocation lantern_tex = new ResourceLocation(RefStrings.MODID, "textures/models/trinkets/lantern.png");
public static final ResourceLocation lantern_rusty_tex = new ResourceLocation(RefStrings.MODID, "textures/models/trinkets/lantern_rusty.png");
@ -900,6 +906,7 @@ public class ResourceManager {
public static final IModelCustom armor_tail = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/tail_peep.obj"));
public static final IModelCustom player_manly_af = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/armor/player_fem.obj"));
public static final IModelCustom armor_envsuit = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/envsuit.obj"));
public static final IModelCustom armor_taurun = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/taurun.obj"));
public static final IModelCustom armor_trenchmaster = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/trenchmaster.obj"));
////Texture Items
@ -1051,6 +1058,10 @@ public class ResourceManager {
public static final ResourceLocation rpa_chest = new ResourceLocation(RefStrings.MODID, "textures/armor/rpa_chest.png");
public static final ResourceLocation rpa_arm = new ResourceLocation(RefStrings.MODID, "textures/armor/rpa_arm.png");
public static final ResourceLocation taurun_helmet = new ResourceLocation(RefStrings.MODID, "textures/armor/taurun_helmet.png");
public static final ResourceLocation taurun_leg = new ResourceLocation(RefStrings.MODID, "textures/armor/taurun_leg.png");
public static final ResourceLocation taurun_chest = new ResourceLocation(RefStrings.MODID, "textures/armor/taurun_chest.png");
public static final ResourceLocation taurun_arm = new ResourceLocation(RefStrings.MODID, "textures/armor/taurun_arm.png");
public static final ResourceLocation trenchmaster_helmet = new ResourceLocation(RefStrings.MODID, "textures/armor/trenchmaster_helmet.png");
public static final ResourceLocation trenchmaster_leg = new ResourceLocation(RefStrings.MODID, "textures/armor/trenchmaster_leg.png");
public static final ResourceLocation trenchmaster_chest = new ResourceLocation(RefStrings.MODID, "textures/armor/trenchmaster_chest.png");

View File

@ -4,8 +4,8 @@ import org.lwjgl.opengl.GL11;
import com.hbm.entity.mob.EntityGhost;
import com.hbm.lib.RefStrings;
import com.hbm.render.model.ModelSiegeZombie;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.entity.RenderBiped;
import net.minecraft.entity.Entity;
@ -15,7 +15,7 @@ import net.minecraft.util.ResourceLocation;
public class RenderGhost extends RenderBiped {
public RenderGhost() {
super(new ModelSiegeZombie(0.0F), 0.5F, 1.0F);
super(new ModelBiped(0.0F), 0.5F, 1.0F);
}
@Override

View File

@ -1,40 +0,0 @@
package com.hbm.render.entity.mob;
import com.hbm.entity.mob.siege.EntitySiegeSkeleton;
import com.hbm.entity.mob.siege.SiegeTier;
import com.hbm.lib.RefStrings;
import net.minecraft.client.model.ModelSkeleton;
import net.minecraft.client.renderer.entity.RenderBiped;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.util.ResourceLocation;
public class RenderSiegeSkeleton extends RenderBiped {
public RenderSiegeSkeleton() {
super(new ModelSkeleton() {
@Override
public void setLivingAnimations(EntityLivingBase entity, float f0, float f1, float f2) {
this.aimedBow = true;
}
}, 0.5F);
}
@Override
protected ResourceLocation getEntityTexture(EntityLiving entity) {
return this.getEntityTexture((EntitySiegeSkeleton) entity);
}
@Override
protected ResourceLocation getEntityTexture(Entity entity) {
return this.getEntityTexture((EntitySiegeSkeleton) entity);
}
protected ResourceLocation getEntityTexture(EntitySiegeSkeleton entity) {
SiegeTier tier = entity.getTier();
return new ResourceLocation(RefStrings.MODID + ":textures/entity/siege_" + tier.name + ".png");
}
}

View File

@ -1,55 +0,0 @@
package com.hbm.render.entity.mob;
import org.lwjgl.opengl.GL11;
import com.hbm.entity.mob.siege.EntitySiegeUFO;
import com.hbm.entity.mob.siege.SiegeTier;
import com.hbm.lib.RefStrings;
import com.hbm.main.ResourceManager;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.entity.Entity;
import net.minecraft.util.ResourceLocation;
public class RenderSiegeUFO extends Render {
@Override
public void doRender(Entity entity, double x, double y, double z, float f0, float f1) {
GL11.glPushMatrix();
GL11.glTranslated(x, y + 0.25, z);
EntitySiegeUFO ufo = (EntitySiegeUFO) entity;
this.bindTexture(getEntityTexture(entity));
double rot = (entity.ticksExisted + f1) * 5 % 360D;
GL11.glRotated(rot, 0, 1, 0);
if(!ufo.isEntityAlive()) {
float tilt = ufo.deathTime + f1;
GL11.glRotatef(tilt * 5, 1, 0, 1);
} else if(entity.hurtResistantTime > 0) {
GL11.glRotated(Math.sin(System.currentTimeMillis() * 0.01D) * (entity.hurtResistantTime - f1), 1, 0, 0);
}
GL11.glShadeModel(GL11.GL_SMOOTH);
GL11.glDisable(GL11.GL_CULL_FACE);
ResourceManager.mini_ufo.renderAll();
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glShadeModel(GL11.GL_FLAT);
GL11.glPopMatrix();
}
@Override
protected ResourceLocation getEntityTexture(Entity entity) {
return this.getEntityTexture((EntitySiegeUFO) entity);
}
protected ResourceLocation getEntityTexture(EntitySiegeUFO entity) {
SiegeTier tier = entity.getTier();
return new ResourceLocation(RefStrings.MODID + ":textures/entity/ufo_siege_" + tier.name + ".png");
}
}

View File

@ -1,39 +0,0 @@
package com.hbm.render.entity.mob;
import com.hbm.entity.mob.siege.EntitySiegeZombie;
import com.hbm.entity.mob.siege.SiegeTier;
import com.hbm.lib.RefStrings;
import com.hbm.render.model.ModelSiegeZombie;
import net.minecraft.client.renderer.entity.RenderBiped;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.util.ResourceLocation;
public class RenderSiegeZombie extends RenderBiped {
public RenderSiegeZombie() {
super(new ModelSiegeZombie(0.0F), 0.5F, 1.0F);
}
@Override
protected ResourceLocation getEntityTexture(EntityLiving entity) {
return this.getEntityTexture((EntitySiegeZombie) entity);
}
@Override
protected ResourceLocation getEntityTexture(Entity entity) {
return this.getEntityTexture((EntitySiegeZombie) entity);
}
protected ResourceLocation getEntityTexture(EntitySiegeZombie entity) {
SiegeTier tier = entity.getTier();
return new ResourceLocation(RefStrings.MODID + ":textures/entity/siege_" + tier.name + ".png");
}
@Override
protected void func_82421_b() {
this.field_82423_g = new ModelSiegeZombie(1.0F); //armor slots 1, 2, 4
this.field_82425_h = new ModelSiegeZombie(0.5F); //armor slot 3
}
}

View File

@ -0,0 +1,39 @@
package com.hbm.render.entity.mob;
import com.hbm.entity.mob.EntityUndeadSoldier;
import com.hbm.render.model.ModelSkeletonNT;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.model.ModelZombie;
import net.minecraft.client.renderer.entity.RenderBiped;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.util.ResourceLocation;
public class RenderUndeadSoldier extends RenderBiped {
public static ResourceLocation textureZombie = new ResourceLocation("textures/entity/zombie/zombie.png");
public static ResourceLocation textureSkeleton = new ResourceLocation("textures/entity/skeleton/skeleton.png");
public static ModelBiped modelZombie = new ModelZombie();
public static ModelBiped modelSkeleton = new ModelSkeletonNT();
public RenderUndeadSoldier() {
super(modelZombie, 0.5F);
}
@Override
protected void preRenderCallback(EntityLivingBase living, float interp) {
byte type = living.getDataWatcher().getWatchableObjectByte(EntityUndeadSoldier.DW_TYPE);
if(type == EntityUndeadSoldier.TYPE_ZOMBIE) this.mainModel = this.modelBipedMain = modelZombie;
if(type == EntityUndeadSoldier.TYPE_SKELETON) this.mainModel = this.modelBipedMain = modelSkeleton;
}
@Override
protected ResourceLocation getEntityTexture(EntityLiving living) {
byte type = living.getDataWatcher().getWatchableObjectByte(EntityUndeadSoldier.DW_TYPE);
if(type == EntityUndeadSoldier.TYPE_ZOMBIE) return textureZombie;
if(type == EntityUndeadSoldier.TYPE_SKELETON) return textureSkeleton;
return null;
}
}

View File

@ -187,7 +187,7 @@ public class ItemRenderMAS36 extends ItemRenderWeaponBase {
ResourceManager.mas36.renderPart("Stock");
ResourceManager.mas36.renderPart("Bolt");
if(isScoped(stack)) ResourceManager.mas36.renderPart("Scope");
GL11.glTranslated(0, -1, -6);
if(type != ItemRenderType.EQUIPPED) GL11.glTranslated(0, -1, -6);
if(hasBayonet(stack)) ResourceManager.mas36.renderPart("Bayonet");
GL11.glShadeModel(GL11.GL_FLAT);
}

View File

@ -5,6 +5,7 @@ import com.hbm.render.loader.ModelRendererObj;
import net.minecraft.client.Minecraft;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.renderer.entity.RenderBiped;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.client.renderer.entity.RenderPlayer;
import net.minecraft.entity.Entity;
@ -174,6 +175,13 @@ public class ModelArmorBase extends ModelBiped {
leftArm.copyRotationFrom(render.modelBipedMain.bipedLeftArm);
rightArm.copyRotationFrom(render.modelBipedMain.bipedRightArm);
}
} else {
Object o = RenderManager.instance.entityRenderMap.get(entity.getClass());
if(o instanceof RenderBiped) {
RenderBiped render = (RenderBiped) o;
leftArm.copyRotationFrom(render.modelBipedMain.bipedLeftArm);
rightArm.copyRotationFrom(render.modelBipedMain.bipedRightArm);
}
}
}

View File

@ -0,0 +1,60 @@
package com.hbm.render.model;
import org.lwjgl.opengl.GL11;
import com.hbm.main.ResourceManager;
import com.hbm.render.loader.ModelRendererObj;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.Entity;
public class ModelArmorTaurun extends ModelArmorBase {
public ModelArmorTaurun(int type) {
super(type);
head = new ModelRendererObj(ResourceManager.armor_taurun, "Helmet");
body = new ModelRendererObj(ResourceManager.armor_taurun, "Chest");
leftArm = new ModelRendererObj(ResourceManager.armor_taurun, "LeftArm").setRotationPoint(-5.0F, 2.0F, 0.0F);
rightArm = new ModelRendererObj(ResourceManager.armor_taurun, "RightArm").setRotationPoint(5.0F, 2.0F, 0.0F);
leftLeg = new ModelRendererObj(ResourceManager.armor_taurun, "LeftLeg").setRotationPoint(1.9F, 12.0F, 0.0F);
rightLeg = new ModelRendererObj(ResourceManager.armor_taurun, "RightLeg").setRotationPoint(-1.9F, 12.0F, 0.0F);
leftFoot = new ModelRendererObj(ResourceManager.armor_taurun, "LeftBoot").setRotationPoint(1.9F, 12.0F, 0.0F);
rightFoot = new ModelRendererObj(ResourceManager.armor_taurun, "RightBoot").setRotationPoint(-1.9F, 12.0F, 0.0F);
}
@Override
public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) {
setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity);
GL11.glPushMatrix();
if(type == 0) {
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.taurun_helmet);
head.render(par7);
}
if(type == 1) {
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.taurun_chest);
body.render(par7);
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.taurun_arm);
leftArm.render(par7);
rightArm.render(par7);
}
if(type == 2) {
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.taurun_leg);
GL11.glTranslated(-0.01, 0, 0);
leftLeg.render(par7);
GL11.glTranslated(0.02, 0, 0);
rightLeg.render(par7);
}
if(type == 3) {
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.taurun_leg);
GL11.glTranslated(-0.01, 0, 0);
leftFoot.render(par7);
GL11.glTranslated(0.02, 0, 0);
rightFoot.render(par7);
}
GL11.glPopMatrix();
}
}

View File

@ -62,12 +62,16 @@ public class ModelArmorTrenchmaster extends ModelArmorBase {
}
if(type == 2) {
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.trenchmaster_leg);
GL11.glTranslated(-0.01, 0, 0);
leftLeg.render(par7);
GL11.glTranslated(0.02, 0, 0);
rightLeg.render(par7);
}
if(type == 3) {
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.trenchmaster_leg);
GL11.glTranslated(-0.01, 0, 0);
leftFoot.render(par7);
GL11.glTranslated(0.02, 0, 0);
rightFoot.render(par7);
}

View File

@ -1,35 +0,0 @@
package com.hbm.render.model;
import com.hbm.entity.mob.siege.EntitySiegeZombie;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.entity.Entity;
import net.minecraft.util.MathHelper;
public class ModelSiegeZombie extends ModelBiped {
public ModelSiegeZombie(float p_i1168_1_) {
super(p_i1168_1_, 0.0F, 64, 32);
}
public void setRotationAngles(float p_78087_1_, float p_78087_2_, float p_78087_3_, float p_78087_4_, float p_78087_5_, float p_78087_6_, Entity entity) {
super.setRotationAngles(p_78087_1_, p_78087_2_, p_78087_3_, p_78087_4_, p_78087_5_, p_78087_6_, entity);
if(entity instanceof EntitySiegeZombie && ((EntitySiegeZombie)entity).getDataWatcher().getWatchableObjectByte(13) != 0) {
float f6 = MathHelper.sin(this.onGround * (float) Math.PI);
float f7 = MathHelper.sin((1.0F - (1.0F - this.onGround) * (1.0F - this.onGround)) * (float) Math.PI);
this.bipedRightArm.rotateAngleZ = 0.0F;
this.bipedLeftArm.rotateAngleZ = 0.0F;
this.bipedRightArm.rotateAngleY = -(0.1F - f6 * 0.6F);
this.bipedLeftArm.rotateAngleY = 0.1F - f6 * 0.6F;
this.bipedRightArm.rotateAngleX = -((float) Math.PI / 2F);
this.bipedLeftArm.rotateAngleX = -((float) Math.PI / 2F);
this.bipedRightArm.rotateAngleX -= f6 * 1.2F - f7 * 0.4F;
this.bipedLeftArm.rotateAngleX -= f6 * 1.2F - f7 * 0.4F;
this.bipedRightArm.rotateAngleZ += MathHelper.cos(p_78087_3_ * 0.09F) * 0.05F + 0.05F;
this.bipedLeftArm.rotateAngleZ -= MathHelper.cos(p_78087_3_ * 0.09F) * 0.05F + 0.05F;
this.bipedRightArm.rotateAngleX += MathHelper.sin(p_78087_3_ * 0.067F) * 0.05F;
this.bipedLeftArm.rotateAngleX -= MathHelper.sin(p_78087_3_ * 0.067F) * 0.05F;
}
}
}

View File

@ -0,0 +1,29 @@
package com.hbm.render.model;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.client.model.ModelZombie;
public class ModelSkeletonNT extends ModelZombie {
public ModelSkeletonNT() {
this(0.0F);
}
public ModelSkeletonNT(float scale) {
super(scale, 0.0F, 64, 32);
this.bipedRightArm = new ModelRenderer(this, 40, 16);
this.bipedRightArm.addBox(-1.0F, -2.0F, -1.0F, 2, 12, 2, scale);
this.bipedRightArm.setRotationPoint(-5.0F, 2.0F, 0.0F);
this.bipedLeftArm = new ModelRenderer(this, 40, 16);
this.bipedLeftArm.mirror = true;
this.bipedLeftArm.addBox(-1.0F, -2.0F, -1.0F, 2, 12, 2, scale);
this.bipedLeftArm.setRotationPoint(5.0F, 2.0F, 0.0F);
this.bipedRightLeg = new ModelRenderer(this, 0, 16);
this.bipedRightLeg.addBox(-1.0F, 0.0F, -1.0F, 2, 12, 2, scale);
this.bipedRightLeg.setRotationPoint(-2.0F, 12.0F, 0.0F);
this.bipedLeftLeg = new ModelRenderer(this, 0, 16);
this.bipedLeftLeg.mirror = true;
this.bipedLeftLeg.addBox(-1.0F, 0.0F, -1.0F, 2, 12, 2, scale);
this.bipedLeftLeg.setRotationPoint(2.0F, 12.0F, 0.0F);
}
}

View File

@ -37,10 +37,6 @@ public class RenderPedestalTile extends TileEntitySpecialRenderer {
if(!(stack.getItemSpriteNumber() == 0 && stack.getItem() instanceof ItemBlock && RenderBlocks.renderItemIn3d(Block.getBlockFromItem(stack.getItem()).getRenderType()))) {
GL11.glTranslated(0, 0.125, 0);
GL11.glRotatef(player.prevRotationYaw + (player.rotationYaw - player.prevRotationYaw) * interp + 180, 0.0F, -1.0F, 0.0F);
if(!RenderManager.instance.options.fancyGraphics) {
GL11.glRotatef(180F, 0.0F, 1.0F, 0.0F);
}
GL11.glTranslated(0, Math.sin((player.ticksExisted + interp) * 0.1) * 0.0625, 0);
} else {

View File

@ -0,0 +1,72 @@
package com.hbm.render.tileentity;
import org.lwjgl.opengl.GL11;
import com.hbm.blocks.generic.BlockSkeletonHolder.TileEntitySkeletonHolder;
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
import com.hbm.main.ResourceManager;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.client.renderer.entity.RenderItem;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
public class RenderSkeletonHolder extends TileEntitySpecialRenderer {
@Override
public void renderTileEntityAt(TileEntity te, double x, double y, double z, float interp) {
GL11.glPushMatrix();
GL11.glTranslated(x + 0.5, y, z + 0.5);
switch(te.getBlockMetadata()) {
case 2: GL11.glRotatef(180, 0F, 1F, 0F); break;
case 4: GL11.glRotatef(270, 0F, 1F, 0F); break;
case 3: GL11.glRotatef(0, 0F, 1F, 0F); break;
case 5: GL11.glRotatef(90, 0F, 1F, 0F); break;
}
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glEnable(GL11.GL_CULL_FACE);
RenderHelper.enableStandardItemLighting();
bindTexture(ResourceManager.skeleton_holder_tex);
ResourceManager.skeleton_holder.renderPart("Holder1");
TileEntitySkeletonHolder pedestal = (TileEntitySkeletonHolder) te;
if(pedestal.item != null) {
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
ItemStack stack = pedestal.item.copy();
GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
if(stack.getItem() instanceof ItemGunBaseNT) {
GL11.glRotatef(-90F, 0.0F, 1.0F, 0.0F);
}
if(!(stack.getItemSpriteNumber() == 0 && stack.getItem() instanceof ItemBlock && RenderBlocks.renderItemIn3d(Block.getBlockFromItem(stack.getItem()).getRenderType()))) {
GL11.glScaled(1.5, 1.5, 1.5);
}
GL11.glTranslated(0, 0.125, 0);
EntityItem dummy = new EntityItem(te.getWorldObj(), 0, 0, 0, stack);
dummy.hoverStart = 0.0F;
RenderItem.renderInFrame = true;
RenderManager.instance.renderEntityWithPosYaw(dummy, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F);
RenderItem.renderInFrame = false;
}
GL11.glPopMatrix();
}
}

View File

@ -14,6 +14,7 @@ import com.hbm.blocks.generic.BlockGlyphidSpawner.TileEntityGlpyhidSpawner;
import com.hbm.blocks.generic.BlockLoot.TileEntityLoot;
import com.hbm.blocks.generic.BlockPedestal.TileEntityPedestal;
import com.hbm.blocks.generic.BlockPlushie.TileEntityPlushie;
import com.hbm.blocks.generic.BlockSkeletonHolder.TileEntitySkeletonHolder;
import com.hbm.blocks.generic.BlockSnowglobe.TileEntitySnowglobe;
import com.hbm.blocks.generic.BlockSupplyCrate.TileEntitySupplyCrate;
import com.hbm.blocks.generic.BlockWandJigsaw.TileEntityWandJigsaw;
@ -212,6 +213,7 @@ public class TileMappings {
put(TileEntityLoot.class, "tileentity_ntm_loot");
put(TileEntityPedestal.class, "tileentity_ntm_pedestal");
put(TileEntitySkeletonHolder.class, "tileentity_ntm_skeleton");
put(TileEntityBobble.class, "tileentity_ntm_bobblehead");
put(TileEntitySnowglobe.class, "tileentity_ntm_snowglobe");
put(TileEntityPlushie.class, "tileentity_ntm_plushie");

View File

@ -151,6 +151,12 @@ public class DamageResistanceHandler {
registerSet(ModItems.dns_helmet, ModItems.dns_plate, ModItems.dns_legs, ModItems.dns_boots, new ResistanceStats()
.addCategory(CATEGORY_EXPLOSION, 100F, 0.99F)
.setOther(100F, 1F));
registerSet(ModItems.taurun_helmet, ModItems.taurun_plate, ModItems.taurun_legs, ModItems.taurun_boots, new ResistanceStats()
.addCategory(CATEGORY_PROJECTILE, 2F, 0.15F)
.addCategory(CATEGORY_FIRE, 1F, 0.25F)
.addCategory(CATEGORY_EXPLOSION, 0F, 0.25F)
.addExact(DamageSource.fall.damageType, 4F, 0.5F)
.setOther(2F, 0.1F));
registerSet(ModItems.trenchmaster_helmet, ModItems.trenchmaster_plate, ModItems.trenchmaster_legs, ModItems.trenchmaster_boots, new ResistanceStats()
.addCategory(CATEGORY_PROJECTILE, 5F, 0.5F)
.addCategory(CATEGORY_FIRE, 5F, 0.5F)

View File

@ -12,40 +12,40 @@ import net.minecraft.world.World;
public class DepthDeposit {
public static void generateConditionOverworld(World world, int x, int yMin, int yDev, int z, int size, double fill, Block block, Random rand, int chance) {
if(rand.nextInt(chance) == 0)
generate(world, x + rand.nextInt(16), yMin + rand.nextInt(yDev), z + rand.nextInt(16), size, fill, block, rand, Blocks.stone, ModBlocks.stone_depth);
generate(world, x + rand.nextInt(16) + 8, yMin + rand.nextInt(yDev), z + rand.nextInt(16) + 8, size, fill, block, rand, Blocks.stone, ModBlocks.stone_depth);
}
public static void generateConditionNether(World world, int x, int yMin, int yDev, int z, int size, double fill, Block block, Random rand, int chance) {
if(rand.nextInt(chance) == 0)
generate(world, x + rand.nextInt(16), yMin + rand.nextInt(yDev), z + rand.nextInt(16), size, fill, block, rand, Blocks.netherrack, ModBlocks.stone_depth_nether);
generate(world, x + rand.nextInt(16) + 8, yMin + rand.nextInt(yDev), z + rand.nextInt(16) + 8, size, fill, block, rand, Blocks.netherrack, ModBlocks.stone_depth_nether);
}
public static void generateCondition(World world, int x, int yMin, int yDev, int z, int size, double fill, Block block, Random rand, int chance, Block genTarget, Block filler) {
if(rand.nextInt(chance) == 0)
generate(world, x + rand.nextInt(16), yMin + rand.nextInt(yDev), z + rand.nextInt(16), size, fill, block, rand, genTarget, filler);
generate(world, x + rand.nextInt(16) + 8, yMin + rand.nextInt(yDev), z + rand.nextInt(16) + 8, size, fill, block, rand, genTarget, filler);
}
public static void generate(World world, int x, int y, int z, int size, double fill, Block block, Random rand, Block genTarget, Block filler) {
for(int i = x - size; i <= x + size; i++) {
for(int j = y - size; j <= y + size; j++) {
for(int k = z - size; k <= z + size; k++) {
if(j < 1 || j > 126)
continue;
double len = Vec3.createVectorHelper(x - i, y - j, z - k).lengthVector();
Block target = world.getBlock(i, j, k);
if(target.isReplaceableOreGen(world, i, j, k, genTarget) || target.isReplaceableOreGen(world, i, j, k, Blocks.bedrock)) { //yes you've heard right, bedrock
if(len + rand.nextInt(2) < size * fill) {
world.setBlock(i, j, k, block);
} else if(len + rand.nextInt(2) <= size) {
world.setBlock(i, j, k, filler);
}

View File

@ -16,6 +16,7 @@ import com.hbm.handler.ThreeInts;
import com.hbm.main.MainRegistry;
import com.hbm.util.Tuple.Pair;
import com.hbm.util.Tuple.Quartet;
import com.hbm.util.fauxpointtwelve.BlockPos;
import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraft.block.*;
@ -94,7 +95,7 @@ public class NBTStructure {
}
}
public static void registerStructure(SpawnCondition spawn, int... dimensionIds) {
public static void registerStructure(SpawnCondition spawn, int[] dimensionIds) {
for(int dimensionId : dimensionIds) {
registerStructure(dimensionId, spawn);
}
@ -265,6 +266,10 @@ public class NBTStructure {
}
palette[i] = new BlockDefinition(blockName, meta);
if(StructureConfig.debugStructures && palette[i].block == Blocks.air) {
palette[i] = new BlockDefinition(ModBlocks.wand_air, meta);
}
}
@ -349,7 +354,7 @@ public class NBTStructure {
if(connections.size() > 0) {
fromConnections = new ArrayList<>();
connections.sort((a, b) -> a.selectionPriority - b.selectionPriority); // sort by descending priority, highest first
connections.sort((a, b) -> b.selectionPriority - a.selectionPriority); // sort by descending priority, highest first
// Sort out our from connections, splitting into individual lists for each priority level
List<JigsawConnection> innerList = null;
@ -439,7 +444,7 @@ public class NBTStructure {
int ry = by + y;
Block block = transformBlock(state.definition, null, world.rand);
int meta = coordBaseMode != 0 ? transformMeta(state.definition, coordBaseMode) : state.definition.meta;
int meta = transformMeta(state.definition, null, coordBaseMode);
world.setBlock(rx, ry, rz, block, meta, 2);
@ -496,7 +501,7 @@ public class NBTStructure {
int ry = by + oy;
Block block = transformBlock(state.definition, piece.blockTable, world.rand);
int meta = coordBaseMode != 0 ? transformMeta(state.definition, coordBaseMode) : state.definition.meta;
int meta = transformMeta(state.definition, piece.blockTable, coordBaseMode);
world.setBlock(rx, ry, rz, block, meta, 2);
@ -552,10 +557,16 @@ public class NBTStructure {
return definition.block;
}
private int transformMeta(BlockDefinition definition, int coordBaseMode) {
private int transformMeta(BlockDefinition definition, Map<Block, BlockSelector> blockTable, int coordBaseMode) {
if(blockTable != null && blockTable.containsKey(definition.block)) {
return blockTable.get(definition.block).getSelectedBlockMetaData();
}
// Our shit
if(definition.block instanceof INBTTransformable) return ((INBTTransformable) definition.block).transformMeta(definition.meta, coordBaseMode);
if(coordBaseMode == 0) return definition.meta;
// Vanilla shit
if(definition.block instanceof BlockStairs) return INBTTransformable.transformMetaStairs(definition.meta, coordBaseMode);
if(definition.block instanceof BlockRotatedPillar) return INBTTransformable.transformMetaPillar(definition.meta, coordBaseMode);
@ -566,6 +577,7 @@ public class NBTStructure {
if(definition.block instanceof BlockLever) return INBTTransformable.transformMetaLever(definition.meta, coordBaseMode);
if(definition.block instanceof BlockSign) return INBTTransformable.transformMetaDeco(definition.meta, coordBaseMode);
if(definition.block instanceof BlockLadder) return INBTTransformable.transformMetaDeco(definition.meta, coordBaseMode);
if(definition.block instanceof BlockTripWireHook) return INBTTransformable.transformMetaDirectional(definition.meta, coordBaseMode);
return definition.meta;
}
@ -630,6 +642,11 @@ public class NBTStructure {
this.meta = meta;
}
BlockDefinition(Block block, int meta) {
this.block = block;
this.meta = meta;
}
}
public static class SpawnCondition {
@ -670,6 +687,31 @@ public class NBTStructure {
return pools.get(name).clone();
}
// Builds all of the pools into neat rows and columns, for editing and debugging!
// Make sure structure debug is enabled, or it will no-op
// Do not use in generation
public void buildAll(World world, int x, int y, int z) {
if(!StructureConfig.debugStructures) return;
int padding = 5;
int oz = 0;
for(JigsawPool pool : pools.values()) {
int highestWidth = 0;
int ox = 0;
for(Pair<JigsawPiece, Integer> entry : pool.pieces) {
NBTStructure structure = entry.key.structure;
structure.build(world, x + ox + (structure.size.x / 2), y, z + oz + (structure.size.z / 2));
ox += structure.size.x + padding;
highestWidth = Math.max(highestWidth, structure.size.z);
}
oz += highestWidth + padding;
}
}
}
// A set of pieces with weights
@ -790,7 +832,7 @@ public class NBTStructure {
boolean heightUpdated = false;
int priority; // placement priority not yet implemented because selection priority is far more useful whatever
int priority;
// this is fucking hacky but we need a way to update ALL component bounds once a Y-level is determined
private Start parent;
@ -941,6 +983,17 @@ public class NBTStructure {
return false;
}
protected boolean isInsideIgnoringSelf(LinkedList<StructureComponent> components, int x, int y, int z) {
for(StructureComponent component : components) {
if(component == this) continue;
if(component.getBoundingBox() == null) continue;
if(component.getBoundingBox().isVecInside(x, y, z)) return true;
}
return false;
}
}
public static class Start extends StructureStart {
@ -966,7 +1019,15 @@ public class NBTStructure {
// Iterate through and build out all the components we intend to spawn
while(!queuedComponents.isEmpty()) {
final int i = rand.nextInt(queuedComponents.size());
queuedComponents.sort((a, b) -> b.priority - a.priority); // sort by placement priority descending
int matchPriority = queuedComponents.get(0).priority;
int max = 1;
while(max < queuedComponents.size()) {
if(queuedComponents.get(max).priority != matchPriority) break;
max++;
}
final int i = rand.nextInt(max);
Component fromComponent = queuedComponents.remove(i);
if(fromComponent.piece.structure.fromConnections == null) continue;
@ -1008,9 +1069,14 @@ public class NBTStructure {
queuedComponents.add(nextComponent);
} else {
// If we failed to fit anything in, grab something from the fallback pool, ignoring bounds check
// unless we are perfectly abutting another piece, so grid layouts can work!
if(nextPool.fallback != null) {
nextComponent = buildNextComponent(rand, spawn, spawn.pools.get(nextPool.fallback), fromComponent, fromConnection);
addComponent(nextComponent, fromConnection.placementPriority); // don't add to queued list, we don't want to try continue from fallback
BlockPos checkPos = getConnectionTargetPosition(fromComponent, fromConnection);
if(!fromComponent.isInsideIgnoringSelf(components, checkPos.getX(), checkPos.getY(), checkPos.getZ())) {
nextComponent = buildNextComponent(rand, spawn, spawn.pools.get(nextPool.fallback), fromComponent, fromConnection);
addComponent(nextComponent, fromConnection.placementPriority); // don't add to queued list, we don't want to try continue from fallback
}
}
}
}
@ -1031,12 +1097,25 @@ public class NBTStructure {
@SuppressWarnings("unchecked")
private void addComponent(Component component, int placementPriority) {
if(component == null) return;
components.add(component);
component.parent = this;
component.priority = placementPriority;
}
private BlockPos getConnectionTargetPosition(Component component, JigsawConnection connection) {
// The direction this component is extending towards in ABSOLUTE direction
ForgeDirection extendDir = component.rotateDir(connection.dir);
// Set the starting point for the next structure to the location of the connector block
int x = component.getXWithOffset(connection.pos.x, connection.pos.z) + extendDir.offsetX;
int y = component.getYWithOffset(connection.pos.y) + extendDir.offsetY;
int z = component.getZWithOffset(connection.pos.x, connection.pos.z) + extendDir.offsetZ;
return new BlockPos(x, y, z);
}
private Component buildNextComponent(Random rand, SpawnCondition spawn, JigsawPool pool, Component fromComponent, JigsawConnection fromConnection) {
JigsawPiece nextPiece = pool.get(rand);
if(nextPiece == null) return null;
@ -1046,23 +1125,17 @@ public class NBTStructure {
JigsawConnection toConnection = connectionPool.get(rand.nextInt(connectionPool.size()));
// The direction this component is extending towards in ABSOLUTE direction
ForgeDirection extendDir = fromComponent.rotateDir(fromConnection.dir);
// Rotate our incoming piece to plug it in
int nextCoordBase = fromComponent.getNextCoordBase(fromConnection, toConnection, rand);
// Set the starting point for the next structure to the location of the connector block
int nextX = fromComponent.getXWithOffset(fromConnection.pos.x, fromConnection.pos.z) + extendDir.offsetX;
int nextY = fromComponent.getYWithOffset(fromConnection.pos.y) + extendDir.offsetY;
int nextZ = fromComponent.getZWithOffset(fromConnection.pos.x, fromConnection.pos.z) + extendDir.offsetZ;
BlockPos pos = getConnectionTargetPosition(fromComponent, fromConnection);
// offset the starting point to the connecting point
nextX -= nextPiece.structure.rotateX(toConnection.pos.x, toConnection.pos.z, nextCoordBase);
nextY -= toConnection.pos.y;
nextZ -= nextPiece.structure.rotateZ(toConnection.pos.x, toConnection.pos.z, nextCoordBase);
int ox = nextPiece.structure.rotateX(toConnection.pos.x, toConnection.pos.z, nextCoordBase);
int oy = toConnection.pos.y;
int oz = nextPiece.structure.rotateZ(toConnection.pos.x, toConnection.pos.z, nextCoordBase);
return new Component(spawn, nextPiece, rand, nextX, nextY, nextZ, nextCoordBase).connectedFrom(toConnection);
return new Component(spawn, nextPiece, rand, pos.getX() - ox, pos.getY() - oy, pos.getZ() - oz, nextCoordBase).connectedFrom(toConnection);
}
private List<JigsawConnection> getConnectionPool(JigsawPiece nextPiece, JigsawConnection fromConnection) {

View File

@ -2447,6 +2447,7 @@ item.insert_polonium.name=Poloniumeinlage
item.insert_steel.name=Schwere Stahleinlage
item.insert_xsapi.name=XSAPI-Einlage
item.insert_yharonite.name=Yharoniteinlage
item.item_secret.aberrator.name=Aberrator-Teil
item.item_secret.canister.name=Komposit SB-26
item.item_secret.controller.name=Proprietäre Steuereinheit
item.item_secret.selenium_steel.name=Selen-Stahl
@ -4889,6 +4890,7 @@ tile.sellafield_slaked.name=Gelöschtes Sellafit
tile.semtex.name=Semtex
tile.silo_hatch.name=Siloluke
tile.silo_hatch_large.name=Große Siloluke
tile.skeleton_holder.name=Oh, ich glaub' der ist tot
tile.sliding_blast_door.name=Sprengtür
tile.solar_mirror.name=Heliostatspiegel
tile.soyuz_capsule.name=Landekapsel

View File

@ -3270,6 +3270,7 @@ item.insert_polonium.name=Polonium Insert
item.insert_steel.name=Heavy Steel Insert
item.insert_xsapi.name=XSAPI Insert
item.insert_yharonite.name=Yharonite Insert
item.item_secret.aberrator.name=Aberrator Part
item.item_secret.canister.name=Composition SB-26
item.item_secret.controller.name=Proprietary Control Unit
item.item_secret.selenium_steel.name=Selenium Steel
@ -6036,6 +6037,7 @@ tile.sellafield_slaked.name=Slaked Sellafite
tile.semtex.name=Semtex
tile.silo_hatch.name=Silo Hatch
tile.silo_hatch_large.name=Large Silo Hatch
tile.skeleton_holder.name=Oh, that's a dead guy
tile.sliding_blast_door.name=Sliding Blast Door
tile.solar_mirror.name=Heliostat Mirror
tile.soyuz_capsule.name=Cargo Landing Capsule

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,330 @@
# Blender v2.79 (sub 0) OBJ File: 'skeleton_holder.blend'
# www.blender.org
o Holder1
v -0.007506 0.185094 0.287769
v -0.369728 0.834613 0.384826
v -0.039858 0.185094 0.167028
v -0.402080 0.834613 0.264085
v 0.097059 0.247594 0.259751
v -0.265163 0.897113 0.356808
v 0.064706 0.247594 0.139010
v -0.297516 0.897113 0.236067
v 0.365620 0.000000 -0.258745
v -0.358824 0.000000 -0.064630
v 0.333268 0.000000 -0.379485
v -0.391176 0.000000 -0.185371
v 0.365620 0.125000 -0.258745
v -0.358824 0.125000 -0.064630
v 0.333268 0.125000 -0.379485
v -0.391176 0.125000 -0.185371
v -0.491581 1.016218 0.267475
v -0.205884 1.425794 0.242480
v -0.535159 1.016218 -0.230622
v -0.249462 1.425794 -0.255617
v -0.083563 0.729430 0.231779
v 0.202134 1.139006 0.206783
v -0.127141 0.729430 -0.266319
v 0.158556 1.139006 -0.291314
v -0.491581 1.016218 0.267475
v -0.205884 1.425794 0.242480
v -0.535159 1.016218 -0.230622
v -0.249462 1.425794 -0.255617
v -0.083563 0.729430 0.231779
v 0.202134 1.139006 0.206783
v -0.127141 0.729430 -0.266319
v 0.158556 1.139006 -0.291314
v -0.250476 0.114105 0.250000
v -0.185109 0.861251 0.250000
v -0.250476 0.114105 -0.250000
v -0.185109 0.861251 -0.250000
v -0.499524 0.135894 0.250000
v -0.434158 0.883040 0.250000
v -0.499524 0.135894 -0.250000
v -0.434158 0.883040 -0.250000
v -0.250476 0.114105 0.250000
v -0.185109 0.861251 0.250000
v -0.250476 0.114105 -0.250000
v -0.185109 0.861251 -0.250000
v -0.499524 0.135894 0.250000
v -0.434158 0.883040 0.250000
v -0.499524 0.135894 -0.250000
v -0.434158 0.883040 -0.250000
v 0.333268 -0.000000 0.379485
v -0.391176 0.000000 0.185371
v 0.365620 -0.000000 0.258745
v -0.358824 0.000000 0.064630
v 0.333268 0.125000 0.379485
v -0.391176 0.125000 0.185371
v 0.365620 0.125000 0.258745
v -0.358824 0.125000 0.064630
v -0.039858 0.185094 -0.167028
v -0.402080 0.834613 -0.264085
v -0.007506 0.185094 -0.287769
v -0.369728 0.834613 -0.384826
v 0.064706 0.247594 -0.139010
v -0.297516 0.897113 -0.236067
v 0.097059 0.247594 -0.259751
v -0.265163 0.897113 -0.356808
vt 0.125000 0.437500
vt 0.093750 0.062500
vt 0.125000 0.062500
vt 0.093750 0.437500
vt 0.062500 0.062500
vt 0.062500 0.437500
vt 0.031250 0.062500
vt -0.000000 0.437500
vt 0.000000 0.062500
vt 0.062500 0.500000
vt 0.093750 0.437500
vt 0.093750 0.500000
vt 0.062500 0.500000
vt 0.031250 0.437500
vt 0.125000 0.062500
vt 0.093750 0.437500
vt 0.093750 0.062500
vt 0.062500 0.062500
vt 0.062500 0.437500
vt 0.031250 0.062500
vt 0.031250 0.437500
vt 0.000000 0.062500
vt 0.062500 0.437500
vt 0.093750 0.500000
vt 0.062500 0.500000
vt 0.062500 0.500000
vt 0.500000 0.500000
vt 0.375000 0.750000
vt 0.375000 0.500000
vt 0.250000 0.500000
vt 0.250000 0.750000
vt 0.125000 0.500000
vt 0.125000 0.750000
vt -0.000000 0.500000
vt 0.250000 0.750000
vt 0.375000 1.000000
vt 0.250000 1.000000
vt 0.250000 1.000000
vt 0.500000 0.500000
vt 0.375000 0.750000
vt 0.500000 0.750000
vt 0.250000 0.500000
vt 0.375000 0.500000
vt 0.125000 0.500000
vt 0.250000 0.750000
vt -0.000000 0.500000
vt 0.125000 0.750000
vt 0.375000 1.000000
vt 0.250000 0.750000
vt 0.250000 1.000000
vt 0.250000 1.000000
vt 0.312500 0.000000
vt 0.437500 0.375000
vt 0.437500 0.000000
vt 0.500000 0.000000
vt 0.437500 0.375000
vt 0.437500 0.000000
vt 0.625000 0.000000
vt 0.500000 0.375000
vt 0.312500 0.000000
vt 0.250000 0.375000
vt 0.250000 0.000000
vt 0.437500 0.500000
vt 0.562500 0.375000
vt 0.562500 0.500000
vt 0.437500 0.500000
vt 0.312500 0.375000
vt 0.437500 0.375000
vt 0.312500 0.000000
vt 0.437500 0.000000
vt 0.437500 0.375000
vt 0.500000 0.000000
vt 0.437500 0.000000
vt 0.500000 0.375000
vt 0.625000 0.000000
vt 0.250000 0.375000
vt 0.312500 0.000000
vt 0.250000 0.000000
vt 0.562500 0.375000
vt 0.437500 0.500000
vt 0.562500 0.500000
vt 0.437500 0.500000
vt 0.312500 0.375000
vt 0.312500 0.500000
vt 0.125000 0.437500
vt 0.093750 0.062500
vt 0.125000 0.062500
vt 0.093750 0.437500
vt 0.062500 0.062500
vt 0.062500 0.437500
vt 0.031250 0.062500
vt -0.000000 0.437500
vt 0.000000 0.062500
vt 0.062500 0.500000
vt 0.093750 0.437500
vt 0.093750 0.500000
vt 0.062500 0.500000
vt 0.031250 0.437500
vt 0.125000 0.437500
vt 0.093750 0.062500
vt 0.125000 0.062500
vt 0.062500 0.437500
vt 0.062500 0.062500
vt 0.031250 0.062500
vt 0.031250 0.437500
vt 0.000000 0.062500
vt 0.062500 0.500000
vt 0.093750 0.437500
vt 0.093750 0.500000
vt 0.062500 0.500000
vt 0.062500 0.437500
vt 0.031250 0.500000
vt 0.125000 0.437500
vt -0.000000 0.437500
vt 0.093750 0.437500
vt 0.031250 0.500000
vt 0.500000 0.750000
vt -0.000000 0.750000
vt 0.375000 0.750000
vt 0.125000 1.000000
vt -0.000000 0.750000
vt 0.375000 0.750000
vt 0.125000 1.000000
vt 0.312500 0.375000
vt 0.625000 0.375000
vt 0.437500 0.375000
vt 0.312500 0.500000
vt 0.312500 0.375000
vt 0.625000 0.375000
vt 0.437500 0.375000
vt 0.062500 0.437500
vt 0.031250 0.500000
vt 0.093750 0.437500
vt -0.000000 0.437500
vt 0.062500 0.437500
vt 0.031250 0.500000
vn -0.8365 -0.5000 0.2241
vn -0.2588 -0.0000 -0.9659
vn 0.8365 0.5000 -0.2241
vn 0.2588 0.0000 0.9659
vn 0.4830 -0.8660 -0.1294
vn -0.4830 0.8660 0.1294
vn -0.0000 -1.0000 0.0000
vn 0.0000 1.0000 -0.0000
vn 0.9659 0.0000 -0.2588
vn -0.9659 0.0000 0.2588
vn -0.8160 0.5736 0.0714
vn -0.0872 -0.0000 -0.9962
vn 0.8160 -0.5736 -0.0714
vn 0.0872 0.0000 0.9962
vn -0.5714 -0.8192 0.0500
vn 0.5714 0.8192 -0.0500
vn 0.9962 -0.0872 0.0000
vn 0.0000 -0.0000 -1.0000
vn -0.9962 0.0872 0.0000
vn -0.0000 0.0000 1.0000
vn -0.0872 -0.9962 0.0000
vn 0.0872 0.9962 0.0000
vn 0.2588 0.0000 -0.9659
vn -0.2588 0.0000 0.9659
vn 0.9659 0.0000 0.2588
vn -0.9659 0.0000 -0.2588
vn -0.8365 -0.5000 -0.2241
vn 0.8365 0.5000 0.2241
vn 0.4830 -0.8660 0.1294
vn -0.4830 0.8660 -0.1294
s off
f 2/1/1 3/2/1 1/3/1
f 4/4/2 7/5/2 3/2/2
f 8/6/3 5/7/3 7/5/3
f 5/7/4 2/8/4 1/9/4
f 3/10/5 5/11/5 1/12/5
f 4/13/6 6/14/6 8/6/6
f 9/15/7 12/16/7 11/17/7
f 12/16/2 15/18/2 11/17/2
f 16/19/8 13/20/8 15/18/8
f 14/21/4 9/22/4 13/20/4
f 15/23/9 9/24/9 11/25/9
f 12/26/10 14/21/10 16/19/10
f 17/27/11 20/28/11 19/29/11
f 20/28/12 23/30/12 19/29/12
f 24/31/13 21/32/13 23/30/13
f 22/33/14 17/34/14 21/32/14
f 23/35/15 17/36/15 19/37/15
f 20/38/16 22/33/16 24/31/16
f 25/39/13 28/40/13 26/41/13
f 31/42/14 28/40/14 27/43/14
f 29/44/11 32/45/11 31/42/11
f 25/46/12 30/47/12 29/44/12
f 25/48/16 31/49/16 27/50/16
f 30/47/15 28/51/15 32/45/15
f 35/52/17 34/53/17 33/54/17
f 39/55/18 36/56/18 35/57/18
f 37/58/19 40/59/19 39/55/19
f 33/60/20 38/61/20 37/62/20
f 33/63/21 39/64/21 35/65/21
f 40/66/22 34/67/22 36/56/22
f 42/68/19 43/69/19 41/70/19
f 44/71/20 47/72/20 43/73/20
f 48/74/17 45/75/17 47/72/17
f 46/76/18 41/77/18 45/78/18
f 47/79/22 41/80/22 43/81/22
f 48/82/21 42/83/21 46/84/21
f 50/85/7 51/86/7 49/87/7
f 52/88/23 55/89/23 51/86/23
f 56/90/8 53/91/8 55/89/8
f 53/91/24 50/92/24 49/93/24
f 51/94/25 53/95/25 49/96/25
f 52/97/26 54/98/26 56/90/26
f 58/99/27 59/100/27 57/101/27
f 59/100/23 64/102/23 63/103/23
f 64/102/28 61/104/28 63/103/28
f 62/105/24 57/106/24 61/104/24
f 59/107/29 61/108/29 57/109/29
f 60/110/30 62/105/30 64/102/30
f 2/1/1 4/4/1 3/2/1
f 4/4/2 8/6/2 7/5/2
f 8/6/3 6/14/3 5/7/3
f 5/7/4 6/14/4 2/8/4
f 3/10/5 7/111/5 5/11/5
f 4/13/6 2/112/6 6/14/6
f 9/15/7 10/113/7 12/16/7
f 12/16/2 16/19/2 15/18/2
f 16/19/8 14/21/8 13/20/8
f 14/21/4 10/114/4 9/22/4
f 15/23/9 13/115/9 9/24/9
f 12/26/10 10/116/10 14/21/10
f 17/27/11 18/117/11 20/28/11
f 20/28/12 24/31/12 23/30/12
f 24/31/13 22/33/13 21/32/13
f 22/33/14 18/118/14 17/34/14
f 23/35/15 21/119/15 17/36/15
f 20/38/16 18/120/16 22/33/16
f 25/39/13 27/43/13 28/40/13
f 31/42/14 32/45/14 28/40/14
f 29/44/11 30/47/11 32/45/11
f 25/46/12 26/121/12 30/47/12
f 25/48/16 29/122/16 31/49/16
f 30/47/15 26/123/15 28/51/15
f 35/52/17 36/124/17 34/53/17
f 39/55/18 40/59/18 36/56/18
f 37/58/19 38/125/19 40/59/19
f 33/60/20 34/67/20 38/61/20
f 33/63/21 37/126/21 39/64/21
f 40/66/22 38/127/22 34/67/22
f 42/68/19 44/128/19 43/69/19
f 44/71/20 48/74/20 47/72/20
f 48/74/17 46/129/17 45/75/17
f 46/76/18 42/83/18 41/77/18
f 47/79/22 45/130/22 41/80/22
f 48/82/21 44/71/21 42/83/21
f 50/85/7 52/88/7 51/86/7
f 52/88/23 56/90/23 55/89/23
f 56/90/8 54/98/8 53/91/8
f 53/91/24 54/98/24 50/92/24
f 51/94/25 55/131/25 53/95/25
f 52/97/26 50/132/26 54/98/26
f 58/99/27 60/133/27 59/100/27
f 59/100/23 60/133/23 64/102/23
f 64/102/28 62/105/28 61/104/28
f 62/105/24 58/134/24 57/106/24
f 59/107/29 63/135/29 61/108/29
f 60/110/30 58/136/30 62/105/30

Binary file not shown.

After

Width:  |  Height:  |  Size: 731 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 957 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 714 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 492 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 540 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 906 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 925 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 912 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 926 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 910 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 886 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 925 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 890 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 920 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 512 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 488 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 477 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 481 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 413 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 471 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 449 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 482 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 468 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 443 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 451 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 441 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 439 B

Some files were not shown because too many files have changed in this diff Show More