more armor mods!

This commit is contained in:
Bob 2021-01-26 23:47:52 +01:00
parent 470217d939
commit 956a7bb106
26 changed files with 421 additions and 10 deletions

View File

@ -592,6 +592,9 @@ item.balefire_and_ham.name=Ham and Balefire-Eggs
item.balefire_and_steel.name=Balefire-Zeug
item.balefire_scrambled.name=Rühr-Balefire-Ei
item.ballistite.name=Ballistit
item.bandaid.name=Samtenes Pflaster
item.bathwater.name=Toxisches Seifenwasser
item.bathwater_mk2.name=Toxisches Seifenwasser (Pferdearoma)
item.battery_advanced.name=Fortgeschrittene Batterie
item.battery_advanced_cell.name=Fortgeschrittene Energiezelle
item.battery_advanced_cell_12.name=Zwölffache fortgeschrittene Energiezelle
@ -1205,12 +1208,14 @@ item.hev_boots.name=HEV Mark IV Stiefel
item.hev_plate.name=HEV Mark IV Brustpanzer
item.hev_helmet.name=HEV Mark IV Helm
item.hev_legs.name=HEV Mark IV Beinschutz
item.horseshoe_magnet.name=Hufeisenmagnet
item.hull_big_aluminium.name=Große Aluminiumhülle
item.hull_big_steel.name=Große Stahlhülle
item.hull_big_titanium.name=Große Titanhülle
item.hull_small_aluminium.name=Kleine Aluminiumhülle
item.hull_small_steel.name=Kleine Stahlhülle
item.igniter.name=Zünder
item.industrial_magnet.name=Industriemagnet
item.inf_antimatter.name=Unendlicher Antimaterietank
item.inf_antischrabidium.name=Unendlicher Antischrabidiumtank
item.inf_coolant.name=Unendlicher Kühlflüssigkeitstank
@ -1301,6 +1306,7 @@ item.lignite.name=Braunkohle
item.limiter.name=Generator-Limiter
item.linker.name=Telelinker
item.lithium.name=Lithiumwürfel
item.lodestone.name=Magneteisenstein
item.loop_stew.name=Informatiker-Frühstück
item.loops.name=Lüüps
item.loot_10.name=Größe 10 Raketen-Lootbox
@ -1391,6 +1397,7 @@ item.missile_soyuz.name=Soyuz-FG
item.missile_soyuz_lander.name=Orbitalmodul
item.missile_strong.name=Starke HE Rakete
item.missile_taint.name=Verdorbene Rakete
item.morning_glory.name=Zaunwinde
item.motor.name=Motor
item.motor_desh.name=Desh-Motor
item.mp_c_1.name=Stufe 1 Zielsucher-Schaltkreis
@ -1745,6 +1752,7 @@ item.primer_9.name=Kleinkaliber-Zündhütchen (x32)
item.primer_buckshot.name=Schrot-Zündhütchen (x12)
item.prototype_kit.name=Prototyp Kit
item.pudding.name=Pudding
item.quartz_plutonium.name=Plutonisches Quarz
item.radaway.name=RadAway
item.radaway_flush.name=Elite-RadAway
item.radaway_strong.name=Starkes RadAway
@ -1913,6 +1921,7 @@ item.security_plate.name=Sicherheitsbrustpanzer
item.seg_10.name=Größe 10 Bindeglied
item.seg_15.name=Größe 15 Bindeglied
item.seg_20.name=Größe 20 Bindeglied
item.serum.name=Serum
item.servo_set.name=Servo-Set
item.servo_set_desh.name=Deshservo-Set
item.shimmer_axe.name=Shimmer Axe
@ -1934,6 +1943,7 @@ item.solinium_propellant.name=SOL-Verdichtungsladung
item.sopsign.name=Sopschild-Streitaxt
item.spawn_worm.name=Balls-O-Tron Prime
item.sphere_steel.name=Stahlhohlkugel
item.spider_milk.name=Spinnenmilch
item.spongebob_macaroni.name=Spongebob Macaroni
item.stamp_357.name=.357 Magnum-Stempel
item.stamp_44.name=.44 Magnum-Stempel

View File

