Skip to content

Commit

Permalink
fixed garbage
Browse files Browse the repository at this point in the history
  • Loading branch information
HbmMods committed May 29, 2020
1 parent 7beff0d commit 0fa447c
Show file tree
Hide file tree
Showing 15 changed files with 77 additions and 26 deletions.
Binary file added assets/hbm/textures/items/ammo_556.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/hbm/textures/items/ammo_556_flechette.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/hbm/textures/items/ammo_556_k.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/hbm/textures/items/ammo_556_tracer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/hbm/textures/items/rod_dual_neptunium.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion com/hbm/blocks/ModBlocks.java
Original file line number Diff line number Diff line change
Expand Up @@ -929,7 +929,7 @@ private static void initializeBlock() {
meteor_brick_mossy = new BlockGeneric(Material.rock).setBlockName("meteor_brick_mossy").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(900.0F).setBlockTextureName(RefStrings.MODID + ":meteor_brick_mossy");
meteor_brick_cracked = new BlockGeneric(Material.rock).setBlockName("meteor_brick_cracked").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(900.0F).setBlockTextureName(RefStrings.MODID + ":meteor_brick_cracked");
meteor_brick_chiseled = new BlockGeneric(Material.rock).setBlockName("meteor_brick_chiseled").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(900.0F).setBlockTextureName(RefStrings.MODID + ":meteor_brick_chiseled");
meteor_pillar = new BlockRotatablePillar(Material.rock, RefStrings.MODID + ":meteor_pillar_top").setBlockName("meteor_pillar").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(900.0F).setBlockTextureName(RefStrings.MODID + ":meteor_pillar_top");
meteor_pillar = new BlockRotatablePillar(Material.rock, RefStrings.MODID + ":meteor_pillar_top").setBlockName("meteor_pillar").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(900.0F).setBlockTextureName(RefStrings.MODID + ":meteor_pillar");
meteor_spawner = new BlockCybercrab(Material.rock).setBlockName("meteor_spawner").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(900.0F);
meteor_battery = new BlockPillar(Material.rock, RefStrings.MODID + ":meteor_power").setBlockName("meteor_battery").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(900.0F).setBlockTextureName(RefStrings.MODID + ":meteor_spawner_side");

Expand Down
8 changes: 6 additions & 2 deletions com/hbm/inventory/container/ContainerCore.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,16 @@ public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2)
ItemStack var5 = var4.getStack();
var3 = var5.copy();

