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

[1.14.4]Simulate mouse and keyboard input


ATomo9_CY
 Share

Recommended Posts

That line of code works very well for simulating keyboard input.

I tried using it with keyBindUseItem and keyBindAttack to try to simulate mouse clicks but it didnt work.I used mc.player.swingArm(mc.player.getActiveHand()); but the game crashes because getActiveHand() returns null.There is also the problem of moving the players camera around that i haven't figured out how to do yet.

Edit:keyBindUseItem and keyBindAttack actually do work but for some reason i have to click first once manually before they start to effect the game.

Edited by ATomo9_CY
Link to comment
Share on other sites

@SubscribeEvent
public static void EntityViewRenderEvent(CameraSetup event){
    event.setYaw(yaw);
    event.setPitch(pitch);
    event.setRoll(roll);
}

 

The above code takes yaw pitch and roll as inputs to determine the position of the camera.

i think ill still need some code to determine how the user will interact with guis since it has to be done without the mouse pointer.Ill be trying to do that but if anybody has some info that could help me please do share it.

 

Edit:The code above it seems is not very usefull for what im trying to do since it just moves the camera independendly of mouse input while everything else functions based on user mouse input.

Edited by ATomo9_CY
Link to comment
Share on other sites

 the code below is in MouseHelper

 public void registerCallbacks(long handle) {
      InputMappings.func_216503_a(handle, this::cursorPosCallback, this::mouseButtonCallback, this::scrollCallback);
   }

 

the methods it mentions are all private but i think they are the ones responsible for determining the mouse position and actions ingame.

Is there a way to call those methods or fake a mouse movement to get them called?

 

 

Link to comment
Share on other sites

I made my own mousehelper class with public methods but when i call them nothing happens.I can have the game playing without focus and without it holding my cursor but i cant make it behave like the mouse is moving.This is the only thing left to get it working.If anybody can help me this is the only thing i need

Link to comment
Share on other sites

Nevermind i fixed it.It works now.I had commented some code that changed the mouse position while trying something else previously and forgot to uncomment it.

I think simulating game input could be important to other modders so if there is any place to show how i did it let me know.ill share the code and changes needed