@ -592,6 +592,9 @@ item.balefire_and_ham.name=Ham and Balefire Eggs
item.balefire_and_steel.name=Balefire and Steel
item.balefire_scrambled.name=Scrambled Balefire Egg
item.ballistite.name=Ballistite
item.bandaid.name=Velvet Band-Aid
item.bathwater.name=Toxic Soapy Water
item.bathwater_mk2.name=Toxic Soapy Water (Horse Scented)
item.battery_advanced.name=Advanced Battery
item.battery_advanced_cell.name=Advanced Power Cell
item.battery_advanced_cell_12.name=Twelvefold Advanced Power Cell
@ -1205,12 +1208,14 @@ item.hev_boots.name=HEV Mark IV Boots
item.hev_plate.name=HEV Mark IV Chestplate
item.hev_helmet.name=HEV Mark IV Helmet
item.hev_legs.name=HEV Mark IV Leggings
item.horseshoe_magnet.name=Horseshoe Magnet
item.hull_big_aluminium.name=Big Aluminium Shell
item.hull_big_steel.name=Big Steel Shell
item.hull_big_titanium.name=Big Titanium Shell
item.hull_small_aluminium.name=Small Aluminium Shell
item.hull_small_steel.name=Small Steel Shell
item.igniter.name=Igniter
item.industrial_magnet.name=Industrial Magnet
item.inf_antimatter.name=Infinite Antimatter Tank
item.inf_antischrabidium.name=Infinite Antischrabidium Tank
item.inf_coolant.name=Infinite Coolant Tank
@ -1301,6 +1306,7 @@ item.lignite.name=Lignite
item.limiter.name=Generator Limiter
item.linker.name=Telelinker
item.lithium.name=Lithium Cube
item.lodestone.name=Lodestone
item.loop_stew.name=IT Breakfast
item.loops.name=Lööps
item.loot_10.name=Size 10 Missile Loot Crate
@ -1391,6 +1397,7 @@ item.missile_soyuz.name=Soyuz-FG
item.missile_soyuz_lander.name=Orbital Module
item.missile_strong.name=Strong HE Missile
item.missile_taint.name=Taint-Tipped Missile
item.morning_glory.name=Morning Glory
item.motor.name=Motor
item.motor_desh.name=Desh Motor
item.mp_c_1.name=Tier 1 Missile Targeting Circuit
@ -1745,6 +1752,7 @@ item.primer_9.name=Small Caliber Primer (x32)
item.primer_buckshot.name=Buckshot Primer (x12)
item.prototype_kit.name=Prototype Kit
item.pudding.name=Pudding
item.quartz_plutonium.name=Plutonic Quartz
item.radaway.name=RadAway
item.radaway_flush.name=Elite RadAway
item.radaway_strong.name=Strong RadAway
@ -1913,6 +1921,7 @@ item.security_plate.name=Security Chestplate
item.seg_10.name=Size 10 Connector
item.seg_15.name=Size 15 Connector
item.seg_20.name=Size 20 Connector
item.serum.name=Serum
item.servo_set.name=Servo Set
item.servo_set_desh.name=Desh Servo Set
item.shimmer_axe.name=Shimmer Axe
@ -1934,6 +1943,7 @@ item.solinium_propellant.name=SOL Compression Charge
item.sopsign.name=Sop Sign Battle Axe
item.spawn_worm.name=Balls-O-Tron Prime
item.sphere_steel.name=Steel Sphere
item.spider_milk.name=Bottle of Spider Milk
item.spongebob_macaroni.name=Spongebob Macaroni
item.stamp_357.name=.357 Magnum Stamp
item.stamp_44.name=.44 Magnum Stamp

Binary file not shown.

After

Width:  |  Height:  |  Size: 307 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 398 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 391 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 258 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 321 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 275 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 341 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 371 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 385 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

View File

@ -147,6 +147,10 @@ public class ConsumableRecipes {
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.pads_slime, 1), new Object[] { "SPS", "DSD", "SPS", 'S', "slimeball", 'P', ModItems.pads_rubber, 'D', ModItems.ducttape }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.pads_static, 1), new Object[] { "CDC", "ISI", "CDC", 'C', "plateCopper", 'D', ModItems.ducttape, 'I', ModItems.plate_polymer, 'S', ModItems.pads_slime }));
//Special Mods
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.horseshoe_magnet, 1), new Object[] { "L L", "I I", "ILI", 'L', ModItems.lodestone, 'I', "ingotIron" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.industrial_magnet, 1), new Object[] { "SMS", " B ", "SMS", 'S', "ingotSteel", 'M', ModItems.horseshoe_magnet, 'B', ModBlocks.fusion_conductor }));
//Stealth boy
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.stealth_boy, 1), new Object[] { " B", "LI", "LC", 'B', Item.getItemFromBlock(Blocks.stone_button), 'L', Items.leather, 'I', "ingotSteel", 'C', ModItems.circuit_red_copper }));
}

