Notes on Minecraft

1.12.2 1.15.2 1.16.5 , 记录我的世界开服至今的坑.

我的世界 Wiki

Minecraft Wiki

Curse Forge Minecraft: 找模组

Chunk Base: 找区块

Mine Atlas: 弱于Chunk Bas

Install Forge Server

  1. 使用sudo apt install openjdk-8-jdk安装Java 8, 见Install Java 8 on Ubuntu 22.04|20.04|18.04|16.04
  2. 1.15.2为例, 先安装官方服务器,然后在Minecraft Forge下载安装文件,运行java -jar forge-1.15.2-31.1.0-installer.jar --installServer.
  3. 因为网络原因下载libraries可能会部分失败, 可以复制.minecraft文件里的libraries进去. 因为不知道如何上传文件夹, 可以先把文件夹压缩, 然后rz上传到服务端,然后unzip name解压; 剩下的不能下载的直接拷贝到浏览器下载,然后把文件拷贝到对应的libraries目录.
  4. 运行java -jar forge-1.15.2-31.1.0-installer.jar --installServer安装.
  5. 创建start-game.sh并键入java -Xmx1G -Xms1G -jar forge-1.15.2-31.1.0.jar nogui, spigot和paper不加nogui在启动时可能会报错.
  6. 运行bash start-game.sh开启服务器.
  7. 服务器中设置安全组 (阿里云中为安全组, 腾讯云中为防火墙), 打开端口25565, 见一步一步地搭建Minecraft服务器(二).
  8. 游戏中输入IP, 就可以愉快地和小伙伴们一起玩耍啦!

Server on Ubuntu Using Screen

1
2
3
4
5
6
screen -S mc  # 创建新的窗口
screen -ls # 查看运行列表
cd minecraft_server.1.15.2/
bash start-game.sh
screen -X -S [session you want to kill] quit # 删除detached screen
screen -r mc # 离线运行开始后,每次进入shell查看运行情况

使用Ctrl+a+d退出screen.

另见

  • Screen User’s Manual
  • How To Use Linux Screen
  • How To Set Up a Minecraft Server on Linux

Useful Commands

General

1
2
3
4
5
6
7
8
9
/op/deop <playername>
/whitelist add/remove <playername>
/whitelist list/off/on/reload

/say hello

/data get entity Rylie Pos # 找玩家的坐标
/time set <day|night|midnight
/xp <amount>L [player] # 经验
1
2
3
4
/gamemode <playername> <0|1|2>  # 0生存, 1创造, 2冒险

/gamerule randomTickSpeed
/gamerule doDaylightCycle

How to stop Creepers and Endermen from breaking blocks in Minecraft: /gamerule mobGriefing false

Tick

1
/gamerule randomTickSpeed [3]

See Tick

In Java Edition, the number of blocks chosen from each section is specified by /gamerule randomTickSpeed (defaults to 3), and one block can be chosen multiple times in one chunk tick. In Bedrock Edition, it also depends on randomTickSpeed (defaults to 1), but it specifies only relative speed instead of the exact number.

1
/tick warp [int]  # used in Carpet mod to speed up

Set World Spawn

How to Use the SetWorldSpawn Command in Minecraft

1
/setworldspawn  # To set the world spawn point to your current location in To set the world spawn point to your current location in Minecraft Java Edition (PC/Mac)
1
/setworldspawn -113 92 211  # To set the world spawn point to an absolute position of (-113, 92, 211) as the (x, y, z) coordinate
1
/setworldspawn ~-19 ~ ~-10  # To set the world spawn point to a relative position (that is 19 blocks West and 10 blocks North of our current position)

Command Generation

DigMinecraft: 图文并茂, 满足基本需求

DigMinecraft is a great resource to answer your Minecraft game questions with pictures and step by step instructions to fo llow. Learn everything you ever wanted to know about the game called Minecraft!

MCStacker: 最全

This website will help you generate many commands for Minecraft Java Edition. Many of the specific options available for items and blocks can be generated with this tool. MCStacker began in 2014 and many new features have been added regularly ever since.

Weapon

1
/give Rylie diamond_sword{Enchantments:[{id:sharpness,lvl:5},{id:knockback,lvl:2},{id:fire_aspect,lvl:2},{id:looting,lvl:3},{id:sweeping,lvl:2},{id:unbreaking,lvl:3},{id:mending,lvl:1}]} 1
1
/give Rylie bow{Enchantments:[{id:unbreaking,lvl:3},{id:power,lvl:5},{id:punch,lvl:2},{id:flame,lvl:1},{id:mending,lvl:1}]} 1
1
/give Rylie diamond_pickaxe{Enchantments:[{id:efficiency,lvl:5},{id:unbreaking,lvl:3},{id:fortune,lvl:3},{id:mending,lvl:1}]} 1
1
/give Rylie diamond_pickaxe{Enchantments:[{id:efficiency,lvl:5},{id:silk_touch,lvl:1},{id:unbreaking,lvl:3},{id:mending,lvl:1}]} 1
1
/give Rylie diamond_axe{Enchantments:[{id:sharpness,lvl:5},{id:efficiency,lvl:5},{id:unbreaking,lvl:3},{id:fortune,lvl:3},{id:mending,lvl:1}]} 1
1
/give Rylie diamond_shovel{Enchantments:[{id:efficiency,lvl:5},{id:unbreaking,lvl:3},{id:fortune,lvl:3},{id:mending,lvl:1}]} 1
1
/give Rylie diamond_helmet{Enchantments:[{id:protection,lvl:4},{id:respiration,lvl:3},{id:aqua_affinity,lvl:1},{id:thorns,lvl:3},{id:unbreaking,lvl:3},{id:mending,lvl:1}]} 1
1
/give Rylie diamond_chestplate{Enchantments:[{id:protection,lvl:4},{id:thorns,lvl:3},{id:unbreaking,lvl:3},{id:mending,lvl:1}]} 1
1
/give Rylie diamond_leggings{Enchantments:[{id:protection,lvl:4},{id:thorns,lvl:3},{id:unbreaking,lvl:3},{id:mending,lvl:1}]} 1
1
/give Rylie diamond_boots{Enchantments:[{id:soul_speed,lvl:3},{id:protection,lvl:4},{id:feather_falling,lvl:4},{id:thorns,lvl:3},{id:depth_strider,lvl:3},{id:unbreaking,lvl:3},{id:mending,lvl:1}]} 1
1
/give Rylie elytra{Enchantments:[{id:unbreaking,lvl:3},{id:mending,lvl:1}]} 1

