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

[1.19] Blockstates, setblock


scaroyder
 Share

Recommended Posts

I've got a problem with schematics generation. So actually after reading .schematic file I'm getting two arrays of bytes (blockid and blockdata).

The problem is I dont know how to obtain a BlockState for Level#setBlock (2nd parameter), because I dont know what kind of block I'm going to place, just id and data, and I see no static plug for this parameter (Like BlockState.WHATEVER). 

So how can I deal with it? 

Link to comment
Share on other sites

Posted (edited)
17 minutes ago, scaroyder said:

I just read it with NbtIo without any problems...

how did you write them?

Could you please provide more info to NbtIo, i could not find anything about it in www

Edited by Luis_ST
Link to comment
Share on other sites

2 minutes ago, Luis_ST said:

how did you write them?

Could you please provide more info to NbtIo, i could not find anything about it in www

have a look at

net.minecraft.nbt.NbtIo

Im using it to load schematics from files or to send NBT data via packets between server/client.

Well, I used to do so in 1.6.4, lol. In those times it was named CompressedStreamTools.

The goal im trying to achive is to make schematics import much easier at the server side. I will be able to dl some schematic, put it into server subfolder, and then manipulate with it as I want (dynamically spawn the schematic for some event, or add it to custom worldgen, etc etc etc)

Link to comment
Share on other sites

49 minutes ago, scaroyder said:

have a look at

I kind of thought it was a library

1 hour ago, scaroyder said:

actually  .schematic file just contains a nbt compound, so why not? I just read it with NbtIo without any problems...

how did you write the data into the NBT?

Link to comment
Share on other sites

48 minutes ago, Luis_ST said:

how did you write the data into the NBT?

 public static Schematic get(File f) {
            CompoundTag nbtdata = NbtIo.readCompressed(f);
            short width = nbtdata.getShort("Width");
            short height = nbtdata.getShort("Height");
            short length = nbtdata.getShort("Length");
            byte[] blocks = nbtdata.getByteArray("Blocks");
            byte[] data = nbtdata.getByteArray("Data");
            return new Schematic(width, height, length, blocks, data);
        }
public Schematic(short width, short height, short length, byte[] blocks, byte[] data) {
        this.width = width;
        this.height = height;
        this.length = length;
        this.blocks = blocks;
        this.data = data;
    }

and then I'm using Schematic instance to build schematic in world by calling Level#setBlock.

Well, I supposed to be doing that, but I can't because I dont know where should I get BlockState. 

In 1.6.4 I were able to place a block in world just with coords, blockID and blockdata. 

Link to comment
Share on other sites

ServerLevel.setBlockAndUpdate(). You need the BlockState not the block.

If it is standard minecraft format you can use NbtUtils.readBlockState(CompoundTag)

If it is a BlockEntity then you also need to do Level.setBlockEntity()

again if it is standard nbt you can use BlockEntity.loadStatic()

Link to comment
Share on other sites

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.