之前困擾於Forge服無法在多個世界內分別控制怪物是否生成,找了很久,終於找到一個MOD叫做Bad Mobs
看了看,發現是MIT授權,於是動手修改了一下,至於原始碼我傳不上來(包含那些參考的jar所以便很肥,需要的可以找我)
配置文件範例:
如果要讓殭屍無法在主世界生成,蜘蛛無法在主世界及地獄生成,乳牛無法在所有世界生成,則配置文件長這樣
- # Configuration file
- general {
- # A list of all banned mobs. If a mobs entity name is added to this list, it will not be allowed to spawn in any world. To get the name of an entity, interact with it using the data checker and it's name will be given. [default: [example1], [example2], [example3]]
- #注意這邊
- S:bannedMobs <
- Zombie|0
- Spider|0,-1
- Cow
- >
- # If this is set to true, bad mobs will be killed/deleted when they attempt to spawn. If this is set to false, the mob will not be removed from the world and only the spawning will be prevented, and when the mob is nolonger listed as bad, all previously prevented mobs of that type will spawn. [default: true]
- B:killMode=true
- # If this is set to true, the mod will be put into server-side mode. This will remove the Entity Data Book from the game, but will allow clients to connect to your server, without having the mod installed. [default: false]
- B:serverMode=false
- }
後面的數字是維度的ID,每個維度都不一樣,多重世界產生的也有ID,按F3可以看到,或者用本模組給的那本書也會寫
那本書的用法是:拿著書對生物點右鍵,會顯示出生物名稱及維度的ID
載點: