你可以幫助我們來翻譯此條目,但請勿使用機器翻譯。
村莊鏈是一個把村莊中心逐漸移動到靠近或另一個村莊中心的過程。這個過程通常用來建造高效緊湊的鐵魔像陷阱。這個方法首先在1.4.2中被發現,並一直沿用至今。這個過程主要由TangoTek使用者發現並推廣。
這個是TangoTek介紹村莊鏈的方法的Youtube影片。
本教學將會教你如何進行村莊鏈過程,這個過程通常用於從零開始建造一大片高效的鐵農場。如果你只想看看例子,請查看這篇教學。這個教學僅適用於Java版,本教學的資訊在其他版本可能不適用。
新的村莊資訊Mod絕對會幫到你,因為它是唯一一個幫助你在不會出現錯誤的情況下查看村莊資訊的Mod。
類別
多中心和單中心
首先發現的方法是多中心村莊鏈。它們組成的村莊中心通常排成一條直線並且不會在同一位置上。
另一方面,單中心村莊鏈在晚些時候被發現。它們的村莊中心在同一個點裡。
多中心和單中心村莊鏈的對比
- 優點
- 建造過程更簡單。
- 缺點
- 空間利用率低。
- 如果村莊中心不能重新設定,需要放置和破壞大量的門,如果是自動設定村莊中心的則需要更多的門。
- 需要更多的村民。
不可重新設定與可重新設定
因為區塊重新載入的速度很快(通常在自動儲存中完成,並影響大多數類型的區塊載入器),基本上會清除在區塊中儲存的所有村莊資料並重新計算。村莊鏈所在的區塊必須在遊戲打開時不被卸載,否則所作的努力會白費。
對於這個問題的方案是把村莊鏈放在重生點區塊中或其等價物,然後使用一點小技巧來使區塊處於載入狀態,即使是在沒有玩家在與該區塊處於同一維度時(此方案屬於不可重新設定的方案),或在玩家需要時重新組建村莊鏈(此方案屬於可重新設定的方案)。
可重新設定的方案主要用在區塊不能重新載入時(例如在Spigot 伺服器上),或村莊鏈過程非常複習不能手動完成時(例如單中心村莊鏈)。
遊戲機制和村莊鏈所使用的遊戲機制
註:
- 在閱讀下面的內容之前,請首先閱讀村莊機制教學以了解相關機制的基本資訊。
- 本段落所涉及的遊戲機制僅適用於1.8及更高版本,但是關於遊戲機制的論述適用於所有有村莊的版本。
- 為了使文章變得簡潔,本段落圖示中所使用的木材和柵欄分別代表有效門的位置和村莊半徑。原木的側面代表有一扇有效門的村莊中心,原木的上面代表沒有門的村莊中心。屏障代表一些不重要的東西。重要度高的圖示可能會覆蓋重要度低的圖示。這些圖示的最小村莊半徑是5格,並且合併後的村莊半徑是最小半徑+5格而不是像遊戲中最小半徑為32格,合併後為最小半徑+32格。
村莊合併優先級與邊界擴展器
如果所有的區塊包含沒有被重新載入的村莊,只會在一位村民檢測到新的門時(技術上來講只算門下面那一格)才考慮村莊合併。如果在一定的範圍內有多個村莊,只篩選適合的村莊(用一扇門便可合併)進行合併。範圍內其他所有村莊都會被忽略。因此,重疊邊界的村莊成為可能。
在1.8之前,舊村莊更適合與新村莊合併。因此,那個時候的村莊鏈主要是用合併範圍以防止最初的村莊被合併。而在1.8之後,更靠近門的村莊更適合與門合併。如果多個村莊距離它們的中心和一扇門的距離相同,這一扇門會傾向於計入舊的村莊。這使得村莊鏈過程變得更困難,但也變得更可預測,允許村莊從遠處一點擴展以與原來存在的村莊重疊。舊版本不會破壞村莊鏈,因為村莊會一直保持在被載入狀態,但舊的刷新機制不會生效。
邊界擴展器
在重疊村莊邊界的過程中,每次循環橡木村莊與樺木村莊都會逐漸靠近,直到不能夠使用該方法使二者的中心更加靠近。首先建造橡木村莊,因此遊戲會傾向於選擇橡木村莊而不是樺木村莊。注意圓形村莊是向西移動的。這個方法與TangtoTek的村莊鏈方法(Iron Titan)殊途同歸。
村莊邊界擴展器是一個有效房屋,正如它的名字那樣把一個村莊的邊界逐漸擴展使它的邊界更接近另一個村莊的中心。這個擴展器應該儘量靠近其他村莊,但必須與要擴展村莊邊界的那個村莊靠得更近。然後,放置在其他村莊中心的門要移除,以便擴展器變成村莊的中心,允許使用擴展器繼續該過程直至使用這個方法不能靠近村莊中心了為止。擴展的村莊做到這一點後,可以向它或其他村莊放置更多的門,因此使得它們有足夠的門來生成鐵魔像。
村莊中心及其重新導向
村莊中心是連接所有有效房屋的線條所組成的圖形的幾何中心,但它會和圓形村莊(包含村莊所有門的最小範圍)的中心(或幾何中心,在圓形村莊中是圓心)弄混。因此,越靠近村莊一部分有效房屋的中心,就越靠近村莊的中心即那一部分的幾何中心。
村莊中心重新導向
使用了一大堆有效房屋後,你可以「重新導向」村莊中心以便使其更靠近這一堆房屋的幾何中心,然後使用擴展器擴展村莊半徑到超過這個重新導向的中心。如果你想使舊村莊完全與另一個村莊融合,那麼這個技術很重要,新村莊會變成單中心村莊鏈的重要一環。
要做到這一點,一個好方法是先沿著新村莊建造邊界擴展器,然後使用1個小重新導向中心和1個大重新導向中心來幫助更新的村莊到達鐵魔像陷阱的另一邊,從而允許建造單中心村莊鏈。
多個村莊中的一個村民
一個村民可以在多個村莊裡,只要它們在這些村莊邊界的裡面,這也是單中心村莊鏈比多中心村莊鏈的主要優勢和村莊鏈比傳統的鐵魔像陷阱的主要優勢。這個方法可以把要使用的村民和幾百個降到約30個左右。
House detection mechanics & Layered chained village + Keeping doors detected + Undetecting a door
Each villager have a hidden timer that counts down from a random number of seconds, the minimum being 2.5 seconds and the maximum being 6 seconds. After the timer reaches 0, new valid doors ("houses") are detected and old doors are re-detected in a 32 x 8 x 32 box. The center of the box is always on the north-west edge of the block the legs of the corresponding villager is in, and it is always on the same vertical level as the villager. Usually only the bottom block of a door is counted, however the bottom layer of the detection box is able to detect the upper block, however this cannot be used to detect a door twice, and only affects the center math. In both cases the door blocks have to be completely inside of the box to be detected. This limitation can be used to prevent new doors from being added, however as villagers cannot move vertically freely, the vertical detection range is more limited and houses that need to be separated are usually stacked on top of each other, only the vertical limitation is often used.
Additionally, after getting detected as houses, doors no longer need an "outside" or "inside" to be kept being considered as houses. This is especially crucial in stacking multiple doors.
Aside from having itself destroyed, or having the chunk it is in reloaded, a door can only stop being considered as a house if there is no villager that re-detects it for about 60 to 64 seconds. This is both useful and harmful as it allows chaining mechanisms to be reused without player interaction, but can also break a chained village.
Layered chained village + Keeping doors detected + Undetecting a door
Knowing these mechanics, making a layered chained village, keeping doors detected and undetecting doors is quite easy. These videos are example of those mechanics being used in practice:
In this video, despite solid blocks being placed, blocking the skylight from reaching the 1st floor (with already chained villages), the farm still functions properly. The main villagers are divided in 2 separate chambers so they can detect the doors properly. TangoTek can be heard mentioning the 6-second rule.
In this video, by moving villagers away from the doors, the anchors and the corresponding extenders are able to be reused without player interaction. By moving the villagers around, the same reset mechanism can be used for multiple layers of doors.
The Iron Phoenix uses slime blocks to separate the door layers because it is the only transparent block that doors can be placed on.
The north-west-downward preference & Direction-dependency
As the game's internal integer rounding always rounds integers down, village centers are always placed further to the north (negative Z direction), the west (negative X direction) and the downward direction (negative Y direction) from the actual centroid of the village. This also affects the golem spawning box. The golems spawn inside a 16*6*16 box that has to fit perfectly into the block grid. As a result, the center of that box is never the center of the village, and the center of the village is always 0.5 block further to all 3 positive directions than the center of the golem spawning box.
Direction-dependency
The rounding mentioned above makes chained villages direction dependency. This should be kept in mind when designing any chained villages, as this can both break and help village chaining.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||