Merge branch 'master' into crane

This commit is contained in:
HbmMods 2025-09-22 11:34:08 +02:00 committed by GitHub
commit 2d64453317
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
42 changed files with 3520 additions and 273 deletions

View File

@ -1,10 +1,23 @@
## Added
* T-51b power armor
* Serves as a replacement for the T-45
## Changed ## Changed
* Added more QMAW pages * Added more QMAW pages
* Removed most old particle accelerator blocks from the creative inventory * 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 * All dual wielded guns now render more accurately when dropped instead of only showing one gun
* Added support for left handed guns (currently unused)* * Added support for left handed guns (currently unused)*
* Removed the presentations for the old particle accelerator and schottky diode * 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
* Updated the factory structure
* NBT based structures now have a config for the spawn weight, unlike the old structure configs, higher numbers make structures more frequent
* Mobs are no longer registered in the vanilla namespace
* Drills no longer clip through depth rock, depth rock now has to be cleared before bedrock ore becomes accessible
* When an area modifier is selected on a tool, an icon will now render next to the crosshair to make it obvious that the modifier is active
## Fixed ## 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 * 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
* Fixed some QMAW link icons not having the correct block lighting applied * Fixed some QMAW link icons not having the correct block lighting applied
* Fixed a rare crash caused by RBMK neutron calculations happening in unloaded chunks

View File

@ -35,6 +35,8 @@ public class ClientConfig extends RunningConfig {
public static ConfigWrapper<Boolean> RENDER_REBAR_SIMPLE = new ConfigWrapper(false); public static ConfigWrapper<Boolean> RENDER_REBAR_SIMPLE = new ConfigWrapper(false);
public static ConfigWrapper<Integer> RENDER_HELIOSTAT_BEAM_LIMIT = new ConfigWrapper(250); public static ConfigWrapper<Integer> RENDER_HELIOSTAT_BEAM_LIMIT = new ConfigWrapper(250);
public static ConfigWrapper<Integer> RENDER_REBAR_LIMIT = new ConfigWrapper(250); public static ConfigWrapper<Integer> RENDER_REBAR_LIMIT = new ConfigWrapper(250);
public static ConfigWrapper<Integer> TOOL_HUD_INDICATOR_X = new ConfigWrapper(0);
public static ConfigWrapper<Integer> TOOL_HUD_INDICATOR_Y = new ConfigWrapper(0);
private static void initDefaults() { private static void initDefaults() {
configMap.put("GEIGER_OFFSET_HORIZONTAL", GEIGER_OFFSET_HORIZONTAL); configMap.put("GEIGER_OFFSET_HORIZONTAL", GEIGER_OFFSET_HORIZONTAL);
@ -59,6 +61,8 @@ public class ClientConfig extends RunningConfig {
configMap.put("RENDER_REBAR_SIMPLE", RENDER_REBAR_SIMPLE); configMap.put("RENDER_REBAR_SIMPLE", RENDER_REBAR_SIMPLE);
configMap.put("RENDER_HELIOSTAT_BEAM_LIMIT", RENDER_HELIOSTAT_BEAM_LIMIT); configMap.put("RENDER_HELIOSTAT_BEAM_LIMIT", RENDER_HELIOSTAT_BEAM_LIMIT);
configMap.put("RENDER_REBAR_LIMIT", RENDER_REBAR_LIMIT); configMap.put("RENDER_REBAR_LIMIT", RENDER_REBAR_LIMIT);
configMap.put("TOOL_HUD_INDICATOR_X", TOOL_HUD_INDICATOR_X);
configMap.put("TOOL_HUD_INDICATOR_Y", TOOL_HUD_INDICATOR_Y);
} }
/** Initializes defaults, then reads the config file if it exists, then writes the config file. */ /** Initializes defaults, then reads the config file if it exists, then writes the config file. */

View File

@ -41,6 +41,7 @@ public class StructureConfig {
public static int laboratorySpawnWeight = 20; public static int laboratorySpawnWeight = 20;
public static int lighthouseSpawnWeight = 4; public static int lighthouseSpawnWeight = 4;
public static int oilRigSpawnWeight = 5; public static int oilRigSpawnWeight = 5;
public static int broadcastingTowerSpawnWeight = 25;
public static int beachedPatrolSpawnWeight = 15; public static int beachedPatrolSpawnWeight = 15;
public static int vertibirdSpawnWeight = 6; public static int vertibirdSpawnWeight = 6;
public static int vertibirdCrashedSpawnWeight = 10; public static int vertibirdCrashedSpawnWeight = 10;
@ -110,10 +111,10 @@ public class StructureConfig {
ruinsJSpawnWeight = CommonConfig.createConfigInt(config, CATEGORY_STRUCTURES, "5.34_ruinJSpawnWeight", "Spawn weight for ruin J structure.", 12); ruinsJSpawnWeight = CommonConfig.createConfigInt(config, CATEGORY_STRUCTURES, "5.34_ruinJSpawnWeight", "Spawn weight for ruin J structure.", 12);
radioSpawnWeight = CommonConfig.createConfigInt(config, CATEGORY_STRUCTURES, "5.35_radioSpawnWeight", "Spawn weight for radio structure.", 25); radioSpawnWeight = CommonConfig.createConfigInt(config, CATEGORY_STRUCTURES, "5.35_radioSpawnWeight", "Spawn weight for radio structure.", 25);
factorySpawnWeight = CommonConfig.createConfigInt(config, CATEGORY_STRUCTURES, "5.36_factorySpawnWeight", "Spawn weight for factory structure.", 40); factorySpawnWeight = CommonConfig.createConfigInt(config, CATEGORY_STRUCTURES, "5.36_factorySpawnWeight", "Spawn weight for factory structure.", 40);
craneSpawnWeight = CommonConfig.createConfigInt(config, CATEGORY_STRUCTURES, "5.37_craneSpawnWeight", "Spawn weight for crane structure.", 20);
plainsNullWeight = CommonConfig.createConfigInt(config, CATEGORY_STRUCTURES, "5.37_plainsNullWeight", "Null spawn weight for plains biome", 20); plainsNullWeight = CommonConfig.createConfigInt(config, CATEGORY_STRUCTURES, "5.37_plainsNullWeight", "Null spawn weight for plains biome", 20);
oceanNullWeight = CommonConfig.createConfigInt(config, CATEGORY_STRUCTURES, "5.38_oceanNullWeight", "Null spawn weight for ocean biomes", 35); oceanNullWeight = CommonConfig.createConfigInt(config, CATEGORY_STRUCTURES, "5.38_oceanNullWeight", "Null spawn weight for ocean biomes", 35);
craneSpawnWeight = CommonConfig.createConfigInt(config, CATEGORY_STRUCTURES, "5.39_craneSpawnWeight", "Spawn weight for crane structure.", 20);
broadcastingTowerSpawnWeight = CommonConfig.createConfigInt(config, CATEGORY_STRUCTURES, "5.40_broadcastingTowerSpawnWeight", "Spawn weight for broadcasting tower structure.", 25);
structureMinChunks = CommonConfig.setDef(structureMinChunks, 4); structureMinChunks = CommonConfig.setDef(structureMinChunks, 4);

View File

@ -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() }); CraftingManager.addRecipeAuto(new ItemStack(ModItems.zirconium_legs, 1), new Object[] { "EEE", "E E", "E E", 'E', ZR.ingot() });
//Power armor //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.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.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.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.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.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.t45_boots, 1), new Object[] { "P P", "PBP", 'P', ModItems.plate_armor_titanium, 'B', ModItems.titanium_boots }); 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_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_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 }); 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 });

View File

@ -25,7 +25,6 @@ import com.hbm.entity.train.*;
import com.hbm.main.MainRegistry; import com.hbm.main.MainRegistry;
import com.hbm.util.Tuple.Quartet; import com.hbm.util.Tuple.Quartet;
import cpw.mods.fml.common.registry.EntityRegistry;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving; import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.EnumCreatureType; import net.minecraft.entity.EnumCreatureType;

View File

@ -60,7 +60,7 @@ public abstract class EntityRailCarElectric extends EntityRailCarRidable {
this.setPower(this.getPower() + powerTransfered); this.setPower(this.getPower() + powerTransfered);
} }
} else if(stack != null) { } else if(stack != null) {
if(stack.getItem() == ModItems.battery_creative || stack.getItem() == ModItems.fusion_core_infinite) { if(stack.getItem() == ModItems.battery_creative) {
this.setPower(this.getMaxPower()); this.setPower(this.getMaxPower());
} }
} }

View File

@ -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";
}

View File

