More weapons

This commit is contained in:
HbmMods 2016-08-29 09:56:31 +02:00
parent 9b0a766849
commit e1293271c1
33 changed files with 1055 additions and 45 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 271 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 268 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 259 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 300 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 308 B

After

Width:  |  Height:  |  Size: 310 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 304 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 643 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 764 B

View File

@ -2,8 +2,10 @@ package com.hbm.gui;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import com.hbm.blocks.ModBlocks;
import com.hbm.items.ModItems;
@ -523,23 +525,35 @@ public class MachineRecipes {
//Makes the OreDict easily accessible. Neat.
System.out.println("Loading all items and blocks, please wait...");
System.out.println("This process normally takes very long due to the incompetence of other modders I have to compensate for. Sorry for the inconvenience.");
for (Object item : GameData.getItemRegistry()) {
List<String> list = new ArrayList<String>();
int[] array;
if (item instanceof Item) {
int x = 1;
//if(((Item)item).getHasSubtypes())
// x = 126;
ItemStack stack = new ItemStack((Item) item);
array = OreDictionary.getOreIDs(stack);
for(int j = 0; j < x; j++)
{
ItemStack stack = new ItemStack((Item) item, 1, j);
array = OreDictionary.getOreIDs(stack);
for (int i = 0; i < array.length; i++) {
//if (!OreDictionary.getOreName(array[i]).equals("Unknown")) {
for (int i = 0; i < array.length; i++) {
// if
// (!OreDictionary.getOreName(array[i]).equals("Unknown"))
// {
list.add(OreDictionary.getOreName(array[i]));
//}
}
//if(list.size() > 0)
// }
}
// if(list.size() > 0)
theWholeThing.add(new DictCouple(stack, list));
}
}
}
@ -549,23 +563,44 @@ public class MachineRecipes {
int[] array;
if (block instanceof Block) {
ItemStack stack = new ItemStack((Block) block);
array = OreDictionary.getOreIDs(stack);
for (int i = 0; i < array.length; i++) {
//if (!OreDictionary.getOreName(array[i]).equals("Unknown")) {
list.add(OreDictionary.getOreName(array[i]));
//}
}
Item item = Item.getItemFromBlock((Block)block);
//if(list.size() > 0)
theWholeThing.add(new DictCouple(stack, list));
int x = 1;
//if(item != null && item.getHasSubtypes())
// x = 16;
for(int j = 0; j < x; j++)
{
ItemStack stack = new ItemStack((Block) block, 1, j);
array = OreDictionary.getOreIDs(stack);
for (int i = 0; i < array.length; i++) {
// if
// (!OreDictionary.getOreName(array[i]).equals("Unknown"))
// {
list.add(OreDictionary.getOreName(array[i]));
// }
}
// if(list.size() > 0)
if(!doesExist(stack))
theWholeThing.add(new DictCouple(stack, list));
}
}
}
System.out.println("Added " + theWholeThing.size() + " elements from the Ore Dict!");
}
public boolean doesExist(ItemStack stack) {
for(DictCouple dic : theWholeThing) {
if(dic.item.getItem() == stack.getItem())
return true;
}
return false;
}
public void addRecipes() {
@ -652,17 +687,41 @@ public class MachineRecipes {
{
if(recipes.get(i) != null &&
recipes.get(i).input != null &&
recipes.get(i).input.getItem() != null &&
recipes.get(i).output != null &&
inp != null &&
inp.getItem() != null &&
outp != null &&
recipes.get(i).input.getItem().equals(inp.getItem()))
//TODO: check if i didn't break anything
recipes.get(i).input.getItem() == inp.getItem() &&
recipes.get(i).input.getItemDamage() == inp.getItemDamage())
recipes.get(i).output = outp;
}
}
public void removeDuplicates() {
List<ShredderRecipe> newList = new ArrayList<ShredderRecipe>();
for(ShredderRecipe piv : recipes)
{
boolean flag = false;
if(newList.size() == 0)
{
newList.add(piv);
} else {
for(ShredderRecipe rec : newList) {
if(piv != null && rec != null && piv.input != null && rec.input != null && rec.input.getItem() != null && piv.input.getItem() != null && rec.input.getItemDamage() == piv.input.getItemDamage() && rec.input.getItem() == piv.input.getItem())
flag = true;
if(piv == null || rec == null || piv.input == null || rec.input == null)
flag = true;
}
}
if(!flag)
{
newList.add(piv);
}
}
}
public void PrintRecipes() {
/*for(int i = 0; i < recipes.size(); i++) {
System.out.println("Recipe #" + i + ", " + recipes.get(i).input + " - " + recipes.get(i).output);
@ -679,13 +738,13 @@ public class MachineRecipes {
}*/
for (int j = 0; j < recipes.size(); j++) {
/*for (int j = 0; j < recipes.size(); j++) {
if (recipes.get(j) != null && recipes.get(j).input != null && recipes.get(j).output != null &&
recipes.get(j).input.getItem() != null && recipes.get(j).output.getItem() != null)
System.out.println(recipes.get(j).input + " | " + recipes.get(j).output);
else
System.out.println(recipes.get(j));
}
}*/
System.out.println("TWT: " + theWholeThing.size() + ", REC: " + recipes.size());
}
@ -703,7 +762,7 @@ public class MachineRecipes {
public static List<String> findWithStack(ItemStack stack) {
for(DictCouple couple : theWholeThing) {
if(couple.item.equals(stack));
if(couple.item == stack);
return couple.list;
}
@ -718,7 +777,9 @@ public class MachineRecipes {
public static ItemStack getShredderResult(ItemStack stack) {
for(ShredderRecipe rec : recipes)
{
if(stack != null && rec.input.getItem().equals(stack.getItem()))
if(stack != null &&
rec.input.getItem() == stack.getItem() &&
rec.input.getItemDamage() == stack.getItemDamage())
return rec.output.copy();
}
@ -729,9 +790,33 @@ public class MachineRecipes {
Map<Object, Object> recipes = new HashMap<Object, Object>();
for(int i = 0; i < this.recipes.size(); i++) {
recipes.put(((ShredderRecipe)recipes.get(i)).input, ((ShredderRecipe)recipes.get(i)).output);
if(this.recipes.get(i) != null && this.recipes.get(i).output.getItem() != ModItems.dust && this.recipes.get(i).output.getItem() != ModItems.scrap)
recipes.put(((ShredderRecipe)this.recipes.get(i)).input, getShredderResult(((ShredderRecipe)this.recipes.get(i)).input));
}
return recipes;
}
public ArrayList<ItemStack> getBatteries() {
ArrayList<ItemStack> fuels = new ArrayList<ItemStack>();
fuels.add(new ItemStack(ModItems.battery_generic));
fuels.add(new ItemStack(ModItems.battery_advanced));
fuels.add(new ItemStack(ModItems.battery_schrabidium));
fuels.add(new ItemStack(ModItems.fusion_core));
fuels.add(new ItemStack(ModItems.energy_core));
return fuels;
}
public ArrayList<ItemStack> getBlades() {
ArrayList<ItemStack> fuels = new ArrayList<ItemStack>();
fuels.add(new ItemStack(ModItems.blades_advanced_alloy));
fuels.add(new ItemStack(ModItems.blades_aluminium));
fuels.add(new ItemStack(ModItems.blades_combine_steel));
fuels.add(new ItemStack(ModItems.blades_gold));
fuels.add(new ItemStack(ModItems.blades_iron));
fuels.add(new ItemStack(ModItems.blades_steel));
fuels.add(new ItemStack(ModItems.blades_titanium));
fuels.add(new ItemStack(ModItems.blades_schrabidium));
return fuels;
}
}

View File

@ -0,0 +1,158 @@
package com.hbm.handler;
import static codechicken.lib.gui.GuiDraw.drawTexturedModalRect;
import java.awt.Rectangle;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import com.hbm.gui.GUIMachineReactor;
import com.hbm.gui.GUIMachineShredder;
import com.hbm.gui.MachineRecipes;
import com.hbm.handler.ReactorRecipeHandler.Fuel;
import com.hbm.handler.ReactorRecipeHandler.SmeltingSet;
import com.hbm.lib.RefStrings;
import codechicken.nei.NEIServerUtils;
import codechicken.nei.PositionedStack;
import codechicken.nei.api.IOverlayHandler;
import codechicken.nei.api.IRecipeOverlayRenderer;
import codechicken.nei.recipe.GuiRecipe;
import codechicken.nei.recipe.ICraftingHandler;
import codechicken.nei.recipe.TemplateRecipeHandler;
import codechicken.nei.recipe.TemplateRecipeHandler.RecipeTransferRect;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.inventory.Container;
import net.minecraft.item.ItemStack;
public class ShredderRecipeHandler extends TemplateRecipeHandler {
public static ArrayList<Fuel> fuels;
public class SmeltingSet extends TemplateRecipeHandler.CachedRecipe
{
PositionedStack input;
PositionedStack result;
public SmeltingSet(ItemStack input, ItemStack result) {
input.stackSize = 1;
this.input = new PositionedStack(input, 83 - 27 - 18 + 1, 5 + 18 + 1);
this.result = new PositionedStack(result, 83 + 27 + 18 + 1, 5 + 18 + 1);
}
public List<PositionedStack> getIngredients() {
return getCycledIngredients(cycleticks / 48, Arrays.asList(new PositionedStack[] {input}));
}
public List<PositionedStack> getOtherStacks() {
List<PositionedStack> stacks = new ArrayList<PositionedStack>();
stacks.add(fuels.get((cycleticks / 24) % fuels.size()).stack0);
stacks.add(fuels.get((cycleticks / 24) % fuels.size()).stack1);
return stacks;
}
public PositionedStack getResult() {
return result;
}
}
public static class Fuel
{
public Fuel(ItemStack ingred) {
this.stack0 = new PositionedStack(ingred, 83 + 1, 5 + 1, false);
this.stack1 = new PositionedStack(ingred, 83 + 1, 5 + 36 + 1, false);
}
public PositionedStack stack0;
public PositionedStack stack1;
}
@Override
public String getRecipeName() {
return "Shredder";
}
@Override
public String getGuiTexture() {
return RefStrings.MODID + ":textures/gui/gui_nei_shredder.png";
}
public void loadCraftingRecipes(String outputId, Object... results) {
if ((outputId.equals("shredding")) && getClass() == ShredderRecipeHandler.class) {
Map<Object, Object> recipes = MachineRecipes.instance().getShredderRecipes();
for (Map.Entry<Object, Object> recipe : recipes.entrySet()) {
this.arecipes.add(new SmeltingSet((ItemStack)recipe.getKey(), (ItemStack)recipe.getValue()));
}
} else {
super.loadCraftingRecipes(outputId, results);
}
}
public void loadCraftingRecipes(ItemStack result) {
Map<Object, Object> recipes = MachineRecipes.instance().getShredderRecipes();
for (Map.Entry<Object, Object> recipe : recipes.entrySet()) {
if (NEIServerUtils.areStacksSameType((ItemStack)recipe.getValue(), result))
this.arecipes.add(new SmeltingSet((ItemStack)recipe.getKey(), (ItemStack)recipe.getValue()));
}
}
public void loadUsageRecipes(String inputId, Object... ingredients) {
if ((inputId.equals("shredding")) && getClass() == ShredderRecipeHandler.class) {
loadCraftingRecipes("shredding", new Object[0]);
} else {
super.loadUsageRecipes(inputId, ingredients);
}
}
public void loadUsageRecipes(ItemStack ingredient) {
Map<Object, Object> recipes = MachineRecipes.instance().getShredderRecipes();
for (Map.Entry<Object, Object> recipe : recipes.entrySet()) {
if (NEIServerUtils.areStacksSameType(ingredient, (ItemStack)recipe.getKey()))
this.arecipes.add(new SmeltingSet((ItemStack)recipe.getKey(), (ItemStack)recipe.getValue()));
}
}
@Override
public Class<? extends GuiContainer> getGuiClass() {
return GUIMachineShredder.class;
}
@Override
public void loadTransferRects() {
transferRects.add(new RecipeTransferRect(new Rectangle(74, 23, 24, 18), "shredding"));
}
@Override
public void drawExtras(int recipe) {
/*//Top
drawTexturedModalRect(83, 5, 0, 140, 18, 18);
//Bottom
drawTexturedModalRect(83, 5 + 36, 0, 140, 18, 18);
//Right
drawTexturedModalRect(83 + 27 + 18, 5 + 18, 0, 140, 18, 18);
//Left
drawTexturedModalRect(83 - 27 - 18, 5 + 18, 0, 140, 18, 18);
//Progress
drawTexturedModalRect(83 - 3, 5 + 19, 100, 102, 24, 16);
//Power
drawTexturedModalRect(83 - (18 * 4) - 9, 5, 0, 86, 18, 18 * 3);*/
drawProgressBar(83 - (18 * 4) - 9 + 1, 6, 36, 86, 16, 18 * 3 - 2, 480, 7);
drawProgressBar(83 - 3, 5 + 19, 100, 118, 24, 16, 48, 0);
}
@Override
public TemplateRecipeHandler newInstance() {
if (fuels == null || fuels.isEmpty())
fuels = new ArrayList<Fuel>();
for(ItemStack i : MachineRecipes.instance().getBlades())
{
fuels.add(new Fuel(i));
}
return super.newInstance();
}
}

View File

@ -1,5 +1,7 @@
package com.hbm.items;
import java.util.List;
import com.google.common.collect.Multimap;
import com.hbm.entity.EntityMiniNuke;
import com.hbm.entity.EntityRocket;
@ -146,4 +148,14 @@ public class GunFatman extends Item {
multimap.put(SharedMonsterAttributes.movementSpeed.getAttributeUnlocalizedName(), new AttributeModifier(field_111210_e, "Weapon modifier", (double)-0.3, 1));
return multimap;
}
@Override
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
list.add("When normal nukes aren't enough...");
list.add("");
list.add("Ammo: Mini Nukes");
list.add("Damage: 1000");
list.add("Creates small nuclear explosion.");
}
}

View File

@ -108,6 +108,11 @@ public class GunOSIPR extends Item {
list.add("to shoot,");
list.add("sneak to shoot a");
list.add("dark energy ball!");
list.add("");
list.add("Ammo: Dark Energy Plugs");
list.add("Secondary Ammo: Combine Ball");
list.add("Damage: 35 - 45");
list.add("Secondary Damage: 1000");
}
}

85
com/hbm/items/GunPM.java Normal file
View File

@ -0,0 +1,85 @@
package com.hbm.items;
import java.util.List;
import java.util.Random;
import com.hbm.entity.EntityBullet;
import com.hbm.entity.EntityCombineBall;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumAction;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import net.minecraftforge.event.entity.player.ArrowNockEvent;
public class GunPM extends Item {
Random rand = new Random();
public GunPM()
{
this.maxStackSize = 1;
this.setMaxDamage(10000);
}
@Override
public EnumAction getItemUseAction(ItemStack par1ItemStack) {
return EnumAction.bow;
}
public int getMaxItemUseDuration(ItemStack p_77626_1_) {
return 72000;
}
@Override
public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_) {
ArrowNockEvent event = new ArrowNockEvent(p_77659_3_, p_77659_1_);
{
p_77659_3_.setItemInUse(p_77659_1_, this.getMaxItemUseDuration(p_77659_1_));
}
return p_77659_1_;
}
public void onUsingTick(ItemStack stack, EntityPlayer player, int count)
{
World world = player.worldObj;
boolean flag = player.capabilities.isCreativeMode
|| EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, stack) > 0;
if ((player.capabilities.isCreativeMode || player.inventory.hasItem(ModItems.gun_osipr_ammo))
&& count % 3 == 0) {
EntityBullet entityarrow = new EntityBullet(world, player, 3.0F, 35, 45, false, false);
entityarrow.setDamage(100 + rand.nextInt(50));
world.playSoundAtEntity(player, "random.explode", 1.0F, 1.5F + (rand.nextFloat() / 4));
if (flag) {
entityarrow.canBePickedUp = 2;
} else {
player.inventory.consumeInventoryItem(ModItems.gun_osipr_ammo);
}
if (!world.isRemote) {
world.spawnEntityInWorld(entityarrow);
}
}
}
@Override
public int getItemEnchantability() {
return 0;
}
@Override
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
list.add("EVERYBODY HAS TO DIE!");
list.add("");
list.add("Ammo: x");
list.add("Damage: x - x");
}
}

