Merge branch 'version/7.2.x'

This commit is contained in:
Madeline Miller 2023-06-09 21:41:29 +10:00
commit d312553fc5
No known key found for this signature in database
GPG Key ID: B8EA2E5693115D81
66 changed files with 4727 additions and 280 deletions

View File

@ -29,15 +29,6 @@ if (!project.hasProperty("gitCommitHash")) {
}
}
// Work around https://github.com/gradle/gradle/issues/4823
subprojects {
if (buildscript.sourceFile?.extension?.toLowerCase() == "kts"
&& parent != rootProject) {
generateSequence(parent) { project -> project.parent.takeIf { it != rootProject } }
.forEach { evaluationDependsOn(it.path) }
}
}
logger.lifecycle("""
*******************************************
You are building WorldEdit!
@ -62,11 +53,11 @@ val totalReport = tasks.register<JacocoReport>("jacocoTotalReport") {
executionData(
fileTree(proj.buildDir.absolutePath).include("**/jacoco/*.exec")
)
sourceSets(proj.the<JavaPluginConvention>().sourceSets["main"])
sourceSets(proj.the<JavaPluginExtension>().sourceSets["main"])
reports {
xml.isEnabled = true
xml.destination = rootProject.buildDir.resolve("reports/jacoco/report.xml")
html.isEnabled = true
xml.required.set(true)
xml.outputLocation.set(rootProject.buildDir.resolve("reports/jacoco/report.xml"))
html.required.set(true)
}
dependsOn(proj.tasks.named("test"))
}

View File

@ -49,14 +49,14 @@ dependencies {
implementation("gradle.plugin.org.cadixdev.gradle:licenser:0.6.1")
implementation("org.ajoberstar.grgit:grgit-gradle:4.1.1")
implementation("me.champeau.gradle:japicmp-gradle-plugin:0.4.0")
implementation("gradle.plugin.com.github.johnrengelman:shadow:7.1.2")
implementation("org.jfrog.buildinfo:build-info-extractor-gradle:4.27.1")
implementation("org.spongepowered:spongegradle-plugin-development:2.0.2")
implementation("org.spongepowered:vanillagradle:0.2.1-20220619.210040-41")
implementation("net.minecraftforge.gradle:ForgeGradle:5.1.68")
implementation("com.github.johnrengelman:shadow:8.1.1")
implementation("org.jfrog.buildinfo:build-info-extractor-gradle:4.32.0")
implementation("org.spongepowered:spongegradle-plugin-development:2.1.1")
implementation("org.spongepowered:vanillagradle:0.2.1-20230603.203956-54")
implementation("net.minecraftforge.gradle:ForgeGradle:6.0.6")
implementation("net.fabricmc:fabric-loom:$loomVersion")
implementation("net.fabricmc:sponge-mixin:$mixinVersion")
implementation("org.enginehub.gradle:gradle-codecov-plugin:0.1.0")
implementation("io.papermc.paperweight.userdev:io.papermc.paperweight.userdev.gradle.plugin:1.3.5")
implementation("org.spongepowered:mixingradle:0.7.32")
implementation("org.enginehub.gradle:gradle-codecov-plugin:0.2.0")
implementation("io.papermc.paperweight.userdev:io.papermc.paperweight.userdev.gradle.plugin:1.5.5")
implementation("org.spongepowered:mixingradle:0.7.33")
}

View File

@ -19,7 +19,7 @@ fun Project.applyPlatformAndCoreConfiguration(javaRelease: Int = 17) {
applyCommonJavaConfiguration(
sourcesJar = name in setOf("worldedit-core", "worldedit-bukkit", "worldedit-fabric"),
javaRelease = javaRelease,
banSlf4j = name !in setOf("worldedit-fabric", "worldedit-forge"),
banSlf4j = name !in setOf("worldedit-fabric", "worldedit-forge", "worldedit-sponge"),
)
ext["internalVersion"] = "$version+${rootProject.ext["gitCommitHash"]}"

View File

@ -4,5 +4,5 @@ version=7.3.0-SNAPSHOT
org.gradle.jvmargs=-Xmx2G
org.gradle.parallel=true
loom.version=1.1-SNAPSHOT
mixin.version=0.11.4+mixin.0.8.5
loom.version=1.2.7
mixin.version=0.12.5+mixin.0.8.5

Binary file not shown.

View File

@ -1,5 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

12
gradlew vendored
View File

@ -55,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
@ -80,10 +80,10 @@ do
esac
done
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
APP_NAME="Gradle"
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
@ -143,12 +143,16 @@ fi
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac

1
gradlew.bat vendored
View File

@ -26,6 +26,7 @@ if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

View File

@ -2,7 +2,7 @@ rootProject.name = "worldedit"
include("worldedit-libs")
listOf("1.17.1", "1.18.2", "1.19", "1.19.3", "1.19.4").forEach {
listOf("1.17.1", "1.18.2", "1.19", "1.19.3", "1.19.4", "1.20").forEach {
include("worldedit-bukkit:adapters:adapter-$it")
}

View File

@ -1,5 +1,7 @@
import io.papermc.paperweight.userdev.PaperweightUserDependenciesExtension
applyPaperweightAdapterConfiguration(javaRelease = 17)
dependencies {
paperDevBundle("1.17.1-R0.1-20220414.034903-210")
the<PaperweightUserDependenciesExtension>().paperDevBundle("1.17.1-R0.1-20220414.034903-210")
}

View File

@ -1,6 +1,8 @@
import io.papermc.paperweight.userdev.PaperweightUserDependenciesExtension
applyPaperweightAdapterConfiguration()
dependencies {
// https://repo.papermc.io/service/rest/repository/browse/maven-public/io/papermc/paper/dev-bundle/
paperDevBundle("1.18.2-R0.1-20220304.102823-4")
the<PaperweightUserDependenciesExtension>().paperDevBundle("1.18.2-R0.1-20220304.102823-4")
}

View File

@ -1,6 +1,8 @@
import io.papermc.paperweight.userdev.PaperweightUserDependenciesExtension
applyPaperweightAdapterConfiguration()
dependencies {
// https://repo.papermc.io/service/rest/repository/browse/maven-public/io/papermc/paper/dev-bundle/
paperDevBundle("1.19.3-R0.1-20221226.180038-55")
the<PaperweightUserDependenciesExtension>().paperDevBundle("1.19.3-R0.1-20221226.180038-55")
}

View File

@ -1,6 +1,8 @@
import io.papermc.paperweight.userdev.PaperweightUserDependenciesExtension
applyPaperweightAdapterConfiguration()
dependencies {
// https://repo.papermc.io/service/rest/repository/browse/maven-public/io/papermc/paper/dev-bundle/
paperDevBundle("1.19.4-R0.1-20230315.180941-2")
the<PaperweightUserDependenciesExtension>().paperDevBundle("1.19.4-R0.1-20230315.180941-2")
}

View File

@ -1,6 +1,8 @@
import io.papermc.paperweight.userdev.PaperweightUserDependenciesExtension
applyPaperweightAdapterConfiguration()
dependencies {
// https://repo.papermc.io/service/rest/repository/browse/maven-public/io/papermc/paper/dev-bundle/
paperDevBundle("1.19-R0.1-20220609.175204-1")
the<PaperweightUserDependenciesExtension>().paperDevBundle("1.19-R0.1-20220609.175204-1")
}

View File

@ -0,0 +1,8 @@
import io.papermc.paperweight.userdev.PaperweightUserDependenciesExtension
applyPaperweightAdapterConfiguration()
dependencies {
// https://repo.papermc.io/service/rest/repository/browse/maven-public/io/papermc/paper/dev-bundle/
the<PaperweightUserDependenciesExtension>().paperDevBundle("1.20-R0.1-20230608.125933-3")
}

View File

@ -0,0 +1,93 @@
/*
* WorldEdit, a Minecraft world manipulation toolkit
* Copyright (C) sk89q <http://www.sk89q.com>
* Copyright (C) WorldEdit team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.sk89q.worldedit.bukkit.adapter.impl.v1_20_R1;
import com.mojang.authlib.GameProfile;
import net.minecraft.network.chat.Component;
import net.minecraft.network.protocol.game.ServerboundClientInformationPacket;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.stats.Stat;
import net.minecraft.world.MenuProvider;
import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.level.block.entity.SignBlockEntity;
import net.minecraft.world.phys.Vec3;
import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
import java.util.OptionalInt;
import java.util.UUID;
class PaperweightFakePlayer extends ServerPlayer {
private static final GameProfile FAKE_WORLDEDIT_PROFILE = new GameProfile(UUID.nameUUIDFromBytes("worldedit".getBytes()), "[WorldEdit]");
private static final Vec3 ORIGIN = new Vec3(0.0D, 0.0D, 0.0D);
PaperweightFakePlayer(ServerLevel world) {
super(world.getServer(), world, FAKE_WORLDEDIT_PROFILE);
}
@Override
public Vec3 position() {
return ORIGIN;
}
@Override
public void tick() {
}
@Override
public void die(DamageSource damagesource) {
}
@Override
public Entity changeDimension(ServerLevel worldserver, TeleportCause cause) {
return this;
}
@Override
public OptionalInt openMenu(MenuProvider factory) {
return OptionalInt.empty();
}
@Override
public void updateOptions(ServerboundClientInformationPacket packet) {
}
@Override
public void displayClientMessage(Component message, boolean actionBar) {
}
@Override
public void awardStat(Stat<?> stat, int amount) {
}
@Override
public void awardStat(Stat<?> stat) {
}
@Override
public boolean isInvulnerableTo(DamageSource damageSource) {
return true;
}
@Override
public void openTextEdit(SignBlockEntity sign, boolean front) {
}
}

View File

@ -0,0 +1,188 @@
/*
* WorldEdit, a Minecraft world manipulation toolkit
* Copyright (C) sk89q <http://www.sk89q.com>
* Copyright (C) WorldEdit team and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.sk89q.worldedit.bukkit.adapter.impl.v1_20_R1;
import com.sk89q.jnbt.CompoundTag;
import com.sk89q.worldedit.bukkit.BukkitAdapter;
import com.sk89q.worldedit.internal.block.BlockStateIdAccess;
import com.sk89q.worldedit.internal.wna.WorldNativeAccess;
import com.sk89q.worldedit.util.SideEffect;
import com.sk89q.worldedit.util.SideEffectSet;
import com.sk89q.worldedit.world.block.BlockState;
import net.minecraft.core.BlockPos;
import net.minecraft.nbt.Tag;
import net.minecraft.server.level.FullChunkStatus;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.chunk.LevelChunk;
import org.bukkit.craftbukkit.v1_20_R1.CraftWorld;
import org.bukkit.craftbukkit.v1_20_R1.block.data.CraftBlockData;
import org.bukkit.event.block.BlockPhysicsEvent;
import java.lang.ref.WeakReference;
import java.util.Objects;
import javax.annotation.Nullable;
public class PaperweightWorldNativeAccess implements WorldNativeAccess<LevelChunk, net.minecraft.world.level.block.state.BlockState, BlockPos> {
private static final int UPDATE = 1;
private static final int NOTIFY = 2;
private final PaperweightAdapter adapter;
private final WeakReference<ServerLevel> world;
private SideEffectSet sideEffectSet;
public PaperweightWorldNativeAccess(PaperweightAdapter adapter, WeakReference<ServerLevel> world) {
this.adapter = adapter;
this.world = world;
}
private ServerLevel getWorld() {
return Objects.requireNonNull(world.get(), "The reference to the world was lost");
}
@Override
public void setCurrentSideEffectSet(SideEffectSet sideEffectSet) {
this.sideEffectSet = sideEffectSet;
}
@Override
public LevelChunk getChunk(int x, int z) {
return getWorld().getChunk(x, z);
}
@Override
public net.minecraft.world.level.block.state.BlockState toNative(BlockState state) {
int stateId = BlockStateIdAccess.getBlockStateId(state);
return BlockStateIdAccess.isValidInternalId(stateId)
? Block.stateById(stateId)
: ((CraftBlockData) BukkitAdapter.adapt(state)).getState();
}
@Override
public net.minecraft.world.level.block.state.BlockState getBlockState(LevelChunk chunk, BlockPos position) {
return chunk.getBlockState(position);
}
@Nullable
@Override
public net.minecraft.world.level.block.state.BlockState setBlockState(LevelChunk chunk, BlockPos position, net.minecraft.world.level.block.state.BlockState state) {
return chunk.setBlockState(position, state, false, this.sideEffectSet.shouldApply(SideEffect.UPDATE));
}
@Override
public net.minecraft.world.level.block.state.BlockState getValidBlockForPosition(net.minecraft.world.level.block.state.BlockState block, BlockPos position) {
return Block.updateFromNeighbourShapes(block, getWorld(), position);
}
@Override
public BlockPos getPosition(int x, int y, int z) {
return new BlockPos(x, y, z);
}
@Override
public void updateLightingForBlock(BlockPos position) {
getWorld().getChunkSource().getLightEngine().checkBlock(position);
}
@Override
public boolean updateTileEntity(BlockPos position, CompoundTag tag) {
// We will assume that the tile entity was created for us
BlockEntity tileEntity = getWorld().getBlockEntity(position);
if (tileEntity == null) {
return false;
}
Tag nativeTag = adapter.fromNative(tag);
PaperweightAdapter.readTagIntoTileEntity((net.minecraft.nbt.CompoundTag) nativeTag, tileEntity);
return true;
}
@Override
public void notifyBlockUpdate(LevelChunk chunk, BlockPos position, net.minecraft.world.level.block.state.BlockState oldState, net.minecraft.world.level.block.state.BlockState newState) {
if (chunk.getSections()[getWorld().getSectionIndex(position.getY())] != null) {
getWorld().sendBlockUpdated(position, oldState, newState, UPDATE | NOTIFY);
}
}
@Override
public boolean isChunkTicking(LevelChunk chunk) {
return chunk.getFullStatus().isOrAfter(FullChunkStatus.BLOCK_TICKING);
}
@Override
public void markBlockChanged(LevelChunk chunk, BlockPos position) {
if (chunk.getSections()[getWorld().getSectionIndex(position.getY())] != null) {
getWorld().getChunkSource().blockChanged(position);
}
}
@Override
public void notifyNeighbors(BlockPos pos, net.minecraft.world.level.block.state.BlockState oldState, net.minecraft.world.level.block.state.BlockState newState) {
ServerLevel world = getWorld();
if (sideEffectSet.shouldApply(SideEffect.EVENTS)) {
world.updateNeighborsAt(pos, oldState.getBlock());
} else {
// When we don't want events, manually run the physics without them.
Block block = oldState.getBlock();
fireNeighborChanged(pos, world, block, pos.west());
fireNeighborChanged(pos, world, block, pos.east());
fireNeighborChanged(pos, world, block, pos.below());
fireNeighborChanged(pos, world, block, pos.above());
fireNeighborChanged(pos, world, block, pos.north());
fireNeighborChanged(pos, world, block, pos.south());
}
if (newState.hasAnalogOutputSignal()) {
world.updateNeighbourForOutputSignal(pos, newState.getBlock());
}
}
@Override
public void updateBlock(BlockPos pos, net.minecraft.world.level.block.state.BlockState oldState, net.minecraft.world.level.block.state.BlockState newState) {
ServerLevel world = getWorld();
newState.onPlace(world, pos, oldState, false);
}
// Not sure why neighborChanged is deprecated
@SuppressWarnings("deprecation")
private void fireNeighborChanged(BlockPos pos, ServerLevel world, Block block, BlockPos neighborPos) {
world.getBlockState(neighborPos).neighborChanged(world, neighborPos, block, pos, false);
}
@Override
public void updateNeighbors(BlockPos pos, net.minecraft.world.level.block.state.BlockState oldState, net.minecraft.world.level.block.state.BlockState newState, int recursionLimit) {
ServerLevel world = getWorld();
oldState.updateIndirectNeighbourShapes(world, pos, NOTIFY, recursionLimit);
if (sideEffectSet.shouldApply(SideEffect.EVENTS)) {
CraftWorld craftWorld = world.getWorld();
BlockPhysicsEvent event = new BlockPhysicsEvent(craftWorld.getBlockAt(pos.getX(), pos.getY(), pos.getZ()), CraftBlockData.fromData(newState));
world.getCraftServer().getPluginManager().callEvent(event);
if (event.isCancelled()) {
return;
}
}
newState.updateNeighbourShapes(world, pos, NOTIFY, recursionLimit);
newState.updateIndirectNeighbourShapes(world, pos, NOTIFY, recursionLimit);
}
@Override
public void onBlockStateChange(BlockPos pos, net.minecraft.world.level.block.state.BlockState oldState, net.minecraft.world.level.block.state.BlockState newState) {
getWorld().onBlockStateChange(pos, oldState, newState);
}
}

View File

@ -27,7 +27,13 @@ val adapters = configurations.create("adapters") {
isCanBeResolved = true
shouldResolveConsistentlyWith(configurations["runtimeClasspath"])
attributes {
attribute(Obfuscation.OBFUSCATION_ATTRIBUTE, objects.named(Obfuscation.OBFUSCATED))
attribute(Obfuscation.OBFUSCATION_ATTRIBUTE,
if ((project.findProperty("enginehub.obf.none") as String?).toBoolean()) {
objects.named(Obfuscation.NONE)
} else {
objects.named(Obfuscation.OBFUSCATED)
}
)
}
}

View File

@ -23,6 +23,7 @@ import com.sk89q.worldedit.LocalSession;
import com.sk89q.worldedit.WorldEdit;
import com.sk89q.worldedit.extension.platform.Actor;
import com.sk89q.worldedit.regions.selector.CuboidRegionSelector;
import com.sk89q.worldedit.regions.selector.ExtendingCuboidRegionSelector;
import com.sk89q.worldedit.util.formatting.text.TextComponent;
import com.sk89q.worldedit.util.task.Task;
import com.sk89q.worldedit.world.World;
@ -38,9 +39,13 @@ public class CLIExtraCommands {
desc = "Select the entire world"
)
public void selectWorld(Actor actor, World world, LocalSession session) {
session.setRegionSelector(world, new CuboidRegionSelector(
world, world.getMinimumPoint(), world.getMaximumPoint()
));
final CuboidRegionSelector selector;
if (session.getRegionSelector(world) instanceof ExtendingCuboidRegionSelector) {
selector = new ExtendingCuboidRegionSelector(world, world.getMinimumPoint(), world.getMaximumPoint());
} else {
selector = new CuboidRegionSelector(world, world.getMinimumPoint(), world.getMaximumPoint());
}
session.setRegionSelector(world, selector);
actor.printInfo(TextComponent.of("Selected the entire world."));
}

View File

@ -29,7 +29,7 @@ configurations {
dependencies {
constraints {
"implementation"( "org.yaml:snakeyaml") {
version { require("1.33") }
version { require("2.0") }
because("Bukkit provides SnakeYaml")
}
}
@ -37,7 +37,7 @@ dependencies {
"api"(project(":worldedit-libs:core"))
"compileOnly"("de.schlichtherle:truezip:6.8.4")
"implementation"("org.mozilla:rhino-runtime:1.7.13")
"implementation"("org.yaml:snakeyaml:1.33")
"implementation"("org.yaml:snakeyaml:2.0")
"implementation"("com.google.guava:guava")
"compileOnlyApi"("com.google.code.findbugs:jsr305:1.3.9")
"implementation"("com.google.code.gson:gson")
@ -136,7 +136,7 @@ tasks.named<Copy>("processResources") {
configure<PublishingExtension> {
publications.named<MavenPublication>("maven") {
artifactId = the<BasePluginConvention>().archivesBaseName
artifactId = the<BasePluginExtension>().archivesName.get()
from(components["java"])
}
}

View File

@ -1,14 +1,14 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "1.5.30"
kotlin("jvm") version "1.8.20"
application
}
applyCommonConfiguration()
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "1.8"
kotlinOptions.jvmTarget = "17"
}
application.mainClass.set("com.sk89q.worldedit.internal.util.DocumentationPrinter")

View File

@ -104,7 +104,7 @@ public class YAMLProcessor extends YAMLNode {
// pre-1.32 snakeyaml
}
yaml = new Yaml(new SafeConstructor(), representer, dumperOptions, loaderOptions);
yaml = new Yaml(new SafeConstructor(new LoaderOptions()), representer, dumperOptions, loaderOptions);
this.file = file;
}
@ -308,6 +308,7 @@ public class YAMLProcessor extends YAMLNode {
private static class FancyRepresenter extends Representer {
private FancyRepresenter() {
super(new DumperOptions());
this.nullRepresenter = o -> representScalar(Tag.NULL, "");
}
}

View File

@ -45,6 +45,7 @@ import com.sk89q.worldedit.math.transform.AffineTransform;
import com.sk89q.worldedit.regions.Region;
import com.sk89q.worldedit.regions.RegionSelector;
import com.sk89q.worldedit.regions.selector.CuboidRegionSelector;
import com.sk89q.worldedit.regions.selector.ExtendingCuboidRegionSelector;
import com.sk89q.worldedit.session.ClipboardHolder;
import com.sk89q.worldedit.util.formatting.text.Component;
import com.sk89q.worldedit.util.formatting.text.TextComponent;
@ -191,7 +192,12 @@ public class ClipboardCommands {
BlockVector3 clipboardOffset = clipboard.getRegion().getMinimumPoint().subtract(clipboard.getOrigin());
Vector3 realTo = to.toVector3().add(holder.getTransform().apply(clipboardOffset.toVector3()));
Vector3 max = realTo.add(holder.getTransform().apply(region.getMaximumPoint().subtract(region.getMinimumPoint()).toVector3()));
RegionSelector selector = new CuboidRegionSelector(world, realTo.toBlockPoint(), max.toBlockPoint());
final CuboidRegionSelector selector;
if (session.getRegionSelector(world) instanceof ExtendingCuboidRegionSelector) {
selector = new ExtendingCuboidRegionSelector(world, realTo.toBlockPoint(), max.toBlockPoint());
} else {
selector = new CuboidRegionSelector(world, realTo.toBlockPoint(), max.toBlockPoint());
}
session.setRegionSelector(world, selector);
selector.learnChanges();
selector.explainRegionAdjust(actor, session);

View File

@ -79,4 +79,10 @@ public final class Constants {
* The DataVersion for Minecraft 1.19
*/
public static final int DATA_VERSION_MC_1_19 = 3105;
/**
* The DataVersion for Minecraft 1.20
*/
public static final int DATA_VERSION_MC_1_20 = 3463;
}

View File

@ -74,6 +74,7 @@ public final class Functions {
"Function does not return a number");
handle = handle.asType(handle.type().changeReturnType(Number.class));
handle = filterReturnValue(handle, DOUBLE_VALUE);
handle = handle.asType(handle.type().wrap());
}
// return vararg-ity
if (wasVarargs) {

View File

@ -25,6 +25,7 @@ import com.sk89q.worldedit.extension.platform.Actor;
import com.sk89q.worldedit.internal.cui.CUIRegion;
import com.sk89q.worldedit.internal.cui.SelectionPointEvent;
import com.sk89q.worldedit.internal.cui.SelectionPolygonEvent;
import com.sk89q.worldedit.internal.cui.SelectionShapeEvent;
import com.sk89q.worldedit.math.BlockVector2;
import com.sk89q.worldedit.math.BlockVector3;
import com.sk89q.worldedit.regions.ConvexPolyhedralRegion;
@ -199,6 +200,7 @@ public class ConvexPolyhedralRegionSelector implements RegionSelector, CUIRegion
checkNotNull(session);
checkNotNull(pos);
session.dispatchCUIEvent(player, new SelectionShapeEvent(getTypeID()));
session.describeCUI(player);
player.printInfo(TranslatableComponent.of("worldedit.selection.convex.explain.primary", TextComponent.of(pos.toString())));
@ -219,6 +221,8 @@ public class ConvexPolyhedralRegionSelector implements RegionSelector, CUIRegion
public void explainRegionAdjust(Actor player, LocalSession session) {
checkNotNull(player);
checkNotNull(session);
session.dispatchCUIEvent(player, new SelectionShapeEvent(getTypeID()));
session.describeCUI(player);
}

View File

@ -169,7 +169,7 @@ class Int2BaseBlockMap extends AbstractInt2ObjectMap<BaseBlock> {
return old;
}
int oldId = commonMap.put(key, internalId);
return assumeAsBlock(oldId);
return BlockStateIdAccess.isValidInternalId(oldId) ? assumeAsBlock(oldId) : uncommonMap.remove(key);
}
@Override

View File

@ -36,6 +36,7 @@ public final class BiomeTypes {
@Nullable public static final BiomeType BEACH = get("minecraft:beach");
@Nullable public static final BiomeType BIRCH_FOREST = get("minecraft:birch_forest");
@Deprecated @Nullable public static final BiomeType BIRCH_FOREST_HILLS = get("minecraft:birch_forest_hills");
@Nullable public static final BiomeType CHERRY_GROVE = get("minecraft:cherry_grove");
@Nullable public static final BiomeType COLD_OCEAN = get("minecraft:cold_ocean");
@Nullable public static final BiomeType CRIMSON_FOREST = get("minecraft:crimson_forest");
@Nullable public static final BiomeType DARK_FOREST = get("minecraft:dark_forest");

View File

@ -27,12 +27,15 @@ package com.sk89q.worldedit.world.block;
@SuppressWarnings("unused")
public final class BlockCategories {
public static final BlockCategory ACACIA_LOGS = get("minecraft:acacia_logs");
public static final BlockCategory ALL_HANGING_SIGNS = get("minecraft:all_hanging_signs");
public static final BlockCategory ALL_SIGNS = get("minecraft:all_signs");
public static final BlockCategory ANCIENT_CITY_REPLACEABLE = get("minecraft:ancient_city_replaceable");
public static final BlockCategory ANIMALS_SPAWNABLE_ON = get("minecraft:animals_spawnable_on");
public static final BlockCategory ANVIL = get("minecraft:anvil");
public static final BlockCategory AXOLOTLS_SPAWNABLE_ON = get("minecraft:axolotls_spawnable_on");
public static final BlockCategory AZALEA_GROWS_ON = get("minecraft:azalea_grows_on");
public static final BlockCategory AZALEA_ROOT_REPLACEABLE = get("minecraft:azalea_root_replaceable");
public static final BlockCategory BAMBOO_BLOCKS = get("minecraft:bamboo_blocks");
public static final BlockCategory BAMBOO_PLANTABLE_ON = get("minecraft:bamboo_plantable_on");
public static final BlockCategory BANNERS = get("minecraft:banners");
public static final BlockCategory BASE_STONE_NETHER = get("minecraft:base_stone_nether");
@ -50,8 +53,11 @@ public final class BlockCategories {
@Deprecated public static final BlockCategory CARPETS = get("minecraft:carpets");
public static final BlockCategory CAULDRONS = get("minecraft:cauldrons");
public static final BlockCategory CAVE_VINES = get("minecraft:cave_vines");
public static final BlockCategory CEILING_HANGING_SIGNS = get("minecraft:ceiling_hanging_signs");
public static final BlockCategory CHERRY_LOGS = get("minecraft:cherry_logs");
public static final BlockCategory CLIMBABLE = get("minecraft:climbable");
public static final BlockCategory COAL_ORES = get("minecraft:coal_ores");
public static final BlockCategory COMBINATION_STEP_SOUND_BLOCKS = get("minecraft:combination_step_sound_blocks");
public static final BlockCategory COMPLETES_FIND_TREE_TUTORIAL = get("minecraft:completes_find_tree_tutorial");
public static final BlockCategory CONVERTABLE_TO_MUD = get("minecraft:convertable_to_mud");
public static final BlockCategory COPPER_ORES = get("minecraft:copper_ores");
@ -73,6 +79,8 @@ public final class BlockCategories {
public static final BlockCategory DRAGON_TRANSPARENT = get("minecraft:dragon_transparent");
public static final BlockCategory DRIPSTONE_REPLACEABLE_BLOCKS = get("minecraft:dripstone_replaceable_blocks");
public static final BlockCategory EMERALD_ORES = get("minecraft:emerald_ores");
public static final BlockCategory ENCHANTMENT_POWER_PROVIDER = get("minecraft:enchantment_power_provider");
public static final BlockCategory ENCHANTMENT_POWER_TRANSMITTER = get("minecraft:enchantment_power_transmitter");
public static final BlockCategory ENDERMAN_HOLDABLE = get("minecraft:enderman_holdable");
public static final BlockCategory FALL_DAMAGE_RESETTING = get("minecraft:fall_damage_resetting");
public static final BlockCategory FEATURES_CANNOT_REPLACE = get("minecraft:features_cannot_replace");
@ -95,6 +103,7 @@ public final class BlockCategories {
public static final BlockCategory INFINIBURN_NETHER = get("minecraft:infiniburn_nether");
public static final BlockCategory INFINIBURN_OVERWORLD = get("minecraft:infiniburn_overworld");
public static final BlockCategory INSIDE_STEP_SOUND_BLOCKS = get("minecraft:inside_step_sound_blocks");
public static final BlockCategory INVALID_SPAWN_INSIDE = get("minecraft:invalid_spawn_inside");
public static final BlockCategory IRON_ORES = get("minecraft:iron_ores");
public static final BlockCategory JUNGLE_LOGS = get("minecraft:jungle_logs");
public static final BlockCategory LAPIS_ORES = get("minecraft:lapis_ores");
@ -104,6 +113,7 @@ public final class BlockCategories {
public static final BlockCategory LOGS = get("minecraft:logs");
public static final BlockCategory LOGS_THAT_BURN = get("minecraft:logs_that_burn");
public static final BlockCategory LUSH_GROUND_REPLACEABLE = get("minecraft:lush_ground_replaceable");
public static final BlockCategory MAINTAINS_FARMLAND = get("minecraft:maintains_farmland");
public static final BlockCategory MANGROVE_LOGS = get("minecraft:mangrove_logs");
public static final BlockCategory MANGROVE_LOGS_CAN_GROW_THROUGH = get("minecraft:mangrove_logs_can_grow_through");
public static final BlockCategory MANGROVE_ROOTS_CAN_GROW_THROUGH = get("minecraft:mangrove_roots_can_grow_through");
@ -118,7 +128,6 @@ public final class BlockCategories {
public static final BlockCategory NEEDS_IRON_TOOL = get("minecraft:needs_iron_tool");
public static final BlockCategory NEEDS_STONE_TOOL = get("minecraft:needs_stone_tool");
public static final BlockCategory NETHER_CARVER_REPLACEABLES = get("minecraft:nether_carver_replaceables");
public static final BlockCategory NON_FLAMMABLE_WOOD = get("minecraft:non_flammable_wood");
public static final BlockCategory NYLIUM = get("minecraft:nylium");
public static final BlockCategory OAK_LOGS = get("minecraft:oak_logs");
public static final BlockCategory OCCLUDES_VIBRATION_SIGNALS = get("minecraft:occludes_vibration_signals");
@ -134,7 +143,9 @@ public final class BlockCategories {
public static final BlockCategory RABBITS_SPAWNABLE_ON = get("minecraft:rabbits_spawnable_on");
public static final BlockCategory RAILS = get("minecraft:rails");
public static final BlockCategory REDSTONE_ORES = get("minecraft:redstone_ores");
public static final BlockCategory REPLACEABLE_PLANTS = get("minecraft:replaceable_plants");
public static final BlockCategory REPLACEABLE = get("minecraft:replaceable");
public static final BlockCategory REPLACEABLE_BY_TREES = get("minecraft:replaceable_by_trees");
@Deprecated public static final BlockCategory REPLACEABLE_PLANTS = get("minecraft:replaceable_plants");
public static final BlockCategory SAND = get("minecraft:sand");
public static final BlockCategory SAPLINGS = get("minecraft:saplings");
public static final BlockCategory SCULK_REPLACEABLE = get("minecraft:sculk_replaceable");
@ -144,7 +155,10 @@ public final class BlockCategories {
public static final BlockCategory SLABS = get("minecraft:slabs");
public static final BlockCategory SMALL_DRIPLEAF_PLACEABLE = get("minecraft:small_dripleaf_placeable");
public static final BlockCategory SMALL_FLOWERS = get("minecraft:small_flowers");
public static final BlockCategory SMELTS_TO_GLASS = get("minecraft:smelts_to_glass");
public static final BlockCategory SNAPS_GOAT_HORN = get("minecraft:snaps_goat_horn");
public static final BlockCategory SNIFFER_DIGGABLE_BLOCK = get("minecraft:sniffer_diggable_block");
public static final BlockCategory SNIFFER_EGG_HATCH_BOOST = get("minecraft:sniffer_egg_hatch_boost");
public static final BlockCategory SNOW = get("minecraft:snow");
public static final BlockCategory SNOW_LAYER_CAN_SURVIVE_ON = get("minecraft:snow_layer_can_survive_on");
public static final BlockCategory SNOW_LAYER_CANNOT_SURVIVE_ON = get("minecraft:snow_layer_cannot_survive_on");
@ -154,16 +168,21 @@ public final class BlockCategories {
public static final BlockCategory STAIRS = get("minecraft:stairs");
public static final BlockCategory STANDING_SIGNS = get("minecraft:standing_signs");
public static final BlockCategory STONE_BRICKS = get("minecraft:stone_bricks");
public static final BlockCategory STONE_BUTTONS = get("minecraft:stone_buttons");
public static final BlockCategory STONE_ORE_REPLACEABLES = get("minecraft:stone_ore_replaceables");
public static final BlockCategory STONE_PRESSURE_PLATES = get("minecraft:stone_pressure_plates");
public static final BlockCategory STRIDER_WARM_BLOCKS = get("minecraft:strider_warm_blocks");
public static final BlockCategory SWORD_EFFICIENT = get("minecraft:sword_efficient");
public static final BlockCategory TALL_FLOWERS = get("minecraft:tall_flowers");
public static final BlockCategory TERRACOTTA = get("minecraft:terracotta");
public static final BlockCategory TRAIL_RUINS_REPLACEABLE = get("minecraft:trail_ruins_replaceable");
public static final BlockCategory TRAPDOORS = get("minecraft:trapdoors");
public static final BlockCategory UNDERWATER_BONEMEALS = get("minecraft:underwater_bonemeals");
public static final BlockCategory UNSTABLE_BOTTOM_CENTER = get("minecraft:unstable_bottom_center");
public static final BlockCategory VALID_SPAWN = get("minecraft:valid_spawn");
public static final BlockCategory VIBRATION_RESONATORS = get("minecraft:vibration_resonators");
public static final BlockCategory WALL_CORALS = get("minecraft:wall_corals");
public static final BlockCategory WALL_HANGING_SIGNS = get("minecraft:wall_hanging_signs");
public static final BlockCategory WALL_POST_OVERRIDE = get("minecraft:wall_post_override");
public static final BlockCategory WALL_SIGNS = get("minecraft:wall_signs");
public static final BlockCategory WALLS = get("minecraft:walls");

View File

@ -32,6 +32,7 @@ public final class BlockTypes {
@Nullable public static final BlockType ACACIA_DOOR = get("minecraft:acacia_door");
@Nullable public static final BlockType ACACIA_FENCE = get("minecraft:acacia_fence");
@Nullable public static final BlockType ACACIA_FENCE_GATE = get("minecraft:acacia_fence_gate");
@Nullable public static final BlockType ACACIA_HANGING_SIGN = get("minecraft:acacia_hanging_sign");
@Nullable public static final BlockType ACACIA_LEAVES = get("minecraft:acacia_leaves");
@Nullable public static final BlockType ACACIA_LOG = get("minecraft:acacia_log");
@Nullable public static final BlockType ACACIA_PLANKS = get("minecraft:acacia_planks");
@ -41,6 +42,7 @@ public final class BlockTypes {
@Nullable public static final BlockType ACACIA_SLAB = get("minecraft:acacia_slab");
@Nullable public static final BlockType ACACIA_STAIRS = get("minecraft:acacia_stairs");
@Nullable public static final BlockType ACACIA_TRAPDOOR = get("minecraft:acacia_trapdoor");
@Nullable public static final BlockType ACACIA_WALL_HANGING_SIGN = get("minecraft:acacia_wall_hanging_sign");
@Nullable public static final BlockType ACACIA_WALL_SIGN = get("minecraft:acacia_wall_sign");
@Nullable public static final BlockType ACACIA_WOOD = get("minecraft:acacia_wood");
@Nullable public static final BlockType ACTIVATOR_RAIL = get("minecraft:activator_rail");
@ -60,7 +62,24 @@ public final class BlockTypes {
@Nullable public static final BlockType AZALEA_LEAVES = get("minecraft:azalea_leaves");
@Nullable public static final BlockType AZURE_BLUET = get("minecraft:azure_bluet");
@Nullable public static final BlockType BAMBOO = get("minecraft:bamboo");
@Nullable public static final BlockType BAMBOO_BLOCK = get("minecraft:bamboo_block");
@Nullable public static final BlockType BAMBOO_BUTTON = get("minecraft:bamboo_button");
@Nullable public static final BlockType BAMBOO_DOOR = get("minecraft:bamboo_door");
@Nullable public static final BlockType BAMBOO_FENCE = get("minecraft:bamboo_fence");
@Nullable public static final BlockType BAMBOO_FENCE_GATE = get("minecraft:bamboo_fence_gate");
@Nullable public static final BlockType BAMBOO_HANGING_SIGN = get("minecraft:bamboo_hanging_sign");
@Nullable public static final BlockType BAMBOO_MOSAIC = get("minecraft:bamboo_mosaic");
@Nullable public static final BlockType BAMBOO_MOSAIC_SLAB = get("minecraft:bamboo_mosaic_slab");
@Nullable public static final BlockType BAMBOO_MOSAIC_STAIRS = get("minecraft:bamboo_mosaic_stairs");
@Nullable public static final BlockType BAMBOO_PLANKS = get("minecraft:bamboo_planks");
@Nullable public static final BlockType BAMBOO_PRESSURE_PLATE = get("minecraft:bamboo_pressure_plate");
@Nullable public static final BlockType BAMBOO_SAPLING = get("minecraft:bamboo_sapling");
@Nullable public static final BlockType BAMBOO_SIGN = get("minecraft:bamboo_sign");
@Nullable public static final BlockType BAMBOO_SLAB = get("minecraft:bamboo_slab");
@Nullable public static final BlockType BAMBOO_STAIRS = get("minecraft:bamboo_stairs");
@Nullable public static final BlockType BAMBOO_TRAPDOOR = get("minecraft:bamboo_trapdoor");
@Nullable public static final BlockType BAMBOO_WALL_HANGING_SIGN = get("minecraft:bamboo_wall_hanging_sign");
@Nullable public static final BlockType BAMBOO_WALL_SIGN = get("minecraft:bamboo_wall_sign");
@Nullable public static final BlockType BARREL = get("minecraft:barrel");
@Nullable public static final BlockType BARRIER = get("minecraft:barrier");
@Nullable public static final BlockType BASALT = get("minecraft:basalt");
@ -76,6 +95,7 @@ public final class BlockTypes {
@Nullable public static final BlockType BIRCH_DOOR = get("minecraft:birch_door");
@Nullable public static final BlockType BIRCH_FENCE = get("minecraft:birch_fence");
@Nullable public static final BlockType BIRCH_FENCE_GATE = get("minecraft:birch_fence_gate");
@Nullable public static final BlockType BIRCH_HANGING_SIGN = get("minecraft:birch_hanging_sign");
@Nullable public static final BlockType BIRCH_LEAVES = get("minecraft:birch_leaves");
@Nullable public static final BlockType BIRCH_LOG = get("minecraft:birch_log");
@Nullable public static final BlockType BIRCH_PLANKS = get("minecraft:birch_planks");
@ -85,6 +105,7 @@ public final class BlockTypes {
@Nullable public static final BlockType BIRCH_SLAB = get("minecraft:birch_slab");
@Nullable public static final BlockType BIRCH_STAIRS = get("minecraft:birch_stairs");
@Nullable public static final BlockType BIRCH_TRAPDOOR = get("minecraft:birch_trapdoor");
@Nullable public static final BlockType BIRCH_WALL_HANGING_SIGN = get("minecraft:birch_wall_hanging_sign");
@Nullable public static final BlockType BIRCH_WALL_SIGN = get("minecraft:birch_wall_sign");
@Nullable public static final BlockType BIRCH_WOOD = get("minecraft:birch_wood");
@Nullable public static final BlockType BLACK_BANNER = get("minecraft:black_banner");
@ -158,6 +179,7 @@ public final class BlockTypes {
@Nullable public static final BlockType CACTUS = get("minecraft:cactus");
@Nullable public static final BlockType CAKE = get("minecraft:cake");
@Nullable public static final BlockType CALCITE = get("minecraft:calcite");
@Nullable public static final BlockType CALIBRATED_SCULK_SENSOR = get("minecraft:calibrated_sculk_sensor");
@Nullable public static final BlockType CAMPFIRE = get("minecraft:campfire");
@Nullable public static final BlockType CANDLE = get("minecraft:candle");
@Nullable public static final BlockType CANDLE_CAKE = get("minecraft:candle_cake");
@ -170,8 +192,26 @@ public final class BlockTypes {
@Nullable public static final BlockType CAVE_VINES_PLANT = get("minecraft:cave_vines_plant");
@Nullable public static final BlockType CHAIN = get("minecraft:chain");
@Nullable public static final BlockType CHAIN_COMMAND_BLOCK = get("minecraft:chain_command_block");
@Nullable public static final BlockType CHERRY_BUTTON = get("minecraft:cherry_button");
@Nullable public static final BlockType CHERRY_DOOR = get("minecraft:cherry_door");
@Nullable public static final BlockType CHERRY_FENCE = get("minecraft:cherry_fence");
@Nullable public static final BlockType CHERRY_FENCE_GATE = get("minecraft:cherry_fence_gate");
@Nullable public static final BlockType CHERRY_HANGING_SIGN = get("minecraft:cherry_hanging_sign");
@Nullable public static final BlockType CHERRY_LEAVES = get("minecraft:cherry_leaves");
@Nullable public static final BlockType CHERRY_LOG = get("minecraft:cherry_log");
@Nullable public static final BlockType CHERRY_PLANKS = get("minecraft:cherry_planks");
@Nullable public static final BlockType CHERRY_PRESSURE_PLATE = get("minecraft:cherry_pressure_plate");
@Nullable public static final BlockType CHERRY_SAPLING = get("minecraft:cherry_sapling");
@Nullable public static final BlockType CHERRY_SIGN = get("minecraft:cherry_sign");
@Nullable public static final BlockType CHERRY_SLAB = get("minecraft:cherry_slab");
@Nullable public static final BlockType CHERRY_STAIRS = get("minecraft:cherry_stairs");
@Nullable public static final BlockType CHERRY_TRAPDOOR = get("minecraft:cherry_trapdoor");
@Nullable public static final BlockType CHERRY_WALL_HANGING_SIGN = get("minecraft:cherry_wall_hanging_sign");
@Nullable public static final BlockType CHERRY_WALL_SIGN = get("minecraft:cherry_wall_sign");
@Nullable public static final BlockType CHERRY_WOOD = get("minecraft:cherry_wood");
@Nullable public static final BlockType CHEST = get("minecraft:chest");
@Nullable public static final BlockType CHIPPED_ANVIL = get("minecraft:chipped_anvil");
@Nullable public static final BlockType CHISELED_BOOKSHELF = get("minecraft:chiseled_bookshelf");
@Nullable public static final BlockType CHISELED_DEEPSLATE = get("minecraft:chiseled_deepslate");
@Nullable public static final BlockType CHISELED_NETHER_BRICKS = get("minecraft:chiseled_nether_bricks");
@Nullable public static final BlockType CHISELED_POLISHED_BLACKSTONE = get("minecraft:chiseled_polished_blackstone");
@ -215,6 +255,7 @@ public final class BlockTypes {
@Nullable public static final BlockType CRIMSON_FENCE = get("minecraft:crimson_fence");
@Nullable public static final BlockType CRIMSON_FENCE_GATE = get("minecraft:crimson_fence_gate");
@Nullable public static final BlockType CRIMSON_FUNGUS = get("minecraft:crimson_fungus");
@Nullable public static final BlockType CRIMSON_HANGING_SIGN = get("minecraft:crimson_hanging_sign");
@Nullable public static final BlockType CRIMSON_HYPHAE = get("minecraft:crimson_hyphae");
@Nullable public static final BlockType CRIMSON_NYLIUM = get("minecraft:crimson_nylium");
@Nullable public static final BlockType CRIMSON_PLANKS = get("minecraft:crimson_planks");
@ -225,6 +266,7 @@ public final class BlockTypes {
@Nullable public static final BlockType CRIMSON_STAIRS = get("minecraft:crimson_stairs");
@Nullable public static final BlockType CRIMSON_STEM = get("minecraft:crimson_stem");
@Nullable public static final BlockType CRIMSON_TRAPDOOR = get("minecraft:crimson_trapdoor");
@Nullable public static final BlockType CRIMSON_WALL_HANGING_SIGN = get("minecraft:crimson_wall_hanging_sign");
@Nullable public static final BlockType CRIMSON_WALL_SIGN = get("minecraft:crimson_wall_sign");
@Nullable public static final BlockType CRYING_OBSIDIAN = get("minecraft:crying_obsidian");
@Nullable public static final BlockType CUT_COPPER = get("minecraft:cut_copper");
@ -254,6 +296,7 @@ public final class BlockTypes {
@Nullable public static final BlockType DARK_OAK_DOOR = get("minecraft:dark_oak_door");
@Nullable public static final BlockType DARK_OAK_FENCE = get("minecraft:dark_oak_fence");
@Nullable public static final BlockType DARK_OAK_FENCE_GATE = get("minecraft:dark_oak_fence_gate");
@Nullable public static final BlockType DARK_OAK_HANGING_SIGN = get("minecraft:dark_oak_hanging_sign");
@Nullable public static final BlockType DARK_OAK_LEAVES = get("minecraft:dark_oak_leaves");
@Nullable public static final BlockType DARK_OAK_LOG = get("minecraft:dark_oak_log");
@Nullable public static final BlockType DARK_OAK_PLANKS = get("minecraft:dark_oak_planks");
@ -263,6 +306,7 @@ public final class BlockTypes {
@Nullable public static final BlockType DARK_OAK_SLAB = get("minecraft:dark_oak_slab");
@Nullable public static final BlockType DARK_OAK_STAIRS = get("minecraft:dark_oak_stairs");
@Nullable public static final BlockType DARK_OAK_TRAPDOOR = get("minecraft:dark_oak_trapdoor");
@Nullable public static final BlockType DARK_OAK_WALL_HANGING_SIGN = get("minecraft:dark_oak_wall_hanging_sign");
@Nullable public static final BlockType DARK_OAK_WALL_SIGN = get("minecraft:dark_oak_wall_sign");
@Nullable public static final BlockType DARK_OAK_WOOD = get("minecraft:dark_oak_wood");
@Nullable public static final BlockType DARK_PRISMARINE = get("minecraft:dark_prismarine");
@ -290,6 +334,7 @@ public final class BlockTypes {
@Nullable public static final BlockType DEAD_TUBE_CORAL_BLOCK = get("minecraft:dead_tube_coral_block");
@Nullable public static final BlockType DEAD_TUBE_CORAL_FAN = get("minecraft:dead_tube_coral_fan");
@Nullable public static final BlockType DEAD_TUBE_CORAL_WALL_FAN = get("minecraft:dead_tube_coral_wall_fan");
@Nullable public static final BlockType DECORATED_POT = get("minecraft:decorated_pot");
@Nullable public static final BlockType DEEPSLATE = get("minecraft:deepslate");
@Nullable public static final BlockType DEEPSLATE_BRICK_SLAB = get("minecraft:deepslate_brick_slab");
@Nullable public static final BlockType DEEPSLATE_BRICK_STAIRS = get("minecraft:deepslate_brick_stairs");
@ -428,6 +473,7 @@ public final class BlockTypes {
@Nullable public static final BlockType JUNGLE_DOOR = get("minecraft:jungle_door");
@Nullable public static final BlockType JUNGLE_FENCE = get("minecraft:jungle_fence");
@Nullable public static final BlockType JUNGLE_FENCE_GATE = get("minecraft:jungle_fence_gate");
@Nullable public static final BlockType JUNGLE_HANGING_SIGN = get("minecraft:jungle_hanging_sign");
@Nullable public static final BlockType JUNGLE_LEAVES = get("minecraft:jungle_leaves");
@Nullable public static final BlockType JUNGLE_LOG = get("minecraft:jungle_log");
@Nullable public static final BlockType JUNGLE_PLANKS = get("minecraft:jungle_planks");
@ -437,6 +483,7 @@ public final class BlockTypes {
@Nullable public static final BlockType JUNGLE_SLAB = get("minecraft:jungle_slab");
@Nullable public static final BlockType JUNGLE_STAIRS = get("minecraft:jungle_stairs");
@Nullable public static final BlockType JUNGLE_TRAPDOOR = get("minecraft:jungle_trapdoor");
@Nullable public static final BlockType JUNGLE_WALL_HANGING_SIGN = get("minecraft:jungle_wall_hanging_sign");
@Nullable public static final BlockType JUNGLE_WALL_SIGN = get("minecraft:jungle_wall_sign");
@Nullable public static final BlockType JUNGLE_WOOD = get("minecraft:jungle_wood");
@Nullable public static final BlockType KELP = get("minecraft:kelp");
@ -520,6 +567,7 @@ public final class BlockTypes {
@Nullable public static final BlockType MANGROVE_DOOR = get("minecraft:mangrove_door");
@Nullable public static final BlockType MANGROVE_FENCE = get("minecraft:mangrove_fence");
@Nullable public static final BlockType MANGROVE_FENCE_GATE = get("minecraft:mangrove_fence_gate");
@Nullable public static final BlockType MANGROVE_HANGING_SIGN = get("minecraft:mangrove_hanging_sign");
@Nullable public static final BlockType MANGROVE_LEAVES = get("minecraft:mangrove_leaves");
@Nullable public static final BlockType MANGROVE_LOG = get("minecraft:mangrove_log");
@Nullable public static final BlockType MANGROVE_PLANKS = get("minecraft:mangrove_planks");
@ -530,6 +578,7 @@ public final class BlockTypes {
@Nullable public static final BlockType MANGROVE_SLAB = get("minecraft:mangrove_slab");
@Nullable public static final BlockType MANGROVE_STAIRS = get("minecraft:mangrove_stairs");
@Nullable public static final BlockType MANGROVE_TRAPDOOR = get("minecraft:mangrove_trapdoor");
@Nullable public static final BlockType MANGROVE_WALL_HANGING_SIGN = get("minecraft:mangrove_wall_hanging_sign");
@Nullable public static final BlockType MANGROVE_WALL_SIGN = get("minecraft:mangrove_wall_sign");
@Nullable public static final BlockType MANGROVE_WOOD = get("minecraft:mangrove_wood");
@Nullable public static final BlockType MEDIUM_AMETHYST_BUD = get("minecraft:medium_amethyst_bud");
@ -572,6 +621,7 @@ public final class BlockTypes {
@Nullable public static final BlockType OAK_DOOR = get("minecraft:oak_door");
@Nullable public static final BlockType OAK_FENCE = get("minecraft:oak_fence");
@Nullable public static final BlockType OAK_FENCE_GATE = get("minecraft:oak_fence_gate");
@Nullable public static final BlockType OAK_HANGING_SIGN = get("minecraft:oak_hanging_sign");
@Nullable public static final BlockType OAK_LEAVES = get("minecraft:oak_leaves");
@Nullable public static final BlockType OAK_LOG = get("minecraft:oak_log");
@Nullable public static final BlockType OAK_PLANKS = get("minecraft:oak_planks");
@ -581,6 +631,7 @@ public final class BlockTypes {
@Nullable public static final BlockType OAK_SLAB = get("minecraft:oak_slab");
@Nullable public static final BlockType OAK_STAIRS = get("minecraft:oak_stairs");
@Nullable public static final BlockType OAK_TRAPDOOR = get("minecraft:oak_trapdoor");
@Nullable public static final BlockType OAK_WALL_HANGING_SIGN = get("minecraft:oak_wall_hanging_sign");
@Nullable public static final BlockType OAK_WALL_SIGN = get("minecraft:oak_wall_sign");
@Nullable public static final BlockType OAK_WOOD = get("minecraft:oak_wood");
@Nullable public static final BlockType OBSERVER = get("minecraft:observer");
@ -611,6 +662,8 @@ public final class BlockTypes {
@Nullable public static final BlockType PEARLESCENT_FROGLIGHT = get("minecraft:pearlescent_froglight");
@Nullable public static final BlockType PEONY = get("minecraft:peony");
@Nullable public static final BlockType PETRIFIED_OAK_SLAB = get("minecraft:petrified_oak_slab");
@Nullable public static final BlockType PIGLIN_HEAD = get("minecraft:piglin_head");
@Nullable public static final BlockType PIGLIN_WALL_HEAD = get("minecraft:piglin_wall_head");
@Nullable public static final BlockType PINK_BANNER = get("minecraft:pink_banner");
@Nullable public static final BlockType PINK_BED = get("minecraft:pink_bed");
@Nullable public static final BlockType PINK_CANDLE = get("minecraft:pink_candle");
@ -619,6 +672,7 @@ public final class BlockTypes {
@Nullable public static final BlockType PINK_CONCRETE = get("minecraft:pink_concrete");
@Nullable public static final BlockType PINK_CONCRETE_POWDER = get("minecraft:pink_concrete_powder");
@Nullable public static final BlockType PINK_GLAZED_TERRACOTTA = get("minecraft:pink_glazed_terracotta");
@Nullable public static final BlockType PINK_PETALS = get("minecraft:pink_petals");
@Nullable public static final BlockType PINK_SHULKER_BOX = get("minecraft:pink_shulker_box");
@Nullable public static final BlockType PINK_STAINED_GLASS = get("minecraft:pink_stained_glass");
@Nullable public static final BlockType PINK_STAINED_GLASS_PANE = get("minecraft:pink_stained_glass_pane");
@ -628,6 +682,8 @@ public final class BlockTypes {
@Nullable public static final BlockType PINK_WOOL = get("minecraft:pink_wool");
@Nullable public static final BlockType PISTON = get("minecraft:piston");
@Nullable public static final BlockType PISTON_HEAD = get("minecraft:piston_head");
@Nullable public static final BlockType PITCHER_CROP = get("minecraft:pitcher_crop");
@Nullable public static final BlockType PITCHER_PLANT = get("minecraft:pitcher_plant");
@Nullable public static final BlockType PLAYER_HEAD = get("minecraft:player_head");
@Nullable public static final BlockType PLAYER_WALL_HEAD = get("minecraft:player_wall_head");
@Nullable public static final BlockType PODZOL = get("minecraft:podzol");
@ -667,6 +723,7 @@ public final class BlockTypes {
@Nullable public static final BlockType POTTED_BLUE_ORCHID = get("minecraft:potted_blue_orchid");
@Nullable public static final BlockType POTTED_BROWN_MUSHROOM = get("minecraft:potted_brown_mushroom");
@Nullable public static final BlockType POTTED_CACTUS = get("minecraft:potted_cactus");
@Nullable public static final BlockType POTTED_CHERRY_SAPLING = get("minecraft:potted_cherry_sapling");
@Nullable public static final BlockType POTTED_CORNFLOWER = get("minecraft:potted_cornflower");
@Nullable public static final BlockType POTTED_CRIMSON_FUNGUS = get("minecraft:potted_crimson_fungus");
@Nullable public static final BlockType POTTED_CRIMSON_ROOTS = get("minecraft:potted_crimson_roots");
@ -686,6 +743,7 @@ public final class BlockTypes {
@Nullable public static final BlockType POTTED_RED_MUSHROOM = get("minecraft:potted_red_mushroom");
@Nullable public static final BlockType POTTED_RED_TULIP = get("minecraft:potted_red_tulip");
@Nullable public static final BlockType POTTED_SPRUCE_SAPLING = get("minecraft:potted_spruce_sapling");
@Nullable public static final BlockType POTTED_TORCHFLOWER = get("minecraft:potted_torchflower");
@Nullable public static final BlockType POTTED_WARPED_FUNGUS = get("minecraft:potted_warped_fungus");
@Nullable public static final BlockType POTTED_WARPED_ROOTS = get("minecraft:potted_warped_roots");
@Nullable public static final BlockType POTTED_WHITE_TULIP = get("minecraft:potted_white_tulip");
@ -803,6 +861,7 @@ public final class BlockTypes {
@Nullable public static final BlockType SMOOTH_SANDSTONE_STAIRS = get("minecraft:smooth_sandstone_stairs");
@Nullable public static final BlockType SMOOTH_STONE = get("minecraft:smooth_stone");
@Nullable public static final BlockType SMOOTH_STONE_SLAB = get("minecraft:smooth_stone_slab");
@Nullable public static final BlockType SNIFFER_EGG = get("minecraft:sniffer_egg");
@Nullable public static final BlockType SNOW = get("minecraft:snow");
@Nullable public static final BlockType SNOW_BLOCK = get("minecraft:snow_block");
@Nullable public static final BlockType SOUL_CAMPFIRE = get("minecraft:soul_campfire");
@ -819,6 +878,7 @@ public final class BlockTypes {
@Nullable public static final BlockType SPRUCE_DOOR = get("minecraft:spruce_door");
@Nullable public static final BlockType SPRUCE_FENCE = get("minecraft:spruce_fence");
@Nullable public static final BlockType SPRUCE_FENCE_GATE = get("minecraft:spruce_fence_gate");
@Nullable public static final BlockType SPRUCE_HANGING_SIGN = get("minecraft:spruce_hanging_sign");
@Nullable public static final BlockType SPRUCE_LEAVES = get("minecraft:spruce_leaves");
@Nullable public static final BlockType SPRUCE_LOG = get("minecraft:spruce_log");
@Nullable public static final BlockType SPRUCE_PLANKS = get("minecraft:spruce_planks");
@ -828,6 +888,7 @@ public final class BlockTypes {
@Nullable public static final BlockType SPRUCE_SLAB = get("minecraft:spruce_slab");
@Nullable public static final BlockType SPRUCE_STAIRS = get("minecraft:spruce_stairs");
@Nullable public static final BlockType SPRUCE_TRAPDOOR = get("minecraft:spruce_trapdoor");
@Nullable public static final BlockType SPRUCE_WALL_HANGING_SIGN = get("minecraft:spruce_wall_hanging_sign");
@Nullable public static final BlockType SPRUCE_WALL_SIGN = get("minecraft:spruce_wall_sign");
@Nullable public static final BlockType SPRUCE_WOOD = get("minecraft:spruce_wood");
@Nullable public static final BlockType STICKY_PISTON = get("minecraft:sticky_piston");
@ -843,8 +904,11 @@ public final class BlockTypes {
@Nullable public static final BlockType STONECUTTER = get("minecraft:stonecutter");
@Nullable public static final BlockType STRIPPED_ACACIA_LOG = get("minecraft:stripped_acacia_log");
@Nullable public static final BlockType STRIPPED_ACACIA_WOOD = get("minecraft:stripped_acacia_wood");
@Nullable public static final BlockType STRIPPED_BAMBOO_BLOCK = get("minecraft:stripped_bamboo_block");
@Nullable public static final BlockType STRIPPED_BIRCH_LOG = get("minecraft:stripped_birch_log");
@Nullable public static final BlockType STRIPPED_BIRCH_WOOD = get("minecraft:stripped_birch_wood");
@Nullable public static final BlockType STRIPPED_CHERRY_LOG = get("minecraft:stripped_cherry_log");
@Nullable public static final BlockType STRIPPED_CHERRY_WOOD = get("minecraft:stripped_cherry_wood");
@Nullable public static final BlockType STRIPPED_CRIMSON_HYPHAE = get("minecraft:stripped_crimson_hyphae");
@Nullable public static final BlockType STRIPPED_CRIMSON_STEM = get("minecraft:stripped_crimson_stem");
@Nullable public static final BlockType STRIPPED_DARK_OAK_LOG = get("minecraft:stripped_dark_oak_log");
@ -863,6 +927,8 @@ public final class BlockTypes {
@Nullable public static final BlockType STRUCTURE_VOID = get("minecraft:structure_void");
@Nullable public static final BlockType SUGAR_CANE = get("minecraft:sugar_cane");
@Nullable public static final BlockType SUNFLOWER = get("minecraft:sunflower");
@Nullable public static final BlockType SUSPICIOUS_GRAVEL = get("minecraft:suspicious_gravel");
@Nullable public static final BlockType SUSPICIOUS_SAND = get("minecraft:suspicious_sand");
@Nullable public static final BlockType SWEET_BERRY_BUSH = get("minecraft:sweet_berry_bush");
@Nullable public static final BlockType TALL_GRASS = get("minecraft:tall_grass");
@Nullable public static final BlockType TALL_SEAGRASS = get("minecraft:tall_seagrass");
@ -871,6 +937,8 @@ public final class BlockTypes {
@Nullable public static final BlockType TINTED_GLASS = get("minecraft:tinted_glass");
@Nullable public static final BlockType TNT = get("minecraft:tnt");
@Nullable public static final BlockType TORCH = get("minecraft:torch");
@Nullable public static final BlockType TORCHFLOWER = get("minecraft:torchflower");
@Nullable public static final BlockType TORCHFLOWER_CROP = get("minecraft:torchflower_crop");
@Nullable public static final BlockType TRAPPED_CHEST = get("minecraft:trapped_chest");
@Nullable public static final BlockType TRIPWIRE = get("minecraft:tripwire");
@Nullable public static final BlockType TRIPWIRE_HOOK = get("minecraft:tripwire_hook");
@ -892,6 +960,7 @@ public final class BlockTypes {
@Nullable public static final BlockType WARPED_FENCE = get("minecraft:warped_fence");
@Nullable public static final BlockType WARPED_FENCE_GATE = get("minecraft:warped_fence_gate");
@Nullable public static final BlockType WARPED_FUNGUS = get("minecraft:warped_fungus");
@Nullable public static final BlockType WARPED_HANGING_SIGN = get("minecraft:warped_hanging_sign");
@Nullable public static final BlockType WARPED_HYPHAE = get("minecraft:warped_hyphae");
@Nullable public static final BlockType WARPED_NYLIUM = get("minecraft:warped_nylium");
@Nullable public static final BlockType WARPED_PLANKS = get("minecraft:warped_planks");
@ -902,6 +971,7 @@ public final class BlockTypes {
@Nullable public static final BlockType WARPED_STAIRS = get("minecraft:warped_stairs");
@Nullable public static final BlockType WARPED_STEM = get("minecraft:warped_stem");
@Nullable public static final BlockType WARPED_TRAPDOOR = get("minecraft:warped_trapdoor");
@Nullable public static final BlockType WARPED_WALL_HANGING_SIGN = get("minecraft:warped_wall_hanging_sign");
@Nullable public static final BlockType WARPED_WALL_SIGN = get("minecraft:warped_wall_sign");
@Nullable public static final BlockType WARPED_WART_BLOCK = get("minecraft:warped_wart_block");
@Nullable public static final BlockType WATER = get("minecraft:water");

View File

@ -36,7 +36,9 @@ public final class EntityTypes {
@Nullable public static final EntityType BAT = get("minecraft:bat");
@Nullable public static final EntityType BEE = get("minecraft:bee");
@Nullable public static final EntityType BLAZE = get("minecraft:blaze");
@Nullable public static final EntityType BLOCK_DISPLAY = get("minecraft:block_display");
@Nullable public static final EntityType BOAT = get("minecraft:boat");
@Nullable public static final EntityType CAMEL = get("minecraft:camel");
@Nullable public static final EntityType CAT = get("minecraft:cat");
@Nullable public static final EntityType CAVE_SPIDER = get("minecraft:cave_spider");
@Nullable public static final EntityType CHEST_BOAT = get("minecraft:chest_boat");
@ -80,8 +82,10 @@ public final class EntityTypes {
@Nullable public static final EntityType HORSE = get("minecraft:horse");
@Nullable public static final EntityType HUSK = get("minecraft:husk");
@Nullable public static final EntityType ILLUSIONER = get("minecraft:illusioner");
@Nullable public static final EntityType INTERACTION = get("minecraft:interaction");
@Nullable public static final EntityType IRON_GOLEM = get("minecraft:iron_golem");
@Nullable public static final EntityType ITEM = get("minecraft:item");
@Nullable public static final EntityType ITEM_DISPLAY = get("minecraft:item_display");
@Nullable public static final EntityType ITEM_FRAME = get("minecraft:item_frame");
@Nullable public static final EntityType LEASH_KNOT = get("minecraft:leash_knot");
@Nullable public static final EntityType LIGHTNING_BOLT = get("minecraft:lightning_bolt");
@ -116,6 +120,7 @@ public final class EntityTypes {
@Nullable public static final EntityType SKELETON_HORSE = get("minecraft:skeleton_horse");
@Nullable public static final EntityType SLIME = get("minecraft:slime");
@Nullable public static final EntityType SMALL_FIREBALL = get("minecraft:small_fireball");
@Nullable public static final EntityType SNIFFER = get("minecraft:sniffer");
@Nullable public static final EntityType SNOW_GOLEM = get("minecraft:snow_golem");
@Nullable public static final EntityType SNOWBALL = get("minecraft:snowball");
@Nullable public static final EntityType SPAWNER_MINECART = get("minecraft:spawner_minecart");
@ -125,6 +130,7 @@ public final class EntityTypes {
@Nullable public static final EntityType STRAY = get("minecraft:stray");
@Nullable public static final EntityType STRIDER = get("minecraft:strider");
@Nullable public static final EntityType TADPOLE = get("minecraft:tadpole");
@Nullable public static final EntityType TEXT_DISPLAY = get("minecraft:text_display");
@Nullable public static final EntityType TNT = get("minecraft:tnt");
@Nullable public static final EntityType TNT_MINECART = get("minecraft:tnt_minecart");
@Nullable public static final EntityType TRADER_LLAMA = get("minecraft:trader_llama");

View File

@ -29,15 +29,20 @@ public final class ItemCategories {
public static final ItemCategory ACACIA_LOGS = get("minecraft:acacia_logs");
public static final ItemCategory ANVIL = get("minecraft:anvil");
public static final ItemCategory ARROWS = get("minecraft:arrows");
public static final ItemCategory AXES = get("minecraft:axes");
public static final ItemCategory AXOLOTL_TEMPT_ITEMS = get("minecraft:axolotl_tempt_items");
public static final ItemCategory BAMBOO_BLOCKS = get("minecraft:bamboo_blocks");
public static final ItemCategory BANNERS = get("minecraft:banners");
public static final ItemCategory BEACON_PAYMENT_ITEMS = get("minecraft:beacon_payment_items");
public static final ItemCategory BEDS = get("minecraft:beds");
public static final ItemCategory BIRCH_LOGS = get("minecraft:birch_logs");
public static final ItemCategory BOATS = get("minecraft:boats");
public static final ItemCategory BOOKSHELF_BOOKS = get("minecraft:bookshelf_books");
public static final ItemCategory BREAKS_DECORATED_POTS = get("minecraft:breaks_decorated_pots");
public static final ItemCategory BUTTONS = get("minecraft:buttons");
public static final ItemCategory CANDLES = get("minecraft:candles");
@Deprecated public static final ItemCategory CARPETS = get("minecraft:carpets");
public static final ItemCategory CHERRY_LOGS = get("minecraft:cherry_logs");
public static final ItemCategory CHEST_BOATS = get("minecraft:chest_boats");
public static final ItemCategory CLUSTER_MAX_HARVESTABLES = get("minecraft:cluster_max_harvestables");
public static final ItemCategory COAL_ORES = get("minecraft:coal_ores");
@ -46,13 +51,17 @@ public final class ItemCategories {
public static final ItemCategory COMPLETES_FIND_TREE_TUTORIAL = get("minecraft:completes_find_tree_tutorial");
public static final ItemCategory COPPER_ORES = get("minecraft:copper_ores");
public static final ItemCategory CREEPER_DROP_MUSIC_DISCS = get("minecraft:creeper_drop_music_discs");
public static final ItemCategory CREEPER_IGNITERS = get("minecraft:creeper_igniters");
public static final ItemCategory CRIMSON_STEMS = get("minecraft:crimson_stems");
public static final ItemCategory DAMPENS_VIBRATIONS = get("minecraft:dampens_vibrations");
public static final ItemCategory DARK_OAK_LOGS = get("minecraft:dark_oak_logs");
public static final ItemCategory DECORATED_POT_INGREDIENTS = get("minecraft:decorated_pot_ingredients");
public static final ItemCategory DECORATED_POT_SHERDS = get("minecraft:decorated_pot_sherds");
public static final ItemCategory DIAMOND_ORES = get("minecraft:diamond_ores");
public static final ItemCategory DIRT = get("minecraft:dirt");
public static final ItemCategory DOORS = get("minecraft:doors");
public static final ItemCategory EMERALD_ORES = get("minecraft:emerald_ores");
public static final ItemCategory FENCE_GATES = get("minecraft:fence_gates");
public static final ItemCategory FENCES = get("minecraft:fences");
public static final ItemCategory FISHES = get("minecraft:fishes");
public static final ItemCategory FLOWERS = get("minecraft:flowers");
@ -60,6 +69,8 @@ public final class ItemCategories {
public static final ItemCategory FREEZE_IMMUNE_WEARABLES = get("minecraft:freeze_immune_wearables");
@Deprecated public static final ItemCategory FURNACE_MATERIALS = get("minecraft:furnace_materials");
public static final ItemCategory GOLD_ORES = get("minecraft:gold_ores");
public static final ItemCategory HANGING_SIGNS = get("minecraft:hanging_signs");
public static final ItemCategory HOES = get("minecraft:hoes");
public static final ItemCategory IGNORED_BY_PIGLIN_BABIES = get("minecraft:ignored_by_piglin_babies");
public static final ItemCategory IRON_ORES = get("minecraft:iron_ores");
public static final ItemCategory JUNGLE_LOGS = get("minecraft:jungle_logs");
@ -71,9 +82,11 @@ public final class ItemCategories {
public static final ItemCategory MANGROVE_LOGS = get("minecraft:mangrove_logs");
public static final ItemCategory MUSIC_DISCS = get("minecraft:music_discs");
public static final ItemCategory NON_FLAMMABLE_WOOD = get("minecraft:non_flammable_wood");
public static final ItemCategory NOTEBLOCK_TOP_INSTRUMENTS = get("minecraft:noteblock_top_instruments");
public static final ItemCategory OAK_LOGS = get("minecraft:oak_logs");
@Deprecated public static final ItemCategory OCCLUDES_VIBRATION_SIGNALS = get("minecraft:occludes_vibration_signals");
public static final ItemCategory OVERWORLD_NATURAL_LOGS = get("minecraft:overworld_natural_logs");
@Deprecated public static final ItemCategory OVERWORLD_NATURAL_LOGS = get("minecraft:overworld_natural_logs");
public static final ItemCategory PICKAXES = get("minecraft:pickaxes");
public static final ItemCategory PIGLIN_FOOD = get("minecraft:piglin_food");
public static final ItemCategory PIGLIN_LOVED = get("minecraft:piglin_loved");
public static final ItemCategory PIGLIN_REPELLENTS = get("minecraft:piglin_repellents");
@ -82,18 +95,28 @@ public final class ItemCategories {
public static final ItemCategory REDSTONE_ORES = get("minecraft:redstone_ores");
public static final ItemCategory SAND = get("minecraft:sand");
public static final ItemCategory SAPLINGS = get("minecraft:saplings");
public static final ItemCategory SHOVELS = get("minecraft:shovels");
public static final ItemCategory SIGNS = get("minecraft:signs");
public static final ItemCategory SLABS = get("minecraft:slabs");
public static final ItemCategory SMALL_FLOWERS = get("minecraft:small_flowers");
public static final ItemCategory SMELTS_TO_GLASS = get("minecraft:smelts_to_glass");
public static final ItemCategory SNIFFER_FOOD = get("minecraft:sniffer_food");
public static final ItemCategory SOUL_FIRE_BASE_BLOCKS = get("minecraft:soul_fire_base_blocks");
public static final ItemCategory SPRUCE_LOGS = get("minecraft:spruce_logs");
public static final ItemCategory STAIRS = get("minecraft:stairs");
public static final ItemCategory STONE_BRICKS = get("minecraft:stone_bricks");
public static final ItemCategory STONE_BUTTONS = get("minecraft:stone_buttons");
public static final ItemCategory STONE_CRAFTING_MATERIALS = get("minecraft:stone_crafting_materials");
public static final ItemCategory STONE_TOOL_MATERIALS = get("minecraft:stone_tool_materials");
public static final ItemCategory SWORDS = get("minecraft:swords");
public static final ItemCategory TALL_FLOWERS = get("minecraft:tall_flowers");
public static final ItemCategory TERRACOTTA = get("minecraft:terracotta");
public static final ItemCategory TOOLS = get("minecraft:tools");
public static final ItemCategory TRAPDOORS = get("minecraft:trapdoors");
public static final ItemCategory TRIM_MATERIALS = get("minecraft:trim_materials");
public static final ItemCategory TRIM_TEMPLATES = get("minecraft:trim_templates");
public static final ItemCategory TRIMMABLE_ARMOR = get("minecraft:trimmable_armor");
public static final ItemCategory VILLAGER_PLANTABLE_SEEDS = get("minecraft:villager_plantable_seeds");
public static final ItemCategory WALLS = get("minecraft:walls");
public static final ItemCategory WARPED_STEMS = get("minecraft:warped_stems");
public static final ItemCategory WART_BLOCKS = get("minecraft:wart_blocks");

View File

@ -34,6 +34,7 @@ public final class ItemTypes {
@Nullable public static final ItemType ACACIA_DOOR = get("minecraft:acacia_door");
@Nullable public static final ItemType ACACIA_FENCE = get("minecraft:acacia_fence");
@Nullable public static final ItemType ACACIA_FENCE_GATE = get("minecraft:acacia_fence_gate");
@Nullable public static final ItemType ACACIA_HANGING_SIGN = get("minecraft:acacia_hanging_sign");
@Nullable public static final ItemType ACACIA_LEAVES = get("minecraft:acacia_leaves");
@Nullable public static final ItemType ACACIA_LOG = get("minecraft:acacia_log");
@Nullable public static final ItemType ACACIA_PLANKS = get("minecraft:acacia_planks");
@ -56,9 +57,12 @@ public final class ItemTypes {
@Nullable public static final ItemType ANDESITE_SLAB = get("minecraft:andesite_slab");
@Nullable public static final ItemType ANDESITE_STAIRS = get("minecraft:andesite_stairs");
@Nullable public static final ItemType ANDESITE_WALL = get("minecraft:andesite_wall");
@Nullable public static final ItemType ANGLER_POTTERY_SHERD = get("minecraft:angler_pottery_sherd");
@Nullable public static final ItemType ANVIL = get("minecraft:anvil");
@Nullable public static final ItemType APPLE = get("minecraft:apple");
@Nullable public static final ItemType ARCHER_POTTERY_SHERD = get("minecraft:archer_pottery_sherd");
@Nullable public static final ItemType ARMOR_STAND = get("minecraft:armor_stand");
@Nullable public static final ItemType ARMS_UP_POTTERY_SHERD = get("minecraft:arms_up_pottery_sherd");
@Nullable public static final ItemType ARROW = get("minecraft:arrow");
@Nullable public static final ItemType AXOLOTL_BUCKET = get("minecraft:axolotl_bucket");
@Nullable public static final ItemType AXOLOTL_SPAWN_EGG = get("minecraft:axolotl_spawn_egg");
@ -67,6 +71,23 @@ public final class ItemTypes {
@Nullable public static final ItemType AZURE_BLUET = get("minecraft:azure_bluet");
@Nullable public static final ItemType BAKED_POTATO = get("minecraft:baked_potato");
@Nullable public static final ItemType BAMBOO = get("minecraft:bamboo");
@Nullable public static final ItemType BAMBOO_BLOCK = get("minecraft:bamboo_block");
@Nullable public static final ItemType BAMBOO_BUTTON = get("minecraft:bamboo_button");
@Nullable public static final ItemType BAMBOO_CHEST_RAFT = get("minecraft:bamboo_chest_raft");
@Nullable public static final ItemType BAMBOO_DOOR = get("minecraft:bamboo_door");
@Nullable public static final ItemType BAMBOO_FENCE = get("minecraft:bamboo_fence");
@Nullable public static final ItemType BAMBOO_FENCE_GATE = get("minecraft:bamboo_fence_gate");
@Nullable public static final ItemType BAMBOO_HANGING_SIGN = get("minecraft:bamboo_hanging_sign");
@Nullable public static final ItemType BAMBOO_MOSAIC = get("minecraft:bamboo_mosaic");
@Nullable public static final ItemType BAMBOO_MOSAIC_SLAB = get("minecraft:bamboo_mosaic_slab");
@Nullable public static final ItemType BAMBOO_MOSAIC_STAIRS = get("minecraft:bamboo_mosaic_stairs");
@Nullable public static final ItemType BAMBOO_PLANKS = get("minecraft:bamboo_planks");
@Nullable public static final ItemType BAMBOO_PRESSURE_PLATE = get("minecraft:bamboo_pressure_plate");
@Nullable public static final ItemType BAMBOO_RAFT = get("minecraft:bamboo_raft");
@Nullable public static final ItemType BAMBOO_SIGN = get("minecraft:bamboo_sign");
@Nullable public static final ItemType BAMBOO_SLAB = get("minecraft:bamboo_slab");
@Nullable public static final ItemType BAMBOO_STAIRS = get("minecraft:bamboo_stairs");
@Nullable public static final ItemType BAMBOO_TRAPDOOR = get("minecraft:bamboo_trapdoor");
@Nullable public static final ItemType BARREL = get("minecraft:barrel");
@Nullable public static final ItemType BARRIER = get("minecraft:barrier");
@Nullable public static final ItemType BASALT = get("minecraft:basalt");
@ -88,6 +109,7 @@ public final class ItemTypes {
@Nullable public static final ItemType BIRCH_DOOR = get("minecraft:birch_door");
@Nullable public static final ItemType BIRCH_FENCE = get("minecraft:birch_fence");
@Nullable public static final ItemType BIRCH_FENCE_GATE = get("minecraft:birch_fence_gate");
@Nullable public static final ItemType BIRCH_HANGING_SIGN = get("minecraft:birch_hanging_sign");
@Nullable public static final ItemType BIRCH_LEAVES = get("minecraft:birch_leaves");
@Nullable public static final ItemType BIRCH_LOG = get("minecraft:birch_log");
@Nullable public static final ItemType BIRCH_PLANKS = get("minecraft:birch_planks");
@ -115,6 +137,7 @@ public final class ItemTypes {
@Nullable public static final ItemType BLACKSTONE_SLAB = get("minecraft:blackstone_slab");
@Nullable public static final ItemType BLACKSTONE_STAIRS = get("minecraft:blackstone_stairs");
@Nullable public static final ItemType BLACKSTONE_WALL = get("minecraft:blackstone_wall");
@Nullable public static final ItemType BLADE_POTTERY_SHERD = get("minecraft:blade_pottery_sherd");
@Nullable public static final ItemType BLAST_FURNACE = get("minecraft:blast_furnace");
@Nullable public static final ItemType BLAZE_POWDER = get("minecraft:blaze_powder");
@Nullable public static final ItemType BLAZE_ROD = get("minecraft:blaze_rod");
@ -145,6 +168,7 @@ public final class ItemTypes {
@Nullable public static final ItemType BRAIN_CORAL_BLOCK = get("minecraft:brain_coral_block");
@Nullable public static final ItemType BRAIN_CORAL_FAN = get("minecraft:brain_coral_fan");
@Nullable public static final ItemType BREAD = get("minecraft:bread");
@Nullable public static final ItemType BREWER_POTTERY_SHERD = get("minecraft:brewer_pottery_sherd");
@Nullable public static final ItemType BREWING_STAND = get("minecraft:brewing_stand");
@Nullable public static final ItemType BRICK = get("minecraft:brick");
@Nullable public static final ItemType BRICK_SLAB = get("minecraft:brick_slab");
@ -166,16 +190,20 @@ public final class ItemTypes {
@Nullable public static final ItemType BROWN_STAINED_GLASS_PANE = get("minecraft:brown_stained_glass_pane");
@Nullable public static final ItemType BROWN_TERRACOTTA = get("minecraft:brown_terracotta");
@Nullable public static final ItemType BROWN_WOOL = get("minecraft:brown_wool");
@Nullable public static final ItemType BRUSH = get("minecraft:brush");
@Nullable public static final ItemType BUBBLE_CORAL = get("minecraft:bubble_coral");
@Nullable public static final ItemType BUBBLE_CORAL_BLOCK = get("minecraft:bubble_coral_block");
@Nullable public static final ItemType BUBBLE_CORAL_FAN = get("minecraft:bubble_coral_fan");
@Nullable public static final ItemType BUCKET = get("minecraft:bucket");
@Nullable public static final ItemType BUDDING_AMETHYST = get("minecraft:budding_amethyst");
@Nullable public static final ItemType BUNDLE = get("minecraft:bundle");
@Nullable public static final ItemType BURN_POTTERY_SHERD = get("minecraft:burn_pottery_sherd");
@Nullable public static final ItemType CACTUS = get("minecraft:cactus");
@Deprecated @Nullable public static final ItemType CACTUS_GREEN = get("minecraft:cactus_green");
@Nullable public static final ItemType CAKE = get("minecraft:cake");
@Nullable public static final ItemType CALCITE = get("minecraft:calcite");
@Nullable public static final ItemType CALIBRATED_SCULK_SENSOR = get("minecraft:calibrated_sculk_sensor");
@Nullable public static final ItemType CAMEL_SPAWN_EGG = get("minecraft:camel_spawn_egg");
@Nullable public static final ItemType CAMPFIRE = get("minecraft:campfire");
@Nullable public static final ItemType CANDLE = get("minecraft:candle");
@Nullable public static final ItemType CARROT = get("minecraft:carrot");
@ -192,11 +220,29 @@ public final class ItemTypes {
@Nullable public static final ItemType CHAINMAIL_HELMET = get("minecraft:chainmail_helmet");
@Nullable public static final ItemType CHAINMAIL_LEGGINGS = get("minecraft:chainmail_leggings");
@Nullable public static final ItemType CHARCOAL = get("minecraft:charcoal");
@Nullable public static final ItemType CHERRY_BOAT = get("minecraft:cherry_boat");
@Nullable public static final ItemType CHERRY_BUTTON = get("minecraft:cherry_button");
@Nullable public static final ItemType CHERRY_CHEST_BOAT = get("minecraft:cherry_chest_boat");
@Nullable public static final ItemType CHERRY_DOOR = get("minecraft:cherry_door");
@Nullable public static final ItemType CHERRY_FENCE = get("minecraft:cherry_fence");
@Nullable public static final ItemType CHERRY_FENCE_GATE = get("minecraft:cherry_fence_gate");
@Nullable public static final ItemType CHERRY_HANGING_SIGN = get("minecraft:cherry_hanging_sign");
@Nullable public static final ItemType CHERRY_LEAVES = get("minecraft:cherry_leaves");
@Nullable public static final ItemType CHERRY_LOG = get("minecraft:cherry_log");
@Nullable public static final ItemType CHERRY_PLANKS = get("minecraft:cherry_planks");
@Nullable public static final ItemType CHERRY_PRESSURE_PLATE = get("minecraft:cherry_pressure_plate");
@Nullable public static final ItemType CHERRY_SAPLING = get("minecraft:cherry_sapling");
@Nullable public static final ItemType CHERRY_SIGN = get("minecraft:cherry_sign");
@Nullable public static final ItemType CHERRY_SLAB = get("minecraft:cherry_slab");
@Nullable public static final ItemType CHERRY_STAIRS = get("minecraft:cherry_stairs");
@Nullable public static final ItemType CHERRY_TRAPDOOR = get("minecraft:cherry_trapdoor");
@Nullable public static final ItemType CHERRY_WOOD = get("minecraft:cherry_wood");
@Nullable public static final ItemType CHEST = get("minecraft:chest");
@Nullable public static final ItemType CHEST_MINECART = get("minecraft:chest_minecart");
@Nullable public static final ItemType CHICKEN = get("minecraft:chicken");
@Nullable public static final ItemType CHICKEN_SPAWN_EGG = get("minecraft:chicken_spawn_egg");
@Nullable public static final ItemType CHIPPED_ANVIL = get("minecraft:chipped_anvil");
@Nullable public static final ItemType CHISELED_BOOKSHELF = get("minecraft:chiseled_bookshelf");
@Nullable public static final ItemType CHISELED_DEEPSLATE = get("minecraft:chiseled_deepslate");
@Nullable public static final ItemType CHISELED_NETHER_BRICKS = get("minecraft:chiseled_nether_bricks");
@Nullable public static final ItemType CHISELED_POLISHED_BLACKSTONE = get("minecraft:chiseled_polished_blackstone");
@ -214,6 +260,7 @@ public final class ItemTypes {
@Nullable public static final ItemType COAL_BLOCK = get("minecraft:coal_block");
@Nullable public static final ItemType COAL_ORE = get("minecraft:coal_ore");
@Nullable public static final ItemType COARSE_DIRT = get("minecraft:coarse_dirt");
@Nullable public static final ItemType COAST_ARMOR_TRIM_SMITHING_TEMPLATE = get("minecraft:coast_armor_trim_smithing_template");
@Nullable public static final ItemType COBBLED_DEEPSLATE = get("minecraft:cobbled_deepslate");
@Nullable public static final ItemType COBBLED_DEEPSLATE_SLAB = get("minecraft:cobbled_deepslate_slab");
@Nullable public static final ItemType COBBLED_DEEPSLATE_STAIRS = get("minecraft:cobbled_deepslate_stairs");
@ -260,6 +307,7 @@ public final class ItemTypes {
@Nullable public static final ItemType CRIMSON_FENCE = get("minecraft:crimson_fence");
@Nullable public static final ItemType CRIMSON_FENCE_GATE = get("minecraft:crimson_fence_gate");
@Nullable public static final ItemType CRIMSON_FUNGUS = get("minecraft:crimson_fungus");
@Nullable public static final ItemType CRIMSON_HANGING_SIGN = get("minecraft:crimson_hanging_sign");
@Nullable public static final ItemType CRIMSON_HYPHAE = get("minecraft:crimson_hyphae");
@Nullable public static final ItemType CRIMSON_NYLIUM = get("minecraft:crimson_nylium");
@Nullable public static final ItemType CRIMSON_PLANKS = get("minecraft:crimson_planks");
@ -295,12 +343,14 @@ public final class ItemTypes {
@Nullable public static final ItemType DAMAGED_ANVIL = get("minecraft:damaged_anvil");
@Nullable public static final ItemType DANDELION = get("minecraft:dandelion");
@Deprecated @Nullable public static final ItemType DANDELION_YELLOW = get("minecraft:dandelion_yellow");
@Nullable public static final ItemType DANGER_POTTERY_SHERD = get("minecraft:danger_pottery_sherd");
@Nullable public static final ItemType DARK_OAK_BOAT = get("minecraft:dark_oak_boat");
@Nullable public static final ItemType DARK_OAK_BUTTON = get("minecraft:dark_oak_button");
@Nullable public static final ItemType DARK_OAK_CHEST_BOAT = get("minecraft:dark_oak_chest_boat");
@Nullable public static final ItemType DARK_OAK_DOOR = get("minecraft:dark_oak_door");
@Nullable public static final ItemType DARK_OAK_FENCE = get("minecraft:dark_oak_fence");
@Nullable public static final ItemType DARK_OAK_FENCE_GATE = get("minecraft:dark_oak_fence_gate");
@Nullable public static final ItemType DARK_OAK_HANGING_SIGN = get("minecraft:dark_oak_hanging_sign");
@Nullable public static final ItemType DARK_OAK_LEAVES = get("minecraft:dark_oak_leaves");
@Nullable public static final ItemType DARK_OAK_LOG = get("minecraft:dark_oak_log");
@Nullable public static final ItemType DARK_OAK_PLANKS = get("minecraft:dark_oak_planks");
@ -332,6 +382,7 @@ public final class ItemTypes {
@Nullable public static final ItemType DEAD_TUBE_CORAL_BLOCK = get("minecraft:dead_tube_coral_block");
@Nullable public static final ItemType DEAD_TUBE_CORAL_FAN = get("minecraft:dead_tube_coral_fan");
@Nullable public static final ItemType DEBUG_STICK = get("minecraft:debug_stick");
@Nullable public static final ItemType DECORATED_POT = get("minecraft:decorated_pot");
@Nullable public static final ItemType DEEPSLATE = get("minecraft:deepslate");
@Nullable public static final ItemType DEEPSLATE_BRICK_SLAB = get("minecraft:deepslate_brick_slab");
@Nullable public static final ItemType DEEPSLATE_BRICK_STAIRS = get("minecraft:deepslate_brick_stairs");
@ -381,6 +432,7 @@ public final class ItemTypes {
@Nullable public static final ItemType DRIPSTONE_BLOCK = get("minecraft:dripstone_block");
@Nullable public static final ItemType DROPPER = get("minecraft:dropper");
@Nullable public static final ItemType DROWNED_SPAWN_EGG = get("minecraft:drowned_spawn_egg");
@Nullable public static final ItemType DUNE_ARMOR_TRIM_SMITHING_TEMPLATE = get("minecraft:dune_armor_trim_smithing_template");
@Nullable public static final ItemType ECHO_SHARD = get("minecraft:echo_shard");
@Nullable public static final ItemType EGG = get("minecraft:egg");
@Nullable public static final ItemType ELDER_GUARDIAN_SPAWN_EGG = get("minecraft:elder_guardian_spawn_egg");
@ -400,16 +452,19 @@ public final class ItemTypes {
@Nullable public static final ItemType END_STONE_BRICK_WALL = get("minecraft:end_stone_brick_wall");
@Nullable public static final ItemType END_STONE_BRICKS = get("minecraft:end_stone_bricks");
@Nullable public static final ItemType ENDER_CHEST = get("minecraft:ender_chest");
@Nullable public static final ItemType ENDER_DRAGON_SPAWN_EGG = get("minecraft:ender_dragon_spawn_egg");
@Nullable public static final ItemType ENDER_EYE = get("minecraft:ender_eye");
@Nullable public static final ItemType ENDER_PEARL = get("minecraft:ender_pearl");
@Nullable public static final ItemType ENDERMAN_SPAWN_EGG = get("minecraft:enderman_spawn_egg");
@Nullable public static final ItemType ENDERMITE_SPAWN_EGG = get("minecraft:endermite_spawn_egg");
@Nullable public static final ItemType EVOKER_SPAWN_EGG = get("minecraft:evoker_spawn_egg");
@Nullable public static final ItemType EXPERIENCE_BOTTLE = get("minecraft:experience_bottle");
@Nullable public static final ItemType EXPLORER_POTTERY_SHERD = get("minecraft:explorer_pottery_sherd");
@Nullable public static final ItemType EXPOSED_COPPER = get("minecraft:exposed_copper");
@Nullable public static final ItemType EXPOSED_CUT_COPPER = get("minecraft:exposed_cut_copper");
@Nullable public static final ItemType EXPOSED_CUT_COPPER_SLAB = get("minecraft:exposed_cut_copper_slab");
@Nullable public static final ItemType EXPOSED_CUT_COPPER_STAIRS = get("minecraft:exposed_cut_copper_stairs");
@Nullable public static final ItemType EYE_ARMOR_TRIM_SMITHING_TEMPLATE = get("minecraft:eye_armor_trim_smithing_template");
@Nullable public static final ItemType FARMLAND = get("minecraft:farmland");
@Nullable public static final ItemType FEATHER = get("minecraft:feather");
@Nullable public static final ItemType FERMENTED_SPIDER_EYE = get("minecraft:fermented_spider_eye");
@ -430,6 +485,7 @@ public final class ItemTypes {
@Nullable public static final ItemType FLOWERING_AZALEA = get("minecraft:flowering_azalea");
@Nullable public static final ItemType FLOWERING_AZALEA_LEAVES = get("minecraft:flowering_azalea_leaves");
@Nullable public static final ItemType FOX_SPAWN_EGG = get("minecraft:fox_spawn_egg");
@Nullable public static final ItemType FRIEND_POTTERY_SHERD = get("minecraft:friend_pottery_sherd");
@Nullable public static final ItemType FROG_SPAWN_EGG = get("minecraft:frog_spawn_egg");
@Nullable public static final ItemType FROGSPAWN = get("minecraft:frogspawn");
@Nullable public static final ItemType FURNACE = get("minecraft:furnace");
@ -507,6 +563,8 @@ public final class ItemTypes {
@Nullable public static final ItemType HANGING_ROOTS = get("minecraft:hanging_roots");
@Nullable public static final ItemType HAY_BLOCK = get("minecraft:hay_block");
@Nullable public static final ItemType HEART_OF_THE_SEA = get("minecraft:heart_of_the_sea");
@Nullable public static final ItemType HEART_POTTERY_SHERD = get("minecraft:heart_pottery_sherd");
@Nullable public static final ItemType HEARTBREAK_POTTERY_SHERD = get("minecraft:heartbreak_pottery_sherd");
@Nullable public static final ItemType HEAVY_WEIGHTED_PRESSURE_PLATE = get("minecraft:heavy_weighted_pressure_plate");
@Nullable public static final ItemType HOGLIN_SPAWN_EGG = get("minecraft:hoglin_spawn_egg");
@Nullable public static final ItemType HONEY_BLOCK = get("minecraft:honey_block");
@ -519,6 +577,8 @@ public final class ItemTypes {
@Nullable public static final ItemType HORN_CORAL_BLOCK = get("minecraft:horn_coral_block");
@Nullable public static final ItemType HORN_CORAL_FAN = get("minecraft:horn_coral_fan");
@Nullable public static final ItemType HORSE_SPAWN_EGG = get("minecraft:horse_spawn_egg");
@Nullable public static final ItemType HOST_ARMOR_TRIM_SMITHING_TEMPLATE = get("minecraft:host_armor_trim_smithing_template");
@Nullable public static final ItemType HOWL_POTTERY_SHERD = get("minecraft:howl_pottery_sherd");
@Nullable public static final ItemType HUSK_SPAWN_EGG = get("minecraft:husk_spawn_egg");
@Nullable public static final ItemType ICE = get("minecraft:ice");
@Nullable public static final ItemType INFESTED_CHISELED_STONE_BRICKS = get("minecraft:infested_chiseled_stone_bricks");
@ -535,6 +595,7 @@ public final class ItemTypes {
@Nullable public static final ItemType IRON_BOOTS = get("minecraft:iron_boots");
@Nullable public static final ItemType IRON_CHESTPLATE = get("minecraft:iron_chestplate");
@Nullable public static final ItemType IRON_DOOR = get("minecraft:iron_door");
@Nullable public static final ItemType IRON_GOLEM_SPAWN_EGG = get("minecraft:iron_golem_spawn_egg");
@Nullable public static final ItemType IRON_HELMET = get("minecraft:iron_helmet");
@Nullable public static final ItemType IRON_HOE = get("minecraft:iron_hoe");
@Nullable public static final ItemType IRON_HORSE_ARMOR = get("minecraft:iron_horse_armor");
@ -556,6 +617,7 @@ public final class ItemTypes {
@Nullable public static final ItemType JUNGLE_DOOR = get("minecraft:jungle_door");
@Nullable public static final ItemType JUNGLE_FENCE = get("minecraft:jungle_fence");
@Nullable public static final ItemType JUNGLE_FENCE_GATE = get("minecraft:jungle_fence_gate");
@Nullable public static final ItemType JUNGLE_HANGING_SIGN = get("minecraft:jungle_hanging_sign");
@Nullable public static final ItemType JUNGLE_LEAVES = get("minecraft:jungle_leaves");
@Nullable public static final ItemType JUNGLE_LOG = get("minecraft:jungle_log");
@Nullable public static final ItemType JUNGLE_PLANKS = get("minecraft:jungle_planks");
@ -656,6 +718,7 @@ public final class ItemTypes {
@Nullable public static final ItemType MANGROVE_DOOR = get("minecraft:mangrove_door");
@Nullable public static final ItemType MANGROVE_FENCE = get("minecraft:mangrove_fence");
@Nullable public static final ItemType MANGROVE_FENCE_GATE = get("minecraft:mangrove_fence_gate");
@Nullable public static final ItemType MANGROVE_HANGING_SIGN = get("minecraft:mangrove_hanging_sign");
@Nullable public static final ItemType MANGROVE_LEAVES = get("minecraft:mangrove_leaves");
@Nullable public static final ItemType MANGROVE_LOG = get("minecraft:mangrove_log");
@Nullable public static final ItemType MANGROVE_PLANKS = get("minecraft:mangrove_planks");
@ -674,6 +737,7 @@ public final class ItemTypes {
@Nullable public static final ItemType MELON_SLICE = get("minecraft:melon_slice");
@Nullable public static final ItemType MILK_BUCKET = get("minecraft:milk_bucket");
@Nullable public static final ItemType MINECART = get("minecraft:minecart");
@Nullable public static final ItemType MINER_POTTERY_SHERD = get("minecraft:miner_pottery_sherd");
@Nullable public static final ItemType MOJANG_BANNER_PATTERN = get("minecraft:mojang_banner_pattern");
@Nullable public static final ItemType MOOSHROOM_SPAWN_EGG = get("minecraft:mooshroom_spawn_egg");
@Nullable public static final ItemType MOSS_BLOCK = get("minecraft:moss_block");
@ -686,6 +750,7 @@ public final class ItemTypes {
@Nullable public static final ItemType MOSSY_STONE_BRICK_STAIRS = get("minecraft:mossy_stone_brick_stairs");
@Nullable public static final ItemType MOSSY_STONE_BRICK_WALL = get("minecraft:mossy_stone_brick_wall");
@Nullable public static final ItemType MOSSY_STONE_BRICKS = get("minecraft:mossy_stone_bricks");
@Nullable public static final ItemType MOURNER_POTTERY_SHERD = get("minecraft:mourner_pottery_sherd");
@Nullable public static final ItemType MUD = get("minecraft:mud");
@Nullable public static final ItemType MUD_BRICK_SLAB = get("minecraft:mud_brick_slab");
@Nullable public static final ItemType MUD_BRICK_STAIRS = get("minecraft:mud_brick_stairs");
@ -706,6 +771,7 @@ public final class ItemTypes {
@Nullable public static final ItemType MUSIC_DISC_MELLOHI = get("minecraft:music_disc_mellohi");
@Nullable public static final ItemType MUSIC_DISC_OTHERSIDE = get("minecraft:music_disc_otherside");
@Nullable public static final ItemType MUSIC_DISC_PIGSTEP = get("minecraft:music_disc_pigstep");
@Nullable public static final ItemType MUSIC_DISC_RELIC = get("minecraft:music_disc_relic");
@Nullable public static final ItemType MUSIC_DISC_STAL = get("minecraft:music_disc_stal");
@Nullable public static final ItemType MUSIC_DISC_STRAD = get("minecraft:music_disc_strad");
@Nullable public static final ItemType MUSIC_DISC_WAIT = get("minecraft:music_disc_wait");
@ -738,6 +804,7 @@ public final class ItemTypes {
@Nullable public static final ItemType NETHERITE_SCRAP = get("minecraft:netherite_scrap");
@Nullable public static final ItemType NETHERITE_SHOVEL = get("minecraft:netherite_shovel");
@Nullable public static final ItemType NETHERITE_SWORD = get("minecraft:netherite_sword");
@Nullable public static final ItemType NETHERITE_UPGRADE_SMITHING_TEMPLATE = get("minecraft:netherite_upgrade_smithing_template");
@Nullable public static final ItemType NETHERRACK = get("minecraft:netherrack");
@Nullable public static final ItemType NOTE_BLOCK = get("minecraft:note_block");
@Nullable public static final ItemType OAK_BOAT = get("minecraft:oak_boat");
@ -746,6 +813,7 @@ public final class ItemTypes {
@Nullable public static final ItemType OAK_DOOR = get("minecraft:oak_door");
@Nullable public static final ItemType OAK_FENCE = get("minecraft:oak_fence");
@Nullable public static final ItemType OAK_FENCE_GATE = get("minecraft:oak_fence_gate");
@Nullable public static final ItemType OAK_HANGING_SIGN = get("minecraft:oak_hanging_sign");
@Nullable public static final ItemType OAK_LEAVES = get("minecraft:oak_leaves");
@Nullable public static final ItemType OAK_LOG = get("minecraft:oak_log");
@Nullable public static final ItemType OAK_PLANKS = get("minecraft:oak_planks");
@ -793,6 +861,7 @@ public final class ItemTypes {
@Nullable public static final ItemType PIG_SPAWN_EGG = get("minecraft:pig_spawn_egg");
@Nullable public static final ItemType PIGLIN_BANNER_PATTERN = get("minecraft:piglin_banner_pattern");
@Nullable public static final ItemType PIGLIN_BRUTE_SPAWN_EGG = get("minecraft:piglin_brute_spawn_egg");
@Nullable public static final ItemType PIGLIN_HEAD = get("minecraft:piglin_head");
@Nullable public static final ItemType PIGLIN_SPAWN_EGG = get("minecraft:piglin_spawn_egg");
@Nullable public static final ItemType PILLAGER_SPAWN_EGG = get("minecraft:pillager_spawn_egg");
@Nullable public static final ItemType PINK_BANNER = get("minecraft:pink_banner");
@ -803,6 +872,7 @@ public final class ItemTypes {
@Nullable public static final ItemType PINK_CONCRETE_POWDER = get("minecraft:pink_concrete_powder");
@Nullable public static final ItemType PINK_DYE = get("minecraft:pink_dye");
@Nullable public static final ItemType PINK_GLAZED_TERRACOTTA = get("minecraft:pink_glazed_terracotta");
@Nullable public static final ItemType PINK_PETALS = get("minecraft:pink_petals");
@Nullable public static final ItemType PINK_SHULKER_BOX = get("minecraft:pink_shulker_box");
@Nullable public static final ItemType PINK_STAINED_GLASS = get("minecraft:pink_stained_glass");
@Nullable public static final ItemType PINK_STAINED_GLASS_PANE = get("minecraft:pink_stained_glass_pane");
@ -810,7 +880,10 @@ public final class ItemTypes {
@Nullable public static final ItemType PINK_TULIP = get("minecraft:pink_tulip");
@Nullable public static final ItemType PINK_WOOL = get("minecraft:pink_wool");
@Nullable public static final ItemType PISTON = get("minecraft:piston");
@Nullable public static final ItemType PITCHER_PLANT = get("minecraft:pitcher_plant");
@Nullable public static final ItemType PITCHER_POD = get("minecraft:pitcher_pod");
@Nullable public static final ItemType PLAYER_HEAD = get("minecraft:player_head");
@Nullable public static final ItemType PLENTY_POTTERY_SHERD = get("minecraft:plenty_pottery_sherd");
@Nullable public static final ItemType PODZOL = get("minecraft:podzol");
@Nullable public static final ItemType POINTED_DRIPSTONE = get("minecraft:pointed_dripstone");
@Nullable public static final ItemType POISONOUS_POTATO = get("minecraft:poisonous_potato");
@ -855,6 +928,7 @@ public final class ItemTypes {
@Nullable public static final ItemType PRISMARINE_SLAB = get("minecraft:prismarine_slab");
@Nullable public static final ItemType PRISMARINE_STAIRS = get("minecraft:prismarine_stairs");
@Nullable public static final ItemType PRISMARINE_WALL = get("minecraft:prismarine_wall");
@Nullable public static final ItemType PRIZE_POTTERY_SHERD = get("minecraft:prize_pottery_sherd");
@Nullable public static final ItemType PUFFERFISH = get("minecraft:pufferfish");
@Nullable public static final ItemType PUFFERFISH_BUCKET = get("minecraft:pufferfish_bucket");
@Nullable public static final ItemType PUFFERFISH_SPAWN_EGG = get("minecraft:pufferfish_spawn_egg");
@ -890,6 +964,7 @@ public final class ItemTypes {
@Nullable public static final ItemType RABBIT_SPAWN_EGG = get("minecraft:rabbit_spawn_egg");
@Nullable public static final ItemType RABBIT_STEW = get("minecraft:rabbit_stew");
@Nullable public static final ItemType RAIL = get("minecraft:rail");
@Nullable public static final ItemType RAISER_ARMOR_TRIM_SMITHING_TEMPLATE = get("minecraft:raiser_armor_trim_smithing_template");
@Nullable public static final ItemType RAVAGER_SPAWN_EGG = get("minecraft:ravager_spawn_egg");
@Nullable public static final ItemType RAW_COPPER = get("minecraft:raw_copper");
@Nullable public static final ItemType RAW_COPPER_BLOCK = get("minecraft:raw_copper_block");
@ -932,6 +1007,7 @@ public final class ItemTypes {
@Nullable public static final ItemType REPEATER = get("minecraft:repeater");
@Nullable public static final ItemType REPEATING_COMMAND_BLOCK = get("minecraft:repeating_command_block");
@Nullable public static final ItemType RESPAWN_ANCHOR = get("minecraft:respawn_anchor");
@Nullable public static final ItemType RIB_ARMOR_TRIM_SMITHING_TEMPLATE = get("minecraft:rib_armor_trim_smithing_template");
@Nullable public static final ItemType ROOTED_DIRT = get("minecraft:rooted_dirt");
@Nullable public static final ItemType ROSE_BUSH = get("minecraft:rose_bush");
@Deprecated @Nullable public static final ItemType ROSE_RED = get("minecraft:rose_red");
@ -955,19 +1031,25 @@ public final class ItemTypes {
@Nullable public static final ItemType SEA_LANTERN = get("minecraft:sea_lantern");
@Nullable public static final ItemType SEA_PICKLE = get("minecraft:sea_pickle");
@Nullable public static final ItemType SEAGRASS = get("minecraft:seagrass");
@Nullable public static final ItemType SENTRY_ARMOR_TRIM_SMITHING_TEMPLATE = get("minecraft:sentry_armor_trim_smithing_template");
@Nullable public static final ItemType SHAPER_ARMOR_TRIM_SMITHING_TEMPLATE = get("minecraft:shaper_armor_trim_smithing_template");
@Nullable public static final ItemType SHEAF_POTTERY_SHERD = get("minecraft:sheaf_pottery_sherd");
@Nullable public static final ItemType SHEARS = get("minecraft:shears");
@Nullable public static final ItemType SHEEP_SPAWN_EGG = get("minecraft:sheep_spawn_egg");
@Nullable public static final ItemType SHELTER_POTTERY_SHERD = get("minecraft:shelter_pottery_sherd");
@Nullable public static final ItemType SHIELD = get("minecraft:shield");
@Nullable public static final ItemType SHROOMLIGHT = get("minecraft:shroomlight");
@Nullable public static final ItemType SHULKER_BOX = get("minecraft:shulker_box");
@Nullable public static final ItemType SHULKER_SHELL = get("minecraft:shulker_shell");
@Nullable public static final ItemType SHULKER_SPAWN_EGG = get("minecraft:shulker_spawn_egg");
@Deprecated @Nullable public static final ItemType SIGN = get("minecraft:sign");
@Nullable public static final ItemType SILENCE_ARMOR_TRIM_SMITHING_TEMPLATE = get("minecraft:silence_armor_trim_smithing_template");
@Nullable public static final ItemType SILVERFISH_SPAWN_EGG = get("minecraft:silverfish_spawn_egg");
@Nullable public static final ItemType SKELETON_HORSE_SPAWN_EGG = get("minecraft:skeleton_horse_spawn_egg");
@Nullable public static final ItemType SKELETON_SKULL = get("minecraft:skeleton_skull");
@Nullable public static final ItemType SKELETON_SPAWN_EGG = get("minecraft:skeleton_spawn_egg");
@Nullable public static final ItemType SKULL_BANNER_PATTERN = get("minecraft:skull_banner_pattern");
@Nullable public static final ItemType SKULL_POTTERY_SHERD = get("minecraft:skull_pottery_sherd");
@Nullable public static final ItemType SLIME_BALL = get("minecraft:slime_ball");
@Nullable public static final ItemType SLIME_BLOCK = get("minecraft:slime_block");
@Nullable public static final ItemType SLIME_SPAWN_EGG = get("minecraft:slime_spawn_egg");
@ -987,8 +1069,13 @@ public final class ItemTypes {
@Nullable public static final ItemType SMOOTH_SANDSTONE_STAIRS = get("minecraft:smooth_sandstone_stairs");
@Nullable public static final ItemType SMOOTH_STONE = get("minecraft:smooth_stone");
@Nullable public static final ItemType SMOOTH_STONE_SLAB = get("minecraft:smooth_stone_slab");
@Nullable public static final ItemType SNIFFER_EGG = get("minecraft:sniffer_egg");
@Nullable public static final ItemType SNIFFER_SPAWN_EGG = get("minecraft:sniffer_spawn_egg");
@Nullable public static final ItemType SNORT_POTTERY_SHERD = get("minecraft:snort_pottery_sherd");
@Nullable public static final ItemType SNOUT_ARMOR_TRIM_SMITHING_TEMPLATE = get("minecraft:snout_armor_trim_smithing_template");
@Nullable public static final ItemType SNOW = get("minecraft:snow");
@Nullable public static final ItemType SNOW_BLOCK = get("minecraft:snow_block");
@Nullable public static final ItemType SNOW_GOLEM_SPAWN_EGG = get("minecraft:snow_golem_spawn_egg");
@Nullable public static final ItemType SNOWBALL = get("minecraft:snowball");
@Nullable public static final ItemType SOUL_CAMPFIRE = get("minecraft:soul_campfire");
@Nullable public static final ItemType SOUL_LANTERN = get("minecraft:soul_lantern");
@ -999,6 +1086,7 @@ public final class ItemTypes {
@Nullable public static final ItemType SPECTRAL_ARROW = get("minecraft:spectral_arrow");
@Nullable public static final ItemType SPIDER_EYE = get("minecraft:spider_eye");
@Nullable public static final ItemType SPIDER_SPAWN_EGG = get("minecraft:spider_spawn_egg");
@Nullable public static final ItemType SPIRE_ARMOR_TRIM_SMITHING_TEMPLATE = get("minecraft:spire_armor_trim_smithing_template");
@Nullable public static final ItemType SPLASH_POTION = get("minecraft:splash_potion");
@Nullable public static final ItemType SPONGE = get("minecraft:sponge");
@Nullable public static final ItemType SPORE_BLOSSOM = get("minecraft:spore_blossom");
@ -1008,6 +1096,7 @@ public final class ItemTypes {
@Nullable public static final ItemType SPRUCE_DOOR = get("minecraft:spruce_door");
@Nullable public static final ItemType SPRUCE_FENCE = get("minecraft:spruce_fence");
@Nullable public static final ItemType SPRUCE_FENCE_GATE = get("minecraft:spruce_fence_gate");
@Nullable public static final ItemType SPRUCE_HANGING_SIGN = get("minecraft:spruce_hanging_sign");
@Nullable public static final ItemType SPRUCE_LEAVES = get("minecraft:spruce_leaves");
@Nullable public static final ItemType SPRUCE_LOG = get("minecraft:spruce_log");
@Nullable public static final ItemType SPRUCE_PLANKS = get("minecraft:spruce_planks");
@ -1042,8 +1131,11 @@ public final class ItemTypes {
@Nullable public static final ItemType STRING = get("minecraft:string");
@Nullable public static final ItemType STRIPPED_ACACIA_LOG = get("minecraft:stripped_acacia_log");
@Nullable public static final ItemType STRIPPED_ACACIA_WOOD = get("minecraft:stripped_acacia_wood");
@Nullable public static final ItemType STRIPPED_BAMBOO_BLOCK = get("minecraft:stripped_bamboo_block");
@Nullable public static final ItemType STRIPPED_BIRCH_LOG = get("minecraft:stripped_birch_log");
@Nullable public static final ItemType STRIPPED_BIRCH_WOOD = get("minecraft:stripped_birch_wood");
@Nullable public static final ItemType STRIPPED_CHERRY_LOG = get("minecraft:stripped_cherry_log");
@Nullable public static final ItemType STRIPPED_CHERRY_WOOD = get("minecraft:stripped_cherry_wood");
@Nullable public static final ItemType STRIPPED_CRIMSON_HYPHAE = get("minecraft:stripped_crimson_hyphae");
@Nullable public static final ItemType STRIPPED_CRIMSON_STEM = get("minecraft:stripped_crimson_stem");
@Nullable public static final ItemType STRIPPED_DARK_OAK_LOG = get("minecraft:stripped_dark_oak_log");
@ -1063,6 +1155,8 @@ public final class ItemTypes {
@Nullable public static final ItemType SUGAR = get("minecraft:sugar");
@Nullable public static final ItemType SUGAR_CANE = get("minecraft:sugar_cane");
@Nullable public static final ItemType SUNFLOWER = get("minecraft:sunflower");
@Nullable public static final ItemType SUSPICIOUS_GRAVEL = get("minecraft:suspicious_gravel");
@Nullable public static final ItemType SUSPICIOUS_SAND = get("minecraft:suspicious_sand");
@Nullable public static final ItemType SUSPICIOUS_STEW = get("minecraft:suspicious_stew");
@Nullable public static final ItemType SWEET_BERRIES = get("minecraft:sweet_berries");
@Nullable public static final ItemType TADPOLE_BUCKET = get("minecraft:tadpole_bucket");
@ -1070,11 +1164,14 @@ public final class ItemTypes {
@Nullable public static final ItemType TALL_GRASS = get("minecraft:tall_grass");
@Nullable public static final ItemType TARGET = get("minecraft:target");
@Nullable public static final ItemType TERRACOTTA = get("minecraft:terracotta");
@Nullable public static final ItemType TIDE_ARMOR_TRIM_SMITHING_TEMPLATE = get("minecraft:tide_armor_trim_smithing_template");
@Nullable public static final ItemType TINTED_GLASS = get("minecraft:tinted_glass");
@Nullable public static final ItemType TIPPED_ARROW = get("minecraft:tipped_arrow");
@Nullable public static final ItemType TNT = get("minecraft:tnt");
@Nullable public static final ItemType TNT_MINECART = get("minecraft:tnt_minecart");
@Nullable public static final ItemType TORCH = get("minecraft:torch");
@Nullable public static final ItemType TORCHFLOWER = get("minecraft:torchflower");
@Nullable public static final ItemType TORCHFLOWER_SEEDS = get("minecraft:torchflower_seeds");
@Nullable public static final ItemType TOTEM_OF_UNDYING = get("minecraft:totem_of_undying");
@Nullable public static final ItemType TRADER_LLAMA_SPAWN_EGG = get("minecraft:trader_llama_spawn_egg");
@Nullable public static final ItemType TRAPPED_CHEST = get("minecraft:trapped_chest");
@ -1092,11 +1189,13 @@ public final class ItemTypes {
@Nullable public static final ItemType TURTLE_SPAWN_EGG = get("minecraft:turtle_spawn_egg");
@Nullable public static final ItemType TWISTING_VINES = get("minecraft:twisting_vines");
@Nullable public static final ItemType VERDANT_FROGLIGHT = get("minecraft:verdant_froglight");
@Nullable public static final ItemType VEX_ARMOR_TRIM_SMITHING_TEMPLATE = get("minecraft:vex_armor_trim_smithing_template");
@Nullable public static final ItemType VEX_SPAWN_EGG = get("minecraft:vex_spawn_egg");
@Nullable public static final ItemType VILLAGER_SPAWN_EGG = get("minecraft:villager_spawn_egg");
@Nullable public static final ItemType VINDICATOR_SPAWN_EGG = get("minecraft:vindicator_spawn_egg");
@Nullable public static final ItemType VINE = get("minecraft:vine");
@Nullable public static final ItemType WANDERING_TRADER_SPAWN_EGG = get("minecraft:wandering_trader_spawn_egg");
@Nullable public static final ItemType WARD_ARMOR_TRIM_SMITHING_TEMPLATE = get("minecraft:ward_armor_trim_smithing_template");
@Nullable public static final ItemType WARDEN_SPAWN_EGG = get("minecraft:warden_spawn_egg");
@Nullable public static final ItemType WARPED_BUTTON = get("minecraft:warped_button");
@Nullable public static final ItemType WARPED_DOOR = get("minecraft:warped_door");
@ -1104,6 +1203,7 @@ public final class ItemTypes {
@Nullable public static final ItemType WARPED_FENCE_GATE = get("minecraft:warped_fence_gate");
@Nullable public static final ItemType WARPED_FUNGUS = get("minecraft:warped_fungus");
@Nullable public static final ItemType WARPED_FUNGUS_ON_A_STICK = get("minecraft:warped_fungus_on_a_stick");
@Nullable public static final ItemType WARPED_HANGING_SIGN = get("minecraft:warped_hanging_sign");
@Nullable public static final ItemType WARPED_HYPHAE = get("minecraft:warped_hyphae");
@Nullable public static final ItemType WARPED_NYLIUM = get("minecraft:warped_nylium");
@Nullable public static final ItemType WARPED_PLANKS = get("minecraft:warped_planks");
@ -1132,6 +1232,7 @@ public final class ItemTypes {
@Nullable public static final ItemType WAXED_WEATHERED_CUT_COPPER = get("minecraft:waxed_weathered_cut_copper");
@Nullable public static final ItemType WAXED_WEATHERED_CUT_COPPER_SLAB = get("minecraft:waxed_weathered_cut_copper_slab");
@Nullable public static final ItemType WAXED_WEATHERED_CUT_COPPER_STAIRS = get("minecraft:waxed_weathered_cut_copper_stairs");
@Nullable public static final ItemType WAYFINDER_ARMOR_TRIM_SMITHING_TEMPLATE = get("minecraft:wayfinder_armor_trim_smithing_template");
@Nullable public static final ItemType WEATHERED_COPPER = get("minecraft:weathered_copper");
@Nullable public static final ItemType WEATHERED_CUT_COPPER = get("minecraft:weathered_cut_copper");
@Nullable public static final ItemType WEATHERED_CUT_COPPER_SLAB = get("minecraft:weathered_cut_copper_slab");
@ -1154,10 +1255,12 @@ public final class ItemTypes {
@Nullable public static final ItemType WHITE_TERRACOTTA = get("minecraft:white_terracotta");
@Nullable public static final ItemType WHITE_TULIP = get("minecraft:white_tulip");
@Nullable public static final ItemType WHITE_WOOL = get("minecraft:white_wool");
@Nullable public static final ItemType WILD_ARMOR_TRIM_SMITHING_TEMPLATE = get("minecraft:wild_armor_trim_smithing_template");
@Nullable public static final ItemType WITCH_SPAWN_EGG = get("minecraft:witch_spawn_egg");
@Nullable public static final ItemType WITHER_ROSE = get("minecraft:wither_rose");
@Nullable public static final ItemType WITHER_SKELETON_SKULL = get("minecraft:wither_skeleton_skull");
@Nullable public static final ItemType WITHER_SKELETON_SPAWN_EGG = get("minecraft:wither_skeleton_spawn_egg");
@Nullable public static final ItemType WITHER_SPAWN_EGG = get("minecraft:wither_spawn_egg");
@Nullable public static final ItemType WOLF_SPAWN_EGG = get("minecraft:wolf_spawn_egg");
@Nullable public static final ItemType WOODEN_AXE = get("minecraft:wooden_axe");
@Nullable public static final ItemType WOODEN_HOE = get("minecraft:wooden_hoe");

View File

@ -49,6 +49,7 @@ public class BundledRegistries implements Registries {
versionMap.put(Range.atLeast(Constants.DATA_VERSION_MC_1_17), "117");
// 1.18 did have one item change, but we didn't get it. It's fine.
versionMap.put(Range.atLeast(Constants.DATA_VERSION_MC_1_19), "119");
versionMap.put(Range.atLeast(Constants.DATA_VERSION_MC_1_20), "120");
VERSION_MAP = ImmutableRangeMap.copyOf(versionMap);
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -427,4 +427,13 @@ class ExpressionTest extends BaseExpressionTest {
assertTrue(e.getMessage().contains("Calculations exceeded time limit"));
}
@Test
public void testRound() {
checkTestCase("round(1.3)", 1);
checkTestCase("round(0.9)", 1);
checkTestCase("round(-1.1)", -1);
checkTestCase("round(-0.9)", -1);
checkTestCase("round(1.5)", 2);
checkTestCase("round(-1.5)", -1);
}
}

View File

@ -20,12 +20,11 @@
package com.sk89q.worldedit.util.collection;
import com.google.common.collect.ImmutableMap;
import com.sk89q.jnbt.CompoundTag;
import com.sk89q.jnbt.StringTag;
import com.sk89q.worldedit.BaseWorldEditTest;
import com.sk89q.worldedit.WorldEdit;
import com.sk89q.worldedit.extension.platform.Platform;
import com.sk89q.worldedit.math.BlockVector3;
import com.sk89q.worldedit.registry.Registry;
import com.sk89q.worldedit.util.test.ResourceLockKeys;
import com.sk89q.worldedit.util.test.VariedVectorGenerator;
import com.sk89q.worldedit.world.block.BaseBlock;
import com.sk89q.worldedit.world.block.BlockType;
@ -39,7 +38,6 @@ import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.parallel.Execution;
import org.junit.jupiter.api.parallel.ExecutionMode;
import org.junit.jupiter.api.parallel.ResourceLock;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
@ -60,7 +58,6 @@ import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assumptions.assumeFalse;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions;
@ -71,6 +68,7 @@ class BlockMapTest extends BaseWorldEditTest {
static void setupFakePlatform() {
registerBlock("minecraft:air");
registerBlock("minecraft:oak_wood");
registerBlock("minecraft:chest");
}
@AfterAll
@ -93,6 +91,7 @@ class BlockMapTest extends BaseWorldEditTest {
private final BaseBlock air = checkNotNull(BlockTypes.AIR).getDefaultState().toBaseBlock();
private final BaseBlock oakWood = checkNotNull(BlockTypes.OAK_WOOD).getDefaultState().toBaseBlock();
private final BaseBlock chestWithNbt = checkNotNull(BlockTypes.CHEST).getDefaultState().toBaseBlock(new CompoundTag(ImmutableMap.of("dummy", new StringTag("value"))));
private AutoCloseable mocks;
@ -718,6 +717,22 @@ class BlockMapTest extends BaseWorldEditTest {
});
}
@SuppressWarnings("OverwrittenKey")
@Test
@DisplayName("put with valid and invalid keys doesn't duplicate")
void putWithInvalidAndValid() {
generator.makeVectorsStream().forEach(vec -> {
BlockMap<BaseBlock> map = BlockMap.createForBaseBlock();
// This tests https://github.com/EngineHub/WorldEdit/issues/2250
// Due to two internal maps, a bug existed where both could have the same value
map.put(vec, chestWithNbt);
map.put(vec, air);
assertEquals(1, map.size());
assertEquals(air, map.get(vec));
});
}
}
@Test

View File

@ -21,8 +21,8 @@ applyShadowConfiguration()
apply(plugin = "fabric-loom")
apply(plugin = "java-library")
val minecraftVersion = "1.19.4"
val loaderVersion = "0.14.17"
val minecraftVersion = "1.20"
val loaderVersion = "0.14.21"
val fabricApiConfiguration: Configuration = configurations.create("fabricApi")
@ -35,6 +35,11 @@ repositories {
name = "Fabric"
url = uri("https://maven.fabricmc.net/")
}
getByName("Mojang") {
content {
includeGroupByRegex("com\\.mojang\\..*")
}
}
}
dependencies {
@ -48,7 +53,7 @@ dependencies {
"modImplementation"("net.fabricmc:fabric-loader:$loaderVersion")
// [1] declare fabric-api dependency...
"fabricApi"("net.fabricmc.fabric-api:fabric-api:0.75.2+1.19.4")
"fabricApi"("net.fabricmc.fabric-api:fabric-api:0.83.0+1.20")
// [2] Load the API dependencies from the fabric mod json...
@Suppress("UNCHECKED_CAST")

View File

@ -22,7 +22,6 @@ package com.sk89q.worldedit.fabric;
import com.sk89q.worldedit.world.registry.BlockMaterial;
import com.sk89q.worldedit.world.registry.PassthroughBlockMaterial;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.material.Material;
import net.minecraft.world.level.material.PushReaction;
import javax.annotation.Nullable;
@ -34,53 +33,51 @@ import javax.annotation.Nullable;
*/
public class FabricBlockMaterial extends PassthroughBlockMaterial {
private final Material delegate;
private final BlockState block;
public FabricBlockMaterial(Material delegate, BlockState block, @Nullable BlockMaterial secondary) {
public FabricBlockMaterial(BlockState block, @Nullable BlockMaterial secondary) {
super(secondary);
this.delegate = delegate;
this.block = block;
}
@Override
public boolean isAir() {
return delegate == Material.AIR || super.isAir();
return block.isAir() || super.isAir();
}
@Override
public boolean isOpaque() {
return delegate.isSolidBlocking();
return block.canOcclude();
}
@Override
public boolean isLiquid() {
return delegate.isLiquid();
return block.liquid();
}
@Override
public boolean isSolid() {
return delegate.isSolid();
return block.isSolid();
}
@Override
public boolean isFragileWhenPushed() {
return delegate.getPushReaction() == PushReaction.DESTROY;
return block.getPistonPushReaction() == PushReaction.DESTROY;
}
@Override
public boolean isUnpushable() {
return delegate.getPushReaction() == PushReaction.BLOCK;
return block.getPistonPushReaction() == PushReaction.BLOCK;
}
@Override
public boolean isMovementBlocker() {
return delegate.blocksMotion();
return block.blocksMotion();
}
@Override
public boolean isBurnable() {
return delegate.isFlammable();
return block.ignitedByLava();
}
@Override
@ -90,7 +87,7 @@ public class FabricBlockMaterial extends PassthroughBlockMaterial {
@Override
public boolean isReplacedDuringPlacement() {
return delegate.isReplaceable();
return block.canBeReplaced();
}
}

View File

@ -49,7 +49,7 @@ public class FabricBlockRegistry extends BundledBlockRegistry {
Block block = FabricAdapter.adapt(blockType);
return materialMap.computeIfAbsent(
block.defaultBlockState(),
m -> new FabricBlockMaterial(m.getMaterial(), m, super.getMaterial(blockType))
m -> new FabricBlockMaterial(m, super.getMaterial(blockType))
);
}

View File

@ -95,7 +95,7 @@ public class FabricPlayer extends AbstractPlayerActor {
public Location getLocation() {
Vector3 position = Vector3.at(this.player.getX(), this.player.getY(), this.player.getZ());
return new Location(
FabricWorldEdit.inst.getWorld(this.player.level),
FabricWorldEdit.inst.getWorld(this.player.serverLevel()),
position,
this.player.getYRot(),
this.player.getXRot());
@ -112,12 +112,12 @@ public class FabricPlayer extends AbstractPlayerActor {
// This check doesn't really ever get to be false in Fabric
// Since Fabric API doesn't allow cancelling the teleport.
// However, other mods could theoretically mix this in, so allow the detection.
return this.player.getLevel() == level;
return this.player.serverLevel() == level;
}
@Override
public World getWorld() {
return FabricWorldEdit.inst.getWorld(this.player.level);
return FabricWorldEdit.inst.getWorld(this.player.serverLevel());
}
@Override

View File

@ -362,7 +362,8 @@ public class FabricWorld extends AbstractWorld {
// No spawners are needed for this world.
ImmutableList.of(),
// This controls ticking, we don't need it so set it to false.
false
false,
originalWorld.getRandomSequences()
)) {
regenForWorld(region, extent, serverWorld, options);
@ -524,7 +525,7 @@ public class FabricWorld extends AbstractWorld {
public void fixLighting(Iterable<BlockVector2> chunks) {
Level world = getWorld();
for (BlockVector2 chunk : chunks) {
world.getChunkSource().getLightEngine().enableLightSources(
world.getChunkSource().getLightEngine().setLightEnabled(
new ChunkPos(chunk.getBlockX(), chunk.getBlockZ()), true
);
}

View File

@ -70,7 +70,7 @@ public class FabricEntity implements Entity {
float yaw = entity.getYRot();
float pitch = entity.getXRot();
return new Location(FabricAdapter.adapt(entity.level), position, yaw, pitch);
return new Location(FabricAdapter.adapt(entity.level()), position, yaw, pitch);
} else {
return new Location(NullWorld.getInstance());
}
@ -86,7 +86,7 @@ public class FabricEntity implements Entity {
public Extent getExtent() {
net.minecraft.world.entity.Entity entity = entityRef.get();
if (entity != null) {
return FabricAdapter.adapt(entity.level);
return FabricAdapter.adapt(entity.level());
} else {
return NullWorld.getInstance();
}

View File

@ -26,7 +26,7 @@ import com.sk89q.worldedit.util.SideEffect;
import com.sk89q.worldedit.util.SideEffectSet;
import net.minecraft.core.BlockPos;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.server.level.ChunkHolder;
import net.minecraft.server.level.FullChunkStatus;
import net.minecraft.server.level.ServerChunkCache;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.Block;
@ -124,7 +124,7 @@ public class FabricWorldNativeAccess implements WorldNativeAccess<LevelChunk, Bl
@Override
public boolean isChunkTicking(LevelChunk chunk) {
return chunk.getFullStatus().isOrAfter(ChunkHolder.FullChunkStatus.TICKING);
return chunk.getFullStatus().isOrAfter(FullChunkStatus.BLOCK_TICKING);
}
@Override

View File

@ -1,2 +1,2 @@
accessWidener v1 named
accessWidener v2 named
accessible class net/minecraft/server/level/ServerChunkCache$MainThreadExecutor

View File

@ -12,11 +12,11 @@ plugins {
applyPlatformAndCoreConfiguration(javaRelease = 17)
applyShadowConfiguration()
val minecraftVersion = "1.19.4"
val minecraftVersion = "1.20"
val nextMajorMinecraftVersion: String = minecraftVersion.split('.').let { (useless, major) ->
"$useless.${major.toInt() + 1}"
}
val forgeVersion = "45.0.1"
val forgeVersion = "46.0.1"
val apiClasspath = configurations.create("apiClasspath") {
isCanBeResolved = true
@ -74,7 +74,7 @@ configure<org.spongepowered.asm.gradle.plugins.MixinExtension> {
}
configure<BasePluginExtension> {
archivesName.set("${project.name}-mc$minecraftVersion")
archivesName.set("${archivesName.get()}-mc$minecraftVersion")
}
val javaComponent = components["java"] as AdhocComponentWithVariants

View File

@ -22,7 +22,6 @@ package com.sk89q.worldedit.forge;
import com.sk89q.worldedit.world.registry.BlockMaterial;
import com.sk89q.worldedit.world.registry.PassthroughBlockMaterial;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.material.Material;
import net.minecraft.world.level.material.PushReaction;
import javax.annotation.Nullable;
@ -34,53 +33,54 @@ import javax.annotation.Nullable;
*/
public class ForgeBlockMaterial extends PassthroughBlockMaterial {
private final Material delegate;
private final BlockState block;
public ForgeBlockMaterial(Material delegate, BlockState block, @Nullable BlockMaterial secondary) {
public ForgeBlockMaterial(BlockState block, @Nullable BlockMaterial secondary) {
super(secondary);
this.delegate = delegate;
this.block = block;
}
@Override
public boolean isAir() {
return delegate == Material.AIR || super.isAir();
return block.isAir() || super.isAir();
}
@Override
public boolean isOpaque() {
return delegate.isSolidBlocking();
return block.canOcclude();
}
@SuppressWarnings("deprecation")
@Override
public boolean isLiquid() {
return delegate.isLiquid();
return block.liquid();
}
@SuppressWarnings("deprecation")
@Override
public boolean isSolid() {
return delegate.isSolid();
return block.isSolid();
}
@Override
public boolean isFragileWhenPushed() {
return delegate.getPushReaction() == PushReaction.DESTROY;
return block.getPistonPushReaction() == PushReaction.DESTROY;
}
@Override
public boolean isUnpushable() {
return delegate.getPushReaction() == PushReaction.BLOCK;
return block.getPistonPushReaction() == PushReaction.BLOCK;
}
@SuppressWarnings("deprecation")
@Override
public boolean isMovementBlocker() {
return delegate.blocksMotion();
return block.blocksMotion();
}
@Override
public boolean isBurnable() {
return delegate.isFlammable();
return block.ignitedByLava();
}
@Override
@ -90,7 +90,7 @@ public class ForgeBlockMaterial extends PassthroughBlockMaterial {
@Override
public boolean isReplacedDuringPlacement() {
return delegate.isReplaceable();
return block.canBeReplaced();
}
}

View File

@ -52,7 +52,7 @@ public class ForgeBlockRegistry extends BundledBlockRegistry {
}
return materialMap.computeIfAbsent(
block.defaultBlockState(),
s -> new ForgeBlockMaterial(s.getMaterial(), s, super.getMaterial(blockType))
s -> new ForgeBlockMaterial(s, super.getMaterial(blockType))
);
}

View File

@ -98,7 +98,7 @@ public class ForgePlayer extends AbstractPlayerActor {
public Location getLocation() {
Vector3 position = Vector3.at(this.player.getX(), this.player.getY(), this.player.getZ());
return new Location(
ForgeWorldEdit.inst.getWorld((ServerLevel) this.player.level),
ForgeWorldEdit.inst.getWorld(this.player.serverLevel()),
position,
this.player.getYRot(),
this.player.getXRot());
@ -113,12 +113,12 @@ public class ForgePlayer extends AbstractPlayerActor {
location.getYaw(), location.getPitch()
);
// This may be false if the teleport was cancelled by a mod
return this.player.getLevel() == level;
return this.player.serverLevel() == level;
}
@Override
public World getWorld() {
return ForgeWorldEdit.inst.getWorld((ServerLevel) this.player.level);
return ForgeWorldEdit.inst.getWorld(this.player.serverLevel());
}
@Override

View File

@ -350,7 +350,8 @@ public class ForgeWorld extends AbstractWorld {
// No spawners are needed for this world.
ImmutableList.of(),
// This controls ticking, we don't need it so set it to false.
false
false,
originalWorld.getRandomSequences()
)) {
regenForWorld(region, extent, serverWorld, options);
@ -508,7 +509,11 @@ public class ForgeWorld extends AbstractWorld {
public void fixLighting(Iterable<BlockVector2> chunks) {
ServerLevel world = getWorld();
for (BlockVector2 chunk : chunks) {
world.getChunkSource().getLightEngine().retainData(new ChunkPos(chunk.getBlockX(), chunk.getBlockZ()), true);
// Fetch the chunk after light initialization at least
// We'll be doing a full relight anyways, so we don't need to be LIGHT yet
world.getChunkSource().getLightEngine().lightChunk(world.getChunk(
chunk.getBlockX(), chunk.getBlockZ(), ChunkStatus.INITIALIZE_LIGHT
), false);
}
}

View File

@ -291,13 +291,13 @@ public class ForgeWorldEdit {
&& lcb.getUseItem() == Event.Result.DENY;
boolean isRightDeny = event instanceof PlayerInteractEvent.RightClickBlock rcb
&& rcb.getUseItem() == Event.Result.DENY;
if (isLeftDeny || isRightDeny || event.getEntity().level.isClientSide || event.getHand() == InteractionHand.OFF_HAND) {
if (isLeftDeny || isRightDeny || event.getEntity().level().isClientSide || event.getHand() == InteractionHand.OFF_HAND) {
return;
}
WorldEdit we = WorldEdit.getInstance();
ForgePlayer player = adaptPlayer((ServerPlayer) event.getEntity());
ForgeWorld world = getWorld((ServerLevel) event.getEntity().level);
ForgeWorld world = getWorld((ServerLevel) event.getEntity().level());
Direction direction = ForgeAdapter.adaptEnumFacing(event.getFace());
if (event instanceof PlayerInteractEvent.LeftClickEmpty) {
@ -335,7 +335,7 @@ public class ForgeWorldEdit {
if (!(parseResults.getContext().getSource().getEntity() instanceof ServerPlayer player)) {
return;
}
if (player.level.isClientSide) {
if (player.level().isClientSide) {
return;
}
if (parseResults.getContext().getCommand() != CommandWrapper.FAKE_COMMAND) {

View File

@ -73,7 +73,7 @@ public class ForgeEntity implements Entity {
float yaw = entity.getYRot();
float pitch = entity.getXRot();
return new Location(ForgeAdapter.adapt((ServerLevel) entity.level), position, yaw, pitch);
return new Location(ForgeAdapter.adapt((ServerLevel) entity.level()), position, yaw, pitch);
} else {
return new Location(NullWorld.getInstance());
}
@ -89,7 +89,7 @@ public class ForgeEntity implements Entity {
public Extent getExtent() {
net.minecraft.world.entity.Entity entity = entityRef.get();
if (entity != null) {
return ForgeAdapter.adapt((ServerLevel) entity.level);
return ForgeAdapter.adapt((ServerLevel) entity.level());
} else {
return NullWorld.getInstance();
}

View File

@ -25,7 +25,7 @@ import com.sk89q.worldedit.internal.wna.WorldNativeAccess;
import com.sk89q.worldedit.util.SideEffect;
import com.sk89q.worldedit.util.SideEffectSet;
import net.minecraft.core.BlockPos;
import net.minecraft.server.level.ChunkHolder;
import net.minecraft.server.level.FullChunkStatus;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.state.BlockState;
@ -115,7 +115,7 @@ public class ForgeWorldNativeAccess implements WorldNativeAccess<LevelChunk, Blo
@Override
public boolean isChunkTicking(LevelChunk chunk) {
return chunk.getFullStatus().isOrAfter(ChunkHolder.FullChunkStatus.TICKING);
return chunk.getFullStatus().isOrAfter(FullChunkStatus.BLOCK_TICKING);
}
@Override
@ -162,5 +162,6 @@ public class ForgeWorldNativeAccess implements WorldNativeAccess<LevelChunk, Blo
@Override
public void onBlockStateChange(BlockPos pos, BlockState oldState, BlockState newState) {
getWorld().onBlockStateChange(pos, oldState, newState);
newState.onBlockStateChange(getWorld(), pos, oldState);
}
}

View File

@ -7,7 +7,7 @@ plugins {
id("org.spongepowered.gradle.vanilla")
}
applyPlatformAndCoreConfiguration()
applyPlatformAndCoreConfiguration(javaRelease = 17)
applyShadowConfiguration()
repositories {
@ -15,10 +15,10 @@ repositories {
}
minecraft {
version("1.16.5")
version("1.20")
}
val spongeApiVersion = "8.1.0";
val spongeApiVersion = "11.0.0-SNAPSHOT";
sponge {
apiVersion(spongeApiVersion)
@ -50,11 +50,7 @@ sponge {
dependencies {
api(project(":worldedit-core"))
api(project(":worldedit-libs:sponge"))
// TODO remove after VG merges and releases my patch
// https://github.com/SpongePowered/VanillaGradle/pull/66
minecraft(minecraft.platform().get().moduleName() + ":" + minecraft.version().get()) {
exclude("it.unimi.dsi", "fastutil")
}
implementation(platform("org.apache.logging.log4j:log4j-bom:${Versions.LOG4J}") {
because("Sponge 8 (will?) provides Log4J")
})
@ -74,11 +70,9 @@ tasks.named<ShadowJar>("shadowJar") {
dependencies {
include(dependency("org.bstats:"))
include(dependency("org.antlr:antlr4-runtime"))
include(dependency("it.unimi.dsi:fastutil"))
relocate("org.antlr.v4", "com.sk89q.worldedit.antlr4")
relocate("org.bstats", "com.sk89q.worldedit.sponge.bstats")
relocate("it.unimi.dsi.fastutil", "com.sk89q.worldedit.sponge.fastutil")
}
}
tasks.named("assemble").configure {

View File

@ -23,21 +23,22 @@ import com.sk89q.worldedit.world.block.BlockType;
import com.sk89q.worldedit.world.registry.BlockCategoryRegistry;
import org.spongepowered.api.ResourceKey;
import org.spongepowered.api.Sponge;
import org.spongepowered.api.registry.Registry;
import org.spongepowered.api.registry.RegistryTypes;
import org.spongepowered.api.tag.Tag;
import java.util.Collections;
import java.util.Set;
import java.util.stream.Collectors;
public class SpongeBlockCategoryRegistry implements BlockCategoryRegistry {
@Override
public Set<BlockType> getCategorisedByName(String category) {
return Sponge.game().registry(RegistryTypes.BLOCK_TYPE_TAGS)
.findValue(ResourceKey.resolve(category))
.map(org.spongepowered.api.tag.Tag::values)
.orElse(Collections.emptyList())
Registry<org.spongepowered.api.block.BlockType> blockTypeRegistry =
Sponge.game().registry(RegistryTypes.BLOCK_TYPE);
return blockTypeRegistry.taggedValues(Tag.of(RegistryTypes.BLOCK_TYPE, ResourceKey.resolve(category)))
.stream()
.map(b -> BlockType.REGISTRY.get(Sponge.game().registry(RegistryTypes.BLOCK_TYPE).valueKey(b).formatted()))
.map(blockType -> BlockType.REGISTRY.get(blockTypeRegistry.valueKey(blockType).formatted()))
.collect(Collectors.toSet());
}
}

View File

@ -22,7 +22,6 @@ package com.sk89q.worldedit.sponge;
import com.sk89q.worldedit.world.registry.BlockMaterial;
import com.sk89q.worldedit.world.registry.PassthroughBlockMaterial;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.material.Material;
import net.minecraft.world.level.material.PushReaction;
import javax.annotation.Nullable;
@ -34,53 +33,51 @@ import javax.annotation.Nullable;
*/
public class SpongeBlockMaterial extends PassthroughBlockMaterial {
private final Material delegate;
private final BlockState block;
public SpongeBlockMaterial(Material delegate, BlockState block, @Nullable BlockMaterial secondary) {
public SpongeBlockMaterial(BlockState block, @Nullable BlockMaterial secondary) {
super(secondary);
this.delegate = delegate;
this.block = block;
}
@Override
public boolean isAir() {
return delegate == Material.AIR || super.isAir();
return block.isAir() || super.isAir();
}
@Override
public boolean isOpaque() {
return delegate.isSolidBlocking();
return block.canOcclude();
}
@Override
public boolean isLiquid() {
return delegate.isLiquid();
return block.liquid();
}
@Override
public boolean isSolid() {
return delegate.isSolid();
return block.isSolid();
}
@Override
public boolean isFragileWhenPushed() {
return delegate.getPushReaction() == PushReaction.DESTROY;
return block.getPistonPushReaction() == PushReaction.DESTROY;
}
@Override
public boolean isUnpushable() {
return delegate.getPushReaction() == PushReaction.BLOCK;
return block.getPistonPushReaction() == PushReaction.BLOCK;
}
@Override
public boolean isMovementBlocker() {
return delegate.blocksMotion();
return block.blocksMotion();
}
@Override
public boolean isBurnable() {
return delegate.isFlammable();
return block.ignitedByLava();
}
@Override
@ -90,7 +87,7 @@ public class SpongeBlockMaterial extends PassthroughBlockMaterial {
@Override
public boolean isReplacedDuringPlacement() {
return delegate.isReplaceable();
return block.canBeReplaced();
}
}

View File

@ -60,7 +60,6 @@ public class SpongeBlockRegistry extends BundledBlockRegistry {
net.minecraft.world.level.block.state.BlockState blockState =
(net.minecraft.world.level.block.state.BlockState) m;
return new SpongeBlockMaterial(
blockState.getMaterial(),
blockState,
super.getMaterial(blockType)
);

View File

@ -23,7 +23,10 @@ import com.sk89q.worldedit.world.item.ItemType;
import com.sk89q.worldedit.world.registry.ItemCategoryRegistry;
import org.spongepowered.api.ResourceKey;
import org.spongepowered.api.Sponge;
import org.spongepowered.api.block.BlockType;
import org.spongepowered.api.registry.Registry;
import org.spongepowered.api.registry.RegistryTypes;
import org.spongepowered.api.tag.Tag;
import java.util.Collections;
import java.util.Set;
@ -32,12 +35,12 @@ import java.util.stream.Collectors;
public class SpongeItemCategoryRegistry implements ItemCategoryRegistry {
@Override
public Set<ItemType> getCategorisedByName(String category) {
return Sponge.game().registry(RegistryTypes.ITEM_TYPE_TAGS)
.findValue(ResourceKey.resolve(category))
.map(org.spongepowered.api.tag.Tag::values)
.orElse(Collections.emptyList())
Registry<org.spongepowered.api.item.ItemType> itemTypeRegistry =
Sponge.game().registry(RegistryTypes.ITEM_TYPE);
return itemTypeRegistry.taggedValues(Tag.of(RegistryTypes.ITEM_TYPE, ResourceKey.resolve(category)))
.stream()
.map(b -> ItemType.REGISTRY.get(Sponge.game().registry(RegistryTypes.ITEM_TYPE).valueKey(b).formatted()))
.map(itemType -> ItemType.REGISTRY.get(itemTypeRegistry.valueKey(itemType).formatted()))
.collect(Collectors.toSet());
}
}

View File

@ -19,7 +19,6 @@
package com.sk89q.worldedit.sponge;
import com.sk89q.jnbt.CompoundTag;
import com.sk89q.util.StringUtil;
import com.sk89q.worldedit.blocks.BaseItemStack;
import com.sk89q.worldedit.entity.BaseEntity;
@ -40,9 +39,13 @@ import com.sk89q.worldedit.world.gamemode.GameModes;
import net.kyori.adventure.text.format.NamedTextColor;
import net.kyori.adventure.text.format.TextColor;
import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer;
import net.minecraft.core.BlockPos;
import net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket;
import net.minecraft.world.level.block.entity.StructureBlockEntity;
import org.enginehub.linbus.tree.LinCompoundTag;
import org.spongepowered.api.ResourceKey;
import org.spongepowered.api.Sponge;
import org.spongepowered.api.block.BlockState;
import org.spongepowered.api.data.Keys;
import org.spongepowered.api.data.type.HandTypes;
import org.spongepowered.api.entity.living.player.Player;
@ -231,18 +234,23 @@ public class SpongePlayer extends AbstractPlayerActor {
if (block == null) {
player.resetBlockChange(pos.getX(), pos.getY(), pos.getZ());
} else {
player.sendBlockChange(pos.getX(), pos.getY(), pos.getZ(), SpongeAdapter.adapt(block.toImmutableState()));
BlockState spongeBlock = SpongeAdapter.adapt(block.toImmutableState());
player.sendBlockChange(pos.getX(), pos.getY(), pos.getZ(), spongeBlock);
if (block instanceof final BaseBlock baseBlock
&& block.getBlockType().equals(com.sk89q.worldedit.world.block.BlockTypes.STRUCTURE_BLOCK)) {
final LinCompoundTag nbtData = baseBlock.getNbt();
if (nbtData != null) {
net.minecraft.server.level.ServerPlayer mcPlayer =
net.minecraft.world.level.block.state.BlockState nativeBlock =
(net.minecraft.world.level.block.state.BlockState) spongeBlock;
net.minecraft.nbt.CompoundTag nativeNbtData = NbtAdapter.adaptNMSToWorldEdit(nbtData);
net.minecraft.server.level.ServerPlayer nativePlayer =
((net.minecraft.server.level.ServerPlayer) player);
mcPlayer.connection.send(new net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket(
new net.minecraft.core.BlockPos(pos.getBlockX(), pos.getBlockY(), pos.getBlockZ()),
STRUCTURE_BLOCK_PACKET_ID,
NbtAdapter.adaptNMSToWorldEdit(nbtData))
);
StructureBlockEntity structureBlockEntity =
new StructureBlockEntity(new BlockPos(pos.getX(), pos.getY(), pos.getZ()), nativeBlock);
structureBlockEntity.load(nativeNbtData);
nativePlayer.connection.send(
ClientboundBlockEntityDataPacket.create(structureBlockEntity, it -> nativeNbtData));
}
}
}

View File

@ -48,8 +48,11 @@ import com.sk89q.worldedit.world.item.ItemTypes;
import com.sk89q.worldedit.world.weather.WeatherType;
import com.sk89q.worldedit.world.weather.WeatherTypes;
import net.minecraft.core.BlockPos;
import net.minecraft.data.worldgen.Features;
import net.minecraft.core.registries.Registries;
import net.minecraft.data.worldgen.features.EndFeatures;
import net.minecraft.data.worldgen.features.TreeFeatures;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.util.RandomSource;
import net.minecraft.world.level.LevelReader;
import net.minecraft.world.level.levelgen.feature.ConfiguredFeature;
import org.apache.logging.log4j.Logger;
@ -62,6 +65,7 @@ import org.spongepowered.api.Sponge;
import org.spongepowered.api.block.entity.BlockEntity;
import org.spongepowered.api.block.entity.BlockEntityArchetype;
import org.spongepowered.api.block.entity.BlockEntityType;
import org.spongepowered.api.data.Keys;
import org.spongepowered.api.entity.EntityArchetype;
import org.spongepowered.api.entity.EntityType;
import org.spongepowered.api.entity.EntityTypes;
@ -71,7 +75,6 @@ import org.spongepowered.api.util.Ticks;
import org.spongepowered.api.world.BlockChangeFlags;
import org.spongepowered.api.world.LightTypes;
import org.spongepowered.api.world.SerializationBehavior;
import org.spongepowered.api.world.generation.config.WorldGenerationConfig;
import org.spongepowered.api.world.server.ServerLocation;
import org.spongepowered.api.world.server.ServerWorld;
import org.spongepowered.api.world.server.WorldTemplate;
@ -83,7 +86,6 @@ import java.lang.ref.WeakReference;
import java.nio.file.Path;
import java.util.List;
import java.util.Optional;
import java.util.Random;
import java.util.Set;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ThreadLocalRandom;
@ -97,7 +99,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
*/
public final class SpongeWorld extends AbstractWorld {
private static final Random random = new Random();
private static final RandomSource random = RandomSource.create();
private static final Logger LOGGER = LogManagerCompat.getLogger();
private final WeakReference<ServerWorld> worldRef;
@ -250,19 +252,11 @@ public final class SpongeWorld extends AbstractWorld {
final String id = "worldedittemp_" + getWorld().key().value();
WorldGenerationConfig baseConfig = getWorld().asTemplate().generationConfig();
WorldTemplate tempWorldProperties = getWorld().asTemplate().asBuilder()
WorldTemplate tempWorldProperties = WorldTemplate.builder().from(getWorld())
.key(ResourceKey.of("worldedit", id))
.loadOnStartup(false)
.serializationBehavior(SerializationBehavior.NONE)
.generationConfig(options.getSeed().isPresent()
? WorldGenerationConfig.Mutable.builder()
.generateBonusChest(baseConfig.generateBonusChest())
.generateFeatures(baseConfig.generateFeatures())
.seed(options.getSeed().getAsLong())
.build()
: baseConfig)
.add(Keys.IS_LOAD_ON_STARTUP, false)
.add(Keys.SERIALIZATION_BEHAVIOR, SerializationBehavior.NONE)
.add(Keys.SEED, options.getSeed().orElse(getWorld().properties().worldGenerationConfig().seed()))
.build();
ServerWorld tempWorld;
@ -300,58 +294,39 @@ public final class SpongeWorld extends AbstractWorld {
@Nullable
private static ConfiguredFeature<?, ?> createTreeFeatureGenerator(TreeGenerator.TreeType type) {
switch (type) {
private static net.minecraft.resources.ResourceKey<ConfiguredFeature<?, ?>> createTreeFeatureGenerator(TreeGenerator.TreeType type) {
return switch (type) {
// Based off of the SaplingGenerator class, as well as uses of DefaultBiomeFeatures fields
case TREE:
return Features.OAK;
case BIG_TREE:
return Features.FANCY_OAK;
case REDWOOD:
return Features.SPRUCE;
case TALL_REDWOOD:
return Features.MEGA_SPRUCE;
case MEGA_REDWOOD:
return Features.MEGA_PINE;
case BIRCH:
return Features.BIRCH;
case JUNGLE:
return Features.MEGA_JUNGLE_TREE;
case SMALL_JUNGLE:
return Features.JUNGLE_TREE;
case SHORT_JUNGLE:
return Features.JUNGLE_TREE_NO_VINE;
case JUNGLE_BUSH:
return Features.JUNGLE_BUSH;
case SWAMP:
return Features.SWAMP_TREE;
case ACACIA:
return Features.ACACIA;
case DARK_OAK:
return Features.DARK_OAK;
case TALL_BIRCH:
return Features.BIRCH_TALL;
case RED_MUSHROOM:
return Features.HUGE_RED_MUSHROOM;
case BROWN_MUSHROOM:
return Features.HUGE_BROWN_MUSHROOM;
case WARPED_FUNGUS:
return Features.WARPED_FUNGI;
case CRIMSON_FUNGUS:
return Features.CRIMSON_FUNGI;
case CHORUS_PLANT:
return Features.CHORUS_PLANT;
case RANDOM:
return createTreeFeatureGenerator(TreeGenerator.TreeType.values()[ThreadLocalRandom.current().nextInt(TreeGenerator.TreeType.values().length)]);
default:
return null;
}
case TREE -> TreeFeatures.OAK;
case BIG_TREE -> TreeFeatures.FANCY_OAK;
case REDWOOD -> TreeFeatures.SPRUCE;
case TALL_REDWOOD -> TreeFeatures.MEGA_SPRUCE;
case MEGA_REDWOOD -> TreeFeatures.MEGA_PINE;
case BIRCH -> TreeFeatures.BIRCH;
case JUNGLE -> TreeFeatures.MEGA_JUNGLE_TREE;
case SMALL_JUNGLE -> TreeFeatures.JUNGLE_TREE;
case SHORT_JUNGLE -> TreeFeatures.JUNGLE_TREE_NO_VINE;
case JUNGLE_BUSH -> TreeFeatures.JUNGLE_BUSH;
case SWAMP -> TreeFeatures.SWAMP_OAK;
case ACACIA -> TreeFeatures.ACACIA;
case DARK_OAK -> TreeFeatures.DARK_OAK;
case TALL_BIRCH -> TreeFeatures.SUPER_BIRCH_BEES_0002;
case RED_MUSHROOM -> TreeFeatures.HUGE_RED_MUSHROOM;
case BROWN_MUSHROOM -> TreeFeatures.HUGE_BROWN_MUSHROOM;
case WARPED_FUNGUS -> TreeFeatures.WARPED_FUNGUS;
case CRIMSON_FUNGUS -> TreeFeatures.CRIMSON_FUNGUS;
case CHORUS_PLANT -> EndFeatures.CHORUS_PLANT;
case RANDOM -> createTreeFeatureGenerator(TreeGenerator.TreeType.values()[ThreadLocalRandom.current().nextInt(TreeGenerator.TreeType.values().length)]);
default -> null;
};
}
@Override
public boolean generateTree(TreeGenerator.TreeType type, EditSession editSession, BlockVector3 position) {
ConfiguredFeature<?, ?> generator = createTreeFeatureGenerator(type);
ServerLevel world = (ServerLevel) getWorld();
ConfiguredFeature<?, ?> generator = Optional.ofNullable(createTreeFeatureGenerator(type))
.map(k -> world.registryAccess().registryOrThrow(Registries.CONFIGURED_FEATURE).get(k))
.orElse(null);
return generator != null && generator.place(
world, world.getChunkSource().getGenerator(), random,
new BlockPos(position.getX(), position.getY(), position.getZ())
@ -439,8 +414,7 @@ public final class SpongeWorld extends AbstractWorld {
public boolean equals(Object o) {
if (o == null) {
return false;
} else if ((o instanceof SpongeWorld)) {
SpongeWorld other = ((SpongeWorld) o);
} else if ((o instanceof SpongeWorld other)) {
ServerWorld otherWorld = other.worldRef.get();
ServerWorld thisWorld = worldRef.get();
return otherWorld != null && otherWorld.equals(thisWorld);
@ -479,7 +453,7 @@ public final class SpongeWorld extends AbstractWorld {
public Entity createEntity(Location location, BaseEntity entity) {
Optional<EntityType<?>> entityType = Sponge.game().registry(RegistryTypes.ENTITY_TYPE)
.findValue(ResourceKey.resolve(entity.getType().getId()));
if (!entityType.isPresent()) {
if (entityType.isEmpty()) {
return null;
}
EntityArchetype.Builder builder = EntityArchetype.builder().type(entityType.get());

View File

@ -190,13 +190,13 @@ public class SpongeWorldEdit {
});
}
event.game().registry(RegistryTypes.BLOCK_TYPE_TAGS).streamEntries().forEach(blockTypeTag -> {
event.game().registry(RegistryTypes.BLOCK_TYPE).tags().forEach(blockTypeTag -> {
String id = blockTypeTag.key().asString();
if (!BlockCategory.REGISTRY.keySet().contains(id)) {
BlockCategory.REGISTRY.register(id, new BlockCategory(id));
}
});
event.game().registry(RegistryTypes.ITEM_TYPE_TAGS).streamEntries().forEach(itemTypeTag -> {
event.game().registry(RegistryTypes.ITEM_TYPE).tags().forEach(itemTypeTag -> {
String id = itemTypeTag.key().asString();
if (!ItemCategory.REGISTRY.keySet().contains(id)) {
ItemCategory.REGISTRY.register(id, new ItemCategory(id));

View File

@ -35,42 +35,44 @@ import net.minecraft.util.StringRepresentable;
import org.spongepowered.api.ResourceKey;
import org.spongepowered.api.Sponge;
import org.spongepowered.api.registry.RegistryTypes;
import org.spongepowered.api.state.BooleanStateProperty;
import org.spongepowered.api.state.EnumStateProperty;
import org.spongepowered.api.state.IntegerStateProperty;
import org.spongepowered.api.state.StateProperty;
import java.util.Comparator;
import java.util.Map;
import java.util.Optional;
import java.util.TreeMap;
import java.util.stream.Collectors;
/**
* Raw, un-cached transformations.
*/
public class SpongeTransmogrifier {
private static final LoadingCache<StateProperty<?>, Property<?>> PROPERTY_CACHE = CacheBuilder.newBuilder().build(new CacheLoader<StateProperty<?>, Property<?>>() {
private static final LoadingCache<StateProperty<?>, Property<?>> PROPERTY_CACHE = CacheBuilder.newBuilder().build(new CacheLoader<>() {
@Override
public Property<?> load(StateProperty<?> property) throws Exception {
if (property instanceof BooleanStateProperty) {
return new BooleanProperty(property.name(), ImmutableList.copyOf(((BooleanStateProperty) property).possibleValues()));
public Property<?> load(StateProperty<?> property) {
net.minecraft.world.level.block.state.properties.Property<?> nativeProperty =
(net.minecraft.world.level.block.state.properties.Property<?>) property;
String propertyName = nativeProperty.getName();
if (nativeProperty instanceof net.minecraft.world.level.block.state.properties.BooleanProperty) {
return new BooleanProperty(propertyName,
ImmutableList.copyOf(((net.minecraft.world.level.block.state.properties.BooleanProperty) nativeProperty).getPossibleValues()));
}
if (property instanceof IntegerStateProperty) {
return new IntegerProperty(property.name(), ImmutableList.copyOf(((IntegerStateProperty) property).possibleValues()));
if (nativeProperty instanceof net.minecraft.world.level.block.state.properties.IntegerProperty) {
return new IntegerProperty(propertyName,
ImmutableList.copyOf(((net.minecraft.world.level.block.state.properties.IntegerProperty) nativeProperty).getPossibleValues()));
}
if (isDirectionProperty(property)) {
return new DirectionalProperty(property.name(),
((EnumStateProperty<?>) property).possibleValues().stream()
if (isDirectionProperty(nativeProperty)) {
return new DirectionalProperty(propertyName,
((net.minecraft.world.level.block.state.properties.EnumProperty<?>) nativeProperty).getPossibleValues().stream()
.map(x -> adaptDirection((net.minecraft.core.Direction) x))
.collect(Collectors.toList())
.toList()
);
}
if (property instanceof EnumStateProperty) {
return new EnumProperty(property.name(), ((EnumStateProperty<?>) property).possibleValues().stream()
.map(x -> ((StringRepresentable) x).getSerializedName())
.collect(Collectors.toList()));
if (nativeProperty instanceof net.minecraft.world.level.block.state.properties.EnumProperty) {
return new EnumProperty(propertyName,
((net.minecraft.world.level.block.state.properties.EnumProperty<?>) nativeProperty).getPossibleValues().stream()
.map(StringRepresentable::getSerializedName)
.toList());
}
throw new IllegalStateException("Unknown property type");
}
@ -80,23 +82,27 @@ public class SpongeTransmogrifier {
return PROPERTY_CACHE.getUnchecked(property);
}
private static Map<Property<?>, Object> transmogToWorldEditProperties(BlockType block, Map<StateProperty<?>, ?> mcProps) {
Map<Property<?>, Object> props = new TreeMap<>(Comparator.comparing(Property::getName));
for (Map.Entry<StateProperty<?>, ?> prop : mcProps.entrySet()) {
Object value = prop.getValue();
if (isDirectionProperty(prop.getKey())) {
value = adaptDirection((net.minecraft.core.Direction) value);
} else if (prop.getKey() instanceof EnumStateProperty) {
private static Map<Property<?>, Object> transmogToWorldEditProperties(
BlockType block,
net.minecraft.world.level.block.state.BlockState blockState
) {
Map<Property<?>, Object> properties = new TreeMap<>(Comparator.comparing(Property::getName));
for (net.minecraft.world.level.block.state.properties.Property<?> nativeProperty: blockState.getProperties()) {
Object value = blockState.getValue(nativeProperty);
if (isDirectionProperty(nativeProperty)) {
net.minecraft.core.Direction nativeDirectionValue = (net.minecraft.core.Direction) value;
value = adaptDirection(nativeDirectionValue);
} else if (nativeProperty instanceof net.minecraft.world.level.block.state.properties.EnumProperty) {
value = ((StringRepresentable) value).getSerializedName();
}
props.put(block.getProperty(prop.getKey().name()), value);
properties.put(block.getProperty(nativeProperty.getName()), value);
}
return props;
return properties;
}
private static boolean isDirectionProperty(StateProperty<?> property) {
return property instanceof EnumStateProperty
&& property.valueClass().isAssignableFrom(net.minecraft.core.Direction.class);
private static boolean isDirectionProperty(net.minecraft.world.level.block.state.properties.Property<?> property) {
return property instanceof net.minecraft.world.level.block.state.properties.EnumProperty
&& property.getValueClass().isAssignableFrom(net.minecraft.core.Direction.class);
}
private static Direction adaptDirection(net.minecraft.core.Direction direction) {
@ -137,36 +143,50 @@ public class SpongeTransmogrifier {
}
}
private static net.minecraft.world.level.block.state.properties.Property<?> findPropertyByName(
net.minecraft.world.level.block.state.BlockState blockState,
String propertyName
) {
for (net.minecraft.world.level.block.state.properties.Property<?> property: blockState.getProperties()) {
if (property.getName().equals(propertyName)) {
return property;
}
}
throw new IllegalStateException("Missing property in " + blockState.getBlock() + ": " + propertyName);
}
@SuppressWarnings({ "unchecked", "rawtypes" })
private static org.spongepowered.api.block.BlockState transmogToMinecraftProperties(
org.spongepowered.api.block.BlockState newState,
org.spongepowered.api.block.BlockState blockState,
Map<Property<?>, Object> states
) {
org.spongepowered.api.block.BlockType type = newState.type();
for (Map.Entry<Property<?>, Object> state : states.entrySet()) {
StateProperty<?> property = type.findStateProperty(state.getKey().getName())
.orElseThrow(() -> new IllegalStateException(
"Missing property in " + type + ": " + state.getKey().getName())
);
Comparable value = (Comparable) state.getValue();
// we may need to adapt this value, depending on the source prop
if (state.getKey() instanceof DirectionalProperty) {
Direction dir = (Direction) value;
value = adaptDirection(dir);
} else if (state.getKey() instanceof EnumProperty) {
String enumName = (String) value;
value = property.parseValue(enumName).orElseThrow(() -> new IllegalStateException(
"Failed to parse '" + enumName + "' into " + state.getKey().getName()
));
net.minecraft.world.level.block.state.BlockState nativeBlockState =
(net.minecraft.world.level.block.state.BlockState) blockState;
for (Map.Entry<Property<?>, Object> stateEntry: states.entrySet()) {
Property<?> property = stateEntry.getKey();
Object value = stateEntry.getValue();
net.minecraft.world.level.block.state.properties.Property<?> nativeProperty =
findPropertyByName(nativeBlockState, property.getName());
Comparable<?> nativeValue;
if (property instanceof DirectionalProperty) {
Direction directionValue = (Direction) value;
nativeValue = adaptDirection(directionValue);
} else if (property instanceof EnumProperty) {
String valueName = (String) value;
Optional<? extends Comparable<?>> nativeValueOpt = nativeProperty.getValue(valueName);
if (nativeValueOpt.isEmpty()) {
throw new IllegalStateException("Failed to parse " + valueName + " into " + property.getName());
}
nativeValue = nativeValueOpt.get();
} else {
nativeValue = (Comparable<?>) value;
}
Optional<org.spongepowered.api.block.BlockState> optional =
newState.withStateProperty((StateProperty) property, value);
newState = optional.orElseThrow(() -> new IllegalStateException(
"Failed to change state property " + property.name()
));
nativeBlockState = nativeBlockState.setValue(
(net.minecraft.world.level.block.state.properties.Property) nativeProperty, (Comparable) nativeValue);
}
return newState;
return (org.spongepowered.api.block.BlockState) nativeBlockState;
}
public static org.spongepowered.api.block.BlockState transmogToMinecraft(BlockState blockState) {
@ -181,7 +201,8 @@ public class SpongeTransmogrifier {
BlockType blockType = BlockType.REGISTRY.get(
blockState.type().key(RegistryTypes.BLOCK_TYPE).asString()
);
return blockType.getState(transmogToWorldEditProperties(blockType, blockState.statePropertyMap()));
return blockType.getState(transmogToWorldEditProperties(blockType,
(net.minecraft.world.level.block.state.BlockState) blockState));
}
private SpongeTransmogrifier() {

View File

@ -26,7 +26,7 @@ import com.sk89q.worldedit.util.SideEffectSet;
import com.sk89q.worldedit.world.storage.ChunkStore;
import net.minecraft.core.BlockPos;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.server.level.ChunkHolder;
import net.minecraft.server.level.FullChunkStatus;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.entity.BlockEntity;
@ -106,8 +106,8 @@ public class SpongeWorldNativeAccess implements WorldNativeAccess<LevelChunk, Bl
if (tileEntity == null) {
return false;
}
tileEntity.setLevelAndPosition(getWorld(), position);
tileEntity.load(getWorld().getBlockState(position), nativeTag);
tileEntity.setLevel(getWorld());
tileEntity.load(nativeTag);
return true;
}
@ -120,7 +120,7 @@ public class SpongeWorldNativeAccess implements WorldNativeAccess<LevelChunk, Bl
@Override
public boolean isChunkTicking(LevelChunk chunk) {
return chunk.getFullStatus().isOrAfter(ChunkHolder.FullChunkStatus.TICKING);
return chunk.getFullStatus().isOrAfter(FullChunkStatus.BLOCK_TICKING);
}
@Override