shredder compat fix(?), trenchmaster armor

This commit is contained in:
Bob 2023-09-06 21:27:31 +02:00
parent 2e5fc5e86a
commit 24444d6c4e
8 changed files with 2523 additions and 2397 deletions

View File

@ -1,37 +0,0 @@
## Added
* Conveyor press
* An upgraded version of the electric press that can be integrated directly into conveyor belts
* Each pressing operation will process however many items happen to be at the belt at the time, so given enough conveyor infrastructure it can be much faster than a normal electric press
* Has no GUI, stamps are installed either by hand or via automation
* Stamps can be removed with a screwdriver
* Can only stamp single items to avoid issues with stack limits, so it's best to use ejection speed instead of stack ejection upgrades for the conveyor ejectors
## Changed
* Chlorophyte rounds now deal 2x more damage than their standard counterparts instead of 1.5x
* Chlorophyte rounds now penetrate multiple enemies
* Decreased chlorophyte targeting range from 200 to 30 blocks
* Josh now has recoil and reload animations
* Anvil recipes for upgrading ammo types have been adjusted to match the crafting batch size
* Adjusted the corium block destruction function to be more in line with the recent concrete nerfs
* Reduced the blast resistance threshold for FEL, making concrete once again resistant to lasers
* Crafting bullet assemblies now only yields one item, it's that one assembly that turns into a full set of bullets after being pressed once. This should reduce the amount of press operations by up to a factor of 64.
* 5mm assemblies now yield 64 instead of 32 bullets
* The production complexity and time for making thermoelectric elements in the assembler has been reduced
* Thermoelectric elements can now also be made in a tier 2 anvil
* Changed electric press recipe, crafting complexity has been reduced and the press now uses hydraulic pistons
* Removed DFC emitter beam cap again since the core already imposes a natural limit due to fuel consumption
* I don't know why anyone would need a DFC that strong anyway, but now you can have them again
* The UAC pistol now has a crafting recipe and can also be found in structures
## Fixed
* Fixed logspam when pollution handler tries to save the pollution data for dimensions that have never been loaded before
* Fixed dead leaves layer not being replacable by other blocks
* Fixed rock layers like schist, hematite and sulfur caves not spawning at all
* Fixed rock layers replacing end portal frames or bedrock
* Fixed FEnSU instantly voiding all energy when sending
* Fixed some conflict causing the nuke flash to be applied permanently
* Fixed flux level not resetting when rods are above melting point with meltdowns disabled
* Fixed crash caused by express delivery shells
* Fixed 4 gauge solid steel slugs not being made from steel
* Fixed missing lang entry for fluorite ore
* Fixed UAC pistol UV

View File

@ -352,16 +352,16 @@ public class ShredderRecipes extends SerializableRecipe {
ShredderRecipes.setRecipe(ModItems.debris_graphite, new ItemStack(ModItems.powder_coal, 1));
/* GC COMPAT */
Item gcMoonBlock = Compat.tryLoadItem(Compat.MOD_GCC, "moonBlock");
Block gcMoonBlock = Compat.tryLoadBlock(Compat.MOD_GCC, "moonBlock");
if(gcMoonBlock != null) {
ShredderRecipes.setRecipe(new ItemStack(gcMoonBlock, 1, 3), new ItemStack(ModBlocks.moon_turf)); //Moon dirt
ShredderRecipes.setRecipe(new ItemStack(gcMoonBlock, 1, 5), new ItemStack(ModBlocks.moon_turf)); //Moon topsoil
}
/* AR COMPAT */
Item arMoonTurf = Compat.tryLoadItem(Compat.MOD_AR, "turf");
Block arMoonTurf = Compat.tryLoadBlock(Compat.MOD_AR, "turf");
if(arMoonTurf != null) ShredderRecipes.setRecipe(arMoonTurf, new ItemStack(ModBlocks.moon_turf)); //i assume it's moon turf
Item arMoonTurfDark = Compat.tryLoadItem(Compat.MOD_AR, "turfDark");
Block arMoonTurfDark = Compat.tryLoadBlock(Compat.MOD_AR, "turfDark");
if(arMoonTurfDark != null) ShredderRecipes.setRecipe(arMoonTurfDark, new ItemStack(ModBlocks.moon_turf)); //probably moon dirt? would have helped if i had ever played AR for more than 5 seconds
}

View File