View File

@ -1,5 +1,6 @@
package com.hbm.items;
import java.util.List;
import java.util.Random;
import net.minecraft.enchantment.Enchantment;
@ -199,4 +200,54 @@ public class GunRevolver extends Item
{
return 1;
}
@Override
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
if(this == ModItems.gun_revolver_iron)
{
list.add("Cheap.");
list.add("");
list.add("Ammo: Iron Bullets");
list.add("Damage: 5 - 15");
}
if(this == ModItems.gun_revolver)
{
list.add("I feel like a cowboy!");
list.add("");
list.add("Ammo: Lead Bullets");
list.add("Damage: 10 - 25");
}
if(this == ModItems.gun_revolver_gold)
{
list.add("GoldenEye would be proud!");
list.add("");
list.add("Ammo: Golden Bullets");
list.add("Damage: 20 - 30");
}
if(this == ModItems.gun_revolver_lead)
{
list.add("Made from lead for your safety!");
list.add("");
list.add("Ammo: Atomic Bullets");
list.add("Damage: 5 - 15");
list.add("Bullets are radioactive.");
}
if(this == ModItems.gun_revolver_schrabidium)
{
list.add("Kills everyone and everything.");
list.add("");
list.add("Ammo: Schrabidium Bullets");
list.add("Damage: 10000 - 100000");
list.add("Sets enemy's health to zero.");
}
if(this == ModItems.gun_revolver_cursed)
{
list.add("You're dead.");
list.add("");
list.add("Ammo: Steel Bullets");
list.add("Damage: 25 - 40");
list.add("33% chance of user being withered.");
}
}
}

