new sirens, star cap, meteor crash fix

This commit is contained in:
HbmMods 2018-10-09 10:05:11 +02:00
parent af94003986
commit 9b1683c1c8
16 changed files with 149 additions and 130 deletions

View File

@ -1637,6 +1637,7 @@ item.cap_sparkle.name=S~Cola Kronkorken
item.cap_korl.name=Korl Kronkorken
item.cap_fritz.name=Fritz-Kola Kronkorken
item.cap_sunset.name=Sunset Sarsaparilla Kronkorken
item.cap_star.name=Sunset Sarsaparilla Sternkronkorken
item.ring_pull.name=Dosenring
item.canteen_13.name=Vault 13 Kantine

View File

@ -1637,6 +1637,7 @@ item.cap_sparkle.name=S~Cola Bottle Cap
item.cap_korl.name=Korl Bottle Cap
item.cap_fritz.name=Fritz Cola Bottle Cap
item.cap_sunset.name=Sunset Sarsaparilla Bottle Cap
item.cap_star.name=Sunset Sarsaparilla Star Cap
item.ring_pull.name=Ring Pull
item.canteen_13.name=Vault 13 Canteen

View File

@ -119,5 +119,6 @@
"alarm.regularSiren": {"category": "record", "sounds": [{"name": "alarm/regularSiren", "stream": false}]},
"alarm.foKlaxonA": {"category": "record", "sounds": [{"name": "alarm/foKlaxonA", "stream": false}]},
"alarm.foKlaxonB": {"category": "record", "sounds": [{"name": "alarm/foKlaxonB", "stream": false}]},
"alarm.nostromoSiren": {"category": "record", "sounds": [{"name": "alarm/nostromoSiren", "stream": false}]}
"alarm.nostromoSiren": {"category": "record", "sounds": [{"name": "alarm/nostromoSiren", "stream": false}]},
"alarm.easAlarm": {"category": "record", "sounds": [{"name": "alarm/easAlarm", "stream": false}]}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 295 B

After

Width:  |  Height:  |  Size: 305 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 295 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 268 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 308 B

After

Width:  |  Height:  |  Size: 317 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 308 B

View File