@ -1989,6 +1989,10 @@ public class ModItems {
public static Item dns_plate;
public static Item dns_legs;
public static Item dns_boots;
public static Item trenchmaster_helmet;
public static Item trenchmaster_plate;
public static Item trenchmaster_legs;
public static Item trenchmaster_boots;
public static Item zirconium_legs;
public static Item robes_helmet;
public static Item robes_plate;
@ -4929,7 +4933,7 @@ public class ModItems {
fau_plate = new ArmorDigamma(aMatFau, 1, RefStrings.MODID + ":textures/armor/starmetal_1.png", 10000000, 10000, 2500, 0).cloneStats((ArmorFSB) fau_helmet).setFullSetForHide().setUnlocalizedName("fau_plate").setTextureName(RefStrings.MODID + ":fau_plate");
fau_legs = new ArmorDigamma(aMatFau, 2, RefStrings.MODID + ":textures/armor/starmetal_2.png", 10000000, 10000, 2500, 0).cloneStats((ArmorFSB) fau_helmet).hides(EnumPlayerPart.LEFT_LEG, EnumPlayerPart.RIGHT_LEG).setFullSetForHide().setUnlocalizedName("fau_legs").setTextureName(RefStrings.MODID + ":fau_legs");
fau_boots = new ArmorDigamma(aMatFau, 3, RefStrings.MODID + ":textures/armor/starmetal_1.png", 10000000, 10000, 2500, 0).cloneStats((ArmorFSB) fau_helmet).setUnlocalizedName("fau_boots").setTextureName(RefStrings.MODID + ":fau_boots");
ArmorMaterial aMatDNS = EnumHelper.addArmorMaterial("HBM_DNT_NANO", 150, new int[] { 3, 8, 6, 3 }, 100);
aMatDNS.customCraftingMaterial = ModItems.plate_armor_dnt;
dns_helmet = new ArmorDNT(aMatDNS, 0, RefStrings.MODID + ":textures/armor/starmetal_1.png", 1000000000, 1000000, 100000, 115)
@ -4950,6 +4954,19 @@ public class ModItems {
dns_legs = new ArmorDNT(aMatDNS, 2, RefStrings.MODID + ":textures/armor/starmetal_2.png", 1000000000, 1000000, 100000, 115).cloneStats((ArmorFSB) dns_helmet).setUnlocalizedName("dns_legs").setTextureName(RefStrings.MODID + ":dns_legs");
dns_boots = new ArmorDNT(aMatDNS, 3, RefStrings.MODID + ":textures/armor/starmetal_1.png", 1000000000, 1000000, 100000, 115).cloneStats((ArmorFSB) dns_helmet).setUnlocalizedName("dns_boots").setTextureName(RefStrings.MODID + ":dns_boots");
ArmorMaterial aMatTrench = EnumHelper.addArmorMaterial("HBM_TRENCH", 150, new int[] { 3, 8, 6, 3 }, 100);
aMatTrench.customCraftingMaterial = ModItems.plate_iron;
trenchmaster_helmet = new ArmorTrenchmaster(aMatTrench, 0, RefStrings.MODID + ":textures/armor/starmetal_1.png")
.addEffect(new PotionEffect(Potion.damageBoost.id, 20, 9))
.addEffect(new PotionEffect(Potion.digSpeed.id, 20, 7))
.addEffect(new PotionEffect(Potion.jump.id, 20, 2))
.enableVATS(true)
.hides(EnumPlayerPart.HAT)
.setUnlocalizedName("trenchmaster_helmet").setTextureName(RefStrings.MODID + ":trenchmaster_helmet");
trenchmaster_plate = new ArmorTrenchmaster(aMatTrench, 1, RefStrings.MODID + ":textures/armor/starmetal_1.png").cloneStats((ArmorFSB) trenchmaster_helmet).setUnlocalizedName("trenchmaster_plate").setTextureName(RefStrings.MODID + ":trenchmaster_plate");
trenchmaster_legs = new ArmorTrenchmaster(aMatTrench, 2, RefStrings.MODID + ":textures/armor/starmetal_2.png").cloneStats((ArmorFSB) trenchmaster_helmet).setUnlocalizedName("trenchmaster_legs").setTextureName(RefStrings.MODID + ":trenchmaster_legs");
trenchmaster_boots = new ArmorTrenchmaster(aMatTrench, 3, RefStrings.MODID + ":textures/armor/starmetal_1.png").cloneStats((ArmorFSB) trenchmaster_helmet).setUnlocalizedName("trenchmaster_boots").setTextureName(RefStrings.MODID + ":trenchmaster_boots");
jackt = new ModArmor(MainRegistry.aMatSteel, 1).setUnlocalizedName("jackt").setTextureName(RefStrings.MODID + ":jackt");
jackt2 = new ModArmor(MainRegistry.aMatSteel, 1).setUnlocalizedName("jackt2").setTextureName(RefStrings.MODID + ":jackt2");
@ -7838,6 +7855,10 @@ public class ModItems {
GameRegistry.registerItem(dns_plate, dns_plate.getUnlocalizedName());
GameRegistry.registerItem(dns_legs, dns_legs.getUnlocalizedName());
GameRegistry.registerItem(dns_boots, dns_boots.getUnlocalizedName());
GameRegistry.registerItem(trenchmaster_helmet, trenchmaster_helmet.getUnlocalizedName());
GameRegistry.registerItem(trenchmaster_plate, trenchmaster_plate.getUnlocalizedName());
GameRegistry.registerItem(trenchmaster_legs, trenchmaster_legs.getUnlocalizedName());
GameRegistry.registerItem(trenchmaster_boots, trenchmaster_boots.getUnlocalizedName());
//Nobody will ever read this anyway, so it shouldn't matter.
GameRegistry.registerItem(chainsaw, chainsaw.getUnlocalizedName());

View File

@ -0,0 +1,33 @@
package com.hbm.items.armor;
import com.hbm.render.model.ModelArmorTrenchmaster;
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 ArmorTrenchmaster extends ArmorFSB {
public ArmorTrenchmaster(ArmorMaterial material, int slot, String texture) {
super(material, slot, texture);
}
@SideOnly(Side.CLIENT)
ModelArmorTrenchmaster[] models;
@Override
@SideOnly(Side.CLIENT)
public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) {
if(models == null) {
models = new ModelArmorTrenchmaster[4];
for(int i = 0; i < 4; i++)
models[i] = new ModelArmorTrenchmaster(i);
}
return models[armorSlot];
}
}

View File

@ -15,6 +15,8 @@ import com.hbm.interfaces.IHoldableWeapon;
import com.hbm.interfaces.IItemHUD;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.items.IEquipReceiver;
import com.hbm.items.ModItems;
import com.hbm.items.armor.ArmorFSB;
import com.hbm.lib.HbmCollection;
import com.hbm.packet.AuxParticlePacketNT;
import com.hbm.packet.GunAnimationPacket;
@ -117,7 +119,7 @@ public class ItemGunBase extends Item implements IHoldableWeapon, IItemHUD, IEqu
if(GameSettings.isKeyDown(HbmKeybinds.reloadKey) && Minecraft.getMinecraft().currentScreen == null && (getMag(stack) < mainConfig.ammoCap || hasInfinity(stack, mainConfig))) {
PacketDispatcher.wrapper.sendToServer(new GunButtonPacket(true, (byte) 2));
setIsReloading(stack, true);
resetReloadCycle(stack);
resetReloadCycle(entity, stack);
}
}
}
@ -374,7 +376,7 @@ public class ItemGunBase extends Item implements IHoldableWeapon, IItemHUD, IEqu
if (getMag(stack) >= mainConfig.ammoCap)
setIsReloading(stack, false);
else
resetReloadCycle(stack);
resetReloadCycle(player, stack);
if(hasLoaded && mainConfig.reloadSoundEnd)
world.playSoundAtEntity(player, mainConfig.reloadSound, 1.0F, 1.0F);
@ -420,7 +422,7 @@ public class ItemGunBase extends Item implements IHoldableWeapon, IItemHUD, IEqu
PacketDispatcher.wrapper.sendTo(new GunAnimationPacket(AnimType.RELOAD.ordinal()), (EntityPlayerMP) player);
setIsReloading(stack, true);
resetReloadCycle(stack);
resetReloadCycle(player, stack);
}
public boolean canReload(ItemStack stack, World world, EntityPlayer player) {
@ -574,8 +576,8 @@ public class ItemGunBase extends Item implements IHoldableWeapon, IItemHUD, IEqu
if(!main)
config = altConfig;
if(hasInfinity(stack, config))
return;
if(hasInfinity(stack, config)) return;
if(isTrenchMaster(player) && player.getRNG().nextInt(3) == 0) return;
if(config.reloadType != GunConfiguration.RELOAD_NONE) {
setMag(stack, getMag(stack) - 1);
@ -589,8 +591,8 @@ public class ItemGunBase extends Item implements IHoldableWeapon, IItemHUD, IEqu
}
/// sets reload cycle to config defult ///
public static void resetReloadCycle(ItemStack stack) {
writeNBT(stack, "reload", ((ItemGunBase)stack.getItem()).mainConfig.reloadDuration);
public static void resetReloadCycle(EntityPlayer player, ItemStack stack) {
writeNBT(stack, "reload", getReloadDuration(player, stack));
}
/// if reloading routine is active ///
@ -815,4 +817,14 @@ public class ItemGunBase extends Item implements IHoldableWeapon, IItemHUD, IEqu
data.setInteger("ej", ejector.getId());
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, entity.posX, entity.posY + entity.getEyeHeight(), entity.posZ), new TargetPoint(entity.dimension, entity.posX, entity.posY, entity.posZ, 50));
}
public static int getReloadDuration(EntityPlayer player, ItemStack stack) {
int cycle = ((ItemGunBase) stack.getItem()).mainConfig.reloadDuration;
if(isTrenchMaster(player)) return Math.max(1, cycle / 2);
return cycle;
}
public static boolean isTrenchMaster(EntityPlayer player) {
return player.inventory.armorInventory[2] != null && player.inventory.armorInventory[2].getItem() == ModItems.trenchmaster_plate && ArmorFSB.hasFSBArmor(player);
}
}

