Jump to content

X_ZombieSlayer_X

Members
  • Posts

    35
  • Joined

  • Last visited

Everything posted by X_ZombieSlayer_X

  1. I still get: "Exception message: java.lang.ClassNotFoundException: org.web3j.protocol.Web3jService" Even after adding "implementation group: 'org.web3j', name: 'core', version: '5.0.0'" to my build.gradle. I don't have a Maven pom.xml to add the dependency to.
  2. I have started a fresh 1.18.2 project. Is there any way to do it with a local jar file? I don't have a maven dependency.
  3. I have three questions concerning ILootCondition! The forge docs state that... // // Additional conditions can be checked, though as much as possible should be parameterized via JSON data. // It is better to write a new ILootCondition implementation than to do things here. // Can ILootCondition be used instead of JSON data? Secondly, how does one even implement and register a ILootCondition? This was the only reference I could find in the docs. Third, can ILootCondition or LootItemConditionalFunction be used to override the enchantment "fortune" drop rates?
  4. Is there anyway to use ILootCondition? The docs reference it, but don't have anything on it. Could I use ILootCondition instead of a lootmodifier json?
  5. Can I use the Global Loot Modifier to modify the logic of the vanilla fortune enchantment? If fortune uses a loot table to calculate drops can I just override it?
  6. Hello all, I have create an enchantment and have registered it. It is a copy of lootBonusEnchantment(fortune) from vanilla. However it does not seem to have fortune logic applied to it. How would I add this logic to it? My plan is to override the vanilla fortune enchantment to change the logic(server side) only, that way vanilla users can connect and play on my forge server with different fortune drop rates. Thanks
  7. I can detect when a slot is changed to air(item is removed), I don’t know how to remove the item from player cursor before they place it. Is there a solution to this? If I wanted to go down the custom GUI route, how would I do so? What classes do I need to make a custom GUI?
  8. Hello all, I currently I looking to make something like this in forge. https://www.spigotmc.org/resources/guishop.2451/ However, I am unsure how to listen for click events(if that is even possible). Is there a way to prevent items from being removed from container and perform action on click? Currently I am using ContainerListener to listen to slotChanged. This is okay but still allows player to remove items. Is there anyway I can stop this and use less logic by listening for some slot clicked event? -Thanks
  9. Hello, I do not have a crash report or anything technical for this. However, I can provide video if needed. Currently if I run a forge server with with a server side only mod, vanilla clients will not hear the proper sound. For example mobs walking sound like buttons and pressure plates being pressed. My mod does not modify sounds in any way. As a test I decided to run a forge client without my mod installed. With the forge client the sounds are correct. I then repeated this process with a forge client with my mod installed. I continued to get the correct sound, so I narrowed it down to most probably being a mapping bug in forge itself as only vanilla clients have this problem. I assume the client is just misinterpreting the sounds sent over by the server.
  10. I don't understand where or how to create/find the MenuConstructor. Sorry, I am just not understanding, how to transform the player's enderchestinventory into a menu constructor.
  11. How do I get a menu provider for a player's inventory and enderchest? I believe the function to call to do this is player.openMenu(). I just don't know how to get or create a menu provider. The purpose of this is to add commands /enderchest and /invsee !
  12. Thanks, will keep an eye on it for when it gets merged!
  13. I have a chunkclaiming system that allows users to claim chunks so that they can only build in them. It works fine but I just want to add a message for when players enter their claimed chunks. Maybe I could do some type of movement event and cross reference it with claimed chunks?
  14. Thanks! It now works. Another quick question. What event should I be listening for to get a player chunk entering event. It used to be PlayerEvent.EnteringChunk in 1.16.5.
  15. Hello, my fly command is not working. Not sure why it is not working. I am setting the player.getAbilities().mayfly to true. It even prints out that is is true! @Override public void command() { command = Commands.literal("fly").executes( (commandContext) -> {return fly(commandContext);} ); } private int fly(CommandContext<CommandSourceStack> commandContext) throws CommandSyntaxException { Player player = commandContext.getSource().getPlayerOrException(); player.getAbilities().mayfly = !player.getAbilities().mayfly; commandContext.getSource().sendSuccess(Msg.buildMessage("Fly set to : "+player.getAbilities().mayfly), false); return 1; } Any reason why it would not be working?
  16. I am not at my computer at the moment. I meant I don’t see the player.sendAbilitiesUpdate method anymore. It is no longer there to use.
  17. I am having trouble getting players to fly in survival mode! I change the players mayfly boolean but I don't see the player.sendAbilitiesUpdate(); method anymore. I don’t think it is available to use. My code so far: @Override public void command() { command = Commands.literal("fly").executes( (commandContext) -> {return fly(commandContext);} ); } private int fly(CommandContext<CommandSourceStack> commandContext) throws CommandSyntaxException { Player player = commandContext.getSource().getPlayerOrException(); player.getAbilities().mayfly = !player.getAbilities().mayfly; commandContext.getSource().sendSuccess(Msg.buildMessage("Fly set to : "+player.getAbilities().mayfly), false); return 1; }
  18. I am getting an error switching dimensions only on servers. It works well in single player. Error: [13:16:51] [Server thread/WARN]: X_ZombieSlayer_X moved too quickly! -16.78373791554268,9.5,-65.79919724030039 [13:16:51] [Server thread/WARN]: X_ZombieSlayer_X moved too quickly! -16.78373791554268,9.5,-65.79919724030039 [13:16:57] [Server thread/FATAL]: Error executing task on Server java.lang.NullPointerException: Cannot invoke "it.unimi.dsi.fastutil.objects.ObjectSet.remove(Object)" because "objectset" is null at net.minecraft.server.level.DistanceManager.m_140828_(DistanceManager.java:230) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.server.level.ChunkMap.m_140184_(ChunkMap.java:863) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.server.level.ServerChunkCache.m_8385_(ServerChunkCache.java:433) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.server.network.ServerGamePacketListenerImpl.m_7185_(ServerGamePacketListenerImpl.java:849) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.network.protocol.game.ServerboundMovePlayerPacket.m_5797_(SourceFile:114) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.network.protocol.game.ServerboundMovePlayerPacket$PosRot.m_5797_(SourceFile:16) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.network.protocol.PacketUtils.m_131356_(SourceFile:21) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.server.TickTask.run(SourceFile:18) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.util.thread.BlockableEventLoop.m_6367_(SourceFile:151) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.util.thread.ReentrantBlockableEventLoop.m_6367_(SourceFile:23) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.server.MinecraftServer.m_6367_(MinecraftServer.java:775) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.server.MinecraftServer.m_6367_(MinecraftServer.java:162) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.util.thread.BlockableEventLoop.m_7245_(SourceFile:125) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.server.MinecraftServer.m_129961_(MinecraftServer.java:758) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.server.MinecraftServer.m_7245_(MinecraftServer.java:752) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.util.thread.BlockableEventLoop.m_18699_(SourceFile:110) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.server.MinecraftServer.m_130012_(MinecraftServer.java:737) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:687) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.server.MinecraftServer.m_177918_(MinecraftServer.java:258) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at java.lang.Thread.run(Thread.java:831) [?:?] [13:17:06] [Server thread/FATAL]: Error executing task on Server java.lang.NullPointerException: Cannot invoke "it.unimi.dsi.fastutil.objects.ObjectSet.remove(Object)" because "objectset" is null at net.minecraft.server.level.DistanceManager.m_140828_(DistanceManager.java:230) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.server.level.ChunkMap.m_140184_(ChunkMap.java:863) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.server.level.ServerChunkCache.m_8385_(ServerChunkCache.java:433) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.server.network.ServerGamePacketListenerImpl.m_7185_(ServerGamePacketListenerImpl.java:849) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.network.protocol.game.ServerboundMovePlayerPacket.m_5797_(SourceFile:114) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.network.protocol.game.ServerboundMovePlayerPacket$PosRot.m_5797_(SourceFile:16) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.network.protocol.PacketUtils.m_131356_(SourceFile:21) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.server.TickTask.run(SourceFile:18) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.util.thread.BlockableEventLoop.m_6367_(SourceFile:151) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.util.thread.ReentrantBlockableEventLoop.m_6367_(SourceFile:23) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.server.MinecraftServer.m_6367_(MinecraftServer.java:775) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.server.MinecraftServer.m_6367_(MinecraftServer.java:162) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.util.thread.BlockableEventLoop.m_7245_(SourceFile:125) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.server.MinecraftServer.m_129961_(MinecraftServer.java:758) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.server.MinecraftServer.m_7245_(MinecraftServer.java:752) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.util.thread.BlockableEventLoop.m_18701_(SourceFile:134) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.server.MinecraftServer.m_130012_(MinecraftServer.java:738) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:687) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.server.MinecraftServer.m_177918_(MinecraftServer.java:258) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at java.lang.Thread.run(Thread.java:831) [?:?] [13:17:07] [Server thread/FATAL]: Error executing task on Server java.lang.NullPointerException: Cannot invoke "it.unimi.dsi.fastutil.objects.ObjectSet.remove(Object)" because "objectset" is null at net.minecraft.server.level.DistanceManager.m_140828_(DistanceManager.java:230) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.server.level.ChunkMap.m_140184_(ChunkMap.java:863) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.server.level.ServerChunkCache.m_8385_(ServerChunkCache.java:433) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.server.network.ServerGamePacketListenerImpl.m_7185_(ServerGamePacketListenerImpl.java:849) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.network.protocol.game.ServerboundMovePlayerPacket.m_5797_(SourceFile:114) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.network.protocol.game.ServerboundMovePlayerPacket$Pos.m_5797_(SourceFile:42) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.network.protocol.PacketUtils.m_131356_(SourceFile:21) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.server.TickTask.run(SourceFile:18) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.util.thread.BlockableEventLoop.m_6367_(SourceFile:151) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.util.thread.ReentrantBlockableEventLoop.m_6367_(SourceFile:23) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.server.MinecraftServer.m_6367_(MinecraftServer.java:775) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.server.MinecraftServer.m_6367_(MinecraftServer.java:162) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.util.thread.BlockableEventLoop.m_7245_(SourceFile:125) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.server.MinecraftServer.m_129961_(MinecraftServer.java:758) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.server.MinecraftServer.m_7245_(MinecraftServer.java:752) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.util.thread.BlockableEventLoop.m_18701_(SourceFile:134) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.server.MinecraftServer.m_130012_(MinecraftServer.java:738) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:687) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.server.MinecraftServer.m_177918_(MinecraftServer.java:258) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at java.lang.Thread.run(Thread.java:831) [?:?] [13:17:07] [Server thread/FATAL]: Error executing task on Server java.lang.NullPointerException: Cannot invoke "it.unimi.dsi.fastutil.objects.ObjectSet.remove(Object)" because "objectset" is null at net.minecraft.server.level.DistanceManager.m_140828_(DistanceManager.java:230) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.server.level.ChunkMap.m_140184_(ChunkMap.java:863) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.server.level.ServerChunkCache.m_8385_(ServerChunkCache.java:433) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.server.network.ServerGamePacketListenerImpl.m_7185_(ServerGamePacketListenerImpl.java:849) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.network.protocol.game.ServerboundMovePlayerPacket.m_5797_(SourceFile:114) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.network.protocol.game.ServerboundMovePlayerPacket$Pos.m_5797_(SourceFile:42) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.network.protocol.PacketUtils.m_131356_(SourceFile:21) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.server.TickTask.run(SourceFile:18) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.util.thread.BlockableEventLoop.m_6367_(SourceFile:151) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.util.thread.ReentrantBlockableEventLoop.m_6367_(SourceFile:23) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.server.MinecraftServer.m_6367_(MinecraftServer.java:775) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.server.MinecraftServer.m_6367_(MinecraftServer.java:162) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.util.thread.BlockableEventLoop.m_7245_(SourceFile:125) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.server.MinecraftServer.m_129961_(MinecraftServer.java:758) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.server.MinecraftServer.m_7245_(MinecraftServer.java:752) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.util.thread.BlockableEventLoop.m_18701_(SourceFile:134) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.server.MinecraftServer.m_130012_(MinecraftServer.java:738) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:687) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at net.minecraft.server.MinecraftServer.m_177918_(MinecraftServer.java:258) ~[server-1.17.1-20210706.113038-srg.jar%2325!:?] at java.lang.Thread.run(Thread.java:831) [?:?] Code to teleport: public void teleport(Player player) { ResourceKey<Level> dimension = ResourceKey.create(ResourceKey.createRegistryKey(new ResourceLocation(worldRegistry)), new ResourceLocation(worldEntry)); if(player.getCommandSenderWorld().dimension().compareTo(dimension)!=0) { player.changeDimension(ServerLifecycleHooks.getCurrentServer().getLevel(dimension)); } player.teleportTo(pos.getX(), (pos.getY()+0.5f), pos.getZ()); player.lookAt(ServerLifecycleHooks.getCurrentServer().createCommandSourceStack().getAnchor(), lookAt.getVec3()); } Any ideas on how to fix this? I read a few forums containing ITeleporter but could not find anything mentioning it in the docs.
  19. ResourceKey.create(ResourceLocation, ResourceLocation) is not visible. So I am using this! ResourceKey<Level> dimension = ResourceKey.create(ResourceKey.createRegistryKey(new ResourceLocation(worldRegistry)), new ResourceLocation(worldEntry));
  20. Thanks for the help, I just have one more question. ResourceKey.location only returns one resource location(I believe the registry). How would I get both?(entry and registry)
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.