mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-05 20:36:42 +00:00
Feature/1.17 (#1120)
* start v6 * Update classes to v6 method signatures * change rootVersion to signify p2v6 compat * Use 16 as toolchain version but target 11 for build output * add minimessage as api * Require v6 and don't attempt to "setup" hook from FAWE * Address comments * *address /all/ comments * FAWE classes should only act as a delegate * Uppercase logger * Settings for v6-hook have moved to P2-v6, remove unneeded if statements * Rename classes to Delegate * add whenDone task to setCuboids * Remove bad spaces * Fix plot swap * Initial work on 1.17 support * Remove data versions from the Bukkit adapters (#1507) * Remove data versions from the Bukkit adapters * Don't allow saving schematics without an adapter in place on Bukkit. * Removed confusing line (cherry picked from commit 2056218b4a8644836b1d127105dfa289e9cdbc1c) * More progress * Fix chunk sending * Repackage from com.boydti to com.fastasyncworldedit.<module> (#1119) * Preliminary work on repackaging * Rename build artifacts matching our pattern * Finish up repackaging * Fix a few field accesses and old imports * Dirty fix for chunks container ChunkSections outside of 0-15 * Correctly read from NibbleArrays for lighting * Fix getSections and BlockMaterial for 1.17 * Fix writing blocks to the world. - The issue isn't the presence of a "-1" chunk, it's the constructor for ChunkSection requiring the layer (0 to 15) rather than the y chord * Fix more field accesses * More work towards 1.17 * Update Upstream a57f66f Fix watchdog, add negative y support. (1782) * Add azalea tree to `/tool tree` * Don't define toolchain twice * Repackage GriefDefender * Relocate under new namespace * Bye bye ecma left overs * Add 1.17 to issue templates and instructions * Move to adventure-nbt (#918) * Initial work for adventure-nbt * Some more FAWE specific stuff * Fix erroneous deprecation check * Workflow change * Continued merging all adventure NBT related changes * Continued merging all adventure NBT related changes * Made a constructor public again This needs to be public for BlockTransformExtent.java * Finished converting all NBT data to adventure. * Make this compile * Fix conflicts Co-authored-by: Matt <4009945+MattBDev@users.noreply.github.com> * Update adapters to 1.17 * Change build prefix to 1.17 * Move more nms classes to adapters * Move left over nms classes * Move Spigot 1.17 class * Remove unneeded adapter loader code The loader will find the appropriate class now itself * Update adapters * Update adapters * Lazy fix tests * Update adapters * Update Upstream 43da91a Remove method reflection for getMinHeight in BukkitWorld. (1796) * Relocate adventure-nbt under proper namespace * Add LazyCompoundTag as a non-version-specific class to be used by adapters * Better integration between old NBT and Adventure NBT - begin fixing the issues seen recently * Correctly NBT conversion method * LazyCompoundTags should actually be overriding and correctly returning a CompoundBinaryTag. * Update worldedit-adapters Fixes #1141 * Remove unnecessary massive lag machine * Refactor apply to applyBlock in subclasses * applyBlock should be overriden by all subclasses. Default apply to applyBlock * Closes #1130 Closes #1132 * Squashed commit of the following: commit a9bfa1a07c77083c844a0c3ba62f4bd94bed107c Author: NotMyFault <mc.cache@web.de> Date: Sun Jun 27 21:53:21 2021 +0200 [ci skip] Update gradle wrapper validation commit aa7471f95317d28a16f62e4b200de8d0fea2fa95 Author: Matthew Miller <mnmiller1@me.com> Date: Sat Oct 10 15:49:13 2020 +1000 Add ^x,y,z relative offset support to the offset parser (#1545) * Add ^x,y,z relative offset support to the offset parser * Wrap in a try-catch (cherry picked from commit 28bdf7ff9254bbc85bb4f5f792b303943a3930a8) * Add `fawe.error.schematic.not.found` translation key * Update Upstream 728a152 Skip notify if chunk section doesn't exist (1794) * Fixed #1157 * Add a null check to prevent NPE in nbt code * Update adapters * Update Upstream fbb047a Optimize legacy schematic loading (1808) * Hurr durr I don't want to update Java * Update Upstream 0790e6e Fix CLI Mess (1811) * Fixes #1160 * Expose minimessage transitively thru PlotSquared Touches #32 * [ci skip] Remove unneeded maven repository * Steal tab completion from PlotSquared for P2 related commands * Don't error on startup when building locally Co-Authored-By: goldfishapp <8278196+goldfishapp@users.noreply.github.com> * [ci skip] Update gh actions to Java 16 * Update textures to grab 1.17 jar Co-authored-by: NotMyFault <mc.cache@web.de> Co-authored-by: SirYwell <hannesgreule@outlook.de> Co-authored-by: Matthew Miller <mnmiller1@me.com> Co-authored-by: Matt <4009945+MattBDev@users.noreply.github.com> Co-authored-by: goldfishapp <8278196+goldfishapp@users.noreply.github.com>
This commit is contained in:
@ -20,7 +20,7 @@
|
||||
package com.sk89q.worldedit.world;
|
||||
|
||||
import com.google.common.annotations.Beta;
|
||||
import com.sk89q.jnbt.CompoundTag;
|
||||
import com.sk89q.worldedit.util.nbt.CompoundBinaryTag;
|
||||
|
||||
/**
|
||||
* This entire class is subject to heavy changes. Do not use this as API.
|
||||
@ -37,9 +37,9 @@ public interface DataFixer {
|
||||
private FixTypes() {
|
||||
}
|
||||
|
||||
public static FixType<CompoundTag> CHUNK = new FixType<>();
|
||||
public static FixType<CompoundTag> BLOCK_ENTITY = new FixType<>();
|
||||
public static FixType<CompoundTag> ENTITY = new FixType<>();
|
||||
public static FixType<CompoundBinaryTag> CHUNK = new FixType<>();
|
||||
public static FixType<CompoundBinaryTag> BLOCK_ENTITY = new FixType<>();
|
||||
public static FixType<CompoundBinaryTag> ENTITY = new FixType<>();
|
||||
public static FixType<String> BLOCK_STATE = new FixType<>();
|
||||
public static FixType<String> BIOME = new FixType<>();
|
||||
public static FixType<String> ITEM_TYPE = new FixType<>();
|
||||
|
@ -20,6 +20,10 @@
|
||||
package com.sk89q.worldedit.world;
|
||||
|
||||
import com.sk89q.jnbt.CompoundTag;
|
||||
import com.sk89q.worldedit.internal.util.DeprecationUtil;
|
||||
import com.sk89q.worldedit.internal.util.NonAbstractForCompatibility;
|
||||
import com.sk89q.worldedit.util.concurrency.LazyReference;
|
||||
import com.sk89q.worldedit.util.nbt.CompoundBinaryTag;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
@ -35,8 +39,12 @@ public interface NbtValued {
|
||||
* must not return null if this method returns true.
|
||||
*
|
||||
* @return true if there is NBT data
|
||||
* @deprecated See {@link #getNbt()}
|
||||
*/
|
||||
boolean hasNbtData();
|
||||
@Deprecated
|
||||
default boolean hasNbtData() {
|
||||
return getNbt() != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the object's NBT data (tile entity data). The returned tag, if
|
||||
@ -49,15 +57,87 @@ public interface NbtValued {
|
||||
* not return null.</p>
|
||||
*
|
||||
* @return compound tag, or null
|
||||
* @deprecated See {@link #getNbt()}
|
||||
*/
|
||||
@Deprecated
|
||||
@Nullable
|
||||
default CompoundTag getNbtData() {
|
||||
CompoundBinaryTag tag = getNbt();
|
||||
return tag == null ? null : new CompoundTag(tag);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the object's NBT data (tile entity data).
|
||||
*
|
||||
* @param nbtData NBT data, or null if no data
|
||||
* @deprecated See {@link #setNbtReference(LazyReference)}
|
||||
*/
|
||||
@Deprecated
|
||||
default void setNbtData(@Nullable CompoundTag nbtData) {
|
||||
setNbtReference(nbtData == null ? null : LazyReference.from(nbtData::asBinaryTag));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the object's NBT data (tile entity data).
|
||||
*
|
||||
* <p>
|
||||
* This only needs to be used if you don't want to immediately resolve the data.
|
||||
* Otherwise, you probably want {@link #getNbt()}.
|
||||
* </p>
|
||||
*
|
||||
* @return compound tag, or null
|
||||
* @apiNote This must be overridden by new subclasses. See {@link NonAbstractForCompatibility}
|
||||
* for details
|
||||
*/
|
||||
@NonAbstractForCompatibility(
|
||||
delegateName = "getNbtData",
|
||||
delegateParams = { }
|
||||
)
|
||||
@Nullable
|
||||
default LazyReference<CompoundBinaryTag> getNbtReference() {
|
||||
DeprecationUtil.checkDelegatingOverride(getClass());
|
||||
|
||||
CompoundTag nbtData = getNbtData();
|
||||
return nbtData == null ? null : LazyReference.from(nbtData::asBinaryTag);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the object's NBT data (tile entity data).
|
||||
*
|
||||
* @return compound tag, or null
|
||||
* @apiNote This must be overridden by new subclasses. See {@link NonAbstractForCompatibility}
|
||||
* for details
|
||||
*/
|
||||
@Nullable
|
||||
CompoundTag getNbtData();
|
||||
default CompoundBinaryTag getNbt() {
|
||||
LazyReference<CompoundBinaryTag> ref = getNbtReference();
|
||||
return ref == null ? null : ref.getValue();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the object's NBT data (tile entity data).
|
||||
*
|
||||
* @param nbtData NBT data, or null if no data
|
||||
* @apiNote This must be overridden by new subclasses. See {@link NonAbstractForCompatibility}
|
||||
* for details
|
||||
*/
|
||||
@NonAbstractForCompatibility(
|
||||
delegateName = "setNbtData",
|
||||
delegateParams = { CompoundTag.class }
|
||||
)
|
||||
default void setNbtReference(@Nullable LazyReference<CompoundBinaryTag> nbtData) {
|
||||
DeprecationUtil.checkDelegatingOverride(getClass());
|
||||
|
||||
setNbtData(nbtData == null ? null : new CompoundTag(nbtData.getValue()));
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the object's NBT data (tile entity data).
|
||||
*
|
||||
* @param nbtData NBT data, or null if no data
|
||||
*/
|
||||
void setNbtData(@Nullable CompoundTag nbtData);
|
||||
default void setNbt(@Nullable CompoundBinaryTag nbtData) {
|
||||
setNbtReference(nbtData == null ? null : LazyReference.computed(nbtData));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -19,9 +19,9 @@
|
||||
|
||||
package com.sk89q.worldedit.world;
|
||||
|
||||
import com.boydti.fawe.beta.IChunkGet;
|
||||
import com.boydti.fawe.beta.implementation.blocks.NullChunkGet;
|
||||
import com.boydti.fawe.beta.implementation.packet.ChunkPacket;
|
||||
import com.fastasyncworldedit.core.beta.IChunkGet;
|
||||
import com.fastasyncworldedit.core.beta.implementation.blocks.NullChunkGet;
|
||||
import com.fastasyncworldedit.core.beta.implementation.packet.ChunkPacket;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.sk89q.jnbt.CompoundTag;
|
||||
import com.sk89q.worldedit.EditSession;
|
||||
@ -48,7 +48,6 @@ import com.sk89q.worldedit.world.block.BlockTypes;
|
||||
import com.sk89q.worldedit.world.weather.WeatherType;
|
||||
import com.sk89q.worldedit.world.weather.WeatherTypes;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
package com.sk89q.worldedit.world;
|
||||
|
||||
import com.boydti.fawe.Fawe;
|
||||
import com.fastasyncworldedit.core.Fawe;
|
||||
import com.sk89q.worldedit.EditSession;
|
||||
import com.sk89q.worldedit.MaxChangedBlocksException;
|
||||
import com.sk89q.worldedit.WorldEditException;
|
||||
|
@ -19,9 +19,9 @@
|
||||
|
||||
package com.sk89q.worldedit.world;
|
||||
|
||||
import com.boydti.fawe.beta.IChunkCache;
|
||||
import com.boydti.fawe.beta.IChunkGet;
|
||||
import com.boydti.fawe.beta.implementation.packet.ChunkPacket;
|
||||
import com.fastasyncworldedit.core.beta.IChunkCache;
|
||||
import com.fastasyncworldedit.core.beta.IChunkGet;
|
||||
import com.fastasyncworldedit.core.beta.implementation.packet.ChunkPacket;
|
||||
import com.sk89q.worldedit.EditSession;
|
||||
import com.sk89q.worldedit.MaxChangedBlocksException;
|
||||
import com.sk89q.worldedit.WorldEditException;
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
package com.sk89q.worldedit.world;
|
||||
|
||||
import com.boydti.fawe.config.Caption;
|
||||
import com.fastasyncworldedit.core.configuration.Caption;
|
||||
import com.sk89q.worldedit.WorldEditException;
|
||||
|
||||
/**
|
||||
|
@ -49,6 +49,7 @@ public final class BiomeTypes {
|
||||
@Nullable public static final BiomeType DESERT = get("minecraft:desert");
|
||||
@Nullable public static final BiomeType DESERT_HILLS = get("minecraft:desert_hills");
|
||||
@Nullable public static final BiomeType DESERT_LAKES = get("minecraft:desert_lakes");
|
||||
@Nullable public static final BiomeType DRIPSTONE_CAVES = get("minecraft:dripstone_caves");
|
||||
@Nullable public static final BiomeType END_BARRENS = get("minecraft:end_barrens");
|
||||
@Nullable public static final BiomeType END_HIGHLANDS = get("minecraft:end_highlands");
|
||||
@Nullable public static final BiomeType END_MIDLANDS = get("minecraft:end_midlands");
|
||||
@ -67,6 +68,7 @@ public final class BiomeTypes {
|
||||
@Nullable public static final BiomeType JUNGLE_EDGE = get("minecraft:jungle_edge");
|
||||
@Nullable public static final BiomeType JUNGLE_HILLS = get("minecraft:jungle_hills");
|
||||
@Nullable public static final BiomeType LUKEWARM_OCEAN = get("minecraft:lukewarm_ocean");
|
||||
@Nullable public static final BiomeType LUSH_CAVES = get("minecraft:lush_caves");
|
||||
@Nullable public static final BiomeType MODIFIED_BADLANDS_PLATEAU = get("minecraft:modified_badlands_plateau");
|
||||
@Nullable public static final BiomeType MODIFIED_GRAVELLY_MOUNTAINS = get("minecraft:modified_gravelly_mountains");
|
||||
@Nullable public static final BiomeType MODIFIED_JUNGLE = get("minecraft:modified_jungle");
|
||||
|
@ -20,8 +20,7 @@
|
||||
package com.sk89q.worldedit.world.block;
|
||||
|
||||
import com.sk89q.jnbt.CompoundTag;
|
||||
import com.sk89q.jnbt.StringTag;
|
||||
import com.sk89q.jnbt.Tag;
|
||||
import com.sk89q.worldedit.WorldEdit;
|
||||
import com.sk89q.worldedit.WorldEditException;
|
||||
import com.sk89q.worldedit.blocks.TileEntityBlock;
|
||||
import com.sk89q.worldedit.extent.Extent;
|
||||
@ -29,9 +28,13 @@ import com.sk89q.worldedit.extent.OutputExtent;
|
||||
import com.sk89q.worldedit.math.BlockVector3;
|
||||
import com.sk89q.worldedit.registry.state.Property;
|
||||
import com.sk89q.worldedit.registry.state.PropertyKey;
|
||||
import com.sk89q.worldedit.util.concurrency.LazyReference;
|
||||
import com.sk89q.worldedit.util.nbt.CompoundBinaryTag;
|
||||
import com.sk89q.worldedit.util.nbt.TagStringIO;
|
||||
import com.sk89q.worldedit.world.registry.BlockMaterial;
|
||||
import com.sk89q.worldedit.world.registry.LegacyMapper;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import javax.annotation.Nullable;
|
||||
@ -50,7 +53,8 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
||||
public class BaseBlock implements BlockStateHolder<BaseBlock>, TileEntityBlock {
|
||||
|
||||
private final BlockState blockState;
|
||||
@Nullable private final CompoundTag nbtData;
|
||||
@Nullable
|
||||
private final LazyReference<CompoundBinaryTag> nbtData;
|
||||
|
||||
/**
|
||||
* Construct a block with the given type and default data.
|
||||
@ -78,7 +82,19 @@ public class BaseBlock implements BlockStateHolder<BaseBlock>, TileEntityBlock {
|
||||
* @param state The block state
|
||||
* @param nbtData NBT data, which must be provided
|
||||
*/
|
||||
@Deprecated
|
||||
public BaseBlock(BlockState state, CompoundTag nbtData) {
|
||||
this(state, LazyReference.from(checkNotNull(nbtData)::asBinaryTag));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Construct a block with the given ID, data value and NBT data structure.
|
||||
*
|
||||
* @param state The block state
|
||||
* @param nbtData NBT data, which must be provided
|
||||
*/
|
||||
protected BaseBlock(BlockState state, LazyReference<CompoundBinaryTag> nbtData) {
|
||||
checkNotNull(nbtData);
|
||||
this.blockState = state;
|
||||
this.nbtData = nbtData;
|
||||
@ -102,7 +118,6 @@ public class BaseBlock implements BlockStateHolder<BaseBlock>, TileEntityBlock {
|
||||
}
|
||||
return blockState;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a map of state to state values.
|
||||
*
|
||||
@ -120,7 +135,7 @@ public class BaseBlock implements BlockStateHolder<BaseBlock>, TileEntityBlock {
|
||||
|
||||
@Override
|
||||
public <V> BaseBlock with(Property<V> property, V value) {
|
||||
return toImmutableState().with(property, value).toBaseBlock(getNbtData());
|
||||
return toImmutableState().with(property, value).toBaseBlock(getNbtReference());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -134,36 +149,23 @@ public class BaseBlock implements BlockStateHolder<BaseBlock>, TileEntityBlock {
|
||||
return toImmutableState().getState(property);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasNbtData() {
|
||||
return getNbtData() != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getNbtId() {
|
||||
CompoundTag nbtData = getNbtData();
|
||||
LazyReference<CompoundBinaryTag> nbtData = this.nbtData;
|
||||
if (nbtData == null) {
|
||||
return "";
|
||||
}
|
||||
Tag idTag = nbtData.getValue().get("id");
|
||||
if (idTag == null) {
|
||||
idTag = nbtData.getValue().get("Id");
|
||||
}
|
||||
if (idTag instanceof StringTag) {
|
||||
return ((StringTag) idTag).getValue();
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
return nbtData.getValue().getString("id");
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public CompoundTag getNbtData() {
|
||||
public LazyReference<CompoundBinaryTag> getNbtReference() {
|
||||
return this.nbtData;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setNbtData(@Nullable CompoundTag nbtData) {
|
||||
public void setNbtReference(@Nullable LazyReference<CompoundBinaryTag> nbtData) {
|
||||
throw new UnsupportedOperationException("This class is immutable.");
|
||||
}
|
||||
|
||||
@ -173,7 +175,7 @@ public class BaseBlock implements BlockStateHolder<BaseBlock>, TileEntityBlock {
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (!(o instanceof BaseBlock)) {
|
||||
if (!hasNbtData() && o instanceof BlockStateHolder) {
|
||||
if (nbtData == null && o instanceof BlockStateHolder) {
|
||||
return Objects.equals(toImmutableState(), ((BlockStateHolder<?>) o).toImmutableState());
|
||||
}
|
||||
return false;
|
||||
@ -181,7 +183,7 @@ public class BaseBlock implements BlockStateHolder<BaseBlock>, TileEntityBlock {
|
||||
|
||||
final BaseBlock otherBlock = (BaseBlock) o;
|
||||
|
||||
return this.blockState.equalsFuzzy(otherBlock.blockState) && Objects.equals(getNbtData(), otherBlock.getNbtData());
|
||||
return this.blockState.equalsFuzzy(otherBlock.blockState) && Objects.equals(getNbt(), otherBlock.getNbt());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -260,7 +262,7 @@ public class BaseBlock implements BlockStateHolder<BaseBlock>, TileEntityBlock {
|
||||
}
|
||||
|
||||
@Override
|
||||
public BaseBlock toBaseBlock(CompoundTag compoundTag) {
|
||||
public BaseBlock toBaseBlock(LazyReference<CompoundBinaryTag> compoundTag) {
|
||||
if (compoundTag == null) {
|
||||
return this.blockState.toBaseBlock();
|
||||
} else if (compoundTag == this.nbtData) {
|
||||
@ -275,15 +277,26 @@ public class BaseBlock implements BlockStateHolder<BaseBlock>, TileEntityBlock {
|
||||
return toImmutableState().getState(property);
|
||||
}
|
||||
|
||||
// Fawe start
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return getOrdinal();
|
||||
}
|
||||
// Fawe end
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
// TODO use a json serializer for the NBT data
|
||||
return blockState.getAsString() + (hasNbtData() ? "{hasNbt}" : "");
|
||||
String nbtString = "";
|
||||
CompoundBinaryTag nbtData = getNbt();
|
||||
if (nbtData != null) {
|
||||
try {
|
||||
nbtString = TagStringIO.get().asString(nbtData);
|
||||
} catch (IOException e) {
|
||||
WorldEdit.logger.error("Failed to serialize NBT of Block", e);
|
||||
}
|
||||
}
|
||||
|
||||
return blockState.getAsString() + nbtString;
|
||||
}
|
||||
|
||||
public BlockState toBlockState() {
|
||||
|
@ -1,15 +1,8 @@
|
||||
package com.sk89q.worldedit.world.block;
|
||||
|
||||
import com.sk89q.jnbt.CompoundTag;
|
||||
import com.sk89q.worldedit.WorldEditException;
|
||||
import com.sk89q.worldedit.extent.Extent;
|
||||
import com.sk89q.worldedit.extent.OutputExtent;
|
||||
import com.sk89q.worldedit.math.BlockVector3;
|
||||
import com.sk89q.worldedit.registry.state.Property;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
/**
|
||||
* BaseBlock that when parsed to masks represents all BlockStates of a BlockType, whilst allowing for NBT storage
|
||||
*/
|
||||
|
@ -39,23 +39,37 @@ public final class BlockCategories {
|
||||
public static final BlockCategory BIRCH_LOGS = get("minecraft:birch_logs");
|
||||
public static final BlockCategory BUTTONS = get("minecraft:buttons");
|
||||
public static final BlockCategory CAMPFIRES = get("minecraft:campfires");
|
||||
public static final BlockCategory CANDLE_CAKES = get("minecraft:candle_cakes");
|
||||
public static final BlockCategory CANDLES = get("minecraft:candles");
|
||||
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 CLIMBABLE = get("minecraft:climbable");
|
||||
public static final BlockCategory COAL_ORES = get("minecraft:coal_ores");
|
||||
public static final BlockCategory COPPER_ORES = get("minecraft:copper_ores");
|
||||
public static final BlockCategory CORAL_BLOCKS = get("minecraft:coral_blocks");
|
||||
public static final BlockCategory CORAL_PLANTS = get("minecraft:coral_plants");
|
||||
public static final BlockCategory CORALS = get("minecraft:corals");
|
||||
public static final BlockCategory CRIMSON_STEMS = get("minecraft:crimson_stems");
|
||||
public static final BlockCategory CROPS = get("minecraft:crops");
|
||||
public static final BlockCategory CRYSTAL_SOUND_BLOCKS = get("minecraft:crystal_sound_blocks");
|
||||
public static final BlockCategory DARK_OAK_LOGS = get("minecraft:dark_oak_logs");
|
||||
public static final BlockCategory DEEPSLATE_ORE_REPLACEABLES = get("minecraft:deepslate_ore_replaceables");
|
||||
public static final BlockCategory DIAMOND_ORES = get("minecraft:diamond_ores");
|
||||
public static final BlockCategory DIRT = get("minecraft:dirt");
|
||||
@Deprecated public static final BlockCategory DIRT_LIKE = get("minecraft:dirt_like");
|
||||
public static final BlockCategory DOORS = get("minecraft:doors");
|
||||
public static final BlockCategory DRAGON_IMMUNE = get("minecraft:dragon_immune");
|
||||
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 ENDERMAN_HOLDABLE = get("minecraft:enderman_holdable");
|
||||
public static final BlockCategory FEATURES_CANNOT_REPLACE = get("minecraft:features_cannot_replace");
|
||||
public static final BlockCategory FENCE_GATES = get("minecraft:fence_gates");
|
||||
public static final BlockCategory FENCES = get("minecraft:fences");
|
||||
public static final BlockCategory FIRE = get("minecraft:fire");
|
||||
public static final BlockCategory FLOWER_POTS = get("minecraft:flower_pots");
|
||||
public static final BlockCategory FLOWERS = get("minecraft:flowers");
|
||||
public static final BlockCategory GEODE_INVALID_BLOCKS = get("minecraft:geode_invalid_blocks");
|
||||
public static final BlockCategory GOLD_ORES = get("minecraft:gold_ores");
|
||||
public static final BlockCategory GUARDED_BY_PIGLINS = get("minecraft:guarded_by_piglins");
|
||||
public static final BlockCategory HOGLIN_REPELLENTS = get("minecraft:hoglin_repellents");
|
||||
@ -64,32 +78,50 @@ public final class BlockCategories {
|
||||
public static final BlockCategory INFINIBURN_END = get("minecraft:infiniburn_end");
|
||||
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 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");
|
||||
public static final BlockCategory LAVA_POOL_STONE_REPLACEABLES = get("minecraft:lava_pool_stone_replaceables");
|
||||
public static final BlockCategory LEAVES = get("minecraft:leaves");
|
||||
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 MINEABLE_AXE = get("minecraft:mineable/axe");
|
||||
public static final BlockCategory MINEABLE_HOE = get("minecraft:mineable/hoe");
|
||||
public static final BlockCategory MINEABLE_PICKAXE = get("minecraft:mineable/pickaxe");
|
||||
public static final BlockCategory MINEABLE_SHOVEL = get("minecraft:mineable/shovel");
|
||||
public static final BlockCategory MOSS_REPLACEABLE = get("minecraft:moss_replaceable");
|
||||
public static final BlockCategory MUSHROOM_GROW_BLOCK = get("minecraft:mushroom_grow_block");
|
||||
public static final BlockCategory NEEDS_DIAMOND_TOOL = get("minecraft:needs_diamond_tool");
|
||||
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 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");
|
||||
public static final BlockCategory PIGLIN_REPELLENTS = get("minecraft:piglin_repellents");
|
||||
public static final BlockCategory PLANKS = get("minecraft:planks");
|
||||
public static final BlockCategory PORTALS = get("minecraft:portals");
|
||||
public static final BlockCategory PRESSURE_PLATES = get("minecraft:pressure_plates");
|
||||
public static final BlockCategory PREVENT_MOB_SPAWNING_INSIDE = get("minecraft:prevent_mob_spawning_inside");
|
||||
public static final BlockCategory RAILS = get("minecraft:rails");
|
||||
public static final BlockCategory REDSTONE_ORES = get("minecraft:redstone_ores");
|
||||
public static final BlockCategory SAND = get("minecraft:sand");
|
||||
public static final BlockCategory SAPLINGS = get("minecraft:saplings");
|
||||
public static final BlockCategory SHULKER_BOXES = get("minecraft:shulker_boxes");
|
||||
public static final BlockCategory SIGNS = get("minecraft:signs");
|
||||
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 SNOW = get("minecraft:snow");
|
||||
public static final BlockCategory SOUL_FIRE_BASE_BLOCKS = get("minecraft:soul_fire_base_blocks");
|
||||
public static final BlockCategory SOUL_SPEED_BLOCKS = get("minecraft:soul_speed_blocks");
|
||||
public static final BlockCategory SPRUCE_LOGS = get("minecraft:spruce_logs");
|
||||
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_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 TALL_FLOWERS = get("minecraft:tall_flowers");
|
||||
|
@ -19,10 +19,10 @@
|
||||
|
||||
package com.sk89q.worldedit.world.block;
|
||||
|
||||
import com.boydti.fawe.beta.ITileInput;
|
||||
import com.boydti.fawe.command.SuggestInputParseException;
|
||||
import com.boydti.fawe.object.string.MutableCharSequence;
|
||||
import com.boydti.fawe.util.StringMan;
|
||||
import com.fastasyncworldedit.core.beta.ITileInput;
|
||||
import com.fastasyncworldedit.core.command.SuggestInputParseException;
|
||||
import com.fastasyncworldedit.core.object.string.MutableCharSequence;
|
||||
import com.fastasyncworldedit.core.util.StringMan;
|
||||
import com.google.common.base.Function;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.sk89q.jnbt.CompoundTag;
|
||||
@ -40,6 +40,8 @@ import com.sk89q.worldedit.math.BlockVector3;
|
||||
import com.sk89q.worldedit.registry.state.AbstractProperty;
|
||||
import com.sk89q.worldedit.registry.state.Property;
|
||||
import com.sk89q.worldedit.registry.state.PropertyKey;
|
||||
import com.sk89q.worldedit.util.concurrency.LazyReference;
|
||||
import com.sk89q.worldedit.util.nbt.CompoundBinaryTag;
|
||||
import com.sk89q.worldedit.world.registry.BlockMaterial;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@ -242,7 +244,7 @@ public class BlockState implements BlockStateHolder<BlockState>, Pattern {
|
||||
}
|
||||
|
||||
@Override
|
||||
public BaseBlock apply(BlockVector3 position) {
|
||||
public BaseBlock applyBlock(BlockVector3 position) {
|
||||
return this.toBaseBlock();
|
||||
}
|
||||
|
||||
@ -359,8 +361,14 @@ public class BlockState implements BlockStateHolder<BlockState>, Pattern {
|
||||
return getState(getBlockType().getProperty(key));
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Override
|
||||
public BaseBlock toBaseBlock(CompoundTag compoundTag) {
|
||||
public CompoundTag getNbtData() {
|
||||
return getBlockType().getMaterial().isTile() ? getBlockType().getMaterial().getDefaultTile() : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BaseBlock toBaseBlock(LazyReference<CompoundBinaryTag> compoundTag) {
|
||||
if (compoundTag == null) {
|
||||
return toBaseBlock();
|
||||
}
|
||||
|
@ -19,20 +19,23 @@
|
||||
|
||||
package com.sk89q.worldedit.world.block;
|
||||
|
||||
import com.boydti.fawe.beta.ITileInput;
|
||||
import com.fastasyncworldedit.core.beta.ITileInput;
|
||||
import com.sk89q.jnbt.CompoundTag;
|
||||
import com.sk89q.worldedit.blocks.TileEntityBlock;
|
||||
import com.sk89q.worldedit.extent.OutputExtent;
|
||||
import com.sk89q.worldedit.function.pattern.Pattern;
|
||||
import com.sk89q.worldedit.internal.util.DeprecationUtil;
|
||||
import com.sk89q.worldedit.internal.util.NonAbstractForCompatibility;
|
||||
import com.sk89q.worldedit.math.BlockVector3;
|
||||
import com.sk89q.worldedit.registry.state.Property;
|
||||
import com.sk89q.worldedit.registry.state.PropertyKey;
|
||||
import com.sk89q.worldedit.util.concurrency.LazyReference;
|
||||
import com.sk89q.worldedit.world.registry.BlockMaterial;
|
||||
import com.sk89q.worldedit.util.nbt.CompoundBinaryTag;
|
||||
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public interface BlockStateHolder<B extends BlockStateHolder<B>> extends TileEntityBlock, Pattern {
|
||||
|
||||
@ -143,61 +146,48 @@ public interface BlockStateHolder<B extends BlockStateHolder<B>> extends TileEnt
|
||||
*
|
||||
* @param compoundTag The NBT Data to apply
|
||||
* @return The BaseBlock
|
||||
* @deprecated Use {@link BlockStateHolder#toBaseBlock(LazyReference)}.
|
||||
*/
|
||||
BaseBlock toBaseBlock(CompoundTag compoundTag);
|
||||
@Deprecated
|
||||
default BaseBlock toBaseBlock(CompoundTag compoundTag) {
|
||||
return toBaseBlock(compoundTag == null ? null : LazyReference.from(compoundTag::asBinaryTag));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a {@link BaseBlock} from this BlockStateHolder.
|
||||
*
|
||||
* @param compoundTag The NBT Data to apply
|
||||
* @return The BaseBlock
|
||||
* @apiNote This must be overridden by new subclasses. See {@link NonAbstractForCompatibility}
|
||||
* for details
|
||||
*/
|
||||
@NonAbstractForCompatibility(
|
||||
delegateName = "toBaseBlock",
|
||||
delegateParams = { CompoundTag.class }
|
||||
)
|
||||
default BaseBlock toBaseBlock(LazyReference<CompoundBinaryTag> compoundTag) {
|
||||
DeprecationUtil.checkDelegatingOverride(getClass());
|
||||
|
||||
return toBaseBlock(compoundTag == null ? null : new CompoundTag(compoundTag.getValue()));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a {@link BaseBlock} from this BlockStateHolder.
|
||||
*
|
||||
* @param compoundTag The NBT Data to apply
|
||||
* @return The BaseBlock
|
||||
*/
|
||||
default BaseBlock toBaseBlock(CompoundBinaryTag compoundTag) {
|
||||
return toBaseBlock(compoundTag == null ? null : LazyReference.computed(compoundTag));
|
||||
}
|
||||
|
||||
@Override
|
||||
default BaseBlock apply(BlockVector3 position) {
|
||||
default BaseBlock applyBlock(BlockVector3 position) {
|
||||
return toBaseBlock();
|
||||
}
|
||||
|
||||
void applyTileEntity(OutputExtent output, int x, int y, int z);
|
||||
|
||||
/**
|
||||
* Return the name of the title entity ID.
|
||||
*
|
||||
* @return tile entity ID, non-null string
|
||||
*/
|
||||
default String getNbtId() {
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether the block contains NBT data. {@link #getNbtData()}
|
||||
* must not return null if this method returns true.
|
||||
*
|
||||
* @return true if there is NBT data
|
||||
*/
|
||||
default boolean hasNbtData() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the object's NBT data (tile entity data). The returned tag, if
|
||||
* modified in any way, should be sent to {@link #setNbtData(CompoundTag)}
|
||||
* so that the instance knows of the changes. Making changes without
|
||||
* calling {@link #setNbtData(CompoundTag)} could have unintended
|
||||
* consequences.
|
||||
*
|
||||
* <p>{@link #hasNbtData()} must return true if and only if method does
|
||||
* not return null.</p>
|
||||
*
|
||||
* @return compound tag, or null
|
||||
*/
|
||||
@Nullable
|
||||
default CompoundTag getNbtData() {
|
||||
return getBlockType().getMaterial().isTile() ? getBlockType().getMaterial().getDefaultTile() : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the object's NBT data (tile entity data).
|
||||
*
|
||||
* @param nbtData NBT data, or null if no data
|
||||
*/
|
||||
default void setNbtData(@Nullable CompoundTag nbtData) {
|
||||
throw new UnsupportedOperationException("State is immutable");
|
||||
}
|
||||
|
||||
default BaseBlock toBaseBlock(ITileInput input, int x, int y, int z) {
|
||||
throw new UnsupportedOperationException("State is immutable");
|
||||
}
|
||||
|
@ -353,7 +353,7 @@ public class BlockType implements Keyed, Pattern {
|
||||
}
|
||||
|
||||
@Override
|
||||
public BaseBlock apply(BlockVector3 position) {
|
||||
public BaseBlock applyBlock(BlockVector3 position) {
|
||||
return this.getDefaultState().toBaseBlock();
|
||||
}
|
||||
|
||||
|
@ -19,9 +19,9 @@
|
||||
|
||||
package com.sk89q.worldedit.world.block;
|
||||
|
||||
import com.boydti.fawe.command.SuggestInputParseException;
|
||||
import com.boydti.fawe.object.string.JoinedCharSequence;
|
||||
import com.boydti.fawe.util.StringMan;
|
||||
import com.fastasyncworldedit.core.command.SuggestInputParseException;
|
||||
import com.fastasyncworldedit.core.object.string.JoinedCharSequence;
|
||||
import com.fastasyncworldedit.core.util.StringMan;
|
||||
import com.sk89q.worldedit.extension.input.InputParseException;
|
||||
import com.sk89q.worldedit.world.registry.LegacyMapper;
|
||||
|
||||
@ -59,6 +59,8 @@ public final class BlockTypes {
|
||||
@Nullable public static final BlockType ACTIVATOR_RAIL = init();
|
||||
@Nullable public static final BlockType AIR = init();
|
||||
@Nullable public static final BlockType ALLIUM = init();
|
||||
@Nullable public static final BlockType AMETHYST_BLOCK = init();
|
||||
@Nullable public static final BlockType AMETHYST_CLUSTER = init();
|
||||
@Nullable public static final BlockType ANCIENT_DEBRIS = init();
|
||||
@Nullable public static final BlockType ANDESITE = init();
|
||||
@Nullable public static final BlockType ANDESITE_SLAB = init();
|
||||
@ -67,6 +69,8 @@ public final class BlockTypes {
|
||||
@Nullable public static final BlockType ANVIL = init();
|
||||
@Nullable public static final BlockType ATTACHED_MELON_STEM = init();
|
||||
@Nullable public static final BlockType ATTACHED_PUMPKIN_STEM = init();
|
||||
@Nullable public static final BlockType AZALEA = init();
|
||||
@Nullable public static final BlockType AZALEA_LEAVES = init();
|
||||
@Nullable public static final BlockType AZURE_BLUET = init();
|
||||
@Nullable public static final BlockType BAMBOO = init();
|
||||
@Nullable public static final BlockType BAMBOO_SAPLING = init();
|
||||
@ -79,6 +83,8 @@ public final class BlockTypes {
|
||||
@Nullable public static final BlockType BEEHIVE = init();
|
||||
@Nullable public static final BlockType BEETROOTS = init();
|
||||
@Nullable public static final BlockType BELL = init();
|
||||
@Nullable public static final BlockType BIG_DRIPLEAF = init();
|
||||
@Nullable public static final BlockType BIG_DRIPLEAF_STEM = init();
|
||||
@Nullable public static final BlockType BIRCH_BUTTON = init();
|
||||
@Nullable public static final BlockType BIRCH_DOOR = init();
|
||||
@Nullable public static final BlockType BIRCH_FENCE = init();
|
||||
@ -96,6 +102,8 @@ public final class BlockTypes {
|
||||
@Nullable public static final BlockType BIRCH_WOOD = init();
|
||||
@Nullable public static final BlockType BLACK_BANNER = init();
|
||||
@Nullable public static final BlockType BLACK_BED = init();
|
||||
@Nullable public static final BlockType BLACK_CANDLE = init();
|
||||
@Nullable public static final BlockType BLACK_CANDLE_CAKE = init();
|
||||
@Nullable public static final BlockType BLACK_CARPET = init();
|
||||
@Nullable public static final BlockType BLACK_CONCRETE = init();
|
||||
@Nullable public static final BlockType BLACK_CONCRETE_POWDER = init();
|
||||
@ -113,6 +121,8 @@ public final class BlockTypes {
|
||||
@Nullable public static final BlockType BLAST_FURNACE = init();
|
||||
@Nullable public static final BlockType BLUE_BANNER = init();
|
||||
@Nullable public static final BlockType BLUE_BED = init();
|
||||
@Nullable public static final BlockType BLUE_CANDLE = init();
|
||||
@Nullable public static final BlockType BLUE_CANDLE_CAKE = init();
|
||||
@Nullable public static final BlockType BLUE_CARPET = init();
|
||||
@Nullable public static final BlockType BLUE_CONCRETE = init();
|
||||
@Nullable public static final BlockType BLUE_CONCRETE_POWDER = init();
|
||||
@ -138,6 +148,8 @@ public final class BlockTypes {
|
||||
@Nullable public static final BlockType BRICKS = init();
|
||||
@Nullable public static final BlockType BROWN_BANNER = init();
|
||||
@Nullable public static final BlockType BROWN_BED = init();
|
||||
@Nullable public static final BlockType BROWN_CANDLE = init();
|
||||
@Nullable public static final BlockType BROWN_CANDLE_CAKE = init();
|
||||
@Nullable public static final BlockType BROWN_CARPET = init();
|
||||
@Nullable public static final BlockType BROWN_CONCRETE = init();
|
||||
@Nullable public static final BlockType BROWN_CONCRETE_POWDER = init();
|
||||
@ -155,18 +167,25 @@ public final class BlockTypes {
|
||||
@Nullable public static final BlockType BUBBLE_CORAL_BLOCK = init();
|
||||
@Nullable public static final BlockType BUBBLE_CORAL_FAN = init();
|
||||
@Nullable public static final BlockType BUBBLE_CORAL_WALL_FAN = init();
|
||||
@Nullable public static final BlockType BUDDING_AMETHYST = init();
|
||||
@Nullable public static final BlockType CACTUS = init();
|
||||
@Nullable public static final BlockType CAKE = init();
|
||||
@Nullable public static final BlockType CALCITE = init();
|
||||
@Nullable public static final BlockType CAMPFIRE = init();
|
||||
@Nullable public static final BlockType CANDLE = init();
|
||||
@Nullable public static final BlockType CANDLE_CAKE = init();
|
||||
@Nullable public static final BlockType CARROTS = init();
|
||||
@Nullable public static final BlockType CARTOGRAPHY_TABLE = init();
|
||||
@Nullable public static final BlockType CARVED_PUMPKIN = init();
|
||||
@Nullable public static final BlockType CAULDRON = init();
|
||||
@Nullable public static final BlockType CAVE_AIR = init();
|
||||
@Nullable public static final BlockType CAVE_VINES = init();
|
||||
@Nullable public static final BlockType CAVE_VINES_PLANT = init();
|
||||
@Nullable public static final BlockType CHAIN = init();
|
||||
@Nullable public static final BlockType CHAIN_COMMAND_BLOCK = init();
|
||||
@Nullable public static final BlockType CHEST = init();
|
||||
@Nullable public static final BlockType CHIPPED_ANVIL = init();
|
||||
@Nullable public static final BlockType CHISELED_DEEPSLATE = init();
|
||||
@Nullable public static final BlockType CHISELED_NETHER_BRICKS = init();
|
||||
@Nullable public static final BlockType CHISELED_POLISHED_BLACKSTONE = init();
|
||||
@Nullable public static final BlockType CHISELED_QUARTZ_BLOCK = init();
|
||||
@ -179,6 +198,10 @@ public final class BlockTypes {
|
||||
@Nullable public static final BlockType COAL_BLOCK = init();
|
||||
@Nullable public static final BlockType COAL_ORE = init();
|
||||
@Nullable public static final BlockType COARSE_DIRT = init();
|
||||
@Nullable public static final BlockType COBBLED_DEEPSLATE = init();
|
||||
@Nullable public static final BlockType COBBLED_DEEPSLATE_SLAB = init();
|
||||
@Nullable public static final BlockType COBBLED_DEEPSLATE_STAIRS = init();
|
||||
@Nullable public static final BlockType COBBLED_DEEPSLATE_WALL = init();
|
||||
@Nullable public static final BlockType COBBLESTONE = init();
|
||||
@Nullable public static final BlockType COBBLESTONE_SLAB = init();
|
||||
@Nullable public static final BlockType COBBLESTONE_STAIRS = init();
|
||||
@ -189,7 +212,11 @@ public final class BlockTypes {
|
||||
@Nullable public static final BlockType COMPARATOR = init();
|
||||
@Nullable public static final BlockType COMPOSTER = init();
|
||||
@Nullable public static final BlockType CONDUIT = init();
|
||||
@Nullable public static final BlockType COPPER_BLOCK = init();
|
||||
@Nullable public static final BlockType COPPER_ORE = init();
|
||||
@Nullable public static final BlockType CORNFLOWER = init();
|
||||
@Nullable public static final BlockType CRACKED_DEEPSLATE_BRICKS = init();
|
||||
@Nullable public static final BlockType CRACKED_DEEPSLATE_TILES = init();
|
||||
@Nullable public static final BlockType CRACKED_NETHER_BRICKS = init();
|
||||
@Nullable public static final BlockType CRACKED_POLISHED_BLACKSTONE_BRICKS = init();
|
||||
@Nullable public static final BlockType CRACKED_STONE_BRICKS = init();
|
||||
@ -213,12 +240,17 @@ public final class BlockTypes {
|
||||
@Nullable public static final BlockType CRIMSON_TRAPDOOR = init();
|
||||
@Nullable public static final BlockType CRIMSON_WALL_SIGN = init();
|
||||
@Nullable public static final BlockType CRYING_OBSIDIAN = init();
|
||||
@Nullable public static final BlockType CUT_COPPER = init();
|
||||
@Nullable public static final BlockType CUT_COPPER_SLAB = init();
|
||||
@Nullable public static final BlockType CUT_COPPER_STAIRS = init();
|
||||
@Nullable public static final BlockType CUT_RED_SANDSTONE = init();
|
||||
@Nullable public static final BlockType CUT_RED_SANDSTONE_SLAB = init();
|
||||
@Nullable public static final BlockType CUT_SANDSTONE = init();
|
||||
@Nullable public static final BlockType CUT_SANDSTONE_SLAB = init();
|
||||
@Nullable public static final BlockType CYAN_BANNER = init();
|
||||
@Nullable public static final BlockType CYAN_BED = init();
|
||||
@Nullable public static final BlockType CYAN_CANDLE = init();
|
||||
@Nullable public static final BlockType CYAN_CANDLE_CAKE = init();
|
||||
@Nullable public static final BlockType CYAN_CARPET = init();
|
||||
@Nullable public static final BlockType CYAN_CONCRETE = init();
|
||||
@Nullable public static final BlockType CYAN_CONCRETE_POWDER = init();
|
||||
@ -271,6 +303,23 @@ public final class BlockTypes {
|
||||
@Nullable public static final BlockType DEAD_TUBE_CORAL_BLOCK = init();
|
||||
@Nullable public static final BlockType DEAD_TUBE_CORAL_FAN = init();
|
||||
@Nullable public static final BlockType DEAD_TUBE_CORAL_WALL_FAN = init();
|
||||
@Nullable public static final BlockType DEEPSLATE = init();
|
||||
@Nullable public static final BlockType DEEPSLATE_BRICK_SLAB = init();
|
||||
@Nullable public static final BlockType DEEPSLATE_BRICK_STAIRS = init();
|
||||
@Nullable public static final BlockType DEEPSLATE_BRICK_WALL = init();
|
||||
@Nullable public static final BlockType DEEPSLATE_BRICKS = init();
|
||||
@Nullable public static final BlockType DEEPSLATE_COAL_ORE = init();
|
||||
@Nullable public static final BlockType DEEPSLATE_COPPER_ORE = init();
|
||||
@Nullable public static final BlockType DEEPSLATE_DIAMOND_ORE = init();
|
||||
@Nullable public static final BlockType DEEPSLATE_EMERALD_ORE = init();
|
||||
@Nullable public static final BlockType DEEPSLATE_GOLD_ORE = init();
|
||||
@Nullable public static final BlockType DEEPSLATE_IRON_ORE = init();
|
||||
@Nullable public static final BlockType DEEPSLATE_LAPIS_ORE = init();
|
||||
@Nullable public static final BlockType DEEPSLATE_REDSTONE_ORE = init();
|
||||
@Nullable public static final BlockType DEEPSLATE_TILE_SLAB = init();
|
||||
@Nullable public static final BlockType DEEPSLATE_TILE_STAIRS = init();
|
||||
@Nullable public static final BlockType DEEPSLATE_TILE_WALL = init();
|
||||
@Nullable public static final BlockType DEEPSLATE_TILES = init();
|
||||
@Nullable public static final BlockType DETECTOR_RAIL = init();
|
||||
@Nullable public static final BlockType DIAMOND_BLOCK = init();
|
||||
@Nullable public static final BlockType DIAMOND_ORE = init();
|
||||
@ -279,11 +328,13 @@ public final class BlockTypes {
|
||||
@Nullable public static final BlockType DIORITE_STAIRS = init();
|
||||
@Nullable public static final BlockType DIORITE_WALL = init();
|
||||
@Nullable public static final BlockType DIRT = init();
|
||||
@Nullable public static final BlockType DIRT_PATH = init();
|
||||
@Nullable public static final BlockType DISPENSER = init();
|
||||
@Nullable public static final BlockType DRAGON_EGG = init();
|
||||
@Nullable public static final BlockType DRAGON_HEAD = init();
|
||||
@Nullable public static final BlockType DRAGON_WALL_HEAD = init();
|
||||
@Nullable public static final BlockType DRIED_KELP_BLOCK = init();
|
||||
@Nullable public static final BlockType DRIPSTONE_BLOCK = init();
|
||||
@Nullable public static final BlockType DROPPER = init();
|
||||
@Nullable public static final BlockType EMERALD_BLOCK = init();
|
||||
@Nullable public static final BlockType EMERALD_ORE = init();
|
||||
@ -297,7 +348,11 @@ public final class BlockTypes {
|
||||
@Nullable public static final BlockType END_STONE_BRICK_STAIRS = init();
|
||||
@Nullable public static final BlockType END_STONE_BRICK_WALL = init();
|
||||
@Nullable public static final BlockType END_STONE_BRICKS = init();
|
||||
@Nullable public static final BlockType EXPOSED_COPPER = init();
|
||||
@Nullable public static final BlockType ENDER_CHEST = init();
|
||||
@Nullable public static final BlockType EXPOSED_CUT_COPPER = init();
|
||||
@Nullable public static final BlockType EXPOSED_CUT_COPPER_SLAB = init();
|
||||
@Nullable public static final BlockType EXPOSED_CUT_COPPER_STAIRS = init();
|
||||
@Nullable public static final BlockType FARMLAND = init();
|
||||
@Nullable public static final BlockType FERN = init();
|
||||
@Nullable public static final BlockType FIRE = init();
|
||||
@ -307,11 +362,14 @@ public final class BlockTypes {
|
||||
@Nullable public static final BlockType FIRE_CORAL_WALL_FAN = init();
|
||||
@Nullable public static final BlockType FLETCHING_TABLE = init();
|
||||
@Nullable public static final BlockType FLOWER_POT = init();
|
||||
@Nullable public static final BlockType FLOWERING_AZALEA = init();
|
||||
@Nullable public static final BlockType FLOWERING_AZALEA_LEAVES = init();
|
||||
@Nullable public static final BlockType FROSTED_ICE = init();
|
||||
@Nullable public static final BlockType FURNACE = init();
|
||||
@Nullable public static final BlockType GILDED_BLACKSTONE = init();
|
||||
@Nullable public static final BlockType GLASS = init();
|
||||
@Nullable public static final BlockType GLASS_PANE = init();
|
||||
@Nullable public static final BlockType GLOW_LICHEN = init();
|
||||
@Nullable public static final BlockType GLOWSTONE = init();
|
||||
@Nullable public static final BlockType GOLD_BLOCK = init();
|
||||
@Nullable public static final BlockType GOLD_ORE = init();
|
||||
@ -321,10 +379,12 @@ public final class BlockTypes {
|
||||
@Nullable public static final BlockType GRANITE_WALL = init();
|
||||
@Nullable public static final BlockType GRASS = init();
|
||||
@Nullable public static final BlockType GRASS_BLOCK = init();
|
||||
@Nullable public static final BlockType GRASS_PATH = init();
|
||||
@Deprecated @Nullable public static final BlockType GRASS_PATH = init();
|
||||
@Nullable public static final BlockType GRAVEL = init();
|
||||
@Nullable public static final BlockType GRAY_BANNER = init();
|
||||
@Nullable public static final BlockType GRAY_BED = init();
|
||||
@Nullable public static final BlockType GREEN_CANDLE = init();
|
||||
@Nullable public static final BlockType GREEN_CANDLE_CAKE = init();
|
||||
@Nullable public static final BlockType GRAY_CARPET = init();
|
||||
@Nullable public static final BlockType GRAY_CONCRETE = init();
|
||||
@Nullable public static final BlockType GRAY_CONCRETE_POWDER = init();
|
||||
@ -348,6 +408,7 @@ public final class BlockTypes {
|
||||
@Nullable public static final BlockType GREEN_WALL_BANNER = init();
|
||||
@Nullable public static final BlockType GREEN_WOOL = init();
|
||||
@Nullable public static final BlockType GRINDSTONE = init();
|
||||
@Nullable public static final BlockType HANGING_ROOTS = init();
|
||||
@Nullable public static final BlockType HAY_BLOCK = init();
|
||||
@Nullable public static final BlockType HEAVY_WEIGHTED_PRESSURE_PLATE = init();
|
||||
@Nullable public static final BlockType HONEY_BLOCK = init();
|
||||
@ -361,6 +422,7 @@ public final class BlockTypes {
|
||||
@Nullable public static final BlockType INFESTED_CHISELED_STONE_BRICKS = init();
|
||||
@Nullable public static final BlockType INFESTED_COBBLESTONE = init();
|
||||
@Nullable public static final BlockType INFESTED_CRACKED_STONE_BRICKS = init();
|
||||
@Nullable public static final BlockType INFESTED_DEEPSLATE = init();
|
||||
@Nullable public static final BlockType INFESTED_MOSSY_STONE_BRICKS = init();
|
||||
@Nullable public static final BlockType INFESTED_STONE = init();
|
||||
@Nullable public static final BlockType INFESTED_STONE_BRICKS = init();
|
||||
@ -393,12 +455,17 @@ public final class BlockTypes {
|
||||
@Nullable public static final BlockType LANTERN = init();
|
||||
@Nullable public static final BlockType LAPIS_BLOCK = init();
|
||||
@Nullable public static final BlockType LAPIS_ORE = init();
|
||||
@Nullable public static final BlockType LARGE_AMETHYST_BUD = init();
|
||||
@Nullable public static final BlockType LARGE_FERN = init();
|
||||
@Nullable public static final BlockType LAVA = init();
|
||||
@Nullable public static final BlockType LAVA_CAULDRON = init();
|
||||
@Nullable public static final BlockType LECTERN = init();
|
||||
@Nullable public static final BlockType LEVER = init();
|
||||
@Nullable public static final BlockType LIGHT = init();
|
||||
@Nullable public static final BlockType LIGHT_BLUE_BANNER = init();
|
||||
@Nullable public static final BlockType LIGHT_BLUE_BED = init();
|
||||
@Nullable public static final BlockType LIGHT_BLUE_CANDLE = init();
|
||||
@Nullable public static final BlockType LIGHT_BLUE_CANDLE_CAKE = init();
|
||||
@Nullable public static final BlockType LIGHT_BLUE_CARPET = init();
|
||||
@Nullable public static final BlockType LIGHT_BLUE_CONCRETE = init();
|
||||
@Nullable public static final BlockType LIGHT_BLUE_CONCRETE_POWDER = init();
|
||||
@ -411,6 +478,8 @@ public final class BlockTypes {
|
||||
@Nullable public static final BlockType LIGHT_BLUE_WOOL = init();
|
||||
@Nullable public static final BlockType LIGHT_GRAY_BANNER = init();
|
||||
@Nullable public static final BlockType LIGHT_GRAY_BED = init();
|
||||
@Nullable public static final BlockType LIGHT_GRAY_CANDLE = init();
|
||||
@Nullable public static final BlockType LIGHT_GRAY_CANDLE_CAKE = init();
|
||||
@Nullable public static final BlockType LIGHT_GRAY_CARPET = init();
|
||||
@Nullable public static final BlockType LIGHT_GRAY_CONCRETE = init();
|
||||
@Nullable public static final BlockType LIGHT_GRAY_CONCRETE_POWDER = init();
|
||||
@ -422,11 +491,14 @@ public final class BlockTypes {
|
||||
@Nullable public static final BlockType LIGHT_GRAY_WALL_BANNER = init();
|
||||
@Nullable public static final BlockType LIGHT_GRAY_WOOL = init();
|
||||
@Nullable public static final BlockType LIGHT_WEIGHTED_PRESSURE_PLATE = init();
|
||||
@Nullable public static final BlockType LIGHTNING_ROD = init();
|
||||
@Nullable public static final BlockType LILAC = init();
|
||||
@Nullable public static final BlockType LILY_OF_THE_VALLEY = init();
|
||||
@Nullable public static final BlockType LILY_PAD = init();
|
||||
@Nullable public static final BlockType LIME_BANNER = init();
|
||||
@Nullable public static final BlockType LIME_BED = init();
|
||||
@Nullable public static final BlockType LIME_CANDLE = init();
|
||||
@Nullable public static final BlockType LIME_CANDLE_CAKE = init();
|
||||
@Nullable public static final BlockType LIME_CARPET = init();
|
||||
@Nullable public static final BlockType LIME_CONCRETE = init();
|
||||
@Nullable public static final BlockType LIME_CONCRETE_POWDER = init();
|
||||
@ -441,6 +513,8 @@ public final class BlockTypes {
|
||||
@Nullable public static final BlockType LOOM = init();
|
||||
@Nullable public static final BlockType MAGENTA_BANNER = init();
|
||||
@Nullable public static final BlockType MAGENTA_BED = init();
|
||||
@Nullable public static final BlockType MAGENTA_CANDLE = init();
|
||||
@Nullable public static final BlockType MAGENTA_CANDLE_CAKE = init();
|
||||
@Nullable public static final BlockType MAGENTA_CARPET = init();
|
||||
@Nullable public static final BlockType MAGENTA_CONCRETE = init();
|
||||
@Nullable public static final BlockType MAGENTA_CONCRETE_POWDER = init();
|
||||
@ -452,8 +526,11 @@ public final class BlockTypes {
|
||||
@Nullable public static final BlockType MAGENTA_WALL_BANNER = init();
|
||||
@Nullable public static final BlockType MAGENTA_WOOL = init();
|
||||
@Nullable public static final BlockType MAGMA_BLOCK = init();
|
||||
@Nullable public static final BlockType MEDIUM_AMETHYST_BUD = init();
|
||||
@Nullable public static final BlockType MELON = init();
|
||||
@Nullable public static final BlockType MELON_STEM = init();
|
||||
@Nullable public static final BlockType MOSS_BLOCK = init();
|
||||
@Nullable public static final BlockType MOSS_CARPET = init();
|
||||
@Nullable public static final BlockType MOSSY_COBBLESTONE = init();
|
||||
@Nullable public static final BlockType MOSSY_COBBLESTONE_SLAB = init();
|
||||
@Nullable public static final BlockType MOSSY_COBBLESTONE_STAIRS = init();
|
||||
@ -498,6 +575,8 @@ public final class BlockTypes {
|
||||
@Nullable public static final BlockType OBSIDIAN = init();
|
||||
@Nullable public static final BlockType ORANGE_BANNER = init();
|
||||
@Nullable public static final BlockType ORANGE_BED = init();
|
||||
@Nullable public static final BlockType ORANGE_CANDLE = init();
|
||||
@Nullable public static final BlockType ORANGE_CANDLE_CAKE = init();
|
||||
@Nullable public static final BlockType ORANGE_CARPET = init();
|
||||
@Nullable public static final BlockType ORANGE_CONCRETE = init();
|
||||
@Nullable public static final BlockType ORANGE_CONCRETE_POWDER = init();
|
||||
@ -510,11 +589,17 @@ public final class BlockTypes {
|
||||
@Nullable public static final BlockType ORANGE_WALL_BANNER = init();
|
||||
@Nullable public static final BlockType ORANGE_WOOL = init();
|
||||
@Nullable public static final BlockType OXEYE_DAISY = init();
|
||||
@Nullable public static final BlockType OXIDIZED_COPPER = init();
|
||||
@Nullable public static final BlockType OXIDIZED_CUT_COPPER = init();
|
||||
@Nullable public static final BlockType OXIDIZED_CUT_COPPER_SLAB = init();
|
||||
@Nullable public static final BlockType OXIDIZED_CUT_COPPER_STAIRS = init();
|
||||
@Nullable public static final BlockType PACKED_ICE = init();
|
||||
@Nullable public static final BlockType PEONY = init();
|
||||
@Nullable public static final BlockType PETRIFIED_OAK_SLAB = init();
|
||||
@Nullable public static final BlockType PINK_BANNER = init();
|
||||
@Nullable public static final BlockType PINK_BED = init();
|
||||
@Nullable public static final BlockType PINK_CANDLE = init();
|
||||
@Nullable public static final BlockType PINK_CANDLE_CAKE = init();
|
||||
@Nullable public static final BlockType PINK_CARPET = init();
|
||||
@Nullable public static final BlockType PINK_CONCRETE = init();
|
||||
@Nullable public static final BlockType PINK_CONCRETE_POWDER = init();
|
||||
@ -531,6 +616,7 @@ public final class BlockTypes {
|
||||
@Nullable public static final BlockType PLAYER_HEAD = init();
|
||||
@Nullable public static final BlockType PLAYER_WALL_HEAD = init();
|
||||
@Nullable public static final BlockType PODZOL = init();
|
||||
@Nullable public static final BlockType POINTED_DRIPSTONE = init();
|
||||
@Nullable public static final BlockType POLISHED_ANDESITE = init();
|
||||
@Nullable public static final BlockType POLISHED_ANDESITE_SLAB = init();
|
||||
@Nullable public static final BlockType POLISHED_ANDESITE_STAIRS = init();
|
||||
@ -545,6 +631,10 @@ public final class BlockTypes {
|
||||
@Nullable public static final BlockType POLISHED_BLACKSTONE_SLAB = init();
|
||||
@Nullable public static final BlockType POLISHED_BLACKSTONE_STAIRS = init();
|
||||
@Nullable public static final BlockType POLISHED_BLACKSTONE_WALL = init();
|
||||
@Nullable public static final BlockType POLISHED_DEEPSLATE = init();
|
||||
@Nullable public static final BlockType POLISHED_DEEPSLATE_SLAB = init();
|
||||
@Nullable public static final BlockType POLISHED_DEEPSLATE_STAIRS = init();
|
||||
@Nullable public static final BlockType POLISHED_DEEPSLATE_WALL = init();
|
||||
@Nullable public static final BlockType POLISHED_DIORITE = init();
|
||||
@Nullable public static final BlockType POLISHED_DIORITE_SLAB = init();
|
||||
@Nullable public static final BlockType POLISHED_DIORITE_STAIRS = init();
|
||||
@ -555,6 +645,7 @@ public final class BlockTypes {
|
||||
@Nullable public static final BlockType POTATOES = init();
|
||||
@Nullable public static final BlockType POTTED_ACACIA_SAPLING = init();
|
||||
@Nullable public static final BlockType POTTED_ALLIUM = init();
|
||||
@Nullable public static final BlockType POTTED_AZALEA_BUSH = init();
|
||||
@Nullable public static final BlockType POTTED_AZURE_BLUET = init();
|
||||
@Nullable public static final BlockType POTTED_BAMBOO = init();
|
||||
@Nullable public static final BlockType POTTED_BIRCH_SAPLING = init();
|
||||
@ -568,6 +659,7 @@ public final class BlockTypes {
|
||||
@Nullable public static final BlockType POTTED_DARK_OAK_SAPLING = init();
|
||||
@Nullable public static final BlockType POTTED_DEAD_BUSH = init();
|
||||
@Nullable public static final BlockType POTTED_FERN = init();
|
||||
@Nullable public static final BlockType POTTED_FLOWERING_AZALEA_BUSH = init();
|
||||
@Nullable public static final BlockType POTTED_JUNGLE_SAPLING = init();
|
||||
@Nullable public static final BlockType POTTED_LILY_OF_THE_VALLEY = init();
|
||||
@Nullable public static final BlockType POTTED_OAK_SAPLING = init();
|
||||
@ -582,6 +674,8 @@ public final class BlockTypes {
|
||||
@Nullable public static final BlockType POTTED_WARPED_ROOTS = init();
|
||||
@Nullable public static final BlockType POTTED_WHITE_TULIP = init();
|
||||
@Nullable public static final BlockType POTTED_WITHER_ROSE = init();
|
||||
@Nullable public static final BlockType POWDER_SNOW = init();
|
||||
@Nullable public static final BlockType POWDER_SNOW_CAULDRON = init();
|
||||
@Nullable public static final BlockType POWERED_RAIL = init();
|
||||
@Nullable public static final BlockType PRISMARINE = init();
|
||||
@Nullable public static final BlockType PRISMARINE_BRICK_SLAB = init();
|
||||
@ -594,6 +688,8 @@ public final class BlockTypes {
|
||||
@Nullable public static final BlockType PUMPKIN_STEM = init();
|
||||
@Nullable public static final BlockType PURPLE_BANNER = init();
|
||||
@Nullable public static final BlockType PURPLE_BED = init();
|
||||
@Nullable public static final BlockType PURPLE_CANDLE = init();
|
||||
@Nullable public static final BlockType PURPLE_CANDLE_CAKE = init();
|
||||
@Nullable public static final BlockType PURPLE_CARPET = init();
|
||||
@Nullable public static final BlockType PURPLE_CONCRETE = init();
|
||||
@Nullable public static final BlockType PURPLE_CONCRETE_POWDER = init();
|
||||
@ -614,8 +710,13 @@ public final class BlockTypes {
|
||||
@Nullable public static final BlockType QUARTZ_SLAB = init();
|
||||
@Nullable public static final BlockType QUARTZ_STAIRS = init();
|
||||
@Nullable public static final BlockType RAIL = init();
|
||||
@Nullable public static final BlockType RAW_COPPER_BLOCK = init();
|
||||
@Nullable public static final BlockType RAW_GOLD_BLOCK = init();
|
||||
@Nullable public static final BlockType RAW_IRON_BLOCK = init();
|
||||
@Nullable public static final BlockType RED_BANNER = init();
|
||||
@Nullable public static final BlockType RED_BED = init();
|
||||
@Nullable public static final BlockType RED_CANDLE = init();
|
||||
@Nullable public static final BlockType RED_CANDLE_CAKE = init();
|
||||
@Nullable public static final BlockType RED_CARPET = init();
|
||||
@Nullable public static final BlockType RED_CONCRETE = init();
|
||||
@Nullable public static final BlockType RED_CONCRETE_POWDER = init();
|
||||
@ -647,6 +748,7 @@ public final class BlockTypes {
|
||||
@Nullable public static final BlockType REPEATER = init();
|
||||
@Nullable public static final BlockType REPEATING_COMMAND_BLOCK = init();
|
||||
@Nullable public static final BlockType RESPAWN_ANCHOR = init();
|
||||
@Nullable public static final BlockType ROOTED_DIRT = init();
|
||||
@Nullable public static final BlockType ROSE_BUSH = init();
|
||||
@Nullable public static final BlockType SAND = init();
|
||||
@Nullable public static final BlockType SANDSTONE = init();
|
||||
@ -654,6 +756,7 @@ public final class BlockTypes {
|
||||
@Nullable public static final BlockType SANDSTONE_STAIRS = init();
|
||||
@Nullable public static final BlockType SANDSTONE_WALL = init();
|
||||
@Nullable public static final BlockType SCAFFOLDING = init();
|
||||
@Nullable public static final BlockType SCULK_SENSOR = init();
|
||||
@Nullable public static final BlockType SEA_LANTERN = init();
|
||||
@Nullable public static final BlockType SEA_PICKLE = init();
|
||||
@Nullable public static final BlockType SEAGRASS = init();
|
||||
@ -663,8 +766,11 @@ public final class BlockTypes {
|
||||
@Nullable public static final BlockType SKELETON_SKULL = init();
|
||||
@Nullable public static final BlockType SKELETON_WALL_SKULL = init();
|
||||
@Nullable public static final BlockType SLIME_BLOCK = init();
|
||||
@Nullable public static final BlockType SMALL_AMETHYST_BUD = init();
|
||||
@Nullable public static final BlockType SMALL_DRIPLEAF = init();
|
||||
@Nullable public static final BlockType SMITHING_TABLE = init();
|
||||
@Nullable public static final BlockType SMOKER = init();
|
||||
@Nullable public static final BlockType SMOOTH_BASALT = init();
|
||||
@Nullable public static final BlockType SMOOTH_QUARTZ = init();
|
||||
@Nullable public static final BlockType SMOOTH_QUARTZ_SLAB = init();
|
||||
@Nullable public static final BlockType SMOOTH_QUARTZ_STAIRS = init();
|
||||
@ -687,6 +793,7 @@ public final class BlockTypes {
|
||||
@Nullable public static final BlockType SOUL_WALL_TORCH = init();
|
||||
@Nullable public static final BlockType SPAWNER = init();
|
||||
@Nullable public static final BlockType SPONGE = init();
|
||||
@Nullable public static final BlockType SPORE_BLOSSOM = init();
|
||||
@Nullable public static final BlockType SPRUCE_BUTTON = init();
|
||||
@Nullable public static final BlockType SPRUCE_DOOR = init();
|
||||
@Nullable public static final BlockType SPRUCE_FENCE = init();
|
||||
@ -738,6 +845,7 @@ public final class BlockTypes {
|
||||
@Nullable public static final BlockType TALL_SEAGRASS = init();
|
||||
@Nullable public static final BlockType TARGET = init();
|
||||
@Nullable public static final BlockType TERRACOTTA = init();
|
||||
@Nullable public static final BlockType TINTED_GLASS = init();
|
||||
@Nullable public static final BlockType TNT = init();
|
||||
@Nullable public static final BlockType TORCH = init();
|
||||
@Nullable public static final BlockType TRAPPED_CHEST = init();
|
||||
@ -747,6 +855,7 @@ public final class BlockTypes {
|
||||
@Nullable public static final BlockType TUBE_CORAL_BLOCK = init();
|
||||
@Nullable public static final BlockType TUBE_CORAL_FAN = init();
|
||||
@Nullable public static final BlockType TUBE_CORAL_WALL_FAN = init();
|
||||
@Nullable public static final BlockType TUFF = init();
|
||||
@Nullable public static final BlockType TURTLE_EGG = init();
|
||||
@Nullable public static final BlockType TWISTING_VINES = init();
|
||||
@Nullable public static final BlockType TWISTING_VINES_PLANT = init();
|
||||
@ -772,12 +881,35 @@ public final class BlockTypes {
|
||||
@Nullable public static final BlockType WARPED_WALL_SIGN = init();
|
||||
@Nullable public static final BlockType WARPED_WART_BLOCK = init();
|
||||
@Nullable public static final BlockType WATER = init();
|
||||
@Nullable public static final BlockType WATER_CAULDRON = init();
|
||||
@Nullable public static final BlockType WAXED_COPPER_BLOCK = init();
|
||||
@Nullable public static final BlockType WAXED_CUT_COPPER = init();
|
||||
@Nullable public static final BlockType WAXED_CUT_COPPER_SLAB = init();
|
||||
@Nullable public static final BlockType WAXED_CUT_COPPER_STAIRS = init();
|
||||
@Nullable public static final BlockType WAXED_EXPOSED_COPPER = init();
|
||||
@Nullable public static final BlockType WAXED_EXPOSED_CUT_COPPER = init();
|
||||
@Nullable public static final BlockType WAXED_EXPOSED_CUT_COPPER_SLAB = init();
|
||||
@Nullable public static final BlockType WAXED_EXPOSED_CUT_COPPER_STAIRS = init();
|
||||
@Nullable public static final BlockType WAXED_OXIDIZED_COPPER = init();
|
||||
@Nullable public static final BlockType WAXED_OXIDIZED_CUT_COPPER = init();
|
||||
@Nullable public static final BlockType WAXED_OXIDIZED_CUT_COPPER_SLAB = init();
|
||||
@Nullable public static final BlockType WAXED_OXIDIZED_CUT_COPPER_STAIRS = init();
|
||||
@Nullable public static final BlockType WAXED_WEATHERED_COPPER = init();
|
||||
@Nullable public static final BlockType WAXED_WEATHERED_CUT_COPPER = init();
|
||||
@Nullable public static final BlockType WAXED_WEATHERED_CUT_COPPER_SLAB = init();
|
||||
@Nullable public static final BlockType WAXED_WEATHERED_CUT_COPPER_STAIRS = init();
|
||||
@Nullable public static final BlockType WEATHERED_COPPER = init();
|
||||
@Nullable public static final BlockType WEATHERED_CUT_COPPER = init();
|
||||
@Nullable public static final BlockType WEATHERED_CUT_COPPER_SLAB = init();
|
||||
@Nullable public static final BlockType WEEPING_VINES = init();
|
||||
@Nullable public static final BlockType WEATHERED_CUT_COPPER_STAIRS = init();
|
||||
@Nullable public static final BlockType WEEPING_VINES_PLANT = init();
|
||||
@Nullable public static final BlockType WET_SPONGE = init();
|
||||
@Nullable public static final BlockType WHEAT = init();
|
||||
@Nullable public static final BlockType WHITE_BANNER = init();
|
||||
@Nullable public static final BlockType WHITE_BED = init();
|
||||
@Nullable public static final BlockType WHITE_CANDLE = init();
|
||||
@Nullable public static final BlockType WHITE_CANDLE_CAKE = init();
|
||||
@Nullable public static final BlockType WHITE_CARPET = init();
|
||||
@Nullable public static final BlockType WHITE_CONCRETE = init();
|
||||
@Nullable public static final BlockType WHITE_CONCRETE_POWDER = init();
|
||||
@ -794,6 +926,8 @@ public final class BlockTypes {
|
||||
@Nullable public static final BlockType WITHER_SKELETON_WALL_SKULL = init();
|
||||
@Nullable public static final BlockType YELLOW_BANNER = init();
|
||||
@Nullable public static final BlockType YELLOW_BED = init();
|
||||
@Nullable public static final BlockType YELLOW_CANDLE = init();
|
||||
@Nullable public static final BlockType YELLOW_CANDLE_CAKE = init();
|
||||
@Nullable public static final BlockType YELLOW_CARPET = init();
|
||||
@Nullable public static final BlockType YELLOW_CONCRETE = init();
|
||||
@Nullable public static final BlockType YELLOW_CONCRETE_POWDER = init();
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.sk89q.worldedit.world.block;
|
||||
|
||||
import com.boydti.fawe.util.MathMan;
|
||||
import com.fastasyncworldedit.core.util.MathMan;
|
||||
import com.google.common.primitives.Booleans;
|
||||
import com.sk89q.jnbt.CompoundTag;
|
||||
import com.sk89q.worldedit.WorldEdit;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.sk89q.worldedit.world.block;
|
||||
|
||||
import com.boydti.fawe.beta.ITileInput;
|
||||
import com.fastasyncworldedit.core.beta.ITileInput;
|
||||
|
||||
public enum CompoundInput {
|
||||
NULL,
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
package com.sk89q.worldedit.world.block;
|
||||
|
||||
import com.sk89q.jnbt.CompoundTag;
|
||||
import com.sk89q.worldedit.registry.state.Property;
|
||||
import com.sk89q.worldedit.registry.state.PropertyKey;
|
||||
|
||||
@ -123,6 +124,12 @@ public class FuzzyBlockState extends BlockState {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Override
|
||||
public CompoundTag getNbtData() {
|
||||
return getBlockType().getMaterial().isTile() ? getBlockType().getMaterial().getDefaultTile() : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Builder for FuzzyBlockState
|
||||
*/
|
||||
|
@ -19,15 +19,15 @@
|
||||
|
||||
package com.sk89q.worldedit.world.chunk;
|
||||
|
||||
import com.sk89q.jnbt.ByteArrayTag;
|
||||
import com.sk89q.jnbt.ByteTag;
|
||||
import com.sk89q.jnbt.CompoundTag;
|
||||
import com.sk89q.jnbt.IntTag;
|
||||
import com.sk89q.jnbt.ListTag;
|
||||
import com.sk89q.jnbt.NBTUtils;
|
||||
import com.sk89q.jnbt.Tag;
|
||||
import com.sk89q.worldedit.WorldEdit;
|
||||
import com.sk89q.worldedit.math.BlockVector3;
|
||||
import com.sk89q.worldedit.util.nbt.BinaryTag;
|
||||
import com.sk89q.worldedit.util.nbt.BinaryTagTypes;
|
||||
import com.sk89q.worldedit.util.nbt.CompoundBinaryTag;
|
||||
import com.sk89q.worldedit.util.nbt.IntBinaryTag;
|
||||
import com.sk89q.worldedit.util.nbt.ListBinaryTag;
|
||||
import com.sk89q.worldedit.util.nbt.NbtUtils;
|
||||
import com.sk89q.worldedit.world.DataException;
|
||||
import com.sk89q.worldedit.world.block.BaseBlock;
|
||||
import com.sk89q.worldedit.world.block.BlockState;
|
||||
@ -36,20 +36,31 @@ import com.sk89q.worldedit.world.registry.LegacyMapper;
|
||||
import com.sk89q.worldedit.world.storage.InvalidFormatException;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class AnvilChunk implements Chunk {
|
||||
|
||||
private final CompoundTag rootTag;
|
||||
private final CompoundBinaryTag rootTag;
|
||||
private final byte[][] blocks;
|
||||
private final byte[][] blocksAdd;
|
||||
private final byte[][] data;
|
||||
private final int rootX;
|
||||
private final int rootZ;
|
||||
|
||||
private Map<BlockVector3, Map<String, Tag>> tileEntities;
|
||||
private Map<BlockVector3, CompoundBinaryTag> tileEntities;
|
||||
|
||||
|
||||
/**
|
||||
* Construct the chunk with a compound tag.
|
||||
*
|
||||
* @param tag the tag to read
|
||||
* @throws DataException on a data error
|
||||
* @deprecated Use {@link #AnvilChunk(CompoundBinaryTag)}
|
||||
*/
|
||||
public AnvilChunk(CompoundTag tag) throws DataException {
|
||||
this(tag.asBinaryTag());
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct the chunk with a compound tag.
|
||||
@ -57,42 +68,42 @@ public class AnvilChunk implements Chunk {
|
||||
* @param tag the tag to read
|
||||
* @throws DataException on a data error
|
||||
*/
|
||||
public AnvilChunk(CompoundTag tag) throws DataException {
|
||||
public AnvilChunk(CompoundBinaryTag tag) throws DataException {
|
||||
rootTag = tag;
|
||||
|
||||
rootX = NBTUtils.getChildTag(rootTag.getValue(), "xPos", IntTag.class).getValue();
|
||||
rootZ = NBTUtils.getChildTag(rootTag.getValue(), "zPos", IntTag.class).getValue();
|
||||
rootX = NbtUtils.getChildTag(rootTag, "xPos", BinaryTagTypes.INT).value();
|
||||
rootZ = NbtUtils.getChildTag(rootTag, "zPos", BinaryTagTypes.INT).value();
|
||||
|
||||
blocks = new byte[16][16 * 16 * 16];
|
||||
blocksAdd = new byte[16][16 * 16 * 8];
|
||||
data = new byte[16][16 * 16 * 8];
|
||||
|
||||
List<Tag> sections = NBTUtils.getChildTag(rootTag.getValue(), "Sections", ListTag.class).getValue();
|
||||
ListBinaryTag sections = NbtUtils.getChildTag(rootTag, "Sections", BinaryTagTypes.LIST);
|
||||
|
||||
for (Tag rawSectionTag : sections) {
|
||||
if (!(rawSectionTag instanceof CompoundTag)) {
|
||||
for (BinaryTag rawSectionTag : sections) {
|
||||
if (!(rawSectionTag instanceof CompoundBinaryTag)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
CompoundTag sectionTag = (CompoundTag) rawSectionTag;
|
||||
if (!sectionTag.getValue().containsKey("Y")) {
|
||||
CompoundBinaryTag sectionTag = (CompoundBinaryTag) rawSectionTag;
|
||||
if (sectionTag.get("Y") == null) {
|
||||
continue; // Empty section.
|
||||
}
|
||||
|
||||
int y = NBTUtils.getChildTag(sectionTag.getValue(), "Y", ByteTag.class).getValue();
|
||||
int y = NbtUtils.getChildTag(sectionTag, "Y", BinaryTagTypes.BYTE).value();
|
||||
if (y < 0 || y >= 16) {
|
||||
continue;
|
||||
}
|
||||
|
||||
blocks[y] = NBTUtils.getChildTag(sectionTag.getValue(),
|
||||
"Blocks", ByteArrayTag.class).getValue();
|
||||
data[y] = NBTUtils.getChildTag(sectionTag.getValue(), "Data",
|
||||
ByteArrayTag.class).getValue();
|
||||
blocks[y] = NbtUtils.getChildTag(sectionTag,
|
||||
"Blocks", BinaryTagTypes.BYTE_ARRAY).value();
|
||||
data[y] = NbtUtils.getChildTag(sectionTag, "Data",
|
||||
BinaryTagTypes.BYTE_ARRAY).value();
|
||||
|
||||
// 4096 ID block support
|
||||
if (sectionTag.getValue().containsKey("Add")) {
|
||||
blocksAdd[y] = NBTUtils.getChildTag(sectionTag.getValue(),
|
||||
"Add", ByteArrayTag.class).getValue();
|
||||
if (sectionTag.get("Add") != null) {
|
||||
blocksAdd[y] = NbtUtils.getChildTag(sectionTag,
|
||||
"Add", BinaryTagTypes.BYTE_ARRAY).value();
|
||||
}
|
||||
}
|
||||
|
||||
@ -179,50 +190,50 @@ public class AnvilChunk implements Chunk {
|
||||
* Used to load the tile entities.
|
||||
*/
|
||||
private void populateTileEntities() throws DataException {
|
||||
List<Tag> tags = NBTUtils.getChildTag(rootTag.getValue(),
|
||||
"TileEntities", ListTag.class).getValue();
|
||||
ListBinaryTag tags = NbtUtils.getChildTag(rootTag, "TileEntities", BinaryTagTypes.LIST);
|
||||
|
||||
tileEntities = new HashMap<>();
|
||||
|
||||
for (Tag tag : tags) {
|
||||
if (!(tag instanceof CompoundTag)) {
|
||||
for (BinaryTag tag : tags) {
|
||||
if (!(tag instanceof CompoundBinaryTag)) {
|
||||
throw new InvalidFormatException("CompoundTag expected in TileEntities");
|
||||
}
|
||||
|
||||
CompoundTag t = (CompoundTag) tag;
|
||||
CompoundBinaryTag t = (CompoundBinaryTag) tag;
|
||||
|
||||
int x = 0;
|
||||
int y = 0;
|
||||
int z = 0;
|
||||
|
||||
Map<String, Tag> values = new HashMap<>();
|
||||
CompoundBinaryTag.Builder values = CompoundBinaryTag.builder();
|
||||
|
||||
for (Map.Entry<String, Tag> entry : t.getValue().entrySet()) {
|
||||
switch (entry.getKey()) {
|
||||
for (String key : t.keySet()) {
|
||||
BinaryTag value = t.get(key);
|
||||
switch (key) {
|
||||
case "x":
|
||||
if (entry.getValue() instanceof IntTag) {
|
||||
x = ((IntTag) entry.getValue()).getValue();
|
||||
if (value instanceof IntBinaryTag) {
|
||||
x = ((IntBinaryTag) value).value();
|
||||
}
|
||||
break;
|
||||
case "y":
|
||||
if (entry.getValue() instanceof IntTag) {
|
||||
y = ((IntTag) entry.getValue()).getValue();
|
||||
if (value instanceof IntBinaryTag) {
|
||||
y = ((IntBinaryTag) value).value();
|
||||
}
|
||||
break;
|
||||
case "z":
|
||||
if (entry.getValue() instanceof IntTag) {
|
||||
z = ((IntTag) entry.getValue()).getValue();
|
||||
if (value instanceof IntBinaryTag) {
|
||||
z = ((IntBinaryTag) value).value();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
values.put(entry.getKey(), entry.getValue());
|
||||
values.put(key, value);
|
||||
}
|
||||
|
||||
BlockVector3 vec = BlockVector3.at(x, y, z);
|
||||
tileEntities.put(vec, values);
|
||||
tileEntities.put(vec, values.build());
|
||||
}
|
||||
}
|
||||
|
||||
@ -236,17 +247,17 @@ public class AnvilChunk implements Chunk {
|
||||
* @throws DataException thrown if there is a data error
|
||||
*/
|
||||
@Nullable
|
||||
private CompoundTag getBlockTileEntity(BlockVector3 position) throws DataException {
|
||||
private CompoundBinaryTag getBlockTileEntity(BlockVector3 position) throws DataException {
|
||||
if (tileEntities == null) {
|
||||
populateTileEntities();
|
||||
}
|
||||
|
||||
Map<String, Tag> values = tileEntities.get(position);
|
||||
CompoundBinaryTag values = tileEntities.get(position);
|
||||
if (values == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return new CompoundTag(values);
|
||||
return values;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -259,7 +270,7 @@ public class AnvilChunk implements Chunk {
|
||||
WorldEdit.logger.warn("Unknown legacy block " + id + ":" + data + " found when loading legacy anvil chunk.");
|
||||
return BlockTypes.AIR.getDefaultState().toBaseBlock();
|
||||
}
|
||||
CompoundTag tileEntity = getBlockTileEntity(position);
|
||||
CompoundBinaryTag tileEntity = getBlockTileEntity(position);
|
||||
|
||||
if (tileEntity != null) {
|
||||
return state.toBaseBlock(tileEntity);
|
||||
|
@ -19,15 +19,15 @@
|
||||
|
||||
package com.sk89q.worldedit.world.chunk;
|
||||
|
||||
import com.sk89q.jnbt.ByteTag;
|
||||
import com.sk89q.jnbt.CompoundTag;
|
||||
import com.sk89q.jnbt.IntTag;
|
||||
import com.sk89q.jnbt.ListTag;
|
||||
import com.sk89q.jnbt.LongArrayTag;
|
||||
import com.sk89q.jnbt.NBTUtils;
|
||||
import com.sk89q.jnbt.Tag;
|
||||
import com.sk89q.worldedit.math.BlockVector3;
|
||||
import com.sk89q.worldedit.registry.state.Property;
|
||||
import com.sk89q.worldedit.util.nbt.BinaryTag;
|
||||
import com.sk89q.worldedit.util.nbt.BinaryTagTypes;
|
||||
import com.sk89q.worldedit.util.nbt.CompoundBinaryTag;
|
||||
import com.sk89q.worldedit.util.nbt.IntBinaryTag;
|
||||
import com.sk89q.worldedit.util.nbt.ListBinaryTag;
|
||||
import com.sk89q.worldedit.util.nbt.NbtUtils;
|
||||
import com.sk89q.worldedit.world.DataException;
|
||||
import com.sk89q.worldedit.world.block.BaseBlock;
|
||||
import com.sk89q.worldedit.world.block.BlockState;
|
||||
@ -36,7 +36,6 @@ import com.sk89q.worldedit.world.block.BlockTypes;
|
||||
import com.sk89q.worldedit.world.storage.InvalidFormatException;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
@ -45,12 +44,25 @@ import javax.annotation.Nullable;
|
||||
*/
|
||||
public class AnvilChunk13 implements Chunk {
|
||||
|
||||
private CompoundTag rootTag;
|
||||
private final CompoundBinaryTag rootTag;
|
||||
private BlockState[][] blocks;
|
||||
private int rootX;
|
||||
private int rootZ;
|
||||
|
||||
private Map<BlockVector3, Map<String, Tag>> tileEntities;
|
||||
private Map<BlockVector3, CompoundBinaryTag> tileEntities;
|
||||
|
||||
|
||||
/**
|
||||
* Construct the chunk with a compound tag.
|
||||
*
|
||||
* @param tag the tag to read
|
||||
* @throws DataException on a data error
|
||||
* @deprecated Use {@link #AnvilChunk13(CompoundBinaryTag)}
|
||||
*/
|
||||
@Deprecated
|
||||
public AnvilChunk13(CompoundTag tag) throws DataException {
|
||||
this(tag.asBinaryTag());
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct the chunk with a compound tag.
|
||||
@ -58,49 +70,49 @@ public class AnvilChunk13 implements Chunk {
|
||||
* @param tag the tag to read
|
||||
* @throws DataException on a data error
|
||||
*/
|
||||
public AnvilChunk13(CompoundTag tag) throws DataException {
|
||||
public AnvilChunk13(CompoundBinaryTag tag) throws DataException {
|
||||
rootTag = tag;
|
||||
|
||||
rootX = NBTUtils.getChildTag(rootTag.getValue(), "xPos", IntTag.class).getValue();
|
||||
rootZ = NBTUtils.getChildTag(rootTag.getValue(), "zPos", IntTag.class).getValue();
|
||||
rootX = NbtUtils.getChildTag(rootTag, "xPos", BinaryTagTypes.INT).value();
|
||||
rootZ = NbtUtils.getChildTag(rootTag, "zPos", BinaryTagTypes.INT).value();
|
||||
|
||||
blocks = new BlockState[16][];
|
||||
|
||||
List<Tag> sections = NBTUtils.getChildTag(rootTag.getValue(), "Sections", ListTag.class).getValue();
|
||||
ListBinaryTag sections = NbtUtils.getChildTag(rootTag, "Sections", BinaryTagTypes.LIST);
|
||||
|
||||
for (Tag rawSectionTag : sections) {
|
||||
if (!(rawSectionTag instanceof CompoundTag)) {
|
||||
for (BinaryTag rawSectionTag : sections) {
|
||||
if (!(rawSectionTag instanceof CompoundBinaryTag)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
CompoundTag sectionTag = (CompoundTag) rawSectionTag;
|
||||
if (!sectionTag.getValue().containsKey("Y")) {
|
||||
CompoundBinaryTag sectionTag = (CompoundBinaryTag) rawSectionTag;
|
||||
if (sectionTag.get("Y") == null) {
|
||||
continue; // Empty section.
|
||||
}
|
||||
|
||||
int y = NBTUtils.getChildTag(sectionTag.getValue(), "Y", ByteTag.class).getValue();
|
||||
int y = NbtUtils.getChildTag(sectionTag, "Y", BinaryTagTypes.BYTE).value();
|
||||
if (y < 0 || y >= 16) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// parse palette
|
||||
List<CompoundTag> paletteEntries = sectionTag.getList("Palette", CompoundTag.class);
|
||||
ListBinaryTag paletteEntries = sectionTag.getList("Palette", BinaryTagTypes.COMPOUND);
|
||||
int paletteSize = paletteEntries.size();
|
||||
if (paletteSize == 0) {
|
||||
continue;
|
||||
}
|
||||
BlockState[] palette = new BlockState[paletteSize];
|
||||
for (int paletteEntryId = 0; paletteEntryId < paletteSize; paletteEntryId++) {
|
||||
CompoundTag paletteEntry = paletteEntries.get(paletteEntryId);
|
||||
CompoundBinaryTag paletteEntry = (CompoundBinaryTag) paletteEntries.get(paletteEntryId);
|
||||
BlockType type = BlockTypes.get(paletteEntry.getString("Name"));
|
||||
if (type == null) {
|
||||
throw new InvalidFormatException("Invalid block type: " + paletteEntry.getString("Name"));
|
||||
}
|
||||
BlockState blockState = type.getDefaultState();
|
||||
if (paletteEntry.containsKey("Properties")) {
|
||||
CompoundTag properties = NBTUtils.getChildTag(paletteEntry.getValue(), "Properties", CompoundTag.class);
|
||||
if (paletteEntry.get("Properties") != null) {
|
||||
CompoundBinaryTag properties = NbtUtils.getChildTag(paletteEntry, "Properties", BinaryTagTypes.COMPOUND);
|
||||
for (Property<?> property : blockState.getStates().keySet()) {
|
||||
if (properties.containsKey(property.getName())) {
|
||||
if (properties.get(property.getName()) != null) {
|
||||
String value = properties.getString(property.getName());
|
||||
try {
|
||||
blockState = getBlockStateWith(blockState, property, value);
|
||||
@ -114,7 +126,7 @@ public class AnvilChunk13 implements Chunk {
|
||||
}
|
||||
|
||||
// parse block states
|
||||
long[] blockStatesSerialized = NBTUtils.getChildTag(sectionTag.getValue(), "BlockStates", LongArrayTag.class).getValue();
|
||||
long[] blockStatesSerialized = NbtUtils.getChildTag(sectionTag, "BlockStates", BinaryTagTypes.LONG_ARRAY).value();
|
||||
|
||||
BlockState[] chunkSectionBlocks = new BlockState[16 * 16 * 16];
|
||||
blocks[y] = chunkSectionBlocks;
|
||||
@ -166,26 +178,24 @@ public class AnvilChunk13 implements Chunk {
|
||||
*/
|
||||
private void populateTileEntities() throws DataException {
|
||||
tileEntities = new HashMap<>();
|
||||
if (!rootTag.getValue().containsKey("TileEntities")) {
|
||||
if (rootTag.get("TileEntities") == null) {
|
||||
return;
|
||||
}
|
||||
List<Tag> tags = NBTUtils.getChildTag(rootTag.getValue(),
|
||||
"TileEntities", ListTag.class).getValue();
|
||||
ListBinaryTag tags = NbtUtils.getChildTag(rootTag, "TileEntities", BinaryTagTypes.LIST);
|
||||
|
||||
for (Tag tag : tags) {
|
||||
if (!(tag instanceof CompoundTag)) {
|
||||
for (BinaryTag tag : tags) {
|
||||
if (!(tag instanceof CompoundBinaryTag)) {
|
||||
throw new InvalidFormatException("CompoundTag expected in TileEntities");
|
||||
}
|
||||
|
||||
CompoundTag t = (CompoundTag) tag;
|
||||
CompoundBinaryTag t = (CompoundBinaryTag) tag;
|
||||
|
||||
Map<String, Tag> values = new HashMap<>(t.getValue());
|
||||
int x = ((IntTag) values.get("x")).getValue();
|
||||
int y = ((IntTag) values.get("y")).getValue();
|
||||
int z = ((IntTag) values.get("z")).getValue();
|
||||
int x = ((IntBinaryTag) t.get("x")).value();
|
||||
int y = ((IntBinaryTag) t.get("y")).value();
|
||||
int z = ((IntBinaryTag) t.get("z")).value();
|
||||
|
||||
BlockVector3 vec = BlockVector3.at(x, y, z);
|
||||
tileEntities.put(vec, values);
|
||||
tileEntities.put(vec, t);
|
||||
}
|
||||
}
|
||||
|
||||
@ -199,17 +209,17 @@ public class AnvilChunk13 implements Chunk {
|
||||
* @throws DataException thrown if there is a data error
|
||||
*/
|
||||
@Nullable
|
||||
private CompoundTag getBlockTileEntity(BlockVector3 position) throws DataException {
|
||||
private CompoundBinaryTag getBlockTileEntity(BlockVector3 position) throws DataException {
|
||||
if (tileEntities == null) {
|
||||
populateTileEntities();
|
||||
}
|
||||
|
||||
Map<String, Tag> values = tileEntities.get(position);
|
||||
CompoundBinaryTag values = tileEntities.get(position);
|
||||
if (values == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return new CompoundTag(values);
|
||||
return values;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -228,7 +238,7 @@ public class AnvilChunk13 implements Chunk {
|
||||
BlockState[] sectionBlocks = blocks[section];
|
||||
BlockState state = sectionBlocks != null ? sectionBlocks[(yIndex << 8) | (z << 4) | x] : BlockTypes.AIR.getDefaultState();
|
||||
|
||||
CompoundTag tileEntity = getBlockTileEntity(position);
|
||||
CompoundBinaryTag tileEntity = getBlockTileEntity(position);
|
||||
|
||||
if (tileEntity != null) {
|
||||
return state.toBaseBlock(tileEntity);
|
||||
|
@ -20,6 +20,7 @@
|
||||
package com.sk89q.worldedit.world.chunk;
|
||||
|
||||
import com.sk89q.jnbt.CompoundTag;
|
||||
import com.sk89q.worldedit.util.nbt.CompoundBinaryTag;
|
||||
import com.sk89q.worldedit.world.DataException;
|
||||
import com.sk89q.worldedit.world.block.BlockState;
|
||||
import com.sk89q.worldedit.world.storage.InvalidFormatException;
|
||||
@ -34,11 +35,23 @@ public class AnvilChunk16 extends AnvilChunk13 {
|
||||
*
|
||||
* @param tag the tag to read
|
||||
* @throws DataException on a data error
|
||||
* @deprecated Use {@link #AnvilChunk16(CompoundBinaryTag)}
|
||||
*/
|
||||
@Deprecated
|
||||
public AnvilChunk16(CompoundTag tag) throws DataException {
|
||||
super(tag);
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct the chunk with a compound tag.
|
||||
*
|
||||
* @param tag the tag to read
|
||||
* @throws DataException on a data error
|
||||
*/
|
||||
public AnvilChunk16(CompoundBinaryTag tag) throws DataException {
|
||||
super(tag);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void readBlockStates(BlockState[] palette, long[] blockStatesSerialized, BlockState[] chunkSectionBlocks) throws InvalidFormatException {
|
||||
PackedIntArrayReader reader = new PackedIntArrayReader(blockStatesSerialized);
|
||||
|
@ -19,14 +19,15 @@
|
||||
|
||||
package com.sk89q.worldedit.world.chunk;
|
||||
|
||||
import com.sk89q.jnbt.ByteArrayTag;
|
||||
import com.sk89q.jnbt.CompoundTag;
|
||||
import com.sk89q.jnbt.IntTag;
|
||||
import com.sk89q.jnbt.ListTag;
|
||||
import com.sk89q.jnbt.NBTUtils;
|
||||
import com.sk89q.jnbt.Tag;
|
||||
import com.sk89q.worldedit.WorldEdit;
|
||||
import com.sk89q.worldedit.math.BlockVector3;
|
||||
import com.sk89q.worldedit.util.nbt.BinaryTag;
|
||||
import com.sk89q.worldedit.util.nbt.BinaryTagTypes;
|
||||
import com.sk89q.worldedit.util.nbt.CompoundBinaryTag;
|
||||
import com.sk89q.worldedit.util.nbt.IntBinaryTag;
|
||||
import com.sk89q.worldedit.util.nbt.ListBinaryTag;
|
||||
import com.sk89q.worldedit.util.nbt.NbtUtils;
|
||||
import com.sk89q.worldedit.world.DataException;
|
||||
import com.sk89q.worldedit.world.block.BaseBlock;
|
||||
import com.sk89q.worldedit.world.block.BlockState;
|
||||
@ -35,7 +36,6 @@ import com.sk89q.worldedit.world.registry.LegacyMapper;
|
||||
import com.sk89q.worldedit.world.storage.InvalidFormatException;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
@ -43,13 +43,26 @@ import java.util.Map;
|
||||
*/
|
||||
public class OldChunk implements Chunk {
|
||||
|
||||
private final CompoundTag rootTag;
|
||||
private final CompoundBinaryTag rootTag;
|
||||
private final byte[] blocks;
|
||||
private final byte[] data;
|
||||
private final int rootX;
|
||||
private final int rootZ;
|
||||
|
||||
private Map<BlockVector3, Map<String, Tag>> tileEntities;
|
||||
private Map<BlockVector3, CompoundBinaryTag> tileEntities;
|
||||
|
||||
|
||||
/**
|
||||
* Construct the chunk with a compound tag.
|
||||
*
|
||||
* @param tag the tag
|
||||
* @throws DataException if there is an error getting the chunk data
|
||||
* @deprecated Use {@link #OldChunk(CompoundBinaryTag)}
|
||||
*/
|
||||
@Deprecated
|
||||
public OldChunk(CompoundTag tag) throws DataException {
|
||||
this(tag.asBinaryTag());
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct the chunk with a compound tag.
|
||||
@ -57,13 +70,13 @@ public class OldChunk implements Chunk {
|
||||
* @param tag the tag
|
||||
* @throws DataException if there is an error getting the chunk data
|
||||
*/
|
||||
public OldChunk(CompoundTag tag) throws DataException {
|
||||
public OldChunk(CompoundBinaryTag tag) throws DataException {
|
||||
rootTag = tag;
|
||||
|
||||
blocks = NBTUtils.getChildTag(rootTag.getValue(), "Blocks", ByteArrayTag.class).getValue();
|
||||
data = NBTUtils.getChildTag(rootTag.getValue(), "Data", ByteArrayTag.class).getValue();
|
||||
rootX = NBTUtils.getChildTag(rootTag.getValue(), "xPos", IntTag.class).getValue();
|
||||
rootZ = NBTUtils.getChildTag(rootTag.getValue(), "zPos", IntTag.class).getValue();
|
||||
blocks = NbtUtils.getChildTag(rootTag, "Blocks", BinaryTagTypes.BYTE_ARRAY).value();
|
||||
data = NbtUtils.getChildTag(rootTag, "Data", BinaryTagTypes.BYTE_ARRAY).value();
|
||||
rootX = NbtUtils.getChildTag(rootTag, "xPos", BinaryTagTypes.INT).value();
|
||||
rootZ = NbtUtils.getChildTag(rootTag, "zPos", BinaryTagTypes.INT).value();
|
||||
|
||||
int size = 16 * 16 * 128;
|
||||
if (blocks.length != size) {
|
||||
@ -83,51 +96,50 @@ public class OldChunk implements Chunk {
|
||||
* @throws DataException if there is an error getting the chunk data
|
||||
*/
|
||||
private void populateTileEntities() throws DataException {
|
||||
List<Tag> tags = NBTUtils.getChildTag(
|
||||
rootTag.getValue(), "TileEntities", ListTag.class)
|
||||
.getValue();
|
||||
ListBinaryTag tags = NbtUtils.getChildTag(rootTag, "TileEntities", BinaryTagTypes.LIST);
|
||||
|
||||
tileEntities = new HashMap<>();
|
||||
|
||||
for (Tag tag : tags) {
|
||||
if (!(tag instanceof CompoundTag)) {
|
||||
for (BinaryTag tag : tags) {
|
||||
if (!(tag instanceof CompoundBinaryTag)) {
|
||||
throw new InvalidFormatException("CompoundTag expected in TileEntities");
|
||||
}
|
||||
|
||||
CompoundTag t = (CompoundTag) tag;
|
||||
CompoundBinaryTag t = (CompoundBinaryTag) tag;
|
||||
|
||||
int x = 0;
|
||||
int y = 0;
|
||||
int z = 0;
|
||||
|
||||
Map<String, Tag> values = new HashMap<>();
|
||||
CompoundBinaryTag.Builder values = CompoundBinaryTag.builder();
|
||||
|
||||
for (Map.Entry<String, Tag> entry : t.getValue().entrySet()) {
|
||||
switch (entry.getKey()) {
|
||||
for (String key : t.keySet()) {
|
||||
BinaryTag value = t.get(key);
|
||||
switch (key) {
|
||||
case "x":
|
||||
if (entry.getValue() instanceof IntTag) {
|
||||
x = ((IntTag) entry.getValue()).getValue();
|
||||
if (value instanceof IntBinaryTag) {
|
||||
x = ((IntBinaryTag) value).value();
|
||||
}
|
||||
break;
|
||||
case "y":
|
||||
if (entry.getValue() instanceof IntTag) {
|
||||
y = ((IntTag) entry.getValue()).getValue();
|
||||
if (value instanceof IntBinaryTag) {
|
||||
y = ((IntBinaryTag) value).value();
|
||||
}
|
||||
break;
|
||||
case "z":
|
||||
if (entry.getValue() instanceof IntTag) {
|
||||
z = ((IntTag) entry.getValue()).getValue();
|
||||
if (value instanceof IntBinaryTag) {
|
||||
z = ((IntBinaryTag) value).value();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
values.put(entry.getKey(), entry.getValue());
|
||||
values.put(key, value);
|
||||
}
|
||||
|
||||
BlockVector3 vec = BlockVector3.at(x, y, z);
|
||||
tileEntities.put(vec, values);
|
||||
tileEntities.put(vec, values.build());
|
||||
}
|
||||
}
|
||||
|
||||
@ -140,16 +152,16 @@ public class OldChunk implements Chunk {
|
||||
* @return a tag
|
||||
* @throws DataException if there is an error getting the chunk data
|
||||
*/
|
||||
private CompoundTag getBlockTileEntity(BlockVector3 position) throws DataException {
|
||||
private CompoundBinaryTag getBlockTileEntity(BlockVector3 position) throws DataException {
|
||||
if (tileEntities == null) {
|
||||
populateTileEntities();
|
||||
}
|
||||
|
||||
Map<String, Tag> values = tileEntities.get(position);
|
||||
CompoundBinaryTag values = tileEntities.get(position);
|
||||
if (values == null) {
|
||||
return null;
|
||||
}
|
||||
return new CompoundTag(values);
|
||||
return values;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -189,7 +201,7 @@ public class OldChunk implements Chunk {
|
||||
return BlockTypes.AIR.getDefaultState().toBaseBlock();
|
||||
}
|
||||
|
||||
CompoundTag tileEntity = getBlockTileEntity(position);
|
||||
CompoundBinaryTag tileEntity = getBlockTileEntity(position);
|
||||
|
||||
if (tileEntity != null) {
|
||||
return state.toBaseBlock(tileEntity);
|
||||
|
@ -32,6 +32,7 @@ public final class EntityTypes {
|
||||
@Nullable public static final EntityType AREA_EFFECT_CLOUD = get("minecraft:area_effect_cloud");
|
||||
@Nullable public static final EntityType ARMOR_STAND = get("minecraft:armor_stand");
|
||||
@Nullable public static final EntityType ARROW = get("minecraft:arrow");
|
||||
@Nullable public static final EntityType AXOLOTL = get("minecraft:axolotl");
|
||||
@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");
|
||||
@ -68,6 +69,9 @@ public final class EntityTypes {
|
||||
@Nullable public static final EntityType FURNACE_MINECART = get("minecraft:furnace_minecart");
|
||||
@Nullable public static final EntityType GHAST = get("minecraft:ghast");
|
||||
@Nullable public static final EntityType GIANT = get("minecraft:giant");
|
||||
@Nullable public static final EntityType GLOW_ITEM_FRAME = get("minecraft:glow_item_frame");
|
||||
@Nullable public static final EntityType GLOW_SQUID = get("minecraft:glow_squid");
|
||||
@Nullable public static final EntityType GOAT = get("minecraft:goat");
|
||||
@Nullable public static final EntityType GUARDIAN = get("minecraft:guardian");
|
||||
@Nullable public static final EntityType HOGLIN = get("minecraft:hoglin");
|
||||
@Nullable public static final EntityType HOPPER_MINECART = get("minecraft:hopper_minecart");
|
||||
@ -82,6 +86,7 @@ public final class EntityTypes {
|
||||
@Nullable public static final EntityType LLAMA = get("minecraft:llama");
|
||||
@Nullable public static final EntityType LLAMA_SPIT = get("minecraft:llama_spit");
|
||||
@Nullable public static final EntityType MAGMA_CUBE = get("minecraft:magma_cube");
|
||||
@Nullable public static final EntityType MARKER = get("minecraft:marker");
|
||||
@Nullable public static final EntityType MINECART = get("minecraft:minecart");
|
||||
@Nullable public static final EntityType MOOSHROOM = get("minecraft:mooshroom");
|
||||
@Nullable public static final EntityType MULE = get("minecraft:mule");
|
||||
|
@ -29,24 +29,36 @@ 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 AXOLOTL_TEMPT_ITEMS = get("minecraft:axolotl_tempt_items");
|
||||
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 BUTTONS = get("minecraft:buttons");
|
||||
public static final ItemCategory CANDLES = get("minecraft:candles");
|
||||
public static final ItemCategory CARPETS = get("minecraft:carpets");
|
||||
public static final ItemCategory CLUSTER_MAX_HARVESTABLES = get("minecraft:cluster_max_harvestables");
|
||||
public static final ItemCategory COAL_ORES = get("minecraft:coal_ores");
|
||||
public static final ItemCategory COALS = get("minecraft:coals");
|
||||
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 CRIMSON_STEMS = get("minecraft:crimson_stems");
|
||||
public static final ItemCategory DARK_OAK_LOGS = get("minecraft:dark_oak_logs");
|
||||
public static final ItemCategory DIAMOND_ORES = get("minecraft:diamond_ores");
|
||||
public static final ItemCategory DOORS = get("minecraft:doors");
|
||||
public static final ItemCategory EMERALD_ORES = get("minecraft:emerald_ores");
|
||||
public static final ItemCategory FENCES = get("minecraft:fences");
|
||||
public static final ItemCategory FISHES = get("minecraft:fishes");
|
||||
public static final ItemCategory FLOWERS = get("minecraft:flowers");
|
||||
public static final ItemCategory FOX_FOOD = get("minecraft:fox_food");
|
||||
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 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");
|
||||
public static final ItemCategory LAPIS_ORES = get("minecraft:lapis_ores");
|
||||
public static final ItemCategory LEAVES = get("minecraft:leaves");
|
||||
public static final ItemCategory LECTERN_BOOKS = get("minecraft:lectern_books");
|
||||
public static final ItemCategory LOGS = get("minecraft:logs");
|
||||
@ -54,10 +66,13 @@ public final class ItemCategories {
|
||||
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 OAK_LOGS = get("minecraft:oak_logs");
|
||||
public static final ItemCategory OCCLUDES_VIBRATION_SIGNALS = get("minecraft:occludes_vibration_signals");
|
||||
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");
|
||||
public static final ItemCategory PLANKS = get("minecraft:planks");
|
||||
public static final ItemCategory RAILS = get("minecraft:rails");
|
||||
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 SIGNS = get("minecraft:signs");
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
package com.sk89q.worldedit.world.item;
|
||||
|
||||
import com.boydti.fawe.object.string.JoinedCharSequence;
|
||||
import com.fastasyncworldedit.core.object.string.JoinedCharSequence;
|
||||
import com.sk89q.worldedit.world.block.ItemTypesCache;
|
||||
import com.sk89q.worldedit.world.registry.LegacyMapper;
|
||||
|
||||
@ -53,6 +53,9 @@ public final class ItemTypes {
|
||||
@Nullable public static final ItemType ACTIVATOR_RAIL = init();
|
||||
@Nullable public static final ItemType AIR = init();
|
||||
@Nullable public static final ItemType ALLIUM = init();
|
||||
@Nullable public static final ItemType AMETHYST_BLOCK = init();
|
||||
@Nullable public static final ItemType AMETHYST_CLUSTER = init();
|
||||
@Nullable public static final ItemType AMETHYST_SHARD = init();
|
||||
@Nullable public static final ItemType ANCIENT_DEBRIS = init();
|
||||
@Nullable public static final ItemType ANDESITE = init();
|
||||
@Nullable public static final ItemType ANDESITE_SLAB = init();
|
||||
@ -62,6 +65,10 @@ public final class ItemTypes {
|
||||
@Nullable public static final ItemType APPLE = init();
|
||||
@Nullable public static final ItemType ARMOR_STAND = init();
|
||||
@Nullable public static final ItemType ARROW = init();
|
||||
@Nullable public static final ItemType AXOLOTL_BUCKET = init();
|
||||
@Nullable public static final ItemType AXOLOTL_SPAWN_EGG = init();
|
||||
@Nullable public static final ItemType AZALEA = init();
|
||||
@Nullable public static final ItemType AZALEA_LEAVES = init();
|
||||
@Nullable public static final ItemType AZURE_BLUET = init();
|
||||
@Nullable public static final ItemType BAKED_POTATO = init();
|
||||
@Nullable public static final ItemType BAMBOO = init();
|
||||
@ -79,6 +86,7 @@ public final class ItemTypes {
|
||||
@Nullable public static final ItemType BEETROOT_SEEDS = init();
|
||||
@Nullable public static final ItemType BEETROOT_SOUP = init();
|
||||
@Nullable public static final ItemType BELL = init();
|
||||
@Nullable public static final ItemType BIG_DRIPLEAF = init();
|
||||
@Nullable public static final ItemType BIRCH_BOAT = init();
|
||||
@Nullable public static final ItemType BIRCH_BUTTON = init();
|
||||
@Nullable public static final ItemType BIRCH_DOOR = init();
|
||||
@ -96,6 +104,7 @@ public final class ItemTypes {
|
||||
@Nullable public static final ItemType BIRCH_WOOD = init();
|
||||
@Nullable public static final ItemType BLACK_BANNER = init();
|
||||
@Nullable public static final ItemType BLACK_BED = init();
|
||||
@Nullable public static final ItemType BLACK_CANDLE = init();
|
||||
@Nullable public static final ItemType BLACK_CARPET = init();
|
||||
@Nullable public static final ItemType BLACK_CONCRETE = init();
|
||||
@Nullable public static final ItemType BLACK_CONCRETE_POWDER = init();
|
||||
@ -116,6 +125,8 @@ public final class ItemTypes {
|
||||
@Nullable public static final ItemType BLAZE_SPAWN_EGG = init();
|
||||
@Nullable public static final ItemType BLUE_BANNER = init();
|
||||
@Nullable public static final ItemType BLUE_BED = init();
|
||||
@Nullable public static final ItemType BLUE_CANDLE = init();
|
||||
@Nullable public static final ItemType BROWN_CANDLE = init();
|
||||
@Nullable public static final ItemType BLUE_CARPET = init();
|
||||
@Nullable public static final ItemType BLUE_CONCRETE = init();
|
||||
@Nullable public static final ItemType BLUE_CONCRETE_POWDER = init();
|
||||
@ -163,10 +174,14 @@ public final class ItemTypes {
|
||||
@Nullable public static final ItemType BUBBLE_CORAL_BLOCK = init();
|
||||
@Nullable public static final ItemType BUBBLE_CORAL_FAN = init();
|
||||
@Nullable public static final ItemType BUCKET = init();
|
||||
@Nullable public static final ItemType BUDDING_AMETHYST = init();
|
||||
@Nullable public static final ItemType BUNDLE = init();
|
||||
@Nullable public static final ItemType CACTUS = init();
|
||||
@Deprecated @Nullable public static final ItemType CACTUS_GREEN = init();
|
||||
@Nullable public static final ItemType CAKE = init();
|
||||
@Nullable public static final ItemType CALCITE = init();
|
||||
@Nullable public static final ItemType CAMPFIRE = init();
|
||||
@Nullable public static final ItemType CANDLE = init();
|
||||
@Nullable public static final ItemType CARROT = init();
|
||||
@Nullable public static final ItemType CARROT_ON_A_STICK = init();
|
||||
@Nullable public static final ItemType CARTOGRAPHY_TABLE = init();
|
||||
@ -186,6 +201,7 @@ public final class ItemTypes {
|
||||
@Nullable public static final ItemType CHICKEN = init();
|
||||
@Nullable public static final ItemType CHICKEN_SPAWN_EGG = init();
|
||||
@Nullable public static final ItemType CHIPPED_ANVIL = init();
|
||||
@Nullable public static final ItemType CHISELED_DEEPSLATE = init();
|
||||
@Nullable public static final ItemType CHISELED_NETHER_BRICKS = init();
|
||||
@Nullable public static final ItemType CHISELED_POLISHED_BLACKSTONE = init();
|
||||
@Nullable public static final ItemType CHISELED_QUARTZ_BLOCK = init();
|
||||
@ -202,6 +218,10 @@ public final class ItemTypes {
|
||||
@Nullable public static final ItemType COAL_BLOCK = init();
|
||||
@Nullable public static final ItemType COAL_ORE = init();
|
||||
@Nullable public static final ItemType COARSE_DIRT = init();
|
||||
@Nullable public static final ItemType COBBLED_DEEPSLATE = init();
|
||||
@Nullable public static final ItemType COBBLED_DEEPSLATE_SLAB = init();
|
||||
@Nullable public static final ItemType COBBLED_DEEPSLATE_STAIRS = init();
|
||||
@Nullable public static final ItemType COBBLED_DEEPSLATE_WALL = init();
|
||||
@Nullable public static final ItemType COBBLESTONE = init();
|
||||
@Nullable public static final ItemType COBBLESTONE_SLAB = init();
|
||||
@Nullable public static final ItemType COBBLESTONE_STAIRS = init();
|
||||
@ -225,8 +245,13 @@ public final class ItemTypes {
|
||||
@Nullable public static final ItemType COOKED_RABBIT = init();
|
||||
@Nullable public static final ItemType COOKED_SALMON = init();
|
||||
@Nullable public static final ItemType COOKIE = init();
|
||||
@Nullable public static final ItemType COPPER_BLOCK = init();
|
||||
@Nullable public static final ItemType COPPER_INGOT = init();
|
||||
@Nullable public static final ItemType COPPER_ORE = init();
|
||||
@Nullable public static final ItemType CORNFLOWER = init();
|
||||
@Nullable public static final ItemType COW_SPAWN_EGG = init();
|
||||
@Nullable public static final ItemType CRACKED_DEEPSLATE_BRICKS = init();
|
||||
@Nullable public static final ItemType CRACKED_DEEPSLATE_TILES = init();
|
||||
@Nullable public static final ItemType CRACKED_NETHER_BRICKS = init();
|
||||
@Nullable public static final ItemType CRACKED_POLISHED_BLACKSTONE_BRICKS = init();
|
||||
@Nullable public static final ItemType CRACKED_STONE_BRICKS = init();
|
||||
@ -251,12 +276,16 @@ public final class ItemTypes {
|
||||
@Nullable public static final ItemType CRIMSON_TRAPDOOR = init();
|
||||
@Nullable public static final ItemType CROSSBOW = init();
|
||||
@Nullable public static final ItemType CRYING_OBSIDIAN = init();
|
||||
@Nullable public static final ItemType CUT_COPPER = init();
|
||||
@Nullable public static final ItemType CUT_COPPER_SLAB = init();
|
||||
@Nullable public static final ItemType CUT_COPPER_STAIRS = init();
|
||||
@Nullable public static final ItemType CUT_RED_SANDSTONE = init();
|
||||
@Nullable public static final ItemType CUT_RED_SANDSTONE_SLAB = init();
|
||||
@Nullable public static final ItemType CUT_SANDSTONE = init();
|
||||
@Nullable public static final ItemType CUT_SANDSTONE_SLAB = init();
|
||||
@Nullable public static final ItemType CYAN_BANNER = init();
|
||||
@Nullable public static final ItemType CYAN_BED = init();
|
||||
@Nullable public static final ItemType CYAN_CANDLE = init();
|
||||
@Nullable public static final ItemType CYAN_CARPET = init();
|
||||
@Nullable public static final ItemType CYAN_CONCRETE = init();
|
||||
@Nullable public static final ItemType CYAN_CONCRETE_POWDER = init();
|
||||
@ -306,6 +335,23 @@ public final class ItemTypes {
|
||||
@Nullable public static final ItemType DEAD_TUBE_CORAL_BLOCK = init();
|
||||
@Nullable public static final ItemType DEAD_TUBE_CORAL_FAN = init();
|
||||
@Nullable public static final ItemType DEBUG_STICK = init();
|
||||
@Nullable public static final ItemType DEEPSLATE = init();
|
||||
@Nullable public static final ItemType DEEPSLATE_BRICK_SLAB = init();
|
||||
@Nullable public static final ItemType DEEPSLATE_BRICK_STAIRS = init();
|
||||
@Nullable public static final ItemType DEEPSLATE_BRICK_WALL = init();
|
||||
@Nullable public static final ItemType DEEPSLATE_BRICKS = init();
|
||||
@Nullable public static final ItemType DEEPSLATE_COAL_ORE = init();
|
||||
@Nullable public static final ItemType DEEPSLATE_COPPER_ORE = init();
|
||||
@Nullable public static final ItemType DEEPSLATE_DIAMOND_ORE = init();
|
||||
@Nullable public static final ItemType DEEPSLATE_EMERALD_ORE = init();
|
||||
@Nullable public static final ItemType DEEPSLATE_GOLD_ORE = init();
|
||||
@Nullable public static final ItemType DEEPSLATE_IRON_ORE = init();
|
||||
@Nullable public static final ItemType DEEPSLATE_LAPIS_ORE = init();
|
||||
@Nullable public static final ItemType DEEPSLATE_REDSTONE_ORE = init();
|
||||
@Nullable public static final ItemType DEEPSLATE_TILE_SLAB = init();
|
||||
@Nullable public static final ItemType DEEPSLATE_TILE_STAIRS = init();
|
||||
@Nullable public static final ItemType DEEPSLATE_TILE_WALL = init();
|
||||
@Nullable public static final ItemType DEEPSLATE_TILES = init();
|
||||
@Nullable public static final ItemType DETECTOR_RAIL = init();
|
||||
@Nullable public static final ItemType DIAMOND = init();
|
||||
@Nullable public static final ItemType DIAMOND_AXE = init();
|
||||
@ -325,6 +371,7 @@ public final class ItemTypes {
|
||||
@Nullable public static final ItemType DIORITE_STAIRS = init();
|
||||
@Nullable public static final ItemType DIORITE_WALL = init();
|
||||
@Nullable public static final ItemType DIRT = init();
|
||||
@Nullable public static final ItemType DIRT_PATH = init();
|
||||
@Nullable public static final ItemType DISPENSER = init();
|
||||
@Nullable public static final ItemType DOLPHIN_SPAWN_EGG = init();
|
||||
@Nullable public static final ItemType DONKEY_SPAWN_EGG = init();
|
||||
@ -333,6 +380,7 @@ public final class ItemTypes {
|
||||
@Nullable public static final ItemType DRAGON_HEAD = init();
|
||||
@Nullable public static final ItemType DRIED_KELP = init();
|
||||
@Nullable public static final ItemType DRIED_KELP_BLOCK = init();
|
||||
@Nullable public static final ItemType DRIPSTONE_BLOCK = init();
|
||||
@Nullable public static final ItemType DROPPER = init();
|
||||
@Nullable public static final ItemType DROWNED_SPAWN_EGG = init();
|
||||
@Nullable public static final ItemType EGG = init();
|
||||
@ -359,6 +407,10 @@ public final class ItemTypes {
|
||||
@Nullable public static final ItemType ENDERMITE_SPAWN_EGG = init();
|
||||
@Nullable public static final ItemType EVOKER_SPAWN_EGG = init();
|
||||
@Nullable public static final ItemType EXPERIENCE_BOTTLE = init();
|
||||
@Nullable public static final ItemType EXPOSED_COPPER = init();
|
||||
@Nullable public static final ItemType EXPOSED_CUT_COPPER = init();
|
||||
@Nullable public static final ItemType EXPOSED_CUT_COPPER_SLAB = init();
|
||||
@Nullable public static final ItemType EXPOSED_CUT_COPPER_STAIRS = init();
|
||||
@Nullable public static final ItemType FARMLAND = init();
|
||||
@Nullable public static final ItemType FEATHER = init();
|
||||
@Nullable public static final ItemType FERMENTED_SPIDER_EYE = init();
|
||||
@ -376,6 +428,8 @@ public final class ItemTypes {
|
||||
@Nullable public static final ItemType FLINT_AND_STEEL = init();
|
||||
@Nullable public static final ItemType FLOWER_BANNER_PATTERN = init();
|
||||
@Nullable public static final ItemType FLOWER_POT = init();
|
||||
@Nullable public static final ItemType FLOWERING_AZALEA = init();
|
||||
@Nullable public static final ItemType FLOWERING_AZALEA_LEAVES = init();
|
||||
@Nullable public static final ItemType FOX_SPAWN_EGG = init();
|
||||
@Nullable public static final ItemType FURNACE = init();
|
||||
@Nullable public static final ItemType FURNACE_MINECART = init();
|
||||
@ -387,8 +441,14 @@ public final class ItemTypes {
|
||||
@Nullable public static final ItemType GLASS_PANE = init();
|
||||
@Nullable public static final ItemType GLISTERING_MELON_SLICE = init();
|
||||
@Nullable public static final ItemType GLOBE_BANNER_PATTERN = init();
|
||||
@Nullable public static final ItemType GLOW_BERRIES = init();
|
||||
@Nullable public static final ItemType GLOW_INK_SAC = init();
|
||||
@Nullable public static final ItemType GLOW_ITEM_FRAME = init();
|
||||
@Nullable public static final ItemType GLOW_LICHEN = init();
|
||||
@Nullable public static final ItemType GLOW_SQUID_SPAWN_EGG = init();
|
||||
@Nullable public static final ItemType GLOWSTONE = init();
|
||||
@Nullable public static final ItemType GLOWSTONE_DUST = init();
|
||||
@Nullable public static final ItemType GOAT_SPAWN_EGG = init();
|
||||
@Nullable public static final ItemType GOLD_BLOCK = init();
|
||||
@Nullable public static final ItemType GOLD_INGOT = init();
|
||||
@Nullable public static final ItemType GOLD_NUGGET = init();
|
||||
@ -411,10 +471,11 @@ public final class ItemTypes {
|
||||
@Nullable public static final ItemType GRANITE_WALL = init();
|
||||
@Nullable public static final ItemType GRASS = init();
|
||||
@Nullable public static final ItemType GRASS_BLOCK = init();
|
||||
@Nullable public static final ItemType GRASS_PATH = init();
|
||||
@Deprecated @Nullable public static final ItemType GRASS_PATH = init();
|
||||
@Nullable public static final ItemType GRAVEL = init();
|
||||
@Nullable public static final ItemType GRAY_BANNER = init();
|
||||
@Nullable public static final ItemType GRAY_BED = init();
|
||||
@Nullable public static final ItemType GREEN_CANDLE = init();
|
||||
@Nullable public static final ItemType GRAY_CARPET = init();
|
||||
@Nullable public static final ItemType GRAY_CONCRETE = init();
|
||||
@Nullable public static final ItemType GRAY_CONCRETE_POWDER = init();
|
||||
@ -440,6 +501,7 @@ public final class ItemTypes {
|
||||
@Nullable public static final ItemType GRINDSTONE = init();
|
||||
@Nullable public static final ItemType GUARDIAN_SPAWN_EGG = init();
|
||||
@Nullable public static final ItemType GUNPOWDER = init();
|
||||
@Nullable public static final ItemType HANGING_ROOTS = init();
|
||||
@Nullable public static final ItemType HAY_BLOCK = init();
|
||||
@Nullable public static final ItemType HEART_OF_THE_SEA = init();
|
||||
@Nullable public static final ItemType HEAVY_WEIGHTED_PRESSURE_PLATE = init();
|
||||
@ -459,6 +521,7 @@ public final class ItemTypes {
|
||||
@Nullable public static final ItemType INFESTED_CHISELED_STONE_BRICKS = init();
|
||||
@Nullable public static final ItemType INFESTED_COBBLESTONE = init();
|
||||
@Nullable public static final ItemType INFESTED_CRACKED_STONE_BRICKS = init();
|
||||
@Nullable public static final ItemType INFESTED_DEEPSLATE = init();
|
||||
@Nullable public static final ItemType INFESTED_MOSSY_STONE_BRICKS = init();
|
||||
@Nullable public static final ItemType INFESTED_STONE = init();
|
||||
@Nullable public static final ItemType INFESTED_STONE_BRICKS = init();
|
||||
@ -506,6 +569,7 @@ public final class ItemTypes {
|
||||
@Nullable public static final ItemType LAPIS_BLOCK = init();
|
||||
@Nullable public static final ItemType LAPIS_LAZULI = init();
|
||||
@Nullable public static final ItemType LAPIS_ORE = init();
|
||||
@Nullable public static final ItemType LARGE_AMETHYST_BUD = init();
|
||||
@Nullable public static final ItemType LARGE_FERN = init();
|
||||
@Nullable public static final ItemType LAVA_BUCKET = init();
|
||||
@Nullable public static final ItemType LEAD = init();
|
||||
@ -517,8 +581,10 @@ public final class ItemTypes {
|
||||
@Nullable public static final ItemType LEATHER_LEGGINGS = init();
|
||||
@Nullable public static final ItemType LECTERN = init();
|
||||
@Nullable public static final ItemType LEVER = init();
|
||||
@Nullable public static final ItemType LIGHT = init();
|
||||
@Nullable public static final ItemType LIGHT_BLUE_BANNER = init();
|
||||
@Nullable public static final ItemType LIGHT_BLUE_BED = init();
|
||||
@Nullable public static final ItemType LIGHT_BLUE_CANDLE = init();
|
||||
@Nullable public static final ItemType LIGHT_BLUE_CARPET = init();
|
||||
@Nullable public static final ItemType LIGHT_BLUE_CONCRETE = init();
|
||||
@Nullable public static final ItemType LIGHT_BLUE_CONCRETE_POWDER = init();
|
||||
@ -531,6 +597,7 @@ public final class ItemTypes {
|
||||
@Nullable public static final ItemType LIGHT_BLUE_WOOL = init();
|
||||
@Nullable public static final ItemType LIGHT_GRAY_BANNER = init();
|
||||
@Nullable public static final ItemType LIGHT_GRAY_BED = init();
|
||||
@Nullable public static final ItemType LIGHT_GRAY_CANDLE = init();
|
||||
@Nullable public static final ItemType LIGHT_GRAY_CARPET = init();
|
||||
@Nullable public static final ItemType LIGHT_GRAY_CONCRETE = init();
|
||||
@Nullable public static final ItemType LIGHT_GRAY_CONCRETE_POWDER = init();
|
||||
@ -542,11 +609,13 @@ public final class ItemTypes {
|
||||
@Nullable public static final ItemType LIGHT_GRAY_TERRACOTTA = init();
|
||||
@Nullable public static final ItemType LIGHT_GRAY_WOOL = init();
|
||||
@Nullable public static final ItemType LIGHT_WEIGHTED_PRESSURE_PLATE = init();
|
||||
@Nullable public static final ItemType LIGHTNING_ROD = init();
|
||||
@Nullable public static final ItemType LILAC = init();
|
||||
@Nullable public static final ItemType LILY_OF_THE_VALLEY = init();
|
||||
@Nullable public static final ItemType LILY_PAD = init();
|
||||
@Nullable public static final ItemType LIME_BANNER = init();
|
||||
@Nullable public static final ItemType LIME_BED = init();
|
||||
@Nullable public static final ItemType LIME_CANDLE = init();
|
||||
@Nullable public static final ItemType LIME_CARPET = init();
|
||||
@Nullable public static final ItemType LIME_CONCRETE = init();
|
||||
@Nullable public static final ItemType LIME_CONCRETE_POWDER = init();
|
||||
@ -563,6 +632,7 @@ public final class ItemTypes {
|
||||
@Nullable public static final ItemType LOOM = init();
|
||||
@Nullable public static final ItemType MAGENTA_BANNER = init();
|
||||
@Nullable public static final ItemType MAGENTA_BED = init();
|
||||
@Nullable public static final ItemType MAGENTA_CANDLE = init();
|
||||
@Nullable public static final ItemType MAGENTA_CARPET = init();
|
||||
@Nullable public static final ItemType MAGENTA_CONCRETE = init();
|
||||
@Nullable public static final ItemType MAGENTA_CONCRETE_POWDER = init();
|
||||
@ -577,6 +647,7 @@ public final class ItemTypes {
|
||||
@Nullable public static final ItemType MAGMA_CREAM = init();
|
||||
@Nullable public static final ItemType MAGMA_CUBE_SPAWN_EGG = init();
|
||||
@Nullable public static final ItemType MAP = init();
|
||||
@Nullable public static final ItemType MEDIUM_AMETHYST_BUD = init();
|
||||
@Nullable public static final ItemType MELON = init();
|
||||
@Nullable public static final ItemType MELON_SEEDS = init();
|
||||
@Nullable public static final ItemType MELON_SLICE = init();
|
||||
@ -584,6 +655,8 @@ public final class ItemTypes {
|
||||
@Nullable public static final ItemType MINECART = init();
|
||||
@Nullable public static final ItemType MOJANG_BANNER_PATTERN = init();
|
||||
@Nullable public static final ItemType MOOSHROOM_SPAWN_EGG = init();
|
||||
@Nullable public static final ItemType MOSS_BLOCK = init();
|
||||
@Nullable public static final ItemType MOSS_CARPET = init();
|
||||
@Nullable public static final ItemType MOSSY_COBBLESTONE = init();
|
||||
@Nullable public static final ItemType MOSSY_COBBLESTONE_SLAB = init();
|
||||
@Nullable public static final ItemType MOSSY_COBBLESTONE_STAIRS = init();
|
||||
@ -658,6 +731,7 @@ public final class ItemTypes {
|
||||
@Nullable public static final ItemType OCELOT_SPAWN_EGG = init();
|
||||
@Nullable public static final ItemType ORANGE_BANNER = init();
|
||||
@Nullable public static final ItemType ORANGE_BED = init();
|
||||
@Nullable public static final ItemType ORANGE_CANDLE = init();
|
||||
@Nullable public static final ItemType ORANGE_CARPET = init();
|
||||
@Nullable public static final ItemType ORANGE_CONCRETE = init();
|
||||
@Nullable public static final ItemType ORANGE_CONCRETE_POWDER = init();
|
||||
@ -670,6 +744,10 @@ public final class ItemTypes {
|
||||
@Nullable public static final ItemType ORANGE_TULIP = init();
|
||||
@Nullable public static final ItemType ORANGE_WOOL = init();
|
||||
@Nullable public static final ItemType OXEYE_DAISY = init();
|
||||
@Nullable public static final ItemType OXIDIZED_COPPER = init();
|
||||
@Nullable public static final ItemType OXIDIZED_CUT_COPPER = init();
|
||||
@Nullable public static final ItemType OXIDIZED_CUT_COPPER_SLAB = init();
|
||||
@Nullable public static final ItemType OXIDIZED_CUT_COPPER_STAIRS = init();
|
||||
@Nullable public static final ItemType PACKED_ICE = init();
|
||||
@Nullable public static final ItemType PAINTING = init();
|
||||
@Nullable public static final ItemType PANDA_SPAWN_EGG = init();
|
||||
@ -685,6 +763,7 @@ public final class ItemTypes {
|
||||
@Nullable public static final ItemType PILLAGER_SPAWN_EGG = init();
|
||||
@Nullable public static final ItemType PINK_BANNER = init();
|
||||
@Nullable public static final ItemType PINK_BED = init();
|
||||
@Nullable public static final ItemType PINK_CANDLE = init();
|
||||
@Nullable public static final ItemType PINK_CARPET = init();
|
||||
@Nullable public static final ItemType PINK_CONCRETE = init();
|
||||
@Nullable public static final ItemType PINK_CONCRETE_POWDER = init();
|
||||
@ -699,6 +778,7 @@ public final class ItemTypes {
|
||||
@Nullable public static final ItemType PISTON = init();
|
||||
@Nullable public static final ItemType PLAYER_HEAD = init();
|
||||
@Nullable public static final ItemType PODZOL = init();
|
||||
@Nullable public static final ItemType POINTED_DRIPSTONE = init();
|
||||
@Nullable public static final ItemType POISONOUS_POTATO = init();
|
||||
@Nullable public static final ItemType POLAR_BEAR_SPAWN_EGG = init();
|
||||
@Nullable public static final ItemType POLISHED_ANDESITE = init();
|
||||
@ -715,6 +795,10 @@ public final class ItemTypes {
|
||||
@Nullable public static final ItemType POLISHED_BLACKSTONE_SLAB = init();
|
||||
@Nullable public static final ItemType POLISHED_BLACKSTONE_STAIRS = init();
|
||||
@Nullable public static final ItemType POLISHED_BLACKSTONE_WALL = init();
|
||||
@Nullable public static final ItemType POLISHED_DEEPSLATE = init();
|
||||
@Nullable public static final ItemType POLISHED_DEEPSLATE_SLAB = init();
|
||||
@Nullable public static final ItemType POLISHED_DEEPSLATE_STAIRS = init();
|
||||
@Nullable public static final ItemType POLISHED_DEEPSLATE_WALL = init();
|
||||
@Nullable public static final ItemType POLISHED_DIORITE = init();
|
||||
@Nullable public static final ItemType POLISHED_DIORITE_SLAB = init();
|
||||
@Nullable public static final ItemType POLISHED_DIORITE_STAIRS = init();
|
||||
@ -726,6 +810,7 @@ public final class ItemTypes {
|
||||
@Nullable public static final ItemType PORKCHOP = init();
|
||||
@Nullable public static final ItemType POTATO = init();
|
||||
@Nullable public static final ItemType POTION = init();
|
||||
@Nullable public static final ItemType POWDER_SNOW_BUCKET = init();
|
||||
@Nullable public static final ItemType POWERED_RAIL = init();
|
||||
@Nullable public static final ItemType PRISMARINE = init();
|
||||
@Nullable public static final ItemType PRISMARINE_BRICK_SLAB = init();
|
||||
@ -744,6 +829,7 @@ public final class ItemTypes {
|
||||
@Nullable public static final ItemType PUMPKIN_SEEDS = init();
|
||||
@Nullable public static final ItemType PURPLE_BANNER = init();
|
||||
@Nullable public static final ItemType PURPLE_BED = init();
|
||||
@Nullable public static final ItemType PURPLE_CANDLE = init();
|
||||
@Nullable public static final ItemType PURPLE_CARPET = init();
|
||||
@Nullable public static final ItemType PURPLE_CONCRETE = init();
|
||||
@Nullable public static final ItemType PURPLE_CONCRETE_POWDER = init();
|
||||
@ -771,8 +857,15 @@ public final class ItemTypes {
|
||||
@Nullable public static final ItemType RABBIT_STEW = init();
|
||||
@Nullable public static final ItemType RAIL = init();
|
||||
@Nullable public static final ItemType RAVAGER_SPAWN_EGG = init();
|
||||
@Nullable public static final ItemType RAW_COPPER = init();
|
||||
@Nullable public static final ItemType RAW_COPPER_BLOCK = init();
|
||||
@Nullable public static final ItemType RAW_GOLD = init();
|
||||
@Nullable public static final ItemType RAW_GOLD_BLOCK = init();
|
||||
@Nullable public static final ItemType RAW_IRON = init();
|
||||
@Nullable public static final ItemType RAW_IRON_BLOCK = init();
|
||||
@Nullable public static final ItemType RED_BANNER = init();
|
||||
@Nullable public static final ItemType RED_BED = init();
|
||||
@Nullable public static final ItemType RED_CANDLE = init();
|
||||
@Nullable public static final ItemType RED_CARPET = init();
|
||||
@Nullable public static final ItemType RED_CONCRETE = init();
|
||||
@Nullable public static final ItemType RED_CONCRETE_POWDER = init();
|
||||
@ -803,6 +896,7 @@ public final class ItemTypes {
|
||||
@Nullable public static final ItemType REPEATER = init();
|
||||
@Nullable public static final ItemType REPEATING_COMMAND_BLOCK = init();
|
||||
@Nullable public static final ItemType RESPAWN_ANCHOR = init();
|
||||
@Nullable public static final ItemType ROOTED_DIRT = init();
|
||||
@Nullable public static final ItemType ROSE_BUSH = init();
|
||||
@Deprecated @Nullable public static final ItemType ROSE_RED = init();
|
||||
@Nullable public static final ItemType ROTTEN_FLESH = init();
|
||||
@ -816,6 +910,7 @@ public final class ItemTypes {
|
||||
@Nullable public static final ItemType SANDSTONE_STAIRS = init();
|
||||
@Nullable public static final ItemType SANDSTONE_WALL = init();
|
||||
@Nullable public static final ItemType SCAFFOLDING = init();
|
||||
@Nullable public static final ItemType SCULK_SENSOR = init();
|
||||
@Nullable public static final ItemType SCUTE = init();
|
||||
@Nullable public static final ItemType SEA_LANTERN = init();
|
||||
@Nullable public static final ItemType SEA_PICKLE = init();
|
||||
@ -836,8 +931,11 @@ public final class ItemTypes {
|
||||
@Nullable public static final ItemType SLIME_BALL = init();
|
||||
@Nullable public static final ItemType SLIME_BLOCK = init();
|
||||
@Nullable public static final ItemType SLIME_SPAWN_EGG = init();
|
||||
@Nullable public static final ItemType SMALL_AMETHYST_BUD = init();
|
||||
@Nullable public static final ItemType SMALL_DRIPLEAF = init();
|
||||
@Nullable public static final ItemType SMITHING_TABLE = init();
|
||||
@Nullable public static final ItemType SMOKER = init();
|
||||
@Nullable public static final ItemType SMOOTH_BASALT = init();
|
||||
@Nullable public static final ItemType SMOOTH_QUARTZ = init();
|
||||
@Nullable public static final ItemType SMOOTH_QUARTZ_SLAB = init();
|
||||
@Nullable public static final ItemType SMOOTH_QUARTZ_STAIRS = init();
|
||||
@ -863,6 +961,7 @@ public final class ItemTypes {
|
||||
@Nullable public static final ItemType SPIDER_SPAWN_EGG = init();
|
||||
@Nullable public static final ItemType SPLASH_POTION = init();
|
||||
@Nullable public static final ItemType SPONGE = init();
|
||||
@Nullable public static final ItemType SPORE_BLOSSOM = init();
|
||||
@Nullable public static final ItemType SPRUCE_BOAT = init();
|
||||
@Nullable public static final ItemType SPRUCE_BUTTON = init();
|
||||
@Nullable public static final ItemType SPRUCE_DOOR = init();
|
||||
@ -878,6 +977,7 @@ public final class ItemTypes {
|
||||
@Nullable public static final ItemType SPRUCE_STAIRS = init();
|
||||
@Nullable public static final ItemType SPRUCE_TRAPDOOR = init();
|
||||
@Nullable public static final ItemType SPRUCE_WOOD = init();
|
||||
@Nullable public static final ItemType SPYGLASS = init();
|
||||
@Nullable public static final ItemType SQUID_SPAWN_EGG = init();
|
||||
@Nullable public static final ItemType STICK = init();
|
||||
@Nullable public static final ItemType STICKY_PISTON = init();
|
||||
@ -925,6 +1025,7 @@ public final class ItemTypes {
|
||||
@Nullable public static final ItemType TALL_GRASS = init();
|
||||
@Nullable public static final ItemType TARGET = init();
|
||||
@Nullable public static final ItemType TERRACOTTA = init();
|
||||
@Nullable public static final ItemType TINTED_GLASS = init();
|
||||
@Nullable public static final ItemType TIPPED_ARROW = init();
|
||||
@Nullable public static final ItemType TNT = init();
|
||||
@Nullable public static final ItemType TNT_MINECART = init();
|
||||
@ -940,6 +1041,7 @@ public final class ItemTypes {
|
||||
@Nullable public static final ItemType TUBE_CORAL = init();
|
||||
@Nullable public static final ItemType TUBE_CORAL_BLOCK = init();
|
||||
@Nullable public static final ItemType TUBE_CORAL_FAN = init();
|
||||
@Nullable public static final ItemType TUFF = init();
|
||||
@Nullable public static final ItemType TURTLE_EGG = init();
|
||||
@Nullable public static final ItemType TURTLE_HELMET = init();
|
||||
@Nullable public static final ItemType TURTLE_SPAWN_EGG = init();
|
||||
@ -967,12 +1069,33 @@ public final class ItemTypes {
|
||||
@Nullable public static final ItemType WARPED_TRAPDOOR = init();
|
||||
@Nullable public static final ItemType WARPED_WART_BLOCK = init();
|
||||
@Nullable public static final ItemType WATER_BUCKET = init();
|
||||
@Nullable public static final ItemType WAXED_COPPER_BLOCK = init();
|
||||
@Nullable public static final ItemType WAXED_CUT_COPPER = init();
|
||||
@Nullable public static final ItemType WAXED_CUT_COPPER_SLAB = init();
|
||||
@Nullable public static final ItemType WAXED_CUT_COPPER_STAIRS = init();
|
||||
@Nullable public static final ItemType WAXED_EXPOSED_COPPER = init();
|
||||
@Nullable public static final ItemType WAXED_EXPOSED_CUT_COPPER = init();
|
||||
@Nullable public static final ItemType WAXED_EXPOSED_CUT_COPPER_SLAB = init();
|
||||
@Nullable public static final ItemType WAXED_EXPOSED_CUT_COPPER_STAIRS = init();
|
||||
@Nullable public static final ItemType WAXED_OXIDIZED_COPPER = init();
|
||||
@Nullable public static final ItemType WAXED_OXIDIZED_CUT_COPPER = init();
|
||||
@Nullable public static final ItemType WAXED_OXIDIZED_CUT_COPPER_SLAB = init();
|
||||
@Nullable public static final ItemType WAXED_OXIDIZED_CUT_COPPER_STAIRS = init();
|
||||
@Nullable public static final ItemType WAXED_WEATHERED_COPPER = init();
|
||||
@Nullable public static final ItemType WAXED_WEATHERED_CUT_COPPER = init();
|
||||
@Nullable public static final ItemType WAXED_WEATHERED_CUT_COPPER_SLAB = init();
|
||||
@Nullable public static final ItemType WAXED_WEATHERED_CUT_COPPER_STAIRS = init();
|
||||
@Nullable public static final ItemType WEATHERED_COPPER = init();
|
||||
@Nullable public static final ItemType WEATHERED_CUT_COPPER = init();
|
||||
@Nullable public static final ItemType WEATHERED_CUT_COPPER_SLAB = init();
|
||||
@Nullable public static final ItemType WEATHERED_CUT_COPPER_STAIRS = init();
|
||||
@Nullable public static final ItemType WEEPING_VINES = init();
|
||||
@Nullable public static final ItemType WET_SPONGE = init();
|
||||
@Nullable public static final ItemType WHEAT = init();
|
||||
@Nullable public static final ItemType WHEAT_SEEDS = init();
|
||||
@Nullable public static final ItemType WHITE_BANNER = init();
|
||||
@Nullable public static final ItemType WHITE_BED = init();
|
||||
@Nullable public static final ItemType WHITE_CANDLE = init();
|
||||
@Nullable public static final ItemType WHITE_CARPET = init();
|
||||
@Nullable public static final ItemType WHITE_CONCRETE = init();
|
||||
@Nullable public static final ItemType WHITE_CONCRETE_POWDER = init();
|
||||
@ -998,6 +1121,7 @@ public final class ItemTypes {
|
||||
@Nullable public static final ItemType WRITTEN_BOOK = init();
|
||||
@Nullable public static final ItemType YELLOW_BANNER = init();
|
||||
@Nullable public static final ItemType YELLOW_BED = init();
|
||||
@Nullable public static final ItemType YELLOW_CANDLE = init();
|
||||
@Nullable public static final ItemType YELLOW_CARPET = init();
|
||||
@Nullable public static final ItemType YELLOW_CONCRETE = init();
|
||||
@Nullable public static final ItemType YELLOW_CONCRETE_POWDER = init();
|
||||
|
@ -96,7 +96,9 @@ public final class BundledBlockData {
|
||||
Gson gson = gsonBuilder.create();
|
||||
URL url = null;
|
||||
final int dataVersion = WorldEdit.getInstance().getPlatformManager().queryCapability(Capability.WORLD_EDITING).getDataVersion();
|
||||
if (dataVersion >= Constants.DATA_VERSION_MC_1_16) {
|
||||
if (dataVersion >= Constants.DATA_VERSION_MC_1_17) {
|
||||
url = resourceLoader.getResource(BundledBlockData.class, "blocks.117.json");
|
||||
} else if (dataVersion >= Constants.DATA_VERSION_MC_1_16) {
|
||||
url = resourceLoader.getResource(BundledBlockData.class, "blocks.116.json");
|
||||
} else if (dataVersion >= Constants.DATA_VERSION_MC_1_15) {
|
||||
url = resourceLoader.getResource(BundledBlockData.class, "blocks.115.json");
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
package com.sk89q.worldedit.world.registry;
|
||||
|
||||
import com.boydti.fawe.config.Caption;
|
||||
import com.fastasyncworldedit.core.configuration.Caption;
|
||||
import com.sk89q.worldedit.registry.state.Property;
|
||||
import com.sk89q.worldedit.util.formatting.text.Component;
|
||||
import com.sk89q.worldedit.util.formatting.text.TextComponent;
|
||||
|
@ -83,7 +83,9 @@ public final class BundledItemData {
|
||||
Gson gson = gsonBuilder.create();
|
||||
URL url = null;
|
||||
final int dataVersion = WorldEdit.getInstance().getPlatformManager().queryCapability(Capability.WORLD_EDITING).getDataVersion();
|
||||
if (dataVersion >= Constants.DATA_VERSION_MC_1_16) {
|
||||
if (dataVersion >= Constants.DATA_VERSION_MC_1_17) {
|
||||
url = resourceLoader.getResource(BundledBlockData.class, "items.117.json");
|
||||
} else if (dataVersion >= Constants.DATA_VERSION_MC_1_16) {
|
||||
url = resourceLoader.getResource(BundledBlockData.class, "items.116.json");
|
||||
} else if (dataVersion >= Constants.DATA_VERSION_MC_1_15) {
|
||||
url = resourceLoader.getResource(BundledBlockData.class, "items.115.json");
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
package com.sk89q.worldedit.world.registry;
|
||||
|
||||
import com.boydti.fawe.config.Caption;
|
||||
import com.fastasyncworldedit.core.configuration.Caption;
|
||||
import com.sk89q.worldedit.util.formatting.text.Component;
|
||||
import com.sk89q.worldedit.util.formatting.text.TextComponent;
|
||||
import com.sk89q.worldedit.util.translation.TranslationManager;
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
package com.sk89q.worldedit.world.registry;
|
||||
|
||||
import com.boydti.fawe.config.Caption;
|
||||
import com.fastasyncworldedit.core.configuration.Caption;
|
||||
import com.sk89q.worldedit.util.formatting.text.Component;
|
||||
import com.sk89q.worldedit.util.translation.TranslationManager;
|
||||
import com.sk89q.worldedit.world.biome.BiomeData;
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
package com.sk89q.worldedit.world.snapshot;
|
||||
|
||||
import com.boydti.fawe.object.collection.LocalBlockVectorSet;
|
||||
import com.fastasyncworldedit.core.object.collection.LocalBlockVectorSet;
|
||||
import com.sk89q.worldedit.EditSession;
|
||||
import com.sk89q.worldedit.MaxChangedBlocksException;
|
||||
import com.sk89q.worldedit.math.BlockVector2;
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
package com.sk89q.worldedit.world.storage;
|
||||
|
||||
import com.sk89q.jnbt.AdventureNBTConverter;
|
||||
import com.sk89q.jnbt.CompoundTag;
|
||||
import com.sk89q.jnbt.NBTInputStream;
|
||||
import com.sk89q.jnbt.Tag;
|
||||
@ -96,7 +97,7 @@ public class ChunkStoreHelper {
|
||||
if (tag.getValue().containsKey("Sections") && dataVersion < currentDataVersion) { // only fix up MCA format, DFU doesn't support MCR chunks
|
||||
final DataFixer dataFixer = platform.getDataFixer();
|
||||
if (dataFixer != null) {
|
||||
tag = (CompoundTag) dataFixer.fixUp(DataFixer.FixTypes.CHUNK, rootTag, dataVersion).getValue().get("Level");
|
||||
tag = (CompoundTag) ((CompoundTag) AdventureNBTConverter.fromAdventure(dataFixer.fixUp(DataFixer.FixTypes.CHUNK, rootTag.asBinaryTag(), dataVersion))).getValue().get("Level");
|
||||
dataVersion = currentDataVersion;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user