@ -553,6 +553,7 @@ public class ModItems {
public static Item cap_korl;
public static Item cap_fritz;
public static Item cap_sunset;
public static Item cap_star;
public static Item ring_pull;
public static Item rod_empty;
@ -1837,6 +1838,7 @@ public class ModItems {
cap_korl = new Item().setUnlocalizedName("cap_korl").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":cap_korl");
cap_fritz = new Item().setUnlocalizedName("cap_fritz").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":cap_fritz");
cap_sunset = new Item().setUnlocalizedName("cap_sunset").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":cap_sunset");
cap_star = new Item().setUnlocalizedName("cap_star").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":cap_star");
ring_pull = new Item().setUnlocalizedName("ring_pull").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":ring_pull");
rod_empty = new Item().setUnlocalizedName("rod_empty").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":rod_empty");
@ -3737,6 +3739,7 @@ public class ModItems {
GameRegistry.registerItem(cap_korl, cap_korl.getUnlocalizedName());
GameRegistry.registerItem(cap_fritz, cap_fritz.getUnlocalizedName());
GameRegistry.registerItem(cap_sunset, cap_sunset.getUnlocalizedName());
GameRegistry.registerItem(cap_star, cap_star.getUnlocalizedName());
GameRegistry.registerItem(ring_pull, ring_pull.getUnlocalizedName());
//Chaos

View File

@ -19,197 +19,202 @@ import net.minecraft.world.World;
public class ItemEnergy extends Item {
@Override
public ItemStack onEaten(ItemStack p_77654_1_, World p_77654_2_, EntityPlayer p_77654_3_)
public ItemStack onEaten(ItemStack stack, World world, EntityPlayer player)
{
if (!p_77654_3_.capabilities.isCreativeMode)
if (!player.capabilities.isCreativeMode)
{
--p_77654_1_.stackSize;
--stack.stackSize;
}
if (!p_77654_2_.isRemote)
if (!world.isRemote)
{
if(this == ModItems.can_smart)
{
p_77654_3_.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 30 * 20, 1));
p_77654_3_.addPotionEffect(new PotionEffect(Potion.resistance.id, 30 * 20, 2));
p_77654_3_.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 30 * 20, 0));
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)
{
p_77654_3_.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 30 * 20, 0));
p_77654_3_.addPotionEffect(new PotionEffect(Potion.resistance.id, 30 * 20, 2));
p_77654_3_.addPotionEffect(new PotionEffect(Potion.regeneration.id, 30 * 20, 1));
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)
{
p_77654_3_.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 30 * 20, 0));
p_77654_3_.addPotionEffect(new PotionEffect(Potion.field_76444_x.id, 30 * 20, 2));
p_77654_3_.addPotionEffect(new PotionEffect(Potion.jump.id, 30 * 20, 1));
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)
{
p_77654_3_.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 30 * 20, 0));
p_77654_3_.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 30 * 20, 1));
p_77654_3_.addPotionEffect(new PotionEffect(Potion.jump.id, 30 * 20, 2));
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)
{
p_77654_3_.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 30 * 20, 1));
p_77654_3_.addPotionEffect(new PotionEffect(Potion.resistance.id, 30 * 20, 2));
p_77654_3_.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 30 * 20, 0));
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)
{
p_77654_3_.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 30 * 20, 1));
p_77654_3_.addPotionEffect(new PotionEffect(Potion.resistance.id, 30 * 20, 2));
p_77654_3_.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 30 * 20, 1));
p_77654_3_.addPotionEffect(new PotionEffect(Potion.regeneration.id, 30 * 20, 2));
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.chocolate_milk)
{
ExplosionLarge.explode(p_77654_2_, p_77654_3_.posX, p_77654_3_.posY, p_77654_3_.posZ, 50, true, false, false);
ExplosionLarge.explode(world, player.posX, player.posY, player.posZ, 50, true, false, false);
}
if(this == ModItems.bottle_nuka)
{
p_77654_3_.heal(4F);
p_77654_3_.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 30 * 20, 1));
p_77654_3_.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 30 * 20, 1));
player.heal(4F);
player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 30 * 20, 1));
player.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 30 * 20, 1));
}
if(this == ModItems.bottle_cherry)
{
p_77654_3_.heal(6F);
p_77654_3_.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 30 * 20, 0));
p_77654_3_.addPotionEffect(new PotionEffect(Potion.jump.id, 30 * 20, 2));
player.heal(6F);
player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 30 * 20, 0));
player.addPotionEffect(new PotionEffect(Potion.jump.id, 30 * 20, 2));
}
if(this == ModItems.bottle_quantum)
{
p_77654_3_.heal(10F);
p_77654_3_.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 30 * 20, 1));
p_77654_3_.addPotionEffect(new PotionEffect(Potion.resistance.id, 30 * 20, 2));
p_77654_3_.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 30 * 20, 1));
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));
}
if(this == ModItems.bottle2_korl)
{
p_77654_3_.heal(6);
p_77654_3_.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 30 * 20, 1));
p_77654_3_.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 30 * 20, 2));
p_77654_3_.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 30 * 20, 2));
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)
{
p_77654_3_.heal(6);
p_77654_3_.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 30 * 20, 1));
p_77654_3_.addPotionEffect(new PotionEffect(Potion.resistance.id, 30 * 20, 2));
p_77654_3_.addPotionEffect(new PotionEffect(Potion.jump.id, 30 * 20, 2));
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)
{
p_77654_3_.heal(16);
p_77654_3_.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 120 * 20, 1));
p_77654_3_.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 120 * 20, 2));
p_77654_3_.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 120 * 20, 2));
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)
{
p_77654_3_.heal(16);
p_77654_3_.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 120 * 20, 1));
p_77654_3_.addPotionEffect(new PotionEffect(Potion.resistance.id, 120 * 20, 2));
p_77654_3_.addPotionEffect(new PotionEffect(Potion.jump.id, 120 * 20, 2));
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)
{
p_77654_3_.heal(10F);
p_77654_3_.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 120 * 20, 1));
p_77654_3_.addPotionEffect(new PotionEffect(Potion.resistance.id, 120 * 20, 2));
p_77654_3_.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 120 * 20, 2));
p_77654_3_.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 120 * 20, 1));
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));
}
if(this == ModItems.bottle2_sunset)
{
p_77654_3_.heal(6);
p_77654_3_.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 60 * 20, 1));
p_77654_3_.addPotionEffect(new PotionEffect(Potion.resistance.id, 60 * 20, 2));
p_77654_3_.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 60 * 20, 2));
p_77654_3_.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 60 * 20, 2));
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 (!p_77654_3_.capabilities.isCreativeMode && this != ModItems.chocolate_milk)
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) {
p_77654_3_.inventory.addItemStackToInventory(new ItemStack(ModItems.ring_pull));
if (p_77654_1_.stackSize <= 0)
player.inventory.addItemStackToInventory(new ItemStack(ModItems.ring_pull));
if (stack.stackSize <= 0)
{
return new ItemStack(ModItems.can_empty);
}
p_77654_3_.inventory.addItemStackToInventory(new ItemStack(ModItems.can_empty));
player.inventory.addItemStackToInventory(new ItemStack(ModItems.can_empty));
}
if(this == ModItems.bottle_cherry || this == ModItems.bottle_nuka) {
p_77654_3_.inventory.addItemStackToInventory(new ItemStack(ModItems.cap_nuka));
if (p_77654_1_.stackSize <= 0)
player.inventory.addItemStackToInventory(new ItemStack(ModItems.cap_nuka));
if (stack.stackSize <= 0)
{
return new ItemStack(ModItems.bottle_empty);
}
p_77654_3_.inventory.addItemStackToInventory(new ItemStack(ModItems.bottle_empty));
player.inventory.addItemStackToInventory(new ItemStack(ModItems.bottle_empty));
}
if(this == ModItems.bottle_quantum) {
p_77654_3_.inventory.addItemStackToInventory(new ItemStack(ModItems.cap_quantum));
if (p_77654_1_.stackSize <= 0)
player.inventory.addItemStackToInventory(new ItemStack(ModItems.cap_quantum));
if (stack.stackSize <= 0)
{
return new ItemStack(ModItems.bottle_empty);
}
p_77654_3_.inventory.addItemStackToInventory(new ItemStack(ModItems.bottle_empty));
player.inventory.addItemStackToInventory(new ItemStack(ModItems.bottle_empty));
}
if(this == ModItems.bottle2_korl || this == ModItems.bottle2_korl_special) {
p_77654_3_.inventory.addItemStackToInventory(new ItemStack(ModItems.cap_korl));
if (p_77654_1_.stackSize <= 0)
player.inventory.addItemStackToInventory(new ItemStack(ModItems.cap_korl));
if (stack.stackSize <= 0)
{
return new ItemStack(ModItems.bottle2_empty);
}
p_77654_3_.inventory.addItemStackToInventory(new ItemStack(ModItems.bottle2_empty));
player.inventory.addItemStackToInventory(new ItemStack(ModItems.bottle2_empty));
}
if(this == ModItems.bottle2_fritz || this == ModItems.bottle2_fritz_special) {
p_77654_3_.inventory.addItemStackToInventory(new ItemStack(ModItems.cap_fritz));
if (p_77654_1_.stackSize <= 0)
player.inventory.addItemStackToInventory(new ItemStack(ModItems.cap_fritz));
if (stack.stackSize <= 0)
{
return new ItemStack(ModItems.bottle2_empty);
}
p_77654_3_.inventory.addItemStackToInventory(new ItemStack(ModItems.bottle2_empty));
player.inventory.addItemStackToInventory(new ItemStack(ModItems.bottle2_empty));
}
if(this == ModItems.bottle_sparkle) {
p_77654_3_.inventory.addItemStackToInventory(new ItemStack(ModItems.cap_sparkle));
if (p_77654_1_.stackSize <= 0)
player.inventory.addItemStackToInventory(new ItemStack(ModItems.cap_sparkle));
if (stack.stackSize <= 0)
{
return new ItemStack(ModItems.bottle_empty);
}
p_77654_3_.inventory.addItemStackToInventory(new ItemStack(ModItems.bottle_empty));
player.inventory.addItemStackToInventory(new ItemStack(ModItems.bottle_empty));
}
if(this == ModItems.bottle2_sunset) {
p_77654_3_.inventory.addItemStackToInventory(new ItemStack(ModItems.cap_sunset));
if (p_77654_1_.stackSize <= 0)
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);
}
p_77654_3_.inventory.addItemStackToInventory(new ItemStack(ModItems.bottle2_empty));
player.inventory.addItemStackToInventory(new ItemStack(ModItems.bottle2_empty));
}
}
return p_77654_1_;
return stack;
}
@Override

