Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

SanAndreaP

Forge Modder
  • Joined

  • Last visited

Everything posted by SanAndreaP

  1. Read your logs:
  2. @SideOnly(Side.Client) Why is this there? You can use this class for a server as well, since it doesn't have any client-related stuff there!
  3. @SideOnly(Side.Client) Why is this there? You can use this class for a server as well, since it doesn't have any client-related stuff there!
  4. Just use new File("./pathNextToTheServerJar/file.ext")
  5. Just use new File("./pathNextToTheServerJar/file.ext")
  6. public void onBowFOVZoomDiamond(EntityPlayer player, ItemStack stack){ ; } public void onBowFOVZoomTrillint(EntityPlayer player, ItemStack stack){ ; } public void onBowFOVZoomNether(EntityPlayer player, ItemStack stack){ ; } What's the difference between those? EDIT: I see the problem here, you have many seperate TickHandlers and each reset the FOV variable, since their bow is not equal to the current used item! What I strongly suggest is that you have only ONE TickHandler, then do something like this: if(type.equals(EnumSet.of(TickType.RENDER))) { if(player != null && player.isUsingItem()) { int itemID = player.getItemInUse().itemID; if(itemID == firstBow.itemID) { MyMod.proxy.onBowFOVZoomFirstBow(player, player.getItemInUse()); } else if(itemID == secondBow.itemID) { MyMod.proxy.onBowFOVZoomSecondBow(player, player.getItemInUse()); } else if ...... } else { mod_rareores.proxy.resetSavedFOV(); } }
  7. public void onBowFOVZoomDiamond(EntityPlayer player, ItemStack stack){ ; } public void onBowFOVZoomTrillint(EntityPlayer player, ItemStack stack){ ; } public void onBowFOVZoomNether(EntityPlayer player, ItemStack stack){ ; } What's the difference between those? EDIT: I see the problem here, you have many seperate TickHandlers and each reset the FOV variable, since their bow is not equal to the current used item! What I strongly suggest is that you have only ONE TickHandler, then do something like this: if(type.equals(EnumSet.of(TickType.RENDER))) { if(player != null && player.isUsingItem()) { int itemID = player.getItemInUse().itemID; if(itemID == firstBow.itemID) { MyMod.proxy.onBowFOVZoomFirstBow(player, player.getItemInUse()); } else if(itemID == secondBow.itemID) { MyMod.proxy.onBowFOVZoomSecondBow(player, player.getItemInUse()); } else if ...... } else { mod_rareores.proxy.resetSavedFOV(); } }
  8. Where's your GUI handler?
  9. Where's your GUI handler?
  10. It would be helpful to post what code you used to register your armor/tool recipes.
  11. It would be helpful to post what code you used to register your armor/tool recipes.
  12. Use the OnLivingDrops event.
  13. Use the OnLivingDrops event.
  14. Maybe it updated while I was coding. Edit: I may be blind but I don't see any forge newer than 7.7.1 No, but look at the last number. You have .611, the latest I can see is .665
  15. Maybe it updated while I was coding. Edit: I may be blind but I don't see any forge newer than 7.7.1 No, but look at the last number. You have .611, the latest I can see is .665
  16. MinecraftForge v7.7.1.611 Update Forge and see if the problem persists. EDIT: I misread, you're trying to code with Forge
  17. MinecraftForge v7.7.1.611 Update Forge and see if the problem persists. EDIT: I misread, you're trying to code with Forge
  18. I don't understand... if it's loading, it's saving... Please give us more details, what should happen, what is happening instead?
  19. I don't understand... if it's loading, it's saving... Please give us more details, what should happen, what is happening instead?
  20. Underscores are allowed. yanksrock1019 Can you please make a screenshot of your ZIP, where you see your puplet_mod class file?
  21. Underscores are allowed. yanksrock1019 Can you please make a screenshot of your ZIP, where you see your puplet_mod class file?
  22. Here's my code. Yours is similar... find out what I did differently TickHandler (tickStart) if(type.equals(EnumSet.of(TickType.RENDER))) { if(this.mc.thePlayer != null && this.mc.thePlayer.isUsingItem() && this.mc.thePlayer.getItemInUse().itemID == ESPModRegistry.niobBow.itemID) { ESPModRegistry.proxy.onBowUse(this.mc.thePlayer.getItemInUse(), this.mc.thePlayer); } else { ESPModRegistry.proxy.resetSavedFOV(); } } CommonProxy public void onBowUse(ItemStack stack, EntityPlayer player) { ; } public void resetSavedFOV() { ; } Client Proxy public float fovModifierHand = 0F; @Override public void onBowUse(ItemStack stack, EntityPlayer player) { float f = 1.0F; if (player.capabilities.isFlying) { f *= 1.1F; } float speedOnGround = 0.1F; f *= (player.landMovementFactor * player.getSpeedModifier() / speedOnGround + 1.0F) / 2.0F; int i = player.getItemInUseDuration(); float f1 = (float)i / 10.0F; if (f1 > 1.0F) { f1 = 1.0F; } else { f1 *= f1; } f *= 1.0F - f1 * 0.25F; fovModifierHand = fovModifierHand > 0.001F ? fovModifierHand : (Float)ObfuscationReflectionHelper.getPrivateValue(EntityRenderer.class, Minecraft.getMinecraft().entityRenderer, "fovModifierHand", "field_78507_R"); fovModifierHand += (f - fovModifierHand) * 0.5F; if (fovModifierHand > 1.5F) { fovModifierHand = 1.5F; } if (fovModifierHand < 0.1F) { fovModifierHand = 0.1F; } ObfuscationReflectionHelper.setPrivateValue(EntityRenderer.class, Minecraft.getMinecraft().entityRenderer, fovModifierHand, "fovModifierHand", "field_78507_R"); } @Override public void resetSavedFOV() { this.fovModifierHand = 0F; } I saved the fovModifierHand into a class variable when first called, modify that and set this variable. When the FOV should reset, the variable is set to 0F again.
  23. Here's my code. Yours is similar... find out what I did differently TickHandler (tickStart) if(type.equals(EnumSet.of(TickType.RENDER))) { if(this.mc.thePlayer != null && this.mc.thePlayer.isUsingItem() && this.mc.thePlayer.getItemInUse().itemID == ESPModRegistry.niobBow.itemID) { ESPModRegistry.proxy.onBowUse(this.mc.thePlayer.getItemInUse(), this.mc.thePlayer); } else { ESPModRegistry.proxy.resetSavedFOV(); } } CommonProxy public void onBowUse(ItemStack stack, EntityPlayer player) { ; } public void resetSavedFOV() { ; } Client Proxy public float fovModifierHand = 0F; @Override public void onBowUse(ItemStack stack, EntityPlayer player) { float f = 1.0F; if (player.capabilities.isFlying) { f *= 1.1F; } float speedOnGround = 0.1F; f *= (player.landMovementFactor * player.getSpeedModifier() / speedOnGround + 1.0F) / 2.0F; int i = player.getItemInUseDuration(); float f1 = (float)i / 10.0F; if (f1 > 1.0F) { f1 = 1.0F; } else { f1 *= f1; } f *= 1.0F - f1 * 0.25F; fovModifierHand = fovModifierHand > 0.001F ? fovModifierHand : (Float)ObfuscationReflectionHelper.getPrivateValue(EntityRenderer.class, Minecraft.getMinecraft().entityRenderer, "fovModifierHand", "field_78507_R"); fovModifierHand += (f - fovModifierHand) * 0.5F; if (fovModifierHand > 1.5F) { fovModifierHand = 1.5F; } if (fovModifierHand < 0.1F) { fovModifierHand = 0.1F; } ObfuscationReflectionHelper.setPrivateValue(EntityRenderer.class, Minecraft.getMinecraft().entityRenderer, fovModifierHand, "fovModifierHand", "field_78507_R"); } @Override public void resetSavedFOV() { this.fovModifierHand = 0F; } I saved the fovModifierHand into a class variable when first called, modify that and set this variable. When the FOV should reset, the variable is set to 0F again.
  24. replace this: (EntityPlayer)tickData[0] with this: Minecraft.getMinecraft().thePlayer tickData[0] is the partialTickTime, which is a float. Also you should check if Minecraft.getMinecraft().thePlayer is not null before executing your code.
  25. replace this: (EntityPlayer)tickData[0] with this: Minecraft.getMinecraft().thePlayer tickData[0] is the partialTickTime, which is a float. Also you should check if Minecraft.getMinecraft().thePlayer is not null before executing your code.

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.