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.

Choonster

Moderators
  • Joined

  • Last visited

Everything posted by Choonster

  1. Post your latest entity and rendering registration code and FML log using Pastebin/Gist.
  2. There's no way to tell if a block is stairs or a sign apart from checking whether it extends BlockStairs or BlockSign . Anything else is just a block that may or may not share some properties of the block type you're checking for, you can't make any assumptions about it. You shouldn't be manipulating metadata directly in 1.8+, set properties of the IBlockState and let the Block worry about metadata. In 1.9+, use IBlockProperties#withRotation or IBlockProperties#withMirror to rotate/mirror a block.
  3. Try setting a breakpoint and stepping through the method in a debugger. Is the previous tick position accurate after teleporting? Is the current position accurate? Something I just remembered: All subclasses of TickEvent are fired twice per tick of their corresponding system, once with Phase.START and once with Phase.END . Make sure you check the Phase to avoid running your code twice per tick.
  4. This is a basic Java error, you can't have regular statements in the main body of a class. Move the initialisation of all fields to a method (like the init method you already have) and call it in preInit.
  5. Main.EssenceSplash is the Item argument, so it was null when the constructor was called. Either you're assigning the field a value at some point after the constructor is called or you're never assigning it a value. In future, use [nobbc] [/nobbc] tags when posting code.
  6. The argument of Field#getFloat (and the other Field#getX methods) is the instance to get the field's value from. In this case, the ItemRenderer instance. Don't pass the Field as an argument. Your current code won't work in the release (obfuscated) environment because there won't a field called equippedProgressMainHand . Instead, it will have an SRG name like field_0013_a (use MCPBot to find the actual name). This means you need to check both names, FML's ReflectionHelper provides some useful methods for this.
  7. Minecraft is trying to render an ItemStack with a null Item . This is because you passed null as the Item argument of the RenderSnowball constructor.
  8. The issue was that the OP had the wrong method signature (i.e. arguments), not a missing annotation.
  9. There's no event fired for player teleportation. You could attach an IExtendedEntityProperties implementation (or a Capability in 1.8.9+) to EntityPlayer that stores whether they were in the borders the previous tick. If they were in the borders last tick but they're not this tick, set them to survival mode.
  10. Every Entity class must have a constructor that takes a single World argument. This is used to create the entity on the client. Side note: Why are you creating classes in the net.minecraft.src package? Use a package unique to your mod, e.g. com.<yourname>.<yourmod> .
  11. If you look at the implementation of EntityPlayer#setGameType in EntityPlayerMP , you'll see that it calls ItemInWorldManager#setGameType . ItemInWorldManager actually stores the GameType , so get the player's current GameType from their ItemInWorldManager instance.
  12. That was one of the options I presented, yes. No. Create a class that extends RenderSnowball and has a constructor that takes a single RenderManager argument. Call the super constructor with this argument, the Item to render and the RenderItem instance. Use a method reference to this constructor (i.e. RenderFooBar::new ) as the IRenderFactory implementation. Alternatively, use a lambda as the IRenderFactory implementation. In this lambda, create an instance of RenderSnowball with the appropriate arguments. You could also use an anonymous class instead of a lambda.
  13. RenderSnowball doesn't have a constructor with a single RenderManager argument, so you can't use RenderSnowball::new as an IRenderFactory . Use a lambda or subclass of RenderSnowball (anonymous or named) instead.
  14. That's not correct. This tutorial explains method overriding and method signatures.
  15. If @Override gives you a compilation error, it's doing its job and telling you that the method doesn't override a super method. The solution is to fix the method signature, not remove the annotation.
  16. config/CustomSpawner/overworld/Environment.cfg has an invalid character on line 1. Either remove the character, restore the file from a backup or delete it and allow it to be recreated.
  17. You didn't override Item#getMaxItemUseDuration . Side note: Always annotate override methods with @Override so you get a compilation error if they don't override a super method.
  18. Override the following methods: Item#onItemRightClick to set the item in use by calling EntityLivingBase#setActiveHand Item#getMaxItemUseDuration to return the maximum use duration of your item Item#getItemUseAction to return EnumAction.BOW so the entity draws the item back like a bow Item#onPlayerStoppedUsing or Item#onItemUseFinish to do something (e.g. spawn a projectile entity) when the entity stops or finishes using item
  19. Those are both the same crash report. Post the FML log, not a crash report.
  20. Thaumic Infusion is for 1.8.9. One of your Thaumcraft- or Botania-related mods is for 1.8+. Post the FML log after removing Thaumic Infusion.
  21. You installed a mod built for 1.8+ on 1.7.10, this doesn't work. If you post the FML log (logs/fml-client-latest.log) instead of the console output, we can tell you which one. Alternatively, look at the mod file names yourself; mods usually have the Minecraft version they were built for in the file name.
  22. If the problem is solved, post the solution so others having similar problems can find it in the future.
  23. The pouch could simply propagate the update to its contents and still have each individual token handle its own effects. This may be slightly cheaper than scanning the player's inventory from PlayerTickEvent .
  24. If this "token" is your own item, override Item#onUpdate . This is called once every tick while the item is in a player's inventory. Otherwise PlayerTickEvent is the correct event to use. It's fired on both sides and not annotated with @SideOnly , I'm not sure why you thought it was.
  25. You need to register them in init rather than preInit.

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.