Architectury-09-添加村民,添加村民交易
添加村民
添加村民职业和工作方块1234567891011121314151617181920212223242526272829303132333435363738394041424344454647package net.tutorialmod.villager;import com.google.common.collect.ImmutableSet;import dev.architectury.registry.registries.DeferredRegister;import dev.architectury.registry.registries.RegistrySupplier;import net.minecraft.core.registries.Registries;import net.minecraft.resources.ResourceKey;import net.minecraft.resources.ResourceLocation;import net.minecraft.sounds.SoundEvents;import net.minec ...
Architectury-08-添加画
添加画
添加画123456789101112131415161718192021222324package net.tutorialmod.painting;import dev.architectury.registry.registries.DeferredRegister;import dev.architectury.registry.registries.RegistrySupplier;import net.minecraft.core.registries.Registries;import net.minecraft.world.entity.decoration.PaintingVariant;import net.minecraft.world.level.block.Block;import net.tutorialmod.TutorialMod;public class ModPainting { public static final DeferredRegister<PaintingVariant> PAINTING_VARIA ...
Architectury-07-添加作物
添加作物
添加作物方块12345678910111213141516171819202122232425262728293031323334353637383940package net.tutorialmod.block.custom;import net.minecraft.world.level.ItemLike;import net.minecraft.world.level.block.Block;import net.minecraft.world.level.block.CropBlock;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.tutorialmod.item.ModItem;public class Blu ...
Architectury-06-添加多状态方块
添加多状态的方块
添加方块123456789101112131415161718192021222324252627282930313233343536package net.tutorialmod.block.custom;import net.minecraft.core.BlockPos;import net.minecraft.world.InteractionHand;import net.minecraft.world.InteractionResult;import net.minecraft.world.entity.player.Player;import net.minecraft.world.level.Level;import net.minecraft.world.level.block.Block;import net.minecraft.world.level.block.state.BlockState;import net.minecraft.world.level.block.state.StateDefinition;import net.min ...
Architectury-05-添加合成表和LootTable以及方块挖掘正确工具的挖掘等级
添加合成表Recipes,掉落物品表LootTable,方块挖掘等级,方块正确挖掘工具先添加了几个方块在ModBlock和ModItem下面
添加对应方块的物品和贴图
添加对应的方块正确挖掘工具,挖掘等级,掉落物表,合成表
添加方块123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128package net.tutorialmod.block;import dev.architectury.registry.registries.DeferredRegister;import dev.arc ...
Architectury-04-高级方块
添加一个高级方块
添加方块代码123456789101112131415161718192021222324252627282930313233343536373839package net.tutorialmod.block.custom;import net.minecraft.core.BlockPos;import net.minecraft.network.chat.Component;import net.minecraft.world.InteractionHand;import net.minecraft.world.InteractionResult;import net.minecraft.world.effect.MobEffectInstance;import net.minecraft.world.effect.MobEffects;import net.minecraft.world.entity.Entity;import net.minecraft.world.entity.LivingEntity;import net.minecraft.world. ...
Architectury-03-高级物品
添加高级物品
添加自定义物品1234567891011121314151617181920212223242526272829303132333435363738package net.tutorialmod.item.custom;import net.minecraft.network.chat.Component;import net.minecraft.util.RandomSource;import net.minecraft.world.InteractionHand;import net.minecraft.world.InteractionResult;import net.minecraft.world.InteractionResultHolder;import net.minecraft.world.entity.player.Player;import net.minecraft.world.item.Item;import net.minecraft.world.item.ItemStack;import net.minecraft.world.level.L ...
Architectury-02-添加方块
添加方块
添加方块1234567891011121314151617181920212223242526272829303132333435363738394041package net.tutorialmod.block;import dev.architectury.registry.registries.DeferredRegister;import dev.architectury.registry.registries.RegistrySupplier;import net.minecraft.core.registries.Registries;import net.minecraft.world.item.BlockItem;import net.minecraft.world.item.Item;import net.minecraft.world.level.block.Block;import net.minecraft.world.level.block.Blocks;import net.minecraft.world.level.block.state.Blo ...
Architectury-01-添加物品
添加方块
添加方块12345678910111213141516171819202122package net.tutorialmod.item;import dev.architectury.registry.registries.DeferredRegister;import dev.architectury.registry.registries.RegistrySupplier;import net.minecraft.core.registries.Registries;import net.minecraft.world.item.Item;import net.tutorialmod.TutorialMod;public class ModItem { public static final DeferredRegister<Item> ITEMS = DeferredRegister.create(TutorialMod.MOD_ID, Registries.ITEM); public static final RegistrySupp ...
typro自动上传图片到图床
声明本文转载自知乎,仅作留存,侵删Typora 中设置PicGo 图床实现图片自动上传 - 知乎 (zhihu.com)
关于补充内容因为smsm图床貌似ban掉了测试用的上传图片,所以会显示失败,可以自己尝试插入图片看看,是否上传成功。我这里是没有问题的。不过冒失smsm图传会有限制5gb,这个问题满了再说。
以下是报错内容,可见是被blocked了。
1234567Error: This image has been blocked, please contact webmaster for more information.at Object.We [as handle] -------Error Stack End-------2023-10-28 09:45:49 [PicGo INFO] [PicGo Server] upload result2023-10-28 09:45:49 [PicGo WARN] [PicGo Server] upload failed, see picgo.log for more detail ↑
以下是原文内容
在众多 md 编辑器中 ...