View File

@ -1,5 +1,7 @@
package com.hbm.items;
import java.util.List;
import com.hbm.entity.EntityMiniNuke;
import com.hbm.entity.EntityRocket;
@ -142,4 +144,13 @@ public class GunRpg extends Item
{
return 1;
}
@Override
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
list.add("Kaboom!");
list.add("");
list.add("Ammo: Rockets");
list.add("Projectiles explodes on impact.");
}
}

View File

@ -165,6 +165,11 @@ public class GunXVL1456 extends Item {
list.add("to shoot tauons,");
list.add("sneak to charge up for");
list.add("stronger shots!");
list.add("");
list.add("Ammo: Depleted Uranium");
list.add("Damage: 35 - 45");
list.add("Charged Damage: 40 - 400");
list.add("Projectiles penetrate walls.");
}
}

View File

@ -202,5 +202,10 @@ public class GunZOMG extends Item {
} else {
list.add("Gun not validated.");
}
list.add("");
list.add("Ammo: None (Requires Validation)");
list.add("Damage: 35 - 45");
list.add("Energy Damage: 10000 - 100000");
list.add("Energy projectiles destroy blocks.");
}
}

View File

@ -361,7 +361,7 @@ public class ItemCustomLore extends Item {
return EnumRarity.rare;
}
if(this == ModItems.gun_revolver_cursed_ammo)
if(this == ModItems.gun_revolver_cursed_ammo || this == ModItems.plate_paa || this == ModItems.gun_pm_ammo)
{
return EnumRarity.uncommon;
}

View File

@ -0,0 +1,88 @@
package com.hbm.items;
import java.util.List;
import com.hbm.interfaces.IBomb;
import com.hbm.lib.Library;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.ChatComponentText;
import net.minecraft.world.World;
public class ItemRamManipulator extends Item {
@Override
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
list.add("A broken remote.");
if (itemstack.getTagCompound() == null) {
} else {
list.add("");
list.add(String.valueOf(itemstack.stackTagCompound.getInteger("code")));
}
}
@Override
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int p_77648_7_,
float p_77648_8_, float p_77648_9_, float p_77648_10_) {
if (stack.stackTagCompound == null) {
stack.stackTagCompound = new NBTTagCompound();
}
if (!player.isSneaking()) {
if (world.isRemote) {
player.addChatMessage(new ChatComponentText("Position set!"));
}
Block block = world.getBlock(x, y, z);
if(block == Blocks.dirt)
stack.stackTagCompound.setInteger("code", stack.stackTagCompound.getInteger("code") * 10 + 0);
if(block == Blocks.cobblestone)
stack.stackTagCompound.setInteger("code", stack.stackTagCompound.getInteger("code") * 10 + 1);
if(block == Blocks.stone)
stack.stackTagCompound.setInteger("code", stack.stackTagCompound.getInteger("code") * 10 + 2);
if(block == Blocks.log)
stack.stackTagCompound.setInteger("code", stack.stackTagCompound.getInteger("code") * 10 + 3);
if(block == Blocks.planks)
stack.stackTagCompound.setInteger("code", stack.stackTagCompound.getInteger("code") * 10 + 4);
if(block == Blocks.gravel)
stack.stackTagCompound.setInteger("code", stack.stackTagCompound.getInteger("code") * 10 + 5);
if(block == Blocks.sand)
stack.stackTagCompound.setInteger("code", stack.stackTagCompound.getInteger("code") * 10 + 6);
if(block == Blocks.sandstone)
stack.stackTagCompound.setInteger("code", stack.stackTagCompound.getInteger("code") * 10 + 7);
if(block == Blocks.tallgrass)
stack.stackTagCompound.setInteger("code", stack.stackTagCompound.getInteger("code") * 10 + 8);
if(block == Blocks.double_plant)
stack.stackTagCompound.setInteger("code", stack.stackTagCompound.getInteger("code") * 10 + 9);
return true;
}
return false;
}
@Override
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
if (stack.stackTagCompound == null) {
} else {
if(!player.isSneaking())
{
if(Library.getItemByCode(stack.stackTagCompound.getInteger("code")) != null)
player.inventory.addItemStackToInventory(new ItemStack((Library.getItemByCode(stack.stackTagCompound.getInteger("code")))));
} else {
stack.stackTagCompound.setInteger("code", 0);
}
}
return stack;
}
}

View File

