Archived
0

избавляемся от ненужного

This commit is contained in:
2018-11-19 12:45:51 +03:00
parent b1877b1e96
commit b2efb3f8ca
4 changed files with 1 additions and 78 deletions

View File

@@ -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();
}

View File

@@ -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();
}
}

View File

@@ -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();