View File

@ -789,6 +789,7 @@ public class ResourceManager {
public static final IModelCustom armor_solstice = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/solstice.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_trenchmaster = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/trenchmaster.obj"));
////Texture Items
@ -935,6 +936,11 @@ public class ResourceManager {
public static final ResourceLocation rpa_chest = new ResourceLocation(RefStrings.MODID, "textures/armor/rpa_chest.png");
public static final ResourceLocation rpa_arm = new ResourceLocation(RefStrings.MODID, "textures/armor/rpa_arm.png");
public static final ResourceLocation trenchmaster_helmet = new ResourceLocation(RefStrings.MODID, "textures/armor/trenchmaster_helmet.png");
public static final ResourceLocation trenchmaster_leg = new ResourceLocation(RefStrings.MODID, "textures/armor/trenchmaster_leg.png");
public static final ResourceLocation trenchmaster_chest = new ResourceLocation(RefStrings.MODID, "textures/armor/trenchmaster_chest.png");
public static final ResourceLocation trenchmaster_arm = new ResourceLocation(RefStrings.MODID, "textures/armor/trenchmaster_arm.png");
public static final ResourceLocation mod_tesla = new ResourceLocation(RefStrings.MODID, "textures/armor/mod_tesla.png");
public static final ResourceLocation armor_bismuth_tex = new ResourceLocation(RefStrings.MODID, "textures/armor/bismuth.png");

View File

@ -0,0 +1,76 @@
package com.hbm.render.model;
import org.lwjgl.opengl.GL11;
import com.hbm.main.ResourceManager;
import com.hbm.render.loader.ModelRendererObj;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.entity.Entity;
public class ModelArmorTrenchmaster extends ModelArmorBase {
ModelRendererObj light;
public ModelArmorTrenchmaster(int type) {
super(type);
head = new ModelRendererObj(ResourceManager.armor_trenchmaster, "Helmet");
light = new ModelRendererObj(ResourceManager.armor_trenchmaster, "Light");
body = new ModelRendererObj(ResourceManager.armor_trenchmaster, "Chest");
leftArm = new ModelRendererObj(ResourceManager.armor_trenchmaster, "LeftArm").setRotationPoint(-5.0F, 2.0F, 0.0F);
rightArm = new ModelRendererObj(ResourceManager.armor_trenchmaster, "RightArm").setRotationPoint(5.0F, 2.0F, 0.0F);
leftLeg = new ModelRendererObj(ResourceManager.armor_trenchmaster, "LeftLeg").setRotationPoint(1.9F, 12.0F, 0.0F);
rightLeg = new ModelRendererObj(ResourceManager.armor_trenchmaster, "RightLeg").setRotationPoint(-1.9F, 12.0F, 0.0F);
leftFoot = new ModelRendererObj(ResourceManager.armor_trenchmaster, "LeftFoot").setRotationPoint(1.9F, 12.0F, 0.0F);
rightFoot = new ModelRendererObj(ResourceManager.armor_trenchmaster, "RightFoot").setRotationPoint(-1.9F, 12.0F, 0.0F);
}
@Override
public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) {
setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity);
head.copyTo(light);
GL11.glPushMatrix();
if(type == 0) {
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.trenchmaster_helmet);
GL11.glEnable(GL11.GL_BLEND);
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
head.render(par7);
GL11.glDisable(GL11.GL_BLEND);
/// START GLOW ///
float lastX = OpenGlHelper.lastBrightnessX;
float lastY = OpenGlHelper.lastBrightnessY;
GL11.glPushAttrib(GL11.GL_LIGHTING_BIT);
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240F, 240F);
GL11.glDisable(GL11.GL_LIGHTING);
light.render(par7);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glPopAttrib();
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, lastX, lastY);
/// END GLOW ///
}
if(type == 1) {
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.trenchmaster_chest);
body.render(par7);
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.trenchmaster_arm);
leftArm.render(par7);
rightArm.render(par7);
}
if(type == 2) {
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.trenchmaster_leg);
leftLeg.render(par7);
rightLeg.render(par7);
}
if(type == 3) {
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.trenchmaster_leg);
leftFoot.render(par7);
rightFoot.render(par7);
}
GL11.glPopMatrix();
}
}

File diff suppressed because it is too large Load Diff