@@ -197,7 +197,7 @@ public final class CraftChatMessage {
|
||||
private static IChatBaseComponent fixComponent(IChatBaseComponent component, Matcher matcher) {
|
||||
if (component instanceof ChatComponentText) {
|
||||
ChatComponentText text = ((ChatComponentText) component);
|
||||
String msg = text.f();
|
||||
String msg = text.getText();
|
||||
if (matcher.reset(msg).find()) {
|
||||
matcher.reset();
|
||||
|
||||
@@ -248,7 +248,7 @@ public final class CraftChatMessage {
|
||||
}
|
||||
|
||||
if (component instanceof ChatMessage) {
|
||||
Object[] subs = ((ChatMessage) component).i();
|
||||
Object[] subs = ((ChatMessage) component).l();
|
||||
for (int i = 0; i < subs.length; i++) {
|
||||
Object comp = subs[i];
|
||||
if (comp instanceof IChatBaseComponent) {
|
||||
|
||||
@@ -19,6 +19,7 @@ import net.minecraft.server.DispenserRegistry;
|
||||
import net.minecraft.server.DynamicOpsNBT;
|
||||
import net.minecraft.server.IBlockData;
|
||||
import net.minecraft.server.IBlockState;
|
||||
import net.minecraft.server.IRegistry;
|
||||
import net.minecraft.server.Item;
|
||||
import net.minecraft.server.Items;
|
||||
import net.minecraft.server.MinecraftKey;
|
||||
@@ -333,7 +334,10 @@ public class CraftLegacy {
|
||||
name = "minecraft:nether_portal";
|
||||
}
|
||||
|
||||
Block block = Block.REGISTRY.get(new MinecraftKey(name));
|
||||
Block block = IRegistry.BLOCK.get(new MinecraftKey(name));
|
||||
if (block == null) {
|
||||
continue;
|
||||
}
|
||||
IBlockData blockData = block.getBlockData();
|
||||
BlockStateList states = block.getStates();
|
||||
|
||||
@@ -405,7 +409,7 @@ public class CraftLegacy {
|
||||
}
|
||||
|
||||
// Preconditions.checkState(newId.contains("minecraft:"), "Unknown new material for " + matData);
|
||||
Item newMaterial = Item.REGISTRY.get(new MinecraftKey(newId));
|
||||
Item newMaterial = IRegistry.ITEM.get(new MinecraftKey(newId));
|
||||
|
||||
if (newMaterial == Items.AIR) {
|
||||
continue;
|
||||
|
||||
@@ -17,6 +17,7 @@ import net.minecraft.server.AdvancementDataWorld;
|
||||
import net.minecraft.server.Block;
|
||||
import net.minecraft.server.ChatDeserializer;
|
||||
import net.minecraft.server.IBlockData;
|
||||
import net.minecraft.server.IRegistry;
|
||||
import net.minecraft.server.Item;
|
||||
import net.minecraft.server.MinecraftKey;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
@@ -74,19 +75,19 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
private static final Map<Material, Block> MATERIAL_BLOCK = new HashMap<>();
|
||||
|
||||
static {
|
||||
for (Block block : (Iterable<Block>) Block.REGISTRY) { // Eclipse fail
|
||||
BLOCK_MATERIAL.put(block, Material.getMaterial(Block.REGISTRY.b(block).getKey().toUpperCase(Locale.ROOT)));
|
||||
for (Block block : (Iterable<Block>) IRegistry.BLOCK) { // Eclipse fail
|
||||
BLOCK_MATERIAL.put(block, Material.getMaterial(IRegistry.BLOCK.getKey(block).getKey().toUpperCase(Locale.ROOT)));
|
||||
}
|
||||
|
||||
for (Item item : (Iterable<Item>) Item.REGISTRY) { // Eclipse fail
|
||||
ITEM_MATERIAL.put(item, Material.getMaterial(Item.REGISTRY.b(item).getKey().toUpperCase(Locale.ROOT)));
|
||||
for (Item item : (Iterable<Item>) IRegistry.ITEM) { // Eclipse fail
|
||||
ITEM_MATERIAL.put(item, Material.getMaterial(IRegistry.ITEM.getKey(item).getKey().toUpperCase(Locale.ROOT)));
|
||||
}
|
||||
|
||||
for (Material material : Material.values()) {
|
||||
MinecraftKey key = key(material);
|
||||
// TODO: only register if block/item?
|
||||
MATERIAL_ITEM.put(material, Item.REGISTRY.get(key));
|
||||
MATERIAL_BLOCK.put(material, Block.REGISTRY.get(key));
|
||||
MATERIAL_ITEM.put(material, IRegistry.ITEM.get(key));
|
||||
MATERIAL_BLOCK.put(material, IRegistry.BLOCK.get(key));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -144,7 +145,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
return CraftBlockData.fromData(getBlock(material, data));
|
||||
}
|
||||
|
||||
public static final int DATA_VERSION = 1519;
|
||||
public static final int DATA_VERSION = 1628;
|
||||
|
||||
@Override
|
||||
public int getDataVersion() {
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
package org.bukkit.craftbukkit.util;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import java.util.function.Function;
|
||||
import java.util.function.Predicate;
|
||||
import net.minecraft.server.AxisAlignedBB;
|
||||
import net.minecraft.server.BiomeBase;
|
||||
import net.minecraft.server.Block;
|
||||
import net.minecraft.server.BlockPosition;
|
||||
@@ -22,7 +19,6 @@ import net.minecraft.server.IChunkAccess;
|
||||
import net.minecraft.server.IChunkProvider;
|
||||
import net.minecraft.server.IDataManager;
|
||||
import net.minecraft.server.ParticleParam;
|
||||
import net.minecraft.server.PersistentBase;
|
||||
import net.minecraft.server.PersistentCollection;
|
||||
import net.minecraft.server.SoundCategory;
|
||||
import net.minecraft.server.SoundEffect;
|
||||
@@ -48,17 +44,17 @@ public class DummyGeneratorAccess implements GeneratorAccess {
|
||||
}
|
||||
|
||||
@Override
|
||||
public TickList<Block> I() {
|
||||
public TickList<Block> J() {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public TickList<FluidType> H() {
|
||||
public TickList<FluidType> I() {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public IChunkAccess c(int i, int i1) {
|
||||
public IChunkAccess b(int i, int i1) {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
@@ -77,16 +73,6 @@ public class DummyGeneratorAccess implements GeneratorAccess {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T extends PersistentBase> T a(Function<String, T> fnctn, String string) {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public PersistentCollection s_() {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public IChunkProvider getChunkProvider() {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
@@ -177,11 +163,6 @@ public class DummyGeneratorAccess implements GeneratorAccess {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Entity> getEntities(Entity entity, AxisAlignedBB aabb) {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int a(BlockPosition bp, EnumDirection ed) {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
@@ -217,6 +198,11 @@ public class DummyGeneratorAccess implements GeneratorAccess {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public PersistentCollection h() {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean setTypeAndData(BlockPosition blockposition, IBlockData iblockdata, int i) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user