Removed blockstates patterns

This commit is contained in:
Aleksey 2021-05-18 17:02:28 +03:00
parent 744fe40a00
commit 5dc76a37f2
47 changed files with 60 additions and 650 deletions

View file

@ -1,6 +1,5 @@
package ru.betterend.blocks.basis;
import java.io.Reader;
import java.util.Collections;
import java.util.List;
import java.util.Optional;
@ -28,23 +27,12 @@ public class EndSlabBlock extends SlabBlock implements BlockModelProvider {
public List<ItemStack> getDrops(BlockState state, LootContext.Builder builder) {
return Collections.singletonList(new ItemStack(this));
}
@Override
public String getStatesPattern(Reader data) {
ResourceLocation blockId = Registry.BLOCK.getKey(this);
ResourceLocation parentId = Registry.BLOCK.getKey(parent);
return Patterns.createJson(data, parentId.getPath(), blockId.getPath());
}
@Override
public Optional<String> getModelString(String block) {
ResourceLocation blockId = Registry.BLOCK.getKey(this);
ResourceLocation parentId = Registry.BLOCK.getKey(parent);
return Patterns.createJson(Patterns.BLOCK_SLAB, parentId.getPath(), blockId.getPath());
}
@Override
public ResourceLocation statePatternId() {
return Patterns.STATE_SLAB;
}
}