From cd12d6d9afa51f5b3389e31491e45a01878c69cd Mon Sep 17 00:00:00 2001 From: Bob Date: Wed, 28 Jun 2023 22:05:29 +0200 Subject: [PATCH] configs configs, glyphid meat, yummy yummy fruit salad --- changelog | 58 +++--------------- .../blocks/generic/BlockGlyphidSpawner.java | 12 ++++ .../java/com/hbm/config/CommonConfig.java | 1 + .../java/com/hbm/config/RadiationConfig.java | 19 ++++++ .../com/hbm/crafting/SmeltingRecipes.java | 2 + .../com/hbm/entity/mob/EntityGlyphid.java | 7 +++ .../java/com/hbm/extprop/HbmPlayerProps.java | 30 ++++++--- .../com/hbm/handler/EntityEffectHandler.java | 8 ++- .../handler/pollution/PollutionHandler.java | 20 +++++- src/main/java/com/hbm/items/ModItems.java | 9 +++ src/main/java/com/hbm/main/ClientProxy.java | 2 +- .../java/com/hbm/main/ModEventHandler.java | 29 +++++---- .../com/hbm/main/ModEventHandlerRenderer.java | 17 ++--- src/main/java/com/hbm/main/ServerProxy.java | 2 +- .../machine/TileEntityMachineCompressor.java | 5 +- src/main/resources/assets/hbm/lang/de_DE.lang | 2 + src/main/resources/assets/hbm/lang/en_US.lang | 2 + .../assets/hbm/textures/items/egg_glyphid.png | Bin 0 -> 393 bytes .../hbm/textures/items/egg_glyphid_base.png | Bin 0 -> 281 bytes .../hbm/textures/items/glyphid_meat.png | Bin 0 -> 414 bytes .../textures/items/glyphid_meat_grilled.png | Bin 0 -> 471 bytes .../hbm/textures/models/trinkets/peep.png | Bin 0 -> 888 bytes 22 files changed, 133 insertions(+), 92 deletions(-) create mode 100644 src/main/resources/assets/hbm/textures/items/egg_glyphid.png create mode 100644 src/main/resources/assets/hbm/textures/items/egg_glyphid_base.png create mode 100644 src/main/resources/assets/hbm/textures/items/glyphid_meat.png create mode 100644 src/main/resources/assets/hbm/textures/items/glyphid_meat_grilled.png create mode 100644 src/main/resources/assets/hbm/textures/models/trinkets/peep.png diff --git a/changelog b/changelog index 871d564ea..2bb086e00 100644 --- a/changelog +++ b/changelog @@ -1,55 +1,13 @@ ## Added -* Glpyhids - * Hives will spawn randomly in the world - * Hives will constantly spawn new glyphids - * If exposed to soot, hives will create glyphid scouts, which when far enough from another hive will explode and generate a new hive - * Higher soot levels create stronger glyphids - * Glyphids possess armor which has a chance of breaking off and fully absorbing damage - * Each glyphid has five armor plates - * Glyphid types include multiple tiers of melee glyphids as well as a few ranged ones, the scout, and a nuclear variant -* Compressor - * Can compress fluids, turning them into higher pressure variants - * Higher pressure fluid can use the same ducts as regular fluids, connections work the same so long as the input tank can accept the higher pressure type - * Can also turn steam into higher pressure types - * Vacuum refining now requires oil at 2 PU - * Some chemical plant recipes also require compressed fluid, TATB requires sour gas at 1 PU and osmiridic solution requires hydrogen peroxide at 5 PU -* A new rocket artillery ammo type that creates volcanic lava on impact -* BDCL - * A type of lubricant that is easy to make and can be used in hydraulic piston and electric press recipes instead of regular lubricant -* FBI drones - * A configurable amount of drones can now spawn during FBI raids - * They will hover over players, dropping bombs +* Configs for all things pollution related + * Pollution in general can be turned off, smog can be disabeld and adjusted, different poison types can be disabled and the threshold for spawning tougher mobs can also be changed +* Glyphid meat + * Dropped by glyphids (duh) + * Can be grilled ## Changed -* Updated russian localization -* Fluid traits can now be configured, any fluid can now have any fluid with variable stats assigned to them -* Large explosions now load the central chunk they are in, this can be disabled in the config -* Burning leaded fuels now releases poisonous heavy metals into the atmosphere -* The pollution detector now displays rounded values -* More machines and especially destroyed ones now release soot -* The iGen has been rebalanced again, delete your machine config file for the changes to take effect - * The lubricant power multiplier has been increased from 1.1 to 1.5 - * The fluid divisor has been lowered from 5,000 to 1,000, meaning the iGen now burns flammable liquids at full efficiency -* Removed the config for having an additional keybind for dashing, the keybind is now always active since it no longer conflicts with crouching -* Crucible recipes no longer use foundry scraps to visualize the recipes, instead they use a lava-like texture -* Fusion reactors are now made from welded magnets which are created by welding a cast steel plate onto a magnet - * Due to the cost of the cast plates, fusion reactor magnets are now cheaper to compensate - * Consequently, particle accelerators are now also cheaper due to being made from mostly fusion reactor magnets -* The blowtorch now consumes only 250mB per operation, allowing for up to 16 things to be welded with a single fill -* The page and notebook items have been replaced with more dynamic book items that get their data from NBT -* C4 can now be made by irradiating PVC - * Play stupid games, win stupid prizes -* Gas grenades now use the new gas system which should be a lot more pleasant to look at and less heavy on the TPS -* Leaded fuels now release heavy metal into the air, heavy metal can cause lead poisoning - * Lower heavy metal concentrations can also cause heavy metal poisoning when breaking blocks -* Gas artillery shell now create heavy metal and poisonous pollution -* FBI agents will now target the player from a much larger distance +* Glyphids now have a config for a global spawn limit, which is 50 by default, no more than this many glyphids can be created at once ## Fixed -* Fixed potential crash or logspam regarding the pollution handler -* Fixed missiles leaving behind a 3x3 grid of loaded chunks after being destroyed -* Fixed coal ore yielding coal in the crucible instead of making carbon -* Fixed a potential issue where BuildCraft generators can't supply the RF to HE converter -* Fixed combustion engine sound sometimes continue playing even when turned off -* Fixed large mining drill not properly performing a block check and potentially deleting blocks when placed -* Fixed calcium solution not having a fluid texture \ No newline at end of file +* Fixed player extprops like the HUD or backpack toggles not saving +* Fixed desync caused by teleporting between dimensions, switching toggles for HUD or backpack \ No newline at end of file diff --git a/src/main/java/com/hbm/blocks/generic/BlockGlyphidSpawner.java b/src/main/java/com/hbm/blocks/generic/BlockGlyphidSpawner.java index d0b4643d8..f02a8efba 100644 --- a/src/main/java/com/hbm/blocks/generic/BlockGlyphidSpawner.java +++ b/src/main/java/com/hbm/blocks/generic/BlockGlyphidSpawner.java @@ -14,9 +14,11 @@ import com.hbm.entity.mob.EntityGlyphidNuclear; import com.hbm.entity.mob.EntityGlyphidScout; import com.hbm.handler.pollution.PollutionHandler; import com.hbm.handler.pollution.PollutionHandler.PollutionType; +import com.hbm.items.ModItems; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; +import net.minecraft.item.Item; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.EnumDifficulty; @@ -28,6 +30,16 @@ public class BlockGlyphidSpawner extends BlockContainer { super(p_i45386_1_); } + @Override + public Item getItemDropped(int meta, Random rand, int fortune) { + return ModItems.egg_glyphid; + } + + @Override + public int quantityDropped(int meta, int fortune, Random rand) { + return 1 + rand.nextInt(3) + fortune; + } + @Override public TileEntity createNewTileEntity(World world, int meta) { return new TileEntityGlpyhidSpawner(); diff --git a/src/main/java/com/hbm/config/CommonConfig.java b/src/main/java/com/hbm/config/CommonConfig.java index 57495b68a..e1d6ed63c 100644 --- a/src/main/java/com/hbm/config/CommonConfig.java +++ b/src/main/java/com/hbm/config/CommonConfig.java @@ -22,6 +22,7 @@ public class CommonConfig { public static final String CATEGORY_RADIATION = "13_radiation"; public static final String CATEGORY_HAZARD = "14_hazard"; public static final String CATEGORY_STRUCTURES = "15_structures"; + public static final String CATEGORY_POLLUTION = "16_pollution"; public static final String CATEGORY_528 = "528"; public static final String CATEGORY_LBSM = "LESS BULLSHIT MODE"; diff --git a/src/main/java/com/hbm/config/RadiationConfig.java b/src/main/java/com/hbm/config/RadiationConfig.java index ad7b0acd7..25be90304 100644 --- a/src/main/java/com/hbm/config/RadiationConfig.java +++ b/src/main/java/com/hbm/config/RadiationConfig.java @@ -22,6 +22,15 @@ public class RadiationConfig { public static boolean disableHydro = false; public static boolean disableBlinding = false; public static boolean disableFibrosis = false; + + public static boolean enablePollution = true; + public static boolean enableLeadFromBlocks = true; + public static boolean enableLeadPoisoning = true; + public static boolean enableSootFog = true; + public static boolean enablePoison = true; + public static double buffMobThreshold = 15D; + public static double sootFogThreshold = 35D; + public static double sootFogDivisor = 120D; public static void loadFromConfig(Configuration config) { @@ -49,5 +58,15 @@ public class RadiationConfig { disableHydro = CommonConfig.createConfigBool(config, CATEGORY_HAZ, "HAZ_04_disableHydroactive", "When turned off, all hydroactive hazards are disabled", false); disableBlinding = CommonConfig.createConfigBool(config, CATEGORY_HAZ, "HAZ_05_disableBlinding", "When turned off, all blinding hazards are disabled", false); disableFibrosis = CommonConfig.createConfigBool(config, CATEGORY_HAZ, "HAZ_06_disableFibrosis", "When turned off, all fibrosis hazards are disabled", false); + + final String CATEGORY_POL = CommonConfig.CATEGORY_POLLUTION; + enablePollution = CommonConfig.createConfigBool(config, CATEGORY_POL, "POL_00_enablePollution", "If disabled, none of the polltuion related things will work", true); + enableLeadFromBlocks = CommonConfig.createConfigBool(config, CATEGORY_POL, "POL_01_enableLeadFromBlocks", "Whether breaking blocks in heavy metal polluted areas will poison the player", true); + enableLeadPoisoning = CommonConfig.createConfigBool(config, CATEGORY_POL, "POL_02_enableLeadPoisoning", "Whether being in a heavy metal polluted area will poison the player", true); + enableSootFog = CommonConfig.createConfigBool(config, CATEGORY_POL, "POL_03_enableSootFog", "Whether smog should be visible", true); + enablePoison = CommonConfig.createConfigBool(config, CATEGORY_POL, "POL_04_enablePoison", "Whether being in a poisoned area will affect the player", true); + buffMobThreshold = CommonConfig.createConfigDouble(config, CATEGORY_POL, "POL_05_buffMobThreshold", "The amount of soot required to buff naturally spawning mobs", 15D); + sootFogThreshold = CommonConfig.createConfigDouble(config, CATEGORY_POL, "POL_06_sootFogThreshold", "How much soot is required for smog to become visible", 35D); + sootFogDivisor = CommonConfig.createConfigDouble(config, CATEGORY_POL, "POL_07_sootFogDivisor", "The divisor for smog, higher numbers will require more soot for the same smog density", 120D); } } diff --git a/src/main/java/com/hbm/crafting/SmeltingRecipes.java b/src/main/java/com/hbm/crafting/SmeltingRecipes.java index 2024919c3..960689544 100644 --- a/src/main/java/com/hbm/crafting/SmeltingRecipes.java +++ b/src/main/java/com/hbm/crafting/SmeltingRecipes.java @@ -22,6 +22,8 @@ public class SmeltingRecipes { public static void AddSmeltingRec() { + GameRegistry.addSmelting(ModItems.glyphid_meat, new ItemStack(ModItems.glyphid_meat_grilled), 1.0F); + GameRegistry.addSmelting(Item.getItemFromBlock(ModBlocks.ore_thorium), new ItemStack(ModItems.ingot_th232), 3.0F); GameRegistry.addSmelting(Item.getItemFromBlock(ModBlocks.ore_uranium), new ItemStack(ModItems.ingot_uranium), 6.0F); GameRegistry.addSmelting(Item.getItemFromBlock(ModBlocks.ore_uranium_scorched), new ItemStack(ModItems.ingot_uranium), 6.0F); diff --git a/src/main/java/com/hbm/entity/mob/EntityGlyphid.java b/src/main/java/com/hbm/entity/mob/EntityGlyphid.java index 775c7ea55..a1e41ed7f 100644 --- a/src/main/java/com/hbm/entity/mob/EntityGlyphid.java +++ b/src/main/java/com/hbm/entity/mob/EntityGlyphid.java @@ -5,6 +5,7 @@ import java.util.Collections; import java.util.List; import com.hbm.entity.pathfinder.PathFinderUtils; +import com.hbm.items.ModItems; import com.hbm.main.ResourceManager; import net.minecraft.entity.Entity; @@ -12,6 +13,7 @@ import net.minecraft.entity.EnumCreatureAttribute; import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.monster.EntityMob; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.DamageSource; import net.minecraft.util.ResourceLocation; @@ -54,6 +56,11 @@ public class EntityGlyphid extends EntityMob { this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1D); this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(5D); } + + @Override + protected void dropFewItems(boolean byPlayer, int looting) { + if(rand.nextInt(3) == 0) this.entityDropItem(new ItemStack(ModItems.glyphid_meat, 1 + rand.nextInt(2) + looting), 0F); + } @Override protected Entity findPlayerToAttack() { diff --git a/src/main/java/com/hbm/extprop/HbmPlayerProps.java b/src/main/java/com/hbm/extprop/HbmPlayerProps.java index d6f173e61..63ee89a86 100644 --- a/src/main/java/com/hbm/extprop/HbmPlayerProps.java +++ b/src/main/java/com/hbm/extprop/HbmPlayerProps.java @@ -66,20 +66,26 @@ public class HbmPlayerProps implements IExtendedEntityProperties { if(!getKeyPressed(key) && pressed) { if(key == EnumKeybind.TOGGLE_JETPACK) { - this.enableBackpack = !this.enableBackpack; - if(this.enableBackpack) - MainRegistry.proxy.displayTooltip(EnumChatFormatting.GREEN + "Jetpack ON", MainRegistry.proxy.ID_JETPACK); - else - MainRegistry.proxy.displayTooltip(EnumChatFormatting.RED + "Jetpack OFF", MainRegistry.proxy.ID_JETPACK); + if(!player.worldObj.isRemote) { + this.enableBackpack = !this.enableBackpack; + + if(this.enableBackpack) + MainRegistry.proxy.displayTooltip(EnumChatFormatting.GREEN + "Jetpack ON", MainRegistry.proxy.ID_JETPACK); + else + MainRegistry.proxy.displayTooltip(EnumChatFormatting.RED + "Jetpack OFF", MainRegistry.proxy.ID_JETPACK); + } } if(key == EnumKeybind.TOGGLE_HEAD) { - this.enableHUD = !this.enableHUD; - if(this.enableHUD) - MainRegistry.proxy.displayTooltip(EnumChatFormatting.GREEN + "HUD ON", MainRegistry.proxy.ID_HUD); - else - MainRegistry.proxy.displayTooltip(EnumChatFormatting.RED + "HUD OFF", MainRegistry.proxy.ID_HUD); + if(!player.worldObj.isRemote) { + this.enableHUD = !this.enableHUD; + + if(this.enableHUD) + MainRegistry.proxy.displayTooltip(EnumChatFormatting.GREEN + "HUD ON", MainRegistry.proxy.ID_HUD); + else + MainRegistry.proxy.displayTooltip(EnumChatFormatting.RED + "HUD OFF", MainRegistry.proxy.ID_HUD); + } } if(key == EnumKeybind.TRAIN) { @@ -146,6 +152,8 @@ public class HbmPlayerProps implements IExtendedEntityProperties { props.setFloat("shield", shield); props.setFloat("maxShield", maxShield); + props.setBoolean("enableBackpack", enableBackpack); + props.setBoolean("enableHUD", enableHUD); nbt.setTag("HbmPlayerProps", props); } @@ -158,6 +166,8 @@ public class HbmPlayerProps implements IExtendedEntityProperties { if(props != null) { this.shield = props.getFloat("shield"); this.maxShield = props.getFloat("maxShield"); + this.enableBackpack = props.getBoolean("enableBackpack"); + this.enableHUD = props.getBoolean("enableHUD"); } } } diff --git a/src/main/java/com/hbm/handler/EntityEffectHandler.java b/src/main/java/com/hbm/handler/EntityEffectHandler.java index 1bcec5d0e..ff9607611 100644 --- a/src/main/java/com/hbm/handler/EntityEffectHandler.java +++ b/src/main/java/com/hbm/handler/EntityEffectHandler.java @@ -451,7 +451,9 @@ public class EntityEffectHandler { private static void handlePollution(EntityLivingBase entity) { - if(!ArmorRegistry.hasProtection(entity, 3, HazardClass.GAS_CORROSIVE) && entity.ticksExisted % 60 == 0) { + if(!RadiationConfig.enablePollution) return; + + if(RadiationConfig.enablePoison && !ArmorRegistry.hasProtection(entity, 3, HazardClass.GAS_CORROSIVE) && entity.ticksExisted % 60 == 0) { float poison = PollutionHandler.getPollution(entity.worldObj, (int) Math.floor(entity.posX), (int) Math.floor(entity.posY + entity.getEyeHeight()), (int) Math.floor(entity.posZ), PollutionType.POISON); @@ -460,14 +462,14 @@ public class EntityEffectHandler { if(poison < 25) { entity.addPotionEffect(new PotionEffect(Potion.poison.id, 100, 0)); } else if(poison < 50) { - entity.addPotionEffect(new PotionEffect(Potion.poison.id, 100, 2)); + entity.addPotionEffect(new PotionEffect(Potion.poison.id, 100, 1)); } else { entity.addPotionEffect(new PotionEffect(Potion.wither.id, 100, 2)); } } } - if(!ArmorRegistry.hasProtection(entity, 3, HazardClass.PARTICLE_FINE) && entity.ticksExisted % 60 == 0) { + if(RadiationConfig.enableLeadPoisoning && !ArmorRegistry.hasProtection(entity, 3, HazardClass.PARTICLE_FINE) && entity.ticksExisted % 60 == 0) { float poison = PollutionHandler.getPollution(entity.worldObj, (int) Math.floor(entity.posX), (int) Math.floor(entity.posY + entity.getEyeHeight()), (int) Math.floor(entity.posZ), PollutionType.HEAVYMETAL); diff --git a/src/main/java/com/hbm/handler/pollution/PollutionHandler.java b/src/main/java/com/hbm/handler/pollution/PollutionHandler.java index ebf943f95..885bbdd82 100644 --- a/src/main/java/com/hbm/handler/pollution/PollutionHandler.java +++ b/src/main/java/com/hbm/handler/pollution/PollutionHandler.java @@ -7,6 +7,8 @@ import java.util.HashMap; import java.util.Locale; import java.util.Map.Entry; +import com.hbm.config.RadiationConfig; + import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.gameevent.TickEvent; import cpw.mods.fml.common.gameevent.TickEvent.Phase; @@ -39,6 +41,9 @@ public class PollutionHandler { /// UTILITY METHODS /// /////////////////////// public static void incrementPollution(World world, int x, int y, int z, PollutionType type, float amount) { + + if(!RadiationConfig.enablePollution) return; + PollutionPerWorld ppw = perWorld.get(world); if(ppw == null) return; ChunkCoordIntPair pos = new ChunkCoordIntPair(x >> 6, z >> 6); @@ -55,6 +60,9 @@ public class PollutionHandler { } public static void setPollution(World world, int x, int y, int z, PollutionType type, float amount) { + + if(!RadiationConfig.enablePollution) return; + PollutionPerWorld ppw = perWorld.get(world); if(ppw == null) return; ChunkCoordIntPair pos = new ChunkCoordIntPair(x >> 6, z >> 6); @@ -67,6 +75,9 @@ public class PollutionHandler { } public static float getPollution(World world, int x, int y, int z, PollutionType type) { + + if(!RadiationConfig.enablePollution) return 0; + PollutionPerWorld ppw = perWorld.get(world); if(ppw == null) return 0F; ChunkCoordIntPair pos = new ChunkCoordIntPair(x >> 6, z >> 6); @@ -76,6 +87,9 @@ public class PollutionHandler { } public static PollutionData getPollutionData(World world, int x, int y, int z) { + + if(!RadiationConfig.enablePollution) return null; + PollutionPerWorld ppw = perWorld.get(world); if(ppw == null) return null; ChunkCoordIntPair pos = new ChunkCoordIntPair(x >> 6, z >> 6); @@ -88,7 +102,7 @@ public class PollutionHandler { ////////////////////// @SubscribeEvent public void onWorldLoad(WorldEvent.Load event) { - if(!event.world.isRemote) { + if(!event.world.isRemote && RadiationConfig.enablePollution) { WorldServer world = (WorldServer) event.world; String dirPath = getDataDir(world); @@ -294,6 +308,8 @@ public class PollutionHandler { @SubscribeEvent public void decorateMob(LivingSpawnEvent event) { + if(!RadiationConfig.enablePollution) return; + World world = event.world; if(world.isRemote) return; EntityLivingBase living = event.entityLiving; @@ -303,7 +319,7 @@ public class PollutionHandler { if(living instanceof IMob) { - if(data.pollution[PollutionType.SOOT.ordinal()] > 15) { + if(data.pollution[PollutionType.SOOT.ordinal()] > RadiationConfig.buffMobThreshold) { if(living.getEntityAttribute(SharedMonsterAttributes.maxHealth) != null) living.getEntityAttribute(SharedMonsterAttributes.maxHealth).applyModifier(new AttributeModifier("Soot Anger Health Increase", 2D, 1)); if(living.getEntityAttribute(SharedMonsterAttributes.attackDamage) != null) living.getEntityAttribute(SharedMonsterAttributes.attackDamage).applyModifier(new AttributeModifier("Soot Anger Damage Increase", 1.5D, 1)); } diff --git a/src/main/java/com/hbm/items/ModItems.java b/src/main/java/com/hbm/items/ModItems.java index 1eaafb213..ef6c57c61 100644 --- a/src/main/java/com/hbm/items/ModItems.java +++ b/src/main/java/com/hbm/items/ModItems.java @@ -1702,6 +1702,9 @@ public class ModItems { public static Item marshmallow; public static Item cheese; public static Item quesadilla; + public static Item glyphid_meat; + public static Item glyphid_meat_grilled; + public static Item egg_glyphid; public static Item med_ipecac; public static Item med_ptsd; @@ -4320,6 +4323,9 @@ public class ModItems { cheese = new ItemLemon(5, 10, false).setUnlocalizedName("cheese").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":cheese"); quesadilla = new ItemLemon(8, 10, false).setUnlocalizedName("cheese_quesadilla").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":quesadilla"); mucho_mango = new ItemMuchoMango(10).setUnlocalizedName("mucho_mango").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":mucho_mango"); + glyphid_meat = new ItemLemon(3, 3, true).setUnlocalizedName("glyphid_meat").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":glyphid_meat"); + glyphid_meat_grilled = new ItemLemon(8, 8, true).setPotionEffect(Potion.damageBoost.id, 180, 1, 1F).setUnlocalizedName("glyphid_meat_grilled").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":glyphid_meat_grilled"); + egg_glyphid = new Item().setUnlocalizedName("egg_glyphid").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":egg_glyphid"); defuser = new ItemTooling(ToolType.DEFUSER, 100).setUnlocalizedName("defuser").setMaxStackSize(1).setFull3D().setCreativeTab(MainRegistry.nukeTab).setTextureName(RefStrings.MODID + ":defuser"); reacher = new Item().setUnlocalizedName("reacher").setMaxStackSize(1).setFull3D().setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":reacher"); @@ -7518,6 +7524,9 @@ public class ModItems { GameRegistry.registerItem(marshmallow, marshmallow.getUnlocalizedName()); GameRegistry.registerItem(cheese, cheese.getUnlocalizedName()); GameRegistry.registerItem(quesadilla, quesadilla.getUnlocalizedName()); + GameRegistry.registerItem(glyphid_meat, glyphid_meat.getUnlocalizedName()); + GameRegistry.registerItem(glyphid_meat_grilled, glyphid_meat_grilled.getUnlocalizedName()); + GameRegistry.registerItem(egg_glyphid, egg_glyphid.getUnlocalizedName()); GameRegistry.registerItem(med_ipecac, med_ipecac.getUnlocalizedName()); GameRegistry.registerItem(med_ptsd, med_ptsd.getUnlocalizedName()); GameRegistry.registerItem(canteen_13, canteen_13.getUnlocalizedName()); diff --git a/src/main/java/com/hbm/main/ClientProxy.java b/src/main/java/com/hbm/main/ClientProxy.java index 84723d576..b1a7d09fe 100644 --- a/src/main/java/com/hbm/main/ClientProxy.java +++ b/src/main/java/com/hbm/main/ClientProxy.java @@ -1990,7 +1990,7 @@ public class ClientProxy extends ServerProxy { } @Override - public void playSoundFuckMojang(double x, double y, double z, String sound, float volume, float pitch) { + public void playSoundClient(double x, double y, double z, String sound, float volume, float pitch) { Minecraft.getMinecraft().getSoundHandler().playSound(new PositionedSoundRecord(new ResourceLocation(sound), volume, pitch, (float) x, (float) y, (float) z)); } } diff --git a/src/main/java/com/hbm/main/ModEventHandler.java b/src/main/java/com/hbm/main/ModEventHandler.java index 800a62fbb..6a38a081a 100644 --- a/src/main/java/com/hbm/main/ModEventHandler.java +++ b/src/main/java/com/hbm/main/ModEventHandler.java @@ -19,6 +19,7 @@ import com.hbm.blocks.ModBlocks; import com.hbm.blocks.generic.BlockAshes; import com.hbm.config.GeneralConfig; import com.hbm.config.MobConfig; +import com.hbm.config.RadiationConfig; import com.hbm.entity.missile.EntityMissileBaseAdvanced; import com.hbm.entity.missile.EntityMissileCustom; import com.hbm.entity.mob.EntityCyberCrab; @@ -218,7 +219,7 @@ public class ModEventHandler { } @SubscribeEvent - public void onPlayerChaangeDimension(PlayerChangedDimensionEvent event) { + public void onPlayerChangeDimension(PlayerChangedDimensionEvent event) { EntityPlayer player = event.player; HbmPlayerProps data = HbmPlayerProps.getData(player); data.setKeyPressed(EnumKeybind.JETPACK, false); @@ -1176,18 +1177,20 @@ public class ModEventHandler { } } - if(!ArmorRegistry.hasProtection(player, 3, HazardClass.PARTICLE_FINE)) { - - float metal = PollutionHandler.getPollution(player.worldObj, event.x, event.y, event.z, PollutionType.HEAVYMETAL); - - if(metal < 5) return; - - if(metal < 10) { - player.addPotionEffect(new PotionEffect(HbmPotion.lead.id, 100, 0)); - } else if(metal < 25) { - player.addPotionEffect(new PotionEffect(HbmPotion.lead.id, 100, 1)); - } else { - player.addPotionEffect(new PotionEffect(HbmPotion.lead.id, 100, 2)); + if(RadiationConfig.enablePollution && RadiationConfig.enableLeadFromBlocks) { + if(!ArmorRegistry.hasProtection(player, 3, HazardClass.PARTICLE_FINE)) { + + float metal = PollutionHandler.getPollution(player.worldObj, event.x, event.y, event.z, PollutionType.HEAVYMETAL); + + if(metal < 5) return; + + if(metal < 10) { + player.addPotionEffect(new PotionEffect(HbmPotion.lead.id, 100, 0)); + } else if(metal < 25) { + player.addPotionEffect(new PotionEffect(HbmPotion.lead.id, 100, 1)); + } else { + player.addPotionEffect(new PotionEffect(HbmPotion.lead.id, 100, 2)); + } } } } diff --git a/src/main/java/com/hbm/main/ModEventHandlerRenderer.java b/src/main/java/com/hbm/main/ModEventHandlerRenderer.java index e01007977..7dd68dd4c 100644 --- a/src/main/java/com/hbm/main/ModEventHandlerRenderer.java +++ b/src/main/java/com/hbm/main/ModEventHandlerRenderer.java @@ -4,6 +4,7 @@ import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GLContext; import com.hbm.blocks.ICustomBlockHighlight; +import com.hbm.config.RadiationConfig; import com.hbm.handler.pollution.PollutionHandler.PollutionType; import com.hbm.items.armor.IArmorDisableModel; import com.hbm.items.armor.IArmorDisableModel.EnumPlayerPart; @@ -330,7 +331,7 @@ public class ModEventHandlerRenderer { @SubscribeEvent public void worldTick(WorldTickEvent event) { - if(event.phase == event.phase.START) { + if(event.phase == event.phase.START && RadiationConfig.enableSootFog) { float step = 0.05F; float soot = PermaSyncHandler.pollution[PollutionType.SOOT.ordinal()]; @@ -347,11 +348,11 @@ public class ModEventHandlerRenderer { @SubscribeEvent(priority = EventPriority.LOW) public void thickenFog(FogDensity event) { - float soot = renderSoot - 35; - if(soot > 0) { - //event.density = Math.min((soot - 5) * 0.01F, 0.5F); + float soot = (float) (renderSoot - RadiationConfig.sootFogThreshold); + if(soot > 0 && RadiationConfig.enableSootFog) { + float farPlaneDistance = (float) (Minecraft.getMinecraft().gameSettings.renderDistanceChunks * 16); - float fogDist = farPlaneDistance / (1 + soot * 0.05F); + float fogDist = farPlaneDistance / (1 + soot * 5F / (float) RadiationConfig.sootFogDivisor); GL11.glFogf(GL11.GL_FOG_START, 0); GL11.glFogf(GL11.GL_FOG_END, fogDist); @@ -366,10 +367,10 @@ public class ModEventHandlerRenderer { @SubscribeEvent(priority = EventPriority.LOW) public void tintFog(FogColors event) { - float soot = renderSoot - 35; + float soot = (float) (renderSoot - RadiationConfig.sootFogThreshold); float sootColor = 0.15F; - float sootReq = 100F; - if(soot > 0) { + float sootReq = (float) RadiationConfig.sootFogDivisor; + if(soot > 0 && RadiationConfig.enableSootFog) { float interp = Math.min(soot / sootReq, 1F); event.red = event.red * (1 - interp) + sootColor * interp; event.green = event.green * (1 - interp) + sootColor * interp; diff --git a/src/main/java/com/hbm/main/ServerProxy.java b/src/main/java/com/hbm/main/ServerProxy.java index 783dc4df3..7695b401f 100644 --- a/src/main/java/com/hbm/main/ServerProxy.java +++ b/src/main/java/com/hbm/main/ServerProxy.java @@ -85,5 +85,5 @@ public class ServerProxy { return TomSaveData.forWorld(world).impact; } - public void playSoundFuckMojang(double x, double y, double z, String sound, float volume, float pitch) { } + public void playSoundClient(double x, double y, double z, String sound, float volume, float pitch) { } } \ No newline at end of file diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineCompressor.java b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineCompressor.java index a21a30834..82467211b 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineCompressor.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineCompressor.java @@ -21,15 +21,12 @@ import api.hbm.energy.IEnergyUser; import api.hbm.fluid.IFluidStandardTransceiver; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.Minecraft; -import net.minecraft.client.audio.PositionedSoundRecord; import net.minecraft.client.gui.GuiScreen; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.Container; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.MathHelper; -import net.minecraft.util.ResourceLocation; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; @@ -134,7 +131,7 @@ public class TileEntityMachineCompressor extends TileEntityMachineBase implement if(this.pistonDir) { this.piston -= randSpeed; if(this.piston <= 0) { - MainRegistry.proxy.playSoundFuckMojang(xCoord, yCoord, zCoord, "hbm:item.boltgun", 0.5F, 0.75F); + MainRegistry.proxy.playSoundClient(xCoord, yCoord, zCoord, "hbm:item.boltgun", 0.5F, 0.75F); this.pistonDir = !this.pistonDir; } } else { diff --git a/src/main/resources/assets/hbm/lang/de_DE.lang b/src/main/resources/assets/hbm/lang/de_DE.lang index 34aa19f02..99542b701 100644 --- a/src/main/resources/assets/hbm/lang/de_DE.lang +++ b/src/main/resources/assets/hbm/lang/de_DE.lang @@ -1798,6 +1798,8 @@ item.generator_front.name=Generatorfront item.generator_steel.name=Generator item.glitch.name=Glitch item.glowing_stew.name=Leuchtende Pilzsuppe +item.glyphid_meat.name=Glyphidfleisch +item.glyphid_meat_grilled.name=Gegrilltes Glyphidfleisch item.goggles.name=Schutzbrille item.grenade_aschrab.name=Werfbare Antischrabidiumzelle item.grenade_black_hole.name=Schwarzes-Loch-Granate diff --git a/src/main/resources/assets/hbm/lang/en_US.lang b/src/main/resources/assets/hbm/lang/en_US.lang index 42649d57a..01de09f83 100644 --- a/src/main/resources/assets/hbm/lang/en_US.lang +++ b/src/main/resources/assets/hbm/lang/en_US.lang @@ -2486,6 +2486,8 @@ item.generator_front.name=Generator Front item.generator_steel.name=Generator Body item.glitch.name=Glitch item.glowing_stew.name=Glowing Mushroom Stew +item.glyphid_meat.name=Glyphid Meat +item.glyphid_meat_grilled.name=Grilled Glyphid Meat item.goggles.name=Protection Goggles item.grenade_aschrab.name=Tossable Antischrabidium Cell item.grenade_black_hole.name=Black Hole Grenade diff --git a/src/main/resources/assets/hbm/textures/items/egg_glyphid.png b/src/main/resources/assets/hbm/textures/items/egg_glyphid.png new file mode 100644 index 0000000000000000000000000000000000000000..e7f1bd1486496ee435bfa6ab9bcdd6e430aa43a5 GIT binary patch literal 393 zcmV;40e1e0P)nU8 z5iFL2u{A*qwt=^3aE4jul@lD^A#xm>OA2TDjyvye7K2avczNIFA0PZ{RLd!6b1mr% z+lhq@)m+h;7$0Ntphj1>xmV{|dfy;~r;=rMZj#lsMz23W%@qS~ z0t5h=dJ{nc@Nv0|X;@r5-42gXEvFnwe&h422Eb#n;aiT&3Wa=vo4b~K7wW)^m6Iz> z!@@KyUKN?`h4pX;LS3L!$)ag5Wa>=-y1GrfBmpozGex?36ayHIQWp8WSU$W4ppZ|v zGhc+RZUgYJzlCX7?t2(~CAM}>onC){X;`jxK@gV}S3R;saV)HgLs8(b4gkd0JwAK( n&D$l(S6(E+Pa*-Y?LWmgQQwMa;u?Xy z&cx7`oPyGgOkPz7J{$td1(*mFiMpL?VhzZC&n)usRT3*35cFK>FwR_b+&u8)3>gN7 Y+W~PsXIAfE1^SJ_)78&qol`;+001g=5C8xG literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/hbm/textures/items/glyphid_meat.png b/src/main/resources/assets/hbm/textures/items/glyphid_meat.png new file mode 100644 index 0000000000000000000000000000000000000000..a94ea056101e72068b00160f85728424d334f3a9 GIT binary patch literal 414 zcmV;P0b%}$P)w-u9Or2qf`07*qo IM6N<$f`1gbQvd(} literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/hbm/textures/items/glyphid_meat_grilled.png b/src/main/resources/assets/hbm/textures/items/glyphid_meat_grilled.png new file mode 100644 index 0000000000000000000000000000000000000000..d611bc741ff498b0e020c8307c8d1e0003752d87 GIT binary patch literal 471 zcmV;|0Vw{7P)tvkCIP-N8Op_*57u|Sv=kQ(*?>X@3EA$XhzL=5Y z{pa`RBi`J7m6 z=f!OwfRbTSvwt9x`UGxDAYaVLd@&={1%=B`zYs|s?L`=O;7~G5T22Gcb4K`y5Z7~> zOs}l6_A-vu?_!?za0d?AgAJ^Hm(E$3p4*~rH)vcrcvV6Z8;EQQ%WG3IOr9-mvAdsT zJ`$y5n24m#)4de+$~DchJH0`^n32oRH2}UIUkt-~dq~f1a(eQOTi+uH4X9UJ^nL~e z-5FO%$DRPN_j(5{p2qm_k-BZNRnTdCZ&NFGu&qDjsSFl36&XuKIC@jS_ASm%%6NUB z8>LIL;t+)4?*20cRDp~o6k@5!Xx1#d1kvFm{!N||7#AAvXA%Ef{RS+!n|O$A=|=zn N002ovPDHLkV1kt6&D#I~ literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/hbm/textures/models/trinkets/peep.png b/src/main/resources/assets/hbm/textures/models/trinkets/peep.png new file mode 100644 index 0000000000000000000000000000000000000000..9e8551ba8672bb10e3edb85b01ed30ce02d38116 GIT binary patch literal 888 zcmV-;1Bd*HP)aW0=!B~q8o z`2EMP#P18|&J-?;4MuDWV4I-D2n}%k{E1v?Dv+L15uAtW2y$WykY^R= zMU%IzQwFes_mN=A`t*p{?RFFCr$oA`}T zTdBPFQ^0!zSYHK1+_^TPReo`$jp8Bp@0}eCaOBIp83D92Csf`EiXgq;j3VX=<;4i# z^*(?n2FPM)0NVoC#tQ>9qllY!>{kIAdavQd2mmk`2k45^6|Vhr0j0D3(Y7>O#$KFnKqE>ew}7%bzbWPh^}8$pGbaV zPH^h&^Th90k6)W=DuL`b4Fu;`0ab-mF=l|WdRzp#cp=ZJblnEBdPrpzFh%@=mt_F$ z5imW&_Rue1Oh6;7!Cvn$Gat#ztDBdmLYCt;76?tx%)(yp5E@}EQ+bkC=A8+&r@(sW zkJE8P>(VLrug9|}VhUv8ya99rClTIkhIn{y0H>w^4z~u+sCTiHHb+!;gP1{4g5Yoq zTH|BT8XqgFO38*Llwm1ev;o#OHV1XCZETjdv?iv2?X!XP&tFP!v+(l(-R}!-UwxJ+ zpT7Q9JC6`8qfR-&GN27qc?0O47kD2BXos1)j#KykzyI&AR(bD7fcFNdyc5(tIPu;G zRDJ~Lo)>uU1BM2$Er4z67-KB^$-3>`q6re$<2*ySthny~4V*d;u)%*&e45efn