@ -4,6 +4,7 @@ import com.hbm.blocks.machine.rbmk.RBMKBase;
import com.hbm.handler.neutron.NeutronNodeWorld.StreamWorld; import com.hbm.handler.neutron.NeutronNodeWorld.StreamWorld;
import com.hbm.handler.radiation.ChunkRadiationManager; import com.hbm.handler.radiation.ChunkRadiationManager;
import com.hbm.tileentity.machine.rbmk.*; import com.hbm.tileentity.machine.rbmk.*;
import com.hbm.util.Compat;
import com.hbm.util.fauxpointtwelve.BlockPos; import com.hbm.util.fauxpointtwelve.BlockPos;
import java.util.ArrayList; import java.util.ArrayList;
@ -35,7 +36,7 @@ public class RBMKNeutronHandler {
} }
private static TileEntity blockPosToTE(World worldObj, BlockPos pos) { 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) { 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); pos.mutate(origin.tile.xCoord + x, origin.tile.yCoord, origin.tile.zCoord + z);
NeutronNode node = streamWorld.getNode(pos); NeutronNode node = streamWorld.getNode(pos);
if(node != null && node instanceof RBMKNeutronNode) { if(node instanceof RBMKNeutronNode) {
positions[i - 1] = node; positions[i - 1] = node;
} else if(this.origin.tile.getBlockType() instanceof RBMKBase) { } else if(this.origin.tile.getBlockType() instanceof RBMKBase) {
TileEntity te = blockPosToTE(world, pos); TileEntity te = blockPosToTE(world, pos);

View File

@ -187,11 +187,10 @@ public class ItemPoolsLegacy {
//loot found in vertibirds //loot found in vertibirds
new ItemPool(POOL_VERTIBIRD) {{ new ItemPool(POOL_VERTIBIRD) {{
this.pool = new WeightedRandomChestContent[] { this.pool = new WeightedRandomChestContent[] {
weighted(ModItems.t45_helmet, 0, 1, 1, 15), weighted(ModItems.t51_helmet, 0, 1, 1, 15),
weighted(ModItems.t45_plate, 0, 1, 1, 15), weighted(ModItems.t51_plate, 0, 1, 1, 15),
weighted(ModItems.t45_legs, 0, 1, 1, 15), weighted(ModItems.t51_legs, 0, 1, 1, 15),
weighted(ModItems.t45_boots, 0, 1, 1, 15), weighted(ModItems.t51_boots, 0, 1, 1, 15),
weighted(ModItems.t45_kit, 0, 1, 1, 3),
weighted(ModItems.fusion_core, 0, 1, 1, 10), weighted(ModItems.fusion_core, 0, 1, 1, 10),
weighted(ModItems.gun_light_revolver, 0, 1, 1, 4), weighted(ModItems.gun_light_revolver, 0, 1, 1, 4),
weighted(ModItems.gun_kit_1, 0, 2, 3, 4), weighted(ModItems.gun_kit_1, 0, 2, 3, 4),

View File

@ -1666,7 +1666,6 @@ public class ModItems {
public static Item battery_potatos; public static Item battery_potatos;
public static Item hev_battery; public static Item hev_battery;
public static Item fusion_core; public static Item fusion_core;
public static Item fusion_core_infinite;
public static Item energy_core; public static Item energy_core;
public static Item fuse; public static Item fuse;
public static Item redcoil_capacitor; public static Item redcoil_capacitor;
@ -1742,10 +1741,14 @@ public class ModItems {
public static Item beta; public static Item beta;
public static Item no9; public static Item no9;
public static Item t45_helmet; @Deprecated public static Item t45_helmet;
public static Item t45_plate; @Deprecated public static Item t45_plate;
public static Item t45_legs; @Deprecated public static Item t45_legs;
public static Item t45_boots; @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_helmet;
public static Item steamsuit_plate; public static Item steamsuit_plate;
public static Item steamsuit_legs; public static Item steamsuit_legs;
@ -2107,7 +2110,6 @@ public class ModItems {
public static Item fleija_kit; public static Item fleija_kit;
public static Item prototype_kit; public static Item prototype_kit;
public static Item missile_kit; public static Item missile_kit;
public static Item t45_kit;
public static Item euphemium_kit; public static Item euphemium_kit;
public static Item solinium_kit; public static Item solinium_kit;
public static Item hazmat_kit; public static Item hazmat_kit;
@ -3930,7 +3932,6 @@ public class ModItems {
battery_potatos = new ItemPotatos(500000, 0, 100).setUnlocalizedName("battery_potatos").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_potatos"); battery_potatos = new ItemPotatos(500000, 0, 100).setUnlocalizedName("battery_potatos").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_potatos");
hev_battery = new ItemFusionCore(150000).setUnlocalizedName("hev_battery").setMaxStackSize(4).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":hev_battery"); hev_battery = new ItemFusionCore(150000).setUnlocalizedName("hev_battery").setMaxStackSize(4).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":hev_battery");
fusion_core = new ItemFusionCore(2500000).setUnlocalizedName("fusion_core").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":fusion_core"); fusion_core = new ItemFusionCore(2500000).setUnlocalizedName("fusion_core").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":fusion_core");
fusion_core_infinite = new Item().setUnlocalizedName("fusion_core_infinite").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":fusion_core_infinite");
energy_core = new ItemBattery(10000000, 0, 1000).setUnlocalizedName("energy_core").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":energy_core"); energy_core = new ItemBattery(10000000, 0, 1000).setUnlocalizedName("energy_core").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":energy_core");
fuse = new ItemCustomLore().setUnlocalizedName("fuse").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":fuse"); fuse = new ItemCustomLore().setUnlocalizedName("fuse").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":fuse");
redcoil_capacitor = new ItemCapacitor(10).setUnlocalizedName("redcoil_capacitor").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":redcoil_capacitor"); redcoil_capacitor = new ItemCapacitor(10).setUnlocalizedName("redcoil_capacitor").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":redcoil_capacitor");
@ -4027,7 +4028,6 @@ public class ModItems {
fleija_kit = new ItemStarterKit().setUnlocalizedName("fleija_kit").setMaxStackSize(1).setCreativeTab(MainRegistry.nukeTab).setTextureName(RefStrings.MODID + ":fleija_kit"); fleija_kit = new ItemStarterKit().setUnlocalizedName("fleija_kit").setMaxStackSize(1).setCreativeTab(MainRegistry.nukeTab).setTextureName(RefStrings.MODID + ":fleija_kit");
prototype_kit = new ItemStarterKit().setUnlocalizedName("prototype_kit").setMaxStackSize(1).setCreativeTab(MainRegistry.nukeTab).setTextureName(RefStrings.MODID + ":prototype_kit"); prototype_kit = new ItemStarterKit().setUnlocalizedName("prototype_kit").setMaxStackSize(1).setCreativeTab(MainRegistry.nukeTab).setTextureName(RefStrings.MODID + ":prototype_kit");
missile_kit = new ItemStarterKit().setUnlocalizedName("missile_kit").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":missile_kit"); missile_kit = new ItemStarterKit().setUnlocalizedName("missile_kit").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":missile_kit");
t45_kit = new ItemStarterKit().setUnlocalizedName("t45_kit").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":t45_kit");
euphemium_kit = new ItemStarterKit().setUnlocalizedName("euphemium_kit").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":code"); euphemium_kit = new ItemStarterKit().setUnlocalizedName("euphemium_kit").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":code");
solinium_kit = new ItemStarterKit().setUnlocalizedName("solinium_kit").setMaxStackSize(1).setCreativeTab(MainRegistry.nukeTab).setTextureName(RefStrings.MODID + ":solinium_kit"); solinium_kit = new ItemStarterKit().setUnlocalizedName("solinium_kit").setMaxStackSize(1).setCreativeTab(MainRegistry.nukeTab).setTextureName(RefStrings.MODID + ":solinium_kit");
hazmat_kit = new ItemStarterKit().setUnlocalizedName("hazmat_kit").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":hazmat_kit"); hazmat_kit = new ItemStarterKit().setUnlocalizedName("hazmat_kit").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":hazmat_kit");
@ -4255,6 +4255,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_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"); 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); ArmorMaterial aMatDesh = EnumHelper.addArmorMaterial("HBM_DESH", 150, new int[] { 3, 8, 6, 3 }, 0);
aMatDesh.customCraftingMaterial = ModItems.ingot_desh; 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) steamsuit_helmet = new ArmorDesh(aMatDesh, 0, RefStrings.MODID + ":textures/armor/starmetal_1.png", Fluids.STEAM, 64_000, 500, 50, 1)
@ -5742,7 +5756,6 @@ public class ModItems {
GameRegistry.registerItem(hev_battery, hev_battery.getUnlocalizedName()); GameRegistry.registerItem(hev_battery, hev_battery.getUnlocalizedName());
GameRegistry.registerItem(fusion_core, fusion_core.getUnlocalizedName()); GameRegistry.registerItem(fusion_core, fusion_core.getUnlocalizedName());
GameRegistry.registerItem(energy_core, energy_core.getUnlocalizedName()); GameRegistry.registerItem(energy_core, energy_core.getUnlocalizedName());
GameRegistry.registerItem(fusion_core_infinite, fusion_core_infinite.getUnlocalizedName());
//Folders //Folders
GameRegistry.registerItem(blueprints, blueprints.getUnlocalizedName()); GameRegistry.registerItem(blueprints, blueprints.getUnlocalizedName());
@ -6902,6 +6915,10 @@ public class ModItems {
GameRegistry.registerItem(t45_plate, t45_plate.getUnlocalizedName()); GameRegistry.registerItem(t45_plate, t45_plate.getUnlocalizedName());
GameRegistry.registerItem(t45_legs, t45_legs.getUnlocalizedName()); GameRegistry.registerItem(t45_legs, t45_legs.getUnlocalizedName());
GameRegistry.registerItem(t45_boots, t45_boots.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_helmet, ajr_helmet.getUnlocalizedName());
GameRegistry.registerItem(ajr_plate, ajr_plate.getUnlocalizedName()); GameRegistry.registerItem(ajr_plate, ajr_plate.getUnlocalizedName());
GameRegistry.registerItem(ajr_legs, ajr_legs.getUnlocalizedName()); GameRegistry.registerItem(ajr_legs, ajr_legs.getUnlocalizedName());
@ -7079,7 +7096,6 @@ public class ModItems {
GameRegistry.registerItem(custom_kit, custom_kit.getUnlocalizedName()); GameRegistry.registerItem(custom_kit, custom_kit.getUnlocalizedName());
GameRegistry.registerItem(missile_kit, missile_kit.getUnlocalizedName()); GameRegistry.registerItem(missile_kit, missile_kit.getUnlocalizedName());
GameRegistry.registerItem(grenade_kit, grenade_kit.getUnlocalizedName()); GameRegistry.registerItem(grenade_kit, grenade_kit.getUnlocalizedName());
GameRegistry.registerItem(t45_kit, t45_kit.getUnlocalizedName());
GameRegistry.registerItem(hazmat_kit, hazmat_kit.getUnlocalizedName()); GameRegistry.registerItem(hazmat_kit, hazmat_kit.getUnlocalizedName());
GameRegistry.registerItem(hazmat_red_kit, hazmat_red_kit.getUnlocalizedName()); GameRegistry.registerItem(hazmat_red_kit, hazmat_red_kit.getUnlocalizedName());
GameRegistry.registerItem(hazmat_grey_kit, hazmat_grey_kit.getUnlocalizedName()); GameRegistry.registerItem(hazmat_grey_kit, hazmat_grey_kit.getUnlocalizedName());

View File

@ -26,6 +26,7 @@ public class ArmorT45 extends ArmorFSBPowered {
public ArmorT45(ArmorMaterial material, int slot, long maxPower, long chargeRate, long consumption, long drain) { public ArmorT45(ArmorMaterial material, int slot, long maxPower, long chargeRate, long consumption, long drain) {
super(material, slot, "", maxPower, chargeRate, consumption, drain); super(material, slot, "", maxPower, chargeRate, consumption, drain);
this.setCreativeTab(null);
} }
@Override @Override

View 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];
}
}

View File

@ -7,7 +7,6 @@ import com.hbm.interfaces.Spaghetti;
import com.hbm.inventory.OreDictManager.DictFrame; import com.hbm.inventory.OreDictManager.DictFrame;
import com.hbm.inventory.fluid.Fluids; import com.hbm.inventory.fluid.Fluids;
import com.hbm.items.ModItems; import com.hbm.items.ModItems;
import com.hbm.items.machine.ItemBattery;
import com.hbm.items.machine.ItemBreedingRod.BreedingRodType; import com.hbm.items.machine.ItemBreedingRod.BreedingRodType;
import com.hbm.items.machine.ItemCircuit.EnumCircuitType; import com.hbm.items.machine.ItemCircuit.EnumCircuitType;
@ -407,21 +406,6 @@ public class ItemStarterKit extends Item {
player.inventory.addItemStackToInventory(new ItemStack(ModItems.missile_emp, 1)); player.inventory.addItemStackToInventory(new ItemStack(ModItems.missile_emp, 1));
} }
if(this == ModItems.t45_kit)
{
player.inventory.addItemStackToInventory(new ItemStack(ModItems.t45_helmet, 1));
player.inventory.addItemStackToInventory(new ItemStack(ModItems.t45_plate, 1));
player.inventory.addItemStackToInventory(new ItemStack(ModItems.t45_legs, 1));
player.inventory.addItemStackToInventory(new ItemStack(ModItems.t45_boots, 1));
player.inventory.addItemStackToInventory(ItemBattery.getFullBattery(ModItems.fusion_core));
player.inventory.addItemStackToInventory(ItemBattery.getFullBattery(ModItems.fusion_core));
player.inventory.addItemStackToInventory(ItemBattery.getFullBattery(ModItems.fusion_core));
player.inventory.addItemStackToInventory(ItemBattery.getFullBattery(ModItems.fusion_core));
player.inventory.addItemStackToInventory(ItemBattery.getFullBattery(ModItems.fusion_core));
player.inventory.addItemStackToInventory(ItemBattery.getFullBattery(ModItems.fusion_core));
player.inventory.addItemStackToInventory(ItemBattery.getFullBattery(ModItems.fusion_core));
}
if(this == ModItems.stealth_boy) if(this == ModItems.stealth_boy)
{ {
player.addPotionEffect(new PotionEffect(Potion.invisibility.id, 30 * 20, 1, true)); player.addPotionEffect(new PotionEffect(Potion.invisibility.id, 30 * 20, 1, true));
@ -470,7 +454,6 @@ public class ItemStarterKit extends Item {
this == ModItems.prototype_kit || this == ModItems.prototype_kit ||
this == ModItems.fleija_kit || this == ModItems.fleija_kit ||
this == ModItems.solinium_kit || this == ModItems.solinium_kit ||
this == ModItems.t45_kit ||
this == ModItems.grenade_kit || this == ModItems.grenade_kit ||
this == ModItems.missile_kit || this == ModItems.missile_kit ||
this == ModItems.multi_kit) { this == ModItems.multi_kit) {

View File

@ -4,29 +4,36 @@ import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Comparator; import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet; import java.util.HashSet;
import java.util.List; import java.util.List;
import java.util.Locale; import java.util.Locale;
import java.util.Map;
import java.util.Random; import java.util.Random;
import java.util.Set; import java.util.Set;
import org.lwjgl.opengl.GL11;
import com.google.common.collect.HashMultimap; import com.google.common.collect.HashMultimap;
import com.google.common.collect.Multimap; import com.google.common.collect.Multimap;
import com.google.common.collect.Sets; import com.google.common.collect.Sets;
import com.hbm.inventory.gui.GUIScreenToolAbility;
import com.hbm.items.IItemControlReceiver;
import com.hbm.items.IKeybindReceiver;
import com.hbm.handler.HbmKeybinds.EnumKeybind;
import com.hbm.blocks.ModBlocks; import com.hbm.blocks.ModBlocks;
import com.hbm.config.ClientConfig;
import com.hbm.handler.HbmKeybinds.EnumKeybind;
import com.hbm.handler.ability.AvailableAbilities; import com.hbm.handler.ability.AvailableAbilities;
import com.hbm.handler.ability.IBaseAbility; import com.hbm.handler.ability.IBaseAbility;
import com.hbm.handler.ability.IToolAreaAbility; import com.hbm.handler.ability.IToolAreaAbility;
import com.hbm.handler.ability.IToolHarvestAbility; import com.hbm.handler.ability.IToolHarvestAbility;
import com.hbm.handler.ability.ToolPreset; import com.hbm.handler.ability.ToolPreset;
import com.hbm.interfaces.IItemHUD;
import com.hbm.inventory.gui.GUIScreenToolAbility;
import com.hbm.items.IItemControlReceiver;
import com.hbm.items.IKeybindReceiver;
import com.hbm.main.MainRegistry; import com.hbm.main.MainRegistry;
import com.hbm.packet.PacketDispatcher; import com.hbm.packet.PacketDispatcher;
import com.hbm.packet.toclient.PlayerInformPacket; import com.hbm.packet.toclient.PlayerInformPacket;
import com.hbm.tileentity.IGUIProvider; import com.hbm.tileentity.IGUIProvider;
import com.hbm.util.Tuple.Pair;
import api.hbm.item.IDepthRockTool; import api.hbm.item.IDepthRockTool;
import cpw.mods.fml.relauncher.ReflectionHelper; import cpw.mods.fml.relauncher.ReflectionHelper;
@ -34,6 +41,10 @@ import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.Gui;
import net.minecraft.client.gui.GuiIngame;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.enchantment.Enchantment; import net.minecraft.enchantment.Enchantment;
import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityLivingBase;
@ -53,12 +64,14 @@ import net.minecraft.network.play.server.S23PacketBlockChange;
import net.minecraft.stats.StatList; import net.minecraft.stats.StatList;
import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.EnumChatFormatting;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType;
import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre;
import net.minecraftforge.common.ForgeHooks; import net.minecraftforge.common.ForgeHooks;
import net.minecraftforge.common.IShearable; import net.minecraftforge.common.IShearable;
import net.minecraftforge.event.world.BlockEvent; import net.minecraftforge.event.world.BlockEvent;
public class ItemToolAbility extends ItemTool implements IDepthRockTool, IGUIProvider, IItemControlReceiver, IKeybindReceiver { public class ItemToolAbility extends ItemTool implements IDepthRockTool, IGUIProvider, IItemControlReceiver, IKeybindReceiver, IItemHUD {
protected boolean isShears = false; protected boolean isShears = false;
protected EnumToolType toolType; protected EnumToolType toolType;
protected EnumRarity rarity = EnumRarity.common; protected EnumRarity rarity = EnumRarity.common;
@ -69,7 +82,7 @@ public class ItemToolAbility extends ItemTool implements IDepthRockTool, IGUIPro
protected boolean rockBreaker = false; protected boolean rockBreaker = false;
public static enum EnumToolType { public static enum EnumToolType {
PICKAXE( PICKAXE(
Sets.newHashSet(new Material[] { Material.iron, Material.anvil, Material.rock, Material.glass }), Sets.newHashSet(new Material[] { Material.iron, Material.anvil, Material.rock, Material.glass }),
Sets.newHashSet(new Block[] { Blocks.cobblestone, Blocks.double_stone_slab, Blocks.stone_slab, Blocks.stone, Blocks.sandstone, Blocks.mossy_cobblestone, Blocks.iron_ore, Blocks.iron_block, Blocks.coal_ore, Blocks.gold_block, Blocks.gold_ore, Blocks.diamond_ore, Blocks.diamond_block, Blocks.ice, Blocks.netherrack, Blocks.lapis_ore, Blocks.lapis_block, Blocks.redstone_ore, Blocks.lit_redstone_ore, Blocks.rail, Blocks.detector_rail, Blocks.golden_rail, Blocks.activator_rail }) Sets.newHashSet(new Block[] { Blocks.cobblestone, Blocks.double_stone_slab, Blocks.stone_slab, Blocks.stone, Blocks.sandstone, Blocks.mossy_cobblestone, Blocks.iron_ore, Blocks.iron_block, Blocks.coal_ore, Blocks.gold_block, Blocks.gold_ore, Blocks.diamond_ore, Blocks.diamond_block, Blocks.ice, Blocks.netherrack, Blocks.lapis_ore, Blocks.lapis_block, Blocks.redstone_ore, Blocks.lit_redstone_ore, Blocks.rail, Blocks.detector_rail, Blocks.golden_rail, Blocks.activator_rail })
@ -98,7 +111,7 @@ public class ItemToolAbility extends ItemTool implements IDepthRockTool, IGUIPro
public Set<Material> materials = new HashSet(); public Set<Material> materials = new HashSet();
public Set<Block> blocks = new HashSet(); public Set<Block> blocks = new HashSet();
} }
public ItemToolAbility setShears() { public ItemToolAbility setShears() {
this.isShears = true; this.isShears = true;
return this; return this;
@ -109,7 +122,7 @@ public class ItemToolAbility extends ItemTool implements IDepthRockTool, IGUIPro
this.damage = damage; this.damage = damage;
this.movement = movement; this.movement = movement;
this.toolType = type; this.toolType = type;
// hacky workaround, might be good to rethink this entire system // hacky workaround, might be good to rethink this entire system
if(type == EnumToolType.MINER) { if(type == EnumToolType.MINER) {
this.setHarvestLevel("pickaxe", material.getHarvestLevel()); this.setHarvestLevel("pickaxe", material.getHarvestLevel());
@ -163,15 +176,15 @@ public class ItemToolAbility extends ItemTool implements IDepthRockTool, IGUIPro
World world = player.worldObj; World world = player.worldObj;
Block block = world.getBlock(x, y, z); Block block = world.getBlock(x, y, z);
/* /*
* The original implementation of this always returned FALSE which uses the vanilla block break code. * The original implementation of this always returned FALSE which uses the vanilla block break code.
* This one now returns TRUE when an ability applies and instead relies on breakExtraBlock, which has the minor * This one now returns TRUE when an ability applies and instead relies on breakExtraBlock, which has the minor
* issue of only running on the sever, while the client uses the vanilla implementation. breakExtraBlock was only * issue of only running on the sever, while the client uses the vanilla implementation. breakExtraBlock was only
* meant to be used for AoE or vein miner and not for the block that's being mined, hence break EXTRA block. * meant to be used for AoE or vein miner and not for the block that's being mined, hence break EXTRA block.
* The consequence was that the server would fail to break keyholes since breakExtraBlock is supposed to exclude * The consequence was that the server would fail to break keyholes since breakExtraBlock is supposed to exclude
* them, while the client happily removes the block, causing a desync. * them, while the client happily removes the block, causing a desync.
* *
* Since keyholes aren't processable and exempt from silk touch anyway, we just default to the vanilla implementation in every case. * Since keyholes aren't processable and exempt from silk touch anyway, we just default to the vanilla implementation in every case.
*/ */
if(block == ModBlocks.stone_keyhole || block == ModBlocks.stone_keyhole_meta) return false; if(block == ModBlocks.stone_keyhole || block == ModBlocks.stone_keyhole_meta) return false;
@ -187,7 +200,7 @@ public class ItemToolAbility extends ItemTool implements IDepthRockTool, IGUIPro
preset.harvestAbility.preHarvestAll(preset.harvestAbilityLevel, world, player); preset.harvestAbility.preHarvestAll(preset.harvestAbilityLevel, world, player);
boolean skipRef = preset.areaAbility.onDig(preset.areaAbilityLevel, world, x, y, z, player, this); boolean skipRef = preset.areaAbility.onDig(preset.areaAbilityLevel, world, x, y, z, player, this);
if(!skipRef) { if(!skipRef) {
breakExtraBlock(world, x, y, z, player, x, y, z); breakExtraBlock(world, x, y, z, player, x, y, z);
} }
@ -291,7 +304,7 @@ public class ItemToolAbility extends ItemTool implements IDepthRockTool, IGUIPro
Block block = world.getBlock(x, y, z); Block block = world.getBlock(x, y, z);
int meta = world.getBlockMetadata(x, y, z); int meta = world.getBlockMetadata(x, y, z);
if(!(canHarvestBlock(block, stack) || if(!(canHarvestBlock(block, stack) ||
canShearBlock(block, stack, world, x, y, z)) || canShearBlock(block, stack, world, x, y, z)) ||
(block.getBlockHardness(world, x, y, z) == -1.0F && block.getPlayerRelativeBlockHardness(player, world, x, y, z) == 0.0F) || (block.getBlockHardness(world, x, y, z) == -1.0F && block.getPlayerRelativeBlockHardness(player, world, x, y, z) == 0.0F) ||
@ -302,8 +315,8 @@ public class ItemToolAbility extends ItemTool implements IDepthRockTool, IGUIPro
float strength = ForgeHooks.blockStrength(block, player, world, x, y, z); float strength = ForgeHooks.blockStrength(block, player, world, x, y, z);
if( if(
!ForgeHooks.canHarvestBlock(block, player, meta) || !ForgeHooks.canHarvestBlock(block, player, meta) ||
refStrength / strength > 10f || refStrength / strength > 10f ||
refBlock.getPlayerRelativeBlockHardness(player, world, refX, refY, refZ) < 0 refBlock.getPlayerRelativeBlockHardness(player, world, refX, refY, refZ) < 0
) )
return; return;
@ -320,7 +333,7 @@ public class ItemToolAbility extends ItemTool implements IDepthRockTool, IGUIPro
/** Assumes a canShearBlock check has passed, will most likely crash otherwise! */ /** Assumes a canShearBlock check has passed, will most likely crash otherwise! */
public static void shearBlock(World world, int x, int y, int z, Block block, EntityPlayer player) { public static void shearBlock(World world, int x, int y, int z, Block block, EntityPlayer player) {
ItemStack held = player.getHeldItem(); ItemStack held = player.getHeldItem();
IShearable target = (IShearable) block; IShearable target = (IShearable) block;
@ -369,7 +382,7 @@ public class ItemToolAbility extends ItemTool implements IDepthRockTool, IGUIPro
player.destroyCurrentEquippedItem(); player.destroyCurrentEquippedItem();
} }
} }
if(removedByPlayer && canHarvest) { if(removedByPlayer && canHarvest) {
try { try {
blockCaptureDrops.invoke(block, true); blockCaptureDrops.invoke(block, true);
@ -384,7 +397,7 @@ public class ItemToolAbility extends ItemTool implements IDepthRockTool, IGUIPro
} catch (InvocationTargetException e) { } catch (InvocationTargetException e) {
// Might be possible? Not in practice, though // Might be possible? Not in practice, though
MainRegistry.logger.error("Failed to capture drops for block " + block, e); MainRegistry.logger.error("Failed to capture drops for block " + block, e);
} }
} }
} }
@ -441,9 +454,9 @@ public class ItemToolAbility extends ItemTool implements IDepthRockTool, IGUIPro
NBTTagList nbtPresets = nbt.getTagList("abilityPresets", 10); NBTTagList nbtPresets = nbt.getTagList("abilityPresets", 10);
int numPresets = Math.min(nbtPresets.tagCount(), 99); int numPresets = Math.min(nbtPresets.tagCount(), 99);
presets = new ArrayList<ToolPreset>(numPresets); presets = new ArrayList<ToolPreset>(numPresets);
for(int i = 0; i < numPresets; i++) { for(int i = 0; i < numPresets; i++) {
NBTTagCompound nbtPreset = nbtPresets.getCompoundTagAt(i); NBTTagCompound nbtPreset = nbtPresets.getCompoundTagAt(i);
ToolPreset preset = new ToolPreset(); ToolPreset preset = new ToolPreset();
@ -544,12 +557,12 @@ public class ItemToolAbility extends ItemTool implements IDepthRockTool, IGUIPro
@Override @Override
public void handleKeybind(EntityPlayer player, ItemStack stack, EnumKeybind keybind, boolean state) { public void handleKeybind(EntityPlayer player, ItemStack stack, EnumKeybind keybind, boolean state) {
if(keybind == EnumKeybind.ABILITY_CYCLE && state) { if(keybind == EnumKeybind.ABILITY_CYCLE && state) {
World world = player.worldObj; World world = player.worldObj;
if(!canOperate(stack)) return; if(!canOperate(stack)) return;
Configuration config = getConfiguration(stack); Configuration config = getConfiguration(stack);
if(config.presets.size() < 2 || world.isRemote) return; if(config.presets.size() < 2 || world.isRemote) return;
@ -569,4 +582,40 @@ public class ItemToolAbility extends ItemTool implements IDepthRockTool, IGUIPro
public void handleKeybindClient(EntityPlayer player, ItemStack stack, EnumKeybind keybind, boolean state) { public void handleKeybindClient(EntityPlayer player, ItemStack stack, EnumKeybind keybind, boolean state) {
if(state) player.openGui(MainRegistry.instance, 0, player.worldObj, 0, 0, 0); if(state) player.openGui(MainRegistry.instance, 0, player.worldObj, 0, 0, 0);
} }
private static final Map<IBaseAbility, Pair<Integer, Integer>> abilityGui = new HashMap<>();
static {
abilityGui.put(IToolAreaAbility.RECURSION, new Pair<Integer,Integer>(0, 138));
abilityGui.put(IToolAreaAbility.HAMMER, new Pair<Integer,Integer>(16, 138));
abilityGui.put(IToolAreaAbility.HAMMER_FLAT, new Pair<Integer,Integer>(32, 138));
abilityGui.put(IToolAreaAbility.EXPLOSION, new Pair<Integer,Integer>(48, 138));
}
@Override
public void renderHUD(Pre event, ElementType type, EntityPlayer player, ItemStack stack) {
if(type != ElementType.CROSSHAIRS) return;
Configuration config = getConfiguration(stack);
ToolPreset preset = config.getActivePreset();
Pair<Integer, Integer> uv = abilityGui.get(preset.areaAbility);
if(uv == null) return;
GuiIngame gui = Minecraft.getMinecraft().ingameGUI;
int size = 16;
int ox = ClientConfig.TOOL_HUD_INDICATOR_X.get();
int oy = ClientConfig.TOOL_HUD_INDICATOR_Y.get();
GL11.glPushMatrix();
Minecraft.getMinecraft().renderEngine.bindTexture(GUIScreenToolAbility.texture);
GL11.glEnable(GL11.GL_BLEND);
OpenGlHelper.glBlendFunc(GL11.GL_ONE_MINUS_DST_COLOR, GL11.GL_ONE_MINUS_SRC_COLOR, 1, 0);
gui.drawTexturedModalRect(event.resolution.getScaledWidth() / 2 - size - 8 + ox, event.resolution.getScaledHeight() / 2 + 8 + oy, uv.key, uv.value, size, size);
OpenGlHelper.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, 1, 0);
GL11.glDisable(GL11.GL_BLEND);
GL11.glPopMatrix();
Minecraft.getMinecraft().renderEngine.bindTexture(Gui.icons);
}
} }

View File

@ -1,7 +1,6 @@
package com.hbm.items.weapon; package com.hbm.items.weapon;
import java.util.List; import java.util.List;
import java.util.Random;
import com.google.common.collect.HashMultimap; import com.google.common.collect.HashMultimap;
import com.google.common.collect.Multimap; import com.google.common.collect.Multimap;

View File

@ -48,6 +48,8 @@ public class ConfettiUtil {
if(entity instanceof EntitySkeleton) return; if(entity instanceof EntitySkeleton) return;
if(entity instanceof EntitySlime) return; if(entity instanceof EntitySlime) return;
SkeletonCreator.composeEffectGib(entity.worldObj, entity, 0.25F);
NBTTagCompound vdat = new NBTTagCompound(); NBTTagCompound vdat = new NBTTagCompound();
vdat.setString("type", "giblets"); vdat.setString("type", "giblets");
vdat.setInteger("ent", entity.getEntityId()); vdat.setInteger("ent", entity.getEntityId());

View File

@ -237,7 +237,6 @@ public class Library {
if(power > maxPower) return maxPower; if(power > maxPower) return maxPower;
if(slots[index] != null && slots[index].getItem() == ModItems.battery_creative) return 0; if(slots[index] != null && slots[index].getItem() == ModItems.battery_creative) return 0;
if(slots[index] != null && slots[index].getItem() == ModItems.fusion_core_infinite) return 0;
if(slots[index] != null && slots[index].getItem() instanceof IBatteryItem) { if(slots[index] != null && slots[index].getItem() instanceof IBatteryItem) {
@ -259,7 +258,6 @@ public class Library {
public static long chargeTEFromItems(ItemStack[] slots, int index, long power, long maxPower) { public static long chargeTEFromItems(ItemStack[] slots, int index, long power, long maxPower) {
if(slots[index] != null && slots[index].getItem() == ModItems.battery_creative) return maxPower; if(slots[index] != null && slots[index].getItem() == ModItems.battery_creative) return maxPower;
if(slots[index] != null && slots[index].getItem() == ModItems.fusion_core_infinite) return maxPower;
if(slots[index] != null && slots[index].getItem() instanceof IBatteryItem) { if(slots[index] != null && slots[index].getItem() instanceof IBatteryItem) {

View File

@ -41,7 +41,6 @@ import com.hbm.handler.HbmKeybinds;
import com.hbm.handler.HbmKeybinds.EnumKeybind; import com.hbm.handler.HbmKeybinds.EnumKeybind;
import com.hbm.handler.ImpactWorldHandler; import com.hbm.handler.ImpactWorldHandler;
import com.hbm.handler.imc.IMCHandlerNHNEI; import com.hbm.handler.imc.IMCHandlerNHNEI;
import com.hbm.items.IAnimatedItem;
import com.hbm.items.ModItems; import com.hbm.items.ModItems;
import com.hbm.items.weapon.sedna.factory.GunFactoryClient; import com.hbm.items.weapon.sedna.factory.GunFactoryClient;
import com.hbm.lib.RefStrings; import com.hbm.lib.RefStrings;
@ -49,10 +48,6 @@ import com.hbm.particle.*;
import com.hbm.particle.helper.ParticleCreators; import com.hbm.particle.helper.ParticleCreators;
import com.hbm.particle.psys.engine.EventHandlerParticleEngine; import com.hbm.particle.psys.engine.EventHandlerParticleEngine;
import com.hbm.qmaw.QMAWLoader; 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.block.*;
import com.hbm.render.entity.RenderEmpty; import com.hbm.render.entity.RenderEmpty;
import com.hbm.render.entity.effect.*; import com.hbm.render.entity.effect.*;

View File

@ -1428,6 +1428,8 @@ public class MainRegistry {
ignoreMappings.add("hbm:item.mp_f_20"); ignoreMappings.add("hbm:item.mp_f_20");
ignoreMappings.add("hbm:item.mp_thruster_10_kerosene_tec"); ignoreMappings.add("hbm:item.mp_thruster_10_kerosene_tec");
ignoreMappings.add("hbm:item.mp_thruster_15_kerosene_tec"); ignoreMappings.add("hbm:item.mp_thruster_15_kerosene_tec");
ignoreMappings.add("hbm:item.t45_kit");
ignoreMappings.add("hbm:item.fusion_core_infinite");
/// REMAP /// /// REMAP ///
remapItems.put("hbm:item.gadget_explosive8", ModItems.early_explosive_lenses); remapItems.put("hbm:item.gadget_explosive8", ModItems.early_explosive_lenses);

View File

@ -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_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 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_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")); 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")); public static final IModelCustom armor_ajr = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/AJR.obj")).asVBO();
public static final IModelCustom armor_hat = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/hat.obj")); public static final IModelCustom armor_t51 = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/t51.obj")).asVBO();
public static final IModelCustom armor_no9 = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/no9.obj")); public static final IModelCustom armor_hat = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/hat.obj")).asVBO();
public static final IModelCustom armor_goggles = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/goggles.obj")); public static final IModelCustom armor_no9 = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/no9.obj")).asVBO();
public static final IModelCustom armor_fau = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/fau.obj")); public static final IModelCustom armor_goggles = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/goggles.obj")).asVBO();
public static final IModelCustom armor_dnt = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/dnt.obj")); public static final IModelCustom armor_fau = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/fau.obj")).asVBO();
public static final IModelCustom armor_steamsuit = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/steamsuit.obj")); public static final IModelCustom armor_dnt = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/dnt.obj")).asVBO();
public static final IModelCustom armor_dieselsuit = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/bnuuy.obj")); public static final IModelCustom armor_steamsuit = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/steamsuit.obj")).asVBO();
public static final IModelCustom armor_remnant = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/remnant.obj")); public static final IModelCustom armor_dieselsuit = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/bnuuy.obj")).asVBO();
public static final IModelCustom armor_bismuth = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/bismuth.obj")); public static final IModelCustom armor_remnant = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/remnant.obj")).asVBO();
public static final IModelCustom armor_mod_tesla = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/mod_tesla.obj")); public static final IModelCustom armor_bismuth = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/bismuth.obj")).asVBO();
public static final IModelCustom armor_wings = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/murk.obj")); public static final IModelCustom armor_mod_tesla = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/mod_tesla.obj")).asVBO();
public static final IModelCustom armor_axepack = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/wings_pheo.obj")); public static final IModelCustom armor_wings = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/murk.obj")).asVBO();
public static final IModelCustom armor_tail = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/tail_peep.obj")); public static final IModelCustom armor_axepack = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/wings_pheo.obj")).asVBO();
public static final IModelCustom player_manly_af = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/armor/player_fem.obj")); public static final IModelCustom armor_tail = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/tail_peep.obj")).asVBO();
public static final IModelCustom armor_envsuit = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/envsuit.obj")); 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_taurun = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/taurun.obj")); public static final IModelCustom armor_envsuit = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/envsuit.obj")).asVBO();
public static final IModelCustom armor_trenchmaster = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/trenchmaster.obj")); 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 ////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_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 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_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_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"); public static final ResourceLocation fau_chest = new ResourceLocation(RefStrings.MODID, "textures/armor/fau_chest.png");