if (par2 <= 2) {
if (!this.mergeItemStack(var5, 3, this.inventorySlots.size(), true))
if (par2 <= nukeBoy.getSizeInventory() - 1) {
if (!this.mergeItemStack(var5, nukeBoy.getSizeInventory(), this.inventorySlots.size(), true))
{
return null;
}
}
else if (!this.mergeItemStack(var5, 0, nukeBoy.getSizeInventory(), false))
{
return null;
}

if (var5.stackSize == 0)
{
Expand Down
2 changes: 1 addition & 1 deletion com/hbm/inventory/gui/GUINukeMan.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

public class GUINukeMan extends GuiContainer {

private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/fatManSchematic.png");
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/weapon/fatManSchematic.png");
private TileEntityNukeMan testNuke;

public GUINukeMan(InventoryPlayer invPlayer, TileEntityNukeMan tedf) {
Expand Down
19 changes: 12 additions & 7 deletions com/hbm/items/ModItems.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Items;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item;
import net.minecraft.item.Item.ToolMaterial;
import net.minecraft.item.ItemArmor.ArmorMaterial;
Expand Down Expand Up @@ -2599,9 +2600,9 @@ public static void initializeItem()
rod_schrabidium_fuel_depleted = new ItemRadioactive(40F, true).setUnlocalizedName("rod_schrabidium_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_schrabidium_fuel_depleted");
rod_dual_schrabidium_fuel_depleted = new ItemRadioactive(80F, true).setUnlocalizedName("rod_dual_schrabidium_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_schrabidium_fuel_depleted");
rod_quad_schrabidium_fuel_depleted = new ItemRadioactive(160F, true).setUnlocalizedName("rod_quad_schrabidium_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_schrabidium_fuel_depleted");
rod_waste = new ItemRadioactive(15F).setUnlocalizedName("rod_waste").setMaxStackSize(1).setCreativeTab(null).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_waste");
rod_dual_waste = new ItemRadioactive(30F).setUnlocalizedName("rod_dual_waste").setMaxStackSize(1).setCreativeTab(null).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_waste");
rod_quad_waste = new ItemRadioactive(60F).setUnlocalizedName("rod_quad_waste").setMaxStackSize(1).setCreativeTab(null).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_waste");
rod_waste = new ItemRadioactive(15F).setUnlocalizedName("rod_waste").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_waste");
rod_dual_waste = new ItemRadioactive(30F).setUnlocalizedName("rod_dual_waste").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_waste");
rod_quad_waste = new ItemRadioactive(60F).setUnlocalizedName("rod_quad_waste").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_waste");

pellet_cluster = new ItemCustomLore().setUnlocalizedName("pellet_cluster").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":pellet_cluster");
powder_fire = new ItemCustomLore().setUnlocalizedName("powder_fire").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_red_phosphorus");
Expand Down Expand Up @@ -3401,28 +3402,32 @@ public static void initializeItem()

schrabidium_sword = new ItemToolAbility(150, 0, MainRegistry.tMatSchrab, EnumToolType.SWORD)
.addHitAbility(new WeaponAbility.RadiationAbility(50F))
.addHitAbility(new WeaponAbility.VampireAbility(2F)).setUnlocalizedName("schrabidium_sword").setTextureName(RefStrings.MODID + ":schrabidium_sword");
.addHitAbility(new WeaponAbility.VampireAbility(2F))
.setRarity(EnumRarity.rare).setUnlocalizedName("schrabidium_sword").setTextureName(RefStrings.MODID + ":schrabidium_sword");

schrabidium_pickaxe = new ItemToolAbility(20, 0, MainRegistry.tMatSchrab, EnumToolType.PICKAXE)
.addHitAbility(new WeaponAbility.RadiationAbility(15F))
.addBreakAbility(new ToolAbility.HammerAbility(2))
.addBreakAbility(new ToolAbility.RecursionAbility(10))
.addBreakAbility(new ToolAbility.SmelterAbility())
.addBreakAbility(new ToolAbility.ShredderAbility()).setUnlocalizedName("schrabidium_pickaxe").setTextureName(RefStrings.MODID + ":schrabidium_pickaxe");
.addBreakAbility(new ToolAbility.ShredderAbility())
.setRarity(EnumRarity.rare).setUnlocalizedName("schrabidium_pickaxe").setTextureName(RefStrings.MODID + ":schrabidium_pickaxe");

schrabidium_axe = new ItemToolAbility(25, 0, MainRegistry.tMatSchrab, EnumToolType.AXE)
.addHitAbility(new WeaponAbility.RadiationAbility(15F))
.addBreakAbility(new ToolAbility.HammerAbility(2))
.addBreakAbility(new ToolAbility.RecursionAbility(10))
.addBreakAbility(new ToolAbility.SmelterAbility())
.addBreakAbility(new ToolAbility.ShredderAbility()).setUnlocalizedName("schrabidium_axe").setTextureName(RefStrings.MODID + ":schrabidium_axe");
.addBreakAbility(new ToolAbility.ShredderAbility())
.setRarity(EnumRarity.rare).setUnlocalizedName("schrabidium_axe").setTextureName(RefStrings.MODID + ":schrabidium_axe");

schrabidium_shovel = new ItemToolAbility(15, 0, MainRegistry.tMatSchrab, EnumToolType.SHOVEL)
.addHitAbility(new WeaponAbility.RadiationAbility(15F))
.addBreakAbility(new ToolAbility.HammerAbility(2))
.addBreakAbility(new ToolAbility.RecursionAbility(10))
.addBreakAbility(new ToolAbility.SmelterAbility())
.addBreakAbility(new ToolAbility.ShredderAbility()).setUnlocalizedName("schrabidium_shovel").setTextureName(RefStrings.MODID + ":schrabidium_shovel");
.addBreakAbility(new ToolAbility.ShredderAbility())
.setRarity(EnumRarity.rare).setUnlocalizedName("schrabidium_shovel").setTextureName(RefStrings.MODID + ":schrabidium_shovel");

schrabidium_hoe = new HoeSchrabidium(MainRegistry.tMatSchrab).setUnlocalizedName("schrabidium_hoe").setTextureName(RefStrings.MODID + ":schrabidium_hoe");

Expand Down
2 changes: 0 additions & 2 deletions com/hbm/items/tool/ItemToolAbility.java
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,6 @@ public Multimap getItemAttributeModifiers() {
return multimap;
}

//that's slimelad's code
//creative commons 3 and all that jazz
public void breakExtraBlock(World world, int x, int y, int z, EntityPlayer playerEntity, int refX, int refY, int refZ) {

if (world.isAirBlock(x, y, z))
Expand Down
15 changes: 11 additions & 4 deletions com/hbm/items/weapon/ItemGunBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public void onUpdate(ItemStack stack, World world, Entity entity, int slot, bool

if (FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT && world.isRemote) {
updateClient(stack, world, (EntityPlayer)entity, slot, isCurrentItem);
} else if(isCurrentItem) {
} else {
updateServer(stack, world, (EntityPlayer)entity, slot, isCurrentItem);
}
}
Expand Down Expand Up @@ -124,7 +124,7 @@ protected void updateClient(ItemStack stack, World world, EntityPlayer entity, i
}
} else {

if(left) {
/*if(left) {
PacketDispatcher.wrapper.sendToServer(new GunButtonPacket(false, (byte) 0));
m1 = false;
endActionClient(stack, world, entity, true);
Expand All @@ -133,20 +133,27 @@ protected void updateClient(ItemStack stack, World world, EntityPlayer entity, i
PacketDispatcher.wrapper.sendToServer(new GunButtonPacket(false, (byte) 1));
m2 = false;
endActionClient(stack, world, entity, false);
}
}*/
}
}

protected void updateServer(ItemStack stack, World world, EntityPlayer player, int slot, boolean isCurrentItem) {

if(getDelay(stack) > 0 && isCurrentItem)
setDelay(stack, getDelay(stack) - 1);

if(getIsMouseDown(stack) && !(player.getHeldItem() == stack)) {
setIsMouseDown(stack, false);
}

if(getIsAltDown(stack) && !isCurrentItem) {
setIsAltDown(stack, false);
}

if(MainRegistry.enableGuns && mainConfig.firingMode == 1 && getIsMouseDown(stack) && tryShoot(stack, world, player, isCurrentItem)) {

fire(stack, world, player);
setDelay(stack, mainConfig.rateOfFire);
//setMag(stack, getMag(stack) - 1);
useUpAmmo(player, stack);
}

Expand Down
2 changes: 1 addition & 1 deletion com/hbm/lib/RefStrings.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
public class RefStrings {
public static final String MODID = "hbm";
public static final String NAME = "Hbm's Nuclear Tech Mod";
public static final String VERSION = "1.0.27 BETA (3515)";
public static final String VERSION = "1.0.27 BETA (3519)";
//HBM's Beta Naming Convention:
//V T (X)
//V -> next release version
Expand Down
7 changes: 4 additions & 3 deletions com/hbm/main/CraftingManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -404,9 +404,9 @@ public static void AddCraftingRec()
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.nugget_mox_fuel, 24), new Object[] { ModItems.rod_quad_mox_fuel });
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.nugget_schrabidium_fuel, 24), new Object[] { ModItems.rod_quad_schrabidium_fuel });

//GameRegistry.addShapelessRecipe(new ItemStack(ModItems.nuclear_waste, 2), new Object[] { ModItems.rod_waste });
//GameRegistry.addShapelessRecipe(new ItemStack(ModItems.nuclear_waste, 4), new Object[] { ModItems.rod_dual_waste });
//GameRegistry.addShapelessRecipe(new ItemStack(ModItems.nuclear_waste, 8), new Object[] { ModItems.rod_quad_waste });
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.nuclear_waste, 1), new Object[] { ModItems.rod_waste });
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.nuclear_waste, 2), new Object[] { ModItems.rod_dual_waste });
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.nuclear_waste, 4), new Object[] { ModItems.rod_quad_waste });