Summon

  • Horse: 速度最大为43, 跳跃高度最大为1

    1
    /summon horse ~ ~ ~ {Health:20f,Tame:1b,Temper:100,Variant:2,Attributes:[{Name:generic.max_health,Base:20},{Name:generic.movement_speed,Base:1},{Name:horse.jump_strength,Base:1}],SaddleItem:{id:"minecraft:saddle",Count:1b},ArmorItem:{}}

Mods

Village Marker Mod - 1.7.2

WorldEdit Documentation

1
2
3
4
5
6
//set stone
//undo
//replace stone sponge
//replace iron
//copy
//paste

Carpet, 见fabric-carpet-Wiki-CN

Carpet(以下均称作地毯)是适用于原版 Minecraft 的模组,能够让你在游戏的技术角度完全控制那些重要的东西。

使用 /tick warp 指令加速游戏测试自动化农场,之后使用 hopperCounters 查看产物的详细分类。使用 /log 实时查看服务器生物容量、TPS 等等。启用movableBlockEntities 让活塞推动方块实体(比如箱子)。修了好多好多东西。

Tools

monpjc/XAHK : 自动钓鱼机

Auto Key Clicker for Minecraft - Under request from Xisuma Developed for use with vanilla Minecraft and tested with 1.14, 1.15

Querz/mcaselector: 不同版本迁移时用来保护区块

An external tool to export or delete selected chunks and regions from a world save of Minecraft Java Edition.

World Painter

WorldPainter is an interactive map generator for Minecraft. It allows you to "paint" landscapes using similar tools as a regular paint program. Sculpt and mould the terrain, paint materials, trees, snow and ice, etc. onto it, and much more.

WorldPainter is implemented in Java, which you should already have if you're playing Minecraft. If not, install Java first from here.

Youtuber

ilmango: 德意志科技, Most Efficient Spawner XP Farm 1.14/1.13评论: Ilmango: I bet I could make 10 year old spawner farms 4% more efficient

Shulkercraft: 新手福音, 设计简单高效, 无声胜有声

gnembon: 农场设计天才, 视频堪称艺术品, 甚至还做了个Carpet模组专门测试农场产量

Mumbo Jumbo: 整活高手, 众多隐藏门, 3×3泥土隐藏地基, 橡树遁地术

LogicalGeekBoy: 学习英式英语

MrCrayfish: 门, 电梯, 现代Mod

Farms

Name  Version 1.12 1.13 1.14 1.15 1.16 1.17
Blaze Farm Shulkercraft Shulkercraft
Overworld Mob Farm gnembon
Trading LogicalGeekBoy LogicalGeekBoy
Villager Breader impulseSV LogicalGeekBoy
Rail Duper Rays Works
Drowned Farm Shulkercraft
Stone Generator Shulkercraft

Trouble Shooting

White Lines

[皮肤材质] 游戏方块白线

《我的世界》方块边缘有白线显卡问题解决方法

Server Lag

双人1核2G1M:

死人2核4G2M

视距8, 但鞘翅飞行还是会失速😢

常见服务器卡顿原因和解决方法: Minecraft lag types and how to fix them

使用/kill @e[type=item,r=x]删除掉落物, 见How do you clear all item drops in Minecraft?.

MC-161823

服务端恶性bug, 指出于How to Fix Minecraft Server has 60 Wrong Located Chunks. 我完全拷贝文件到新服务器, 之后仅仅使用sudo apt install openjdk-8-jdk安装Java8出现大量区块错误, 最后发现是因为Java版本不同, 新服务器为1.8.0_312, 旧服务器为1.8.0_241. 下面把旧服务器的文件拷贝到新服务器并尝试更改Java版本.

Installing Open JDK 8 on Debian or Ubuntu Systems使用如下方法更改Java版本 (删除时只需将set替换为remove即可):

1
2
3
sudo update-alternatives --install "/usr/bin/java" "java" "/home/ubuntu/jdk1.8.0_241/bin/java" 1
sudo update-alternatives --set java /home/ubuntu/jdk1.8.0_241/bin/java
sudo update-alternatives --config java

环境变量更改见How to setup Java-Home and Path in Ubuntu 12.04.

1
2
export JAVA_HOME=/home/ubuntu/jdk1.8.0_241
export PATH=$PATH:$HOME/bin:$JAVA_HOME/bin

之后碰到和Java command not found on Linux类似的报错😠, 用里面解决方法都没有解决.

1
2
3
4
+ java -version
- -bash: /usr/bin/java: Permission denied
+ sudo java -version
- sudo: java: command not found

之后使用sudo chmod a+x /usr/bin/java解决👼, 见Permission denied on checking java version in ubuntu.