your current location:首页 > news>On the wonderful reaction of the crops in Lootjs, the wonderful reaction between the module between the module of the RE

On the wonderful reaction of the crops in Lootjs, the wonderful reaction between the module between the module of the RE

2024-12-10 17:52:53|Myriagame |source:minecraft skins

This tutorial is set by the author's setting without permission.

Minecraft version forge1.20.1

Module version:

Lootjs-FORGE -.20.1-2.12.0

Reap-Forg-1.20.1-1.1.2

This situation accidentally discovered when the crops in the rubbing integrated package were dropped

Post code first

<<<<<<<<<], that (">"> ">"> "> connection (paras) => {{

Event

.AddBlockLootmodifier ("Minecraft: WHEAT")

.CustomCondition ({{

Condition: "Minecraft: block_state_property",, "

Block: "Minecraft: WHEAT",

Properties: {

Age: "7"

}

})

.RandomChaance (0.03)

.Addloot ("Kubejs: Iron_wheat"))

})

This is a block of a wheat plant destroying the drop incident. When the wheat cubes are mature (AGE = 7), the probability of destroying the block will drop a item.

At this time, I suddenly remembered that the harvest module can right -click the harvest of the plant, but the right -click interaction and block damage is two concepts. Just when thinking should use Kubejs to specifically rub a right -click the harvest file.one time.

As a result, the right -click the harvest module can normalize the blocks added by the above LOOTJS to destroy the drop event, and the drop rate will work normally when the bone meal is cooked.

The preliminary judgment is because the harvest module will return the state of the block of the crop block for a stage, and the principle of retreat is because the square is executed when the square is harvested to destroy the incident.

At the same time, in order to rigorously test another similar module Right Click, get crops, the result is the same.

However, it should be noted that not all crops will trigger the fall of LOOTJS. For example, the original sweet mule and luminous berries. The two have the characteristics of right -click on the original version, so it will not run normally.

It is worth noting.The reap module incorporates the sweetness of the sweetness in the right -click list, and the code of LOOTJS will run normally, and the luminous pulp is invalid, because the vine of the luminous pulp does not exist in the block state called "Age", and it is included in the harvest list.The rewarding berries will return it directly to the unsuccessful state without falling the fruit.

Finally attached the LOOTJS code with a sweet pulp

<<<<<<<<<], that (">"> ">"> "> connection (paras) => {{

Event

.AddBlockLootifier ("Minecraft: Sweet_berry_bush")

.CustomCondition ({{

Condition: "Minecraft: block_state_property",, "

Block: "Minecraft: Sweet_berry_bush", Properties: {

Age: "3"

}

})

.RandomChaance (0.02)

.Addloot ("Kubejs: Iron_sweet_berry_bush"))

.Limitcount ([1,3], [30, 64])

})

Therefore, it can be found that the harvest module can trigger the fall of Lootjs when harvesting crops with the "Age" block state.