Continue mapping migration
This commit is contained in:
parent
99ade39404
commit
f03fd03bd0
499 changed files with 12567 additions and 12723 deletions
|
@ -8,17 +8,17 @@ import java.util.Map;
|
|||
import com.google.common.collect.Maps;
|
||||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.block.AnvilBlock;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.material.MaterialColor;
|
||||
import net.minecraft.world.level.storage.loot.LootContext;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.block.state.StateDefinition;
|
||||
import net.minecraft.world.level.block.state.properties.IntegerProperty;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.world.level.material.MaterialColor;
|
||||
import net.minecraft.world.level.storage.loot.LootContext;
|
||||
import ru.betterend.blocks.BlockProperties;
|
||||
import ru.betterend.patterns.BlockPatterned;
|
||||
import ru.betterend.patterns.Patterns;
|
||||
|
@ -26,37 +26,37 @@ import ru.betterend.patterns.Patterns;
|
|||
public class EndAnvilBlock extends AnvilBlock implements BlockPatterned {
|
||||
private static final IntegerProperty DESTRUCTION = BlockProperties.DESTRUCTION;
|
||||
protected final int level;
|
||||
|
||||
|
||||
public EndAnvilBlock(MaterialColor color, int level) {
|
||||
super(FabricBlockSettings.copyOf(Blocks.ANVIL).materialColor(color));
|
||||
this.level = level;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
|
||||
super.createBlockStateDefinition(builder);
|
||||
builder.add(DESTRUCTION);
|
||||
}
|
||||
|
||||
public IntegerProperty getDESTRUCTION() {
|
||||
public IntegerProperty getDestructionProperty() {
|
||||
return DESTRUCTION;
|
||||
}
|
||||
|
||||
public int getCraftingLevel() {
|
||||
return level;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
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);
|
||||
return Patterns.createJson(data, blockId.getPath(), blockId.getPath());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getModelPattern(String block) {
|
||||
ResourceLocation blockId = Registry.BLOCK.getKey(this);
|
||||
|
@ -73,7 +73,7 @@ public class EndAnvilBlock extends AnvilBlock implements BlockPatterned {
|
|||
char last = block.charAt(block.length() - 1);
|
||||
return blockId.getPath() + "_top_" + last;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ResourceLocation statePatternId() {
|
||||
return Patterns.STATE_ANVIL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue