mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-11 20:13:55 +00:00
Rename legacy things to bundled things.
This commit is contained in:
@ -33,7 +33,7 @@ import com.sk89q.worldedit.regions.Region;
|
||||
import com.sk89q.worldedit.util.Location;
|
||||
import com.sk89q.worldedit.util.TreeGenerator.TreeType;
|
||||
import com.sk89q.worldedit.world.biome.BaseBiome;
|
||||
import com.sk89q.worldedit.world.registry.LegacyWorldData;
|
||||
import com.sk89q.worldedit.world.registry.BundledWorldData;
|
||||
import com.sk89q.worldedit.world.registry.WorldData;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
@ -97,7 +97,7 @@ public class NullWorld extends AbstractWorld {
|
||||
|
||||
@Override
|
||||
public WorldData getWorldData() {
|
||||
return LegacyWorldData.getInstance();
|
||||
return BundledWorldData.getInstance();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -144,23 +144,6 @@ public class BundledBlockData {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the material properties for the given block.
|
||||
*
|
||||
* @param id the legacy numeric ID
|
||||
* @return the material's properties, or null
|
||||
*/
|
||||
@Nullable
|
||||
@Deprecated
|
||||
public BlockMaterial getMaterialById(int id) {
|
||||
BlockEntry entry = findById(id);
|
||||
if (entry != null) {
|
||||
return entry.material;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the material properties for the given block.
|
||||
*
|
||||
@ -177,23 +160,6 @@ public class BundledBlockData {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the states for the given block.
|
||||
*
|
||||
* @param id the legacy numeric ID
|
||||
* @return the block's states, or null if no information is available
|
||||
*/
|
||||
@Nullable
|
||||
@Deprecated
|
||||
public Map<String, ? extends State> getStatesById(int id) {
|
||||
BlockEntry entry = findById(id);
|
||||
if (entry != null) {
|
||||
return entry.states;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the states for the given block.
|
||||
*
|
||||
|
@ -30,7 +30,7 @@ import java.util.Map;
|
||||
* A block registry that uses {@link BundledBlockData} to serve information
|
||||
* about blocks.
|
||||
*/
|
||||
public class LegacyBlockRegistry implements BlockRegistry {
|
||||
public class BundledBlockRegistry implements BlockRegistry {
|
||||
|
||||
@Nullable
|
||||
@Override
|
@ -20,13 +20,13 @@
|
||||
package com.sk89q.worldedit.world.registry;
|
||||
|
||||
/**
|
||||
* An implementation of {@link WorldData} that uses legacy numeric IDs and
|
||||
* a built-in block database.
|
||||
* An implementation of {@link WorldData} that converts legacy numeric IDs and
|
||||
* a contains a built-in block database.
|
||||
*/
|
||||
public class LegacyWorldData implements WorldData {
|
||||
public class BundledWorldData implements WorldData {
|
||||
|
||||
private static final LegacyWorldData INSTANCE = new LegacyWorldData();
|
||||
private final LegacyBlockRegistry blockRegistry = new LegacyBlockRegistry();
|
||||
private static final BundledWorldData INSTANCE = new BundledWorldData();
|
||||
private final BundledBlockRegistry blockRegistry = new BundledBlockRegistry();
|
||||
private final NullItemRegistry itemRegistry = new NullItemRegistry();
|
||||
private final NullEntityRegistry entityRegistry = new NullEntityRegistry();
|
||||
private final NullBiomeRegistry biomeRegistry = new NullBiomeRegistry();
|
||||
@ -34,7 +34,7 @@ public class LegacyWorldData implements WorldData {
|
||||
/**
|
||||
* Create a new instance.
|
||||
*/
|
||||
protected LegacyWorldData() {
|
||||
protected BundledWorldData() {
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -62,7 +62,7 @@ public class LegacyWorldData implements WorldData {
|
||||
*
|
||||
* @return an instance
|
||||
*/
|
||||
public static LegacyWorldData getInstance() {
|
||||
public static BundledWorldData getInstance() {
|
||||
return INSTANCE;
|
||||
}
|
||||
|
Reference in New Issue
Block a user