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

xerca

Members
  • Posts

    25
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

xerca's Achievements

Tree Puncher

Tree Puncher (2/8)

10

Reputation

  1. After splitting a mod, many items, blocks, etc. changed registry names due to the new mod id. I can handle blocks, items and entities by remapping in the corresponding MissingMappings event, but I believe this event is not fired for tile entities. I tried doing it with only remapped blocks on a save and the blocks appeared in the world, but they were missing the tile entity data that they had. How can I remap tile entities?
  2. Hello, I have an inhouse mod that is really large and adds a ton of different kinds of things to the game. Lately I thought maybe I should release some of it because some pieces of it might interest other people too, but as it is right now, someone who wants a feature from the mod wouldn't necessarily want the remaining 99% of it. So, what is the best way to make it more modular? Extract pieces to completely separate mods? Or some way to use configuration files to enable/disable features? I still want to be able to easily develop it as a single project. Being able to configure it sounds easier since that would probably require less changes to the architecture and still let separate features to interact, but I'm not sure how other people do it.
  3. I have had this problem with Items and SoundEvents but I assume it happens with other objects as well. The mismatch I'm talking about is that the server will think the item is an item while the client thinks it is another item, or plays the wrong sound, etc. This does not happen with single player worlds but happens reliably with dedicated servers. This basically makes the old multiplayer world save unplayable, so it is pretty annoying. Steps to reproduce it: Create and join a new multiplayer world with a dedicated server using mod that adds Item X Make a new version of the mod to add Item Y. It may need to be registered before X to cause the problem but I'm not sure. Update the mods on client and server Join the same world and be sad
  4. I have the same problem. I only get one chance to connect, if it fails to connect for whatever reason or disconnects during play, I can't reconnect. It only shows NullPointerException and I have to restart the game completely.
  5. Damn, I spent a lot of time for no reason then. I should learn to check the github issues and not just count on google searches.
  6. I have a strange problem where a capability that otherwise works perfectly well doesn't work after changing dimensions, such as going to the nether or back to overworld. I did some debugging and found where the error is but I don't understand why it exists. When an entity is removed (such as when changing dimensions), it's invalidateCaps() method is called, so its valid field becomes false. This means when player.getCapability is called for whichever capability, it returns LazyOptional.empty(): public <T> LazyOptional<T> getCapability(@Nonnull Capability<T> cap, @Nullable EnumFacing side) { final CapabilityDispatcher disp = getCapabilities(); return !valid || disp == null ? LazyOptional.empty() : disp.getCapability(cap, side); } Entity is also removed when it dies, but upon respawning the AttachCapabilitiesEvent is called again both on the client and the server threads, and the capability works fine. However, when the entity changes dimensions, the AttachCapabilitiesEvent is only called on the client thread. I don't know if this has anything to do with the problem. If anyone knows how to deal with this problem, I would appreciate the help.
  7. Putting it above the mods line actually worked! It's really weird because I just copied and modified the example mod's file. Anyways, thank you for the help!
  8. I tried to explain by text but here is the folder structure: Here is how the mods.toml looks: modLoader="javafml" #mandatory # A version range to match for said mod loader - for regular FML @Mod it will be the forge version loaderVersion="[25,)" #mandatory (24 is current forge version) # A list of mods - how many allowed here is determined by the individual mod loader [[mods]] #mandatory # The modid of the mod modId="xercamod" #mandatory # The version number of the mod - there's a few well known ${} variables useable here or just hardcode it version="1.13.2-2" #mandatory # A display name for the mod displayName="Xerca Mod" #mandatory # A URL to query for updates for this mod. See the JSON update specification <here> #updateJSONURL="http://myurl.me/" #optional # A URL for the "homepage" for this mod, displayed in the mod UI #displayURL="http://example.com/" #optional # A file name (in the root of the mod JAR) containing a logo for display logoFile="logo.png" #optional description=''' Something something ''' And here is how the root of my mod jar looks:
  9. In the mods.toml there is a logoFile key that looks like this: logoFile="examplemod.png" And there is a comment that says "A file name (in the root of the mod JAR) containing a logo for display". In my mod, I put a logo.png file under the resources folder and wrote its name in my mods.toml file (logoFile="logo.png"). I also checked the built jar file and I see logo.png in the root like it says. But the image is not there when I enter the mods tab in game. Everything else seems to work though, name, description, etc. Does anyone know what could be the problem?
  10. Thank you, you're right, it calls matches continously a few lines before getting the output. Assuming the main game code runs in a single thread, hopefully there will be no race conditions. I got away with just remembering the required NBT value of the itemstack. It seems to work for now, although it is one of the more bizarre workarounds I did. I hope forge adds a way to do this normally in the future.
  11. Unfortunately I don't have any way of knowing which furnace is calling getRecipeOutput, so this would probably only work if there is just one active furnace in the whole world at a time .
  12. I have a smelting recipe that needs to copy its input's NBT data to its output. I tried to use a custom IRecipe for that like I did for similar crafting recipes, but the smelting code in TileEntityFurnace does not respect getCraftingResult() at all. It only uses getRecipeOutput() as such (which is normally for display purposes) ItemStack itemstack = this.furnaceItemStacks.get(0); ItemStack itemstack1 = recipe.getRecipeOutput(); ItemStack itemstack2 = this.furnaceItemStacks.get(2); if (itemstack2.isEmpty()) { this.furnaceItemStacks.set(2, itemstack1.copy()); } else if (itemstack2.getItem() == itemstack1.getItem()) { itemstack2.grow(itemstack1.getCount()); } So I cannot set the NBT data of the output ItemStack. I also tried using a PlayerEvent.ItemSmeltedEvent, however that event does not give me any handle to the input, it only has the output. So I cannot read the input's NBT in this way. Is there another way to do what I am trying to achieve other than creating infinite JSONs or editing the vanilla furnace code?
  13. Thank you! I had actually tried registering the serializer with RecipeSerializers.register but it crashed and I assumed that would not work. Apperantly I just called register at the wrong place. Now it works!
  14. I see, so it is a bug. I have some crafting recipes that need NBT manipulation. One of them works very similar to the vanilla book copying (that uses a custom IRecipe) and I found a lot of forum threads from 1.12 where people recommend registering IRecipes, so I emulated the vanilla code and tried registering it only to be disappointed that it doesn't work in 1.13 either. Before 1.13 I used item damage to hold some state that can be used in JSON recipes with the "data" attribute and did the rest of processing in crafting events, but it felt hacky to me. Now the data attribute doesn't work anyway. I don't see any reason why Forge wouldn't allow registering IRecipe's just like vanilla does. I assumed they just forgot to add it yet.
  15. The craftMatrix field of PlayerEvent.ItemCraftedEvent used to be public, but now it seems to be converted to private, and there is a getInventory() method that returns it instead. However, the IInventory you get by calling PlayerEvent.ItemCraftedEvent.getInventory() is not actually the craftMatrix. It returns a size 1 inventory with only air, instead of a size 9 inventory filled with ingredients. Is this a bug on Forge's end or am I doing something wrong? Also IRecipe's became unregisterable without any explanation, so I hope at least one of these problems are fixed so that we can have some way to get non-trivial craftings working.
×
×
  • Create New...

Important Information

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