Jump to content

jayxo

Members
  • Posts

    15
  • 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)

0

Reputation

  1. hello! I've been wanting to work on something that I'm not sure how I would actually do it. I was wondering, how could I make it so instead of it placing the blocks randomly, it instead places them in a gradient? kind of like how stone blends into deepslate or bedrock. I looked though the way the world gen does it it, but I'm not exactly sure how I could translate that into something for a ConfiguredFeature. the left is what it currently looks like, the right is what I'm trying to achieve. (though they kind of look similar anyway...) if someone could point me in a direction of what to do or a reference, any help would be extremely appreciated! thank you!!
  2. 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!!
  3. so there’s no way i could make something that would be compatible with anything < 1.16?
  4. 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.
  5. 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!!
  6. 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.
  7. 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?
  8. 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.
  9. yeah! i was saying that in reference to this
  10. 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.
  11. 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
  12. 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
  13. 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!
  14. 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 Terms of Use.