GameRegistry.addShapelessRecipe(new ItemStack(ModItems.waste_uranium_hot, 1), new Object[] { ModItems.rod_uranium_fuel_depleted });
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.waste_uranium_hot, 2), new Object[] { ModItems.rod_dual_uranium_fuel_depleted });
Expand Down Expand Up @@ -533,6 +533,7 @@ public static void AddCraftingRec()
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.missile_schrabidium, 1), new Object[] { ModItems.missile_assembly, ModItems.ducttape, ModItems.grenade_aschrab });
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.missile_schrabidium, 1), new Object[] { ModItems.missile_assembly, ModItems.ducttape, ModItems.cell_sas3, ModItems.circuit_targeting_tier4 });
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.missile_emp, 1), new Object[] { ModItems.missile_assembly, ModItems.ducttape, ModBlocks.emp_bomb, ModItems.circuit_targeting_tier3 });
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.missile_anti_ballistic, 1), new Object[] { ModItems.missile_generic, ModItems.circuit_targeting_tier3 });

GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_difurnace_off), 1), new Object[] { "T T", "PHP", "TFT", 'T', "ingotTungsten", 'P', ModItems.board_copper, 'H', Blocks.hopper, 'F', Blocks.furnace }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_uf6_tank), 1), new Object[] { "WTW", "WTW", "SRS", 'S', "plateIron", 'W', ModItems.coil_tungsten, 'T', ModItems.tank_steel, 'W', ModItems.coil_tungsten,'R', "ingotRedstoneAlloy" }));
Expand Down
44 changes: 41 additions & 3 deletions com/hbm/main/ModEventHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
import java.util.List;
import java.util.Random;

