Jump to content
  • Home
  • Files
  • Docs
  • Merch
Status Updates
  • All Content

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Choonster

Choonster

Forge Modder
 View Profile  See their activity
  • Content Count

    5050
  • Joined

    July 19, 2015
  • Last visited

    39 minutes ago
  • Days Won

    73

 Content Type 

  • All Activity

Profiles

  • Status Updates
  • Status Replies

Forums

  • Topics
  • Posts

Calendar

  • Events
  • Event Comments

Everything posted by Choonster

  • Prev
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • Next
  • Page 4 of 200  
  1. Choonster

    How to handle with a utility item that is meant to "contain" two other items?

    Choonster replied to Xander402's topic in Modder Support

    You'll need to create your own IRecipe implementation (optionally extending an existing one like ShapelessRecipes) that implements IRecipe#getRemainingItems to return the appropriate remaining items. You'll also need an IRecipeFactory to parse your recipe from JSON, this needs to be registered in _factories.json. You can see some examples of custom recipes and factories here and the _factories.json file here.
    • February 19
    • 4 replies
  2. Choonster

    [1.13.2] A way to find what tag groups an Item belongs to?

    Choonster replied to desht's topic in Modder Support

    It looks like TagCollection#getOwningTags does this, but it's a client-only method so you'll need to copy its logic rather than call it directly. This iterates through all registered tags of the TagCollection's type, so you may need to cache the results if you call this frequently.
    • February 18
    • 1 reply
      • 1
      • Thanks
  3. Choonster

    [1.12.2] Registering SoundEvents

    Choonster replied to PirateCody's topic in Modder Support

    Thanks, that makes sense. I'm wondering how this approach would work in 1.13 with its removal of the current lifecycle events such as preInit. The closet equivalent would be the mod construction event (don't have the exact name at the moment), but I think that the documentation only suggests initialising registry entries in the appropriate registry events.
    • February 13
    • 14 replies
  4. Choonster

    [1.12.2] Registering SoundEvents

    Choonster replied to PirateCody's topic in Modder Support

    I'd be curious to know what the proper way to handle records is. I've just realised that my record item hasn't worked since I switched to instantiating registry entries in registry events; because the SoundEvent passed to the constructor doesn't yet exist when RegistryEvent.Register<Item> is fired. It's possible to override ItemRecord#getSound to return the SoundEvent directly (ignoring the ItemRecord#sound field), but this requires adding the record to the ItemRecord.RECORDS map manually so that Minecraft will display the record name above the hotbar when it's played. Is there a better way to do this?
    • February 12
    • 14 replies
  5. Choonster

    Item model with text?

    Choonster replied to TestingSubject002's topic in Modder Support

    You may want to look at Forge's FancyMissingModel, which uses SimpleModelFontRenderer to render the location of the missing model.
    • February 6
    • 7 replies
  6. Choonster

    My Chest Gui crashes the Game [1.12.2]

    Choonster replied to daniel4b's topic in Modder Support

    They edited the OP with a link to their GitHub repository.
    • February 5
    • 7 replies
  7. Choonster

    more ram on a server

    Choonster replied to sufos3000's topic in Support & Bug Reports

    You'll need to explain exactly what you mean by "couldn't get access to the jar file". What are you doing and what exactly what error are you getting?
    • January 31
    • 10 replies
  8. Choonster

    Forge have a problem with recipies

    Choonster replied to uiytt's topic in Support & Bug Reports

    I think I know what's going on now. The missing recipe IDs warning isn't from Forge loading the IDs saved with the world, it's from Forge loading the server's IDs into the client's registries. This means that the server has several recipes that the client doesn't know about, which is probably due to the client and server having different versions of Thermal Foundation installed.
    • January 20
    • 8 replies
  9. Choonster

    Forge have a problem with recipies

    Choonster replied to uiytt's topic in Support & Bug Reports

    It looks like Forge is complaining because there are recipe IDs saved in your world that no longer exist in Thermal Foundation. The strange thing is, the recipe registry is explicitly configured to not be saved to the disk; so there shouldn't be any saved recipe IDs in the first place (and there aren't in any of my worlds). Are you using any mods apart from Thermal Foundation/OTG? Could you please post your world's level.dat file?
    • January 19
    • 8 replies
  10. Choonster

    [1.12.2 -> 1.13.x] Replacing a removed block (with variants) in the saved world

    Choonster replied to anothertime's topic in Modder Support

    Looking at the event and the code around it more closely, I'm not sure you can remove the mapping. I haven't confirmed this, but it looks like the old name and ID remain in the registry even if you choose remap the missing entry. Remapping adds an alias from the old name to the new one that the modder-facing IForgeRegistry methods appear to respect; but the internal ForgeRegistry#getID methods don't appear to. You may want to confirm this yourself.
    • January 13
    • 3 replies
  11. Choonster

    [1.12.2 -> 1.13.x] Replacing a removed block (with variants) in the saved world

    Choonster replied to anothertime's topic in Modder Support

    I've actually just implemented a DataFixer for this myself, see this commit of TestMod3. It uses a list of flattening definitions that specify the old registry name and metadata to look for, a function to get the replacement state and a function to modify or remove the saved TileEntity. It then iterates through each block in the chunk NBT looking for ones that match a flattening definition before running the state/TileEntity functions and updating the block. I also have a separate class (Remapper) that handles the MissingMappings event and tells FML to leave the missing IDs in the save, allowing them to be accessed in the DataFixer. There might be better ways to do this, but I'm fairly confident that it works.
    • January 13
    • 3 replies
  12. Choonster

    ClassCastException, EntityOtherPlayerMP cannot be cast to EntityPlayerSP

    Choonster replied to Frontear's topic in Modder Support

    EntityPlayerMP is used for all players on the server side. EntityPlayerSP is used for the controlling player on the client side. EntityOtherPlayerMP is used for all other players on the client side.
    • January 2
    • 3 replies
      • 1
      • Like
  13. Choonster

    [1.12.2] Field type "field_71434_R"

    Choonster replied to PulseBeat_02's topic in Modder Support

    This field has been named hasCrashed in the latest MCP mappings, so you should update your mappings to stable_39 (the final mappings version for 1.12). The MCPBot website you linked earlier explains what you need to change in your build.gradle to do this (click on the stable_39 dropdown button and then click "Use in ForgeGradle"). There's no wiki that explains what each field/method does, the closest thing would be the Javadocs of Vanilla fields/methods provided by MCP. These are included in the source code attached to the forgeSrc dependency when you run setupDecompWorkspace. Like field/method names, Javadocs are contributed by the community using MCPBot; so they may not always be 100% accurate or up-to-date.
    • January 2
    • 7 replies
  14. Choonster

    UUID Packets?

    Choonster replied to theishiopian's topic in Modder Support

    The server maintains a network connection for each connected client along with a reference to the server-side player entity. When a packet is received on this connection, the server knows which player sent it and you can access the player through the NetworkContext.
    • January 1
    • 12 replies
      • 1
      • Like
  15. Choonster

    UUID Packets?

    Choonster replied to theishiopian's topic in Modder Support

    Yes, that should work.
    • January 1
    • 12 replies
      • 1
      • Like
  16. Choonster

    UUID Packets?

    Choonster replied to theishiopian's topic in Modder Support

    The entity ID should work for players, but it's not actually needed here. The player who sent the packet is available on the server side through the MessageContext, see this example in the documentation for more details.
    • January 1
    • 12 replies
  17. Choonster

    RightClickItem event bugs or documentation lies?

    Choonster replied to Eiachh's topic in Modder Support

    It looks like the RightClickItem docs are incorrect, since the RightClickBlock docs explicitly mention that the client will try RightClickItem unless the result is SUCCESS: /** * This event is fired on both sides whenever the player right clicks while targeting a block. * This event controls which of {@link net.minecraft.block.Block#onBlockActivated} and/or {@link net.minecraft.item.Item#onItemUse} * will be called after {@link net.minecraft.item.Item#onItemUseFirst} is called. * Canceling the event will cause none of the above three to be called * * Let result be a return value of the above three methods, or {@link #cancellationResult} if the event is cancelled. * If we are on the client and result is not {@link EnumActionResult#SUCCESS}, the client will then try {@link RightClickItem}. * * There are various results to this event, see the getters below. * Note that handling things differently on the client vs server may cause desynchronizations! */ If you perform some action, you should set the event's cancellation result to EnumActionResult.SUCCESS and then cancel the event. This will stop the Vanilla methods from being called and the other event from being fired. That said, there's no need to use events to handle the right click behaviour of your own Item; just override the appropriate methods in the Item class instead.
    • December 31, 2018
    • 1 reply
      • 1
      • Like
  18. Choonster

    UUID Packets?

    Choonster replied to theishiopian's topic in Modder Support

    No. As I said, those ByteBufs aren't PacketBuffers; so that code will never send the unique IDs. When I say "create a new instance", I mean "use the new operator".
    • December 31, 2018
    • 12 replies
      • 1
      • Thanks
  19. Choonster

    UUID Packets?

    Choonster replied to theishiopian's topic in Modder Support

    The ByteBuf passed to those methods isn't an instance of PacketBuffer, you need to create a new instance of PacketBuffer and pass the ByteBuf to the constructor.
    • December 31, 2018
    • 12 replies
  20. Choonster

    UUID Packets?

    Choonster replied to theishiopian's topic in Modder Support

    Minecraft normally uses the entity ID (Entity#getEntityId) rather than the unique ID in networking situations (and this is its main purpose). This reduces unnecessary network traffic as the entity ID is a single 32-bit integer (that's actually compressed further) rather than a UUID that's sent as a pair of 64-bit integers. If you absolutely need to send a UUID, you can wrap the ByteBuf in a PacketBuffer and use PacketBuffer#readUniqueId/PacketBuffer#writeUniqueId to read/write UUIDs.
    • December 31, 2018
    • 12 replies
  21. Choonster

    Using another mod's jar as a library

    Choonster replied to M4thG33k's topic in Modder Support

    There isn't one by default, you need to create it. This hasn't changed since 1.8.9.
    • December 28, 2018
    • 8 replies
  22. Choonster

    [1.12.2] How could I color a block according to r, g, b & a values?

    Choonster replied to lyghtningwither's topic in Modder Support

    See the Forge documentation.
    • December 27, 2018
    • 3 replies
  23. Choonster

    [1.12.2] How could I color a block according to r, g, b & a values?

    Choonster replied to lyghtningwither's topic in Modder Support

    Are your RGB values actually being synced to the client? I suspect that they're always 0 on the client, so the block is being rendered black. There's no need for a TESR here at all. If you register a standard JSON model with a tint index (see the wiki), you can then register an IBlockColor that reads the RGB value from the TileEntity and returns it.
    • December 27, 2018
    • 3 replies
  24. Choonster

    Game Crash from Apple Drop - 1.12.2

    Choonster replied to UM3 F0R TH3 W1N's topic in Modder Support

    HarvestDropsEvent can be called for any block in the game, 99% of which won't have the BlockOldLeaf.VARIANT property in their block state. As you've seen, calling IBlockState#getValue with an invalid property throws an exception. You need to check the Block itself first, use IBlockState#getBlock to get it and then check that it's equal to Blocks.LEAVES/Blocks.LEAVES2. IBlockState#getBlock returns a Block, which will never be equal to an IBlockState. You need to check the Block and the properties in two separate expressions within the if condition. Edit: It looks like @diesieben07 already explained most of this in your previous threads. Please stop creating new threads for the same topic.
    • December 27, 2018
    • 4 replies
  25. Choonster

    Blockstates Property for a Block

    Choonster replied to Siqhter's topic in Modder Support

    Yes, or just use ItemCloth.
    • December 26, 2018
    • 78 replies
  • Prev
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • Next
  • Page 4 of 200  
  • All Activity
  • Home
  • Choonster
  • Theme
  • Contact Us
  • Discord

Copyright © 2019 ForgeDevelopment LLC · Ads by Curse Powered by Invision Community