Jump to content

aguinmox

Members
  • Posts

    34
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

aguinmox's Achievements

Tree Puncher

Tree Puncher (2/8)

1

Reputation

  1. But which of the two is the most convenient if I just add an NBT or i should go for IIcon?
  2. Hey @coolAlias, is that possible to implement in the RenderBow.class i have?
  3. Hello Guys I was doing some stuff with my custom bow however Since this is a modelled one i use the animation at render of this bow. so the cycle like this - REST, START, HALF, FULL.. Now the problem is instead of being in the REST while not in use, i end up in the HALF i dont even know whats wrong with my code.. So please guys help me especially i want to finish this tonight.. Render Bow package mhfc.net.client.render.weapon.bow; import org.lwjgl.opengl.GL11; import mhfc.net.client.model.weapon.bow.ModelBHunters; import mhfc.net.common.util.lib.MHFCReference; import mhfc.net.common.weapon.range.bow.BHunters; import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; public class RenderBHunters implements IItemRenderer { private ModelBHunters weapon; public RenderBHunters() { weapon = new ModelBHunters(); } @Override public void renderItem(ItemRenderType type, ItemStack item, Object... data) { int usingItem = 72000 - ((BHunters) item.getItem()).usingItem; switch (type) { case EQUIPPED : // render in third person float scale = 1.2f; GL11.glPushMatrix(); if (((Entity) data[1] instanceof EntityPlayer)&& (((EntityPlayer) data[1]).getCurrentEquippedItem() != null)) { if (usingItem < 5) { Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(MHFCReference.weapon_bow_hunters_tex_start)); } if ((usingItem >= 5) && (usingItem < 25)) { Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(MHFCReference.weapon_bow_hunters_tex_half)); } if (usingItem >= 25) { Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(MHFCReference.weapon_bow_hunters_tex_full)); } } else { Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(MHFCReference.weapon_bow_hunters_tex_rest)); } GL11.glRotatef(00F, 1.0f, 0.0f, 0.0f); GL11.glRotatef(-90F, 0.0f, 1.0f, 0.0f); GL11.glRotatef(-180F, 0.0f, 0.0f, 1.0f); GL11.glTranslatef(-0.1F, -0.2F, -0.4F); GL11.glScalef(scale, scale, scale); weapon.renderA(null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F,0.0625F); GL11.glPopMatrix(); break; case EQUIPPED_FIRST_PERSON : // rince and repeat the rendering. adjust axis' and translation // as needed GL11.glPushMatrix(); if (((Entity) data[1] instanceof EntityPlayer)&& (((EntityPlayer) data[1]).getCurrentEquippedItem() != null)) { if (usingItem < 5) { Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(MHFCReference.weapon_bow_hunters_tex_start)); } if ((usingItem >= 5) && (usingItem < 25)) { Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(MHFCReference.weapon_bow_hunters_tex_half)); } if (usingItem >= 25) { Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(MHFCReference.weapon_bow_hunters_tex_full)); } } else { Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(MHFCReference.weapon_bow_hunters_tex_rest)); } scale = 1.5f; GL11.glScalef(scale, scale, scale); GL11.glRotatef(0F, 1.0f, 0.0f, 0.0f); GL11.glRotatef(-5F, 0.0f, 1.0f, 0.0f); GL11.glRotatef(-150F, 0.0f, 0.0f, 1.0f); //In to face or out, Up/Down , Left or Right <-- positive/negative GL11.glTranslatef(-1.1F, -0.6F, 0.5F); weapon.render((Entity) data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); GL11.glPopMatrix(); break; case ENTITY : GL11.glPushMatrix(); scale = 2.4F; GL11.glScalef(scale, scale, scale); Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(MHFCReference.weapon_bow_hunters_tex_rest)); GL11.glRotatef(90F, 1.0f, 0.0f, 0.0f); GL11.glRotatef(0F, 0.0f, 1.0f, 0.0f); GL11.glRotatef(45F, 0.0f, 0.0f, 1.0f); GL11.glTranslatef(0F, -0.6F, -0.1F); weapon.render((Entity) data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); GL11.glPopMatrix(); break; case INVENTORY : GL11.glPushMatrix(); scale = 1.0F; GL11.glScalef(scale, scale, scale); Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(MHFCReference.weapon_bow_hunters_tex_rest)); GL11.glRotatef(200F, 1.0f, 0.0f, 0.0f); GL11.glRotatef(-80F, 0.0f, 1.0f, 0.0f); GL11.glTranslatef(0.1F, -0.0F, -0.1F); // this is a method made by me in my model class to render only // the modelparts, without an entity argument, because in your // inventory, //the entity is always null. weapon.renderRest(0.0625F); GL11.glPopMatrix(); break; default : break; } } @Override public boolean handleRenderType(ItemStack item, ItemRenderType type) { return true; } @Override public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) { switch (type) { case INVENTORY : return true; default : break; } return false; } } package mhfc.net.common.weapon.range.bow; import java.util.List; import java.util.Random; import cpw.mods.fml.common.FMLLog; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import mhfc.net.MHFCMain; import mhfc.net.common.helper.MHFCWeaponClassingHelper; import mhfc.net.common.system.ColorSystem; import mhfc.net.common.util.Cooldown; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.projectile.EntityArrow; import net.minecraft.init.Items; import net.minecraft.item.EnumAction; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraft.world.World; public class BowClass extends Item { public static final String[] ItemNameArray = new String[] { "bow","bow1", "bow2", "bow3" }; protected boolean poisontype, firetype, enableCooldownDisplay; protected String des1, des2, des3; // <--- Shorten the handles protected int attackdelay, rarity, meta, getcooldown; public int usingItem = 72000; @SideOnly(Side.CLIENT) public IIcon[] IconArray; public BowClass() { super(); getWeaponDescription(MHFCWeaponClassingHelper.bowname); this.maxStackSize = 1; this.setMaxDamage(1000); this.setCreativeTab(MHFCMain.mhfctabs); } public void elementalType(boolean poison, boolean fire) { poisontype = poison; firetype = fire; } @Deprecated // will rework soon public void getWeaponDescription(String title) { des1 = title; } public void getWeaponDescriptionWithMeta(String second, int rarerty, int metaData) { des2 = second; rarity = rarerty; meta = metaData; } public void getWeaponDescription(String second, int rareity) { des2 = second; rarity = rareity; } @Override @SuppressWarnings("unchecked") public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, @SuppressWarnings("rawtypes") List par3List, boolean par4) { par3List.add(ColorSystem.gold + des1); par3List.add(ColorSystem.dark_green + des2); par3List.add(ColorSystem.yellow + "Rarity: " + rarity); if (enableCooldownDisplay) Cooldown.displayAttackDelay(par1ItemStack, par3List, getcooldown); } @Override public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) { if (stack == usingItem) { if ((usingItem != null) && (usingItem.getItem() instanceof BowClass)) { if (useRemaining > 21) { return IconArray[3]; } else if (useRemaining > 14) { return IconArray[2]; } else if (useRemaining > 7) { return IconArray[1]; } } } return IconArray[0]; } @Override public IIcon getIconFromDamage(int par1) { return this.IconArray[0]; } /** * Return the enchantability factor of the item, most of the time is based * on material. */ @Override public int getItemEnchantability() { return -1; } @SideOnly(Side.CLIENT) public IIcon getItemIconForUseDuration(int par1) { return this.IconArray[par1]; } /** * returns the action that specifies what animation to play when the items * is being used */ @Override public EnumAction getItemUseAction(ItemStack par1ItemStack) { return EnumAction.bow; } /** * How long it takes to use or consume an item */ @Override public int getMaxItemUseDuration(ItemStack par1ItemStack) { return 72000; } @Override public boolean getShareTag() { return true; } @Override public ItemStack onEaten(ItemStack par1ItemStack, World par2World,EntityPlayer par3EntityPlayer) { return par1ItemStack; } /** * Called whenever this item is equipped and the right mouse button is * pressed. Args: itemStack, world, entityPlayer */ @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World,EntityPlayer player) { player.setItemInUse(par1ItemStack,this.getMaxItemUseDuration(par1ItemStack)); return par1ItemStack; } @Override public void onPlayerStoppedUsing(ItemStack stack, World par2World,EntityPlayer player, int par4) { super.onPlayerStoppedUsing(stack, par2World, player, par4); int maxItemUse = getMaxItemUseDuration(stack) - par4; boolean flag = (player.capabilities.isCreativeMode); if (player.inventory.hasItem(Items.arrow) || flag) { float f = maxItemUse / 20.0F; f = ((f * f) + (f * 2.0F)) / 3.0F; if (f < 0.5d) { return; } EntityArrow entityarrow = new EntityArrow(par2World,player, f * 2.0F); boolean crit = new Random().nextInt(10) == 0 ? true : false; entityarrow.setIsCritical(crit); if (f >= 1.0F && f <1.5F) { entityarrow.setIsCritical(true); } if (f > 1.0F) { f = 1.0F; } entityarrow.setDamage(entityarrow.getDamage()+ (flag ? 2D : 1D)); entityarrow.setKnockbackStrength(1); if (flag) { entityarrow.canBePickedUp = 2; } else { player.inventory.consumeInventoryItem(Items.arrow); } if (!par2World.isRemote) { par2World.spawnEntityInWorld(entityarrow); } stack.damageItem(1, player); par2World.playSoundAtEntity(player, "random.bow", 1.0F,(1.0F / ((itemRand.nextFloat() * 0.4F) + 1.2F))+ (f * 0.5F)); } } @Override public void onUsingTick(ItemStack stack, EntityPlayer player, int count) { player.setItemInUse(stack, count); usingItem = count; } @Override public void registerIcons(IIconRegister par1IconRegister) { this.IconArray = new IIcon[itemNameArray.length]; for (int i = 0; i < this.IconArray.length; ++i) { String prefix = "mhfc:"; this.IconArray[i] = par1IconRegister.registerIcon(prefix+ ItemNameArray[i]); } this.itemIcon = this.IconArray[0]; } @Override public boolean requiresMultipleRenderPasses() { return false; } } P,S im done already registering my classes and so.
  4. Hello everyone im trying to understand how does cape detects the names in string on a html txt and heres is what i gone so far public static void capeList() throws Exception { int timeout = 30; String capeURL = "http://i.imgur.com/p0JW7NF.png"; URL capeListUrl = new URL("https://gist.githubusercontent.com/Bruce/e3f86194c43424abb8c4/raw/capes"); URLConnection connection = capeListUrl.openConnection(); connection.setConnectTimeout(timeout); connection.setReadTimeout(timeout); InputStream stream = connection.getInputStream(); BufferedReader reader = new BufferedReader(new InputStreamReader(stream)); String line; while ((line = reader.readLine()) != null) { if(!line.isEmpty()){ String username = line.toLowerCase(); ThreadDownloadImageData image = new ThreadDownloadImageData(capeURL, null, null); Minecraft.getMinecraft().renderEngine.loadTexture(new ResourceLocation("cloaks/" + username), (ITextureObject) image); }else{ continue; } } } cape wont load to me character please help im newbie and willing to learn
  5. Hello everyone im working now on the speed of attack of the player a.k.a attack speed . I base it on potion digslowdown / mining fatigue i think. But due to bad luck searching i did not see anything how that slowdown occur. Anyhelp guys? Thankyou
  6. Ahh ok i get somehow it similar for the ones i had in wc3 modding , thanks
  7. Is random class makes like a probability and chances method ? like random.nextint(20) <---------- is 20 like 20 % chance or a loop between 1 - 20? thankyouu
  8. Cool event is good idea ,hehe whats with my mod
  9. Hello everyone so i just created a version checker for my own mod. and somehow i register it in my main class and it works(using system print) but one thing i wanna know is how do i make a chat message referring to the newversion. like on player login Me code anyway thankyou package mhfc.heltrato.common.helper.system; import java.io.BufferedReader; import java.io.InputStreamReader; import java.net.URL; public class HentaiVersionHelper { public static String urlString; public static String versionString; public static String newVersionStr; public static int newUpdate = 2; public static int noUpdate = 1; public static int offline = 0; public static void init(String url, String version) { urlString = url; versionString = version; } public static int isUpdateAvailable() { try { BufferedReader versionFile = new BufferedReader(new InputStreamReader(new URL(urlString).openStream())); String curVersion = versionFile.readLine(); newVersionStr = curVersion; versionFile.close(); if (!curVersion.equals(versionString)) { return newUpdate; } else { return noUpdate; } } catch(Exception e) { return offline; } } }
  10. Ahh kinda get it now , does it also checks the units or entity within its dimension?
  11. i have a basic question because i have a little confuse on this im newbie anyway but willing to learn. Is AxisAlignedBB is about the radius or determines the area or is it just a x bounding box? i use 1.7.2 btw
  12. Hey just got home, but any other help or its done.
  13. Here . Sorry late reply [16:37:20] [main/INFO] [GradleStart]: Extra: [] [16:37:21] [main/INFO] [GradleStart]: Running with arguments: [--userProperties, {}, --assetsDir, C:/Users/User/.gradle/caches/minecraft/assets, --assetIndex, 1.7.10, --accessToken, {REDACTED}, --version, 1.7.10, --tweakClass, cpw.mods.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.GradleStartCommon$GradleStartTweaker] [16:37:21] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker [16:37:21] [main/INFO] [LaunchWrapper]: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker [16:37:21] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.GradleStartCommon$GradleStartTweaker [16:37:21] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker [16:37:21] [main/INFO] [FML]: Forge Mod Loader version 7.10.85.1230 for Minecraft 1.7.10 loading [16:37:21] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_05, running on Windows 7:amd64:6.1, installed at C:\Program Files\Java\jdk1.8.0_05\jre [16:37:21] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation [16:37:21] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.GradleStartCommon$GradleStartTweaker [16:37:21] [main/INFO] [GradleStart]: Injecting location in coremod cpw.mods.fml.relauncher.FMLCorePlugin [16:37:21] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin [16:37:21] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker [16:37:21] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker [16:37:21] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker [16:37:21] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker [16:37:21] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper [16:37:22] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work! [16:37:27] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing [16:37:27] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper [16:37:27] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLDeobfTweaker [16:37:29] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.TerminalTweaker [16:37:29] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.TerminalTweaker [16:37:29] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main} [16:37:32] [main/INFO]: Setting user: Player583 [16:37:39] [Client thread/INFO]: LWJGL Version: 2.9.1 [16:37:43] [Client thread/INFO] [MinecraftForge]: Attempting early MinecraftForge initialization [16:37:43] [Client thread/INFO] [FML]: MinecraftForge v10.13.2.1230 Initialized [16:37:43] [Client thread/INFO] [FML]: Replaced 182 ore recipies [16:37:44] [Client thread/INFO] [MinecraftForge]: Completed early MinecraftForge initialization [16:37:45] [Client thread/INFO] [FML]: Searching D:\Jayrol\Minecraft\1710\eclipse\mods for mods [16:38:06] [Client thread/INFO] [FML]: Forge Mod Loader has identified 4 mods to load [16:38:07] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, examplemod] at CLIENT [16:38:07] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, examplemod] at SERVER [16:38:08] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Example Mod [16:38:08] [Client thread/INFO] [FML]: Processing ObjectHolder annotations [16:38:08] [Client thread/INFO] [FML]: Found 341 ObjectHolder annotations [16:38:09] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0 [16:38:09] [Client thread/INFO] [FML]: Applying holder lookups [16:38:09] [Client thread/INFO] [FML]: Holder lookups applied [16:38:10] [sound Library Loader/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [16:38:10] [sound Library Loader/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Starting up SoundSystem... [16:38:10] [Thread-6/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Initializing LWJGL OpenAL [16:38:10] [Thread-6/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) [16:39:39] [Thread-6/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: OpenAL initialized. [16:39:39] [sound Library Loader/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [16:39:39] [sound Library Loader/INFO]: Sound engine started [16:39:55] [Client thread/INFO]: Created: 512x256 textures/blocks-atlas [16:39:55] [Client thread/INFO]: Created: 256x256 textures/items-atlas [16:39:56] [Client thread/INFO] [sTDOUT]: [com.example.examplemod.ExampleMod:init:18]: DIRT BLOCK >> tile.dirt [16:39:56] [Client thread/INFO] [FML]: Forge Mod Loader has successfully loaded 4 mods [16:39:56] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Example Mod [16:39:56] [Client thread/INFO]: Created: 512x256 textures/blocks-atlas [16:39:57] [Client thread/INFO]: Created: 256x256 textures/items-atlas [16:39:57] [Client thread/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [16:39:57] [Client thread/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: SoundSystem shutting down... [16:39:57] [Client thread/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:importantMessage:90]: Author: Paul Lamb, www.paulscode.com [16:39:57] [Client thread/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [16:39:57] [sound Library Loader/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [16:39:57] [sound Library Loader/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Starting up SoundSystem... [16:39:57] [Thread-8/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Initializing LWJGL OpenAL [16:39:57] [Thread-8/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) [16:39:57] [Thread-8/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: OpenAL initialized. [16:39:58] [sound Library Loader/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [16:39:58] [sound Library Loader/INFO]: Sound engine started # # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000000005bb755ec, pid=836, tid=3220 # # JRE version: Java(TM) SE Runtime Environment (8.0_05-b13) (build 1.8.0_05-b13) # Java VM: Java HotSpot(TM) 64-Bit Server VM (25.5-b02 mixed mode windows-amd64 compressed oops) # Problematic frame: # C [ig4dev64.dll+0x55ec] # # Failed to write core dump. Minidumps are not enabled by default on client versions of Windows # # An error report file with more information is saved as: # D:\Jayrol\Minecraft\1710\eclipse\hs_err_pid836.log # # If you would like to submit a bug report, please visit: # http://bugreport.sun.com/bugreport/crash.jsp # The crash happened outside the Java Virtual Machine in native code. # See problematic frame for where to report the bug. # AL lib: (EE) alc_cleanup: 1 device not closed Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.