View File

@ -40,6 +40,7 @@ public class ItemCassette extends Item {
SWEEP_SIREN( "Sweep Siren", new ResourceLocation("hbm:alarm.sweepSiren"), SoundType.LOOP, 15592026, 500),
STRIDER_SIREN( "Missile Silo Siren", new ResourceLocation("hbm:alarm.striderSiren"), SoundType.LOOP, 11250586, 500),
NOSTROMO_SIREN( "Nostromo Self Destruct", new ResourceLocation("hbm:alarm.nostromoSiren"), SoundType.LOOP, 0x5dd800, 100),
EAS_ALARM( "EAS Alarm Screech", new ResourceLocation("hbm:alarm.easAlarm"), SoundType.LOOP, 0xb3a8c1, 50),
APC_PASS( "APC Pass", new ResourceLocation("hbm:alarm.apcPass"), SoundType.PASS, 3422163, 50),
RAZORTRAIN( "Razortrain Horn", new ResourceLocation("hbm:alarm.razortrainHorn"), SoundType.SOUND, 7819501, 250);

View File

@ -710,10 +710,11 @@ public class Meteorite {
public List<ItemStack> getRandomOre(Random rand) {
List<ItemStack> ores = new ArrayList<ItemStack>();
try {
String[] names = OreDictionary.getOreNames();
for(int i = 0; i < names.length; i++) {
if(names[i].length() > 3 && names[i].substring(0, 3).equals("ore")) {
if(names[i] != null && names[i].length() > 3 && names[i].substring(0, 3).equals("ore")) {
List<ItemStack> ota = OreDictionary.getOres(names[i]);
for(int j = 0; j < ota.size(); j++) {
@ -760,6 +761,12 @@ public class Meteorite {
} else {
return ores;
}
} catch(Exception ex) {
MainRegistry.logger.error("Critical error in meteor creation, falling back to iron ore...");
ores.clear();
ores.add(new ItemStack(Blocks.iron_ore, 1).copy());
return ores;
}
}
}