mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
why
This commit is contained in:
parent
ed586502b0
commit
7721634217
@ -1351,6 +1351,7 @@ item.ingot_uranium.name=Uranbarren
|
||||
item.ingot_uranium_fuel.name=Urankernbrennstoffbarren
|
||||
item.ingot_verticium.name=Verticiumbarren
|
||||
item.ingot_weidanium.name=Weidaniumbarren
|
||||
item.ingot_zirconium.name=Zirkoniumwürfel
|
||||
item.ink.name=林-Tinte
|
||||
item.insert_doxium.name=Astolfium-dottierte Doxiumeinlage
|
||||
item.insert_du.name=DU-Einlage
|
||||
@ -1834,6 +1835,7 @@ item.powder_uranium.name=Uranstaub
|
||||
item.powder_verticium.name=Verticiumstaub
|
||||
item.powder_weidanium.name=Weidaniumstaub
|
||||
item.powder_yellowcake.name=Yellowcake
|
||||
item.powder_zirconium.name=Zirkoniumstaub
|
||||
item.primer_357.name=.357 Magnum-Zündhütchen (x24)
|
||||
item.primer_44.name=.44 Magnum-Zündhütchen (x24)
|
||||
item.primer_50.name=Großkaliber-Zündhütchen (x12)
|
||||
@ -2255,6 +2257,7 @@ itemGroup.tabWeapon=NTM Waffen und Geschütze
|
||||
potion.hbm_bang=! ! !
|
||||
potion.hbm_lead=Bleivergiftung
|
||||
potion.hbm_mutation=Verdorbenes Herz
|
||||
potion.hbm_potionsickness=Trankkrankheit
|
||||
potion.hbm_phosphorus=Phosphorverbrennung
|
||||
potion.hbm_radaway=Radaway
|
||||
potion.hbm_radiation=Kontaminiert
|
||||
|
||||
@ -1351,6 +1351,7 @@ item.ingot_uranium.name=Uranium Ingot
|
||||
item.ingot_uranium_fuel.name=Ingot of Uranium Fuel
|
||||
item.ingot_verticium.name=Verticium Ingot
|
||||
item.ingot_weidanium.name=Weidanium Ingot
|
||||
item.ingot_zirconium.name=Zirconium Cube
|
||||
item.ink.name=林 Ink
|
||||
item.insert_doxium.name=Astolfium-Doped Doxium Insert
|
||||
item.insert_du.name=DU Insert
|
||||
@ -1834,6 +1835,7 @@ item.powder_uranium.name=Uranium Powder
|
||||
item.powder_verticium.name=Verticium Powder
|
||||
item.powder_weidanium.name=Weidanium Powder
|
||||
item.powder_yellowcake.name=Yellowcake
|
||||
item.powder_zirconium.name=Zirconium Powder
|
||||
item.primer_357.name=.357 Magnum Primer (x24)
|
||||
item.primer_44.name=.44 Magnum Primer (x24)
|
||||
item.primer_50.name=Large Caliber Primer (x12)
|
||||
@ -2256,6 +2258,7 @@ potion.hbm_bang=! ! !
|
||||
potion.hbm_lead=Lead Poisoning
|
||||
potion.hbm_mutation=Tainted Heart
|
||||
potion.hbm_phosphorus=Phosphorus Burns
|
||||
potion.hbm_potionsickness=Potion Sickness
|
||||
potion.hbm_radaway=Radaway
|
||||
potion.hbm_radiation=Contaminated
|
||||
potion.hbm_radx=Rad-X
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 179 B |
Binary file not shown.
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.6 KiB |
BIN
src/main/java/assets/hbm/textures/items/ingot_zirconium.png
Normal file
BIN
src/main/java/assets/hbm/textures/items/ingot_zirconium.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 381 B |
BIN
src/main/java/assets/hbm/textures/items/powder_zirconium.png
Normal file
BIN
src/main/java/assets/hbm/textures/items/powder_zirconium.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 328 B |
BIN
src/main/java/assets/hbm/textures/particle/fart.png
Normal file
BIN
src/main/java/assets/hbm/textures/particle/fart.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 50 KiB |
@ -43,6 +43,13 @@ public class CommonConfig {
|
||||
return prop.getBoolean();
|
||||
}
|
||||
|
||||
public static String createConfigString(Configuration config, String category, String name, String comment, String def) {
|
||||
|
||||
Property prop = config.get(category, name, def);
|
||||
prop.comment = comment;
|
||||
return prop.getString();
|
||||
}
|
||||
|
||||
public static String[] createConfigStringList(Configuration config, String category, String name, String comment) {
|
||||
|
||||
Property prop = config.get(category, name, new String[] { "PLACEHOLDER" });
|
||||
|
||||
@ -14,6 +14,9 @@ public class PotionConfig {
|
||||
public static int telekinesisID = 69;
|
||||
public static int phosphorusID = 70;
|
||||
public static int stabilityID = 71;
|
||||
public static int potionsicknessID = 72;
|
||||
|
||||
public static int potionSickness = 0;
|
||||
|
||||
public static void loadFromConfig(Configuration config) {
|
||||
|
||||
@ -28,5 +31,14 @@ public class PotionConfig {
|
||||
telekinesisID = CommonConfig.createConfigInt(config, CATEGORY_POTION, "8.07_telekinesisPotionID", "What potion ID the telekinesis effect will have", 69);
|
||||
phosphorusID = CommonConfig.createConfigInt(config, CATEGORY_POTION, "8.08_phosphorusPotionID", "What potion ID the phosphorus effect will have", 70);
|
||||
stabilityID = CommonConfig.createConfigInt(config, CATEGORY_POTION, "8.09_stabilityPotionID", "What potion ID the stability effect will have", 71);
|
||||
potionsicknessID = CommonConfig.createConfigInt(config, CATEGORY_POTION, "8.10_potionsicknessID", "What potion ID the potion sickness effect will have", 72);
|
||||
|
||||
String s = CommonConfig.createConfigString(config, CATEGORY_POTION, "8.S0_potionSickness", "Valid configs include \"NORMAL\" and \"TERRARIA\", otherwise potion sickness is turned off", "OFF");
|
||||
|
||||
if("normal".equals(s.toLowerCase()))
|
||||
potionSickness = 1;
|
||||
if("terraria".equals(s.toLowerCase()))
|
||||
potionSickness = 2;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,8 +1,11 @@
|
||||
package com.hbm.config;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.potion.HbmPotion;
|
||||
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
|
||||
public class VersatileConfig {
|
||||
|
||||
@ -22,4 +25,18 @@ public class VersatileConfig {
|
||||
return 100;
|
||||
}
|
||||
|
||||
public static void applyPotionSickness(EntityLivingBase entity, int duration) {
|
||||
|
||||
if(PotionConfig.potionSickness == 0)
|
||||
return;
|
||||
|
||||
if(PotionConfig.potionSickness == 2)
|
||||
duration *= 12;
|
||||
|
||||
entity.addPotionEffect(new PotionEffect(HbmPotion.potionsickness.id, duration * 20));
|
||||
}
|
||||
|
||||
public static boolean hasPotionSickness(EntityLivingBase entity) {
|
||||
return entity.isPotionActive(HbmPotion.potionsickness);
|
||||
}
|
||||
}
|
||||
|
||||
@ -96,6 +96,7 @@ public class ModItems {
|
||||
public static Item nugget_schrabidium_fuel;
|
||||
public static Item ingot_advanced_alloy;
|
||||
public static Item lithium;
|
||||
public static Item ingot_zirconium;
|
||||
public static Item ingot_hes;
|
||||
public static Item ingot_les;
|
||||
public static Item nugget_hes;
|
||||
@ -302,6 +303,7 @@ public class ModItems {
|
||||
public static Item powder_red_copper;
|
||||
public static Item powder_steel;
|
||||
public static Item powder_lithium;
|
||||
public static Item powder_zirconium;
|
||||
public static Item redstone_depleted;
|
||||
|
||||
public static Item powder_australium;
|
||||
@ -2250,6 +2252,7 @@ public class ModItems {
|
||||
plate_gold = new Item().setUnlocalizedName("plate_gold").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":plate_gold");
|
||||
plate_advanced_alloy = new Item().setUnlocalizedName("plate_advanced_alloy").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":plate_advanced_alloy");
|
||||
lithium = new Item().setUnlocalizedName("lithium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":lithium");
|
||||
ingot_zirconium = new Item().setUnlocalizedName("ingot_zirconium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_zirconium");
|
||||
ingot_semtex = new ItemLemon(4, 5, true).setUnlocalizedName("ingot_semtex").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_semtex");
|
||||
ingot_phosphorus = new ItemRadioactive(0F, true).setUnlocalizedName("ingot_phosphorus").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_phosphorus");
|
||||
wire_advanced_alloy = new Item().setUnlocalizedName("wire_advanced_alloy").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":wire_advanced_alloy");
|
||||
@ -2433,6 +2436,7 @@ public class ModItems {
|
||||
powder_red_copper = new Item().setUnlocalizedName("powder_red_copper").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_red_copper");
|
||||
powder_steel = new Item().setUnlocalizedName("powder_steel").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_steel");
|
||||
powder_lithium = new Item().setUnlocalizedName("powder_lithium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_lithium");
|
||||
powder_zirconium = new Item().setUnlocalizedName("powder_zirconium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_zirconium");
|
||||
redstone_depleted = new Item().setUnlocalizedName("redstone_depleted").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":redstone_depleted");
|
||||
powder_power = new ItemCustomLore().setUnlocalizedName("powder_power").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_energy_alt");
|
||||
powder_iodine = new ItemCustomLore().setUnlocalizedName("powder_iodine").setCreativeTab(null).setTextureName(RefStrings.MODID + ":powder_iodine");
|
||||
@ -4694,6 +4698,7 @@ public class ModItems {
|
||||
//Misc Ingots
|
||||
GameRegistry.registerItem(ingot_phosphorus, ingot_phosphorus.getUnlocalizedName());
|
||||
GameRegistry.registerItem(lithium, lithium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ingot_zirconium, ingot_zirconium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ingot_semtex, ingot_semtex.getUnlocalizedName());
|
||||
GameRegistry.registerItem(solid_fuel, solid_fuel.getUnlocalizedName());
|
||||
GameRegistry.registerItem(rocket_fuel, rocket_fuel.getUnlocalizedName());
|
||||
@ -4760,6 +4765,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(powder_chlorophyte, powder_chlorophyte.getUnlocalizedName());
|
||||
GameRegistry.registerItem(powder_combine_steel, powder_combine_steel.getUnlocalizedName());
|
||||
GameRegistry.registerItem(powder_lithium, powder_lithium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(powder_zirconium, powder_zirconium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(powder_lignite, powder_lignite.getUnlocalizedName());
|
||||
GameRegistry.registerItem(powder_iodine, powder_iodine.getUnlocalizedName());
|
||||
GameRegistry.registerItem(powder_thorium, powder_thorium.getUnlocalizedName());
|
||||
|
||||
@ -2,6 +2,7 @@ package com.hbm.items.food;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.config.VersatileConfig;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.main.MainRegistry;
|
||||
|
||||
@ -48,6 +49,8 @@ public class ItemCanteen extends Item {
|
||||
player.addPotionEffect(new PotionEffect(Potion.resistance.id, 60 * 20, 2));
|
||||
player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 60 * 20, 1));
|
||||
}
|
||||
|
||||
VersatileConfig.applyPotionSickness(player, 5);
|
||||
|
||||
return stack;
|
||||
}
|
||||
@ -64,7 +67,7 @@ public class ItemCanteen extends Item {
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
|
||||
if (stack.getItemDamage() == 0)
|
||||
if (stack.getItemDamage() == 0 && !VersatileConfig.hasPotionSickness(player))
|
||||
player.setItemInUse(stack, this.getMaxItemUseDuration(stack));
|
||||
|
||||
return stack;
|
||||
|
||||
@ -2,6 +2,7 @@ package com.hbm.items.food;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.config.VersatileConfig;
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.main.MainRegistry;
|
||||
@ -20,387 +21,333 @@ import net.minecraftforge.common.util.FakePlayer;
|
||||
|
||||
public class ItemEnergy extends Item {
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public ItemStack onEaten(ItemStack stack, World world, EntityPlayer player) {
|
||||
|
||||
if (!player.capabilities.isCreativeMode)
|
||||
{
|
||||
--stack.stackSize;
|
||||
}
|
||||
|
||||
if (!world.isRemote)
|
||||
{
|
||||
|
||||
if(player instanceof FakePlayer) {
|
||||
world.newExplosion(player, player.posX, player.posY, player.posZ, 5F, true, true);
|
||||
return super.onEaten(stack, world, player);
|
||||
}
|
||||
|
||||
if(this == ModItems.can_smart)
|
||||
{
|
||||
player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 30 * 20, 1));
|
||||
player.addPotionEffect(new PotionEffect(Potion.resistance.id, 30 * 20, 2));
|
||||
player.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 30 * 20, 0));
|
||||
}
|
||||
if(this == ModItems.can_creature)
|
||||
{
|
||||
player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 30 * 20, 0));
|
||||
player.addPotionEffect(new PotionEffect(Potion.resistance.id, 30 * 20, 2));
|
||||
player.addPotionEffect(new PotionEffect(Potion.regeneration.id, 30 * 20, 1));
|
||||
}
|
||||
if(this == ModItems.can_redbomb)
|
||||
{
|
||||
player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 30 * 20, 0));
|
||||
player.addPotionEffect(new PotionEffect(Potion.field_76444_x.id, 30 * 20, 2));
|
||||
player.addPotionEffect(new PotionEffect(Potion.jump.id, 30 * 20, 1));
|
||||
}
|
||||
if(this == ModItems.can_mrsugar)
|
||||
{
|
||||
player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 30 * 20, 0));
|
||||
player.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 30 * 20, 1));
|
||||
player.addPotionEffect(new PotionEffect(Potion.jump.id, 30 * 20, 2));
|
||||
}
|
||||
if(this == ModItems.can_overcharge)
|
||||
{
|
||||
player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 30 * 20, 1));
|
||||
player.addPotionEffect(new PotionEffect(Potion.resistance.id, 30 * 20, 2));
|
||||
player.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 30 * 20, 0));
|
||||
}
|
||||
if(this == ModItems.can_luna)
|
||||
{
|
||||
player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 30 * 20, 1));
|
||||
player.addPotionEffect(new PotionEffect(Potion.resistance.id, 30 * 20, 2));
|
||||
player.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 30 * 20, 1));
|
||||
player.addPotionEffect(new PotionEffect(Potion.regeneration.id, 30 * 20, 2));
|
||||
}
|
||||
if(this == ModItems.can_bepis)
|
||||
{
|
||||
player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 30 * 20, 3));
|
||||
player.addPotionEffect(new PotionEffect(Potion.resistance.id, 30 * 20, 3));
|
||||
}
|
||||
if(this == ModItems.can_breen)
|
||||
{
|
||||
player.addPotionEffect(new PotionEffect(Potion.confusion.id, 30 * 20, 0));
|
||||
}
|
||||
if(this == ModItems.chocolate_milk)
|
||||
{
|
||||
ExplosionLarge.explode(world, player.posX, player.posY, player.posZ, 50, true, false, false);
|
||||
}
|
||||
if(this == ModItems.bottle_nuka)
|
||||
{
|
||||
player.heal(4F);
|
||||
player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 30 * 20, 1));
|
||||
player.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 30 * 20, 1));
|
||||
ContaminationUtil.applyRadDirect(player, 5.0F);
|
||||
}
|
||||
if(this == ModItems.bottle_cherry)
|
||||
{
|
||||
player.heal(6F);
|
||||
player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 30 * 20, 0));
|
||||
player.addPotionEffect(new PotionEffect(Potion.jump.id, 30 * 20, 2));
|
||||
ContaminationUtil.applyRadDirect(player, 5.0F);
|
||||
}
|
||||
if(this == ModItems.bottle_quantum)
|
||||
{
|
||||
player.heal(10F);
|
||||
player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 30 * 20, 1));
|
||||
player.addPotionEffect(new PotionEffect(Potion.resistance.id, 30 * 20, 2));
|
||||
player.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 30 * 20, 1));
|
||||
ContaminationUtil.applyRadDirect(player, 15.0F);
|
||||
}
|
||||
if(this == ModItems.bottle2_korl)
|
||||
{
|
||||
player.heal(6);
|
||||
player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 30 * 20, 1));
|
||||
player.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 30 * 20, 2));
|
||||
player.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 30 * 20, 2));
|
||||
}
|
||||
if(this == ModItems.bottle2_fritz)
|
||||
{
|
||||
player.heal(6);
|
||||
player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 30 * 20, 1));
|
||||
player.addPotionEffect(new PotionEffect(Potion.resistance.id, 30 * 20, 2));
|
||||
player.addPotionEffect(new PotionEffect(Potion.jump.id, 30 * 20, 2));
|
||||
}
|
||||
if(this == ModItems.bottle2_korl_special)
|
||||
{
|
||||
player.heal(16);
|
||||
player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 120 * 20, 1));
|
||||
player.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 120 * 20, 2));
|
||||
player.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 120 * 20, 2));
|
||||
}
|
||||
if(this == ModItems.bottle2_fritz_special)
|
||||
{
|
||||
player.heal(16);
|
||||
player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 120 * 20, 1));
|
||||
player.addPotionEffect(new PotionEffect(Potion.resistance.id, 120 * 20, 2));
|
||||
player.addPotionEffect(new PotionEffect(Potion.jump.id, 120 * 20, 2));
|
||||
}
|
||||
if(this == ModItems.bottle_sparkle)
|
||||
{
|
||||
player.heal(10F);
|
||||
player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 120 * 20, 1));
|
||||
player.addPotionEffect(new PotionEffect(Potion.resistance.id, 120 * 20, 2));
|
||||
player.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 120 * 20, 2));
|
||||
player.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 120 * 20, 1));
|
||||
ContaminationUtil.applyRadDirect(player, 5.0F);
|
||||
}
|
||||
if(this == ModItems.bottle_rad)
|
||||
{
|
||||
player.heal(10F);
|
||||
player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 120 * 20, 1));
|
||||
player.addPotionEffect(new PotionEffect(Potion.resistance.id, 120 * 20, 2));
|
||||
player.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 120 * 20, 0));
|
||||
player.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 120 * 20, 4));
|
||||
player.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 120 * 20, 1));
|
||||
ContaminationUtil.applyRadDirect(player, 15.0F);
|
||||
}
|
||||
if(this == ModItems.bottle2_sunset)
|
||||
{
|
||||
player.heal(6);
|
||||
player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 60 * 20, 1));
|
||||
player.addPotionEffect(new PotionEffect(Potion.resistance.id, 60 * 20, 2));
|
||||
player.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 60 * 20, 2));
|
||||
player.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 60 * 20, 2));
|
||||
}
|
||||
}
|
||||
if(!player.capabilities.isCreativeMode) {
|
||||
--stack.stackSize;
|
||||
}
|
||||
|
||||
if (!player.capabilities.isCreativeMode && this != ModItems.chocolate_milk)
|
||||
{
|
||||
if(this == ModItems.can_creature || this == ModItems.can_mrsugar ||
|
||||
this == ModItems.can_overcharge || this == ModItems.can_redbomb ||
|
||||
this == ModItems.can_smart || this == ModItems.can_luna ||
|
||||
this == ModItems.can_bepis || this == ModItems.can_breen) {
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.ring_pull));
|
||||
if (stack.stackSize <= 0)
|
||||
{
|
||||
return new ItemStack(ModItems.can_empty);
|
||||
}
|
||||
if(!world.isRemote) {
|
||||
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.can_empty));
|
||||
}
|
||||
|
||||
if(this == ModItems.bottle_cherry || this == ModItems.bottle_nuka) {
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.cap_nuka));
|
||||
if (stack.stackSize <= 0)
|
||||
{
|
||||
return new ItemStack(ModItems.bottle_empty);
|
||||
}
|
||||
if(player instanceof FakePlayer) {
|
||||
world.newExplosion(player, player.posX, player.posY, player.posZ, 5F, true, true);
|
||||
return super.onEaten(stack, world, player);
|
||||
}
|
||||
|
||||
VersatileConfig.applyPotionSickness(player, 5);
|
||||
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.bottle_empty));
|
||||
}
|
||||
|
||||
if(this == ModItems.bottle_quantum) {
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.cap_quantum));
|
||||
if (stack.stackSize <= 0)
|
||||
{
|
||||
return new ItemStack(ModItems.bottle_empty);
|
||||
}
|
||||
if(this == ModItems.can_smart) {
|
||||
player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 30 * 20, 1));
|
||||
player.addPotionEffect(new PotionEffect(Potion.resistance.id, 30 * 20, 2));
|
||||
player.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 30 * 20, 0));
|
||||
}
|
||||
if(this == ModItems.can_creature) {
|
||||
player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 30 * 20, 0));
|
||||
player.addPotionEffect(new PotionEffect(Potion.resistance.id, 30 * 20, 2));
|
||||
player.addPotionEffect(new PotionEffect(Potion.regeneration.id, 30 * 20, 1));
|
||||
}
|
||||
if(this == ModItems.can_redbomb) {
|
||||
player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 30 * 20, 0));
|
||||
player.addPotionEffect(new PotionEffect(Potion.field_76444_x.id, 30 * 20, 2));
|
||||
player.addPotionEffect(new PotionEffect(Potion.jump.id, 30 * 20, 1));
|
||||
}
|
||||
if(this == ModItems.can_mrsugar) {
|
||||
player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 30 * 20, 0));
|
||||
player.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 30 * 20, 1));
|
||||
player.addPotionEffect(new PotionEffect(Potion.jump.id, 30 * 20, 2));
|
||||
}
|
||||
if(this == ModItems.can_overcharge) {
|
||||
player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 30 * 20, 1));
|
||||
player.addPotionEffect(new PotionEffect(Potion.resistance.id, 30 * 20, 2));
|
||||
player.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 30 * 20, 0));
|
||||
}
|
||||
if(this == ModItems.can_luna) {
|
||||
player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 30 * 20, 1));
|
||||
player.addPotionEffect(new PotionEffect(Potion.resistance.id, 30 * 20, 2));
|
||||
player.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 30 * 20, 1));
|
||||
player.addPotionEffect(new PotionEffect(Potion.regeneration.id, 30 * 20, 2));
|
||||
}
|
||||
if(this == ModItems.can_bepis) {
|
||||
player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 30 * 20, 3));
|
||||
player.addPotionEffect(new PotionEffect(Potion.resistance.id, 30 * 20, 3));
|
||||
}
|
||||
if(this == ModItems.can_breen) {
|
||||
player.addPotionEffect(new PotionEffect(Potion.confusion.id, 30 * 20, 0));
|
||||
}
|
||||
if(this == ModItems.chocolate_milk) {
|
||||
ExplosionLarge.explode(world, player.posX, player.posY, player.posZ, 50, true, false, false);
|
||||
}
|
||||
if(this == ModItems.bottle_nuka) {
|
||||
player.heal(4F);
|
||||
player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 30 * 20, 1));
|
||||
player.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 30 * 20, 1));
|
||||
ContaminationUtil.applyRadDirect(player, 5.0F);
|
||||
}
|
||||
if(this == ModItems.bottle_cherry) {
|
||||
player.heal(6F);
|
||||
player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 30 * 20, 0));
|
||||
player.addPotionEffect(new PotionEffect(Potion.jump.id, 30 * 20, 2));
|
||||
ContaminationUtil.applyRadDirect(player, 5.0F);
|
||||
}
|
||||
if(this == ModItems.bottle_quantum) {
|
||||
player.heal(10F);
|
||||
player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 30 * 20, 1));
|
||||
player.addPotionEffect(new PotionEffect(Potion.resistance.id, 30 * 20, 2));
|
||||
player.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 30 * 20, 1));
|
||||
ContaminationUtil.applyRadDirect(player, 15.0F);
|
||||
}
|
||||
if(this == ModItems.bottle2_korl) {
|
||||
player.heal(6);
|
||||
player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 30 * 20, 1));
|
||||
player.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 30 * 20, 2));
|
||||
player.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 30 * 20, 2));
|
||||
}
|
||||
if(this == ModItems.bottle2_fritz) {
|
||||
player.heal(6);
|
||||
player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 30 * 20, 1));
|
||||
player.addPotionEffect(new PotionEffect(Potion.resistance.id, 30 * 20, 2));
|
||||
player.addPotionEffect(new PotionEffect(Potion.jump.id, 30 * 20, 2));
|
||||
}
|
||||
if(this == ModItems.bottle2_korl_special) {
|
||||
player.heal(16);
|
||||
player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 120 * 20, 1));
|
||||
player.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 120 * 20, 2));
|
||||
player.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 120 * 20, 2));
|
||||
}
|
||||
if(this == ModItems.bottle2_fritz_special) {
|
||||
player.heal(16);
|
||||
player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 120 * 20, 1));
|
||||
player.addPotionEffect(new PotionEffect(Potion.resistance.id, 120 * 20, 2));
|
||||
player.addPotionEffect(new PotionEffect(Potion.jump.id, 120 * 20, 2));
|
||||
}
|
||||
if(this == ModItems.bottle_sparkle) {
|
||||
player.heal(10F);
|
||||
player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 120 * 20, 1));
|
||||
player.addPotionEffect(new PotionEffect(Potion.resistance.id, 120 * 20, 2));
|
||||
player.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 120 * 20, 2));
|
||||
player.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 120 * 20, 1));
|
||||
ContaminationUtil.applyRadDirect(player, 5.0F);
|
||||
}
|
||||
if(this == ModItems.bottle_rad) {
|
||||
player.heal(10F);
|
||||
player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 120 * 20, 1));
|
||||
player.addPotionEffect(new PotionEffect(Potion.resistance.id, 120 * 20, 2));
|
||||
player.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 120 * 20, 0));
|
||||
player.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 120 * 20, 4));
|
||||
player.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 120 * 20, 1));
|
||||
ContaminationUtil.applyRadDirect(player, 15.0F);
|
||||
}
|
||||
if(this == ModItems.bottle2_sunset) {
|
||||
player.heal(6);
|
||||
player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 60 * 20, 1));
|
||||
player.addPotionEffect(new PotionEffect(Potion.resistance.id, 60 * 20, 2));
|
||||
player.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 60 * 20, 2));
|
||||
player.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 60 * 20, 2));
|
||||
}
|
||||
}
|
||||
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.bottle_empty));
|
||||
}
|
||||
|
||||
if(this == ModItems.bottle2_korl || this == ModItems.bottle2_korl_special) {
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.cap_korl));
|
||||
if (stack.stackSize <= 0)
|
||||
{
|
||||
return new ItemStack(ModItems.bottle2_empty);
|
||||
}
|
||||
if(!player.capabilities.isCreativeMode && this != ModItems.chocolate_milk) {
|
||||
if(this == ModItems.can_creature || this == ModItems.can_mrsugar || this == ModItems.can_overcharge || this == ModItems.can_redbomb || this == ModItems.can_smart || this == ModItems.can_luna || this == ModItems.can_bepis || this == ModItems.can_breen) {
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.ring_pull));
|
||||
if(stack.stackSize <= 0) {
|
||||
return new ItemStack(ModItems.can_empty);
|
||||
}
|
||||
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.bottle2_empty));
|
||||
}
|
||||
|
||||
if(this == ModItems.bottle2_fritz || this == ModItems.bottle2_fritz_special) {
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.cap_fritz));
|
||||
if (stack.stackSize <= 0)
|
||||
{
|
||||
return new ItemStack(ModItems.bottle2_empty);
|
||||
}
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.can_empty));
|
||||
}
|
||||
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.bottle2_empty));
|
||||
}
|
||||
|
||||
if(this == ModItems.bottle_sparkle) {
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.cap_sparkle));
|
||||
if (stack.stackSize <= 0)
|
||||
{
|
||||
return new ItemStack(ModItems.bottle_empty);
|
||||
}
|
||||
if(this == ModItems.bottle_cherry || this == ModItems.bottle_nuka) {
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.cap_nuka));
|
||||
if(stack.stackSize <= 0) {
|
||||
return new ItemStack(ModItems.bottle_empty);
|
||||
}
|
||||
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.bottle_empty));
|
||||
}
|
||||
|
||||
if(this == ModItems.bottle_rad) {
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.cap_rad));
|
||||
if (stack.stackSize <= 0)
|
||||
{
|
||||
return new ItemStack(ModItems.bottle_empty);
|
||||
}
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.bottle_empty));
|
||||
}
|
||||
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.bottle_empty));
|
||||
}
|
||||
|
||||
if(this == ModItems.bottle2_sunset) {
|
||||
|
||||
if(world.rand.nextInt(10) == 0)
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.cap_star));
|
||||
else
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.cap_sunset));
|
||||
|
||||
if (stack.stackSize <= 0)
|
||||
{
|
||||
return new ItemStack(ModItems.bottle2_empty);
|
||||
}
|
||||
if(this == ModItems.bottle_quantum) {
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.cap_quantum));
|
||||
if(stack.stackSize <= 0) {
|
||||
return new ItemStack(ModItems.bottle_empty);
|
||||
}
|
||||
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.bottle2_empty));
|
||||
}
|
||||
}
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.bottle_empty));
|
||||
}
|
||||
|
||||
return stack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxItemUseDuration(ItemStack p_77626_1_)
|
||||
{
|
||||
return 32;
|
||||
}
|
||||
if(this == ModItems.bottle2_korl || this == ModItems.bottle2_korl_special) {
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.cap_korl));
|
||||
if(stack.stackSize <= 0) {
|
||||
return new ItemStack(ModItems.bottle2_empty);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumAction getItemUseAction(ItemStack p_77661_1_)
|
||||
{
|
||||
return EnumAction.drink;
|
||||
}
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.bottle2_empty));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_)
|
||||
{
|
||||
if(!(this == ModItems.can_creature || this == ModItems.can_mrsugar ||
|
||||
this == ModItems.can_overcharge || this == ModItems.can_redbomb ||
|
||||
this == ModItems.can_smart || this == ModItems.chocolate_milk ||
|
||||
this == ModItems.can_luna || this == ModItems.can_bepis ||
|
||||
this == ModItems.can_breen))
|
||||
if(!p_77659_3_.inventory.hasItem(ModItems.bottle_opener))
|
||||
return p_77659_1_;
|
||||
|
||||
p_77659_3_.setItemInUse(p_77659_1_, this.getMaxItemUseDuration(p_77659_1_));
|
||||
|
||||
return p_77659_1_;
|
||||
}
|
||||
|
||||
@Override
|
||||
if(this == ModItems.bottle2_fritz || this == ModItems.bottle2_fritz_special) {
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.cap_fritz));
|
||||
if(stack.stackSize <= 0) {
|
||||
return new ItemStack(ModItems.bottle2_empty);
|
||||
}
|
||||
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.bottle2_empty));
|
||||
}
|
||||
|
||||
if(this == ModItems.bottle_sparkle) {
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.cap_sparkle));
|
||||
if(stack.stackSize <= 0) {
|
||||
return new ItemStack(ModItems.bottle_empty);
|
||||
}
|
||||
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.bottle_empty));
|
||||
}
|
||||
|
||||
if(this == ModItems.bottle_rad) {
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.cap_rad));
|
||||
if(stack.stackSize <= 0) {
|
||||
return new ItemStack(ModItems.bottle_empty);
|
||||
}
|
||||
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.bottle_empty));
|
||||
}
|
||||
|
||||
if(this == ModItems.bottle2_sunset) {
|
||||
|
||||
if(world.rand.nextInt(10) == 0)
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.cap_star));
|
||||
else
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.cap_sunset));
|
||||
|
||||
if(stack.stackSize <= 0) {
|
||||
return new ItemStack(ModItems.bottle2_empty);
|
||||
}
|
||||
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.bottle2_empty));
|
||||
}
|
||||
}
|
||||
|
||||
return stack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxItemUseDuration(ItemStack p_77626_1_) {
|
||||
return 32;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumAction getItemUseAction(ItemStack p_77661_1_) {
|
||||
return EnumAction.drink;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_) {
|
||||
|
||||
if(VersatileConfig.hasPotionSickness(p_77659_3_))
|
||||
return p_77659_1_;
|
||||
|
||||
if(!(this == ModItems.can_creature || this == ModItems.can_mrsugar || this == ModItems.can_overcharge || this == ModItems.can_redbomb || this == ModItems.can_smart || this == ModItems.chocolate_milk || this == ModItems.can_luna || this == ModItems.can_bepis || this == ModItems.can_breen))
|
||||
if(!p_77659_3_.inventory.hasItem(ModItems.bottle_opener))
|
||||
return p_77659_1_;
|
||||
|
||||
p_77659_3_.setItemInUse(p_77659_1_, this.getMaxItemUseDuration(p_77659_1_));
|
||||
|
||||
return p_77659_1_;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack p_77624_1_, EntityPlayer p_77624_2_, List list, boolean p_77624_4_)
|
||||
{
|
||||
if(this == ModItems.can_smart)
|
||||
{
|
||||
list.add("Cheap and full of bubbles");
|
||||
}
|
||||
if(this == ModItems.can_creature)
|
||||
{
|
||||
list.add("Basically gasoline in a tin can");
|
||||
}
|
||||
if(this == ModItems.can_redbomb)
|
||||
{
|
||||
list.add("Liquefied explosives");
|
||||
}
|
||||
if(this == ModItems.can_mrsugar)
|
||||
{
|
||||
list.add("An intellectual drink, for the chosen ones!");
|
||||
}
|
||||
if(this == ModItems.can_overcharge)
|
||||
{
|
||||
list.add("Possible side effects include heart attacks, seizures or zombification");
|
||||
}
|
||||
if(this == ModItems.can_luna)
|
||||
{
|
||||
list.add("Contains actual selenium and star metal. Tastes like night.");
|
||||
}
|
||||
if(this == ModItems.can_bepis)
|
||||
{
|
||||
list.add("beppp");
|
||||
}
|
||||
if(this == ModItems.can_breen)
|
||||
{
|
||||
list.add("Don't drink the water. They put something in it, to make you forget.");
|
||||
list.add("I don't even know how I got here.");
|
||||
}
|
||||
if(this == ModItems.chocolate_milk)
|
||||
{
|
||||
list.add("Regular chocolate milk. Safe to drink.");
|
||||
list.add("Totally not made from nitroglycerine.");
|
||||
}
|
||||
if(this == ModItems.bottle_nuka)
|
||||
{
|
||||
list.add("Contains about 210 kcal and 1500 mSv.");
|
||||
list.add("[Requires bottle opener]");
|
||||
}
|
||||
if(this == ModItems.bottle_cherry)
|
||||
{
|
||||
list.add("Now with severe radiation poisoning in every seventh bottle!");
|
||||
list.add("[Requires bottle opener]");
|
||||
}
|
||||
if(this == ModItems.bottle_quantum)
|
||||
{
|
||||
list.add("Comes with a colorful mix of over 70 isotopes!");
|
||||
list.add("[Requires bottle opener]");
|
||||
}
|
||||
if(this == ModItems.bottle2_korl)
|
||||
{
|
||||
list.add("Contains actual orange juice!");
|
||||
list.add("[Requires bottle opener]");
|
||||
}
|
||||
if(this == ModItems.bottle2_fritz)
|
||||
{
|
||||
list.add("moremore caffeine");
|
||||
list.add("[Requires bottle opener]");
|
||||
}
|
||||
if(this == ModItems.bottle2_korl_special)
|
||||
{
|
||||
if(MainRegistry.polaroidID == 11)
|
||||
list.add("shgehgev u rguer");
|
||||
else
|
||||
list.add("Contains actual orange juice!");
|
||||
list.add("[Requires bottle opener]");
|
||||
}
|
||||
if(this == ModItems.bottle2_fritz_special)
|
||||
{
|
||||
if(MainRegistry.polaroidID == 11)
|
||||
list.add("ygrogr fgrof bf");
|
||||
else
|
||||
list.add("moremore caffeine");
|
||||
list.add("[Requires bottle opener]");
|
||||
}
|
||||
if(this == ModItems.bottle_sparkle)
|
||||
{
|
||||
if(MainRegistry.polaroidID == 11)
|
||||
list.add("Contains trace amounts of taint.");
|
||||
else
|
||||
list.add("The most delicious beverage in the wasteland!");
|
||||
list.add("[Requires bottle opener]");
|
||||
}
|
||||
if(this == ModItems.bottle_sparkle)
|
||||
{
|
||||
if(MainRegistry.polaroidID == 11)
|
||||
list.add("Now with 400% more radiation!");
|
||||
else
|
||||
list.add("Tastes like radish and radiation.");
|
||||
list.add("[Requires bottle opener]");
|
||||
}
|
||||
if(this == ModItems.bottle2_sunset)
|
||||
{
|
||||
if(MainRegistry.polaroidID == 11) {
|
||||
list.add("\"Authentic Sunset Juice\"");
|
||||
list.add("");
|
||||
list.add("This smells like fish.");
|
||||
list.add("*sip*");
|
||||
list.add("Yup, that's pretty disugsting.");
|
||||
list.add("...");
|
||||
list.add("...");
|
||||
list.add("*sip*");
|
||||
} else {
|
||||
list.add("The eternal #2. Screw you, Bradberton!");
|
||||
}
|
||||
list.add("[Requires bottle opener]");
|
||||
}
|
||||
}
|
||||
public void addInformation(ItemStack p_77624_1_, EntityPlayer p_77624_2_, List list, boolean p_77624_4_) {
|
||||
if(this == ModItems.can_smart) {
|
||||
list.add("Cheap and full of bubbles");
|
||||
}
|
||||
if(this == ModItems.can_creature) {
|
||||
list.add("Basically gasoline in a tin can");
|
||||
}
|
||||
if(this == ModItems.can_redbomb) {
|
||||
list.add("Liquefied explosives");
|
||||
}
|
||||
if(this == ModItems.can_mrsugar) {
|
||||
list.add("An intellectual drink, for the chosen ones!");
|
||||
}
|
||||
if(this == ModItems.can_overcharge) {
|
||||
list.add("Possible side effects include heart attacks, seizures or zombification");
|
||||
}
|
||||
if(this == ModItems.can_luna) {
|
||||
list.add("Contains actual selenium and star metal. Tastes like night.");
|
||||
}
|
||||
if(this == ModItems.can_bepis) {
|
||||
list.add("beppp");
|
||||
}
|
||||
if(this == ModItems.can_breen) {
|
||||
list.add("Don't drink the water. They put something in it, to make you forget.");
|
||||
list.add("I don't even know how I got here.");
|
||||
}
|
||||
if(this == ModItems.chocolate_milk) {
|
||||
list.add("Regular chocolate milk. Safe to drink.");
|
||||
list.add("Totally not made from nitroglycerine.");
|
||||
}
|
||||
if(this == ModItems.bottle_nuka) {
|
||||
list.add("Contains about 210 kcal and 1500 mSv.");
|
||||
list.add("[Requires bottle opener]");
|
||||
}
|
||||
if(this == ModItems.bottle_cherry) {
|
||||
list.add("Now with severe radiation poisoning in every seventh bottle!");
|
||||
list.add("[Requires bottle opener]");
|
||||
}
|
||||
if(this == ModItems.bottle_quantum) {
|
||||
list.add("Comes with a colorful mix of over 70 isotopes!");
|
||||
list.add("[Requires bottle opener]");
|
||||
}
|
||||
if(this == ModItems.bottle2_korl) {
|
||||
list.add("Contains actual orange juice!");
|
||||
list.add("[Requires bottle opener]");
|
||||
}
|
||||
if(this == ModItems.bottle2_fritz) {
|
||||
list.add("moremore caffeine");
|
||||
list.add("[Requires bottle opener]");
|
||||
}
|
||||
if(this == ModItems.bottle2_korl_special) {
|
||||
if(MainRegistry.polaroidID == 11)
|
||||
list.add("shgehgev u rguer");
|
||||
else
|
||||
list.add("Contains actual orange juice!");
|
||||
list.add("[Requires bottle opener]");
|
||||
}
|
||||
if(this == ModItems.bottle2_fritz_special) {
|
||||
if(MainRegistry.polaroidID == 11)
|
||||
list.add("ygrogr fgrof bf");
|
||||
else
|
||||
list.add("moremore caffeine");
|
||||
list.add("[Requires bottle opener]");
|
||||
}
|
||||
if(this == ModItems.bottle_sparkle) {
|
||||
if(MainRegistry.polaroidID == 11)
|
||||
list.add("Contains trace amounts of taint.");
|
||||
else
|
||||
list.add("The most delicious beverage in the wasteland!");
|
||||
list.add("[Requires bottle opener]");
|
||||
}
|
||||
if(this == ModItems.bottle_sparkle) {
|
||||
if(MainRegistry.polaroidID == 11)
|
||||
list.add("Now with 400% more radiation!");
|
||||
else
|
||||
list.add("Tastes like radish and radiation.");
|
||||
list.add("[Requires bottle opener]");
|
||||
}
|
||||
if(this == ModItems.bottle2_sunset) {
|
||||
if(MainRegistry.polaroidID == 11) {
|
||||
list.add("\"Authentic Sunset Juice\"");
|
||||
list.add("");
|
||||
list.add("This smells like fish.");
|
||||
list.add("*sip*");
|
||||
list.add("Yup, that's pretty disugsting.");
|
||||
list.add("...");
|
||||
list.add("...");
|
||||
list.add("*sip*");
|
||||
} else {
|
||||
list.add("The eternal #2. Screw you, Bradberton!");
|
||||
}
|
||||
list.add("[Requires bottle opener]");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,6 +3,7 @@ package com.hbm.items.food;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.config.VersatileConfig;
|
||||
import com.hbm.extprop.HbmLivingProps;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.ModDamageSource;
|
||||
@ -27,6 +28,9 @@ public class ItemPill extends ItemFood {
|
||||
@Override
|
||||
protected void onFoodEaten(ItemStack stack, World world, EntityPlayer player) {
|
||||
if(!world.isRemote) {
|
||||
|
||||
VersatileConfig.applyPotionSickness(player, 5);
|
||||
|
||||
if(this == ModItems.pill_iodine) {
|
||||
player.removePotionEffect(Potion.blindness.id);
|
||||
player.removePotionEffect(Potion.confusion.id);
|
||||
@ -96,7 +100,8 @@ public class ItemPill extends ItemFood {
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_) {
|
||||
|
||||
p_77659_3_.setItemInUse(p_77659_1_, this.getMaxItemUseDuration(p_77659_1_));
|
||||
if(!VersatileConfig.hasPotionSickness(p_77659_3_))
|
||||
p_77659_3_.setItemInUse(p_77659_1_, this.getMaxItemUseDuration(p_77659_1_));
|
||||
|
||||
return p_77659_1_;
|
||||
}
|
||||
|
||||
@ -3,6 +3,7 @@ package com.hbm.items.special;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.config.VersatileConfig;
|
||||
import com.hbm.handler.ArmorModHandler;
|
||||
import com.hbm.interfaces.IPartiallyFillable;
|
||||
import com.hbm.items.ModItems;
|
||||
@ -29,7 +30,7 @@ public class ItemSyringe extends Item {
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
|
||||
|
||||
if(this == ModItems.syringe_antidote) {
|
||||
if(this == ModItems.syringe_antidote && !VersatileConfig.hasPotionSickness(player)) {
|
||||
if(!world.isRemote) {
|
||||
player.clearActivePotions();
|
||||
|
||||
@ -43,10 +44,12 @@ public class ItemSyringe extends Item {
|
||||
if(!player.inventory.addItemStackToInventory(new ItemStack(ModItems.syringe_empty))) {
|
||||
player.dropPlayerItemWithRandomChoice(new ItemStack(ModItems.syringe_empty, 1, 0), false);
|
||||
}
|
||||
|
||||
VersatileConfig.applyPotionSickness(player, 5);
|
||||
}
|
||||
}
|
||||
|
||||
if(this == ModItems.syringe_awesome) {
|
||||
if(this == ModItems.syringe_awesome && !VersatileConfig.hasPotionSickness(player)) {
|
||||
if(!world.isRemote) {
|
||||
player.addPotionEffect(new PotionEffect(Potion.regeneration.id, 50 * 20, 9));
|
||||
player.addPotionEffect(new PotionEffect(Potion.resistance.id, 50 * 20, 9));
|
||||
@ -70,6 +73,8 @@ public class ItemSyringe extends Item {
|
||||
if(!player.inventory.addItemStackToInventory(new ItemStack(ModItems.syringe_empty))) {
|
||||
player.dropPlayerItemWithRandomChoice(new ItemStack(ModItems.syringe_empty, 1, 0), false);
|
||||
}
|
||||
|
||||
VersatileConfig.applyPotionSickness(player, 50);
|
||||
}
|
||||
}
|
||||
|
||||
@ -93,7 +98,7 @@ public class ItemSyringe extends Item {
|
||||
}
|
||||
}
|
||||
|
||||
if(this == ModItems.syringe_metal_stimpak) {
|
||||
if(this == ModItems.syringe_metal_stimpak && !VersatileConfig.hasPotionSickness(player)) {
|
||||
if(!world.isRemote) {
|
||||
player.heal(5);
|
||||
|
||||
@ -107,10 +112,12 @@ public class ItemSyringe extends Item {
|
||||
if(!player.inventory.addItemStackToInventory(new ItemStack(ModItems.syringe_metal_empty))) {
|
||||
player.dropPlayerItemWithRandomChoice(new ItemStack(ModItems.syringe_metal_empty, 1, 0), false);
|
||||
}
|
||||
|
||||
VersatileConfig.applyPotionSickness(player, 5);
|
||||
}
|
||||
}
|
||||
|
||||
if(this == ModItems.syringe_metal_medx) {
|
||||
if(this == ModItems.syringe_metal_medx && !VersatileConfig.hasPotionSickness(player)) {
|
||||
if(!world.isRemote) {
|
||||
player.addPotionEffect(new PotionEffect(Potion.resistance.id, 4 * 60 * 20, 2));
|
||||
|
||||
@ -124,10 +131,12 @@ public class ItemSyringe extends Item {
|
||||
if(!player.inventory.addItemStackToInventory(new ItemStack(ModItems.syringe_metal_empty))) {
|
||||
player.dropPlayerItemWithRandomChoice(new ItemStack(ModItems.syringe_metal_empty, 1, 0), false);
|
||||
}
|
||||
|
||||
VersatileConfig.applyPotionSickness(player, 5);
|
||||
}
|
||||
}
|
||||
|
||||
if(this == ModItems.syringe_metal_psycho) {
|
||||
if(this == ModItems.syringe_metal_psycho && !VersatileConfig.hasPotionSickness(player)) {
|
||||
if(!world.isRemote) {
|
||||
player.addPotionEffect(new PotionEffect(Potion.resistance.id, 2 * 60 * 20, 0));
|
||||
player.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 2 * 60 * 20, 0));
|
||||
@ -142,10 +151,12 @@ public class ItemSyringe extends Item {
|
||||
if(!player.inventory.addItemStackToInventory(new ItemStack(ModItems.syringe_metal_empty))) {
|
||||
player.dropPlayerItemWithRandomChoice(new ItemStack(ModItems.syringe_metal_empty, 1, 0), false);
|
||||
}
|
||||
|
||||
VersatileConfig.applyPotionSickness(player, 5);
|
||||
}
|
||||
}
|
||||
|
||||
if(this == ModItems.syringe_metal_super) {
|
||||
if(this == ModItems.syringe_metal_super && !VersatileConfig.hasPotionSickness(player)) {
|
||||
if(!world.isRemote) {
|
||||
player.heal(25);
|
||||
player.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 10 * 20, 0));
|
||||
@ -160,10 +171,12 @@ public class ItemSyringe extends Item {
|
||||
if(!player.inventory.addItemStackToInventory(new ItemStack(ModItems.syringe_metal_empty))) {
|
||||
player.dropPlayerItemWithRandomChoice(new ItemStack(ModItems.syringe_metal_empty, 1, 0), false);
|
||||
}
|
||||
|
||||
VersatileConfig.applyPotionSickness(player, 15);
|
||||
}
|
||||
}
|
||||
|
||||
if(this == ModItems.med_bag) {
|
||||
if(this == ModItems.med_bag && !VersatileConfig.hasPotionSickness(player)) {
|
||||
if(!world.isRemote) {
|
||||
player.setHealth(player.getMaxHealth());
|
||||
|
||||
@ -176,6 +189,8 @@ public class ItemSyringe extends Item {
|
||||
player.removePotionEffect(Potion.weakness.id);
|
||||
player.removePotionEffect(Potion.wither.id);
|
||||
player.removePotionEffect(HbmPotion.radiation.id);
|
||||
|
||||
VersatileConfig.applyPotionSickness(player, 15);
|
||||
|
||||
stack.stackSize--;
|
||||
}
|
||||
|
||||
@ -3,7 +3,7 @@ package com.hbm.lib;
|
||||
public class RefStrings {
|
||||
public static final String MODID = "hbm";
|
||||
public static final String NAME = "Hbm's Nuclear Tech Mod";
|
||||
public static final String VERSION = "1.0.27 BETA (3801)";
|
||||
public static final String VERSION = "1.0.27 BETA (3802)";
|
||||
//HBM's Beta Naming Convention:
|
||||
//V T (X)
|
||||
//V -> next release version
|
||||
|
||||
@ -215,6 +215,39 @@ public class ModEventHandlerClient {
|
||||
|
||||
if(invis != null && invis.getAmplifier() > 0)
|
||||
event.setCanceled(true);
|
||||
|
||||
if(player.getDisplayName().toLowerCase().equals("martmn")) {
|
||||
|
||||
event.setCanceled(true);
|
||||
|
||||
float pX = (float) (player.prevPosX + (player.posX - player.prevPosX) * (double)event.partialRenderTick);
|
||||
float pY = (float) (player.prevPosY + (player.posY - player.prevPosY) * (double)event.partialRenderTick);
|
||||
float pZ = (float) (player.prevPosZ + (player.posZ - player.prevPosZ) * (double)event.partialRenderTick);
|
||||
EntityPlayer me = Minecraft.getMinecraft().thePlayer;
|
||||
float mX = (float) (me.prevPosX + (me.posX - me.prevPosX) * (double)event.partialRenderTick);
|
||||
float mY = (float) (me.prevPosY + (me.posY - me.prevPosY) * (double)event.partialRenderTick);
|
||||
float mZ = (float) (me.prevPosZ + (me.posZ - me.prevPosZ) * (double)event.partialRenderTick);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID + ":textures/particle/fart.png"));
|
||||
GL11.glPushMatrix();
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
GL11.glTranslatef(pX - mX, pY - mY + 0.75F - (float)player.getYOffset(), pZ - mZ);
|
||||
GL11.glRotatef(-me.rotationYaw, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(me.rotationPitch, 1.0F, 0.0F, 0.0F);
|
||||
Tessellator t = Tessellator.instance;
|
||||
t.startDrawingQuads();
|
||||
t.setBrightness(240);
|
||||
t.addVertexWithUV(-1, 1, 0, 0, 0);
|
||||
t.addVertexWithUV(1, 1, 0, 1, 0);
|
||||
t.addVertexWithUV(1, -1, 0, 1, 1);
|
||||
t.addVertexWithUV(-1, -1, 0, 0, 1);
|
||||
t.draw();
|
||||
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
ResourceLocation cloak = RenderAccessoryUtility.getCloakFromPlayer(player);
|
||||
|
||||
|
||||
@ -34,6 +34,7 @@ public class HbmPotion extends Potion {
|
||||
public static HbmPotion telekinesis;
|
||||
public static HbmPotion phosphorus;
|
||||
public static HbmPotion stability;
|
||||
public static HbmPotion potionsickness;
|
||||
|
||||
public HbmPotion(int id, boolean isBad, int color) {
|
||||
super(id, isBad, color);
|
||||
@ -50,6 +51,7 @@ public class HbmPotion extends Potion {
|
||||
telekinesis = registerPotion(PotionConfig.telekinesisID, true, 0x00F3FF, "potion.hbm_telekinesis", 0, 1);
|
||||
phosphorus = registerPotion(PotionConfig.phosphorusID, true, 0xFFFF00, "potion.hbm_phosphorus", 1, 1);
|
||||
stability = registerPotion(PotionConfig.stabilityID, false, 0xD0D0D0, "potion.hbm_stability", 2, 1);
|
||||
potionsickness = registerPotion(PotionConfig.potionsicknessID, false, 0xff8080, "potion.hbm_potionsickness", 3, 1);
|
||||
}
|
||||
|
||||
public static HbmPotion registerPotion(int id, boolean isBad, int color, String name, int x, int y) {
|
||||
|
||||
@ -339,7 +339,7 @@ public class TileEntityMachineSatDock extends TileEntity implements ISidedInvent
|
||||
if(slots[i].stackSize <= 0)
|
||||
slots[i] = null;
|
||||
|
||||
chest.setInventorySlotContents(j, chest.getStackInSlot(j).copy());
|
||||
chest.getStackInSlot(j).stackSize++;
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -362,9 +362,7 @@ public class TileEntityMachineSatDock extends TileEntity implements ISidedInvent
|
||||
if(slots[i].stackSize <= 0)
|
||||
slots[i] = null;
|
||||
|
||||
ItemStack copy = chest.getStackInSlot(j).copy();
|
||||
copy.stackSize = 1;
|
||||
chest.setInventorySlotContents(j, copy);
|
||||
chest.setInventorySlotContents(j, sta);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
"modid": "hbm",
|
||||
"name": "Hbm's Nuclear Tech",
|
||||
"description": "A mod that adds weapons, nuclear themed stuff and machines",
|
||||
"version":"1.0.27-3801",
|
||||
"version":"1.0.27-3802",
|
||||
"mcversion": "1.7.10",
|
||||
"url": "",
|
||||
"updateUrl": "",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user