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_uranium_fuel.name=Urankernbrennstoffbarren
|
||||||
item.ingot_verticium.name=Verticiumbarren
|
item.ingot_verticium.name=Verticiumbarren
|
||||||
item.ingot_weidanium.name=Weidaniumbarren
|
item.ingot_weidanium.name=Weidaniumbarren
|
||||||
|
item.ingot_zirconium.name=Zirkoniumwürfel
|
||||||
item.ink.name=林-Tinte
|
item.ink.name=林-Tinte
|
||||||
item.insert_doxium.name=Astolfium-dottierte Doxiumeinlage
|
item.insert_doxium.name=Astolfium-dottierte Doxiumeinlage
|
||||||
item.insert_du.name=DU-Einlage
|
item.insert_du.name=DU-Einlage
|
||||||
@ -1834,6 +1835,7 @@ item.powder_uranium.name=Uranstaub
|
|||||||
item.powder_verticium.name=Verticiumstaub
|
item.powder_verticium.name=Verticiumstaub
|
||||||
item.powder_weidanium.name=Weidaniumstaub
|
item.powder_weidanium.name=Weidaniumstaub
|
||||||
item.powder_yellowcake.name=Yellowcake
|
item.powder_yellowcake.name=Yellowcake
|
||||||
|
item.powder_zirconium.name=Zirkoniumstaub
|
||||||
item.primer_357.name=.357 Magnum-Zündhütchen (x24)
|
item.primer_357.name=.357 Magnum-Zündhütchen (x24)
|
||||||
item.primer_44.name=.44 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)
|
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_bang=! ! !
|
||||||
potion.hbm_lead=Bleivergiftung
|
potion.hbm_lead=Bleivergiftung
|
||||||
potion.hbm_mutation=Verdorbenes Herz
|
potion.hbm_mutation=Verdorbenes Herz
|
||||||
|
potion.hbm_potionsickness=Trankkrankheit
|
||||||
potion.hbm_phosphorus=Phosphorverbrennung
|
potion.hbm_phosphorus=Phosphorverbrennung
|
||||||
potion.hbm_radaway=Radaway
|
potion.hbm_radaway=Radaway
|
||||||
potion.hbm_radiation=Kontaminiert
|
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_uranium_fuel.name=Ingot of Uranium Fuel
|
||||||
item.ingot_verticium.name=Verticium Ingot
|
item.ingot_verticium.name=Verticium Ingot
|
||||||
item.ingot_weidanium.name=Weidanium Ingot
|
item.ingot_weidanium.name=Weidanium Ingot
|
||||||
|
item.ingot_zirconium.name=Zirconium Cube
|
||||||
item.ink.name=林 Ink
|
item.ink.name=林 Ink
|
||||||
item.insert_doxium.name=Astolfium-Doped Doxium Insert
|
item.insert_doxium.name=Astolfium-Doped Doxium Insert
|
||||||
item.insert_du.name=DU 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_verticium.name=Verticium Powder
|
||||||
item.powder_weidanium.name=Weidanium Powder
|
item.powder_weidanium.name=Weidanium Powder
|
||||||
item.powder_yellowcake.name=Yellowcake
|
item.powder_yellowcake.name=Yellowcake
|
||||||
|
item.powder_zirconium.name=Zirconium Powder
|
||||||
item.primer_357.name=.357 Magnum Primer (x24)
|
item.primer_357.name=.357 Magnum Primer (x24)
|
||||||
item.primer_44.name=.44 Magnum Primer (x24)
|
item.primer_44.name=.44 Magnum Primer (x24)
|
||||||
item.primer_50.name=Large Caliber Primer (x12)
|
item.primer_50.name=Large Caliber Primer (x12)
|
||||||
@ -2256,6 +2258,7 @@ potion.hbm_bang=! ! !
|
|||||||
potion.hbm_lead=Lead Poisoning
|
potion.hbm_lead=Lead Poisoning
|
||||||
potion.hbm_mutation=Tainted Heart
|
potion.hbm_mutation=Tainted Heart
|
||||||
potion.hbm_phosphorus=Phosphorus Burns
|
potion.hbm_phosphorus=Phosphorus Burns
|
||||||
|
potion.hbm_potionsickness=Potion Sickness
|
||||||
potion.hbm_radaway=Radaway
|
potion.hbm_radaway=Radaway
|
||||||
potion.hbm_radiation=Contaminated
|
potion.hbm_radiation=Contaminated
|
||||||
potion.hbm_radx=Rad-X
|
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();
|
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) {
|
public static String[] createConfigStringList(Configuration config, String category, String name, String comment) {
|
||||||
|
|
||||||
Property prop = config.get(category, name, new String[] { "PLACEHOLDER" });
|
Property prop = config.get(category, name, new String[] { "PLACEHOLDER" });
|
||||||
|
|||||||
@ -14,6 +14,9 @@ public class PotionConfig {
|
|||||||
public static int telekinesisID = 69;
|
public static int telekinesisID = 69;
|
||||||
public static int phosphorusID = 70;
|
public static int phosphorusID = 70;
|
||||||
public static int stabilityID = 71;
|
public static int stabilityID = 71;
|
||||||
|
public static int potionsicknessID = 72;
|
||||||
|
|
||||||
|
public static int potionSickness = 0;
|
||||||
|
|
||||||
public static void loadFromConfig(Configuration config) {
|
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);
|
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);
|
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);
|
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;
|
package com.hbm.config;
|
||||||
|
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
|
import com.hbm.potion.HbmPotion;
|
||||||
|
|
||||||
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.potion.PotionEffect;
|
||||||
|
|
||||||
public class VersatileConfig {
|
public class VersatileConfig {
|
||||||
|
|
||||||
@ -22,4 +25,18 @@ public class VersatileConfig {
|
|||||||
return 100;
|
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 nugget_schrabidium_fuel;
|
||||||
public static Item ingot_advanced_alloy;
|
public static Item ingot_advanced_alloy;
|
||||||
public static Item lithium;
|
public static Item lithium;
|
||||||
|
public static Item ingot_zirconium;
|
||||||
public static Item ingot_hes;
|
public static Item ingot_hes;
|
||||||
public static Item ingot_les;
|
public static Item ingot_les;
|
||||||
public static Item nugget_hes;
|
public static Item nugget_hes;
|
||||||
@ -302,6 +303,7 @@ public class ModItems {
|
|||||||
public static Item powder_red_copper;
|
public static Item powder_red_copper;
|
||||||
public static Item powder_steel;
|
public static Item powder_steel;
|
||||||
public static Item powder_lithium;
|
public static Item powder_lithium;
|
||||||
|
public static Item powder_zirconium;
|
||||||
public static Item redstone_depleted;
|
public static Item redstone_depleted;
|
||||||
|
|
||||||
public static Item powder_australium;
|
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_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");
|
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");
|
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_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");
|
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");
|
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_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_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_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");
|
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_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");
|
powder_iodine = new ItemCustomLore().setUnlocalizedName("powder_iodine").setCreativeTab(null).setTextureName(RefStrings.MODID + ":powder_iodine");
|
||||||
@ -4694,6 +4698,7 @@ public class ModItems {
|
|||||||
//Misc Ingots
|
//Misc Ingots
|
||||||
GameRegistry.registerItem(ingot_phosphorus, ingot_phosphorus.getUnlocalizedName());
|
GameRegistry.registerItem(ingot_phosphorus, ingot_phosphorus.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(lithium, lithium.getUnlocalizedName());
|
GameRegistry.registerItem(lithium, lithium.getUnlocalizedName());
|
||||||
|
GameRegistry.registerItem(ingot_zirconium, ingot_zirconium.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(ingot_semtex, ingot_semtex.getUnlocalizedName());
|
GameRegistry.registerItem(ingot_semtex, ingot_semtex.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(solid_fuel, solid_fuel.getUnlocalizedName());
|
GameRegistry.registerItem(solid_fuel, solid_fuel.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(rocket_fuel, rocket_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_chlorophyte, powder_chlorophyte.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(powder_combine_steel, powder_combine_steel.getUnlocalizedName());
|
GameRegistry.registerItem(powder_combine_steel, powder_combine_steel.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(powder_lithium, powder_lithium.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_lignite, powder_lignite.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(powder_iodine, powder_iodine.getUnlocalizedName());
|
GameRegistry.registerItem(powder_iodine, powder_iodine.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(powder_thorium, powder_thorium.getUnlocalizedName());
|
GameRegistry.registerItem(powder_thorium, powder_thorium.getUnlocalizedName());
|
||||||
|
|||||||
@ -2,6 +2,7 @@ package com.hbm.items.food;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.hbm.config.VersatileConfig;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.main.MainRegistry;
|
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.resistance.id, 60 * 20, 2));
|
||||||
player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 60 * 20, 1));
|
player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 60 * 20, 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
VersatileConfig.applyPotionSickness(player, 5);
|
||||||
|
|
||||||
return stack;
|
return stack;
|
||||||
}
|
}
|
||||||
@ -64,7 +67,7 @@ public class ItemCanteen extends Item {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
|
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));
|
player.setItemInUse(stack, this.getMaxItemUseDuration(stack));
|
||||||
|
|
||||||
return stack;
|
return stack;
|
||||||
|
|||||||
@ -2,6 +2,7 @@ package com.hbm.items.food;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.hbm.config.VersatileConfig;
|
||||||
import com.hbm.explosion.ExplosionLarge;
|
import com.hbm.explosion.ExplosionLarge;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.main.MainRegistry;
|
import com.hbm.main.MainRegistry;
|
||||||
@ -20,387 +21,333 @@ import net.minecraftforge.common.util.FakePlayer;
|
|||||||
|
|
||||||
public class ItemEnergy extends Item {
|
public class ItemEnergy extends Item {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ItemStack onEaten(ItemStack stack, World world, EntityPlayer player) {
|
public ItemStack onEaten(ItemStack stack, World world, EntityPlayer player) {
|
||||||
|
|
||||||
if (!player.capabilities.isCreativeMode)
|
|
||||||
{
|
|
||||||
--stack.stackSize;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!world.isRemote)
|
if(!player.capabilities.isCreativeMode) {
|
||||||
{
|
--stack.stackSize;
|
||||||
|
}
|
||||||
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 && this != ModItems.chocolate_milk)
|
if(!world.isRemote) {
|
||||||
{
|
|
||||||
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.can_empty));
|
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.bottle_cherry || this == ModItems.bottle_nuka) {
|
}
|
||||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.cap_nuka));
|
|
||||||
if (stack.stackSize <= 0)
|
VersatileConfig.applyPotionSickness(player, 5);
|
||||||
{
|
|
||||||
return new ItemStack(ModItems.bottle_empty);
|
|
||||||
}
|
|
||||||
|
|
||||||
player.inventory.addItemStackToInventory(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));
|
||||||
if(this == ModItems.bottle_quantum) {
|
player.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 30 * 20, 0));
|
||||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.cap_quantum));
|
}
|
||||||
if (stack.stackSize <= 0)
|
if(this == ModItems.can_creature) {
|
||||||
{
|
player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 30 * 20, 0));
|
||||||
return new ItemStack(ModItems.bottle_empty);
|
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(!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(this == ModItems.bottle2_korl || this == ModItems.bottle2_korl_special) {
|
if(stack.stackSize <= 0) {
|
||||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.cap_korl));
|
return new ItemStack(ModItems.can_empty);
|
||||||
if (stack.stackSize <= 0)
|
}
|
||||||
{
|
|
||||||
return new ItemStack(ModItems.bottle2_empty);
|
|
||||||
}
|
|
||||||
|
|
||||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.bottle2_empty));
|
player.inventory.addItemStackToInventory(new ItemStack(ModItems.can_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.bottle2_empty));
|
if(this == ModItems.bottle_cherry || this == ModItems.bottle_nuka) {
|
||||||
}
|
player.inventory.addItemStackToInventory(new ItemStack(ModItems.cap_nuka));
|
||||||
|
if(stack.stackSize <= 0) {
|
||||||
if(this == ModItems.bottle_sparkle) {
|
return new ItemStack(ModItems.bottle_empty);
|
||||||
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));
|
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.bottle_quantum) {
|
||||||
}
|
player.inventory.addItemStackToInventory(new ItemStack(ModItems.cap_quantum));
|
||||||
|
if(stack.stackSize <= 0) {
|
||||||
if(this == ModItems.bottle2_sunset) {
|
return new ItemStack(ModItems.bottle_empty);
|
||||||
|
}
|
||||||
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));
|
player.inventory.addItemStackToInventory(new ItemStack(ModItems.bottle_empty));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return stack;
|
if(this == ModItems.bottle2_korl || this == ModItems.bottle2_korl_special) {
|
||||||
}
|
player.inventory.addItemStackToInventory(new ItemStack(ModItems.cap_korl));
|
||||||
|
if(stack.stackSize <= 0) {
|
||||||
@Override
|
return new ItemStack(ModItems.bottle2_empty);
|
||||||
public int getMaxItemUseDuration(ItemStack p_77626_1_)
|
}
|
||||||
{
|
|
||||||
return 32;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
player.inventory.addItemStackToInventory(new ItemStack(ModItems.bottle2_empty));
|
||||||
public EnumAction getItemUseAction(ItemStack p_77661_1_)
|
}
|
||||||
{
|
|
||||||
return EnumAction.drink;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
if(this == ModItems.bottle2_fritz || this == ModItems.bottle2_fritz_special) {
|
||||||
public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_)
|
player.inventory.addItemStackToInventory(new ItemStack(ModItems.cap_fritz));
|
||||||
{
|
if(stack.stackSize <= 0) {
|
||||||
if(!(this == ModItems.can_creature || this == ModItems.can_mrsugar ||
|
return new ItemStack(ModItems.bottle2_empty);
|
||||||
this == ModItems.can_overcharge || this == ModItems.can_redbomb ||
|
}
|
||||||
this == ModItems.can_smart || this == ModItems.chocolate_milk ||
|
|
||||||
this == ModItems.can_luna || this == ModItems.can_bepis ||
|
player.inventory.addItemStackToInventory(new ItemStack(ModItems.bottle2_empty));
|
||||||
this == ModItems.can_breen))
|
}
|
||||||
if(!p_77659_3_.inventory.hasItem(ModItems.bottle_opener))
|
|
||||||
return p_77659_1_;
|
if(this == ModItems.bottle_sparkle) {
|
||||||
|
player.inventory.addItemStackToInventory(new ItemStack(ModItems.cap_sparkle));
|
||||||
p_77659_3_.setItemInUse(p_77659_1_, this.getMaxItemUseDuration(p_77659_1_));
|
if(stack.stackSize <= 0) {
|
||||||
|
return new ItemStack(ModItems.bottle_empty);
|
||||||
return p_77659_1_;
|
}
|
||||||
}
|
|
||||||
|
player.inventory.addItemStackToInventory(new ItemStack(ModItems.bottle_empty));
|
||||||
@Override
|
}
|
||||||
|
|
||||||
|
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)
|
@SideOnly(Side.CLIENT)
|
||||||
public void addInformation(ItemStack p_77624_1_, EntityPlayer p_77624_2_, List list, boolean p_77624_4_)
|
public void addInformation(ItemStack p_77624_1_, EntityPlayer p_77624_2_, List list, boolean p_77624_4_) {
|
||||||
{
|
if(this == ModItems.can_smart) {
|
||||||
if(this == ModItems.can_smart)
|
list.add("Cheap and full of bubbles");
|
||||||
{
|
}
|
||||||
list.add("Cheap and full of bubbles");
|
if(this == ModItems.can_creature) {
|
||||||
}
|
list.add("Basically gasoline in a tin can");
|
||||||
if(this == ModItems.can_creature)
|
}
|
||||||
{
|
if(this == ModItems.can_redbomb) {
|
||||||
list.add("Basically gasoline in a tin can");
|
list.add("Liquefied explosives");
|
||||||
}
|
}
|
||||||
if(this == ModItems.can_redbomb)
|
if(this == ModItems.can_mrsugar) {
|
||||||
{
|
list.add("An intellectual drink, for the chosen ones!");
|
||||||
list.add("Liquefied explosives");
|
}
|
||||||
}
|
if(this == ModItems.can_overcharge) {
|
||||||
if(this == ModItems.can_mrsugar)
|
list.add("Possible side effects include heart attacks, seizures or zombification");
|
||||||
{
|
}
|
||||||
list.add("An intellectual drink, for the chosen ones!");
|
if(this == ModItems.can_luna) {
|
||||||
}
|
list.add("Contains actual selenium and star metal. Tastes like night.");
|
||||||
if(this == ModItems.can_overcharge)
|
}
|
||||||
{
|
if(this == ModItems.can_bepis) {
|
||||||
list.add("Possible side effects include heart attacks, seizures or zombification");
|
list.add("beppp");
|
||||||
}
|
}
|
||||||
if(this == ModItems.can_luna)
|
if(this == ModItems.can_breen) {
|
||||||
{
|
list.add("Don't drink the water. They put something in it, to make you forget.");
|
||||||
list.add("Contains actual selenium and star metal. Tastes like night.");
|
list.add("I don't even know how I got here.");
|
||||||
}
|
}
|
||||||
if(this == ModItems.can_bepis)
|
if(this == ModItems.chocolate_milk) {
|
||||||
{
|
list.add("Regular chocolate milk. Safe to drink.");
|
||||||
list.add("beppp");
|
list.add("Totally not made from nitroglycerine.");
|
||||||
}
|
}
|
||||||
if(this == ModItems.can_breen)
|
if(this == ModItems.bottle_nuka) {
|
||||||
{
|
list.add("Contains about 210 kcal and 1500 mSv.");
|
||||||
list.add("Don't drink the water. They put something in it, to make you forget.");
|
list.add("[Requires bottle opener]");
|
||||||
list.add("I don't even know how I got here.");
|
}
|
||||||
}
|
if(this == ModItems.bottle_cherry) {
|
||||||
if(this == ModItems.chocolate_milk)
|
list.add("Now with severe radiation poisoning in every seventh bottle!");
|
||||||
{
|
list.add("[Requires bottle opener]");
|
||||||
list.add("Regular chocolate milk. Safe to drink.");
|
}
|
||||||
list.add("Totally not made from nitroglycerine.");
|
if(this == ModItems.bottle_quantum) {
|
||||||
}
|
list.add("Comes with a colorful mix of over 70 isotopes!");
|
||||||
if(this == ModItems.bottle_nuka)
|
list.add("[Requires bottle opener]");
|
||||||
{
|
}
|
||||||
list.add("Contains about 210 kcal and 1500 mSv.");
|
if(this == ModItems.bottle2_korl) {
|
||||||
list.add("[Requires bottle opener]");
|
list.add("Contains actual orange juice!");
|
||||||
}
|
list.add("[Requires bottle opener]");
|
||||||
if(this == ModItems.bottle_cherry)
|
}
|
||||||
{
|
if(this == ModItems.bottle2_fritz) {
|
||||||
list.add("Now with severe radiation poisoning in every seventh bottle!");
|
list.add("moremore caffeine");
|
||||||
list.add("[Requires bottle opener]");
|
list.add("[Requires bottle opener]");
|
||||||
}
|
}
|
||||||
if(this == ModItems.bottle_quantum)
|
if(this == ModItems.bottle2_korl_special) {
|
||||||
{
|
if(MainRegistry.polaroidID == 11)
|
||||||
list.add("Comes with a colorful mix of over 70 isotopes!");
|
list.add("shgehgev u rguer");
|
||||||
list.add("[Requires bottle opener]");
|
else
|
||||||
}
|
list.add("Contains actual orange juice!");
|
||||||
if(this == ModItems.bottle2_korl)
|
list.add("[Requires bottle opener]");
|
||||||
{
|
}
|
||||||
list.add("Contains actual orange juice!");
|
if(this == ModItems.bottle2_fritz_special) {
|
||||||
list.add("[Requires bottle opener]");
|
if(MainRegistry.polaroidID == 11)
|
||||||
}
|
list.add("ygrogr fgrof bf");
|
||||||
if(this == ModItems.bottle2_fritz)
|
else
|
||||||
{
|
list.add("moremore caffeine");
|
||||||
list.add("moremore caffeine");
|
list.add("[Requires bottle opener]");
|
||||||
list.add("[Requires bottle opener]");
|
}
|
||||||
}
|
if(this == ModItems.bottle_sparkle) {
|
||||||
if(this == ModItems.bottle2_korl_special)
|
if(MainRegistry.polaroidID == 11)
|
||||||
{
|
list.add("Contains trace amounts of taint.");
|
||||||
if(MainRegistry.polaroidID == 11)
|
else
|
||||||
list.add("shgehgev u rguer");
|
list.add("The most delicious beverage in the wasteland!");
|
||||||
else
|
list.add("[Requires bottle opener]");
|
||||||
list.add("Contains actual orange juice!");
|
}
|
||||||
list.add("[Requires bottle opener]");
|
if(this == ModItems.bottle_sparkle) {
|
||||||
}
|
if(MainRegistry.polaroidID == 11)
|
||||||
if(this == ModItems.bottle2_fritz_special)
|
list.add("Now with 400% more radiation!");
|
||||||
{
|
else
|
||||||
if(MainRegistry.polaroidID == 11)
|
list.add("Tastes like radish and radiation.");
|
||||||
list.add("ygrogr fgrof bf");
|
list.add("[Requires bottle opener]");
|
||||||
else
|
}
|
||||||
list.add("moremore caffeine");
|
if(this == ModItems.bottle2_sunset) {
|
||||||
list.add("[Requires bottle opener]");
|
if(MainRegistry.polaroidID == 11) {
|
||||||
}
|
list.add("\"Authentic Sunset Juice\"");
|
||||||
if(this == ModItems.bottle_sparkle)
|
list.add("");
|
||||||
{
|
list.add("This smells like fish.");
|
||||||
if(MainRegistry.polaroidID == 11)
|
list.add("*sip*");
|
||||||
list.add("Contains trace amounts of taint.");
|
list.add("Yup, that's pretty disugsting.");
|
||||||
else
|
list.add("...");
|
||||||
list.add("The most delicious beverage in the wasteland!");
|
list.add("...");
|
||||||
list.add("[Requires bottle opener]");
|
list.add("*sip*");
|
||||||
}
|
} else {
|
||||||
if(this == ModItems.bottle_sparkle)
|
list.add("The eternal #2. Screw you, Bradberton!");
|
||||||
{
|
}
|
||||||
if(MainRegistry.polaroidID == 11)
|
list.add("[Requires bottle opener]");
|
||||||
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.List;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
|
import com.hbm.config.VersatileConfig;
|
||||||
import com.hbm.extprop.HbmLivingProps;
|
import com.hbm.extprop.HbmLivingProps;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.lib.ModDamageSource;
|
import com.hbm.lib.ModDamageSource;
|
||||||
@ -27,6 +28,9 @@ public class ItemPill extends ItemFood {
|
|||||||
@Override
|
@Override
|
||||||
protected void onFoodEaten(ItemStack stack, World world, EntityPlayer player) {
|
protected void onFoodEaten(ItemStack stack, World world, EntityPlayer player) {
|
||||||
if(!world.isRemote) {
|
if(!world.isRemote) {
|
||||||
|
|
||||||
|
VersatileConfig.applyPotionSickness(player, 5);
|
||||||
|
|
||||||
if(this == ModItems.pill_iodine) {
|
if(this == ModItems.pill_iodine) {
|
||||||
player.removePotionEffect(Potion.blindness.id);
|
player.removePotionEffect(Potion.blindness.id);
|
||||||
player.removePotionEffect(Potion.confusion.id);
|
player.removePotionEffect(Potion.confusion.id);
|
||||||
@ -96,7 +100,8 @@ public class ItemPill extends ItemFood {
|
|||||||
@Override
|
@Override
|
||||||
public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_) {
|
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_;
|
return p_77659_1_;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,6 +3,7 @@ package com.hbm.items.special;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
|
import com.hbm.config.VersatileConfig;
|
||||||
import com.hbm.handler.ArmorModHandler;
|
import com.hbm.handler.ArmorModHandler;
|
||||||
import com.hbm.interfaces.IPartiallyFillable;
|
import com.hbm.interfaces.IPartiallyFillable;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
@ -29,7 +30,7 @@ public class ItemSyringe extends Item {
|
|||||||
@Override
|
@Override
|
||||||
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
|
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) {
|
if(!world.isRemote) {
|
||||||
player.clearActivePotions();
|
player.clearActivePotions();
|
||||||
|
|
||||||
@ -43,10 +44,12 @@ public class ItemSyringe extends Item {
|
|||||||
if(!player.inventory.addItemStackToInventory(new ItemStack(ModItems.syringe_empty))) {
|
if(!player.inventory.addItemStackToInventory(new ItemStack(ModItems.syringe_empty))) {
|
||||||
player.dropPlayerItemWithRandomChoice(new ItemStack(ModItems.syringe_empty, 1, 0), false);
|
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) {
|
if(!world.isRemote) {
|
||||||
player.addPotionEffect(new PotionEffect(Potion.regeneration.id, 50 * 20, 9));
|
player.addPotionEffect(new PotionEffect(Potion.regeneration.id, 50 * 20, 9));
|
||||||
player.addPotionEffect(new PotionEffect(Potion.resistance.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))) {
|
if(!player.inventory.addItemStackToInventory(new ItemStack(ModItems.syringe_empty))) {
|
||||||
player.dropPlayerItemWithRandomChoice(new ItemStack(ModItems.syringe_empty, 1, 0), false);
|
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) {
|
if(!world.isRemote) {
|
||||||
player.heal(5);
|
player.heal(5);
|
||||||
|
|
||||||
@ -107,10 +112,12 @@ public class ItemSyringe extends Item {
|
|||||||
if(!player.inventory.addItemStackToInventory(new ItemStack(ModItems.syringe_metal_empty))) {
|
if(!player.inventory.addItemStackToInventory(new ItemStack(ModItems.syringe_metal_empty))) {
|
||||||
player.dropPlayerItemWithRandomChoice(new ItemStack(ModItems.syringe_metal_empty, 1, 0), false);
|
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) {
|
if(!world.isRemote) {
|
||||||
player.addPotionEffect(new PotionEffect(Potion.resistance.id, 4 * 60 * 20, 2));
|
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))) {
|
if(!player.inventory.addItemStackToInventory(new ItemStack(ModItems.syringe_metal_empty))) {
|
||||||
player.dropPlayerItemWithRandomChoice(new ItemStack(ModItems.syringe_metal_empty, 1, 0), false);
|
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) {
|
if(!world.isRemote) {
|
||||||
player.addPotionEffect(new PotionEffect(Potion.resistance.id, 2 * 60 * 20, 0));
|
player.addPotionEffect(new PotionEffect(Potion.resistance.id, 2 * 60 * 20, 0));
|
||||||
player.addPotionEffect(new PotionEffect(Potion.damageBoost.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))) {
|
if(!player.inventory.addItemStackToInventory(new ItemStack(ModItems.syringe_metal_empty))) {
|
||||||
player.dropPlayerItemWithRandomChoice(new ItemStack(ModItems.syringe_metal_empty, 1, 0), false);
|
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) {
|
if(!world.isRemote) {
|
||||||
player.heal(25);
|
player.heal(25);
|
||||||
player.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 10 * 20, 0));
|
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))) {
|
if(!player.inventory.addItemStackToInventory(new ItemStack(ModItems.syringe_metal_empty))) {
|
||||||
player.dropPlayerItemWithRandomChoice(new ItemStack(ModItems.syringe_metal_empty, 1, 0), false);
|
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) {
|
if(!world.isRemote) {
|
||||||
player.setHealth(player.getMaxHealth());
|
player.setHealth(player.getMaxHealth());
|
||||||
|
|
||||||
@ -176,6 +189,8 @@ public class ItemSyringe extends Item {
|
|||||||
player.removePotionEffect(Potion.weakness.id);
|
player.removePotionEffect(Potion.weakness.id);
|
||||||
player.removePotionEffect(Potion.wither.id);
|
player.removePotionEffect(Potion.wither.id);
|
||||||
player.removePotionEffect(HbmPotion.radiation.id);
|
player.removePotionEffect(HbmPotion.radiation.id);
|
||||||
|
|
||||||
|
VersatileConfig.applyPotionSickness(player, 15);
|
||||||
|
|
||||||
stack.stackSize--;
|
stack.stackSize--;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,7 +3,7 @@ package com.hbm.lib;
|
|||||||
public class RefStrings {
|
public class RefStrings {
|
||||||
public static final String MODID = "hbm";
|
public static final String MODID = "hbm";
|
||||||
public static final String NAME = "Hbm's Nuclear Tech Mod";
|
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:
|
//HBM's Beta Naming Convention:
|
||||||
//V T (X)
|
//V T (X)
|
||||||
//V -> next release version
|
//V -> next release version
|
||||||
|
|||||||
@ -215,6 +215,39 @@ public class ModEventHandlerClient {
|
|||||||
|
|
||||||
if(invis != null && invis.getAmplifier() > 0)
|
if(invis != null && invis.getAmplifier() > 0)
|
||||||
event.setCanceled(true);
|
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);
|
ResourceLocation cloak = RenderAccessoryUtility.getCloakFromPlayer(player);
|
||||||
|
|
||||||
|
|||||||
@ -34,6 +34,7 @@ public class HbmPotion extends Potion {
|
|||||||
public static HbmPotion telekinesis;
|
public static HbmPotion telekinesis;
|
||||||
public static HbmPotion phosphorus;
|
public static HbmPotion phosphorus;
|
||||||
public static HbmPotion stability;
|
public static HbmPotion stability;
|
||||||
|
public static HbmPotion potionsickness;
|
||||||
|
|
||||||
public HbmPotion(int id, boolean isBad, int color) {
|
public HbmPotion(int id, boolean isBad, int color) {
|
||||||
super(id, isBad, 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);
|
telekinesis = registerPotion(PotionConfig.telekinesisID, true, 0x00F3FF, "potion.hbm_telekinesis", 0, 1);
|
||||||
phosphorus = registerPotion(PotionConfig.phosphorusID, true, 0xFFFF00, "potion.hbm_phosphorus", 1, 1);
|
phosphorus = registerPotion(PotionConfig.phosphorusID, true, 0xFFFF00, "potion.hbm_phosphorus", 1, 1);
|
||||||
stability = registerPotion(PotionConfig.stabilityID, false, 0xD0D0D0, "potion.hbm_stability", 2, 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) {
|
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)
|
if(slots[i].stackSize <= 0)
|
||||||
slots[i] = null;
|
slots[i] = null;
|
||||||
|
|
||||||
chest.setInventorySlotContents(j, chest.getStackInSlot(j).copy());
|
chest.getStackInSlot(j).stackSize++;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -362,9 +362,7 @@ public class TileEntityMachineSatDock extends TileEntity implements ISidedInvent
|
|||||||
if(slots[i].stackSize <= 0)
|
if(slots[i].stackSize <= 0)
|
||||||
slots[i] = null;
|
slots[i] = null;
|
||||||
|
|
||||||
ItemStack copy = chest.getStackInSlot(j).copy();
|
chest.setInventorySlotContents(j, sta);
|
||||||
copy.stackSize = 1;
|
|
||||||
chest.setInventorySlotContents(j, copy);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
"modid": "hbm",
|
"modid": "hbm",
|
||||||
"name": "Hbm's Nuclear Tech",
|
"name": "Hbm's Nuclear Tech",
|
||||||
"description": "A mod that adds weapons, nuclear themed stuff and machines",
|
"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",
|
"mcversion": "1.7.10",
|
||||||
"url": "",
|
"url": "",
|
||||||
"updateUrl": "",
|
"updateUrl": "",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user