Merge branch 'HbmMods:master' into master

This commit is contained in:
KellenHurrey 2025-09-22 15:26:50 -07:00 committed by GitHub
commit 640397fdda
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
50 changed files with 3908 additions and 127 deletions

View File

@ -1,3 +1,7 @@
## Added
* T-51b power armor
* Serves as a replacement for the T-45
## Changed
* Added more QMAW pages
* Removed most old particle accelerator blocks from the creative inventory
@ -7,7 +11,13 @@
* 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 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<Integer> RENDER_HELIOSTAT_BEAM_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() {
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_HELIOSTAT_BEAM_LIMIT", RENDER_HELIOSTAT_BEAM_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. */

View File

@ -41,6 +41,7 @@ public class StructureConfig {
public static int laboratorySpawnWeight = 20;
public static int lighthouseSpawnWeight = 4;
public static int oilRigSpawnWeight = 5;
public static int broadcastingTowerSpawnWeight = 25;
public static int beachedPatrolSpawnWeight = 15;
public static int vertibirdSpawnWeight = 6;
public static int vertibirdCrashedSpawnWeight = 10;
@ -51,6 +52,7 @@ public class StructureConfig {
public static int forestPostSpawnWeight = 30;
public static int spireSpawnWeight = 2;
public static int craneSpawnWeight = 20;
public static int bunkerSpawnWeight = 6;
public static int dishSpawnWeight = 20;
public static int featuresSpawnWeight = 50;
@ -109,9 +111,10 @@ public class StructureConfig {
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);
factorySpawnWeight = CommonConfig.createConfigInt(config, CATEGORY_STRUCTURES, "5.36_factorySpawnWeight", "Spawn weight for factory structure.", 40);
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);
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);

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() });
//Power armor
CraftingManager.addRecipeAuto(new ItemStack(ModItems.t45_helmet, 1), new Object[] { "PPC", "PBP", "IXI", 'P', ModItems.plate_armor_titanium, 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.BASIC), 'I', ANY_RUBBER.ingot(), 'X', ModItems.gas_mask_m65, 'B', ModItems.titanium_helmet });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.t45_plate, 1), new Object[] { "MPM", "TBT", "PPP", 'M', ModItems.motor, 'P', ModItems.plate_armor_titanium, 'T', ModItems.gas_empty, 'B', ModItems.titanium_plate });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.t45_legs, 1), new Object[] { "MPM", "PBP", "P P", 'M', ModItems.motor, 'P', ModItems.plate_armor_titanium, 'B', ModItems.titanium_legs });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.t45_boots, 1), new Object[] { "P P", "PBP", 'P', ModItems.plate_armor_titanium, 'B', ModItems.titanium_boots });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.t51_helmet, 1), new Object[] { "PPC", "PBP", "IXI", 'P', ModItems.plate_armor_titanium, 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.BASIC), 'I', ANY_RUBBER.ingot(), 'X', ModItems.gas_mask_m65, 'B', ModItems.titanium_helmet });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.t51_plate, 1), new Object[] { "MPM", "TBT", "PPP", 'M', ModItems.motor, 'P', ModItems.plate_armor_titanium, 'T', ModItems.gas_empty, 'B', ModItems.titanium_plate });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.t51_legs, 1), new Object[] { "MPM", "PBP", "P P", 'M', ModItems.motor, 'P', ModItems.plate_armor_titanium, 'B', ModItems.titanium_legs });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.t51_boots, 1), new Object[] { "P P", "PBP", 'P', ModItems.plate_armor_titanium, 'B', ModItems.titanium_boots });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ajr_helmet, 1), new Object[] { "PPC", "PBP", "IXI", 'P', ModItems.plate_armor_ajr, 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.BASIC), 'I', ANY_PLASTIC.ingot(), 'X', ModItems.gas_mask_m65, 'B', ModItems.alloy_helmet });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ajr_plate, 1), new Object[] { "MPM", "TBT", "PPP", 'M', ModItems.motor_desh, 'P', ModItems.plate_armor_ajr, 'T', ModItems.gas_empty, 'B', ModItems.alloy_plate });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ajr_legs, 1), new Object[] { "MPM", "PBP", "P P", 'M', ModItems.motor_desh, 'P', ModItems.plate_armor_ajr, 'B', ModItems.alloy_legs });

View File

@ -60,7 +60,7 @@ public abstract class EntityRailCarElectric extends EntityRailCarRidable {
this.setPower(this.getPower() + powerTransfered);
}
} 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());
}
}

View File

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

View File

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

View File