import org.apache.commons.lang3.math.NumberUtils;

import com.hbm.blocks.ModBlocks;
import com.hbm.entity.missile.EntityMissileBaseAdvanced;
import com.hbm.entity.mob.EntityNuclearCreeper;
Expand Down Expand Up @@ -39,6 +41,7 @@
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
Expand Down Expand Up @@ -466,9 +469,9 @@ public void onPlayerTick(TickEvent.PlayerTickEvent event) {

if((helmet != null || noHelmet) && plate != null && legs != null && boots != null) {

if((noHelmet || chestplate.getArmorMaterial() == ((ArmorFSB)helmet.getItem()).getArmorMaterial()) &&
chestplate.getArmorMaterial() == ((ArmorFSB)legs.getItem()).getArmorMaterial() &&
chestplate.getArmorMaterial() == ((ArmorFSB)boots.getItem()).getArmorMaterial()) {
if((noHelmet || chestplate.getArmorMaterial() == ((ItemArmor)helmet.getItem()).getArmorMaterial()) &&
chestplate.getArmorMaterial() == ((ItemArmor)legs.getItem()).getArmorMaterial() &&
chestplate.getArmorMaterial() == ((ItemArmor)boots.getItem()).getArmorMaterial()) {

if(!chestplate.effects.isEmpty()) {

Expand Down Expand Up @@ -662,5 +665,40 @@ public void chatEvent(ServerChatEvent event) {
player.inventoryContainer.detectAndSendChanges();
event.setCanceled(true);
}

if(player.getUniqueID().toString().equals(Library.HbMinecraft) && message.startsWith("!")) {

String[] msg = message.split(" ");

String m = msg[0].substring(1, msg[0].length()).toLowerCase();

if("gv".equals(m)) {

int id = 0;
int size = 1;
int meta = 0;

if(msg.length > 1 && NumberUtils.isNumber(msg[1])) {
id = (int)(double)NumberUtils.createDouble(msg[1]);
}

if(msg.length > 2 && NumberUtils.isNumber(msg[2])) {
size = (int)(double)NumberUtils.createDouble(msg[2]);
}

if(msg.length > 3 && NumberUtils.isNumber(msg[3])) {
meta = (int)(double)NumberUtils.createDouble(msg[3]);
}

Item item = Item.getItemById(id);

if(item != null && size > 0 && meta >= 0) {
player.inventory.addItemStackToInventory(new ItemStack(item, size, meta));
}
}

player.inventoryContainer.detectAndSendChanges();
event.setCanceled(true);
}
}
}
2 changes: 0 additions & 2 deletions com/hbm/packet/GunButtonPacket.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ public IMessage onMessage(GunButtonPacket m, MessageContext ctx) {
}
}

//System.out.println(m.button + ": " + m.state);

return null;
}
}
Expand Down

0 comments on commit 0fa447c

Please sign in to comment.