@ -97,6 +97,8 @@ public class ModItems {
public static Item hazmat_cloth;
public static Item plate_advanced_alloy;
public static Item plate_combine_steel;
public static Item plate_mixed;
public static Item plate_paa;
public static Item powder_lead;
public static Item powder_neptunium;
@ -146,6 +148,7 @@ public class ModItems {
public static Item coil_advanced_alloy;
public static Item coil_advanced_torus;
public static Item wire_magnetized_tungsten;
public static Item coil_magnetized_tungsten;
public static Item circuit_aluminium;
public static Item circuit_copper;
@ -401,6 +404,8 @@ public class ModItems {
public static Item gun_osipr;
public static Item gun_osipr_ammo;
public static Item gun_osipr_ammo2;
public static Item gun_pm;
public static Item gun_pm_ammo;
public static Item gun_zomg;
public static Item gun_super_shotgun;
public static Item gun_moist_nugget;
@ -590,6 +595,7 @@ public class ModItems {
public static Item igniter;
public static Item detonator;
public static Item crate_caller;
public static Item remote;
public static Item bucket_mud;
@ -674,6 +680,8 @@ public class ModItems {
coil_advanced_torus = new Item().setUnlocalizedName("coil_advanced_torus").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":coil_advanced_torus");
ingot_magnetized_tungsten = new Item().setUnlocalizedName("ingot_magnetized_tungsten").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":ingot_magnetized_tungsten");
ingot_combine_steel = new ItemCustomLore().setUnlocalizedName("ingot_combine_steel").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":ingot_combine_steel");
plate_mixed = new Item().setUnlocalizedName("plate_mixed").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":plate_mixed");
plate_paa = new ItemCustomLore().setUnlocalizedName("plate_paa").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":plate_paa");
nugget_uranium = new Item().setUnlocalizedName("nugget_uranium").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":nugget_uranium");
nugget_u235 = new Item().setUnlocalizedName("nugget_u235").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":nugget_uranium");
@ -741,6 +749,7 @@ public class ModItems {
wire_gold = new Item().setUnlocalizedName("wire_gold").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":wire_gold");
wire_schrabidium = new ItemCustomLore().setUnlocalizedName("wire_schrabidium").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":wire_schrabidium");
wire_magnetized_tungsten = new Item().setUnlocalizedName("wire_magnetized_tungsten").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":wire_magnetized_tungsten");
coil_magnetized_tungsten = new Item().setUnlocalizedName("coil_magnetized_tungsten").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":coil_magnetized_tungsten");
cap_aluminium = new Item().setUnlocalizedName("cap_aluminium").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":cap_aluminium");
hull_small_steel = new Item().setUnlocalizedName("hull_small_steel").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":hull_small_steel");
@ -968,8 +977,8 @@ public class ModItems {
missile_endo = new Item().setUnlocalizedName("missile_endo").setMaxStackSize(1).setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":missile_endo");
missile_exo = new Item().setUnlocalizedName("missile_exo").setMaxStackSize(1).setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":missile_exo");
gun_rpg = new GunRpg().setUnlocalizedName("gun_rpg").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_rpg");
gun_rpg_ammo = new Item().setUnlocalizedName("gun_rpg_ammo").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_rpg_ammo");
gun_rpg = new GunRpg().setUnlocalizedName("gun_rpg").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_rpg_new");
gun_rpg_ammo = new Item().setUnlocalizedName("gun_rpg_ammo").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_rpg_ammo_new");
gun_revolver_ammo = new Item().setUnlocalizedName("gun_revolver_ammo").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_revolver_ammo");
gun_revolver = new GunRevolver(gun_revolver_ammo, 10, 25, false, false).setMaxDamage(500).setUnlocalizedName("gun_revolver").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_revolver");
gun_revolver_iron_ammo = new Item().setUnlocalizedName("gun_revolver_iron_ammo").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_revolver_iron_ammo");
@ -989,6 +998,8 @@ public class ModItems {
gun_osipr_ammo = new Item().setUnlocalizedName("gun_osipr_ammo").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_osipr_ammo");
gun_osipr_ammo2 = new Item().setUnlocalizedName("gun_osipr_ammo2").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_osipr_ammo2");
gun_osipr = new GunOSIPR().setUnlocalizedName("gun_osipr").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_osipr");
gun_pm_ammo = new ItemCustomLore().setUnlocalizedName("gun_pm_ammo").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_pm_ammo");
gun_pm = new GunPM().setUnlocalizedName("gun_pm").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_pm");
gun_zomg = new GunZOMG().setUnlocalizedName("gun_zomg").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_zomg");
gun_super_shotgun = new ItemCustomLore().setUnlocalizedName("gun_super_shotgun").setMaxStackSize(1).setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_super_shotgun");
gun_moist_nugget = new ItemNugget(3, false).setUnlocalizedName("gun_moist_nugget").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_moist_nugget");
@ -1101,6 +1112,7 @@ public class ModItems {
igniter = new ItemCustomLore().setUnlocalizedName("igniter").setMaxStackSize(1).setFull3D().setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":trigger");
detonator = new ItemDetonator().setUnlocalizedName("detonator").setMaxStackSize(1).setFull3D().setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":detonator");
crate_caller = new ItemCrateCaller().setUnlocalizedName("crate_caller").setMaxStackSize(1).setFull3D().setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":crate_caller");
remote = new ItemRamManipulator().setUnlocalizedName("remote").setMaxStackSize(1).setFull3D().setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":remote");
euphemium_helmet = new ArmorEuphemium(MainRegistry.enumArmorMaterialEuphemium, 6, 0).setUnlocalizedName("euphemium_helmet").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":euphemium_helmet");
euphemium_plate = new ArmorEuphemium(MainRegistry.enumArmorMaterialEuphemium, 6, 1).setUnlocalizedName("euphemium_plate").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":euphemium_plate");
@ -1173,7 +1185,7 @@ public class ModItems {
schrabidium_hammer = new WeaponSpecial(MainRegistry.enumToolMaterialHammer).setUnlocalizedName("schrabidium_hammer").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":schrabidium_hammer");
euphemium_stopper = new ItemSyringe().setUnlocalizedName("euphemium_stopper").setMaxStackSize(1).setFull3D().setTextureName(RefStrings.MODID + ":euphemium_stopper");
matchstick = new ItemMatch().setUnlocalizedName("matchstick").setCreativeTab(CreativeTabs.tabTools).setFull3D().setTextureName(RefStrings.MODID + ":matchstick");
crowbar = new ModSword(MainRegistry.enumToolMaterialTitanium).setUnlocalizedName("crowbar").setFull3D().setTextureName(RefStrings.MODID + ":crowbar");
crowbar = new ModSword(MainRegistry.enumToolMaterialSteel).setUnlocalizedName("crowbar").setFull3D().setTextureName(RefStrings.MODID + ":crowbar");
bucket_mud = new ItemModBucket(ModBlocks.mud_block).setUnlocalizedName("bucket_mud").setContainerItem(Items.bucket).setCreativeTab(MainRegistry.tabBlock).setTextureName(RefStrings.MODID + ":bucket_mud");
@ -1315,6 +1327,8 @@ public class ModItems {
GameRegistry.registerItem(neutron_reflector, neutron_reflector.getUnlocalizedName());
GameRegistry.registerItem(plate_schrabidium, plate_schrabidium.getUnlocalizedName());
GameRegistry.registerItem(plate_combine_steel, plate_combine_steel.getUnlocalizedName());
GameRegistry.registerItem(plate_mixed, plate_mixed.getUnlocalizedName());
GameRegistry.registerItem(plate_paa, plate_paa.getUnlocalizedName());
GameRegistry.registerItem(hazmat_cloth, hazmat_cloth.getUnlocalizedName());
//Wires
@ -1326,6 +1340,7 @@ public class ModItems {
GameRegistry.registerItem(wire_gold, wire_gold.getUnlocalizedName());
GameRegistry.registerItem(wire_schrabidium, wire_schrabidium.getUnlocalizedName());
GameRegistry.registerItem(wire_magnetized_tungsten, wire_magnetized_tungsten.getUnlocalizedName());
GameRegistry.registerItem(coil_magnetized_tungsten, coil_magnetized_tungsten.getUnlocalizedName());
//Parts
GameRegistry.registerItem(coil_copper, coil_copper.getUnlocalizedName());
@ -1610,6 +1625,7 @@ public class ModItems {
GameRegistry.registerItem(gun_fatman, gun_fatman.getUnlocalizedName());
GameRegistry.registerItem(gun_xvl1456, gun_xvl1456.getUnlocalizedName());
GameRegistry.registerItem(gun_osipr, gun_osipr.getUnlocalizedName());
GameRegistry.registerItem(gun_pm, gun_pm.getUnlocalizedName());
GameRegistry.registerItem(gun_zomg, gun_zomg.getUnlocalizedName());
GameRegistry.registerItem(gun_super_shotgun, gun_super_shotgun.getUnlocalizedName());
GameRegistry.registerItem(gun_moist_nugget, gun_moist_nugget.getUnlocalizedName());
@ -1626,6 +1642,7 @@ public class ModItems {
GameRegistry.registerItem(gun_xvl1456_ammo, gun_xvl1456_ammo.getUnlocalizedName());
GameRegistry.registerItem(gun_osipr_ammo, gun_osipr_ammo.getUnlocalizedName());
GameRegistry.registerItem(gun_osipr_ammo2, gun_osipr_ammo2.getUnlocalizedName());
GameRegistry.registerItem(gun_pm_ammo, gun_pm_ammo.getUnlocalizedName());
//Clips
GameRegistry.registerItem(clip_revolver_iron, clip_revolver_iron.getUnlocalizedName());
@ -1797,6 +1814,7 @@ public class ModItems {
GameRegistry.registerItem(wand, wand.getUnlocalizedName());
GameRegistry.registerItem(wand_s, wand_s.getUnlocalizedName());
GameRegistry.registerItem(wand_d, wand_d.getUnlocalizedName());
GameRegistry.registerItem(remote, remote.getUnlocalizedName());
GameRegistry.registerItem(euphemium_stopper, euphemium_stopper.getUnlocalizedName());
//Kits

View File

@ -17,6 +17,7 @@ import com.hbm.tileentity.TileEntityMachineDeuterium;
import com.hbm.tileentity.TileEntityMachineElectricFurnace;
import com.hbm.tileentity.TileEntityWireCoated;
import net.minecraft.block.Block;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
@ -245,4 +246,18 @@ public class Library {
return entityplayer;
}
public static Item getItemByCode(int i) {
if(i == 1337)
return ModItems.schrabidium_hammer;
if(i == 234)
return ModItems.euphemium_kit;
if(i == 69)
return ModItems.nuke_advanced_kit;
if(i == 34)
return ModItems.t45_kit;
return null;
}
}

View File

@ -63,6 +63,7 @@ import com.hbm.render.ItemRenderBigSword;
import com.hbm.render.ItemRenderDecoBlock;
import com.hbm.render.ItemRenderFatMan;
import com.hbm.render.ItemRenderMiniNuke;
import com.hbm.render.ItemRenderOSIPR;
import com.hbm.render.ItemRenderPoleTop;
import com.hbm.render.ItemRenderRedstoneSword;
import com.hbm.render.ItemRenderRevolver;
@ -187,7 +188,7 @@ public class ClientProxy extends ServerProxy
RenderingRegistry.registerEntityRenderingHandler(EntityRocket.class, new RenderSnowball(ModItems.man_core));
MinecraftForgeClient.registerItemRenderer(ModItems.gun_rpg, new ItemRenderRpg());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_rpg_ammo, new ItemRenderRocket());
//MinecraftForgeClient.registerItemRenderer(ModItems.gun_rpg_ammo, new ItemRenderRocket());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBombMulti.class, new RenderBombMulti());
@ -243,6 +244,7 @@ public class ClientProxy extends ServerProxy
MinecraftForgeClient.registerItemRenderer(ModItems.gun_fatman, new ItemRenderFatMan());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_xvl1456, new ItemRenderXVL1456());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_zomg, new ItemRenderZOMG());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_osipr, new ItemRenderOSIPR());
RenderingRegistry.registerEntityRenderingHandler(EntityBullet.class, new RenderRocket());
RenderingRegistry.registerEntityRenderingHandler(EntityMiniNuke.class, new RenderMiniNuke());

