your current location:首页 > news>From code analysis dragon set mechanism [DE] dragon's evolution/dragon research (Draconic Evolution) Minecraft Game

From code analysis dragon set mechanism [DE] dragon's evolution/dragon research (Draconic Evolution) Minecraft Game

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

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

This article is based on 1.12, and only analyzes the author's own analysis. It does not guarantee 100%accurate. Welcome to correct errors or make suggestions.


Noun link:

Tick ​​(MCMOD) (MCWIKI): The default 20tick per second, which is specifically based on the TPS (Tick Per Second) in the game.

ENTROPY: Shield Endless

Dragon set mechanism:

For every 100tick, if ArmorautoFeed is turned on (the attributes of the helmet, the Chinese is automatically filled) and the player's hunger value is less than 20, it consumes 500rf for a consumed food without consumption.

For each Tick, if Armornv (night vision) is turned on and the position of the location is less than 0.1, or ArmornVLock (locks the night vision), the night vision effect 500tick (25s) will be given.

For every 20tick, if there is a negative effect on the body, the negative effect is cleared at a time and consumes 5000 energy.(Note: If you hold the craftsmanship with the craftsmanship, you will not be empty to dig out fatigue).

The largest shield point (shield_capacity means shield capacity):

Head: 512 * (shield_capacity upgrade level + 1) * 0.15

Chest: 512 * (shield_capacity upgrade level + 1) * 0.40

Leg: 512 * (Shield_capacity upgrade level + 1) * 0.30

Foot: 512 * (shield_capacity upgrade level + 1) * 0.15

The defense logic when the player is attacked:

Note: The logic is orderly. In the following "cancel damage" or "shield failure", the logic is no longer continued.

If the damage type is admin_kill (kill instruction, etc.), it is injured normally.

Damage value:

The attacker is not a player: initial damage.

Global Greed Sword: 300.

If the damage cannot be blocked or can cause damage to the creation: twice the initial damage, ENTROPY is increased by 3.

Other situations: initial damage.

Injury test:

The type of damage is fire: cancel damage and extinguish the fire.

The damage type is falling: the damage is less than ARMORJUMPMODIFIER (high jump upgrade) / 20 to cancel the damage.

The type of damage is suffocation: the damage is less than 2 and the damage is canceled when there is a boot.

The damage is equal to 3.4028235E38F (the maximum value of the single precision floating point Float in Java, E38 means multiplied by the ten steps of ten).

The damage is canceled when the last damage is less than 4tick.

The ENTROPY value is changed to: the original Entropy value + (initial damage / 20), the maximum value of 100.Shield:

Calculate from helmet to boots:

Damage = Single Shield Value / Maximum General Shield * Initial damage

The shield value that is equal to the damage in the helmet is preferred to offset the damage. If the shield value in the helmet is not enough, the shield value (chest armor → legs → boots) in the equipment is detected in order.

If the shield is reduced, 20tick (1S) damage cooling (original) is given.

When the player dies:

When the shield value is greater than 500:

The health is set to 10 to cancel death.

When the armor is a feet flying dragon/awakened dragon:

Normal death.

When the power is greater than 10mrf:

Deduct 10mrf from the energy of the armor, set the blood volume to 1, and cancel death.

Restore a shield every time:

The number of shields to be restored = [((the maximum shield value -current shield value) and (minimum value of the maximum shield value/ 60) * (1- (ENTROPY/ 100))] and [Storage Energy/ 1000 1000The minimum value.

Entropy minus the DraconicShieldRecovery

Decreasing the amount of nails per piece: (maximum energy / single -piece energy) * (to be restored to the shield * DraconicShieldRechaargeCost (the shield recovery consumption in the configuration file, the default 1000).

Shield recovery is equivalent to the points of the number of shields to be restored.

List of thanks:

Azazel (propose ideas, modify the description)