Merge branch 'HbmMods:master' into master
@ -1,9 +1,16 @@
|
||||
## Added
|
||||
* T-51b power armor
|
||||
* Serves as a replacement for the T-45
|
||||
|
||||
## Changed
|
||||
* Added more QMAW pages
|
||||
* Removed most old particle accelerator blocks from the creative inventory
|
||||
* All dual wielded guns now render more accurately when dropped instead of only showing one gun
|
||||
* Added support for left handed guns (currently unused)*
|
||||
* Removed the presentations for the old particle accelerator and schottky diode
|
||||
* Gibbing NPCs now also spawns bones, if supported by the skeletonizer
|
||||
* Gibbed bones only have a 50% chance of spawning and come with a unique red texture
|
||||
* Gibbed bones have a way shorter lifetime and higher gravity to match the gib particles
|
||||
|
||||
## Fixed
|
||||
* Fixed wood burner only being able to create one ash pile per item burned, even when that item yields more, creating a backlog in the internal ash value
|
||||
|
||||
@ -64,10 +64,10 @@ public class ArmorRecipes {
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.zirconium_legs, 1), new Object[] { "EEE", "E E", "E E", 'E', ZR.ingot() });
|
||||
|
||||
//Power armor
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.t45_helmet, 1), new Object[] { "PPC", "PBP", "IXI", 'P', ModItems.plate_armor_titanium, 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.BASIC), 'I', ANY_RUBBER.ingot(), 'X', ModItems.gas_mask_m65, 'B', ModItems.titanium_helmet });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.t45_plate, 1), new Object[] { "MPM", "TBT", "PPP", 'M', ModItems.motor, 'P', ModItems.plate_armor_titanium, 'T', ModItems.gas_empty, 'B', ModItems.titanium_plate });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.t45_legs, 1), new Object[] { "MPM", "PBP", "P P", 'M', ModItems.motor, 'P', ModItems.plate_armor_titanium, 'B', ModItems.titanium_legs });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.t45_boots, 1), new Object[] { "P P", "PBP", 'P', ModItems.plate_armor_titanium, 'B', ModItems.titanium_boots });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.t51_helmet, 1), new Object[] { "PPC", "PBP", "IXI", 'P', ModItems.plate_armor_titanium, 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.BASIC), 'I', ANY_RUBBER.ingot(), 'X', ModItems.gas_mask_m65, 'B', ModItems.titanium_helmet });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.t51_plate, 1), new Object[] { "MPM", "TBT", "PPP", 'M', ModItems.motor, 'P', ModItems.plate_armor_titanium, 'T', ModItems.gas_empty, 'B', ModItems.titanium_plate });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.t51_legs, 1), new Object[] { "MPM", "PBP", "P P", 'M', ModItems.motor, 'P', ModItems.plate_armor_titanium, 'B', ModItems.titanium_legs });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.t51_boots, 1), new Object[] { "P P", "PBP", 'P', ModItems.plate_armor_titanium, 'B', ModItems.titanium_boots });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ajr_helmet, 1), new Object[] { "PPC", "PBP", "IXI", 'P', ModItems.plate_armor_ajr, 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.BASIC), 'I', ANY_PLASTIC.ingot(), 'X', ModItems.gas_mask_m65, 'B', ModItems.alloy_helmet });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ajr_plate, 1), new Object[] { "MPM", "TBT", "PPP", 'M', ModItems.motor_desh, 'P', ModItems.plate_armor_ajr, 'T', ModItems.gas_empty, 'B', ModItems.alloy_plate });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ajr_legs, 1), new Object[] { "MPM", "PBP", "P P", 'M', ModItems.motor_desh, 'P', ModItems.plate_armor_ajr, 'B', ModItems.alloy_legs });
|
||||
|
||||
@ -25,7 +25,6 @@ import com.hbm.entity.train.*;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.util.Tuple.Quartet;
|
||||
|
||||
import cpw.mods.fml.common.registry.EntityRegistry;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.EnumCreatureType;
|
||||
|
||||
@ -1,123 +0,0 @@
|
||||
package com.hbm.handler;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
import com.hbm.items.weapon.sedna.Crosshair;
|
||||
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
|
||||
import com.hbm.render.anim.AnimationEnums.GunAnimation;
|
||||
import com.hbm.render.anim.BusAnimation;
|
||||
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
@Deprecated
|
||||
public class GunConfiguration implements Cloneable {
|
||||
|
||||
/**
|
||||
* alt function restrictions:
|
||||
* alt can not be reloaded (reload type of 0, ammo cap of 0)
|
||||
* alt cooldown and main cooldown are shared (alt cooldown will almoast always be greater or equal)
|
||||
* alt is always the lower priority, mouse2 will be canceled then mouse1 is activated at the same time
|
||||
* restrictions must be applied in gun's logic, mechanism may be dysfunctional if these rules are ignored
|
||||
*/
|
||||
|
||||
//amount of ticks between each bullet
|
||||
public int rateOfFire;
|
||||
//amount of bullets fired per delay passed
|
||||
public int roundsPerCycle;
|
||||
/** Amount of rounds per burst, irrelevant if not a burst fire weapon**/
|
||||
public int roundsPerBurst;
|
||||
//0 = normal, 1 = release, 2 = both
|
||||
public int gunMode;
|
||||
//0 = manual, 1 = automatic
|
||||
public int firingMode;
|
||||
//weapon won't fire after weapon breaks (main only)
|
||||
public int durability;
|
||||
|
||||
//animations!
|
||||
public HashMap<GunAnimation, BusAnimation> animations = new HashMap<GunAnimation, BusAnimation>();
|
||||
//lazy-ish loading for animations, required for loading animations from ResourceManager, since that occurs after we've initialised the guns
|
||||
public Consumer<Void> loadAnimations;
|
||||
public boolean animationsLoaded = false;
|
||||
//when sneaking, disables crosshair and centers the bullet spawn point
|
||||
public boolean hasSights;
|
||||
//does this weapon behave like fully sick old-school boomer shooters
|
||||
public boolean isCentered;
|
||||
//texture overlay when sneaking
|
||||
public ResourceLocation scopeTexture;
|
||||
|
||||
//duration of every animation cycle, used also for how quickly a burst fire rifle can fire
|
||||
public int firingDuration;
|
||||
//sound path to the shooting sound
|
||||
public String firingSound = "";
|
||||
public String firingSoundEmpty = null;
|
||||
public float firingVolume = 1.0F;
|
||||
public float firingPitch = 1.0F;
|
||||
//how long the reload animation will play
|
||||
//MUST BE GREATER THAN ZERO ! ! !
|
||||
public int reloadDuration;
|
||||
public int emptyReloadAdditionalDuration;
|
||||
//sound path to the reload sound
|
||||
public String reloadSound = "";
|
||||
public String reloadSoundEmpty = null;
|
||||
//whether the reload sound should be played at the beginning or at the end of the reload
|
||||
public boolean reloadSoundEnd = true;
|
||||
public String equipSound = "";
|
||||
|
||||
//how much ammo the clip can hold, 0 if drawn from inventory
|
||||
public int ammoCap;
|
||||
//0 does not allow direct reload, 1 is full clip, 2 is single bullet
|
||||
public int reloadType;
|
||||
// If the animations are designed to be sequential, the last frame will be held until the next anmiation starts
|
||||
public boolean reloadAnimationsSequential = false;
|
||||
//whether or not the infinity enchantment should work
|
||||
public boolean allowsInfinity;
|
||||
//whether the ammo count should be displayed
|
||||
public boolean showAmmo = true;
|
||||
|
||||
//for electrically powered weapons:
|
||||
//the Maximum capacity of the gun
|
||||
public long maxCharge;
|
||||
//the rate at which the gun is charged
|
||||
public long chargeRate;
|
||||
//how much energy is discharged per shot
|
||||
public long dischargePerShot;
|
||||
|
||||
public String name = "";
|
||||
public EnumGunManufacturer manufacturer = EnumGunManufacturer.NONE;
|
||||
public List<String> comment = new ArrayList<String>();
|
||||
|
||||
//bullet configs for main and alt fire
|
||||
public List<Integer> config = new ArrayList<Integer>();
|
||||
|
||||
//crosshair
|
||||
public Crosshair crosshair;
|
||||
|
||||
//casing eject behavior
|
||||
public CasingEjector ejector = null;
|
||||
|
||||
public static final int MODE_NORMAL = 0;
|
||||
public static final int MODE_RELEASE = 1;
|
||||
public static final int MODE_BOTH = 1;
|
||||
|
||||
public static final int FIRE_MANUAL = 0;
|
||||
public static final int FIRE_AUTO = 1;
|
||||
public static final int FIRE_BURST = 2;
|
||||
|
||||
public static final int RELOAD_NONE = 0;
|
||||
public static final int RELOAD_FULL = 1;
|
||||
public static final int RELOAD_SINGLE = 2;
|
||||
|
||||
public static final String RSOUND_REVOLVER = "hbm:weapon.revolverReload";
|
||||
public static final String RSOUND_RIFLE = "";
|
||||
public static final String RSOUND_MAG = "hbm:weapon.magReload";
|
||||
public static final String RSOUND_MAG_BOLT = "hbm:weapon.magReloadBolt";
|
||||
public static final String RSOUND_SHOTGUN = "hbm:weapon.shotgunReload";
|
||||
public static final String RSOUND_LAUNCHER = "hbm:weapon.rpgReload";
|
||||
public static final String RSOUND_GRENADE = "hbm:weapon.hkReload";
|
||||
public static final String RSOUND_GRENADE_NEW = "hbm:weapon.glReload";
|
||||
public static final String RSOUND_FATMAN = "hbm:weapon.fatmanReload";
|
||||
|
||||
}
|
||||
@ -4,6 +4,7 @@ import com.hbm.blocks.machine.rbmk.RBMKBase;
|
||||
import com.hbm.handler.neutron.NeutronNodeWorld.StreamWorld;
|
||||
import com.hbm.handler.radiation.ChunkRadiationManager;
|
||||
import com.hbm.tileentity.machine.rbmk.*;
|
||||
import com.hbm.util.Compat;
|
||||
import com.hbm.util.fauxpointtwelve.BlockPos;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@ -35,7 +36,7 @@ public class RBMKNeutronHandler {
|
||||
}
|
||||
|
||||
private static TileEntity blockPosToTE(World worldObj, BlockPos pos) {
|
||||
return worldObj.getTileEntity(pos.getX(), pos.getY(), pos.getZ());
|
||||
return Compat.getTileStandard(worldObj, pos.getX(), pos.getY(), pos.getZ());
|
||||
}
|
||||
|
||||
public static RBMKNeutronNode makeNode(StreamWorld streamWorld, TileEntityRBMKBase tile) {
|
||||
@ -222,7 +223,7 @@ public class RBMKNeutronHandler {
|
||||
pos.mutate(origin.tile.xCoord + x, origin.tile.yCoord, origin.tile.zCoord + z);
|
||||
|
||||
NeutronNode node = streamWorld.getNode(pos);
|
||||
if(node != null && node instanceof RBMKNeutronNode) {
|
||||
if(node instanceof RBMKNeutronNode) {
|
||||
positions[i - 1] = node;
|
||||
} else if(this.origin.tile.getBlockType() instanceof RBMKBase) {
|
||||
TileEntity te = blockPosToTE(world, pos);
|
||||
|
||||
@ -187,11 +187,10 @@ public class ItemPoolsLegacy {
|
||||
//loot found in vertibirds
|
||||
new ItemPool(POOL_VERTIBIRD) {{
|
||||
this.pool = new WeightedRandomChestContent[] {
|
||||
weighted(ModItems.t45_helmet, 0, 1, 1, 15),
|
||||
weighted(ModItems.t45_plate, 0, 1, 1, 15),
|
||||
weighted(ModItems.t45_legs, 0, 1, 1, 15),
|
||||
weighted(ModItems.t45_boots, 0, 1, 1, 15),
|
||||
weighted(ModItems.t45_kit, 0, 1, 1, 3),
|
||||
weighted(ModItems.t51_helmet, 0, 1, 1, 15),
|
||||
weighted(ModItems.t51_plate, 0, 1, 1, 15),
|
||||
weighted(ModItems.t51_legs, 0, 1, 1, 15),
|
||||
weighted(ModItems.t51_boots, 0, 1, 1, 15),
|
||||
weighted(ModItems.fusion_core, 0, 1, 1, 10),
|
||||
weighted(ModItems.gun_light_revolver, 0, 1, 1, 4),
|
||||
weighted(ModItems.gun_kit_1, 0, 2, 3, 4),
|
||||
|
||||
@ -1742,10 +1742,14 @@ public class ModItems {
|
||||
public static Item beta;
|
||||
public static Item no9;
|
||||
|
||||
public static Item t45_helmet;
|
||||
public static Item t45_plate;
|
||||
public static Item t45_legs;
|
||||
public static Item t45_boots;
|
||||
@Deprecated public static Item t45_helmet;
|
||||
@Deprecated public static Item t45_plate;
|
||||
@Deprecated public static Item t45_legs;
|
||||
@Deprecated public static Item t45_boots;
|
||||
public static Item t51_helmet;
|
||||
public static Item t51_plate;
|
||||
public static Item t51_legs;
|
||||
public static Item t51_boots;
|
||||
public static Item steamsuit_helmet;
|
||||
public static Item steamsuit_plate;
|
||||
public static Item steamsuit_legs;
|
||||
@ -2107,7 +2111,7 @@ public class ModItems {
|
||||
public static Item fleija_kit;
|
||||
public static Item prototype_kit;
|
||||
public static Item missile_kit;
|
||||
public static Item t45_kit;
|
||||
@Deprecated public static Item t45_kit;
|
||||
public static Item euphemium_kit;
|
||||
public static Item solinium_kit;
|
||||
public static Item hazmat_kit;
|
||||
@ -4255,6 +4259,20 @@ public class ModItems {
|
||||
t45_legs = new ArmorT45(aMatT45, 2, 1000000, 10000, 1000, 5).cloneStats((ArmorFSB) t45_helmet).setUnlocalizedName("t45_legs").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":t45_legs");
|
||||
t45_boots = new ArmorT45(aMatT45, 3, 1000000, 10000, 1000, 5).cloneStats((ArmorFSB) t45_helmet).setUnlocalizedName("t45_boots").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":t45_boots");
|
||||
|
||||
ArmorMaterial aMatT51 = EnumHelper.addArmorMaterial("HBM_T51", 150, new int[] { 3, 8, 6, 3 }, 0);
|
||||
aMatT51.customCraftingMaterial = ModItems.plate_armor_titanium;
|
||||
t51_helmet = new ArmorT51(aMatT51, 0, RefStrings.MODID + ":textures/armor/starmetal_1.png", 1000000, 10000, 1000, 5)
|
||||
.enableVATS(true)
|
||||
.setHasGeigerSound(true)
|
||||
.setHasHardLanding(true)
|
||||
.addEffect(new PotionEffect(Potion.damageBoost.id, 20, 0))
|
||||
.setStep("hbm:step.metal").setJump("hbm:step.iron_jump").setFall("hbm:step.iron_land")
|
||||
.hides(EnumPlayerPart.HAT)
|
||||
.setUnlocalizedName("t51_helmet").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":t51_helmet");
|
||||
t51_plate = new ArmorT51(aMatT51, 1, RefStrings.MODID + ":textures/armor/starmetal_1.png", 1000000, 10000, 1000, 5).cloneStats((ArmorFSB) t51_helmet).setUnlocalizedName("t51_plate").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":t51_plate");
|
||||
t51_legs = new ArmorT51(aMatT51, 2, RefStrings.MODID + ":textures/armor/starmetal_1.png", 1000000, 10000, 1000, 5).cloneStats((ArmorFSB) t51_helmet).setUnlocalizedName("t51_legs").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":t51_legs");
|
||||
t51_boots = new ArmorT51(aMatT51, 3, RefStrings.MODID + ":textures/armor/starmetal_1.png", 1000000, 10000, 1000, 5).cloneStats((ArmorFSB) t51_helmet).setUnlocalizedName("t51_boots").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":t51_boots");
|
||||
|
||||
ArmorMaterial aMatDesh = EnumHelper.addArmorMaterial("HBM_DESH", 150, new int[] { 3, 8, 6, 3 }, 0);
|
||||
aMatDesh.customCraftingMaterial = ModItems.ingot_desh;
|
||||
steamsuit_helmet = new ArmorDesh(aMatDesh, 0, RefStrings.MODID + ":textures/armor/starmetal_1.png", Fluids.STEAM, 64_000, 500, 50, 1)
|
||||
@ -6902,6 +6920,10 @@ public class ModItems {
|
||||
GameRegistry.registerItem(t45_plate, t45_plate.getUnlocalizedName());
|
||||
GameRegistry.registerItem(t45_legs, t45_legs.getUnlocalizedName());
|
||||
GameRegistry.registerItem(t45_boots, t45_boots.getUnlocalizedName());
|
||||
GameRegistry.registerItem(t51_helmet, t51_helmet.getUnlocalizedName());
|
||||
GameRegistry.registerItem(t51_plate, t51_plate.getUnlocalizedName());
|
||||
GameRegistry.registerItem(t51_legs, t51_legs.getUnlocalizedName());
|
||||
GameRegistry.registerItem(t51_boots, t51_boots.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ajr_helmet, ajr_helmet.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ajr_plate, ajr_plate.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ajr_legs, ajr_legs.getUnlocalizedName());
|
||||
|
||||
@ -26,6 +26,7 @@ public class ArmorT45 extends ArmorFSBPowered {
|
||||
|
||||
public ArmorT45(ArmorMaterial material, int slot, long maxPower, long chargeRate, long consumption, long drain) {
|
||||
super(material, slot, "", maxPower, chargeRate, consumption, drain);
|
||||
this.setCreativeTab(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
33
src/main/java/com/hbm/items/armor/ArmorT51.java
Normal file
@ -0,0 +1,33 @@
|
||||
package com.hbm.items.armor;
|
||||
|
||||
import com.hbm.render.model.ModelArmorT51;
|
||||
|
||||
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 ArmorT51 extends ArmorFSBPowered {
|
||||
|
||||
public ArmorT51(ArmorMaterial material, int slot, String texture, long maxPower, long chargeRate, long consumption, long drain) {
|
||||
super(material, slot, texture, maxPower, chargeRate, consumption, drain);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
ModelArmorT51[] models;
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) {
|
||||
|
||||
if(models == null) {
|
||||
models = new ModelArmorT51[4];
|
||||
|
||||
for(int i = 0; i < 4; i++)
|
||||
models[i] = new ModelArmorT51(i);
|
||||
}
|
||||
|
||||
return models[armorSlot];
|
||||
}
|
||||
}
|
||||
@ -1,7 +1,6 @@
|
||||
package com.hbm.items.weapon;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import com.google.common.collect.HashMultimap;
|
||||
import com.google.common.collect.Multimap;
|
||||
|
||||
@ -48,6 +48,8 @@ public class ConfettiUtil {
|
||||
if(entity instanceof EntitySkeleton) return;
|
||||
if(entity instanceof EntitySlime) return;
|
||||
|
||||
SkeletonCreator.composeEffectGib(entity.worldObj, entity, 0.25F);
|
||||
|
||||
NBTTagCompound vdat = new NBTTagCompound();
|
||||
vdat.setString("type", "giblets");
|
||||
vdat.setInteger("ent", entity.getEntityId());
|
||||
|
||||
@ -41,7 +41,6 @@ import com.hbm.handler.HbmKeybinds;
|
||||
import com.hbm.handler.HbmKeybinds.EnumKeybind;
|
||||
import com.hbm.handler.ImpactWorldHandler;
|
||||
import com.hbm.handler.imc.IMCHandlerNHNEI;
|
||||
import com.hbm.items.IAnimatedItem;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.weapon.sedna.factory.GunFactoryClient;
|
||||
import com.hbm.lib.RefStrings;
|
||||
@ -49,10 +48,6 @@ import com.hbm.particle.*;
|
||||
import com.hbm.particle.helper.ParticleCreators;
|
||||
import com.hbm.particle.psys.engine.EventHandlerParticleEngine;
|
||||
import com.hbm.qmaw.QMAWLoader;
|
||||
import com.hbm.render.anim.BusAnimation;
|
||||
import com.hbm.render.anim.BusAnimationSequence;
|
||||
import com.hbm.render.anim.HbmAnimations;
|
||||
import com.hbm.render.anim.HbmAnimations.Animation;
|
||||
import com.hbm.render.block.*;
|
||||
import com.hbm.render.entity.RenderEmpty;
|
||||
import com.hbm.render.entity.effect.*;
|
||||
|
||||
@ -924,26 +924,27 @@ public class ResourceManager {
|
||||
public static final IModelCustom grenade_frag = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/grenade_frag.obj"));
|
||||
public static final IModelCustom grenade_aschrab = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/grenade_aschrab.obj"));
|
||||
|
||||
public static final IModelCustom armor_bj = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/BJ.obj"));
|
||||
public static final IModelCustom armor_hev = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/hev.obj"));
|
||||
public static final IModelCustom armor_ajr = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/AJR.obj"));
|
||||
public static final IModelCustom armor_hat = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/hat.obj"));
|
||||
public static final IModelCustom armor_no9 = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/no9.obj"));
|
||||
public static final IModelCustom armor_goggles = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/goggles.obj"));
|
||||
public static final IModelCustom armor_fau = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/fau.obj"));
|
||||
public static final IModelCustom armor_dnt = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/dnt.obj"));
|
||||
public static final IModelCustom armor_steamsuit = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/steamsuit.obj"));
|
||||
public static final IModelCustom armor_dieselsuit = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/bnuuy.obj"));
|
||||
public static final IModelCustom armor_remnant = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/remnant.obj"));
|
||||
public static final IModelCustom armor_bismuth = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/bismuth.obj"));
|
||||
public static final IModelCustom armor_mod_tesla = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/mod_tesla.obj"));
|
||||
public static final IModelCustom armor_wings = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/murk.obj"));
|
||||
public static final IModelCustom armor_axepack = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/wings_pheo.obj"));
|
||||
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"));
|
||||
public static final IModelCustom armor_bj = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/BJ.obj")).asVBO();
|
||||
public static final IModelCustom armor_hev = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/hev.obj")).asVBO();
|
||||
public static final IModelCustom armor_ajr = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/AJR.obj")).asVBO();
|
||||
public static final IModelCustom armor_t51 = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/t51.obj")).asVBO();
|
||||
public static final IModelCustom armor_hat = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/hat.obj")).asVBO();
|
||||
public static final IModelCustom armor_no9 = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/no9.obj")).asVBO();
|
||||
public static final IModelCustom armor_goggles = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/goggles.obj")).asVBO();
|
||||
public static final IModelCustom armor_fau = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/fau.obj")).asVBO();
|
||||
public static final IModelCustom armor_dnt = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/dnt.obj")).asVBO();
|
||||
public static final IModelCustom armor_steamsuit = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/steamsuit.obj")).asVBO();
|
||||
public static final IModelCustom armor_dieselsuit = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/bnuuy.obj")).asVBO();
|
||||
public static final IModelCustom armor_remnant = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/remnant.obj")).asVBO();
|
||||
public static final IModelCustom armor_bismuth = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/bismuth.obj")).asVBO();
|
||||
public static final IModelCustom armor_mod_tesla = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/mod_tesla.obj")).asVBO();
|
||||
public static final IModelCustom armor_wings = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/murk.obj")).asVBO();
|
||||
public static final IModelCustom armor_axepack = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/wings_pheo.obj")).asVBO();
|
||||
public static final IModelCustom armor_tail = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/tail_peep.obj")).asVBO();
|
||||
public static final IModelCustom player_manly_af = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/player_fem.obj"), false).asVBO();
|
||||
public static final IModelCustom armor_envsuit = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/envsuit.obj")).asVBO();
|
||||
public static final IModelCustom armor_taurun = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/taurun.obj")).asVBO();
|
||||
public static final IModelCustom armor_trenchmaster = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/trenchmaster.obj")).asVBO();
|
||||
|
||||
////Texture Items
|
||||
|
||||
@ -1087,6 +1088,11 @@ public class ResourceManager {
|
||||
public static final ResourceLocation ajro_chest = new ResourceLocation(RefStrings.MODID, "textures/armor/ajro_chest.png");
|
||||
public static final ResourceLocation ajro_arm = new ResourceLocation(RefStrings.MODID, "textures/armor/ajro_arm.png");
|
||||
|
||||
public static final ResourceLocation t51_helmet = new ResourceLocation(RefStrings.MODID, "textures/armor/t51_helmet.png");
|
||||
public static final ResourceLocation t51_leg = new ResourceLocation(RefStrings.MODID, "textures/armor/t51_leg.png");
|
||||
public static final ResourceLocation t51_chest = new ResourceLocation(RefStrings.MODID, "textures/armor/t51_chest.png");
|
||||
public static final ResourceLocation t51_arm = new ResourceLocation(RefStrings.MODID, "textures/armor/t51_arm.png");
|
||||
|
||||
public static final ResourceLocation fau_helmet = new ResourceLocation(RefStrings.MODID, "textures/armor/fau_helmet.png");
|
||||
public static final ResourceLocation fau_leg = new ResourceLocation(RefStrings.MODID, "textures/armor/fau_leg.png");
|
||||
public static final ResourceLocation fau_chest = new ResourceLocation(RefStrings.MODID, "textures/armor/fau_chest.png");
|
||||
|
||||
@ -26,8 +26,13 @@ public class ParticleSkeleton extends EntityFX {
|
||||
|
||||
public static final ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/particle/skeleton.png");
|
||||
public static final ResourceLocation texture_ext = new ResourceLocation(RefStrings.MODID + ":textures/particle/skoilet.png");
|
||||
public static final ResourceLocation texture_blood = new ResourceLocation(RefStrings.MODID + ":textures/particle/skeleton_blood.png");
|
||||
public static final ResourceLocation texture_blood_ext = new ResourceLocation(RefStrings.MODID + ":textures/particle/skoilet_blood.png");
|
||||
public static final IModelCustom skeleton = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/effect/skeleton.obj"), false).asVBO();
|
||||
protected EnumSkeletonType type;
|
||||
|
||||
public ResourceLocation useTexture;
|
||||
public ResourceLocation useTextureExt;
|
||||
|
||||
private float momentumYaw;
|
||||
private float momentumPitch;
|
||||
@ -50,6 +55,18 @@ public class ParticleSkeleton extends EntityFX {
|
||||
|
||||
this.momentumPitch = rand.nextFloat() * 5 * (rand.nextBoolean() ? 1 : -1);
|
||||
this.momentumYaw = rand.nextFloat() * 5 * (rand.nextBoolean() ? 1 : -1);
|
||||
|
||||
this.useTexture = texture;
|
||||
this.useTextureExt = texture_ext;
|
||||
}
|
||||
|
||||
public ParticleSkeleton makeGib() {
|
||||
this.initialDelay = -2; // skip post delay motion randomization
|
||||
this.useTexture = texture_blood;
|
||||
this.useTextureExt = texture_blood_ext;
|
||||
this.particleGravity = 0.04F;
|
||||
this.particleMaxAge = 600 + rand.nextInt(20);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -139,16 +156,16 @@ public class ParticleSkeleton extends EntityFX {
|
||||
|
||||
switch(type) {
|
||||
case SKULL:
|
||||
this.textureManager.bindTexture(texture);
|
||||
this.textureManager.bindTexture(useTexture);
|
||||
skeleton.renderPart("Skull"); break;
|
||||
case TORSO:
|
||||
this.textureManager.bindTexture(texture);
|
||||
this.textureManager.bindTexture(useTexture);
|
||||
skeleton.renderPart("Torso"); break;
|
||||
case LIMB:
|
||||
this.textureManager.bindTexture(texture);
|
||||
this.textureManager.bindTexture(useTexture);
|
||||
skeleton.renderPart("Limb"); break;
|
||||
case SKULL_VILLAGER:
|
||||
this.textureManager.bindTexture(texture_ext);
|
||||
this.textureManager.bindTexture(useTextureExt);
|
||||
skeleton.renderPart("SkullVillager"); break;
|
||||
}
|
||||
|
||||
|
||||
@ -33,20 +33,31 @@ public class SkeletonCreator implements IParticleCreator {
|
||||
public static HashMap<String, Function<EntityLivingBase, BoneDefinition[]>> skullanizer = new HashMap();
|
||||
|
||||
public static void composeEffect(World world, Entity toSkeletonize, float brightness) {
|
||||
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setString("type", "skeleton");
|
||||
data.setInteger("entityID", toSkeletonize.getEntityId());
|
||||
data.setFloat("brightness", brightness);
|
||||
IParticleCreator.sendPacket(world, toSkeletonize.posX, toSkeletonize.posY, toSkeletonize.posZ, 100, data);
|
||||
}
|
||||
|
||||
public static void composeEffectGib(World world, Entity toSkeletonize, float force) {
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setString("type", "skeleton");
|
||||
data.setInteger("entityID", toSkeletonize.getEntityId());
|
||||
data.setFloat("brightness", 1F);
|
||||
data.setFloat("force", force);
|
||||
data.setBoolean("gib", true);
|
||||
IParticleCreator.sendPacket(world, toSkeletonize.posX, toSkeletonize.posY, toSkeletonize.posZ, 100, data);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void makeParticle(World world, EntityPlayer player, TextureManager texman, Random rand, double x, double y, double z, NBTTagCompound data) {
|
||||
|
||||
if(skullanizer.isEmpty()) init();
|
||||
|
||||
|
||||
boolean gib = data.getBoolean("gib");
|
||||
float force = data.getFloat("force");
|
||||
int entityID = data.getInteger("entityID");
|
||||
Entity entity = world.getEntityByID(entityID);
|
||||
if(!(entity instanceof EntityLivingBase)) return;
|
||||
@ -61,9 +72,16 @@ public class SkeletonCreator implements IParticleCreator {
|
||||
if(bonealizer != null) {
|
||||
BoneDefinition[] bones = bonealizer.apply(living);
|
||||
for(BoneDefinition bone : bones) {
|
||||
if(gib && rand.nextBoolean()) continue;
|
||||
ParticleSkeleton skeleton = new ParticleSkeleton(Minecraft.getMinecraft().getTextureManager(), world, bone.x, bone.y, bone.z, brightness, brightness, brightness, bone.type);
|
||||
skeleton.prevRotationYaw = skeleton.rotationYaw = bone.yaw;
|
||||
skeleton.prevRotationPitch = skeleton.rotationPitch = bone.pitch;
|
||||
if(gib) {
|
||||
skeleton.makeGib();
|
||||
skeleton.motionX = rand.nextGaussian() * force;
|
||||
skeleton.motionY = (rand.nextGaussian() + 1) * force;
|
||||
skeleton.motionZ = rand.nextGaussian() * force;
|
||||
}
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect(skeleton);
|
||||
}
|
||||
}
|
||||
@ -161,7 +179,7 @@ public class SkeletonCreator implements IParticleCreator {
|
||||
skullanizer.put(EntityDummy.class.getSimpleName(), BONES_DUMMY);
|
||||
|
||||
//techguns compat, for some reason
|
||||
//not alwayss accurate because of variable arm position, but better than nothing
|
||||
//not always accurate because of variable arm position, but better than nothing
|
||||
skullanizer.put("ArmySoldier", BONES_ZOMBIE);
|
||||
skullanizer.put("PsychoSteve", BONES_ZOMBIE);
|
||||
skullanizer.put("SkeletonSoldier", BONES_ZOMBIE);
|
||||
|
||||
59
src/main/java/com/hbm/render/model/ModelArmorT51.java
Normal file
@ -0,0 +1,59 @@
|
||||
package com.hbm.render.model;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.loader.ModelRendererObj;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class ModelArmorT51 extends ModelArmorBase {
|
||||
|
||||
public ModelArmorT51(int type) {
|
||||
super(type);
|
||||
|
||||
this.head = new ModelRendererObj(ResourceManager.armor_t51, "Helmet");
|
||||
this.body = new ModelRendererObj(ResourceManager.armor_t51, "Chest");
|
||||
this.leftArm = new ModelRendererObj(ResourceManager.armor_t51, "LeftArm").setRotationPoint(5.0F, 2.0F, 0.0F);
|
||||
this.rightArm = new ModelRendererObj(ResourceManager.armor_t51, "RightArm").setRotationPoint(-5.0F, 2.0F, 0.0F);
|
||||
this.leftLeg = new ModelRendererObj(ResourceManager.armor_t51, "LeftLeg").setRotationPoint(1.9F, 12.0F, 0.0F);
|
||||
this.rightLeg = new ModelRendererObj(ResourceManager.armor_t51, "RightLeg").setRotationPoint(-1.9F, 12.0F, 0.0F);
|
||||
this.leftFoot = new ModelRendererObj(ResourceManager.armor_t51, "LeftBoot").setRotationPoint(1.9F, 12.0F, 0.0F);
|
||||
this.rightFoot = new ModelRendererObj(ResourceManager.armor_t51, "RightBoot").setRotationPoint(-1.9F, 12.0F, 0.0F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) {
|
||||
|
||||
super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
|
||||
if(this.type == 0) {
|
||||
bindTexture(ResourceManager.t51_helmet);
|
||||
this.head.render(scaleFactor);
|
||||
}
|
||||
if(this.type == 1) {
|
||||
bindTexture(ResourceManager.t51_chest);
|
||||
this.body.render(scaleFactor);
|
||||
|
||||
bindTexture(ResourceManager.t51_arm);
|
||||
this.leftArm.render(scaleFactor);
|
||||
this.rightArm.render(scaleFactor);
|
||||
}
|
||||
if(this.type == 2) {
|
||||
bindTexture(ResourceManager.t51_leg);
|
||||
this.leftLeg.render(scaleFactor);
|
||||
this.rightLeg.render(scaleFactor);
|
||||
}
|
||||
if(this.type == 3) {
|
||||
bindTexture(ResourceManager.t51_leg);
|
||||
this.leftFoot.render(scaleFactor);
|
||||
this.rightFoot.render(scaleFactor);
|
||||
}
|
||||
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
@ -25,12 +25,10 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.util.*;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import li.cil.oc.api.machine.Arguments;
|
||||
@ -631,6 +629,15 @@ public class TileEntityRBMKConsole extends TileEntityMachineBase implements ICon
|
||||
TileEntityRBMKOutgasser irradiationChannel = (TileEntityRBMKOutgasser)te;
|
||||
data_table.put("fluxProgress", irradiationChannel.progress);
|
||||
data_table.put("requiredFlux", irradiationChannel.duration);
|
||||
ItemStack input = irradiationChannel.getStackInSlot(0);
|
||||
if (input != null){
|
||||
data_table.put("craftingName", input.getUnlocalizedName());
|
||||
data_table.put("craftingNumber", input.stackSize);
|
||||
}
|
||||
else {
|
||||
data_table.put("craftingName", "");
|
||||
data_table.put("craftingNumber", 0);
|
||||
}
|
||||
}
|
||||
|
||||
if(te instanceof TileEntityRBMKHeater){
|
||||
@ -760,6 +767,7 @@ public class TileEntityRBMKConsole extends TileEntityMachineBase implements ICon
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] pressAZ5(Context context, Arguments args) {
|
||||
worldObj.playSoundEffect(xCoord + 0.5, yCoord + 0.5, zCoord + 0.5,"hbm:block.shutdown",1.0F, 1.0F);
|
||||
boolean hasRods = false;
|
||||
for(int i = -7; i <= 7; i++) {
|
||||
for(int j = -7; j <= 7; j++) {
|
||||
|
||||
@ -46,26 +46,26 @@ public class TileEntityRBMKOutgasser extends TileEntityRBMKSlottedBase implement
|
||||
public String getName() {
|
||||
return "container.rbmkOutgasser";
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
|
||||
if(!canProcess()) {
|
||||
this.progress = 0;
|
||||
}
|
||||
|
||||
|
||||
for(DirPos pos : getOutputPos()) {
|
||||
if(this.gas.getFill() > 0) this.sendFluid(gas, worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
super.updateEntity();
|
||||
}
|
||||
|
||||
|
||||
protected DirPos[] getOutputPos() {
|
||||
|
||||
|
||||
if(worldObj.getBlock(xCoord, yCoord - 1, zCoord) == ModBlocks.rbmk_loader) {
|
||||
return new DirPos[] {
|
||||
new DirPos(this.xCoord, this.yCoord + RBMKDials.getColumnHeight(worldObj) + 1, this.zCoord, Library.POS_Y),
|
||||
@ -94,30 +94,30 @@ public class TileEntityRBMKOutgasser extends TileEntityRBMKSlottedBase implement
|
||||
|
||||
@Override
|
||||
public void receiveFlux(NeutronStream stream) {
|
||||
|
||||
|
||||
if(canProcess()) {
|
||||
|
||||
double efficiency = Math.min(1 - stream.fluxRatio * 0.8, 1);
|
||||
|
||||
progress += stream.fluxQuantity * efficiency * RBMKDials.getOutgasserMod(worldObj);
|
||||
|
||||
|
||||
if(progress > duration) {
|
||||
process();
|
||||
this.markDirty();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public boolean canProcess() {
|
||||
|
||||
|
||||
if(slots[0] == null)
|
||||
return false;
|
||||
|
||||
|
||||
Pair<ItemStack, FluidStack> output = OutgasserRecipes.getOutput(slots[0]);
|
||||
|
||||
|
||||
if(output == null)
|
||||
return false;
|
||||
|
||||
|
||||
FluidStack fluid = output.getValue();
|
||||
|
||||
if(fluid != null) {
|
||||
@ -125,27 +125,27 @@ public class TileEntityRBMKOutgasser extends TileEntityRBMKSlottedBase implement
|
||||
gas.setTankType(fluid.type);
|
||||
if(gas.getFill() + fluid.fill > gas.getMaxFill()) return false;
|
||||
}
|
||||
|
||||
|
||||
ItemStack out = output.getKey();
|
||||
|
||||
|
||||
if(slots[1] == null || out == null)
|
||||
return true;
|
||||
|
||||
|
||||
return slots[1].getItem() == out.getItem() && slots[1].getItemDamage() == out.getItemDamage() && slots[1].stackSize + out.stackSize <= slots[1].getMaxStackSize();
|
||||
}
|
||||
|
||||
|
||||
private void process() {
|
||||
|
||||
|
||||
Pair<ItemStack, FluidStack> output = OutgasserRecipes.getOutput(slots[0]);
|
||||
this.decrStackSize(0, 1);
|
||||
this.progress = 0;
|
||||
|
||||
|
||||
if(output.getValue() != null) {
|
||||
gas.setFill(gas.getFill() + output.getValue().fill);
|
||||
}
|
||||
|
||||
|
||||
ItemStack out = output.getKey();
|
||||
|
||||
|
||||
if(out != null) {
|
||||
if(slots[1] == null) {
|
||||
slots[1] = out.copy();
|
||||
@ -154,16 +154,16 @@ public class TileEntityRBMKOutgasser extends TileEntityRBMKSlottedBase implement
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onMelt(int reduce) {
|
||||
|
||||
|
||||
int count = 4 + worldObj.rand.nextInt(2);
|
||||
|
||||
|
||||
for(int i = 0; i < count; i++) {
|
||||
spawnDebris(DebrisType.BLANK);
|
||||
}
|
||||
|
||||
|
||||
super.onMelt(reduce);
|
||||
}
|
||||
|
||||
@ -186,19 +186,19 @@ public class TileEntityRBMKOutgasser extends TileEntityRBMKSlottedBase implement
|
||||
data.setDouble("progress", this.progress);
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
|
||||
|
||||
this.progress = nbt.getDouble("progress");
|
||||
this.gas.readFromNBT(nbt, "gas");
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbt) {
|
||||
super.writeToNBT(nbt);
|
||||
|
||||
|
||||
nbt.setDouble("progress", this.progress);
|
||||
this.gas.writeToNBT(nbt, "gas");
|
||||
}
|
||||
@ -260,7 +260,7 @@ public class TileEntityRBMKOutgasser extends TileEntityRBMKSlottedBase implement
|
||||
public Object[] getGasMax(Context context, Arguments args) {
|
||||
return new Object[] {gas.getMaxFill()};
|
||||
}
|
||||
|
||||
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getGasType(Context context, Arguments args) {
|
||||
@ -273,6 +273,15 @@ public class TileEntityRBMKOutgasser extends TileEntityRBMKSlottedBase implement
|
||||
return new Object[] {progress};
|
||||
}
|
||||
|
||||
@Callback(direct = true, doc = "Returns the unlocalized name and size of the stack that the outgasser is crafting (the input), or nil, nil if there is no stack")
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getCrafting(Context context, Arguments args) {
|
||||
if (slots[0] == null)
|
||||
return new Object[] { "", 0 };
|
||||
else
|
||||
return new Object[]{slots[0].getUnlocalizedName(), slots[0].stackSize };
|
||||
}
|
||||
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getCoordinates(Context context, Arguments args) {
|
||||
@ -282,7 +291,11 @@ public class TileEntityRBMKOutgasser extends TileEntityRBMKSlottedBase implement
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getInfo(Context context, Arguments args) {
|
||||
return new Object[] {gas.getFill(), gas.getMaxFill(), progress, gas.getTankType().getID(), xCoord, yCoord, zCoord};
|
||||
ItemStack input = slots[0];
|
||||
if (input != null)
|
||||
return new Object[] {gas.getFill(), gas.getMaxFill(), progress, gas.getTankType().getID(), xCoord, yCoord, zCoord, input.getUnlocalizedName(), input.stackSize };
|
||||
else
|
||||
return new Object[] {gas.getFill(), gas.getMaxFill(), progress, gas.getTankType().getID(), xCoord, yCoord, zCoord, "", 0 };
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -2,6 +2,7 @@ package com.hbm.tileentity.machine.rbmk;
|
||||
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
@ -11,7 +12,7 @@ import net.minecraft.nbt.NBTTagList;
|
||||
* Base class for RBMK components that have GUI slots and thus have to handle
|
||||
* those things Yes it's a copy pasted MachineBase class, thank the lack of
|
||||
* multiple inheritance for that
|
||||
*
|
||||
*
|
||||
* @author hbm
|
||||
*
|
||||
*/
|
||||
@ -87,6 +88,15 @@ public abstract class TileEntityRBMKSlottedBase extends TileEntityRBMKActiveBase
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUseableByPlayer(EntityPlayer player) {
|
||||
if(worldObj.getTileEntity(xCoord, yCoord, zCoord) != this) {
|
||||
return false;
|
||||
} else {
|
||||
return player.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <= 128;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack decrStackSize(int slot, int amount) {
|
||||
if(slots[slot] != null) {
|
||||
@ -124,10 +134,10 @@ public abstract class TileEntityRBMKSlottedBase extends TileEntityRBMKActiveBase
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
|
||||
|
||||
if(!diag) {
|
||||
NBTTagList list = nbt.getTagList("items", 10);
|
||||
|
||||
|
||||
for(int i = 0; i < list.tagCount(); i++) {
|
||||
NBTTagCompound nbt1 = list.getCompoundTagAt(i);
|
||||
byte b0 = nbt1.getByte("slot");
|
||||
@ -143,10 +153,10 @@ public abstract class TileEntityRBMKSlottedBase extends TileEntityRBMKActiveBase
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbt) {
|
||||
super.writeToNBT(nbt);
|
||||
|
||||
|
||||
if(!diag) {
|
||||
NBTTagList list = new NBTTagList();
|
||||
|
||||
|
||||
for(int i = 0; i < slots.length; i++) {
|
||||
if(slots[i] != null) {
|
||||
NBTTagCompound nbt1 = new NBTTagCompound();
|
||||
@ -156,7 +166,7 @@ public abstract class TileEntityRBMKSlottedBase extends TileEntityRBMKActiveBase
|
||||
}
|
||||
}
|
||||
nbt.setTag("items", list);
|
||||
|
||||
|
||||
if (customName != null) {
|
||||
nbt.setString("name", customName);
|
||||
}
|
||||
|
||||
@ -51,7 +51,8 @@ public class ArmorUtil {
|
||||
ArmorRegistry.registerHazard(ModItems.hazmat_helmet_grey, HazardClass.SAND);
|
||||
ArmorRegistry.registerHazard(ModItems.hazmat_paa_helmet, HazardClass.LIGHT, HazardClass.SAND);
|
||||
ArmorRegistry.registerHazard(ModItems.liquidator_helmet, HazardClass.LIGHT, HazardClass.SAND);
|
||||
ArmorRegistry.registerHazard(ModItems.t45_helmet, HazardClass.PARTICLE_COARSE, HazardClass.PARTICLE_FINE, HazardClass.GAS_LUNG, HazardClass.BACTERIA, HazardClass.GAS_BLISTERING, HazardClass.GAS_MONOXIDE, HazardClass.LIGHT, HazardClass.SAND);
|
||||
ArmorRegistry.registerHazard(ModItems.t45_helmet, HazardClass.PARTICLE_COARSE, HazardClass.PARTICLE_FINE, HazardClass.GAS_LUNG, HazardClass.BACTERIA, HazardClass.GAS_BLISTERING, HazardClass.GAS_MONOXIDE, HazardClass.SAND);
|
||||
ArmorRegistry.registerHazard(ModItems.t51_helmet, HazardClass.PARTICLE_COARSE, HazardClass.PARTICLE_FINE, HazardClass.GAS_LUNG, HazardClass.BACTERIA, HazardClass.GAS_BLISTERING, HazardClass.GAS_MONOXIDE, HazardClass.SAND);
|
||||
ArmorRegistry.registerHazard(ModItems.ajr_helmet, HazardClass.PARTICLE_COARSE, HazardClass.PARTICLE_FINE, HazardClass.GAS_LUNG, HazardClass.BACTERIA, HazardClass.GAS_BLISTERING, HazardClass.GAS_MONOXIDE, HazardClass.LIGHT, HazardClass.SAND);
|
||||
ArmorRegistry.registerHazard(ModItems.ajro_helmet, HazardClass.PARTICLE_COARSE, HazardClass.PARTICLE_FINE, HazardClass.GAS_LUNG, HazardClass.BACTERIA, HazardClass.GAS_BLISTERING, HazardClass.GAS_MONOXIDE, HazardClass.LIGHT, HazardClass.SAND);
|
||||
ArmorRegistry.registerHazard(ModItems.steamsuit_helmet, HazardClass.PARTICLE_COARSE, HazardClass.PARTICLE_FINE, HazardClass.GAS_LUNG, HazardClass.BACTERIA, HazardClass.GAS_BLISTERING, HazardClass.GAS_MONOXIDE, HazardClass.LIGHT, HazardClass.SAND);
|
||||
|
||||
@ -165,6 +165,12 @@ public class DamageResistanceHandler {
|
||||
.addCategory(CATEGORY_EXPLOSION, 5F, 0.25F)
|
||||
.addExact(DamageSource.fall.damageType, 0F, 1F)
|
||||
.setOther(0F, 0.1F));
|
||||
registerSet(ModItems.t51_helmet, ModItems.t51_plate, ModItems.t51_legs, ModItems.t51_boots, new ResistanceStats()
|
||||
.addCategory(CATEGORY_PHYSICAL, 2F, 0.15F)
|
||||
.addCategory(CATEGORY_FIRE, 0.5F, 0.35F)
|
||||
.addCategory(CATEGORY_EXPLOSION, 5F, 0.25F)
|
||||
.addExact(DamageSource.fall.damageType, 0F, 1F)
|
||||
.setOther(0F, 0.1F));
|
||||
registerSet(ModItems.ajr_helmet, ModItems.ajr_plate, ModItems.ajr_legs, ModItems.ajr_boots, new ResistanceStats()
|
||||
.addCategory(CATEGORY_PHYSICAL, 4F, 0.15F)
|
||||
.addCategory(CATEGORY_FIRE, 0.5F, 0.35F)
|
||||
|
||||
@ -92,23 +92,23 @@ public class MobUtil {
|
||||
}));
|
||||
|
||||
slotPoolAdv.put(4, createSlotPool(new Object[][]{
|
||||
{ModItems.security_helmet, 10}, {ModItems.t45_helmet, 4}, {ModItems.asbestos_helmet, 12},
|
||||
{ModItems.security_helmet, 10}, {ModItems.t51_helmet, 4}, {ModItems.asbestos_helmet, 12},
|
||||
{ModItems.liquidator_helmet, 4}, {ModItems.no9, 12},
|
||||
{ModItems.hazmat_helmet, 6}
|
||||
}));
|
||||
slotPoolAdv.put(3, createSlotPool(new Object[][]{
|
||||
{ModItems.liquidator_plate, 4}, {ModItems.security_plate, 8}, {ModItems.asbestos_plate, 12},
|
||||
{ModItems.t45_plate, 4}, {ModItems.hazmat_plate, 6},
|
||||
{ModItems.t51_plate, 4}, {ModItems.hazmat_plate, 6},
|
||||
{ModItems.steel_plate, 8}
|
||||
}));
|
||||
slotPoolAdv.put(2, createSlotPool(new Object[][]{
|
||||
{ModItems.liquidator_legs, 4}, {ModItems.security_legs, 8}, {ModItems.asbestos_legs, 12},
|
||||
{ModItems.t45_legs, 4}, {ModItems.hazmat_legs, 6},
|
||||
{ModItems.t51_legs, 4}, {ModItems.hazmat_legs, 6},
|
||||
{ModItems.steel_legs, 8}
|
||||
}));
|
||||
slotPoolAdv.put(1, createSlotPool(new Object[][]{
|
||||
{ModItems.liquidator_boots, 4}, {ModItems.security_boots, 8}, {ModItems.asbestos_boots, 12},
|
||||
{ModItems.t45_boots, 4}, {ModItems.hazmat_boots, 6},
|
||||
{ModItems.t51_boots, 4}, {ModItems.hazmat_boots, 6},
|
||||
{ModItems.robes_boots, 8}
|
||||
}));
|
||||
slotPoolAdv.put(0, createSlotPool(new Object[][]{
|
||||
|
||||
@ -3464,6 +3464,10 @@ item.t45_helmet.name=T45-Powerrüstungshelm
|
||||
item.t45_kit.name=T45-Powerrüstungskit
|
||||
item.t45_legs.name=T45-Powerrüstungsbeinschutz
|
||||
item.t45_plate.name=T45-Powerrüstungsbrustpanzer
|
||||
item.t51_boots.name=T-51b-Powerrüstungsstiefel
|
||||
item.t51_helmet.name=T-51b-Powerrüstungshelm
|
||||
item.t51_legs.name=T-51b-Powerrüstungsbeinschutz
|
||||
item.t51_plate.name=T-51b-Powerrüstungsbrustpanzer
|
||||
item.tank_steel.name=Stahltank
|
||||
item.taurun_boots.name=Taurun-Stiefel
|
||||
item.taurun_helmet.name=Taurun-Helm
|
||||
|
||||
@ -4584,6 +4584,10 @@ item.t45_helmet.name=T45 Power Armor Helmet
|
||||
item.t45_kit.name=T45 Power Armor Kit
|
||||
item.t45_legs.name=T45 Power Armor Leggings
|
||||
item.t45_plate.name=T45 Power Armor Chestplate
|
||||
item.t51_boots.name=T-51b Power Armor Boots
|
||||
item.t51_helmet.name=T-51b Power Armor Helmet
|
||||
item.t51_legs.name=T-51b Power Armor Leggings
|
||||
item.t51_plate.name=T-51b Power Armor Chestplate
|
||||
item.tank_steel.name=Steel Tank
|
||||
item.taurun_boots.name=Taurun Boots
|
||||
item.taurun_helmet.name=Taurun Helmet
|
||||
|
||||
3123
src/main/resources/assets/hbm/models/armor/t51.obj
Normal file
|
Before Width: | Height: | Size: 502 B After Width: | Height: | Size: 1010 B |
|
Before Width: | Height: | Size: 820 B After Width: | Height: | Size: 1.4 KiB |
BIN
src/main/resources/assets/hbm/textures/armor/t51_helmet.png
Normal file
|
After Width: | Height: | Size: 996 B |
|
Before Width: | Height: | Size: 380 B After Width: | Height: | Size: 851 B |
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 4.1 KiB |