本帖最后由 pow7000 于 2016-11-30 19:38 编辑

之前困擾於Forge服無法在多個世界內分別控制怪物是否生成,找了很久,終於找到一個MOD叫做Bad Mobs
看了看,發現是MIT授權,於是動手修改了一下,至於原始碼我傳不上來(包含那些參考的jar所以便很肥,需要的可以找我)



配置文件範例:

如果要讓殭屍無法在主世界生成,蜘蛛無法在主世界及地獄生成,乳牛無法在所有世界生成,則配置文件長這樣

  1. # Configuration file

  2. general {
  3.     # 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]]
  4.     #注意這邊
  5.         S:bannedMobs <
  6.         Zombie|0
  7.         Spider|0,-1
  8.         Cow
  9.      >

  10.     # 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]
  11.     B:killMode=true

  12.     # 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]
  13.     B:serverMode=false
  14. }


复制代码



後面的數字是維度的ID,每個維度都不一樣,多重世界產生的也有ID,按F3可以看到,或者用本模組給的那本書也會寫
那本書的用法是:拿著書對生物點右鍵,會顯示出生物名稱及維度的ID

載點:
BadMobs-1.10.2-1.2.0.0.jar (14.96 KB, 下载次数: 61)