View File

@ -1809,6 +1809,16 @@ public class ModItems {
public static Item insert_xsapi;
public static Item insert_steel;
public static Item armor_polish;
public static Item bandaid;
public static Item serum;
public static Item quartz_plutonium;
public static Item morning_glory;
public static Item lodestone;
public static Item horseshoe_magnet;
public static Item industrial_magnet;
public static Item bathwater;
public static Item bathwater_mk2;
public static Item spider_milk;
public static Item hazmat_helmet;
public static Item hazmat_plate;
@ -2710,6 +2720,16 @@ public class ModItems {
insert_xsapi = new ItemModInsert(0.9F, 0.75F, 1F).setUnlocalizedName("insert_xsapi").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":insert_xsapi");
insert_steel = new ItemModInsert(1F, 0.95F, 0.75F).setUnlocalizedName("insert_steel").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":insert_steel");
armor_polish = new ItemModPolish().setUnlocalizedName("armor_polish").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":armor_polish");
bandaid = new ItemModBandaid().setUnlocalizedName("bandaid").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":bandaid");
serum = new ItemModSerum().setUnlocalizedName("serum").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":serum");
quartz_plutonium = new ItemModQuartz().setUnlocalizedName("quartz_plutonium").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":quartz_plutonium");
morning_glory = new ItemModMorningGlory().setUnlocalizedName("morning_glory").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":morning_glory");
lodestone = new ItemModLodestone(5).setUnlocalizedName("lodestone").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":lodestone");
horseshoe_magnet = new ItemModLodestone(8).setUnlocalizedName("horseshoe_magnet").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":horseshoe_magnet");
industrial_magnet = new ItemModLodestone(12).setUnlocalizedName("industrial_magnet").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":industrial_magnet");
bathwater = new ItemModBathwater().setUnlocalizedName("bathwater").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":bathwater");
bathwater_mk2 = new ItemModBathwater().setUnlocalizedName("bathwater_mk2").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":bathwater_mk2");
spider_milk = new ItemModMilk().setUnlocalizedName("spider_milk").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":spider_milk");
can_empty = new Item().setUnlocalizedName("can_empty").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":can_empty");
can_smart = new ItemEnergy().setUnlocalizedName("can_smart").setContainerItem(ModItems.can_empty).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":can_smart");
@ -6133,6 +6153,16 @@ public class ModItems {
GameRegistry.registerItem(insert_xsapi, insert_xsapi.getUnlocalizedName());
GameRegistry.registerItem(insert_steel, insert_steel.getUnlocalizedName());
GameRegistry.registerItem(armor_polish, armor_polish.getUnlocalizedName());
GameRegistry.registerItem(bandaid, bandaid.getUnlocalizedName());
GameRegistry.registerItem(serum, serum.getUnlocalizedName());
GameRegistry.registerItem(quartz_plutonium, quartz_plutonium.getUnlocalizedName());
GameRegistry.registerItem(morning_glory, morning_glory.getUnlocalizedName());
GameRegistry.registerItem(lodestone, lodestone.getUnlocalizedName());
GameRegistry.registerItem(horseshoe_magnet, horseshoe_magnet.getUnlocalizedName());
GameRegistry.registerItem(industrial_magnet, industrial_magnet.getUnlocalizedName());
GameRegistry.registerItem(bathwater, bathwater.getUnlocalizedName());
GameRegistry.registerItem(bathwater_mk2, bathwater_mk2.getUnlocalizedName());
GameRegistry.registerItem(spider_milk, spider_milk.getUnlocalizedName());
//The Gadget
GameRegistry.registerItem(gadget_explosive, gadget_explosive.getUnlocalizedName());

View File

@ -0,0 +1,39 @@
package com.hbm.items.armor;
import java.util.List;
import com.hbm.handler.ArmorModHandler;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import net.minecraftforge.event.entity.living.LivingHurtEvent;
public class ItemModBandaid extends ItemArmorMod {
public ItemModBandaid() {
super(ArmorModHandler.extra, true, true, true, true);
}
@Override
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
list.add(EnumChatFormatting.RED + "3% chance for full heal when damaged");
list.add("");
super.addInformation(itemstack, player, list, bool);
}
@Override
public void addDesc(List list, ItemStack stack, ItemStack armor) {
list.add(EnumChatFormatting.RED + " " + stack.getDisplayName() + " (3% chance for full heal)");
}
@Override
public void modDamage(LivingHurtEvent event, ItemStack armor) {
if(event.entity.worldObj.rand.nextInt(100) < 3) {
event.ammount = 0;
event.entityLiving.heal(event.entityLiving.getMaxHealth());
}
}
}

View File

@ -0,0 +1,68 @@
package com.hbm.items.armor;
import java.util.List;
import com.hbm.handler.ArmorModHandler;
import com.hbm.items.ModItems;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.EntityDamageSource;
import net.minecraft.util.EnumChatFormatting;
import net.minecraftforge.event.entity.living.LivingHurtEvent;
public class ItemModBathwater extends ItemArmorMod {
public ItemModBathwater() {
super(ArmorModHandler.extra, true, true, true, true);
}
@Override
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
String color = "" + (System.currentTimeMillis() % 1000 < 500 ? EnumChatFormatting.BLUE : EnumChatFormatting.LIGHT_PURPLE);
if(this == ModItems.bathwater_mk2)
color = "" + (System.currentTimeMillis() % 1000 < 500 ? EnumChatFormatting.GREEN : EnumChatFormatting.YELLOW);
list.add(color + "Inflicts poison on the attacker");
list.add("");
super.addInformation(itemstack, player, list, bool);
}
@Override
public void addDesc(List list, ItemStack stack, ItemStack armor) {
String color = "" + (System.currentTimeMillis() % 1000 < 500 ? EnumChatFormatting.BLUE : EnumChatFormatting.LIGHT_PURPLE);
if(this == ModItems.bathwater_mk2)
color = "" + (System.currentTimeMillis() % 1000 < 500 ? EnumChatFormatting.GREEN : EnumChatFormatting.YELLOW);
list.add(color + " " + stack.getDisplayName() + " (Poisons attackers)");
}
@Override
public void modDamage(LivingHurtEvent event, ItemStack armor) {
if(!event.entityLiving.worldObj.isRemote) {
if(event.source instanceof EntityDamageSource) {
Entity attacker = ((EntityDamageSource)event.source).getEntity();
if(attacker instanceof EntityLivingBase) {
if(this == ModItems.bathwater)
((EntityLivingBase)attacker).addPotionEffect(new PotionEffect(Potion.poison.id, 200, 2));
if(this == ModItems.bathwater_mk2)
((EntityLivingBase)attacker).addPotionEffect(new PotionEffect(Potion.wither.id, 200, 4));
}
}
}
}
}

View File

@ -0,0 +1,55 @@
package com.hbm.items.armor;
import java.util.List;
import com.hbm.handler.ArmorModHandler;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.Vec3;
public class ItemModLodestone extends ItemArmorMod {
int range;
public ItemModLodestone(int range) {
super(ArmorModHandler.extra, true, true, true, true);
this.range = range;
}
@Override
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
list.add(EnumChatFormatting.DARK_GRAY + "Attracts nearby items");
list.add(EnumChatFormatting.DARK_GRAY + "Item attraction range: " + range);
list.add("");
super.addInformation(itemstack, player, list, bool);
}
@Override
public void addDesc(List list, ItemStack stack, ItemStack armor) {
list.add(EnumChatFormatting.DARK_GRAY + " " + stack.getDisplayName() + " (Magnetic range: " + range + ")");
}
@Override
public void modUpdate(EntityLivingBase entity, ItemStack armor) {
List<EntityItem> items = entity.worldObj.getEntitiesWithinAABB(EntityItem.class, entity.boundingBox.expand(range, range, range));
for(EntityItem item : items) {
Vec3 vec = Vec3.createVectorHelper(entity.posX - item.posX, entity.posY - item.posY, entity.posZ - item.posZ);
vec = vec.normalize();
item.motionX += vec.xCoord * 0.05;
item.motionY += vec.yCoord * 0.05;
item.motionZ += vec.zCoord * 0.05;
if(vec.yCoord > 0 && item.motionY < 0.04)
item.motionY += 0.2;
}
}
}

View File

