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. It looks like Fry just committed a fix for this, so it should work in 1.8.9-11.15.1.1730 once that's been released.
  2. Like I said, Minecraft#thePlayer (i.e. the instance field of Minecraft called thePlayer ) contains the client player. Use Minecraft.getMinecraft() to get the Minecraft instance.
  3. I only needed to check the entity because Block#onEntityCollidedWithBlock is called when any entity collides with the block, not just the player. I needed to check the side using the World#isRemote field because the method is called on the client and the server. Obviously only the player can use keybindings and this only happens on the client side, so you don't need to check that. On the client side, there's only one World ( Minecraft#theWorld ) and one client player ( Minecraft#thePlayer ).
  4. For 90-degree rotations, you should be able to rotate the model from the blockstates file. Create a property in your block's state to store the current rotation (this could be an enum), then override Block#getActualState to return an IBlockState with this property set to the appropriate value based on the current world time ( World#getWorldTime ). For other rotations, you may be able to do something with ISmartBlockModel or TileEntitySpecialRenderer / FastTESR ; but I can't help you much with these.
  5. Just add the "display" object to the top-level object like you would any other JSON model.
  6. Override Block#onBlockActivated to do something when the block is right clicked. To spawn an item, create a new EntityItem at the appropriate position using the EntityItem(World worldIn, double x, double y, double z, ItemStack stack) constructor then spawn in it the world with World#spawnEntityInWorld . BlockPos#up() will return a BlockPos one block above the original position, so you can use this to get the position for the item entity from your block's position.
  7. If you mouseover the names with a line through them, it should tell you that they no longer exist (because they don't). IItemRenderer has been replaced with the model system. You can either create a standard item model in JSON, OBJ or B3D format or create a more dynamic model using one of the interfaces that extend IModel / IBakedModel (e.g. ISmartItemModel ). The Grey Ghost has a post explaining some of the new item rendering system here.
  8. You installed a coremod (Inventory Tweaks) built for 1.8+, but you're running 1.7.10.
  9. Read the EAQ, it has a solution for this.
  10. To make a ticking TileEntity in 1.8+, the TileEntity must implement IUpdatePlayerListBox [nobbc](1.[/nobbc] or ITickable (1.8.8/1.8.9).
  11. Unfortunately that log doesn't tell me much more than the original popup, since it doesn't show the actual exception that caused the failure. Was there any more to it? If you visit https://services.gradle.org/distributions/gradle-2.7-bin.zip in a web browser, does it download correctly? Try installing Gradle locally and telling IDEA to use that instead of the wrapper.
  12. Then post the log.
  13. That screenshot doesn't really have any useful information in it, we need to see the log it was referring to. My guess is that ForgeGradle ran out of memory while decompiling Minecraft. I explain how to fix this here.
  14. I'd suggest looking at how mods like Treecapitator or Tinker's Construct (i.e. the Lumber Axe) achieve this.
  15. If it's directly related to the original question, ask in this thread. If it's a separate topic, start a new thread.
  16. I have an example of a block that rotates the player from the client side here. You should be able to find tutorials on key bindings somewhere.
  17. Block metadata is limited to the range [0, 15] (4 bits), but item metadata is limited to [0, Short.MAX_VALUE] (16 bits).
  18. The item ID is automatically set when you register your item using GameRegistry.registerItem . You must register every Item you add.
  19. You posted this in the wrong section, which is probably why diesieben07 thought this was about your own mod's GUI. Modder Support is for mod developers, Support is for users. This crash occurred because you tried to craft an item without an ID. Report this to the author of the mod you were trying to craft an item from.
  20. You need to install coroUtil, which is included when you download TropiCraft from its website.
  21. Create a gradle.properties file next to build.gradle (if it doesn't already exist) and add this line to it: org.gradle.jvmargs=-Xmx2G This tells Gradle to run Java with the -Xmx2G argument, which sets Java's maximum heap size to 2 GB (enough to decompile 1.8.9). Edit: Fixed the formatting.
  22. Your createBlockState method must return a BlockState with all of the block's properties. Yours only includes the FACING property, not the OPEN property. If you're extending BlockDirectional , you should use the BlockDirectional.FACING property instead of creating your own. If you need your own facing property, don't extend BlockDirectional .
  23. One option is to actually create the entity without spawning it in the world, then kill it using a custom DamageSource that stores the position of the spawner (or the spawner itself). Subscribe to LivingDropsEvent and check the DamageSource : if it's from your spawner, cancel the event and add the loot to the spawner (or do whatever it is that the spawner does with the loot).
  24. I just implemented this myself, it was a bit tricky to figure out. You can't just connect to the new server immediately, you need to disconnect from the current server first and then connect to the new server. When the player clicks the button, store the ServerData of the pending connection somewhere and disconnect them from the server. Look at GuiIngameMenu#actionPerformed (case 1, the Disconnect/Save and Quit button) to see how to disconnect from the current server. When the player disconnects from the server ( FMLNetworkEvent.ClientDisconnectionFromServerEvent ), schedule a task on the main thread using Minecraft#addScheduledTask (this event is fired on a Netty thread, so you must schedule a task on the main thread before you can safely interact with normal Minecraft classes). In this task, check if there's pending connection. If there is, call FMLClientHandler#setupServerList followed by FMLClientHandler#connectToServer (pass a new instance of GuiMainMenu as the first argument) to connect to the new server. You can see my implementation (a client command) here. If you're not targeting Java 8, use an anonymous class instead of a lambda for the scheduled task and Guava's Optional instead of Java's Optional .
  25. Create a class that extends ItemBlock and overrides Item#addInformation . Register your Block using a GameRegistry#registerBlock overload that takes a Class<? extends ItemBlock> argument and pass your class to it.

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.