Start migration

This commit is contained in:
Aleksey 2021-04-08 21:55:07 +03:00
parent 6630ce0cab
commit 47ed597358
491 changed files with 12045 additions and 11953 deletions

View file

@ -6,13 +6,13 @@ import java.util.HashMap;
import java.util.List;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.TrapdoorBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.loot.context.LootContext;
import net.minecraft.util.Identifier;
import net.minecraft.util.registry.Registry;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.TrapdoorBlock;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.storage.loot.LootContext;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.core.Registry;
import ru.betterend.client.render.ERenderLayer;
import ru.betterend.interfaces.IRenderTypeable;
import ru.betterend.patterns.BlockPatterned;
@ -24,24 +24,24 @@ public class EndTrapdoorBlock extends TrapdoorBlock implements IRenderTypeable,
}
@Override
public List<ItemStack> getDroppedStacks(BlockState state, LootContext.Builder builder) {
public List<ItemStack> getDrops(BlockState state, LootContext.Builder builder) {
return Collections.singletonList(new ItemStack(this));
}
@Override
public ERenderLayer getRenderLayer() {
return ERenderLayer.CUTOUT;
}
@Override
public String getStatesPattern(Reader data) {
String block = Registry.BLOCK.getId(this).getPath();
String block = Registry.BLOCK.getKey(this).getPath();
return Patterns.createJson(data, block, block);
}
@Override
public String getModelPattern(String block) {
Identifier blockId = Registry.BLOCK.getId(this);
ResourceLocation blockId = Registry.BLOCK.getKey(this);
String name = blockId.getPath();
return Patterns.createJson(Patterns.BLOCK_TRAPDOOR, new HashMap<String, String>() {
private static final long serialVersionUID = 1L;
@ -51,9 +51,9 @@ public class EndTrapdoorBlock extends TrapdoorBlock implements IRenderTypeable,
}
});
}
@Override
public Identifier statePatternId() {
public ResourceLocation statePatternId() {
return Patterns.STATE_TRAPDOOR;
}
}