View File

@ -452,8 +452,8 @@ public class CraftingManager {
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_revolver_gold_ammo, 16), new Object[] { "L", "S", 'L', ModItems.plate_gold, 'S', Items.gunpowder }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_revolver_schrabidium, 1), new Object[] { "SSS", " RW", 'S', ModItems.plate_schrabidium, 'W', "ingotTungsten", 'R', ModItems.wire_schrabidium }));
GameRegistry.addRecipe(new ItemStack(ModItems.gun_revolver_schrabidium_ammo, 16), new Object[] { "L", "S", 'L', ModItems.plate_schrabidium, 'S', Items.gunpowder });
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_revolver_cursed, 1), new Object[] { "TTT", "SRI", 'S', "plateSteel", 'I', "ingotSteel", 'R', ModItems.wire_red_copper, 'T', "plateTitanium" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_revolver_cursed_ammo, 16), new Object[] { "L", "S", 'L', "plateSteel", 'S', Items.gunpowder }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_revolver_cursed, 1), new Object[] { "TTM", "SRI", 'S', "plateSteel", 'I', "ingotSteel", 'R', ModItems.wire_red_copper, 'T', "plateTitanium", 'M', ModItems.motor }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_revolver_cursed_ammo, 32), new Object[] { "L", "L", 'L', "plateSteel", 'S', Items.gunpowder }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_fatman, 1), new Object[] { "SSI", "III", "WPH", 'S', "plateSteel", 'I', "ingotSteel", 'W', ModItems.wire_aluminium, 'H', ModItems.hull_small_steel, 'P', Item.getItemFromBlock(Blocks.piston) }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_fatman_ammo, 2), new Object[] { " S ", "SPS", "ITI", 'S', "plateSteel", 'P', ModItems.ingot_pu239, 'T', Item.getItemFromBlock(Blocks.tnt), 'I', "plateIron" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_xvl1456, 1), new Object[] { "PBB", "ACC", "PRY", 'P', "plateSteel", 'R', ModItems.redcoil_capacitor, 'A', ModItems.coil_advanced_alloy, 'B', ModItems.battery_generic, 'C', ModItems.coil_advanced_torus, 'Y', ModItems.circuit_copper }));

View File