@ -1666,7 +1666,6 @@ public class ModItems {
public static Item battery_potatos;
public static Item hev_battery;
public static Item fusion_core;
public static Item fusion_core_infinite;
public static Item energy_core;
public static Item fuse;
public static Item redcoil_capacitor;
@ -1742,10 +1741,14 @@ public class ModItems {
public static Item beta;
public static Item no9;
public static Item t45_helmet;
public static Item t45_plate;
public static Item t45_legs;
public static Item t45_boots;
@Deprecated public static Item t45_helmet;
@Deprecated public static Item t45_plate;
@Deprecated public static Item t45_legs;
@Deprecated public static Item t45_boots;
public static Item t51_helmet;
public static Item t51_plate;
public static Item t51_legs;
public static Item t51_boots;
public static Item steamsuit_helmet;
public static Item steamsuit_plate;
public static Item steamsuit_legs;
@ -2107,7 +2110,6 @@ public class ModItems {
public static Item fleija_kit;
public static Item prototype_kit;
public static Item missile_kit;
public static Item t45_kit;
public static Item euphemium_kit;
public static Item solinium_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");
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_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");
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");
@ -4027,7 +4028,6 @@ public class ModItems {
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");
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");
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");
@ -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_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 + ":armor");
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 + ":armor");
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 + ":armor");
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 + ":armor");
ArmorMaterial aMatDesh = EnumHelper.addArmorMaterial("HBM_DESH", 150, new int[] { 3, 8, 6, 3 }, 0);
aMatDesh.customCraftingMaterial = ModItems.ingot_desh;
steamsuit_helmet = new ArmorDesh(aMatDesh, 0, RefStrings.MODID + ":textures/armor/starmetal_1.png", Fluids.STEAM, 64_000, 500, 50, 1)
@ -5742,7 +5756,6 @@ public class ModItems {
GameRegistry.registerItem(hev_battery, hev_battery.getUnlocalizedName());
GameRegistry.registerItem(fusion_core, fusion_core.getUnlocalizedName());
GameRegistry.registerItem(energy_core, energy_core.getUnlocalizedName());
GameRegistry.registerItem(fusion_core_infinite, fusion_core_infinite.getUnlocalizedName());
//Folders
GameRegistry.registerItem(blueprints, blueprints.getUnlocalizedName());
@ -6902,6 +6915,10 @@ public class ModItems {
GameRegistry.registerItem(t45_plate, t45_plate.getUnlocalizedName());
GameRegistry.registerItem(t45_legs, t45_legs.getUnlocalizedName());
GameRegistry.registerItem(t45_boots, t45_boots.getUnlocalizedName());
GameRegistry.registerItem(t51_helmet, t51_helmet.getUnlocalizedName());
GameRegistry.registerItem(t51_plate, t51_plate.getUnlocalizedName());
GameRegistry.registerItem(t51_legs, t51_legs.getUnlocalizedName());
GameRegistry.registerItem(t51_boots, t51_boots.getUnlocalizedName());
GameRegistry.registerItem(ajr_helmet, ajr_helmet.getUnlocalizedName());
GameRegistry.registerItem(ajr_plate, ajr_plate.getUnlocalizedName());
GameRegistry.registerItem(ajr_legs, ajr_legs.getUnlocalizedName());
@ -7079,7 +7096,6 @@ public class ModItems {
GameRegistry.registerItem(custom_kit, custom_kit.getUnlocalizedName());
GameRegistry.registerItem(missile_kit, missile_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_red_kit, hazmat_red_kit.getUnlocalizedName());
GameRegistry.registerItem(hazmat_grey_kit, hazmat_grey_kit.getUnlocalizedName());

View File

@ -1,14 +1,19 @@
package com.hbm.items.armor;
import com.hbm.main.ResourceManager;
import com.hbm.render.item.ItemRenderBase;
import com.hbm.render.model.ModelArmorAJR;
import com.hbm.render.tileentity.IItemRendererProvider;
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.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.client.IItemRenderer;
public class ArmorAJR extends ArmorFSBPowered {
public class ArmorAJR extends ArmorFSBPowered implements IItemRendererProvider {
public ArmorAJR(ArmorMaterial material, int slot, String texture, long maxPower, long chargeRate, long consumption, long drain) {
super(material, slot, texture, maxPower, chargeRate, consumption, drain);
@ -30,4 +35,18 @@ public class ArmorAJR extends ArmorFSBPowered {
return models[armorSlot];
}
@Override public Item getItemForRenderer() { return this; }
@Override
public IItemRenderer getRenderer() {
return new ItemRenderBase( ) {
public void renderInventory() { setupRenderInv(); }
public void renderNonInv() { setupRenderNonInv(); }
public void renderCommon() {
renderStandard(ResourceManager.armor_ajr, armorType,
ResourceManager.ajr_helmet, ResourceManager.ajr_chest, ResourceManager.ajr_arm, ResourceManager.ajr_leg,
"Head", "Body", "LeftArm", "RightArm", "LeftLeg", "RightLeg", "LeftBoot", "RightBoot");
}};
}
}

View File

@ -1,14 +1,19 @@
package com.hbm.items.armor;
import com.hbm.main.ResourceManager;
import com.hbm.render.item.ItemRenderBase;
import com.hbm.render.model.ModelArmorAJRO;
import com.hbm.render.tileentity.IItemRendererProvider;
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.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.client.IItemRenderer;
public class ArmorAJRO extends ArmorFSBPowered {
public class ArmorAJRO extends ArmorFSBPowered implements IItemRendererProvider {
public ArmorAJRO(ArmorMaterial material, int slot, String texture, long maxPower, long chargeRate, long consumption, long drain) {
super(material, slot, texture, maxPower, chargeRate, consumption, drain);
@ -30,4 +35,18 @@ public class ArmorAJRO extends ArmorFSBPowered {
return models[armorSlot];
}
@Override public Item getItemForRenderer() { return this; }
@Override
public IItemRenderer getRenderer() {
return new ItemRenderBase( ) {
public void renderInventory() { setupRenderInv(); }
public void renderNonInv() { setupRenderNonInv(); }
public void renderCommon() {
renderStandard(ResourceManager.armor_ajr, armorType,
ResourceManager.ajro_helmet, ResourceManager.ajro_chest, ResourceManager.ajro_arm, ResourceManager.ajro_leg,
"Head", "Body", "LeftArm", "RightArm", "LeftLeg", "RightLeg", "LeftBoot", "RightBoot");
}};
}
}

View File

@ -1,18 +1,26 @@
package com.hbm.items.armor;
import org.lwjgl.opengl.GL11;
import com.hbm.items.ModItems;
import com.hbm.lib.ModDamageSource;
import com.hbm.main.ResourceManager;
import com.hbm.render.item.ItemRenderBase;
import com.hbm.render.model.ModelArmorBJ;
import com.hbm.render.tileentity.IItemRendererProvider;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.Minecraft;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import net.minecraftforge.client.IItemRenderer;
public class ArmorBJ extends ArmorFSBPowered {
public class ArmorBJ extends ArmorFSBPowered implements IItemRendererProvider {
public ArmorBJ(ArmorMaterial material, int slot, String texture, long maxPower, long chargeRate, long consumption, long drain) {
super(material, slot, texture, maxPower, chargeRate, consumption, drain);
@ -24,31 +32,57 @@ public class ArmorBJ extends ArmorFSBPowered {
@Override
@SideOnly(Side.CLIENT)
public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) {
if(models == null) {
models = new ModelArmorBJ[4];
for(int i = 0; i < 4; i++)
models[i] = new ModelArmorBJ(i);
}
return models[armorSlot];
}
public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) {
super.onArmorTick(world, player, itemStack);
if(this == ModItems.bj_helmet && ArmorFSB.hasFSBArmorIgnoreCharge(player) && !ArmorFSB.hasFSBArmor(player)) {
ItemStack helmet = player.inventory.armorInventory[3];
if(!player.inventory.addItemStackToInventory(helmet))
player.dropPlayerItemWithRandomChoice(helmet, false);
player.inventory.armorInventory[3] = null;
player.attackEntityFrom(ModDamageSource.lunar, 1000);
}
}
public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) {
super.onArmorTick(world, player, itemStack);
if(this == ModItems.bj_helmet && ArmorFSB.hasFSBArmorIgnoreCharge(player) && !ArmorFSB.hasFSBArmor(player)) {
ItemStack helmet = player.inventory.armorInventory[3];
if(!player.inventory.addItemStackToInventory(helmet))
player.dropPlayerItemWithRandomChoice(helmet, false);
player.inventory.armorInventory[3] = null;
player.attackEntityFrom(ModDamageSource.lunar, 1000);
}
}
@Override public Item getItemForRenderer() { return this; }
@Override
public IItemRenderer getRenderer() {
return new ItemRenderBase( ) {
public void renderInventory() { setupRenderInv(); }
public void renderNonInv() { setupRenderNonInv(); }
public void renderCommon() {
if(armorType == 1) {
if(ArmorBJ.this == ModItems.bj_plate_jetpack) {
GL11.glScaled(0.6875, 0.6875, 0.6875);
} else {
GL11.glScaled(0.875, 0.875, 0.875);
}
}
renderStandard(ResourceManager.armor_bj, armorType,
ResourceManager.bj_eyepatch, ResourceManager.bj_chest, ResourceManager.bj_arm, ResourceManager.bj_leg,
"Head", "Body", "LeftArm", "RightArm", "LeftLeg", "RightLeg", "LeftFoot", "RightFoot");
if(ArmorBJ.this == ModItems.bj_plate_jetpack) {
GL11.glTranslated(0, 0, -0.1);
Minecraft.getMinecraft().getTextureManager().bindTexture(ResourceManager.bj_jetpack);
ResourceManager.armor_bj.renderPart("Jetpack");
}
}};
}
}

View File

@ -1,13 +1,21 @@
package com.hbm.items.armor;
import org.lwjgl.opengl.GL11;
import com.hbm.main.ResourceManager;
import com.hbm.render.item.ItemRenderBase;
import com.hbm.render.model.ModelArmorBismuth;
import com.hbm.render.tileentity.IItemRendererProvider;
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.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.client.IItemRenderer;
public class ArmorBismuth extends ArmorFSB {
public class ArmorBismuth extends ArmorFSB implements IItemRendererProvider {
public ArmorBismuth(ArmorMaterial material, int slot, String texture) {
super(material, slot, texture);
@ -30,4 +38,26 @@ public class ArmorBismuth extends ArmorFSB {
return models[armorSlot];
}
@Override public Item getItemForRenderer() { return this; }
@Override
public IItemRenderer getRenderer() {
return new ItemRenderBase( ) {
public void renderInventory() { setupRenderInv(); }
public void renderNonInv() { setupRenderNonInv(); }
public void renderCommon() {
if(armorType == 0) {
GL11.glTranslated(0, -0.5, 0);
GL11.glScaled(0.625, 0.625, 0.625);
}
if(armorType == 1) {
GL11.glScaled(0.875, 0.875, 0.875);
}
GL11.glDisable(GL11.GL_CULL_FACE);
renderStandard(ResourceManager.armor_bismuth, armorType,
ResourceManager.armor_bismuth_tex, ResourceManager.armor_bismuth_tex, ResourceManager.armor_bismuth_tex, ResourceManager.armor_bismuth_tex,
"Head", "Body", "LeftArm", "RightArm", "LeftLeg", "RightLeg", "LeftFoot", "RightFoot");
GL11.glEnable(GL11.GL_CULL_FACE);
}};
}
}

View File

@ -3,12 +3,17 @@ package com.hbm.items.armor;
import java.util.List;
import java.util.UUID;
import org.lwjgl.opengl.GL11;
import com.google.common.collect.Multimap;
import com.hbm.extprop.HbmPlayerProps;
import com.hbm.handler.threading.PacketThreading;
import com.hbm.items.ModItems;
import com.hbm.main.ResourceManager;
import com.hbm.packet.toclient.AuxParticlePacketNT;
import com.hbm.render.item.ItemRenderBase;
import com.hbm.render.model.ModelArmorDNT;
import com.hbm.render.tileentity.IItemRendererProvider;
import com.hbm.util.ArmorUtil;
import com.hbm.util.BobMathUtil;
import com.hbm.util.i18n.I18nUtil;
@ -21,16 +26,18 @@ import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.attributes.AttributeModifier;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.world.World;
import net.minecraftforge.client.IItemRenderer;
import net.minecraftforge.event.entity.living.LivingAttackEvent;
import net.minecraftforge.event.entity.living.LivingHurtEvent;
public class ArmorDNT extends ArmorFSBPowered {
public class ArmorDNT extends ArmorFSBPowered implements IItemRendererProvider {
public ArmorDNT(ArmorMaterial material, int slot, String texture, long maxPower, long chargeRate, long consumption, long drain) {
super(material, slot, texture, maxPower, chargeRate, consumption, drain);
@ -190,4 +197,23 @@ public class ArmorDNT extends ArmorFSBPowered {
list.add(EnumChatFormatting.AQUA + " " + I18nUtil.resolveKey("armor.fastFall"));
list.add(EnumChatFormatting.AQUA + " " + I18nUtil.resolveKey("armor.sprintBoost"));
}
@Override public Item getItemForRenderer() { return this; }
@Override
public IItemRenderer getRenderer() {
return new ItemRenderBase( ) {
public void renderInventory() {
if(armorType == 0) {
GL11.glTranslated(0, -1, 0);
}
setupRenderInv();
}
public void renderNonInv() { setupRenderNonInv(); }
public void renderCommon() {
renderStandard(ResourceManager.armor_dnt, armorType,
ResourceManager.dnt_helmet, ResourceManager.dnt_chest, ResourceManager.dnt_arm, ResourceManager.dnt_leg,
"Head", "Body", "LeftArm", "RightArm", "LeftLeg", "RightLeg", "LeftBoot", "RightBoot");
}};
}
}

View File

@ -4,7 +4,10 @@ import com.google.common.collect.HashMultimap;
import com.google.common.collect.Multimap;
import com.hbm.handler.ArmorModHandler;
import com.hbm.inventory.fluid.FluidType;
import com.hbm.main.ResourceManager;
import com.hbm.render.item.ItemRenderBase;
import com.hbm.render.model.ModelArmorDesh;
import com.hbm.render.tileentity.IItemRendererProvider;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@ -12,9 +15,11 @@ import net.minecraft.client.model.ModelBiped;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.attributes.AttributeModifier;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.client.IItemRenderer;
public class ArmorDesh extends ArmorFSBFueled {
public class ArmorDesh extends ArmorFSBFueled implements IItemRendererProvider {
public ArmorDesh(ArmorMaterial material, int slot, String texture, FluidType fuelType, int maxFuel, int fillRate, int consumption, int drain) {
super(material, slot, texture, fuelType, maxFuel, fillRate, consumption, drain);
@ -44,4 +49,18 @@ public class ArmorDesh extends ArmorFSBFueled {
return models[armorSlot];
}
@Override public Item getItemForRenderer() { return this; }
@Override
public IItemRenderer getRenderer() {
return new ItemRenderBase( ) {
public void renderInventory() { setupRenderInv(); }
public void renderNonInv() { setupRenderNonInv(); }
public void renderCommon() {
renderStandard(ResourceManager.armor_steamsuit, armorType,
ResourceManager.steamsuit_helmet, ResourceManager.steamsuit_chest, ResourceManager.steamsuit_arm, ResourceManager.steamsuit_leg,
"Head", "Body", "LeftArm", "RightArm", "LeftLeg", "RightLeg", "LeftBoot", "RightBoot");
}};
}
}

View File

@ -1,5 +1,7 @@
package com.hbm.items.armor;
import org.lwjgl.opengl.GL11;
import com.google.common.collect.HashMultimap;
import com.google.common.collect.Multimap;
import com.hbm.handler.ArmorModHandler;
@ -7,8 +9,11 @@ import com.hbm.handler.threading.PacketThreading;
import com.hbm.inventory.fluid.FluidType;
import com.hbm.inventory.fluid.Fluids;
import com.hbm.items.ModItems;
import com.hbm.main.ResourceManager;
import com.hbm.packet.toclient.AuxParticlePacketNT;
import com.hbm.render.item.ItemRenderBase;
import com.hbm.render.model.ModelArmorDiesel;
import com.hbm.render.tileentity.IItemRendererProvider;
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
import cpw.mods.fml.relauncher.Side;
@ -18,11 +23,13 @@ import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.attributes.AttributeModifier;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import net.minecraftforge.client.IItemRenderer;
public class ArmorDiesel extends ArmorFSBFueled {
public class ArmorDiesel extends ArmorFSBFueled implements IItemRendererProvider {
public ArmorDiesel(ArmorMaterial material, int slot, String texture, FluidType fuelType, int maxFuel, int fillRate, int consumption, int drain) {
super(material, slot, texture, fuelType, maxFuel, fillRate, consumption, drain);
@ -69,4 +76,22 @@ public class ArmorDiesel extends ArmorFSBFueled {
public boolean acceptsFluid(FluidType type, ItemStack stack) {
return type == Fluids.DIESEL || type == Fluids.DIESEL_CRACK;
}
@Override public Item getItemForRenderer() { return this; }
@Override
public IItemRenderer getRenderer() {
return new ItemRenderBase( ) {
public void renderInventory() { setupRenderInv(); }
public void renderNonInv() { setupRenderNonInv(); }
public void renderCommon() {
if(armorType == 0) {
GL11.glTranslated(0, 0.5, 0);
GL11.glScaled(0.875, 0.875, 0.875);
}
renderStandard(ResourceManager.armor_dieselsuit, armorType,
ResourceManager.dieselsuit_helmet, ResourceManager.dieselsuit_chest, ResourceManager.dieselsuit_arm, ResourceManager.dieselsuit_leg,
"Head", "Body", "LeftArm", "RightArm", "LeftLeg", "RightLeg", "LeftBoot", "RightBoot");
}};
}
}

View File

@ -1,14 +1,21 @@
package com.hbm.items.armor;
import org.lwjgl.opengl.GL11;
import com.hbm.main.ResourceManager;
import com.hbm.render.item.ItemRenderBase;
import com.hbm.render.model.ModelArmorDigamma;
import com.hbm.render.tileentity.IItemRendererProvider;
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.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.client.IItemRenderer;
public class ArmorDigamma extends ArmorFSBPowered {
public class ArmorDigamma extends ArmorFSBPowered implements IItemRendererProvider {
public ArmorDigamma(ArmorMaterial material, int slot, String texture, long maxPower, long chargeRate, long consumption, long drain) {
super(material, slot, texture, maxPower, chargeRate, consumption, drain);
@ -30,4 +37,24 @@ public class ArmorDigamma extends ArmorFSBPowered {
return models[armorSlot];
}
@Override public Item getItemForRenderer() { return this; }
@Override
public IItemRenderer getRenderer() {
return new ItemRenderBase( ) {
public void renderInventory() {
if(armorType == 0) {
GL11.glScaled(0.875, 0.875, 0.875);
GL11.glTranslated(0, -2, 0);
}
setupRenderInv();
}
public void renderNonInv() { setupRenderNonInv(); }
public void renderCommon() {
renderStandard(ResourceManager.armor_fau, armorType,
ResourceManager.fau_helmet, ResourceManager.fau_chest, ResourceManager.fau_arm, ResourceManager.fau_leg,
"Head", "Body,Cassette", "LeftArm", "RightArm", "LeftLeg", "RightLeg", "LeftBoot", "RightBoot");
}};
}
}

View File

@ -3,23 +3,32 @@ package com.hbm.items.armor;
import com.google.common.collect.Multimap;
import com.hbm.handler.ArmorModHandler;
import com.hbm.items.ModItems;
import com.hbm.main.ResourceManager;
import com.hbm.render.item.ItemRenderBase;
import com.hbm.render.model.ModelArmorEnvsuit;
import com.hbm.render.tileentity.IItemRendererProvider;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.Minecraft;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.attributes.AttributeModifier;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
import net.minecraftforge.client.IItemRenderer;
import java.util.UUID;
public class ArmorEnvsuit extends ArmorFSBPowered {
import org.lwjgl.opengl.GL11;
public class ArmorEnvsuit extends ArmorFSBPowered implements IItemRendererProvider {
public ArmorEnvsuit(ArmorMaterial material, int slot, String texture, long maxPower, long chargeRate, long consumption, long drain) {
super(material, slot, texture, maxPower, chargeRate, consumption, drain);
@ -91,4 +100,32 @@ public class ArmorEnvsuit extends ArmorFSBPowered {
}
}
}
@Override public Item getItemForRenderer() { return this; }
@Override
public IItemRenderer getRenderer() {
return new ItemRenderBase( ) {
public void renderInventory() { setupRenderInv(); }
public void renderNonInv() { setupRenderNonInv(); }
public void renderCommon() {
if(armorType == 0) {
GL11.glScaled(0.3125, 0.3125, 0.3125);
GL11.glTranslated(0, 1, 0);
Minecraft.getMinecraft().getTextureManager().bindTexture(ResourceManager.envsuit_helmet);
ResourceManager.armor_envsuit.renderPart("Helmet");
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_TEXTURE_2D);
GL11.glColor3f(1F, 1F, 0.8F);
ResourceManager.armor_envsuit.renderPart("Lamps");
GL11.glColor3f(1F, 1F, 1F);
GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glEnable(GL11.GL_LIGHTING);
} else {
renderStandard(ResourceManager.armor_envsuit, armorType,
ResourceManager.envsuit_helmet, ResourceManager.envsuit_chest, ResourceManager.envsuit_arm, ResourceManager.envsuit_leg,
"Helmet,Lamps", "Chest", "LeftArm", "RightArm", "LeftLeg", "RightLeg", "LeftFoot", "RightFoot");
}
}};
}
}

View File

@ -10,7 +10,9 @@ import org.lwjgl.opengl.GL11;
import com.hbm.extprop.HbmLivingProps;
import com.hbm.handler.radiation.ChunkRadiationManager;
import com.hbm.interfaces.NotableComments;
import com.hbm.items.ModItems;
import com.hbm.lib.RefStrings;
import com.hbm.util.ContaminationUtil;
import com.hbm.util.ShadyUtil;
import com.hbm.util.i18n.I18nUtil;
@ -39,10 +41,12 @@ import net.minecraft.util.ResourceLocation;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
import net.minecraftforge.client.event.RenderGameOverlayEvent;
import net.minecraftforge.client.model.IModelCustom;
import net.minecraftforge.event.entity.living.LivingAttackEvent;
import net.minecraftforge.event.entity.living.LivingHurtEvent;
//Armor with full set bonus
@NotableComments
public class ArmorFSB extends ItemArmor implements IArmorDisableModel {
private String texture = "";
@ -63,6 +67,7 @@ public class ArmorFSB extends ItemArmor implements IArmorDisableModel {
public ArmorFSB(ArmorMaterial material, int slot, String texture) {
super(material, 0, slot);
this.texture = texture;
this.setTextureName(RefStrings.MODID + ":armor");
}
public ArmorFSB addEffect(PotionEffect effect) {
@ -428,4 +433,63 @@ public class ArmorFSB extends ItemArmor implements IArmorDisableModel {
public void handleAttack(LivingAttackEvent event) { }
public void handleHurt(LivingHurtEvent event) { }
public static void setupRenderInv() {
GL11.glTranslated(0, -1.5, 0);
GL11.glScaled(3.25, 3.25, 3.25);
GL11.glRotated(180, 1, 0, 0);
GL11.glRotated(-135, 0, 1, 0);
GL11.glRotated(-20, 1, 0, 0);
}
public static void setupRenderNonInv() {
GL11.glRotated(180, 1, 0, 0);
GL11.glScaled(0.75, 0.75, 0.75);
GL11.glRotated(-90, 0, 1, 0);
}
// if it's the same vomit every time, why not make a method that does it for us?
public static void renderStandard(IModelCustom model, int armorType,
ResourceLocation helmetTex, ResourceLocation chestTex, ResourceLocation armTex, ResourceLocation legTex,
String helmet, String chest, String leftArm, String rightArm, String leftLeg, String rightLeg, String leftBoot, String rightBoot) {
GL11.glShadeModel(GL11.GL_SMOOTH);
if(armorType == 0) {
GL11.glScaled(0.3125, 0.3125, 0.3125);
GL11.glTranslated(0, 1, 0);
Minecraft.getMinecraft().getTextureManager().bindTexture(helmetTex);
for(String s : helmet.split(",")) model.renderPart(s);
}
if(armorType == 1) {
GL11.glScaled(0.225, 0.225, 0.225);
GL11.glTranslated(0, -10, 0);
Minecraft.getMinecraft().getTextureManager().bindTexture(chestTex);
for(String s : chest.split(",")) model.renderPart(s);
GL11.glTranslated(0, 0, 0.1);
Minecraft.getMinecraft().getTextureManager().bindTexture(armTex);
for(String s : leftArm.split(",")) model.renderPart(s);
for(String s : rightArm.split(",")) model.renderPart(s);
}
if(armorType == 2) {
GL11.glScaled(0.25, 0.25, 0.25);
GL11.glTranslated(0, -20, 0);
Minecraft.getMinecraft().getTextureManager().bindTexture(legTex);
GL11.glDisable(GL11.GL_CULL_FACE);
for(String s : leftLeg.split(",")) model.renderPart(s);
GL11.glTranslated(0, 0, 0.1);
for(String s : rightLeg.split(",")) model.renderPart(s);
GL11.glEnable(GL11.GL_CULL_FACE);
}
if(armorType == 3) {
GL11.glScaled(0.25, 0.25, 0.25);
GL11.glTranslated(0, -22, 0);
Minecraft.getMinecraft().getTextureManager().bindTexture(legTex);
GL11.glDisable(GL11.GL_CULL_FACE);
for(String s : leftBoot.split(",")) model.renderPart(s);
GL11.glTranslated(0, 0, 0.1);
for(String s : rightBoot.split(",")) model.renderPart(s);
GL11.glEnable(GL11.GL_CULL_FACE);
}
GL11.glShadeModel(GL11.GL_FLAT);
}
}

View File

@ -4,7 +4,10 @@ import org.lwjgl.opengl.GL11;
import com.hbm.extprop.HbmLivingProps;
import com.hbm.items.ModItems;
import com.hbm.main.ResourceManager;
import com.hbm.render.item.ItemRenderBase;
import com.hbm.render.model.ModelArmorHEV;
import com.hbm.render.tileentity.IItemRendererProvider;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@ -15,11 +18,13 @@ import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.client.IItemRenderer;
import net.minecraftforge.client.event.RenderGameOverlayEvent;
import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType;
public class ArmorHEV extends ArmorFSBPowered {
public class ArmorHEV extends ArmorFSBPowered implements IItemRendererProvider {
public ArmorHEV(ArmorMaterial material, int slot, String texture, long maxPower, long chargeRate, long consumption, long drain) {
super(material, slot, texture, maxPower, chargeRate, consumption, drain);
@ -175,4 +180,17 @@ public class ArmorHEV extends ArmorFSBPowered {
Minecraft.getMinecraft().renderEngine.bindTexture(Gui.icons);
}
@Override public Item getItemForRenderer() { return this; }
@Override
public IItemRenderer getRenderer() {
return new ItemRenderBase( ) {
public void renderInventory() { setupRenderInv(); }
public void renderNonInv() { setupRenderNonInv(); }
public void renderCommon() {
renderStandard(ResourceManager.armor_hev, armorType,
ResourceManager.hev_helmet, ResourceManager.hev_chest, ResourceManager.hev_arm, ResourceManager.hev_leg,
"Head", "Body", "LeftArm", "RightArm", "LeftLeg", "RightLeg", "LeftFoot", "RightFoot");
}};
}
}

View File

@ -1,14 +1,21 @@
package com.hbm.items.armor;
import org.lwjgl.opengl.GL11;
import com.hbm.main.ResourceManager;
import com.hbm.render.item.ItemRenderBase;
import com.hbm.render.model.ModelArmorRPA;
import com.hbm.render.tileentity.IItemRendererProvider;
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.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.client.IItemRenderer;
public class ArmorRPA extends ArmorFSBPowered {
public class ArmorRPA extends ArmorFSBPowered implements IItemRendererProvider {
public ArmorRPA(ArmorMaterial material, int slot, String texture, long maxPower, long chargeRate, long consumption, long drain) {
super(material, slot, texture, maxPower, chargeRate, consumption, drain);
@ -30,4 +37,19 @@ public class ArmorRPA extends ArmorFSBPowered {
return models[armorSlot];
}
@Override public Item getItemForRenderer() { return this; }
@Override
public IItemRenderer getRenderer() {
return new ItemRenderBase( ) {
public void renderInventory() { setupRenderInv(); }
public void renderNonInv() { setupRenderNonInv(); }
public void renderCommon() {
if(armorType == 1) GL11.glTranslated(0, 0.25, 0);
renderStandard(ResourceManager.armor_remnant, armorType,
ResourceManager.rpa_helmet, ResourceManager.rpa_chest, ResourceManager.rpa_arm, ResourceManager.rpa_leg,
"Head", "Body,Fan,Glow", "LeftArm", "RightArm", "LeftLeg", "RightLeg", "LeftBoot", "RightBoot");
}};
}
}

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) {
super(material, slot, "", maxPower, chargeRate, consumption, drain);
this.setCreativeTab(null);
}
@Override

View File

@ -0,0 +1,52 @@
package com.hbm.items.armor;
import com.hbm.main.ResourceManager;
import com.hbm.render.item.ItemRenderBase;
import com.hbm.render.model.ModelArmorT51;
import com.hbm.render.tileentity.IItemRendererProvider;
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.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.client.IItemRenderer;
public class ArmorT51 extends ArmorFSBPowered implements IItemRendererProvider {
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];
}
@Override public Item getItemForRenderer() { return this; }
@Override
public IItemRenderer getRenderer() {
return new ItemRenderBase( ) {
public void renderInventory() { setupRenderInv(); }
public void renderNonInv() { setupRenderNonInv(); }
public void renderCommon() {
renderStandard(ResourceManager.armor_t51, armorType,
ResourceManager.t51_helmet, ResourceManager.t51_chest, ResourceManager.t51_arm, ResourceManager.t51_leg,
"Helmet", "Chest", "LeftArm", "RightArm", "LeftLeg", "RightLeg", "LeftBoot", "RightBoot");
}};
}
}

View File

@ -1,14 +1,21 @@
package com.hbm.items.armor;
import org.lwjgl.opengl.GL11;
import com.hbm.main.ResourceManager;
import com.hbm.render.item.ItemRenderBase;
import com.hbm.render.model.ModelArmorTaurun;
import com.hbm.render.tileentity.IItemRendererProvider;
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.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.client.IItemRenderer;
public class ArmorTaurun extends ArmorFSB {
public class ArmorTaurun extends ArmorFSB implements IItemRendererProvider {
public ArmorTaurun(ArmorMaterial material, int slot, String texture) {
super(material, slot, texture);
@ -31,4 +38,22 @@ public class ArmorTaurun extends ArmorFSB {
return models[armorSlot];
}
@Override public Item getItemForRenderer() { return this; }
@Override
public IItemRenderer getRenderer() {
return new ItemRenderBase( ) {
public void renderInventory() {
if(armorType == 0) GL11.glTranslated(0, 1, 0);
if(armorType == 1) GL11.glTranslated(0, 1.5, 0);
setupRenderInv();
}
public void renderNonInv() { setupRenderNonInv(); }
public void renderCommon() {
renderStandard(ResourceManager.armor_taurun, armorType,
ResourceManager.taurun_helmet, ResourceManager.taurun_chest, ResourceManager.taurun_arm, ResourceManager.taurun_leg,
"Helmet", "Chest", "LeftArm", "RightArm", "LeftLeg", "RightLeg", "LeftBoot", "RightBoot");
}};
}
}

View File

@ -2,10 +2,15 @@ package com.hbm.items.armor;
import java.util.List;
import org.lwjgl.opengl.GL11;
import com.hbm.extprop.HbmPlayerProps;
import com.hbm.handler.ArmorModHandler;
import com.hbm.items.ModItems;
import com.hbm.main.ResourceManager;
import com.hbm.render.item.ItemRenderBase;
import com.hbm.render.model.ModelArmorTrenchmaster;
import com.hbm.render.tileentity.IItemRendererProvider;
import com.hbm.util.i18n.I18nUtil;
import cpw.mods.fml.relauncher.Side;
@ -13,12 +18,14 @@ import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import net.minecraftforge.client.IItemRenderer;
import net.minecraftforge.event.entity.living.LivingAttackEvent;
import net.minecraftforge.event.entity.living.LivingHurtEvent;
public class ArmorTrenchmaster extends ArmorFSB {
public class ArmorTrenchmaster extends ArmorFSB implements IItemRendererProvider {
public ArmorTrenchmaster(ArmorMaterial material, int slot, String texture) {
super(material, slot, texture);
@ -102,4 +109,22 @@ public class ArmorTrenchmaster extends ArmorFSB {
}
return false;
}
@Override public Item getItemForRenderer() { return this; }
@Override
public IItemRenderer getRenderer() {
return new ItemRenderBase( ) {
public void renderInventory() {
if(armorType == 0) GL11.glTranslated(0, 1, 0);
if(armorType == 1) GL11.glTranslated(0, 1.5, 0);
setupRenderInv();
}
public void renderNonInv() { setupRenderNonInv(); }
public void renderCommon() {
renderStandard(ResourceManager.armor_trenchmaster, armorType,
ResourceManager.trenchmaster_helmet, ResourceManager.trenchmaster_chest, ResourceManager.trenchmaster_arm, ResourceManager.trenchmaster_leg,
"Helmet,Light", "Chest", "LeftArm", "RightArm", "LeftLeg", "RightLeg", "LeftBoot", "RightBoot");
}};
}
}

View File

@ -7,7 +7,6 @@ import com.hbm.interfaces.Spaghetti;
import com.hbm.inventory.OreDictManager.DictFrame;
import com.hbm.inventory.fluid.Fluids;
import com.hbm.items.ModItems;
import com.hbm.items.machine.ItemBattery;
import com.hbm.items.machine.ItemBreedingRod.BreedingRodType;
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));
}
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)
{
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.fleija_kit ||
this == ModItems.solinium_kit ||
this == ModItems.t45_kit ||
this == ModItems.grenade_kit ||
this == ModItems.missile_kit ||
this == ModItems.multi_kit) {

View File

@ -4,29 +4,36 @@ import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Random;
import java.util.Set;
import org.lwjgl.opengl.GL11;
import com.google.common.collect.HashMultimap;
import com.google.common.collect.Multimap;
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.config.ClientConfig;
import com.hbm.handler.HbmKeybinds.EnumKeybind;
import com.hbm.handler.ability.AvailableAbilities;
import com.hbm.handler.ability.IBaseAbility;
import com.hbm.handler.ability.IToolAreaAbility;
import com.hbm.handler.ability.IToolHarvestAbility;
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.packet.PacketDispatcher;
import com.hbm.packet.toclient.PlayerInformPacket;
import com.hbm.tileentity.IGUIProvider;
import com.hbm.util.Tuple.Pair;
import api.hbm.item.IDepthRockTool;
import cpw.mods.fml.relauncher.ReflectionHelper;
@ -34,6 +41,10 @@ import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
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.EnchantmentHelper;
import net.minecraft.entity.EntityLivingBase;
@ -53,12 +64,14 @@ import net.minecraft.network.play.server.S23PacketBlockChange;
import net.minecraft.stats.StatList;
import net.minecraft.util.EnumChatFormatting;
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.IShearable;
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 EnumToolType toolType;
protected EnumRarity rarity = EnumRarity.common;
@ -69,7 +82,7 @@ public class ItemToolAbility extends ItemTool implements IDepthRockTool, IGUIPro
protected boolean rockBreaker = false;
public static enum EnumToolType {
PICKAXE(
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 })
@ -98,7 +111,7 @@ public class ItemToolAbility extends ItemTool implements IDepthRockTool, IGUIPro
public Set<Material> materials = new HashSet();
public Set<Block> blocks = new HashSet();
}
public ItemToolAbility setShears() {
this.isShears = true;
return this;
@ -109,7 +122,7 @@ public class ItemToolAbility extends ItemTool implements IDepthRockTool, IGUIPro
this.damage = damage;
this.movement = movement;
this.toolType = type;
// hacky workaround, might be good to rethink this entire system
if(type == EnumToolType.MINER) {
this.setHarvestLevel("pickaxe", material.getHarvestLevel());
@ -163,15 +176,15 @@ public class ItemToolAbility extends ItemTool implements IDepthRockTool, IGUIPro
World world = player.worldObj;
Block block = world.getBlock(x, y, z);
/*
/*
* 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
* 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.
* 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.
*
*
* 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;
@ -187,7 +200,7 @@ public class ItemToolAbility extends ItemTool implements IDepthRockTool, IGUIPro
preset.harvestAbility.preHarvestAll(preset.harvestAbilityLevel, world, player);
boolean skipRef = preset.areaAbility.onDig(preset.areaAbilityLevel, world, x, y, z, player, this);
if(!skipRef) {
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);
int meta = world.getBlockMetadata(x, y, z);
if(!(canHarvestBlock(block, stack) ||
canShearBlock(block, stack, world, x, y, z)) ||
(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);
if(
!ForgeHooks.canHarvestBlock(block, player, meta) ||
refStrength / strength > 10f ||
!ForgeHooks.canHarvestBlock(block, player, meta) ||
refStrength / strength > 10f ||
refBlock.getPlayerRelativeBlockHardness(player, world, refX, refY, refZ) < 0
)
return;
@ -320,7 +333,7 @@ public class ItemToolAbility extends ItemTool implements IDepthRockTool, IGUIPro
/** 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) {
ItemStack held = player.getHeldItem();
IShearable target = (IShearable) block;
@ -369,7 +382,7 @@ public class ItemToolAbility extends ItemTool implements IDepthRockTool, IGUIPro
player.destroyCurrentEquippedItem();
}
}
if(removedByPlayer && canHarvest) {
try {
blockCaptureDrops.invoke(block, true);
@ -384,7 +397,7 @@ public class ItemToolAbility extends ItemTool implements IDepthRockTool, IGUIPro
} catch (InvocationTargetException e) {
// Might be possible? Not in practice, though
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);
int numPresets = Math.min(nbtPresets.tagCount(), 99);
presets = new ArrayList<ToolPreset>(numPresets);
for(int i = 0; i < numPresets; i++) {
NBTTagCompound nbtPreset = nbtPresets.getCompoundTagAt(i);
ToolPreset preset = new ToolPreset();
@ -544,12 +557,12 @@ public class ItemToolAbility extends ItemTool implements IDepthRockTool, IGUIPro
@Override
public void handleKeybind(EntityPlayer player, ItemStack stack, EnumKeybind keybind, boolean state) {
if(keybind == EnumKeybind.ABILITY_CYCLE && state) {
World world = player.worldObj;
if(!canOperate(stack)) return;
Configuration config = getConfiguration(stack);
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) {
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

@ -237,7 +237,6 @@ public class Library {
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.fusion_core_infinite) return 0;
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) {
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) {

View File

@ -449,6 +449,18 @@ public class ClientProxy extends ServerProxy {
}
}
}
// same crap but for items directly because why invent a new solution when this shit works just fine
Iterator itItems = Item.itemRegistry.iterator();
while(itItems.hasNext()) {
Object o = itItems.next();
if(o instanceof IItemRendererProvider) {
IItemRendererProvider prov = (IItemRendererProvider) o;
for(Item item : prov.getItemsForRenderer()) {
MinecraftForgeClient.registerItemRenderer(item, prov.getRenderer());
}
}
}
//universal JSON translated items
double[] rtp = new double[] {0, 180, -90};

View File

@ -1428,6 +1428,8 @@ public class MainRegistry {
ignoreMappings.add("hbm:item.mp_f_20");
ignoreMappings.add("hbm:item.mp_thruster_10_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 ///
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_aschrab = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/grenade_aschrab.obj"));
public static final IModelCustom armor_bj = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/BJ.obj"));
public static final IModelCustom armor_hev = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/hev.obj"));
public static final IModelCustom armor_ajr = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/AJR.obj"));
public static final IModelCustom armor_hat = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/hat.obj"));
public static final IModelCustom armor_no9 = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/no9.obj"));
public static final IModelCustom armor_goggles = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/goggles.obj"));
public static final IModelCustom armor_fau = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/fau.obj"));
public static final IModelCustom armor_dnt = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/dnt.obj"));
public static final IModelCustom armor_steamsuit = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/steamsuit.obj"));
public static final IModelCustom armor_dieselsuit = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/bnuuy.obj"));
public static final IModelCustom armor_remnant = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/remnant.obj"));
public static final IModelCustom armor_bismuth = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/bismuth.obj"));
public static final IModelCustom armor_mod_tesla = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/mod_tesla.obj"));
public static final IModelCustom armor_wings = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/murk.obj"));
public static final IModelCustom armor_axepack = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/wings_pheo.obj"));
public static final IModelCustom armor_tail = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/tail_peep.obj"));
public static final IModelCustom player_manly_af = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/armor/player_fem.obj"));
public static final IModelCustom armor_envsuit = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/envsuit.obj"));
public static final IModelCustom armor_taurun = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/taurun.obj"));
public static final IModelCustom armor_trenchmaster = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/trenchmaster.obj"));
public static final IModelCustom armor_bj = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/BJ.obj")).asVBO();
public static final IModelCustom armor_hev = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/hev.obj")).asVBO();
public static final IModelCustom armor_ajr = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/AJR.obj")).asVBO();
public static final IModelCustom armor_t51 = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/t51.obj")).asVBO();
public static final IModelCustom armor_hat = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/hat.obj")).asVBO();
public static final IModelCustom armor_no9 = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/no9.obj")).asVBO();
public static final IModelCustom armor_goggles = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/goggles.obj")).asVBO();
public static final IModelCustom armor_fau = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/fau.obj")).asVBO();
public static final IModelCustom armor_dnt = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/dnt.obj")).asVBO();
public static final IModelCustom armor_steamsuit = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/steamsuit.obj")).asVBO();
public static final IModelCustom armor_dieselsuit = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/bnuuy.obj")).asVBO();
public static final IModelCustom armor_remnant = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/remnant.obj")).asVBO();
public static final IModelCustom armor_bismuth = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/bismuth.obj")).asVBO();
public static final IModelCustom armor_mod_tesla = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/mod_tesla.obj")).asVBO();
public static final IModelCustom armor_wings = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/murk.obj")).asVBO();
public static final IModelCustom armor_axepack = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/wings_pheo.obj")).asVBO();
public static final IModelCustom armor_tail = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/tail_peep.obj")).asVBO();
public static final IModelCustom player_manly_af = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/player_fem.obj"), false).asVBO();
public static final IModelCustom armor_envsuit = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/envsuit.obj")).asVBO();
public static final IModelCustom armor_taurun = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/taurun.obj")).asVBO();
public static final IModelCustom armor_trenchmaster = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/trenchmaster.obj")).asVBO();
////Texture Items
@ -1087,6 +1088,11 @@ public class ResourceManager {
public static final ResourceLocation ajro_chest = new ResourceLocation(RefStrings.MODID, "textures/armor/ajro_chest.png");
public static final ResourceLocation ajro_arm = new ResourceLocation(RefStrings.MODID, "textures/armor/ajro_arm.png");
public static final ResourceLocation t51_helmet = new ResourceLocation(RefStrings.MODID, "textures/armor/t51_helmet.png");
public static final ResourceLocation t51_leg = new ResourceLocation(RefStrings.MODID, "textures/armor/t51_leg.png");
public static final ResourceLocation t51_chest = new ResourceLocation(RefStrings.MODID, "textures/armor/t51_chest.png");
public static final ResourceLocation t51_arm = new ResourceLocation(RefStrings.MODID, "textures/armor/t51_arm.png");
public static final ResourceLocation fau_helmet = new ResourceLocation(RefStrings.MODID, "textures/armor/fau_helmet.png");
public static final ResourceLocation fau_leg = new ResourceLocation(RefStrings.MODID, "textures/armor/fau_leg.png");
public static final ResourceLocation fau_chest = new ResourceLocation(RefStrings.MODID, "textures/armor/fau_chest.png");

View File

@ -84,6 +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 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 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"));

View File

@ -43,8 +43,8 @@ public class ModelArmorDigamma extends ModelArmorBase {
if(this.type == 1) {
bindTexture(ResourceManager.fau_chest);
this.body.render(scaleFactor);
GL11.glEnable(GL11.GL_BLEND);
OpenGlHelper.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ZERO);
GL11.glEnable(GL11.GL_BLEND);
OpenGlHelper.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ZERO);
bindTexture(ResourceManager.fau_cassette);
this.cassette.render(scaleFactor);
bindTexture(ResourceManager.fau_arm);

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

@ -51,7 +51,8 @@ public class ArmorUtil {
ArmorRegistry.registerHazard(ModItems.hazmat_helmet_grey, HazardClass.SAND);
ArmorRegistry.registerHazard(ModItems.hazmat_paa_helmet, HazardClass.LIGHT, HazardClass.SAND);
ArmorRegistry.registerHazard(ModItems.liquidator_helmet, HazardClass.LIGHT, HazardClass.SAND);
ArmorRegistry.registerHazard(ModItems.t45_helmet, HazardClass.PARTICLE_COARSE, HazardClass.PARTICLE_FINE, HazardClass.GAS_LUNG, HazardClass.BACTERIA, HazardClass.GAS_BLISTERING, HazardClass.GAS_MONOXIDE, HazardClass.LIGHT, HazardClass.SAND);
ArmorRegistry.registerHazard(ModItems.t45_helmet, HazardClass.PARTICLE_COARSE, HazardClass.PARTICLE_FINE, HazardClass.GAS_LUNG, HazardClass.BACTERIA, HazardClass.GAS_BLISTERING, HazardClass.GAS_MONOXIDE, HazardClass.SAND);
ArmorRegistry.registerHazard(ModItems.t51_helmet, HazardClass.PARTICLE_COARSE, HazardClass.PARTICLE_FINE, HazardClass.GAS_LUNG, HazardClass.BACTERIA, HazardClass.GAS_BLISTERING, HazardClass.GAS_MONOXIDE, HazardClass.SAND);
ArmorRegistry.registerHazard(ModItems.ajr_helmet, HazardClass.PARTICLE_COARSE, HazardClass.PARTICLE_FINE, HazardClass.GAS_LUNG, HazardClass.BACTERIA, HazardClass.GAS_BLISTERING, HazardClass.GAS_MONOXIDE, HazardClass.LIGHT, HazardClass.SAND);
ArmorRegistry.registerHazard(ModItems.ajro_helmet, HazardClass.PARTICLE_COARSE, HazardClass.PARTICLE_FINE, HazardClass.GAS_LUNG, HazardClass.BACTERIA, HazardClass.GAS_BLISTERING, HazardClass.GAS_MONOXIDE, HazardClass.LIGHT, HazardClass.SAND);
ArmorRegistry.registerHazard(ModItems.steamsuit_helmet, HazardClass.PARTICLE_COARSE, HazardClass.PARTICLE_FINE, HazardClass.GAS_LUNG, HazardClass.BACTERIA, HazardClass.GAS_BLISTERING, HazardClass.GAS_MONOXIDE, HazardClass.LIGHT, HazardClass.SAND);

View File

@ -165,6 +165,12 @@ public class DamageResistanceHandler {
.addCategory(CATEGORY_EXPLOSION, 5F, 0.25F)
.addExact(DamageSource.fall.damageType, 0F, 1F)
.setOther(0F, 0.1F));
registerSet(ModItems.t51_helmet, ModItems.t51_plate, ModItems.t51_legs, ModItems.t51_boots, new ResistanceStats()
.addCategory(CATEGORY_PHYSICAL, 2F, 0.15F)
.addCategory(CATEGORY_FIRE, 0.5F, 0.35F)
.addCategory(CATEGORY_EXPLOSION, 5F, 0.25F)
.addExact(DamageSource.fall.damageType, 0F, 1F)
.setOther(0F, 0.1F));
registerSet(ModItems.ajr_helmet, ModItems.ajr_plate, ModItems.ajr_legs, ModItems.ajr_boots, new ResistanceStats()
.addCategory(CATEGORY_PHYSICAL, 4F, 0.15F)
.addCategory(CATEGORY_FIRE, 0.5F, 0.35F)

View File

@ -92,23 +92,23 @@ public class MobUtil {
}));
slotPoolAdv.put(4, createSlotPool(new Object[][]{
{ModItems.security_helmet, 10}, {ModItems.t45_helmet, 4}, {ModItems.asbestos_helmet, 12},
{ModItems.security_helmet, 10}, {ModItems.t51_helmet, 4}, {ModItems.asbestos_helmet, 12},
{ModItems.liquidator_helmet, 4}, {ModItems.no9, 12},
{ModItems.hazmat_helmet, 6}
}));
slotPoolAdv.put(3, createSlotPool(new Object[][]{
{ModItems.liquidator_plate, 4}, {ModItems.security_plate, 8}, {ModItems.asbestos_plate, 12},
{ModItems.t45_plate, 4}, {ModItems.hazmat_plate, 6},
{ModItems.t51_plate, 4}, {ModItems.hazmat_plate, 6},
{ModItems.steel_plate, 8}
}));
slotPoolAdv.put(2, createSlotPool(new Object[][]{
{ModItems.liquidator_legs, 4}, {ModItems.security_legs, 8}, {ModItems.asbestos_legs, 12},
{ModItems.t45_legs, 4}, {ModItems.hazmat_legs, 6},
{ModItems.t51_legs, 4}, {ModItems.hazmat_legs, 6},
{ModItems.steel_legs, 8}
}));
slotPoolAdv.put(1, createSlotPool(new Object[][]{
{ModItems.liquidator_boots, 4}, {ModItems.security_boots, 8}, {ModItems.asbestos_boots, 12},
{ModItems.t45_boots, 4}, {ModItems.hazmat_boots, 6},
{ModItems.t51_boots, 4}, {ModItems.hazmat_boots, 6},
{ModItems.robes_boots, 8}
}));
slotPoolAdv.put(0, createSlotPool(new Object[][]{

View File

@ -129,7 +129,7 @@ public class NTMWorldGenerator implements IWorldGenerator {
NBTStructure.registerStructure(0, new SpawnCondition("forest_post") {{
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;
}});
@ -145,6 +145,18 @@ public class NTMWorldGenerator implements IWorldGenerator {
spawnWeight = StructureConfig.factorySpawnWeight;
}});
NBTStructure.registerStructure(0, new SpawnCondition("crane") {{
canSpawn = flatbiomes::contains;
structure = new JigsawPiece("crane", StructureManager.crane, -9);
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") {{
canSpawn = biome -> biome.heightVariation <= 0.3F;
structure = new JigsawPiece("crashed_plane_1", StructureManager.plane1, -5);

View File

@ -116,6 +116,40 @@ public class LogicBlockActions {
// world.setBlock(x, y, z, ModBlocks.block_steel); this is useless
};
public static Consumer<LogicBlock.TileEntityLogicBlock> COLLAPSE_ROOF_RAD_10 = (tile) -> {
World world = tile.getWorldObj();
int x = tile.xCoord;
int y = tile.yCoord;
int z = tile.zCoord;
if(tile.phase == 0) return;
int r = 8;
int r2 = r * r;
int r22 = r2 / 2;
for (int xx = -r; xx < r; xx++) {
int X = xx + x;
int XX = xx * xx;
for (int yy = -r; yy < r; yy++) {
int Y = yy + y;
int YY = XX + yy * yy;
for (int zz = -r; zz < r; zz++) {
int Z = zz + z;
int ZZ = YY + zz * zz;
if (ZZ < r22) {
if (world.getBlock(X, Y, Z).getExplosionResistance(null) <= 70) {
EntityFallingBlockNT entityfallingblock = new EntityFallingBlockNT(world, X + 0.5, Y + 0.5, Z + 0.5, world.getBlock(X, Y, Z), world.getBlockMetadata(X, Y, Z));
world.spawnEntityInWorld(entityfallingblock);
}
}
}
}
}
world.setBlock(x, y, z, Blocks.air);
};
public static Consumer<LogicBlock.TileEntityLogicBlock> FODDER_WAVE = (tile) -> {
World world = tile.getWorldObj();
int x = tile.xCoord;
@ -342,6 +376,7 @@ public class LogicBlockActions {
actions.put("FODDER_WAVE", FODDER_WAVE);
actions.put("ABERRATOR", PHASE_ABERRATOR);
actions.put("COLLAPSE_ROOF_RAD_5", COLLAPSE_ROOF_RAD_5);
actions.put("COLLAPSE_ROOF_RAD_10", COLLAPSE_ROOF_RAD_10);
actions.put("PUZZLE_TEST", PUZZLE_TEST);
actions.put("MISSILE_STRIKE", MISSILE_STRIKE);
actions.put("IRRADIATE_ENTITIES_AOE", RAD_CONTAINMENT_SYSTEM);

View File

@ -43,6 +43,14 @@ public class LogicBlockConditions {
return false;
};
public static Function<LogicBlock.TileEntityLogicBlock, Boolean> PLAYER_CUBE_3 = (tile) -> {
World world = tile.getWorldObj();
int x = tile.xCoord;
int y = tile.yCoord;
int z = tile.zCoord;
return !world.getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.getBoundingBox(x, y, z, x + 1, y - 2, z + 1).expand(3, 3, 3)).isEmpty();
};
public static Function<LogicBlock.TileEntityLogicBlock, Boolean> PLAYER_CUBE_5 = (tile) -> {
World world = tile.getWorldObj();
int x = tile.xCoord;
@ -97,6 +105,7 @@ public class LogicBlockConditions {
//example conditions
conditions.put("EMPTY", EMPTY);
conditions.put("ABERRATOR", ABERRATOR);
conditions.put("PLAYER_CUBE_3", PLAYER_CUBE_3);
conditions.put("PLAYER_CUBE_5", PLAYER_CUBE_5);
conditions.put("PLAYER_CUBE_25", PLAYER_CUBE_25);
conditions.put("REDSTONE", REDSTONE);

View File

@ -3464,6 +3464,10 @@ item.t45_helmet.name=T45-Powerrüstungshelm
item.t45_kit.name=T45-Powerrüstungskit
item.t45_legs.name=T45-Powerrüstungsbeinschutz
item.t45_plate.name=T45-Powerrüstungsbrustpanzer
item.t51_boots.name=T-51b-Powerrüstungsstiefel
item.t51_helmet.name=T-51b-Powerrüstungshelm
item.t51_legs.name=T-51b-Powerrüstungsbeinschutz
item.t51_plate.name=T-51b-Powerrüstungsbrustpanzer
item.tank_steel.name=Stahltank
item.taurun_boots.name=Taurun-Stiefel
item.taurun_helmet.name=Taurun-Helm

View File

@ -4584,6 +4584,10 @@ item.t45_helmet.name=T45 Power Armor Helmet
item.t45_kit.name=T45 Power Armor Kit
item.t45_legs.name=T45 Power Armor Leggings
item.t45_plate.name=T45 Power Armor Chestplate
item.t51_boots.name=T-51b Power Armor Boots
item.t51_helmet.name=T-51b Power Armor Helmet
item.t51_legs.name=T-51b Power Armor Leggings
item.t51_plate.name=T-51b Power Armor Chestplate
item.tank_steel.name=Steel Tank
item.taurun_boots.name=Taurun Boots
item.taurun_helmet.name=Taurun Helmet

File diff suppressed because it is too large Load Diff

Binary file not shown.

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: 264 B