Skip to content

Commit

Permalink
Cum, Courier
Browse files Browse the repository at this point in the history
this should be it (for the 5th time today)
  • Loading branch information
70000hp committed May 20, 2022
1 parent 8c3544c commit 58edc85
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/hbm/crafting/WeaponRecipes.java
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,9 @@ public static void register() {

//Folly shells
CraftingManager.addRecipeAuto(new ItemStack(ModItems.folly_bullet, 1), new Object[] { " S ", "STS", "SMS", 'S', STAR.ingot(), 'T', ModItems.powder_magic, 'M', ModItems.folly_bullet_nuclear });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.folly_bullet_nuclear, 1), new Object[] { " N ", "UTU", "UTU", 'N', ModItems.ammo_nuke_high, 'U', IRON.ingot(), 'T', W.ingot() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.folly_bullet_nuclear, 1), new Object[] { " N ", "UTU", "UTU", 'N', ModItems.ammo_nuke_high, 'U', DESH.ingot(), 'T', W.ingot() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.folly_bullet_du, 1), new Object[] { " U ", "UDU", "UTU", 'U', U238.ingot(), 'D', DURA.ingot(), 'T', W.ingot() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.folly_shell, 1), new Object[] { "IPI", "IPI", "IMI", 'I', IRON.ingot(), 'P', IRON.plate(), 'M', ModItems.primer_50 });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.folly_shell, 1), new Object[] { "IPI", "IPI", "IMI", 'I', STEEL.ingot(), 'P', IRON.plate(), 'M', ModItems.cordite });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_folly, 1), new Object[] { " B ", "MEM", " S ", 'B', ModItems.folly_bullet, 'M', ModItems.powder_magic, 'E', ModItems.powder_power, 'S', ModItems.folly_shell });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_folly_nuclear, 2), new Object[] { " B ", "EEE", " S ", 'B', ModItems.folly_bullet_nuclear, 'E', ModBlocks.det_charge, 'S', ModItems.folly_shell });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_folly_du, 4), new Object[] { " B ", "EEE", " S ", 'B', ModItems.folly_bullet_du, 'E', ModBlocks.det_charge, 'S', ModItems.folly_shell });
Expand Down
12 changes: 7 additions & 5 deletions src/main/java/com/hbm/handler/guncfg/BulletConfigFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -352,21 +352,23 @@ public static void follySleek(EntityBulletBase bullet, float x, float y, float z
Random rand = new Random();
if(y >= 0) {

y = (float) posY + 150;
y = (float) posY + 100;
}

for(int i = 0; i < 2; i++) {
Entity missile = new EntityMissileMicro(world,x-200+rand.nextFloat()*10 ,y,z+rand.nextFloat()*10, a+42, b);
for(int i = 0; i < 4; i++) {
Entity missile = new EntityMissileMicro(world,x-100+rand.nextFloat()*10 ,y,z+rand.nextFloat()*10, a+rand.nextInt(8)-5, b+rand.nextInt(8)-5);


world.spawnEntityInWorld(missile);
}

for(int i = 0; i < 4; i++) {
Entity missile = new EntityMissileGeneric(world,x-200+rand.nextFloat()*10,y,z+rand.nextFloat()*10, a+42, b);
Entity missile2 = new EntityMissileGeneric(world,x-100+rand.nextFloat()*10,y,z+rand.nextFloat()*10, a+rand.nextInt(8)-5, b+rand.nextInt(8)-5);


world.spawnEntityInWorld(missile);
world.spawnEntityInWorld(missile2);
}

}
}

Expand Down
3 changes: 3 additions & 0 deletions src/main/java/com/hbm/inventory/recipes/AssemblerRecipes.java
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,10 @@ private static void registerDefaults() {
new ComparableStack(ModItems.circuit_targeting_tier3, 1),
new ComparableStack(ModItems.hull_small_steel, 1),
new ComparableStack(ModItems.missile_micro, 3),
new ComparableStack(ModBlocks.det_charge, 5),
new OreDictStack(W.block(), 1),
new ComparableStack(ModBlocks.pole_satellite_receiver, 2),
new ComparableStack(ModBlocks.pole_top, 2),

}, 300);

Expand Down
18 changes: 18 additions & 0 deletions src/main/java/com/hbm/items/weapon/GunFolly.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.ChatComponentText;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.world.World;

Expand All @@ -29,6 +30,13 @@ public Crosshair getCrosshair() {

@Override
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
//man I wish old zomg was a thing:
if (!stack.hasTagCompound()) {
stack.stackTagCompound = new NBTTagCompound();
stack.stackTagCompound.setBoolean("verified", false);
}

boolean verified = stack.stackTagCompound.getBoolean("verified");

int state = getState(stack);

Expand Down Expand Up @@ -64,12 +72,22 @@ public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer pla
player.inventory.consumeInventoryItem(ModItems.ammo_folly);
setState(stack, 2);
setType(stack,3);
} else if(player.inventory.hasItem(ModItems.coin_maskman)) {
player.addChatMessage(new ChatComponentText(EnumChatFormatting.BLUE + "[IF Systems] Access granted, Fire when ready."));
stack.stackTagCompound.setBoolean("verified", true);
} else if(player.inventory.hasItem(ModItems.ammo_folly_sleek)) {

if(verified == true) {

world.playSoundAtEntity(player, "hbm:weapon.follyReload", 1.0F, 1.0F);
player.inventory.consumeInventoryItem(ModItems.ammo_folly_sleek);
setState(stack, 2);
setType(stack,4);

} else {
player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "[IF Systems] Access to Silos Denied, Verify using a IF-R&D M.A.S.K token"));
}


} else {

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/hbm/items/weapon/ItemAmmo.java
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@ public void addInformation(ItemStack stack, EntityPlayer player, List list, bool
}
if(this == ModItems.ammo_folly_sleek) {
list.add(EnumChatFormatting.BLUE + "+ Launches a salvo of Micro Nuclear and HE missiles over an large area");
list.add(EnumChatFormatting.YELLOW + " Yowch");
list.add(EnumChatFormatting.WHITE + "* Verification needed in order to authorize launch");
}

//STINGER
Expand Down

0 comments on commit 58edc85

Please sign in to comment.