Link to comment
Share on other sites

  • 11 months later...
  • 11 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • That has nothing to do with the item durability. It's the player's arm swinging when you use an item. 🙂    I think you can change this by subscribing to InputEvent.InteractionKeyMappingTriggered Then use something like (untested pseudo code) ItemStack itemStack = Minecraft.getInstance().player.getItemInHand(event.getHand()); if (itemStack.is(YOUR_ITEM.get())) { event.setSwingHand(false); }  
    • 1[20Aug2022 00:30:56.451] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher running: args [--launchTarget, forgeserver, --fml.forgeVersion, 43.1.1, --fml.mcVersion, 1.19.2, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20220805.130853, nogui] 2[20Aug2022 00:30:56.462] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher 10.0.8+10.0.8+main.0ef7e830 starting: java version 17.0.2 by Oracle Corporation; OS Linux arch amd64 version 5.4.0-99-generic 3[20Aug2022 00:30:56.767] [main/INFO] [mixin/]: SpongePowered MIXIN Subsystem Version=0.8.5 Source=union:/server/libraries/org/spongepowered/mixin/0.8.5/mixin-0.8.5.jar%2363!/ Service=ModLauncher Env=SERVER 4[20Aug2022 00:30:57.640] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file /server/libraries/net/minecraftforge/fmlcore/1.19.2-43.1.1/fmlcore-1.19.2-43.1.1.jar is missing mods.toml file 5[20Aug2022 00:30:57.646] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file /server/libraries/net/minecraftforge/javafmllanguage/1.19.2-43.1.1/javafmllanguage-1.19.2-43.1.1.jar is missing mods.toml file 6[20Aug2022 00:30:57.649] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file /server/libraries/net/minecraftforge/lowcodelanguage/1.19.2-43.1.1/lowcodelanguage-1.19.2-43.1.1.jar is missing mods.toml file 7[20Aug2022 00:30:57.652] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file /server/libraries/net/minecraftforge/mclanguage/1.19.2-43.1.1/mclanguage-1.19.2-43.1.1.jar is missing mods.toml file 8[20Aug2022 00:30:57.862] [main/INFO] [net.minecraftforge.fml.loading.moddiscovery.JarInJarDependencyLocator/]: No dependencies to load found. Skipping! 9[20Aug2022 00:31:04.059] [main/INFO] [mixin/]: Compatibility level set to JAVA_17 10[20Aug2022 00:31:04.132] [main/INFO] [cpw.mods.modlauncher.LaunchServiceHandler/MODLAUNCHER]: Launching target 'forgeserver' with arguments [nogui] 11[20Aug2022 00:31:21.844] [main/INFO] [net.minecraft.util.datafix.DataFixers/]: Building unoptimized datafixer 12[20Aug2022 00:31:31.555] [modloading-worker-0/INFO] [net.minecraftforge.common.ForgeMod/FORGEMOD]: Forge mod loading, version 43.1.1, for MC 1.19.2 with MCP 20220805.130853 13[20Aug2022 00:31:31.593] [modloading-worker-0/INFO] [net.minecraftforge.common.MinecraftForge/FORGE]: MinecraftForge v43.1.1 Initialized 14[20Aug2022 00:31:41.488] [main/INFO] [journeymap/]: Initializing Packet Registries 15[20Aug2022 00:31:41.814] [Forge Version Check/INFO] [net.minecraftforge.fml.VersionChecker/]: [forge] Starting version check at https://files.minecraftforge.net/net/minecraftforge/forge/promotions_slim.json 16[20Aug2022 00:31:43.224] [Forge Version Check/INFO] [net.minecraftforge.fml.VersionChecker/]: [forge] Found status: UP_TO_DATE Current: 43.1.1 Target: null 17[20Aug2022 00:31:43.225] [Forge Version Check/INFO] [net.minecraftforge.fml.VersionChecker/]: [backpacked] Starting version check at https://mrcrayfish.com/modupdatejson?id=backpacked 18[20Aug2022 00:31:43.868] [Forge Version Check/INFO] [net.minecraftforge.fml.VersionChecker/]: [backpacked] Found status: BETA Current: 2.1.10 Target: null 19[20Aug2022 00:31:43.868] [Forge Version Check/INFO] [net.minecraftforge.fml.VersionChecker/]: [twilightforest] Starting version check at https://raw.githubusercontent.com/TeamTwilight/twilightforest/1.19.x/update.json 20[20Aug2022 00:31:44.150] [Forge Version Check/INFO] [net.minecraftforge.fml.VersionChecker/]: [twilightforest] Found status: UP_TO_DATE Current: 4.2.1381 Target: null 21[20Aug2022 00:31:44.151] [Forge Version Check/INFO] [net.minecraftforge.fml.VersionChecker/]: [clumps] Starting version check at https://updates.blamejared.com/get?n=clumps&gv=1.19.1 22[20Aug2022 00:31:44.287] [Forge Version Check/INFO] [net.minecraftforge.fml.VersionChecker/]: [clumps] Found status: BETA Current: 9.0.0+10 Target: null 23[20Aug2022 00:31:44.288] [Forge Version Check/INFO] [net.minecraftforge.fml.VersionChecker/]: [journeymap] Starting version check at https://forge.curseupdate.com/32274/journeymap 24[20Aug2022 00:31:44.686] [Forge Version Check/INFO] [net.minecraftforge.fml.VersionChecker/]: [journeymap] Found status: BETA_OUTDATED Current: 5.8.5 Target: 5.9.0beta2 25[20Aug2022 00:31:44.686] [Forge Version Check/INFO] [net.minecraftforge.fml.VersionChecker/]: [securitycraft] Starting version check at https://www.github.com/Geforce132/SecurityCraft/raw/master/Updates/Forge.json 26[20Aug2022 00:31:45.038] [Forge Version Check/INFO] [net.minecraftforge.fml.VersionChecker/]: [securitycraft] Found status: AHEAD Current: 1.9.3.1 Target: null 27[20Aug2022 00:31:58.939] [main/INFO] [com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService/]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD' 28[20Aug2022 00:32:09.048] [main/WARN] [net.minecraft.server.packs.VanillaPackResources/]: Assets URL 'union:/server/libraries/net/minecraft/server/1.19.2-20220805.130853/server-1.19.2-20220805.130853-srg.jar%23109!/assets/.mcassetsroot' uses unexpected schema 29[20Aug2022 00:32:09.048] [main/WARN] [net.minecraft.server.packs.VanillaPackResources/]: Assets URL 'union:/server/libraries/net/minecraft/server/1.19.2-20220805.130853/server-1.19.2-20220805.130853-srg.jar%23109!/data/.mcassetsroot' uses unexpected schema 30[20Aug2022 00:32:23.207] [main/INFO] [net.minecraft.world.item.crafting.RecipeManager/]: Loaded 10 recipes 31[20Aug2022 00:32:26.279] [main/INFO] [net.minecraft.advancements.AdvancementList/]: Loaded 2152 advancements 32[20Aug2022 00:32:33.314] [Server thread/INFO] [net.minecraft.server.dedicated.DedicatedServer/]: Starting minecraft server version 1.19.2 33[20Aug2022 00:32:33.315] [Server thread/INFO] [net.minecraft.server.dedicated.DedicatedServer/]: Loading properties 34[20Aug2022 00:32:33.315] [Server thread/INFO] [net.minecraft.server.dedicated.DedicatedServer/]: Default game type: SURVIVAL 35[20Aug2022 00:32:33.316] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Generating keypair 36[20Aug2022 00:32:33.926] [Server thread/INFO] [net.minecraft.server.dedicated.DedicatedServer/]: Starting Minecraft server on *:34164 37[20Aug2022 00:32:33.973] [Server thread/INFO] [net.minecraft.server.network.ServerConnectionListener/]: Using epoll channel type 38[20Aug2022 00:32:34.250] [Server thread/WARN] [net.minecraft.server.dedicated.DedicatedServer/]: **** SERVER IS RUNNING IN OFFLINE/INSECURE MODE! 39[20Aug2022 00:32:34.251] [Server thread/WARN] [net.minecraft.server.dedicated.DedicatedServer/]: The server will make no attempt to authenticate usernames. Beware. 40[20Aug2022 00:32:34.251] [Server thread/WARN] [net.minecraft.server.dedicated.DedicatedServer/]: While this makes the game possible to play without internet access, it also opens up the ability for hackers to connect with any username they choose. 41[20Aug2022 00:32:34.252] [Server thread/WARN] [net.minecraft.server.dedicated.DedicatedServer/]: To change this, set "online-mode" to "true" in the server.properties file. 42[20Aug2022 00:32:34.359] [Server thread/INFO] [journeymap/]: Loading JourneyMap Forge Configs 43[20Aug2022 00:32:34.497] [Server thread/INFO] [net.minecraft.server.dedicated.DedicatedServer/]: Preparing level "world" 44[20Aug2022 00:32:35.921] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Preparing start region for dimension minecraft:overworld 45[20Aug2022 00:33:33.217] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 46[20Aug2022 00:33:33.223] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 47[20Aug2022 00:33:33.243] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 48[20Aug2022 00:33:33.252] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 49[20Aug2022 00:33:33.256] [Worker-Main-2/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 50[20Aug2022 00:33:33.265] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 51[20Aug2022 00:33:33.270] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 52[20Aug2022 00:33:33.292] [Worker-Main-2/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 53[20Aug2022 00:33:33.298] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 54[20Aug2022 00:33:33.303] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 55[20Aug2022 00:33:33.307] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 56[20Aug2022 00:33:33.311] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 57[20Aug2022 00:33:33.317] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 58[20Aug2022 00:33:33.325] [Worker-Main-2/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 59[20Aug2022 00:33:33.346] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 60[20Aug2022 00:33:33.355] [Worker-Main-2/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 61[20Aug2022 00:33:33.361] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 62[20Aug2022 00:33:33.366] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 63[20Aug2022 00:33:33.371] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 64[20Aug2022 00:33:33.373] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 65[20Aug2022 00:33:33.388] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 66[20Aug2022 00:33:33.418] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 67[20Aug2022 00:33:33.421] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 68[20Aug2022 00:33:33.428] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 69[20Aug2022 00:33:33.430] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 70[20Aug2022 00:33:33.433] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 71[20Aug2022 00:33:33.435] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 72[20Aug2022 00:33:33.438] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 73[20Aug2022 00:33:33.440] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 74[20Aug2022 00:33:33.443] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 75[20Aug2022 00:33:33.445] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 76[20Aug2022 00:33:33.456] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 77[20Aug2022 00:33:33.457] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 78[20Aug2022 00:33:33.458] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 79[20Aug2022 00:33:33.462] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 80[20Aug2022 00:33:33.463] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 81[20Aug2022 00:33:33.465] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 82[20Aug2022 00:33:33.466] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 83[20Aug2022 00:33:33.468] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 84[20Aug2022 00:33:33.469] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 85[20Aug2022 00:33:33.471] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 86[20Aug2022 00:33:33.502] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 87[20Aug2022 00:33:33.504] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 88[20Aug2022 00:33:33.508] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 89[20Aug2022 00:33:33.521] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 90[20Aug2022 00:33:33.566] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 91[20Aug2022 00:33:33.570] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 92[20Aug2022 00:33:33.573] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 93[20Aug2022 00:33:33.574] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 94[20Aug2022 00:33:33.587] [Worker-Main-2/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 95[20Aug2022 00:33:33.589] [Worker-Main-2/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 96[20Aug2022 00:33:33.591] [Worker-Main-2/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 97[20Aug2022 00:33:33.592] [Worker-Main-2/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 98[20Aug2022 00:33:33.594] [Worker-Main-2/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 99[20Aug2022 00:33:33.597] [Worker-Main-2/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 100[20Aug2022 00:33:33.598] [Worker-Main-2/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 101[20Aug2022 00:33:33.600] [Worker-Main-2/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 102[20Aug2022 00:33:33.601] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 103[20Aug2022 00:33:33.603] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 104[20Aug2022 00:33:33.604] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 105[20Aug2022 00:33:33.610] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 106[20Aug2022 00:33:33.612] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 107[20Aug2022 00:33:33.613] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 108[20Aug2022 00:33:33.615] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 109[20Aug2022 00:33:33.617] [Worker-Main-2/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 110[20Aug2022 00:33:33.619] [Worker-Main-2/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 111[20Aug2022 00:33:33.621] [Worker-Main-2/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 112[20Aug2022 00:33:33.622] [Worker-Main-2/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 113[20Aug2022 00:33:33.636] [Worker-Main-2/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 114[20Aug2022 00:33:33.638] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 115[20Aug2022 00:33:33.640] [Worker-Main-2/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 116[20Aug2022 00:33:33.642] [Worker-Main-2/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 117[20Aug2022 00:33:33.644] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 118[20Aug2022 00:33:33.646] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 119[20Aug2022 00:33:33.648] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 120[20Aug2022 00:33:33.650] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 121[20Aug2022 00:33:33.667] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 122[20Aug2022 00:33:33.669] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 123[20Aug2022 00:33:33.671] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 124[20Aug2022 00:33:33.672] [Worker-Main-2/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 125[20Aug2022 00:33:33.673] [Worker-Main-2/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 126[20Aug2022 00:33:33.675] [Worker-Main-2/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 127[20Aug2022 00:33:33.677] [Worker-Main-2/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 128[20Aug2022 00:33:33.678] [Worker-Main-2/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 129[20Aug2022 00:33:33.687] [Worker-Main-2/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 130[20Aug2022 00:33:33.692] [Worker-Main-2/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 131[20Aug2022 00:33:33.694] [Worker-Main-2/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 132[20Aug2022 00:33:33.709] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 133[20Aug2022 00:33:33.711] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 134[20Aug2022 00:33:33.712] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 135[20Aug2022 00:33:33.714] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 136[20Aug2022 00:33:33.718] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 137[20Aug2022 00:33:33.719] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 138[20Aug2022 00:33:33.720] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 139[20Aug2022 00:33:33.722] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 140[20Aug2022 00:33:33.723] [Worker-Main-2/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 141[20Aug2022 00:33:33.724] [Worker-Main-2/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 142[20Aug2022 00:33:33.726] [Worker-Main-2/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 143[20Aug2022 00:33:33.727] [Worker-Main-2/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 144[20Aug2022 00:33:33.729] [Worker-Main-2/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 145[20Aug2022 00:33:33.730] [Worker-Main-2/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 146[20Aug2022 00:33:33.731] [Worker-Main-2/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 147[20Aug2022 00:33:33.732] [Worker-Main-2/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 148[20Aug2022 00:33:33.734] [Worker-Main-2/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 149[20Aug2022 00:33:33.735] [Worker-Main-2/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 150[20Aug2022 00:33:33.736] [Worker-Main-2/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 151[20Aug2022 00:33:33.738] [Worker-Main-2/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 152[20Aug2022 00:33:33.740] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 153[20Aug2022 00:33:33.741] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 154[20Aug2022 00:33:33.743] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 155[20Aug2022 00:33:33.744] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 156[20Aug2022 00:33:33.745] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 157[20Aug2022 00:33:33.747] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 158[20Aug2022 00:33:33.748] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 159[20Aug2022 00:33:33.750] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 160[20Aug2022 00:33:33.751] [Worker-Main-2/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 161[20Aug2022 00:33:33.928] [Worker-Main-2/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 162[20Aug2022 00:33:34.432] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0% 163[20Aug2022 00:33:34.930] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 1% 164[20Aug2022 00:33:35.428] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 10% 165[20Aug2022 00:33:35.930] [Worker-Main-2/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 11% 166[20Aug2022 00:33:36.430] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 33% 167[20Aug2022 00:33:36.937] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 48% 168[20Aug2022 00:33:37.618] [Worker-Main-1/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 59% 169[20Aug2022 00:33:37.928] [Worker-Main-2/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 71% 170[20Aug2022 00:33:38.465] [Worker-Main-2/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 83% 171[20Aug2022 00:33:38.974] [Server thread/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Time elapsed: 63047 ms 172[20Aug2022 00:33:38.975] [Server thread/INFO] [net.minecraft.server.dedicated.DedicatedServer/]: Done (64.687s)! For help, type "help" 173[20Aug2022 00:33:38.976] [Server thread/INFO] [net.minecraft.server.dedicated.DedicatedServer/]: Starting GS4 status listener 174[20Aug2022 00:33:38.994] [Server thread/INFO] [net.minecraft.server.rcon.thread.GenericThread/]: Thread Query Listener started 175[20Aug2022 00:33:38.994] [Query Listener #1/INFO] [net.minecraft.server.rcon.thread.QueryThreadGs4/]: Query running on 0.0.0.0:9898 176[20Aug2022 00:33:39.000] [Server thread/INFO] [net.minecraft.server.dedicated.DedicatedServer/]: JMX monitoring enabled 177[20Aug2022 00:33:39.062] [Server thread/INFO] [net.minecraftforge.server.permission.PermissionAPI/]: Successfully initialized permission handler forge:default_handler 178[20Aug2022 00:33:41.772] [Server thread/WARN] [net.minecraft.server.MinecraftServer/]: Can't keep up! Is the server overloaded? Running 2026ms or 40 ticks behind 179[20Aug2022 00:34:43.056] [Server thread/INFO] [net.minecraftforge.common.AdvancementLoadFix/]: Using new advancement loading for net.minecraft.server.PlayerAdvancements@2f0bca06 180[20Aug2022 00:34:43.223] [Server thread/INFO] [net.minecraft.server.players.PlayerList/]: PADAFUN[/81.9.208.149:42173] logged in with entity id 145 at (0.5, 66.0, 5.5) 181[20Aug2022 00:34:43.829] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: PADAFUN joined the game 182[20Aug2022 00:34:44.128] [Server thread/INFO] [net.minecraft.server.network.ServerGamePacketListenerImpl/]: PADAFUN lost connection: Disconnected 183[20Aug2022 00:34:44.138] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: PADAFUN left the game 184[20Aug2022 00:34:44.192] [Server thread/WARN] [net.minecraft.network.Connection/]: handleDisconnection() called twice 185[20Aug2022 00:38:27.762] [Server thread/INFO] [net.minecraftforge.common.AdvancementLoadFix/]: Using new advancement loading for net.minecraft.server.PlayerAdvancements@8ded08c 186[20Aug2022 00:38:27.787] [Server thread/INFO] [net.minecraft.server.players.PlayerList/]: Etf0034[/81.33.35.141:64292] logged in with entity id 146 at (-7.5, 69.0, -9.5) 187[20Aug2022 00:38:27.832] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Etf0034 joined the game 188[20Aug2022 00:38:28.838] [Server thread/INFO] [net.minecraft.server.network.ServerGamePacketListenerImpl/]: Etf0034 lost connection: Disconnected 189[20Aug2022 00:38:28.839] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Etf0034 left the game 190
    • I have this code package com.pherment.kirillcraft.events; import com.pherment.kirillcraft.KirillCraft; import net.minecraftforge.event.entity.EntityMountEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; @Mod.EventBusSubscriber(modid = KirillCraft.MODID) public class KCEvents { @SubscribeEvent public static void setHeadacheWhenPlayerMountingOnBoat(EntityMountEvent event) { if (!event.getEntity().level.isClientSide()) { if (event.isMounting()) { //code add effect } } } } And I don't understand how you can give the player an effect. I looked at all the documentation, and livingEntities and mobEffects and everything that can be related to effects and the player. But nothing helps or works. I even tried this code. It would seem that it should work, but it does not work and minecraft gives an error @Mod.EventBusSubscriber(modid = KirillCraft.MODID) public class KCEvents { @SubscribeEvent public static void setHeadacheWhenPlayerMountingOnBoat(EntityMountEvent event, LivingEntity player) { if (!event.getEntity().level.isClientSide()) { if (event.isMounting()) { player.addEffect(new MobEffectInstance(KCEffect.HEADACHE.get(), 400)); } } } }  
    • You have just enough effects installed, but this is an addon for JEI (Just Enough Items) which you don't have.
  • Topics

×
×
  • Create New...

Important Information

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