@ -0,0 +1,56 @@
package com.hbm.items.armor;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import com.hbm.handler.ArmorModHandler;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.EnumChatFormatting;
public class ItemModMilk extends ItemArmorMod {
public ItemModMilk() {
super(ArmorModHandler.extra, true, true, true, true);
}
@Override
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
list.add(EnumChatFormatting.WHITE + "Removes bad potion effects");
list.add("");
super.addInformation(itemstack, player, list, bool);
}
@Override
public void addDesc(List list, ItemStack stack, ItemStack armor) {
list.add(EnumChatFormatting.WHITE + " " + stack.getDisplayName() + " (Removes bad potion effects)");
}
@Override
public void modUpdate(EntityLivingBase entity, ItemStack armor) {
List<Integer> ints = new ArrayList();
Iterator iterator = ((Collection) entity.getActivePotionEffects()).iterator();
while(iterator.hasNext()) {
PotionEffect eff = (PotionEffect) iterator.next();
if(Potion.potionTypes[eff.getPotionID()].isBadEffect()) {
ints.add(eff.getPotionID());
}
}
for(Integer i : ints) {
entity.removePotionEffect(i);
}
}
}

View File

@ -0,0 +1,49 @@
package com.hbm.items.armor;
import java.util.List;
import com.hbm.handler.ArmorModHandler;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.EnumChatFormatting;
import net.minecraftforge.event.entity.living.LivingHurtEvent;
public class ItemModMorningGlory extends ItemArmorMod {
public ItemModMorningGlory() {
super(ArmorModHandler.extra, true, true, true, true);
}
@Override
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
list.add(EnumChatFormatting.LIGHT_PURPLE + "5% chance to apply resistance when hit, wither immunity");
list.add("");
super.addInformation(itemstack, player, list, bool);
}
@Override
public void addDesc(List list, ItemStack stack, ItemStack armor) {
list.add(EnumChatFormatting.LIGHT_PURPLE + " " + stack.getDisplayName() + " (5% for resistance, wither immunity)");
}
@Override
public void modDamage(LivingHurtEvent event, ItemStack armor) {
if(!event.entity.worldObj.isRemote && event.entity.worldObj.rand.nextInt(20) == 0) {
event.entityLiving.addPotionEffect(new PotionEffect(Potion.resistance.id, 100, 4));
}
}
@Override
public void modUpdate(EntityLivingBase entity, ItemStack armor) {
if(!entity.worldObj.isRemote && entity.isPotionActive(Potion.wither.id)) {
entity.removePotionEffect(Potion.wither.id);
}
}
}

View File

@ -60,7 +60,13 @@ public class ItemModPads extends ItemArmorMod {
ArmorFSBPowered powered = (ArmorFSBPowered) stack.getItem();
powered.chargeBattery(stack, Math.max(powered.drain / 2, powered.consumption / 40));
long charge = powered.drain / 2;
if(charge == 0)
charge = powered.consumption / 40;
long power = Math.min(powered.maxPower, powered.getCharge(stack) + charge);
powered.setCharge(stack, power);
}
}
}

View File

@ -14,7 +14,7 @@ public class ItemModPolish extends ItemArmorMod {
public ItemModPolish() {
super(ArmorModHandler.extra, true, true, true, true);
}
@Override
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
@ -34,5 +34,4 @@ public class ItemModPolish extends ItemArmorMod {
if(event.entity.worldObj.rand.nextInt(20) == 0)
event.ammount = 0;
}
}

View File

@ -0,0 +1,41 @@
package com.hbm.items.armor;
import java.util.List;
import com.hbm.extprop.HbmLivingProps;
import com.hbm.handler.ArmorModHandler;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import net.minecraftforge.event.entity.living.LivingHurtEvent;
public class ItemModQuartz extends ItemArmorMod {
public ItemModQuartz() {
super(ArmorModHandler.extra, true, true, true, true);
}
@Override
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
list.add(EnumChatFormatting.DARK_GRAY + "Taking damage removes 10 RAD");
list.add("");
super.addInformation(itemstack, player, list, bool);
}
@Override
public void addDesc(List list, ItemStack stack, ItemStack armor) {
list.add(EnumChatFormatting.DARK_GRAY + " " + stack.getDisplayName() + " (-10 RAD when hit)");
}
@Override
public void modDamage(LivingHurtEvent event, ItemStack armor) {
if(!event.entityLiving.worldObj.isRemote) {
float rad = HbmLivingProps.getRadiation(event.entityLiving);
rad = Math.max(rad - 10, 0);
HbmLivingProps.setRadiation(event.entityLiving, rad);
}
}
}

View File

