mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
Grenade with cats
This commit is contained in:
parent
b736b64f7f
commit
a99dc0a464
@ -1,3 +1,4 @@
|
||||
## Added
|
||||
* Sliding Blast Door from 1.12.2
|
||||
* Night Vision Goggles armor upgrade
|
||||
* Grenade of Cats
|
||||
@ -2,6 +2,7 @@ package com.hbm.crafting;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.inventory.OreDictManager;
|
||||
import com.hbm.inventory.RecipesCommon;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
|
||||
import static com.hbm.inventory.OreDictManager.*;
|
||||
@ -16,6 +17,7 @@ import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
/**
|
||||
* For guns, ammo and the like
|
||||
@ -345,7 +347,8 @@ public class WeaponRecipes {
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.grenade_pink_cloud), new Object[] { " S ", "ECE", " E ", 'S', ModItems.powder_spark_mix, 'E', ModItems.powder_magic, 'C', ModItems.grenade_cloud });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.nuclear_waste_pearl), new Object[] { "WWW", "WFW", "WWW", 'W', ModItems.nuclear_waste_tiny, 'F', ModBlocks.block_fallout });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.grenade_kyiv), new Object[] { ModItems.canister_napalm, ModItems.bottle2_empty, ModItems.rag });
|
||||
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.grenate_cats), "FFF", "FGF", "FFF", 'F', new ItemStack(Items.fish, 1, OreDictionary.WILDCARD_VALUE), 'G', ModItems.grenade_smart);
|
||||
|
||||
//Sticks of explosives
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.stick_dynamite, 4), new Object[] { " S ", "PDP", "PDP", 'S', ModItems.safety_fuse, 'P', Items.paper, 'D', ModItems.ball_dynamite });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.stick_dynamite_fishing, 1), new Object[] { ModItems.stick_dynamite, ModItems.stick_dynamite, ModItems.stick_dynamite, Items.paper, ANY_TAR.any() });
|
||||
|
||||
@ -142,6 +142,7 @@ public class EntityMappings {
|
||||
addEntity(EntityGrenadeMIRV.class, "entity_grenade_mirv", 250);
|
||||
addEntity(EntityGrenadeBreach.class, "entity_grenade_breach", 250);
|
||||
addEntity(EntityGrenadeBurst.class, "entity_grenade_burst", 250);
|
||||
addEntity(EntityGrenadeCats.class, "entity_grenade_cats", 250);
|
||||
addEntity(EntityBurningFOEQ.class, "entity_burning_foeq", 1000);
|
||||
addEntity(EntityGrenadeIFGeneric.class, "entity_grenade_ironshod", 250);
|
||||
addEntity(EntityGrenadeIFHE.class, "entity_grenade_ironshod_he", 250);
|
||||
|
||||
50
src/main/java/com/hbm/entity/grenade/EntityGrenadeCats.java
Normal file
50
src/main/java/com/hbm/entity/grenade/EntityGrenadeCats.java
Normal file
@ -0,0 +1,50 @@
|
||||
package com.hbm.entity.grenade;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.weapon.ItemGrenade;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.passive.EntityOcelot;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityGrenadeCats extends EntityGrenadeBouncyBase {
|
||||
|
||||
public EntityGrenadeCats(World world) {
|
||||
super(world);
|
||||
}
|
||||
|
||||
public EntityGrenadeCats(World world, EntityLivingBase living) {
|
||||
super(world, living);
|
||||
}
|
||||
|
||||
public EntityGrenadeCats(World world, double posX, double posY, double posZ) {
|
||||
super(world, posX, posY, posZ);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void explode() {
|
||||
if (!this.worldObj.isRemote) {
|
||||
this.setDead();
|
||||
|
||||
for(int i = 0; i < 5; i++) {
|
||||
EntityOcelot cat = new EntityOcelot(worldObj);
|
||||
cat.setPosition(posX, posY, posZ);
|
||||
cat.motionX = rand.nextGaussian() * 0.1D;
|
||||
cat.motionY = -0.25D;
|
||||
cat.motionZ = rand.nextGaussian() * 0.1D;
|
||||
|
||||
worldObj.spawnEntityInWorld(cat);
|
||||
cat.onSpawnWithEgg(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getMaxTimer() {
|
||||
return ItemGrenade.getFuseTicks(ModItems.grenate_cats);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected double getBounceMod() {
|
||||
return 0.25D;
|
||||
}
|
||||
}
|
||||
@ -1673,7 +1673,8 @@ public class ModItems {
|
||||
public static Item grenade_mirv;
|
||||
public static Item grenade_breach;
|
||||
public static Item grenade_burst;
|
||||
|
||||
public static Item grenate_cats;
|
||||
|
||||
public static Item nuclear_waste_pearl;
|
||||
|
||||
public static Item weaponized_starblaster_cell;
|
||||
@ -4289,6 +4290,7 @@ public class ModItems {
|
||||
grenade_mirv = new ItemGrenade(1).setUnlocalizedName("grenade_mirv").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":grenade_mirv");
|
||||
grenade_breach = new ItemGrenade(-1).setUnlocalizedName("grenade_breach").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":grenade_breach");
|
||||
grenade_burst = new ItemGrenade(1).setUnlocalizedName("grenade_burst").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":grenade_burst");
|
||||
grenate_cats = new ItemGrenade(1).setUnlocalizedName("grenate_cats").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":grenade_cats");
|
||||
nuclear_waste_pearl = new ItemGrenade(-1).setUnlocalizedName("nuclear_waste_pearl").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":nuclear_waste_pearl");
|
||||
|
||||
weaponized_starblaster_cell = new WeaponizedCell().setUnlocalizedName("weaponized_starblaster_cell").setMaxStackSize(1).setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_b92_ammo_weaponized");
|
||||
@ -7338,6 +7340,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(grenade_if_spark, grenade_if_spark.getUnlocalizedName());
|
||||
GameRegistry.registerItem(grenade_if_hopwire, grenade_if_hopwire.getUnlocalizedName());
|
||||
GameRegistry.registerItem(grenade_if_null, grenade_if_null.getUnlocalizedName());
|
||||
GameRegistry.registerItem(grenate_cats, grenate_cats.getUnlocalizedName());
|
||||
GameRegistry.registerItem(nuclear_waste_pearl, nuclear_waste_pearl.getUnlocalizedName());
|
||||
|
||||
GameRegistry.registerItem(ullapool_caber, ullapool_caber.getUnlocalizedName());
|
||||
|
||||
@ -2,49 +2,7 @@ package com.hbm.items.weapon;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.entity.grenade.EntityGrenadeASchrab;
|
||||
import com.hbm.entity.grenade.EntityGrenadeBlackHole;
|
||||
import com.hbm.entity.grenade.EntityGrenadeBreach;
|
||||
import com.hbm.entity.grenade.EntityGrenadeBurst;
|
||||
import com.hbm.entity.grenade.EntityGrenadeCloud;
|
||||
import com.hbm.entity.grenade.EntityGrenadeCluster;
|
||||
import com.hbm.entity.grenade.EntityGrenadeDynamite;
|
||||
import com.hbm.entity.grenade.EntityGrenadeElectric;
|
||||
import com.hbm.entity.grenade.EntityGrenadeFire;
|
||||
import com.hbm.entity.grenade.EntityGrenadeFlare;
|
||||
import com.hbm.entity.grenade.EntityGrenadeFrag;
|
||||
import com.hbm.entity.grenade.EntityGrenadeGas;
|
||||
import com.hbm.entity.grenade.EntityGrenadeGascan;
|
||||
import com.hbm.entity.grenade.EntityGrenadeGeneric;
|
||||
import com.hbm.entity.grenade.EntityGrenadeIFBouncy;
|
||||
import com.hbm.entity.grenade.EntityGrenadeIFBrimstone;
|
||||
import com.hbm.entity.grenade.EntityGrenadeIFConcussion;
|
||||
import com.hbm.entity.grenade.EntityGrenadeIFGeneric;
|
||||
import com.hbm.entity.grenade.EntityGrenadeIFHE;
|
||||
import com.hbm.entity.grenade.EntityGrenadeIFHopwire;
|
||||
import com.hbm.entity.grenade.EntityGrenadeIFImpact;
|
||||
import com.hbm.entity.grenade.EntityGrenadeIFIncendiary;
|
||||
import com.hbm.entity.grenade.EntityGrenadeIFMystery;
|
||||
import com.hbm.entity.grenade.EntityGrenadeIFNull;
|
||||
import com.hbm.entity.grenade.EntityGrenadeIFSpark;
|
||||
import com.hbm.entity.grenade.EntityGrenadeIFSticky;
|
||||
import com.hbm.entity.grenade.EntityGrenadeIFToxic;
|
||||
import com.hbm.entity.grenade.EntityGrenadeLemon;
|
||||
import com.hbm.entity.grenade.EntityGrenadeMIRV;
|
||||
import com.hbm.entity.grenade.EntityGrenadeMk2;
|
||||
import com.hbm.entity.grenade.EntityGrenadeNuclear;
|
||||
import com.hbm.entity.grenade.EntityGrenadeNuke;
|
||||
import com.hbm.entity.grenade.EntityGrenadePC;
|
||||
import com.hbm.entity.grenade.EntityGrenadePlasma;
|
||||
import com.hbm.entity.grenade.EntityGrenadePoison;
|
||||
import com.hbm.entity.grenade.EntityGrenadePulse;
|
||||
import com.hbm.entity.grenade.EntityGrenadeSchrabidium;
|
||||
import com.hbm.entity.grenade.EntityGrenadeShrapnel;
|
||||
import com.hbm.entity.grenade.EntityGrenadeSmart;
|
||||
import com.hbm.entity.grenade.EntityGrenadeStrong;
|
||||
import com.hbm.entity.grenade.EntityGrenadeTau;
|
||||
import com.hbm.entity.grenade.EntityGrenadeZOMG;
|
||||
import com.hbm.entity.grenade.EntityWastePearl;
|
||||
import com.hbm.entity.grenade.*;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -214,6 +172,9 @@ public class ItemGrenade extends Item {
|
||||
if (this == ModItems.stick_dynamite) {
|
||||
p_77659_2_.spawnEntityInWorld(new EntityGrenadeDynamite(p_77659_2_, p_77659_3_));
|
||||
}
|
||||
if (this == ModItems.grenate_cats) {
|
||||
p_77659_2_.spawnEntityInWorld(new EntityGrenadeCats(p_77659_2_, p_77659_3_));
|
||||
}
|
||||
}
|
||||
|
||||
return p_77659_1_;
|
||||
|
||||
@ -635,6 +635,7 @@ public class ClientProxy extends ServerProxy {
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityGrenadeDynamite.class, new RenderSnowball(ModItems.stick_dynamite));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityGrenadeBouncyGeneric.class, new RenderGenericGrenade());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityGrenadeImpactGeneric.class, new RenderGenericGrenade());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityGrenadeCats.class, new RenderSnowball(ModItems.grenate_cats));
|
||||
//missiles
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityTestMissile.class, new RenderTestMissile());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityMissileCustom.class, new RenderMissileCustom());
|
||||
|
||||
@ -607,6 +607,11 @@ public class MainRegistry {
|
||||
return new EntityGrenadeIFNull(p_82499_1_, p_82499_2_.getX(), p_82499_2_.getY(), p_82499_2_.getZ());
|
||||
}
|
||||
});
|
||||
BlockDispenser.dispenseBehaviorRegistry.putObject(ModItems.grenate_cats, new BehaviorProjectileDispense() {
|
||||
protected IProjectile getProjectileEntity(World p_82499_1_, IPosition p_82499_2_) {
|
||||
return new EntityGrenadeCats(p_82499_1_, p_82499_2_.getX(), p_82499_2_.getY(), p_82499_2_.getZ());
|
||||
}
|
||||
});
|
||||
BlockDispenser.dispenseBehaviorRegistry.putObject(ModItems.nuclear_waste_pearl, new BehaviorProjectileDispense() {
|
||||
|
||||
protected IProjectile getProjectileEntity(World world, IPosition position) {
|
||||
|
||||
@ -2444,6 +2444,7 @@ item.grenade_aschrab.name=Tossable Antischrabidium Cell
|
||||
item.grenade_black_hole.name=Black Hole Grenade
|
||||
item.grenade_breach.name=Breaching Grenade
|
||||
item.grenade_burst.name=Digger Grenade
|
||||
item.grenate_cats.name=Grenade of Cats
|
||||
item.grenade_cloud.name=Jar of Cloud
|
||||
item.grenade_cluster.name=Cluster Bomb
|
||||
item.grenade_electric.name=Lightning Bomb
|
||||
|
||||
@ -916,6 +916,7 @@ item.grenade_strong.name=Grenade ameliorée
|
||||
item.grenade_frag.name=Grenade Frag
|
||||
item.grenade_fire.name=Grenade Frag incendiaire
|
||||
item.grenade_shrapnel.name=Grenade à fragmentation
|
||||
item.grenate_cats.name=Grenade à chats
|
||||
item.grenade_cluster.name=Grenade à fragmentation
|
||||
item.grenade_flare.name=Flare
|
||||
item.grenade_electric.name=Grenade à éclairs
|
||||
|
||||
@ -3874,6 +3874,7 @@ item.grenade_strong.name=Усовершенствованная граната
|
||||
item.grenade_frag.name=Осколочная граната
|
||||
item.grenade_fire.name=Огненная осколочная граната
|
||||
item.grenade_shrapnel.name=Граната со шрапнелью
|
||||
item.grenate_cats.name=Граната с котами
|
||||
item.grenade_cluster.name=Кластерная бомба
|
||||
item.grenade_flare.name=Сигнальная ракета
|
||||
item.grenade_electric.name=Электрограната
|
||||
|
||||
BIN
src/main/resources/assets/hbm/textures/items/grenade_cats.png
Normal file
BIN
src/main/resources/assets/hbm/textures/items/grenade_cats.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 764 B |
Loading…
x
Reference in New Issue
Block a user