@ -229,8 +229,13 @@ public class MainRegistry
proxy.registerRenderInfo();
HbmWorld.mainRegistry();
GameRegistry.registerFuelHandler(new FuelHandler());
Library.superuser.add("192af5d7-ed0f-48d8-bd89-9d41af8524f8");
Library.superuser.add("5aee1e3d-3767-4987-a222-e7ce1fbdf88e");
Library.superuser.add("937c9804-e11f-4ad2-a5b1-42e62ac73077");
Library.superuser.add("3af1c262-61c0-4b12-a4cb-424cc3a9c8c0");
Library.superuser.add("4729b498-a81c-42fd-8acd-20d6d9f759e0");
Library.superuser.add("c3f5e449-6d8c-4fe3-acc9-47ef50e7e7ae");
enumArmorMaterialSchrabidium.customCraftingMaterial = ModItems.ingot_schrabidium;
enumArmorMaterialHazmat.customCraftingMaterial = ModItems.hazmat_cloth;
@ -431,7 +436,7 @@ public class MainRegistry
OreDictionary.registerOre("dustRedstoneAlloy", ModItems.powder_red_copper);
OreDictionary.registerOre("dustSteel", ModItems.powder_steel);
OreDictionary.registerOre("dustLithium", ModItems.powder_lithium);
OreDictionary.registerOre("dustQuartz", ModItems.powder_quartz);
OreDictionary.registerOre("dustNetherQuartz", ModItems.powder_quartz);
OreDictionary.registerOre("gemCoal", Items.coal);
@ -476,12 +481,20 @@ public class MainRegistry
recipes.registerEverythingImSrs();
recipes.addRecipes();
recipes.removeDuplicates();
recipes.overridePreSetRecipe(new ItemStack(ModItems.scrap), new ItemStack(ModItems.dust));
recipes.overridePreSetRecipe(new ItemStack(ModItems.dust), new ItemStack(ModItems.dust));
recipes.overridePreSetRecipe(new ItemStack(Blocks.glowstone), new ItemStack(Items.glowstone_dust, 4));
recipes.overridePreSetRecipe(new ItemStack(Items.dye, 1, 4), new ItemStack(ModItems.powder_lapis));
recipes.overridePreSetRecipe(new ItemStack(Blocks.quartz_block), new ItemStack(ModItems.powder_quartz));
recipes.overridePreSetRecipe(new ItemStack(Blocks.quartz_block, 1, 0), new ItemStack(ModItems.powder_quartz, 4));
recipes.overridePreSetRecipe(new ItemStack(Blocks.quartz_block, 1, 1), new ItemStack(ModItems.powder_quartz, 4));
recipes.overridePreSetRecipe(new ItemStack(Blocks.quartz_block, 1, 2), new ItemStack(ModItems.powder_quartz, 4));
recipes.overridePreSetRecipe(new ItemStack(Blocks.quartz_stairs), new ItemStack(ModItems.powder_quartz, 3));
recipes.overridePreSetRecipe(new ItemStack(Blocks.stone_slab, 1, 7), new ItemStack(ModItems.powder_quartz, 2));
recipes.overridePreSetRecipe(new ItemStack(Items.quartz), new ItemStack(ModItems.powder_quartz));
recipes.overridePreSetRecipe(new ItemStack(Blocks.quartz_ore), new ItemStack(ModItems.powder_quartz, 2));
recipes.PrintRecipes();
}

View File

@ -5,6 +5,7 @@ import com.hbm.gui.GUITestDiFurnace;
import com.hbm.handler.AlloyFurnaceRecipeHandler;
import com.hbm.handler.CentrifugeRecipeHandler;
import com.hbm.handler.ReactorRecipeHandler;
import com.hbm.handler.ShredderRecipeHandler;
import com.hbm.items.ModItems;
import com.hbm.lib.RefStrings;
@ -23,6 +24,8 @@ public class NEIConfig implements IConfigureNEI {
API.registerUsageHandler(new CentrifugeRecipeHandler());
API.registerRecipeHandler(new ReactorRecipeHandler());
API.registerUsageHandler(new ReactorRecipeHandler());
API.registerRecipeHandler(new ShredderRecipeHandler());
API.registerUsageHandler(new ShredderRecipeHandler());
//Some things are even beyond my control...or are they?
API.hideItem(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_coal_on)));

View File

@ -0,0 +1,72 @@
package com.hbm.render;
import org.lwjgl.opengl.GL11;
import com.hbm.lib.RefStrings;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.Entity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.IItemRenderer;
import net.minecraftforge.client.IItemRenderer.ItemRenderType;
import net.minecraftforge.client.IItemRenderer.ItemRendererHelper;
public class ItemRenderOSIPR implements IItemRenderer {
protected ModelOSIPR swordModel;
public ItemRenderOSIPR() {
swordModel = new ModelOSIPR();
}
@Override
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
switch(type) {
case EQUIPPED:
case EQUIPPED_FIRST_PERSON:
case ENTITY:
return true;
default: return false;
}
}
@Override
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
return false;
}
@Override
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
switch(type) {
case EQUIPPED_FIRST_PERSON:
GL11.glPushMatrix();
GL11.glEnable(GL11.GL_CULL_FACE);
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelOSIPR.png"));
GL11.glRotatef(-135.0F, 0.0F, 0.0F, 1.0F);
GL11.glTranslatef(-0.5F, 0.0F, -0.2F);
//GL11.glScalef(2.0F, 2.0F, 2.0F);
GL11.glScalef(0.5F, 0.5F, 0.5F);
GL11.glTranslatef(-0.4F, -0.1F, -0.1F);
swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
GL11.glPopMatrix();
break;
case EQUIPPED:
case ENTITY:
GL11.glPushMatrix();
GL11.glEnable(GL11.GL_CULL_FACE);
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelOSIPR.png"));
GL11.glRotatef(-200.0F, 0.0F, 0.0F, 1.0F);
GL11.glRotatef(75.0F, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(-30.0F, 1.0F, 0.0F, 0.0F);
GL11.glTranslatef(0.0F, -0.2F, -0.5F);
GL11.glRotatef(-5.0F, 0.0F, 0.0F, 1.0F);
GL11.glTranslatef(0.5F, -0.2F, 0.0F);
//GL11.glScalef(1.5F, 1.5F, 1.5F);
GL11.glTranslatef(-0.4F, -0.1F, -0.1F);
swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
GL11.glPopMatrix();
default: break;
}
}
}

View File

@ -12,10 +12,10 @@ import net.minecraftforge.client.IItemRenderer;
public class ItemRenderRpg implements IItemRenderer {
protected ModelRPG swordModel;
protected ModelAt4 swordModel;
public ItemRenderRpg() {
swordModel = new ModelRPG();
swordModel = new ModelAt4();
}
@Override
@ -39,22 +39,25 @@ public class ItemRenderRpg implements IItemRenderer {
switch(type) {
case EQUIPPED_FIRST_PERSON:
GL11.glPushMatrix();
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelRPG.png"));
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/At4New.png"));
GL11.glRotatef(-135.0F, 0.0F, 0.0F, 1.0F);
GL11.glTranslatef(-1.0F, 0.0F, -0.2F);
GL11.glTranslatef(-0.5F, 0.0F, -0.2F);
GL11.glScalef(2.0F, 2.0F, 2.0F);
GL11.glScalef(0.5F, 0.5F, 0.5F);
swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
GL11.glPopMatrix();
break;
case EQUIPPED:
case ENTITY:
GL11.glPushMatrix();
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelRPG.png"));
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/At4New.png"));
GL11.glRotatef(-200.0F, 0.0F, 0.0F, 1.0F);
GL11.glRotatef(75.0F, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(-30.0F, 1.0F, 0.0F, 0.0F);
GL11.glTranslatef(0.0F, -0.2F, -0.5F);
GL11.glScalef(2.0F, 2.0F, 2.0F);
GL11.glRotatef(-5.0F, 0.0F, 0.0F, 1.0F);
GL11.glTranslatef(0.2F, -0.2F, 0.0F);
GL11.glScalef(1.5F, 1.5F, 1.5F);
swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
GL11.glPopMatrix();
default: break;

View File

@ -0,0 +1,132 @@
// Date: 06.04.2016 17:39:42
// Template version 1.1
// Java generated by Techne
// Keep in mind that you still need to fill in some blanks
// - ZeuX
package com.hbm.render;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
public class ModelAt4 extends ModelBase
{
//fields
ModelRenderer Shape1;
ModelRenderer Shape2;
ModelRenderer Shape3;
ModelRenderer Shape4;
ModelRenderer Shape5;
ModelRenderer Shape6;
ModelRenderer Shape7;
ModelRenderer Shape8;
ModelRenderer Shape9;
public ModelAt4()
{
textureWidth = 64;
textureHeight = 32;
Shape1 = new ModelRenderer(this, 0, 0);
Shape1.addBox(0F, 0F, 0F, 18, 3, 2);
Shape1.setRotationPoint(-8F, 0F, 0F);
Shape1.setTextureSize(64, 32);
Shape1.mirror = true;
setRotation(Shape1, 0F, 0F, 0F);
Shape2 = new ModelRenderer(this, 0, 5);
Shape2.addBox(0F, 0F, 0F, 18, 2, 3);
Shape2.setRotationPoint(-8F, 0.5F, -0.5F);
Shape2.setTextureSize(64, 32);
Shape2.mirror = true;
setRotation(Shape2, 0F, 0F, 0F);
Shape3 = new ModelRenderer(this, 0, 10);
Shape3.addBox(0F, 0F, 0F, 3, 4, 4);
Shape3.setRotationPoint(10F, -0.5F, -1F);
Shape3.setTextureSize(64, 32);
Shape3.mirror = true;
setRotation(Shape3, 0F, 0F, 0F);
Shape4 = new ModelRenderer(this, 0, 18);
Shape4.addBox(0F, 0F, 0F, 1, 3, 3);
Shape4.setRotationPoint(-9F, 0F, -0.5F);
Shape4.setTextureSize(64, 32);
Shape4.mirror = true;
setRotation(Shape4, 0F, 0F, 0F);
Shape5 = new ModelRenderer(this, 14, 10);
Shape5.addBox(0F, 0F, 0F, 1, 4, 4);
Shape5.setRotationPoint(-10F, -0.5F, -1F);
Shape5.setTextureSize(64, 32);
Shape5.mirror = true;
setRotation(Shape5, 0F, 0F, 0F);
Shape6 = new ModelRenderer(this, 0, 24);
Shape6.addBox(0F, 0F, 0F, 1, 3, 1);
Shape6.setRotationPoint(-6F, 3F, 0.5F);
Shape6.setTextureSize(64, 32);
Shape6.mirror = true;
setRotation(Shape6, 0F, 0F, 0F);
Shape7 = new ModelRenderer(this, 4, 24);
Shape7.addBox(0F, 0F, 0F, 1, 2, 1);
Shape7.setRotationPoint(-3F, 3F, 0.5F);
Shape7.setTextureSize(64, 32);
Shape7.mirror = true;
setRotation(Shape7, 0F, 0F, 0F);
Shape8 = new ModelRenderer(this, 8, 18);
Shape8.addBox(0F, 0F, 0F, 3, 1, 1);
Shape8.setRotationPoint(-6F, -0.5F, -2F);
Shape8.setTextureSize(64, 32);
Shape8.mirror = true;
setRotation(Shape8, 0F, 0F, 0F);
Shape9 = new ModelRenderer(this, 0, 28);
Shape9.addBox(0F, 0F, 0F, 1, 1, 2);
Shape9.setRotationPoint(-5F, 0F, -1.5F);
Shape9.setTextureSize(64, 32);
Shape9.mirror = true;
setRotation(Shape9, 0F, 0F, 0F);
}
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
{
super.render(entity, f, f1, f2, f3, f4, f5);
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
Shape1.render(f5);
Shape2.render(f5);
Shape3.render(f5);
Shape4.render(f5);
Shape5.render(f5);
Shape6.render(f5);
Shape7.render(f5);
Shape8.render(f5);
Shape9.render(f5);
}
public void renderModel(float f5)
{
Shape1.render(f5);
Shape2.render(f5);
Shape3.render(f5);
Shape4.render(f5);
Shape5.render(f5);
Shape6.render(f5);
Shape7.render(f5);
Shape8.render(f5);
Shape9.render(f5);
}
private void setRotation(ModelRenderer model, float x, float y, float z)
{
model.rotateAngleX = x;
model.rotateAngleY = y;
model.rotateAngleZ = z;
}
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity)
{
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
}
}

View File

@ -493,7 +493,7 @@ public class ModelHunterChopper extends ModelBase {
public void setGunRotations(EntityHunterChopper rocket, float yaw, float pitch) {
setRotation(GunBarrel, 0F, (rocket.getYaw() - yaw) / (180F / (float)Math.PI), (rocket.getPitch() - pitch) / (180F / (float)Math.PI));
setRotation(GunBack, 0F, (rocket.getYaw() - yaw) / (180F / (float)Math.PI), (rocket.getPitch() - pitch) / (180F / (float)Math.PI));
System.out.println(rocket.getYaw());
//System.out.println(rocket.getYaw());
}
}

View File

@ -0,0 +1,247 @@
// Date: 29.08.2016 09:41:02
// Template version 1.1
// Java generated by Techne
// Keep in mind that you still need to fill in some blanks
// - ZeuX
package com.hbm.render;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
public class ModelOSIPR extends ModelBase {
// fields
ModelRenderer Shape1;
ModelRenderer Shape2;
ModelRenderer Shape3;
ModelRenderer Shape4;
ModelRenderer Shape5;
ModelRenderer Shape6;
ModelRenderer Shape7;
ModelRenderer Shape8;
ModelRenderer Shape9;
ModelRenderer Shape10;
ModelRenderer Shape11;
ModelRenderer Shape12;
ModelRenderer Shape13;
ModelRenderer Shape14;
ModelRenderer Shape15;
ModelRenderer Shape16;
ModelRenderer Shape17;
ModelRenderer Shape18;
ModelRenderer Shape19;
ModelRenderer Shape20;
ModelRenderer Shape21;
ModelRenderer Shape22;
ModelRenderer Shape23;
public ModelOSIPR() {
textureWidth = 64;
textureHeight = 64;
Shape1 = new ModelRenderer(this, 0, 0);
Shape1.addBox(0F, 0F, 0F, 8, 3, 3);
Shape1.setRotationPoint(0F, 0F, -0.5F);
Shape1.setTextureSize(64, 64);
Shape1.mirror = true;
setRotation(Shape1, 0F, 0F, 0F);
Shape2 = new ModelRenderer(this, 0, 6);
Shape2.addBox(0F, 0F, 0F, 11, 2, 2);
Shape2.setRotationPoint(8F, 0F, 0F);
Shape2.setTextureSize(64, 64);
Shape2.mirror = true;
setRotation(Shape2, 0F, 0F, 0F);
Shape3 = new ModelRenderer(this, 0, 10);
Shape3.addBox(0F, 0F, 0F, 2, 3, 2);
Shape3.setRotationPoint(17F, 2F, 0F);
Shape3.setTextureSize(64, 64);
Shape3.mirror = true;
setRotation(Shape3, 0F, 0F, 0F);
Shape4 = new ModelRenderer(this, 0, 15);
Shape4.addBox(-5F, -3F, 0F, 5, 3, 2);
Shape4.setRotationPoint(17F, 5F, 0F);
Shape4.setTextureSize(64, 64);
Shape4.mirror = true;
setRotation(Shape4, 0F, 0F, 0.4363323F);
Shape5 = new ModelRenderer(this, 8, 10);
Shape5.addBox(-8F, -1F, 0F, 3, 1, 2);
Shape5.setRotationPoint(17F, 5F, 0F);
Shape5.setTextureSize(64, 64);
Shape5.mirror = true;
setRotation(Shape5, 0F, 0F, 0.4363323F);
Shape6 = new ModelRenderer(this, 30, 0);
Shape6.addBox(0F, 0F, 0F, 10, 2, 2);
Shape6.setRotationPoint(-10F, 0.5F, 0F);
Shape6.setTextureSize(64, 64);
Shape6.mirror = true;
setRotation(Shape6, 0F, 0F, 0F);
Shape7 = new ModelRenderer(this, 54, 0);
Shape7.addBox(0F, 0F, 0F, 3, 2, 1);
Shape7.setRotationPoint(-13F, 0.5F, 0.5F);
Shape7.setTextureSize(64, 64);
Shape7.mirror = true;
setRotation(Shape7, 0F, 0F, 0F);
Shape8 = new ModelRenderer(this, 30, 4);
Shape8.addBox(0F, 0F, 0F, 10, 3, 3);
Shape8.setRotationPoint(-16F, 2F, -0.5F);
Shape8.setTextureSize(64, 64);
Shape8.mirror = true;
setRotation(Shape8, 0F, 0F, 0F);
Shape9 = new ModelRenderer(this, 30, 10);
Shape9.addBox(0F, 0F, 0F, 3, 1, 3);
Shape9.setRotationPoint(-19F, 4F, -0.5F);
Shape9.setTextureSize(64, 64);
Shape9.mirror = true;
setRotation(Shape9, 0F, 0F, 0F);
Shape10 = new ModelRenderer(this, 42, 10);
Shape10.addBox(0F, 0F, 0F, 3, 1, 3);
Shape10.setRotationPoint(-19F, 2F, -0.5F);
Shape10.setTextureSize(64, 64);
Shape10.mirror = true;
setRotation(Shape10, 0F, 0F, 0F);
Shape11 = new ModelRenderer(this, 0, 20);
Shape11.addBox(0F, 0F, 0F, 1, 1, 2);
Shape11.setRotationPoint(8F, -1F, 0F);
Shape11.setTextureSize(64, 64);
Shape11.mirror = true;
setRotation(Shape11, 0F, 0F, 0F);
Shape12 = new ModelRenderer(this, 30, 14);
Shape12.addBox(0F, 0F, 0F, 7, 3, 2);
Shape12.setRotationPoint(0F, 3F, 0F);
Shape12.setTextureSize(64, 64);
Shape12.mirror = true;
setRotation(Shape12, 0F, 0F, 0F);
Shape13 = new ModelRenderer(this, 30, 19);
Shape13.addBox(0F, -2F, 0F, 5, 2, 2);
Shape13.setRotationPoint(7F, 6F, 0F);
Shape13.setTextureSize(64, 64);
Shape13.mirror = true;
setRotation(Shape13, 0F, 0F, -0.9599311F);
Shape14 = new ModelRenderer(this, 30, 23);
Shape14.addBox(0F, 0F, 0F, 2, 5, 1);
Shape14.setRotationPoint(5F, 6F, 0.5F);
Shape14.setTextureSize(64, 64);
Shape14.mirror = true;
setRotation(Shape14, 0F, 0F, -0.3490659F);
Shape15 = new ModelRenderer(this, 0, 23);
Shape15.addBox(0F, 0F, 0F, 7, 2, 1);
Shape15.setRotationPoint(-6F, 5F, 0.5F);
Shape15.setTextureSize(64, 64);
Shape15.mirror = true;
setRotation(Shape15, 0F, 0F, 0F);
Shape16 = new ModelRenderer(this, 0, 26);
Shape16.addBox(0F, 0F, 0F, 8, 1, 2);
Shape16.setRotationPoint(-6F, 7F, 0F);
Shape16.setTextureSize(64, 64);
Shape16.mirror = true;
setRotation(Shape16, 0F, 0F, 0F);
Shape17 = new ModelRenderer(this, 0, 29);
Shape17.addBox(0F, 0F, 0F, 3, 6, 6);
Shape17.setRotationPoint(-9F, 9F, -3F);
Shape17.setTextureSize(64, 64);
Shape17.mirror = true;
setRotation(Shape17, 0.6108652F, 0F, 0F);
Shape18 = new ModelRenderer(this, 0, 41);
Shape18.addBox(0F, 0F, 0F, 3, 6, 7);
Shape18.setRotationPoint(-9F, 8F, -4F);
Shape18.setTextureSize(64, 64);
Shape18.mirror = true;
setRotation(Shape18, 0F, 0F, 0F);
Shape19 = new ModelRenderer(this, 30, 29);
Shape19.addBox(0F, 1F, 6F, 2, 4, 3);
Shape19.setRotationPoint(-8.5F, 9F, -3F);
Shape19.setTextureSize(64, 64);
Shape19.mirror = true;
setRotation(Shape19, 0.6108652F, 0F, 0F);
Shape20 = new ModelRenderer(this, 30, 36);
Shape20.addBox(0F, 0F, 0F, 1, 6, 3);
Shape20.setRotationPoint(-8F, 1F, 3F);
Shape20.setTextureSize(64, 64);
Shape20.mirror = true;
setRotation(Shape20, 0F, 0F, 0F);
Shape21 = new ModelRenderer(this, 30, 45);
Shape21.addBox(0F, -3F, 0F, 1, 5, 4);
Shape21.setRotationPoint(-8F, 2F, 3F);
Shape21.setTextureSize(64, 64);
Shape21.mirror = true;
setRotation(Shape21, 0.9599311F, 0F, 0F);
Shape22 = new ModelRenderer(this, 0, 54);
Shape22.addBox(0F, 0F, 0F, 2, 2, 2);
Shape22.setRotationPoint(-11F, 7F, 0F);
Shape22.setTextureSize(64, 64);
Shape22.mirror = true;
setRotation(Shape22, 0F, 0F, 0F);
Shape23 = new ModelRenderer(this, 0, 58);
Shape23.addBox(-7F, -2F, 0F, 7, 2, 2);
Shape23.setRotationPoint(-11F, 9F, 0F);
Shape23.setTextureSize(64, 64);
Shape23.mirror = true;
setRotation(Shape23, 0F, 0F, 0.148353F);
}
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
super.render(entity, f, f1, f2, f3, f4, f5);
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
Shape1.render(f5);
Shape2.render(f5);
Shape3.render(f5);
Shape4.render(f5);
Shape5.render(f5);
Shape6.render(f5);
Shape7.render(f5);
Shape8.render(f5);
Shape9.render(f5);
Shape10.render(f5);
Shape11.render(f5);
Shape12.render(f5);
Shape13.render(f5);
Shape14.render(f5);
Shape15.render(f5);
Shape16.render(f5);
Shape17.render(f5);
Shape18.render(f5);
Shape19.render(f5);
Shape20.render(f5);
Shape21.render(f5);
Shape22.render(f5);
Shape23.render(f5);
}
public void renderAll(float f5) {
Shape1.render(f5);
Shape2.render(f5);
Shape3.render(f5);
Shape4.render(f5);
Shape5.render(f5);
Shape6.render(f5);
Shape7.render(f5);
Shape8.render(f5);
Shape9.render(f5);
Shape10.render(f5);
Shape11.render(f5);
Shape12.render(f5);
Shape13.render(f5);
Shape14.render(f5);
Shape15.render(f5);
Shape16.render(f5);
Shape17.render(f5);
Shape18.render(f5);
Shape19.render(f5);
Shape20.render(f5);
Shape21.render(f5);
Shape22.render(f5);
Shape23.render(f5);
}
private void setRotation(ModelRenderer model, float x, float y, float z) {
model.rotateAngleX = x;
model.rotateAngleY = y;
model.rotateAngleZ = z;
}
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) {
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
}
}

View File

@ -49,7 +49,7 @@ public class RenderRainbow extends Render {
if (color < 0)
color = 0;
tessellator.startDrawingQuads();
tessellator.setColorRGBA_F(red ? 1 : color, color, blue ? 1 : color, 1f);
tessellator.setColorRGBA_F(red ? 1 : color, green ? 1 : color, blue ? 1 : color, 1f);
tessellator.addVertex(0 + o, 0 - o, 0);
tessellator.addVertex(0 + o, 0 + o, 0);
tessellator.addVertex(0 + o, 0 + o, 0 + distance);