@ -0,0 +1,41 @@
package com.hbm.items.armor;
import java.util.List;
import com.hbm.handler.ArmorModHandler;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.EnumChatFormatting;
public class ItemModSerum extends ItemArmorMod {
public ItemModSerum() {
super(ArmorModHandler.extra, true, true, true, true);
}
@Override
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
list.add(EnumChatFormatting.GREEN + "Cures poison and gives strength");
list.add("");
super.addInformation(itemstack, player, list, bool);
}
@Override
public void addDesc(List list, ItemStack stack, ItemStack armor) {
list.add(EnumChatFormatting.BLUE + " " + stack.getDisplayName() + " (replaces poison with strength)");
}
@Override
public void modUpdate(EntityLivingBase entity, ItemStack armor) {
if(!entity.worldObj.isRemote && entity.isPotionActive(Potion.poison.id)) {
entity.removePotionEffect(Potion.poison.id);
entity.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 100, 4));
}
}
}

View File

@ -4,6 +4,7 @@ import java.util.List;
import com.hbm.lib.Library;
import com.hbm.main.MainRegistry;
import com.hbm.world.dungeon.Spaceship;
import com.hbm.world.generator.CellularDungeonFactory;
import net.minecraft.entity.player.EntityPlayer;
@ -18,7 +19,7 @@ public class ItemWandD extends Item {
@Override
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
if(!world.isRemote)
if(world.isRemote)
return stack;
MovingObjectPosition pos = Library.rayTrace(player, 500, 1);
@ -29,13 +30,15 @@ public class ItemWandD extends Item {
int z = pos.blockZ;
int y = world.getHeightValue(x, z);
NBTTagCompound data = new NBTTagCompound();
/*NBTTagCompound data = new NBTTagCompound();
data.setString("type", "rift");
data.setDouble("posX", x);
data.setDouble("posY", y + 1);
data.setDouble("posZ", z);
MainRegistry.proxy.effectNT(data);
MainRegistry.proxy.effectNT(data);*/
new Spaceship().generate_r0(world, world.rand, x - 4, y, z - 8);
//new Ruin001().generate_r0(world, world.rand, x, y - 8, z);

View File

@ -628,8 +628,8 @@ public class CraftingManager {
GameRegistry.addShapelessRecipe(new ItemStack(ModBlocks.waste_trinitite), new Object[] { new ItemStack(Blocks.sand, 1, 0), ModItems.trinitite });
GameRegistry.addShapelessRecipe(new ItemStack(ModBlocks.waste_trinitite_red), new Object[] { new ItemStack(Blocks.sand, 1, 1), ModItems.trinitite });
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModBlocks.sand_uranium), new Object[] { "sand", "sand", "sand", "sand", "sand", "sand", "sand", "sand", "dustUranium" }));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModBlocks.sand_polonium), new Object[] { "sand", "sand", "sand", "sand", "sand", "sand", "sand", "sand", "dustPolonium" }));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModBlocks.sand_uranium, 8), new Object[] { "sand", "sand", "sand", "sand", "sand", "sand", "sand", "sand", "dustUranium" }));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModBlocks.sand_polonium, 8), new Object[] { "sand", "sand", "sand", "sand", "sand", "sand", "sand", "sand", "dustPolonium" }));
GameRegistry.addRecipe(new ItemStack(ModItems.rune_blank, 1), new Object[] { "PSP", "SDS", "PSP", 'P', ModItems.powder_magic, 'S', ModItems.ingot_starmetal, 'D', ModItems.dynosphere_dineutronium_charged });
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.rune_isa, 1), new Object[] { ModItems.rune_blank, ModItems.powder_spark_mix, ModItems.singularity_counter_resonant });

View File

@ -495,10 +495,10 @@ public class Spaceship extends WorldGenerator
world.setBlock(x + 2, y + -2, z + 27, Blocks.air, 0, 3);
world.setBlock(x + 3, y + -2, z + 27, Block3, 0, 3);
world.setBlock(x + 4, y + -2, z + 27, Block3, 0, 3);
world.setBlock(x + 5, y + -2, z + 27, ModBlocks.machine_reactor, 3, 3);
world.setBlock(x + 5, y + -2, z + 27, ModBlocks.fusion_conductor);
world.setBlock(x + 6, y + -2, z + 27, Blocks.air, 0, 3);
world.setBlock(x + 7, y + -2, z + 27, Blocks.air, 0, 3);
world.setBlock(x + 8, y + -2, z + 27, ModBlocks.machine_reactor, 4, 3);
world.setBlock(x + 8, y + -2, z + 27, ModBlocks.fusion_conductor);
world.setBlock(x + 9, y + -2, z + 27, Block3, 0, 3);
world.setBlock(x + 10, y + -2, z + 27, Block3, 0, 3);
world.setBlock(x + 11, y + -2, z + 27, Blocks.air, 0, 3);