View File

@ -84,8 +84,8 @@ public class StructureManager {
public static final NBTStructure plane2 = new NBTStructure(new ResourceLocation(RefStrings.MODID, "structures/crashed_plane_2.nbt")); public static final NBTStructure plane2 = new NBTStructure(new ResourceLocation(RefStrings.MODID, "structures/crashed_plane_2.nbt"));
public static final NBTStructure factory = new NBTStructure(new ResourceLocation(RefStrings.MODID, "structures/factory.nbt")); public static final NBTStructure factory = new NBTStructure(new ResourceLocation(RefStrings.MODID, "structures/factory.nbt"));
public static final NBTStructure crane = new NBTStructure(new ResourceLocation(RefStrings.MODID, "structures/crane.nbt")); public static final NBTStructure crane = new NBTStructure(new ResourceLocation(RefStrings.MODID, "structures/crane.nbt"));
public static final NBTStructure broadcasting_tower = new NBTStructure(new ResourceLocation(RefStrings.MODID, "structures/broadcasting_tower.nbt"));
public static final NBTStructure spire = new NBTStructure(new ResourceLocation(RefStrings.MODID, "structures/spire.nbt")); public static final NBTStructure spire = new NBTStructure(new ResourceLocation(RefStrings.MODID, "structures/spire.nbt"));

View File

@ -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 = 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_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(); public static final IModelCustom skeleton = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/effect/skeleton.obj"), false).asVBO();
protected EnumSkeletonType type; protected EnumSkeletonType type;
public ResourceLocation useTexture;
public ResourceLocation useTextureExt;
private float momentumYaw; private float momentumYaw;
private float momentumPitch; private float momentumPitch;
@ -50,6 +55,18 @@ public class ParticleSkeleton extends EntityFX {
this.momentumPitch = rand.nextFloat() * 5 * (rand.nextBoolean() ? 1 : -1); this.momentumPitch = rand.nextFloat() * 5 * (rand.nextBoolean() ? 1 : -1);
this.momentumYaw = 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 @Override
@ -139,16 +156,16 @@ public class ParticleSkeleton extends EntityFX {
switch(type) { switch(type) {
case SKULL: case SKULL:
this.textureManager.bindTexture(texture); this.textureManager.bindTexture(useTexture);
skeleton.renderPart("Skull"); break; skeleton.renderPart("Skull"); break;
case TORSO: case TORSO:
this.textureManager.bindTexture(texture); this.textureManager.bindTexture(useTexture);
skeleton.renderPart("Torso"); break; skeleton.renderPart("Torso"); break;
case LIMB: case LIMB:
this.textureManager.bindTexture(texture); this.textureManager.bindTexture(useTexture);
skeleton.renderPart("Limb"); break; skeleton.renderPart("Limb"); break;
case SKULL_VILLAGER: case SKULL_VILLAGER:
this.textureManager.bindTexture(texture_ext); this.textureManager.bindTexture(useTextureExt);
skeleton.renderPart("SkullVillager"); break; skeleton.renderPart("SkullVillager"); break;
} }

View File

@ -33,20 +33,31 @@ public class SkeletonCreator implements IParticleCreator {
public static HashMap<String, Function<EntityLivingBase, BoneDefinition[]>> skullanizer = new HashMap(); public static HashMap<String, Function<EntityLivingBase, BoneDefinition[]>> skullanizer = new HashMap();
public static void composeEffect(World world, Entity toSkeletonize, float brightness) { public static void composeEffect(World world, Entity toSkeletonize, float brightness) {
NBTTagCompound data = new NBTTagCompound(); NBTTagCompound data = new NBTTagCompound();
data.setString("type", "skeleton"); data.setString("type", "skeleton");
data.setInteger("entityID", toSkeletonize.getEntityId()); data.setInteger("entityID", toSkeletonize.getEntityId());
data.setFloat("brightness", brightness); data.setFloat("brightness", brightness);
IParticleCreator.sendPacket(world, toSkeletonize.posX, toSkeletonize.posY, toSkeletonize.posZ, 100, data); 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 @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void makeParticle(World world, EntityPlayer player, TextureManager texman, Random rand, double x, double y, double z, NBTTagCompound data) { public void makeParticle(World world, EntityPlayer player, TextureManager texman, Random rand, double x, double y, double z, NBTTagCompound data) {
if(skullanizer.isEmpty()) init(); if(skullanizer.isEmpty()) init();
boolean gib = data.getBoolean("gib");
float force = data.getFloat("force");
int entityID = data.getInteger("entityID"); int entityID = data.getInteger("entityID");
Entity entity = world.getEntityByID(entityID); Entity entity = world.getEntityByID(entityID);
if(!(entity instanceof EntityLivingBase)) return; if(!(entity instanceof EntityLivingBase)) return;
@ -61,9 +72,16 @@ public class SkeletonCreator implements IParticleCreator {
if(bonealizer != null) { if(bonealizer != null) {
BoneDefinition[] bones = bonealizer.apply(living); BoneDefinition[] bones = bonealizer.apply(living);
for(BoneDefinition bone : bones) { 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); 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.prevRotationYaw = skeleton.rotationYaw = bone.yaw;
skeleton.prevRotationPitch = skeleton.rotationPitch = bone.pitch; 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); Minecraft.getMinecraft().effectRenderer.addEffect(skeleton);
} }
} }
@ -161,7 +179,7 @@ public class SkeletonCreator implements IParticleCreator {
skullanizer.put(EntityDummy.class.getSimpleName(), BONES_DUMMY); skullanizer.put(EntityDummy.class.getSimpleName(), BONES_DUMMY);
//techguns compat, for some reason //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("ArmySoldier", BONES_ZOMBIE);
skullanizer.put("PsychoSteve", BONES_ZOMBIE); skullanizer.put("PsychoSteve", BONES_ZOMBIE);
skullanizer.put("SkeletonSoldier", BONES_ZOMBIE); skullanizer.put("SkeletonSoldier", BONES_ZOMBIE);

View 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();
}
}

View File

@ -25,12 +25,10 @@ import cpw.mods.fml.relauncher.SideOnly;
import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBuf;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Container; import net.minecraft.inventory.Container;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.*;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.MathHelper;
import net.minecraft.util.Vec3;
import net.minecraft.world.World; import net.minecraft.world.World;
import li.cil.oc.api.machine.Arguments; import li.cil.oc.api.machine.Arguments;
@ -631,6 +629,15 @@ public class TileEntityRBMKConsole extends TileEntityMachineBase implements ICon
TileEntityRBMKOutgasser irradiationChannel = (TileEntityRBMKOutgasser)te; TileEntityRBMKOutgasser irradiationChannel = (TileEntityRBMKOutgasser)te;
data_table.put("fluxProgress", irradiationChannel.progress); data_table.put("fluxProgress", irradiationChannel.progress);
data_table.put("requiredFlux", irradiationChannel.duration); 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){ if(te instanceof TileEntityRBMKHeater){
@ -760,6 +767,7 @@ public class TileEntityRBMKConsole extends TileEntityMachineBase implements ICon
@Callback(direct = true) @Callback(direct = true)
@Optional.Method(modid = "OpenComputers") @Optional.Method(modid = "OpenComputers")
public Object[] pressAZ5(Context context, Arguments args) { 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; boolean hasRods = false;
for(int i = -7; i <= 7; i++) { for(int i = -7; i <= 7; i++) {
for(int j = -7; j <= 7; j++) { for(int j = -7; j <= 7; j++) {

View File

@ -46,26 +46,26 @@ public class TileEntityRBMKOutgasser extends TileEntityRBMKSlottedBase implement
public String getName() { public String getName() {
return "container.rbmkOutgasser"; return "container.rbmkOutgasser";
} }
@Override @Override
public void updateEntity() { public void updateEntity() {
if(!worldObj.isRemote) { if(!worldObj.isRemote) {
if(!canProcess()) { if(!canProcess()) {
this.progress = 0; this.progress = 0;
} }
for(DirPos pos : getOutputPos()) { for(DirPos pos : getOutputPos()) {
if(this.gas.getFill() > 0) this.sendFluid(gas, worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir()); if(this.gas.getFill() > 0) this.sendFluid(gas, worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir());
} }
} }
super.updateEntity(); super.updateEntity();
} }
protected DirPos[] getOutputPos() { protected DirPos[] getOutputPos() {
if(worldObj.getBlock(xCoord, yCoord - 1, zCoord) == ModBlocks.rbmk_loader) { if(worldObj.getBlock(xCoord, yCoord - 1, zCoord) == ModBlocks.rbmk_loader) {
return new DirPos[] { return new DirPos[] {
new DirPos(this.xCoord, this.yCoord + RBMKDials.getColumnHeight(worldObj) + 1, this.zCoord, Library.POS_Y), 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 @Override
public void receiveFlux(NeutronStream stream) { public void receiveFlux(NeutronStream stream) {
if(canProcess()) { if(canProcess()) {
double efficiency = Math.min(1 - stream.fluxRatio * 0.8, 1); double efficiency = Math.min(1 - stream.fluxRatio * 0.8, 1);
progress += stream.fluxQuantity * efficiency * RBMKDials.getOutgasserMod(worldObj); progress += stream.fluxQuantity * efficiency * RBMKDials.getOutgasserMod(worldObj);
if(progress > duration) { if(progress > duration) {
process(); process();
this.markDirty(); this.markDirty();
} }
} }
} }
public boolean canProcess() { public boolean canProcess() {
if(slots[0] == null) if(slots[0] == null)
return false; return false;
Pair<ItemStack, FluidStack> output = OutgasserRecipes.getOutput(slots[0]); Pair<ItemStack, FluidStack> output = OutgasserRecipes.getOutput(slots[0]);
if(output == null) if(output == null)
return false; return false;
FluidStack fluid = output.getValue(); FluidStack fluid = output.getValue();
if(fluid != null) { if(fluid != null) {
@ -125,27 +125,27 @@ public class TileEntityRBMKOutgasser extends TileEntityRBMKSlottedBase implement
gas.setTankType(fluid.type); gas.setTankType(fluid.type);
if(gas.getFill() + fluid.fill > gas.getMaxFill()) return false; if(gas.getFill() + fluid.fill > gas.getMaxFill()) return false;
} }
ItemStack out = output.getKey(); ItemStack out = output.getKey();
if(slots[1] == null || out == null) if(slots[1] == null || out == null)
return true; return true;
return slots[1].getItem() == out.getItem() && slots[1].getItemDamage() == out.getItemDamage() && slots[1].stackSize + out.stackSize <= slots[1].getMaxStackSize(); return slots[1].getItem() == out.getItem() && slots[1].getItemDamage() == out.getItemDamage() && slots[1].stackSize + out.stackSize <= slots[1].getMaxStackSize();
} }
private void process() { private void process() {
Pair<ItemStack, FluidStack> output = OutgasserRecipes.getOutput(slots[0]); Pair<ItemStack, FluidStack> output = OutgasserRecipes.getOutput(slots[0]);
this.decrStackSize(0, 1); this.decrStackSize(0, 1);
this.progress = 0; this.progress = 0;
if(output.getValue() != null) { if(output.getValue() != null) {
gas.setFill(gas.getFill() + output.getValue().fill); gas.setFill(gas.getFill() + output.getValue().fill);
} }
ItemStack out = output.getKey(); ItemStack out = output.getKey();
if(out != null) { if(out != null) {
if(slots[1] == null) { if(slots[1] == null) {
slots[1] = out.copy(); slots[1] = out.copy();
@ -154,16 +154,16 @@ public class TileEntityRBMKOutgasser extends TileEntityRBMKSlottedBase implement
} }
} }
} }
@Override @Override
public void onMelt(int reduce) { public void onMelt(int reduce) {
int count = 4 + worldObj.rand.nextInt(2); int count = 4 + worldObj.rand.nextInt(2);
for(int i = 0; i < count; i++) { for(int i = 0; i < count; i++) {
spawnDebris(DebrisType.BLANK); spawnDebris(DebrisType.BLANK);
} }
super.onMelt(reduce); super.onMelt(reduce);
} }
@ -186,19 +186,19 @@ public class TileEntityRBMKOutgasser extends TileEntityRBMKSlottedBase implement
data.setDouble("progress", this.progress); data.setDouble("progress", this.progress);
return data; return data;
} }
@Override @Override
public void readFromNBT(NBTTagCompound nbt) { public void readFromNBT(NBTTagCompound nbt) {
super.readFromNBT(nbt); super.readFromNBT(nbt);
this.progress = nbt.getDouble("progress"); this.progress = nbt.getDouble("progress");
this.gas.readFromNBT(nbt, "gas"); this.gas.readFromNBT(nbt, "gas");
} }
@Override @Override
public void writeToNBT(NBTTagCompound nbt) { public void writeToNBT(NBTTagCompound nbt) {
super.writeToNBT(nbt); super.writeToNBT(nbt);
nbt.setDouble("progress", this.progress); nbt.setDouble("progress", this.progress);
this.gas.writeToNBT(nbt, "gas"); this.gas.writeToNBT(nbt, "gas");
} }
@ -260,7 +260,7 @@ public class TileEntityRBMKOutgasser extends TileEntityRBMKSlottedBase implement
public Object[] getGasMax(Context context, Arguments args) { public Object[] getGasMax(Context context, Arguments args) {
return new Object[] {gas.getMaxFill()}; return new Object[] {gas.getMaxFill()};
} }
@Callback(direct = true) @Callback(direct = true)
@Optional.Method(modid = "OpenComputers") @Optional.Method(modid = "OpenComputers")
public Object[] getGasType(Context context, Arguments args) { public Object[] getGasType(Context context, Arguments args) {
@ -273,6 +273,15 @@ public class TileEntityRBMKOutgasser extends TileEntityRBMKSlottedBase implement
return new Object[] {progress}; 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) @Callback(direct = true)
@Optional.Method(modid = "OpenComputers") @Optional.Method(modid = "OpenComputers")
public Object[] getCoordinates(Context context, Arguments args) { public Object[] getCoordinates(Context context, Arguments args) {
@ -282,7 +291,11 @@ public class TileEntityRBMKOutgasser extends TileEntityRBMKSlottedBase implement
@Callback(direct = true) @Callback(direct = true)
@Optional.Method(modid = "OpenComputers") @Optional.Method(modid = "OpenComputers")
public Object[] getInfo(Context context, Arguments args) { 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 @Override

View File

@ -2,6 +2,7 @@ package com.hbm.tileentity.machine.rbmk;
import com.hbm.tileentity.IGUIProvider; import com.hbm.tileentity.IGUIProvider;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.ISidedInventory; import net.minecraft.inventory.ISidedInventory;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound; 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 * 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 * those things Yes it's a copy pasted MachineBase class, thank the lack of
* multiple inheritance for that * multiple inheritance for that
* *
* @author hbm * @author hbm
* *
*/ */
@ -87,6 +88,15 @@ public abstract class TileEntityRBMKSlottedBase extends TileEntityRBMKActiveBase
return false; 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 @Override
public ItemStack decrStackSize(int slot, int amount) { public ItemStack decrStackSize(int slot, int amount) {
if(slots[slot] != null) { if(slots[slot] != null) {
@ -124,10 +134,10 @@ public abstract class TileEntityRBMKSlottedBase extends TileEntityRBMKActiveBase
@Override @Override
public void readFromNBT(NBTTagCompound nbt) { public void readFromNBT(NBTTagCompound nbt) {
super.readFromNBT(nbt); super.readFromNBT(nbt);
if(!diag) { if(!diag) {
NBTTagList list = nbt.getTagList("items", 10); NBTTagList list = nbt.getTagList("items", 10);
for(int i = 0; i < list.tagCount(); i++) { for(int i = 0; i < list.tagCount(); i++) {
NBTTagCompound nbt1 = list.getCompoundTagAt(i); NBTTagCompound nbt1 = list.getCompoundTagAt(i);
byte b0 = nbt1.getByte("slot"); byte b0 = nbt1.getByte("slot");
@ -143,10 +153,10 @@ public abstract class TileEntityRBMKSlottedBase extends TileEntityRBMKActiveBase
@Override @Override
public void writeToNBT(NBTTagCompound nbt) { public void writeToNBT(NBTTagCompound nbt) {
super.writeToNBT(nbt); super.writeToNBT(nbt);
if(!diag) { if(!diag) {
NBTTagList list = new NBTTagList(); NBTTagList list = new NBTTagList();
for(int i = 0; i < slots.length; i++) { for(int i = 0; i < slots.length; i++) {
if(slots[i] != null) { if(slots[i] != null) {
NBTTagCompound nbt1 = new NBTTagCompound(); NBTTagCompound nbt1 = new NBTTagCompound();
@ -156,7 +166,7 @@ public abstract class TileEntityRBMKSlottedBase extends TileEntityRBMKActiveBase
} }
} }
nbt.setTag("items", list); nbt.setTag("items", list);
if (customName != null) { if (customName != null) {
nbt.setString("name", customName); nbt.setString("name", customName);
} }

View File

@ -51,7 +51,8 @@ public class ArmorUtil {
ArmorRegistry.registerHazard(ModItems.hazmat_helmet_grey, HazardClass.SAND); ArmorRegistry.registerHazard(ModItems.hazmat_helmet_grey, HazardClass.SAND);
ArmorRegistry.registerHazard(ModItems.hazmat_paa_helmet, HazardClass.LIGHT, HazardClass.SAND); ArmorRegistry.registerHazard(ModItems.hazmat_paa_helmet, HazardClass.LIGHT, HazardClass.SAND);
ArmorRegistry.registerHazard(ModItems.liquidator_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.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.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); 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);

View File

@ -165,6 +165,12 @@ public class DamageResistanceHandler {
.addCategory(CATEGORY_EXPLOSION, 5F, 0.25F) .addCategory(CATEGORY_EXPLOSION, 5F, 0.25F)
.addExact(DamageSource.fall.damageType, 0F, 1F) .addExact(DamageSource.fall.damageType, 0F, 1F)
.setOther(0F, 0.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() registerSet(ModItems.ajr_helmet, ModItems.ajr_plate, ModItems.ajr_legs, ModItems.ajr_boots, new ResistanceStats()
.addCategory(CATEGORY_PHYSICAL, 4F, 0.15F) .addCategory(CATEGORY_PHYSICAL, 4F, 0.15F)
.addCategory(CATEGORY_FIRE, 0.5F, 0.35F) .addCategory(CATEGORY_FIRE, 0.5F, 0.35F)

View File

@ -92,23 +92,23 @@ public class MobUtil {
})); }));
slotPoolAdv.put(4, createSlotPool(new Object[][]{ 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.liquidator_helmet, 4}, {ModItems.no9, 12},
{ModItems.hazmat_helmet, 6} {ModItems.hazmat_helmet, 6}
})); }));
slotPoolAdv.put(3, createSlotPool(new Object[][]{ slotPoolAdv.put(3, createSlotPool(new Object[][]{
{ModItems.liquidator_plate, 4}, {ModItems.security_plate, 8}, {ModItems.asbestos_plate, 12}, {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} {ModItems.steel_plate, 8}
})); }));
slotPoolAdv.put(2, createSlotPool(new Object[][]{ slotPoolAdv.put(2, createSlotPool(new Object[][]{
{ModItems.liquidator_legs, 4}, {ModItems.security_legs, 8}, {ModItems.asbestos_legs, 12}, {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} {ModItems.steel_legs, 8}
})); }));
slotPoolAdv.put(1, createSlotPool(new Object[][]{ slotPoolAdv.put(1, createSlotPool(new Object[][]{
{ModItems.liquidator_boots, 4}, {ModItems.security_boots, 8}, {ModItems.asbestos_boots, 12}, {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} {ModItems.robes_boots, 8}
})); }));
slotPoolAdv.put(0, createSlotPool(new Object[][]{ slotPoolAdv.put(0, createSlotPool(new Object[][]{

View File

@ -129,7 +129,7 @@ public class NTMWorldGenerator implements IWorldGenerator {
NBTStructure.registerStructure(0, new SpawnCondition("forest_post") {{ NBTStructure.registerStructure(0, new SpawnCondition("forest_post") {{
canSpawn = biome -> biome.heightVariation <= 0.3F; canSpawn = biome -> biome.heightVariation <= 0.3F;
structure = new JigsawPiece("forest_post", StructureManager.forest_post, -9); structure = new JigsawPiece("forest_post", StructureManager.forest_post, -10);
spawnWeight = StructureConfig.forestPostSpawnWeight; spawnWeight = StructureConfig.forestPostSpawnWeight;
}}); }});
@ -150,6 +150,12 @@ public class NTMWorldGenerator implements IWorldGenerator {
structure = new JigsawPiece("crane", StructureManager.crane, -9); structure = new JigsawPiece("crane", StructureManager.crane, -9);
spawnWeight = StructureConfig.craneSpawnWeight; spawnWeight = StructureConfig.craneSpawnWeight;
}}); }});
NBTStructure.registerStructure(0, new SpawnCondition("broadcaster_tower") {{
canSpawn = flatbiomes::contains;
structure = new JigsawPiece("broadcaster_tower", StructureManager.broadcasting_tower, -9);
spawnWeight = StructureConfig.broadcastingTowerSpawnWeight;
}});
NBTStructure.registerStructure(0, new SpawnCondition("plane1") {{ NBTStructure.registerStructure(0, new SpawnCondition("plane1") {{
canSpawn = biome -> biome.heightVariation <= 0.3F; canSpawn = biome -> biome.heightVariation <= 0.3F;

View File

@ -3464,6 +3464,10 @@ item.t45_helmet.name=T45-Powerrüstungshelm
item.t45_kit.name=T45-Powerrüstungskit item.t45_kit.name=T45-Powerrüstungskit
item.t45_legs.name=T45-Powerrüstungsbeinschutz item.t45_legs.name=T45-Powerrüstungsbeinschutz
item.t45_plate.name=T45-Powerrüstungsbrustpanzer 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.tank_steel.name=Stahltank
item.taurun_boots.name=Taurun-Stiefel item.taurun_boots.name=Taurun-Stiefel
item.taurun_helmet.name=Taurun-Helm item.taurun_helmet.name=Taurun-Helm

View File

@ -4584,6 +4584,10 @@ item.t45_helmet.name=T45 Power Armor Helmet
item.t45_kit.name=T45 Power Armor Kit item.t45_kit.name=T45 Power Armor Kit
item.t45_legs.name=T45 Power Armor Leggings item.t45_legs.name=T45 Power Armor Leggings
item.t45_plate.name=T45 Power Armor Chestplate 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.tank_steel.name=Steel Tank
item.taurun_boots.name=Taurun Boots item.taurun_boots.name=Taurun Boots
item.taurun_helmet.name=Taurun Helmet item.taurun_helmet.name=Taurun Helmet

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 502 B

After

Width:  |  Height:  |  Size: 1010 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 820 B

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 996 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 380 B

After

Width:  |  Height:  |  Size: 851 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB