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


  • Posts

  • Joined

  • Last visited

Recent Profile Visitors

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

jayxo's Achievements

Tree Puncher

Tree Puncher (2/8)



  1. hello! : ) for the last month I've been working on porting an old mod, Advanced Combat, to 1.16.5. just for my own personal game, not to reupload. I have gotten everything done, except for the recipes. the way recipes were made in the original mod was through code. I've tried out a few methods but nothing seemed to work. https://pastebin.com/mERPVcnX & https://pastebin.com/0N8zvGNN just for some context for my question, Advanced Combat has items called "upgrades". each upgrade represents a vanilla enchantment, and can be crafted to enchant items in the crafting table. some enchantments like protection has a normal and elite version that can enchant an item double its vanillas max level. (i.e. protection 1-4 and elite protection 5-8) my question is how could I make a recipe for tools to be enchanted with these upgrades in the crafting table? thank you!!
  2. so there’s no way i could make something that would be compatible with anything < 1.16?
  3. i was wondering if theres a way i can write it in 1.16 and it still be compatible with older and future versions. just so i don’t have to constantly find a new way of doing the same thing.
  4. hello! I'm trying to add a suffix into the players name based on their health. I've used TabListNameFormat and calling ServerPlayerEntity#refreshTabListName which works perfectly fine, but I want to work with something that can be compatible with any version I would want to port my mod to. I'm aware older versions of forge are not supported, and I am not asking for help for older versions. thank you!!
  5. Ohh alright! I've gotten a .dat file to load into a world, but I'm not sure where to go from here. public class StatsManager extends WorldSavedData implements Supplier { public Map<UUID, DefaultStatsCapability> players = new HashMap<>(); public PlayerEntity player = Minecraft.getInstance().player; public StatsManager() { super(XLife.MOD_ID); } public void load(CompoundNBT nbt) { players.put(player.getUUID(), StatsCapabilityProvider.stats); } public CompoundNBT save(CompoundNBT nbt) { ListNBT listNBT = new ListNBT(); for (DefaultStatsCapability stats : players.values()) { stats.save(nbt); listNBT.add(nbt); } nbt.put("Players", listNBT); return nbt; } public static StatsManager onWorld(ServerWorld world) { DimensionSavedDataManager storage = world.getDataStorage(); StatsManager sup = new StatsManager(); StatsManager saver = (StatsManager) storage.computeIfAbsent(sup, XLife.MOD_ID); storage.set(saver); return saver; } public static void onSaved(WorldEvent.Save event) { if (!event.getWorld().isClientSide() && event.getWorld() instanceof ServerWorld) { StatsManager saver = StatsManager.onWorld((ServerWorld) event.getWorld()); saver.setDirty(); } } @Override public Object get() { return this; } } I've used RaidManager as somewhat of a template for this, and the forge forums you linked.
  6. this has actually helped out a lot! I definitely think the best option is using WorldSavedData. I've now gotten Map<UUID, *>, but for the players capability data, what kind of information would I put there?
  7. this was actually what one of the issues i had was, i wanted to be able to look at any players book without it always showing my capability information. i actually do have a bit that adds a “owner” nbt data in the book! it stores the players uuid if that would work? i just didn’t know how i would check if it’s connected to the players capability. in response to the level/world capability, how would i actually do that? im not sure if it’s useful, also eventually wanted to be able to use a command to get a players book even if they’re offline.
  8. yeah! i was saying that in reference to this
  9. this is the HealthBookUtils.class https://pastebin.com/s6X05Nzz i didn’t want to rewrite the entire vanilla written book since i could use nbt data.
  10. sorry for such a late response! i actually tried that before, but it would always show the player who opened it info. like i would open your book, and it would display my players capability information instead of yours. https://pastebin.com/3qpwP8BF
  11. https://github.com/jayhillx/XLife/blob/main/src/main/java/com/jayhill/xlife/common/capability/health/HealthEvents.java#L103 this is for the respawn event
  12. Hello! So I’ve been having an issue with my mod. Basically, every time you die, you get another heart. When you die and respawn, the health bar flashes to 10 hearts before it drops back to the new health. I’m guessing it’s a server-client desync. Is there a way to fix this? This issue happens in every version except for in 1.15.2. Any help would be immensely appreciated, thank you!
  13. Hello! I have a book that writes down a players life information. I.e. how long they’ve been living, and when they die on that life, how long they lasted and what they died from. My question is, is it possible to update content in a written book when it’s opened? Becuase the way it works now, you have to get the book with a command instead of it refreshing it’s content automatically. Any help would be extremely helpful! Thank you. Here’s a pastebin of the current class that writes in the book: https://pastebin.com/s6X05Nzz
  • Create New...

Important Information

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