избавляемся от ненужного
This commit is contained in:
@@ -1,11 +0,0 @@
|
||||
package mc.core.nbt;
|
||||
|
||||
import com.flowpowered.nbt.Tag;
|
||||
|
||||
import java.util.stream.Stream;
|
||||
|
||||
public interface Taggable {
|
||||
Tag<?> getTag(String name);
|
||||
void setTag(Tag<?> tag);
|
||||
Stream<Tag<?>> tagStream();
|
||||
}
|
||||
@@ -1,13 +1,8 @@
|
||||
package mc.core.world.block;
|
||||
|
||||
import com.flowpowered.nbt.Tag;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
public abstract class AbstractBlock implements Block {
|
||||
@Getter
|
||||
@Setter
|
||||
@@ -16,7 +11,6 @@ public abstract class AbstractBlock implements Block {
|
||||
private int light = 0;
|
||||
@Getter
|
||||
private final BlockType blockType;
|
||||
private final Map<String, Tag<?>> nbtTagsMap = new HashMap<>();
|
||||
|
||||
protected AbstractBlock(BlockType type) {
|
||||
this.blockType = type;
|
||||
@@ -28,19 +22,4 @@ public abstract class AbstractBlock implements Block {
|
||||
else if (light < 0) this.light = 0;
|
||||
else this.light = light;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Tag<?> getTag(String name) {
|
||||
return nbtTagsMap.get(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTag(Tag<?> tag) {
|
||||
nbtTagsMap.put(tag.getName(), tag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<Tag<?>> tagStream() {
|
||||
return nbtTagsMap.values().stream();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
package mc.core.world.block;
|
||||
|
||||
import mc.core.nbt.Taggable;
|
||||
|
||||
public interface Block extends Taggable{
|
||||
public interface Block {
|
||||
int getLight();
|
||||
void setLight(int light);
|
||||
BlockType getBlockType();
|
||||
|
||||
Reference in New Issue
Block a user