Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

kiou.23

Members
  • Content Count

    440
  • Joined

  • Last visited

  • Days Won

    4

kiou.23 last won the day on May 3

kiou.23 had the most liked content!

Community Reputation

36 Excellent

About kiou.23

  • Rank
    Diamond Finder

Converted

  • Gender
    Undisclosed

Recent Profile Visitors

2665 profile views
  1. Forge 12.18.3 was for 1.10, which is no longer supported. Please update to a modern version of Minecraft to receive support.
  2. you'll need to be more specific than that not a lot has changed from 1.16.4 to 1.16.5, so your code shouldn't be breaking. However, what may be happening is that you were using mcp mappings, but now the project is with mojmaps. You can try to refactor the code to update the mappings, or just switch back to using mcp mappings (given that this is the actual issue, I'm just assuming it is since you didn't provide more info)
  3. the job of the CapabilityProvider is too handle and expose all the capabilities for an object. In the getCapabilities method, it will check for which capability that is being requested, and provide it. in the Item class, the point of the initCapabilities method, is just to say which CapabilityProvider will handle it's data. so if what you need is an Inventory, you'd have an "InventoryProvider", which when the ITEM_STACK_HANDLER capability was requested, would return the Inventory. and in the item which has this inventory data, it would return this InventoryProvider in initCapabilitie
  4. you don't. You'll check the capability type in the provider; And in your initCapabilities you'll return an instance of said provider. If your item needs more than one capability, just make a Provider which provides multiple capabilties depending on which one is requested.
  5. an IItemStackHandler, not an IInventory, they have a better api
  6. You need a capability, and a capability provider. the capability is just a class which will hold your arbitrary data, for an Inventory, you want an IItemHandler (which handles ItemStacks). forge already has a default implementation of IItemHandler called ItemStackHandler, however you can create your own for custom behaviour. the capability provider is a class which implements ICapabilityProvider (orICapabilitySerializable<INBT> if you need save and load the data between sessions). In it's getCapability method, if the requested capability is your capability (or if it is just an inv
  7. doesn't vanilla already allow you to tp to any player's position?
  8. you're not forced to code in eclipse. other options are IntelliJ, or VSCode (although vscode requires some setup, and therefore is not really recomended)
  9. you can check the code using your IDE, it should have a code navigation feature, which allows you to read class definitions, method references, interface implementations and all that I believe that in IntelliJ you can press double shift to search for files, and in there you can search for the source.
  10. the error points to your FrogEntity constructor: at me.mcartyr.tutorial.entities.FrogEntity.<init>(FrogEntity.java:31) ~[main/:?] {re:classloading} can you post it (and mark what line is line 31)?
  11. I'd start by reading the beehive and the campfire methods... and looking for lines of code that handle the interaction. for instance, does the campfire or the beehive have a tile entity? if so that logic could be handle in the tick method. if not it's probably done through random ticks, which is done in the tickRandomly (iirc) of the block. the beehive was added in a later update, and the logic concerns it's state and doesn't affect the campfire, so I'd assume that it is handled somewhere in beehive related code. reading through the vanilla classes is how to get around and under
  12. you need to get the rotation from the current block, and set the same rotation state to the new stripped block you can do so by using BlockState#with, and set the orientation and you can get a state with BlockState#get
  13. Learn basic java, and don't copy and paste code you don't understand. in the onItemUse method, you can get the block the item has been used on through the ItemUseContext. and you can change the block and/or blockstate in a position with World#setBlockState also, when you're posting code in the forums, use the proper code tool, not the quote tool, that way your code won't be a non-monospaced, non-syntax-highlighted hell to read oh, and also also, help with coding should go under the Modder Support forum, not ForgeGradle (Moderator: Thread Moved)
  14. the only way in which this code differs from his, which is storing the ItemInHand in a local variable, is that this is less readable. as Lupicus said, his code works, he's probably just in creative mode. creative mode cancels any attempts at damaging items when using them
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.