haven't done one of these in a while
*continuing with merge in previous commit
This commit is contained in:
Jesse Boyd 2019-04-03 17:00:59 +11:00
parent 4cd8d08134
commit 8aef06b29e
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F
4 changed files with 23 additions and 10 deletions

View File

@ -149,11 +149,6 @@ public class CuboidClipboard {
return clipboard;
}
private BaseBlock adapt(BlockState state) {
// if (state instanceof BaseBlock) return (BaseBlock) state;
return new BaseBlock(state);
}
/* ------------------------------------------------------------------------------------------------------------- */
public BaseBlock getBlock(BlockVector3 position) {

View File

@ -22,13 +22,23 @@ package com.sk89q.worldedit.extent;
import com.boydti.fawe.jnbt.anvil.generator.*;
import com.boydti.fawe.object.PseudoRandom;
import com.boydti.fawe.object.clipboard.WorldCopyClipboard;
import com.sk89q.worldedit.WorldEditException;
import com.sk89q.worldedit.entity.BaseEntity;
import com.sk89q.worldedit.entity.Entity;
import com.sk89q.worldedit.extent.clipboard.BlockArrayClipboard;
import com.sk89q.worldedit.function.mask.Mask;
import com.sk89q.worldedit.math.BlockVector2;
import com.sk89q.worldedit.math.BlockVector3;
import com.sk89q.worldedit.regions.Region;
import com.sk89q.worldedit.registry.state.PropertyGroup;
import com.sk89q.worldedit.session.ClipboardHolder;
import com.sk89q.worldedit.util.Countable;
import com.sk89q.worldedit.util.Location;
import com.sk89q.worldedit.world.biome.BiomeType;
import com.sk89q.worldedit.world.block.BlockState;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import com.sk89q.worldedit.world.block.BlockType;
import com.sk89q.worldedit.world.block.BlockTypes;
import javax.annotation.Nullable;
import java.util.ArrayList;

View File

@ -27,11 +27,16 @@ import com.sk89q.worldedit.registry.NamespacedRegistry;
public class BiomeType {
public static final NamespacedRegistry<BiomeType> REGISTRY = new NamespacedRegistry<>("biome type");
private final int internalId;
private final String id;
private String id;
public BiomeType(String id) {
protected BiomeType(String id, int internalId) {
this.id = id;
this.internalId = internalId;
}
public int getInternalId() {
return internalId;
}
/**
@ -50,7 +55,7 @@ public class BiomeType {
@Override
public int hashCode() {
return this.id.hashCode();
return this.internalId;
}
@Override

View File

@ -103,8 +103,11 @@ public class BiomeTypes {
private BiomeTypes() {
}
private static int index = 0;
private static BiomeType register(final String id) {
return register(new BiomeType(id));
// TODO implement registry
return register(new BiomeType(id, index++));
}
public static BiomeType register(final BiomeType biome) {