mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
some more meltdown stuff
This commit is contained in:
parent
e81b466b26
commit
f9762916fd
@ -340,6 +340,8 @@ public class ModBlocks {
|
||||
public static Block glass_uranium;
|
||||
public static Block glass_trinitite;
|
||||
public static Block glass_polonium;
|
||||
|
||||
public static Block ash_digamma;
|
||||
|
||||
public static Block mush;
|
||||
public static Block mush_block;
|
||||
@ -704,6 +706,7 @@ public class ModBlocks {
|
||||
public static final int guiID_fwatz_multiblock = 33;
|
||||
|
||||
public static Block balefire;
|
||||
public static Block fire_digamma;
|
||||
|
||||
public static Block ams_base;
|
||||
public static final int guiID_ams_base = 54;
|
||||
@ -936,6 +939,7 @@ public class ModBlocks {
|
||||
public static Block pribris;
|
||||
public static Block pribris_burning;
|
||||
public static Block pribris_radiating;
|
||||
public static Block pribris_digamma;
|
||||
|
||||
public static Block book_guide;
|
||||
|
||||
@ -1362,6 +1366,7 @@ public class ModBlocks {
|
||||
|
||||
fence_metal = new BlockMetalFence(Material.iron).setBlockName("fence_metal").setCreativeTab(MainRegistry.machineTab).setHardness(15.0F).setResistance(0.25F).setBlockTextureName(RefStrings.MODID + ":fence_metal");
|
||||
|
||||
ash_digamma = new BlockFalling(Material.sand).setBlockName("ash_digamma").setStepSound(Block.soundTypeSand).setCreativeTab(MainRegistry.machineTab).setHardness(0.5F).setResistance(150.0F).setBlockTextureName(RefStrings.MODID + ":ash_digamma");
|
||||
sand_boron = new BlockFalling(Material.sand).setBlockName("sand_boron").setStepSound(Block.soundTypeSand).setCreativeTab(MainRegistry.machineTab).setHardness(0.5F).setBlockTextureName(RefStrings.MODID + ":sand_boron");
|
||||
sand_lead = new BlockFalling(Material.sand).setBlockName("sand_lead").setStepSound(Block.soundTypeSand).setCreativeTab(MainRegistry.machineTab).setHardness(0.5F).setBlockTextureName(RefStrings.MODID + ":sand_lead");
|
||||
sand_uranium = new BlockFalling(Material.sand).setBlockName("sand_uranium").setStepSound(Block.soundTypeSand).setCreativeTab(MainRegistry.machineTab).setHardness(0.5F).setBlockTextureName(RefStrings.MODID + ":sand_uranium");
|
||||
@ -1641,6 +1646,7 @@ public class ModBlocks {
|
||||
fwatz_plasma = new BlockPlasma(Material.iron).setBlockName("fwatz_plasma").setHardness(5.0F).setResistance(6000.0F).setLightLevel(1.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":fwatz_plasma");
|
||||
|
||||
balefire = new Balefire().setBlockName("balefire").setHardness(0.0F).setLightLevel(1.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":balefire");
|
||||
fire_digamma = new DigammaFlame().setBlockName("fire_digamma").setHardness(0.0F).setResistance(150F).setLightLevel(1.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":fire_digamma");
|
||||
|
||||
ams_base = new BlockAMSBase(Material.iron).setBlockName("ams_base").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":ams_base");
|
||||
ams_emitter = new BlockAMSEmitter(Material.iron).setBlockName("ams_emitter").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":ams_emitter");
|
||||
@ -1729,6 +1735,7 @@ public class ModBlocks {
|
||||
pribris = new RBMKDebris().setBlockName("pribris").setCreativeTab(MainRegistry.machineTab).setHardness(50.0F).setResistance(600.0F).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_debris");
|
||||
pribris_burning = new RBMKDebrisBurning().setBlockName("pribris_burning").setCreativeTab(MainRegistry.machineTab).setHardness(50.0F).setResistance(600.0F).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_debris_burning");
|
||||
pribris_radiating = new RBMKDebrisRadiating().setBlockName("pribris_radiating").setCreativeTab(MainRegistry.machineTab).setHardness(50.0F).setResistance(600.0F).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_debris_radiating");
|
||||
pribris_digamma = new RBMKDebrisDigamma().setBlockName("pribris_digamma").setCreativeTab(MainRegistry.machineTab).setHardness(50.0F).setResistance(600.0F).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_debris_digamma");
|
||||
|
||||
book_guide = new Guide(Material.iron).setBlockName("book_guide").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.nukeTab);
|
||||
|
||||
@ -2352,6 +2359,7 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(fence_metal, fence_metal.getUnlocalizedName());
|
||||
|
||||
//Sands, Glass
|
||||
GameRegistry.registerBlock(ash_digamma, ash_digamma.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(sand_boron, sand_boron.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(sand_lead, sand_lead.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(sand_uranium, sand_uranium.getUnlocalizedName());
|
||||
@ -2474,6 +2482,7 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(pribris, pribris.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(pribris_burning, pribris_burning.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(pribris_radiating, pribris_radiating.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(pribris_digamma, pribris_digamma.getUnlocalizedName());
|
||||
|
||||
GameRegistry.registerBlock(red_cable, red_cable.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(red_wire_coated, red_wire_coated.getUnlocalizedName());
|
||||
@ -2638,6 +2647,7 @@ public class ModBlocks {
|
||||
|
||||
//E
|
||||
GameRegistry.registerBlock(balefire, balefire.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(fire_digamma, fire_digamma.getUnlocalizedName());
|
||||
|
||||
//AMS
|
||||
GameRegistry.registerBlock(ams_base, ams_base.getUnlocalizedName());
|
||||
|
||||
@ -200,11 +200,6 @@ public class Balefire extends BlockFire {
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isFlammable(World p_149817_1_, int p_149817_2_, int p_149817_3_, int p_149817_4_)
|
||||
{
|
||||
return p_149817_1_.getBlock(p_149817_2_, p_149817_3_, p_149817_4_).getMaterial().getCanBurn();
|
||||
}
|
||||
|
||||
public boolean canCatchFire(IBlockAccess world, int x, int y, int z, ForgeDirection face)
|
||||
{
|
||||
return world.getBlock(x, y, z).isFlammable(world, x, y, z, face);
|
||||
|
||||
72
src/main/java/com/hbm/blocks/bomb/DigammaFlame.java
Normal file
72
src/main/java/com/hbm/blocks/bomb/DigammaFlame.java
Normal file
@ -0,0 +1,72 @@
|
||||
package com.hbm.blocks.bomb;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.util.ContaminationUtil;
|
||||
import com.hbm.util.ContaminationUtil.ContaminationType;
|
||||
import com.hbm.util.ContaminationUtil.HazardType;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class DigammaFlame extends Block {
|
||||
|
||||
public DigammaFlame() {
|
||||
super(Material.fire);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEntityCollidedWithBlock(World world, int x, int y, int z, Entity entity) {
|
||||
|
||||
if(entity instanceof EntityLivingBase) {
|
||||
ContaminationUtil.contaminate((EntityLivingBase) entity, HazardType.DIGAMMA, ContaminationType.DIGAMMA, 0.05F);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World p_149668_1_, int p_149668_2_, int p_149668_3_, int p_149668_4_) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCollidable() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlaceBlockAt(World world, int x, int y, int z) {
|
||||
return World.doesBlockHaveSolidTopSurface(world, x, y - 1, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange(World world, int x, int y, int z, Block block) {
|
||||
if(!canPlaceBlockAt(world, x, y, z)) {
|
||||
world.setBlockToAir(x, y, z);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -19,7 +19,7 @@ public class BlockGasRadon extends BlockGasBase {
|
||||
public void onEntityCollidedWithBlock(World world, int p_149670_2_, int p_149670_3_, int p_149670_4_, Entity entity) {
|
||||
|
||||
if(entity instanceof EntityLivingBase) {
|
||||
ContaminationUtil.contaminate((EntityLivingBase)entity, HazardType.RADIATION, ContaminationType.CREATIVE, 0.05F);
|
||||
ContaminationUtil.contaminate((EntityLivingBase)entity, HazardType.RADIATION, ContaminationType.RAD_BYPASS, 0.05F);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -45,7 +45,7 @@ public class BlockGasRadonTomb extends BlockGasBase {
|
||||
public void onEntityCollidedWithBlock(World world, int p_149670_2_, int p_149670_3_, int p_149670_4_, Entity entity) {
|
||||
|
||||
if(entity instanceof EntityLivingBase) {
|
||||
ContaminationUtil.contaminate((EntityLivingBase)entity, HazardType.RADIATION, ContaminationType.CREATIVE, 0.5F);
|
||||
ContaminationUtil.contaminate((EntityLivingBase)entity, HazardType.RADIATION, ContaminationType.RAD_BYPASS, 0.5F);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -0,0 +1,31 @@
|
||||
package com.hbm.blocks.machine.rbmk;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class RBMKDebrisDigamma extends RBMKDebris {
|
||||
|
||||
|
||||
@Override
|
||||
public void updateTick(World world, int x, int y, int z, Random rand) {
|
||||
|
||||
if(!world.isRemote) {
|
||||
|
||||
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
|
||||
Block b = world.getBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ);
|
||||
if((b instanceof RBMKDebris && b != this) || b == ModBlocks.corium_block || b == ModBlocks.block_corium)
|
||||
world.setBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void onBlockAdded(World world, int x, int y, int z) {
|
||||
super.onBlockAdded(world, x, y, z);
|
||||
world.scheduleBlockUpdate(x, y, z, this, 2);
|
||||
}
|
||||
}
|
||||
@ -222,6 +222,29 @@ public class ExplosionNT extends Explosion {
|
||||
}
|
||||
|
||||
block.onBlockExploded(this.worldObj, i, j, k, this);
|
||||
|
||||
if(block.isNormalCube()) {
|
||||
|
||||
if(has(ExAttrib.DIGAMMA)) {
|
||||
this.worldObj.setBlock(i, j, k, ModBlocks.ash_digamma);
|
||||
|
||||
if(this.explosionRNG.nextInt(5) == 0 && this.worldObj.getBlock(i, j + 1, k) == Blocks.air)
|
||||
this.worldObj.setBlock(i, j + 1, k, ModBlocks.fire_digamma);
|
||||
|
||||
} else if(has(ExAttrib.DIGAMMA_CIRCUIT)) {
|
||||
|
||||
if(i % 3 == 0 && k % 3 == 0) {
|
||||
this.worldObj.setBlock(i, j, k, ModBlocks.pribris_digamma);
|
||||
} else if((i % 3 == 0 || k % 3 == 0) && this.explosionRNG.nextBoolean()) {
|
||||
this.worldObj.setBlock(i, j, k, ModBlocks.pribris_digamma);
|
||||
} else {
|
||||
this.worldObj.setBlock(i, j, k, ModBlocks.ash_digamma);
|
||||
|
||||
if(this.explosionRNG.nextInt(5) == 0 && this.worldObj.getBlock(i, j + 1, k) == Blocks.air)
|
||||
this.worldObj.setBlock(i, j + 1, k, ModBlocks.fire_digamma);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -239,7 +262,7 @@ public class ExplosionNT extends Explosion {
|
||||
|
||||
boolean shouldReplace = true;
|
||||
|
||||
if(!has(ExAttrib.ALLMOD))
|
||||
if(!has(ExAttrib.ALLMOD) && !has(ExAttrib.DIGAMMA))
|
||||
shouldReplace = this.explosionRNG.nextInt(3) == 0;
|
||||
|
||||
if(block.getMaterial() == Material.air && block1.func_149730_j() && shouldReplace) {
|
||||
@ -271,6 +294,8 @@ public class ExplosionNT extends Explosion {
|
||||
public static enum ExAttrib {
|
||||
FIRE, //classic vanilla fire explosion
|
||||
BALEFIRE, //same with but with balefire
|
||||
DIGAMMA,
|
||||
DIGAMMA_CIRCUIT,
|
||||
LAVA, //again the same thing but lava
|
||||
ALLMOD, //block placer attributes like fire are applied for all destroyed blocks
|
||||
ALLDROP, //miner TNT!
|
||||
|
||||
@ -48,6 +48,7 @@ public class BulletConfigSyncingUtil {
|
||||
public static int ROCKET_TOXIC = i++;
|
||||
public static int ROCKET_PHOSPHORUS = i++;
|
||||
public static int ROCKET_CANISTER = i++;
|
||||
public static int ROCKET_ERROR = i++;
|
||||
|
||||
public static int GRENADE_NORMAL = i++;
|
||||
public static int GRENADE_HE = i++;
|
||||
@ -276,6 +277,7 @@ public class BulletConfigSyncingUtil {
|
||||
configSet.put(ROCKET_CHAINSAW, GunRocketFactory.getRocketRPCConfig());
|
||||
configSet.put(ROCKET_TOXIC, GunRocketFactory.getRocketChlorineConfig());
|
||||
configSet.put(ROCKET_CANISTER, GunRocketFactory.getRocketCanisterConfig());
|
||||
configSet.put(ROCKET_ERROR, GunRocketFactory.getRocketErrorConfig());
|
||||
|
||||
configSet.put(GRENADE_NORMAL, GunGrenadeFactory.getGrenadeConfig());
|
||||
configSet.put(GRENADE_HE, GunGrenadeFactory.getGrenadeHEConfig());
|
||||
|
||||
@ -3,6 +3,8 @@ package com.hbm.handler.guncfg;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import com.hbm.entity.projectile.EntityBulletBase;
|
||||
import com.hbm.explosion.ExplosionNT;
|
||||
import com.hbm.explosion.ExplosionNT.ExAttrib;
|
||||
import com.hbm.handler.BulletConfigSyncingUtil;
|
||||
import com.hbm.handler.BulletConfiguration;
|
||||
import com.hbm.handler.GunConfiguration;
|
||||
@ -17,6 +19,7 @@ import com.hbm.render.anim.HbmAnimations.AnimType;
|
||||
import com.hbm.render.util.RenderScreenOverlay.Crosshair;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class GunRocketFactory {
|
||||
@ -145,6 +148,7 @@ public class GunRocketFactory {
|
||||
config.config.add(BulletConfigSyncingUtil.ROCKET_CANISTER);
|
||||
config.config.add(BulletConfigSyncingUtil.ROCKET_NUKE);
|
||||
config.config.add(BulletConfigSyncingUtil.ROCKET_CHAINSAW);
|
||||
config.config.add(BulletConfigSyncingUtil.ROCKET_ERROR);
|
||||
config.durability = 500;
|
||||
|
||||
return config;
|
||||
@ -392,4 +396,46 @@ public class GunRocketFactory {
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
public static BulletConfiguration getRocketErrorConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_rocket_digamma;
|
||||
bullet.velocity = 0.5F;
|
||||
bullet.dmgMin = 10;
|
||||
bullet.dmgMax = 15;
|
||||
bullet.wear = 35;
|
||||
bullet.explosive = 0;
|
||||
bullet.incendiary = 0;
|
||||
bullet.trail = 7;
|
||||
|
||||
bullet.bImpact = new IBulletImpactBehavior() {
|
||||
|
||||
@Override
|
||||
public void behaveBlockHit(EntityBulletBase bullet, int x, int y, int z) {
|
||||
|
||||
if(bullet.worldObj.isRemote)
|
||||
return;
|
||||
|
||||
for(int i = 0; i < 250; i++) {
|
||||
|
||||
double ix = bullet.posX + bullet.worldObj.rand.nextGaussian() * 15;
|
||||
double iy = bullet.posY + bullet.worldObj.rand.nextGaussian() * 2;
|
||||
double iz = bullet.posZ + bullet.worldObj.rand.nextGaussian() * 15;
|
||||
|
||||
ExAttrib at = Vec3.createVectorHelper(ix - bullet.posX, 0, iz - bullet.posZ).lengthVector() < 20 ? ExAttrib.DIGAMMA_CIRCUIT : ExAttrib.DIGAMMA;
|
||||
|
||||
new ExplosionNT(bullet.worldObj, bullet, ix, iy, iz, 7.5F)
|
||||
.addAttrib(ExAttrib.NOHURT)
|
||||
.addAttrib(ExAttrib.NOPARTICLE)
|
||||
.addAttrib(ExAttrib.NODROP)
|
||||
.addAttrib(ExAttrib.NOSOUND)
|
||||
.addAttrib(at).explode();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
return bullet;
|
||||
}
|
||||
}
|
||||
|
||||
@ -19,6 +19,10 @@ public class AnvilRecipes {
|
||||
new OreDictStack("ingotSteel"), new OreDictStack("ingotSteel")));
|
||||
}
|
||||
|
||||
public static List<AnvilSmithingRecipe> getSmithing() {
|
||||
return smithingRecipes;
|
||||
}
|
||||
|
||||
public static class AnvilSmithingRecipe {
|
||||
|
||||
int tier;
|
||||
@ -40,15 +44,19 @@ public class AnvilRecipes {
|
||||
}
|
||||
|
||||
public boolean matches(ItemStack left, ItemStack right) {
|
||||
return matchesInt(left, right) != -1;
|
||||
}
|
||||
|
||||
public int matchesInt(ItemStack left, ItemStack right) {
|
||||
|
||||
if(doesStackMatch(left, this.left) && doesStackMatch(right, this.right))
|
||||
return true;
|
||||
return 0;
|
||||
|
||||
if(shapeless) {
|
||||
return doesStackMatch(right, this.left) && doesStackMatch(left, this.right);
|
||||
return doesStackMatch(right, this.left) && doesStackMatch(left, this.right) ? 1 : -1;
|
||||
}
|
||||
|
||||
return false;
|
||||
return -1;
|
||||
}
|
||||
|
||||
public boolean doesStackMatch(ItemStack input, AStack recipe) {
|
||||
@ -58,5 +66,15 @@ public class AnvilRecipes {
|
||||
public ItemStack getOutput(ItemStack left, ItemStack right) {
|
||||
return output.copy();
|
||||
}
|
||||
|
||||
public int amountConsumed(int index, boolean mirrored) {
|
||||
|
||||
if(index == 0)
|
||||
return mirrored ? right.stacksize : left.stacksize;
|
||||
if(index == 1)
|
||||
return mirrored ? left.stacksize : right.stacksize;
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,8 @@
|
||||
package com.hbm.inventory.container;
|
||||
|
||||
import com.hbm.handler.ArmorModHandler;
|
||||
import com.hbm.inventory.AnvilRecipes;
|
||||
import com.hbm.inventory.AnvilRecipes.AnvilSmithingRecipe;
|
||||
import com.hbm.inventory.SlotMachineOutput;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -18,10 +21,34 @@ public class ContainerAnvil extends Container {
|
||||
|
||||
public ContainerAnvil(InventoryPlayer inventory) {
|
||||
|
||||
this.addSlotToContainer(new Slot(input, 0, 17, 27));
|
||||
this.addSlotToContainer(new Slot(input, 1, 53, 27));
|
||||
this.addSlotToContainer(new SmithingSlot(input, 0, 17, 27));
|
||||
this.addSlotToContainer(new SmithingSlot(input, 1, 53, 27));
|
||||
this.addSlotToContainer(new SlotMachineOutput(output, 0, 89, 27) {
|
||||
|
||||
@Override
|
||||
public void onPickupFromSlot(EntityPlayer player, ItemStack stack) {
|
||||
super.onPickupFromSlot(player, stack);
|
||||
|
||||
ItemStack left = ContainerAnvil.this.input.getStackInSlot(0);
|
||||
ItemStack right = ContainerAnvil.this.input.getStackInSlot(1);
|
||||
|
||||
if(left == null || right == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
for(AnvilSmithingRecipe rec : AnvilRecipes.getSmithing()) {
|
||||
|
||||
int i = rec.matchesInt(left, right);
|
||||
|
||||
if(i != -1) {
|
||||
ContainerAnvil.this.input.decrStackSize(0, rec.amountConsumed(0, i == 1));
|
||||
ContainerAnvil.this.input.decrStackSize(1, rec.amountConsumed(1, i == 1));
|
||||
ContainerAnvil.this.updateSmithing();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
for(int i = 0; i < 3; i++) {
|
||||
@ -72,4 +99,43 @@ public class ContainerAnvil extends Container {
|
||||
|
||||
return var3;
|
||||
}
|
||||
|
||||
public class SmithingSlot extends Slot {
|
||||
|
||||
public SmithingSlot(IInventory inventory, int index, int x, int y) {
|
||||
super(inventory, index, x, y);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void putStack(ItemStack stack) {
|
||||
super.putStack(stack);
|
||||
ContainerAnvil.this.updateSmithing();
|
||||
}
|
||||
|
||||
public void onPickupFromSlot(EntityPlayer player, ItemStack stack) {
|
||||
super.onPickupFromSlot(player, stack);
|
||||
ContainerAnvil.this.updateSmithing();
|
||||
}
|
||||
}
|
||||
|
||||
private void updateSmithing() {
|
||||
|
||||
ItemStack left = this.input.getStackInSlot(0);
|
||||
ItemStack right = this.input.getStackInSlot(1);
|
||||
|
||||
if(left == null || right == null) {
|
||||
this.output.setInventorySlotContents(0, null);
|
||||
return;
|
||||
}
|
||||
|
||||
for(AnvilSmithingRecipe rec : AnvilRecipes.getSmithing()) {
|
||||
|
||||
if(rec.matches(left, right)) {
|
||||
this.output.setInventorySlotContents(0, rec.getOutput(left, right));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
this.output.setInventorySlotContents(0, null);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1407,6 +1407,7 @@ public class ModItems {
|
||||
public static Item ammo_rocket_sleek;
|
||||
public static Item ammo_rocket_nuclear;
|
||||
public static Item ammo_rocket_rpc;
|
||||
public static Item ammo_rocket_digamma;
|
||||
public static Item ammo_grenade;
|
||||
public static Item ammo_grenade_he;
|
||||
public static Item ammo_grenade_incendiary;
|
||||
@ -1873,6 +1874,10 @@ public class ModItems {
|
||||
public static Item dns_legs;
|
||||
public static Item dns_boots;
|
||||
public static Item zirconium_legs;
|
||||
public static Item robes_helmet;
|
||||
public static Item robes_plate;
|
||||
public static Item robes_legs;
|
||||
public static Item robes_boots;
|
||||
|
||||
public static Item australium_iii;
|
||||
public static Item australium_iv;
|
||||
@ -3815,6 +3820,7 @@ public class ModItems {
|
||||
ammo_rocket_sleek = new ItemAmmo().setUnlocalizedName("ammo_rocket_sleek").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_rocket_sleek");
|
||||
ammo_rocket_nuclear = new ItemAmmo().setUnlocalizedName("ammo_rocket_nuclear").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_rocket_nuclear");
|
||||
ammo_rocket_rpc = new ItemAmmo().setUnlocalizedName("ammo_rocket_rpc").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_rocket_rpc");
|
||||
ammo_rocket_digamma = new ItemAmmo().setUnlocalizedName("ammo_rocket_digamma").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_rocket_digamma");
|
||||
ammo_grenade = new ItemAmmo().setUnlocalizedName("ammo_grenade").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_grenade");
|
||||
ammo_grenade_he = new ItemAmmo().setUnlocalizedName("ammo_grenade_he").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_grenade_he");
|
||||
ammo_grenade_incendiary = new ItemAmmo().setUnlocalizedName("ammo_grenade_incendiary").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_grenade_incendiary");
|
||||
@ -4410,6 +4416,11 @@ public class ModItems {
|
||||
starmetal_legs = new ArmorFSB(MainRegistry.aMatStarmetal, 7, 2, RefStrings.MODID + ":textures/armor/starmetal_2.png").cloneStats((ArmorFSB) starmetal_helmet).setUnlocalizedName("starmetal_legs").setTextureName(RefStrings.MODID + ":starmetal_legs");
|
||||
starmetal_boots = new ArmorFSB(MainRegistry.aMatStarmetal, 7, 3, RefStrings.MODID + ":textures/armor/starmetal_1.png").cloneStats((ArmorFSB) starmetal_helmet).setUnlocalizedName("starmetal_boots").setTextureName(RefStrings.MODID + ":starmetal_boots");
|
||||
|
||||
robes_helmet = new ArmorFSB(ArmorMaterial.CHAIN, 7, 0, RefStrings.MODID + ":textures/armor/robes_1.png").setThreshold(1.0F).setUnlocalizedName("robes_helmet").setTextureName(RefStrings.MODID + ":robes_helmet");
|
||||
robes_plate = new ArmorFSB(ArmorMaterial.CHAIN, 7, 1, RefStrings.MODID + ":textures/armor/robes_1.png").cloneStats((ArmorFSB) robes_helmet).setUnlocalizedName("robes_plate").setTextureName(RefStrings.MODID + ":robes_plate");
|
||||
robes_legs = new ArmorFSB(ArmorMaterial.CHAIN, 7, 2, RefStrings.MODID + ":textures/armor/robes_2.png").cloneStats((ArmorFSB) robes_helmet).setUnlocalizedName("robes_legs").setTextureName(RefStrings.MODID + ":robes_legs");
|
||||
robes_boots = new ArmorFSB(ArmorMaterial.CHAIN, 7, 3, RefStrings.MODID + ":textures/armor/robes_1.png").cloneStats((ArmorFSB) robes_helmet).setUnlocalizedName("robes_boots").setTextureName(RefStrings.MODID + ":robes_boots");
|
||||
|
||||
ArmorMaterial aMatZirconium = EnumHelper.addArmorMaterial("HBM_ZIRCONIUM", 1000, new int[] { 2, 5, 3, 1 }, 100);
|
||||
aMatZirconium.customCraftingMaterial = ModItems.ingot_zirconium;
|
||||
zirconium_legs = new ArmorFSB(aMatZirconium, 7, 2, RefStrings.MODID + ":textures/armor/zirconium_2.png").setMod(0.0F).setUnlocalizedName("zirconium_legs").setTextureName(RefStrings.MODID + ":zirconium_legs");
|
||||
@ -6648,6 +6659,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(ammo_rocket_sleek, ammo_rocket_sleek.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_rocket_nuclear, ammo_rocket_nuclear.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_rocket_rpc, ammo_rocket_rpc.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_rocket_digamma, ammo_rocket_digamma.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_grenade, ammo_grenade.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_grenade_he, ammo_grenade_he.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_grenade_incendiary, ammo_grenade_incendiary.getUnlocalizedName());
|
||||
@ -7249,6 +7261,10 @@ public class ModItems {
|
||||
GameRegistry.registerItem(euphemium_plate, euphemium_plate.getUnlocalizedName());
|
||||
GameRegistry.registerItem(euphemium_legs, euphemium_legs.getUnlocalizedName());
|
||||
GameRegistry.registerItem(euphemium_boots, euphemium_boots.getUnlocalizedName());
|
||||
GameRegistry.registerItem(robes_helmet, robes_helmet.getUnlocalizedName());
|
||||
GameRegistry.registerItem(robes_plate, robes_plate.getUnlocalizedName());
|
||||
GameRegistry.registerItem(robes_legs, robes_legs.getUnlocalizedName());
|
||||
GameRegistry.registerItem(robes_boots, robes_boots.getUnlocalizedName());
|
||||
GameRegistry.registerItem(apple_euphemium, apple_euphemium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(watch, watch.getUnlocalizedName());
|
||||
GameRegistry.registerItem(mask_of_infamy, mask_of_infamy.getUnlocalizedName());
|
||||
|
||||
@ -4,6 +4,7 @@ import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
import com.hbm.handler.ArmorModHandler;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.packet.AuxParticlePacketNT;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
@ -64,7 +65,7 @@ public class ItemModKnife extends ItemArmorMod {
|
||||
attributeinstance.removeModifier(attributeinstance.getModifier(trigamma_UUID));
|
||||
} catch(Exception ex) { }
|
||||
|
||||
attributeinstance.applyModifier(new AttributeModifier(trigamma_UUID, "digamma", -(20F - health + 2), 0));
|
||||
attributeinstance.applyModifier(new AttributeModifier(trigamma_UUID, "digamma", -(entity.getMaxHealth() - health + 2), 0));
|
||||
|
||||
if(entity instanceof EntityPlayerMP) {
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
@ -76,6 +77,8 @@ public class ItemModKnife extends ItemArmorMod {
|
||||
} else {
|
||||
data.setInteger("time", 0);
|
||||
data.setInteger("maxTime", 0);
|
||||
|
||||
((EntityPlayer)entity).triggerAchievement(MainRegistry.achSomeWounds);
|
||||
}
|
||||
PacketDispatcher.wrapper.sendTo(new AuxParticlePacketNT(data, 0, 0, 0), (EntityPlayerMP)entity);
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package com.hbm.items.weapon;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
@ -365,6 +366,13 @@ public class ItemAmmo extends Item {
|
||||
list.add(EnumChatFormatting.RED + "- Non-explosive");
|
||||
list.add(EnumChatFormatting.YELLOW + "* Uhhhh");
|
||||
}
|
||||
if(this == ModItems.ammo_rocket_digamma) {
|
||||
|
||||
if(new Random().nextInt(3) < 2)
|
||||
list.add(EnumChatFormatting.RED + "COVER YOURSELF IN OIL");
|
||||
else
|
||||
list.add(EnumChatFormatting.RED + "" + EnumChatFormatting.OBFUSCATED + "COVER YOURSELF IN OIL");
|
||||
}
|
||||
|
||||
//40mm GRENADES
|
||||
if(this == ModItems.ammo_grenade_he) {
|
||||
|
||||
@ -181,6 +181,7 @@ public class MainRegistry {
|
||||
public static Achievement achMeltdown;
|
||||
public static Achievement achOmega12;
|
||||
public static Achievement achRadium;
|
||||
public static Achievement achSomeWounds;
|
||||
public static Achievement bobMetalworks;
|
||||
public static Achievement bobAssembly;
|
||||
public static Achievement bobChemistry;
|
||||
@ -962,6 +963,8 @@ public class MainRegistry {
|
||||
achRadPoison = new Achievement("achievement.radPoison", "radPoison", -2, 6, ModItems.geiger_counter, null).initIndependentStat().registerStat();
|
||||
achRadDeath = new Achievement("achievement.radDeath", "radDeath", 0, 6, Items.skull, achRadPoison).initIndependentStat().registerStat().setSpecial();
|
||||
|
||||
achSomeWounds = new Achievement("achievement.someWounds", "someWounds", -2, 10, ModItems.injector_knife, null).initIndependentStat().registerStat();
|
||||
|
||||
digammaSee = new Achievement("achievement.digammaSee", "digammaSee", -2, 8, ModItems.digamma_see, null).initIndependentStat().registerStat();
|
||||
digammaFeel = new Achievement("achievement.digammaFeel", "digammaFeel", 0, 8, ModItems.digamma_feel, digammaSee).initIndependentStat().registerStat();
|
||||
digammaKnow = new Achievement("achievement.digammaKnow", "digammaKnow", 2, 8, ModItems.digamma_know, digammaFeel).initIndependentStat().registerStat().setSpecial();
|
||||
@ -1002,6 +1005,7 @@ public class MainRegistry {
|
||||
bossMaskman,
|
||||
bossWorm,
|
||||
bossUFO,
|
||||
achSomeWounds,
|
||||
digammaSee,
|
||||
digammaFeel,
|
||||
digammaKnow,
|
||||
@ -1027,6 +1031,7 @@ public class MainRegistry {
|
||||
HadronRecipes.register();
|
||||
MagicRecipes.register();
|
||||
SILEXRecipes.register();
|
||||
AnvilRecipes.register();
|
||||
|
||||
TileEntityNukeCustom.registerBombItems();
|
||||
|
||||
|
||||
@ -113,6 +113,30 @@ public class ArmorUtil {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean checkForDigamma2(EntityPlayer player) {
|
||||
|
||||
if(!checkArmor(player, ModItems.robes_helmet, ModItems.robes_plate, ModItems.robes_legs, ModItems.robes_boots))
|
||||
return false;
|
||||
|
||||
if(player.isPotionActive(HbmPotion.stability.id))
|
||||
return true;
|
||||
|
||||
for(int i = 0; i < 4; i++) {
|
||||
|
||||
ItemStack armor = player.getCurrentArmor(i);
|
||||
|
||||
if(armor != null && ArmorModHandler.hasMods(armor)) {
|
||||
|
||||
ItemStack mods[] = ArmorModHandler.pryMods(armor);
|
||||
|
||||
if(!(mods[ArmorModHandler.cladding] != null && mods[ArmorModHandler.cladding].getItem() == ModItems.cladding_iron))
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return player.getMaxHealth() < 3;
|
||||
}
|
||||
|
||||
public static boolean checkForFaraday(EntityPlayer player) {
|
||||
|
||||
ItemStack[] armor = player.inventory.armorInventory;
|
||||
|
||||
@ -263,7 +263,7 @@ public class ContaminationUtil {
|
||||
DIGAMMA, //preventable by fau armor or stability
|
||||
DIGAMMA2, //preventable by robes
|
||||
CREATIVE, //preventable by creative mode, for rad calculation armor piece bonuses still apply
|
||||
RAD_BYPASS, //same as creaative but fill not apply radiation resistance calculation
|
||||
RAD_BYPASS, //same as craative but will not apply radiation resistance calculation
|
||||
NONE //not preventable
|
||||
}
|
||||
|
||||
@ -289,8 +289,8 @@ public class ContaminationUtil {
|
||||
case FARADAY: if(ArmorUtil.checkForFaraday(player)) return false; break;
|
||||
case HAZMAT: if(ArmorUtil.checkForHazmat(player)) return false; break;
|
||||
case HAZMAT2: if(ArmorUtil.checkForHaz2(player)) return false; break;
|
||||
case DIGAMMA: if(ArmorUtil.checkForDigamma(player)) return false; break;
|
||||
case DIGAMMA2: break;
|
||||
case DIGAMMA: if(ArmorUtil.checkForDigamma(player)) return false; if(ArmorUtil.checkForDigamma2(player)) return false; break;
|
||||
case DIGAMMA2: if(ArmorUtil.checkForDigamma2(player)) return false; break;
|
||||
}
|
||||
|
||||
if(player.capabilities.isCreativeMode && cont != ContaminationType.NONE)
|
||||
|
||||
@ -68,6 +68,8 @@ achievement.selenium.desc=Lange nicht gesehen!
|
||||
achievement.selenium=Und täglich grüßt der Mond
|
||||
achievement.stratum.desc=Steig' auf die Bremse, Mitts.
|
||||
achievement.stratum=Stratum
|
||||
achievement.someWounds.desc=Bereite dich vor
|
||||
achievement.someWounds=Manche Wunden heilen nie
|
||||
achievement.soyuz.desc=Werde knusprig
|
||||
achievement.soyuz=Gebackene Kartoffel
|
||||
achievement.space.desc=Scheitere in jeder möglichen Weise und verschwende 90 Millionen Dollar an Forschungsgeldern.
|
||||
|
||||
@ -68,6 +68,8 @@ achievement.selenium.desc=Yeah.
|
||||
achievement.selenium=XVIII The Moon
|
||||
achievement.stratum.desc=Hit the brakes, Mitts.
|
||||
achievement.stratum=Stratum
|
||||
achievement.someWounds.desc=Get ready
|
||||
achievement.someWounds=Some Wounds Never Heal
|
||||
achievement.soyuz.desc=Become crunchy.
|
||||
achievement.soyuz=Baked Potato
|
||||
achievement.space.desc=Fail in every way possible and waste funds worth 90 million dollars.
|
||||
|
||||
BIN
src/main/resources/assets/hbm/textures/armor/robes_1.png
Normal file
BIN
src/main/resources/assets/hbm/textures/armor/robes_1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
BIN
src/main/resources/assets/hbm/textures/armor/robes_2.png
Normal file
BIN
src/main/resources/assets/hbm/textures/armor/robes_2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 503 B |
BIN
src/main/resources/assets/hbm/textures/blocks/ash_digamma.png
Normal file
BIN
src/main/resources/assets/hbm/textures/blocks/ash_digamma.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 864 B |
BIN
src/main/resources/assets/hbm/textures/blocks/fire_digamma.png
Normal file
BIN
src/main/resources/assets/hbm/textures/blocks/fire_digamma.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
@ -0,0 +1,3 @@
|
||||
{
|
||||
"animation": { }
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 407 B |
Binary file not shown.
|
After Width: | Height: | Size: 193 B |
Loading…
x
Reference in New Issue
Block a user