Update
It is updated once every time, but it is checked with Internet time.
If Lockdownduration> 0 Lockdownduration 1 (this is for sacrifice dagger or something).
If the internalcounter is a multiples of 20 for a conventional PP update.
If the internalcounter is 20-promoting the number of runes (minimum is 1) to make a fluid transfer judgment.
The maximum value of LP transfer speed (SYPHONMAX) is 20*1.2^to the number of algorithms,
The smaller value of the remaining capacity of the blood altar and the maximum value of the LP transfer speed is the maximum value that can be entered at one time.
The input of the amount of fluid cache (FluidInput.amount NBT can be read) and the smaller value of the maximum value that can be entered at a time is the actual amount of the fluid,
Then give the amount of fluid in the blood altar+the actual amount of fluid input, the number of fluids input cache-the actual amount of the fluid input,
The maximum value that can be output is the minimum value in the LP to the maximum value and the maximum value of the LP to the maximum value and the temporary capacity (BufferCapAcity) -This output quantity cache (This.fluidout.amount NBT), and
The actual output of the fluid is the maximum value of the altar fluid and the maximum value that can be output at a time.
Then give the amount of fluid in the blood altar-the actual output of the fluid quantity, the number of fluid output cache+the actual output of the fluid quantity,
Finally perform a blocking entity synchronization.
If the InternetCounter is the multiple of the chargingfrequency and the blood altar is not at work, it is calculated at a time:
The smaller value in the number of fluids and blood altars is the maximum value of one energy.
The smaller value of the maximum filling point and the total number of energy and the maximum value of the first energy is the actual power point.
Then give the total filling point number+actual charging point number,
Blood altar number-actual charging point number, and finally synchronize a block entity.
If the internalcounter is a multiple of 100 and (the cooling state of the blood altar is working or not in the synthesis), that is, Isactive is 1 or COOLDOWNAFTERCRAFTING <= 0,
If the blood altar is in the energy state, the blood altar is set up in a state of failure and the NC update and PP update are issued at the blood altar.
Finally call StartCycle.
Startcycle
Will perform the following operations:
If the entity location of the block is not empty, the block entity synchronizes once.
Motor a blood magic altar level check:
Get the blood altar level as Tier,
Then get the upgrade of the blood magic altar (such as the speed rune),
If the level of the blood altar level is displayed in the book displayed, set the level of the instruction book to 1,
If the blood magic altar level is 1, all the attributes are set as the default value. The specific NBT can be read.
If it is not to update the specific attributes of the blood altar:
Isupgraded = TRUE
Promoting upgrade (AccelerationupGrades) = Promoting number
ConsumptionMultiplier (ConsumptionMultiplier) = 0.2 * Number of speed runes
Empiciencemultiplier (EFFFICIENCYMULTIPLIER) = 0.85^
Sacrifice efficiency multiple (SACRIFICEEFFICIENCYMultiplier) = 0.1 * Number of sacrifice runes
SelfSAcrificeEfficienceEntermultiplier = 0.1 * Number of runes
Capacitymultiplier (CapacityMultiplier) = 1 * 1.1^Number of Super Runes + 0.2 * Number of Runes
DislocationMultiplier (DISLOCATIONMultIPLIER) = 1.2^Number of transfer runes
Orb capacity multiple (orbcapacitymultiplier) = 1 + 0.02 * Number of Orbs Rune
ChargingFrequency = 20 -Promoting the number of runes (minimum is 1)
Chargingfrequency = (10 * number of energy runes) * (1 + consumption multiple/2)
Maxchaarge = 1000* (0.5* capacity multiplier and larger value in 1)* number of energy runes (actually the same as in the material data).
Then blood altar capacity (Capacity) = 1000 * 10 * capacity multiplier
Temporary capacity (bufferCapAcity) = 1000 * capacity multiplier
If the number of fluids in the blood altar> blood altar capacity, set the number of fluids of the blood altar to the blood altar capacity.If the amount of fluid output of the blood altar is cached> temporary capacity, set the number of fluid output fluids to temporary capacity.
If the number of fluids of the blood altar loses the cache> temporary capacity, set the number of blood altars to the number of fluids in the blood altar to temporary capacity.
If the total number of energy points of the blood altar> maximum filling point, set the total number of energy points to the maximum charging point number.
Finally perform a blocking entity synchronization.
If the fluid is an empty or fluid quantity <= 0 and the total number of energy points <= 0, the next judgment will be skipped.
If the work status of the altar (ISACTIN) = 0, then the progress (progress) 0
If the input item is non -empty, judge whether there is a synthetic table
If there is a synthetic table
Will work in the altar = 1
Number of synthetic fluid requirements (can be read in liquidRequired NBT) = Number of requirements for synthetic items (jei can be seen)
Consumption (consumptionRate) = consumption rate (jei can be seen)
Drainrate = empty exclusion rate (jei can be seen) (I don't know why these two translate them, but I also translate it casually)
Can it be filled (CanbeFilled) = False
If there is no synthetic table to determine whether it is a Orb, if it is a orb, the working status = whether it can be filled = whether the altar level is greater than the orb level.
If not, work status = false.
Finally call the updatealtar.
updatealtar
The following operations will be performed:
If the blood magic altar is not working, cool the synthesis after-1 and skip the operation.
If the blood magic altar cannot be filled (that is, it has been put in one item) and there is no synthetic table, you call Startcycle and skip the operation after.
If the input items in the blood magic altar are empty, the operation after skipping.
If the blood magic altar cannot be filled, the following operations are performed:
Executive operation (harsoperated) = 0
If the total charging point number> 0, the following judgments are made:
Constellation (Chargedrained) = The remaining progress (the quantity of the fluid required for a item*the number of items-progress (Progress)) and the smaller of the total number of energy points
Total filling point -consumed charging points and numbers
Progress + consumption energy point number
Executive operation = 1
If there is a fluid, the following judgments are made:
The small value of the consumption quantity (liquiddrained) = consumption rate*(1+ consumption multiplier) and the small value of the flow of blood magic altar
If the amount of fluid is consumed> the surplus progress, the amount of fluid consumption = the surplus progress will be consumed.
Blood magic altar quantity -consumption of fluid quantity
Progress + consumption of fluids
Executive operation = 1
If the world time is multiple, the particle effect is produced.
If there is no fluid, determine whether the operation is 1 and whether the progress is> 0 If yes
Surgery backstur efficiency multiplier*Drainrate (DRAINRATE) (minimum backward to 0)
If the multiples of the world are 2 to produce particle effects.
If the operation is executed = 1, the following judgments are performed:
If the progress> = the number of fluid required for an item*The number of items is performed as follows:
Generate the finished product and return the progress 0 (the EventBus here can not understand AA)
The effect of the particle is produced. If the red stone lamp is under the altar, the redstone lamp becomes the altar into a charging square and issues NC update and PP update
Cooldownaftercraft after synthesis = 30
IsActive = 0.
If the operation is not 1, the following operation is performed:
If the item is empty or not the orb or the orb is not bound to the network, it will not perform the following operations
If the number of fluids of the blood altar> = 1, perform the following operations:
The smaller value of the amount of fluiddrained = Treasure consumption rate*(1+ consumption multiplier) and the blood magic altar quantity
Orb consumption rate:
Weak 2
Apprentice 5
Magician 15
Master 25
Archmage 50
Discharge (DRAIN) = 0 (if the orb capacity*orb capacity multipliers <= now the number of source of life (Curress)) or ((the maximum capacity and the amount of the current source of life+the smaller value of the amount of fluid consumption)-Now the source of life sourcequantity)
(This excreted EventBus did not understand what (but guess the network calculation of multiple Orbs)) The number of fluids in the altar-discharge
If it is discharged> 0 and the world time is the multiple of 4 to produce particle effects
Finally perform a blocking entity synchronization.
Summarize
Altar fluid transfer
First of all, enter the altar in the altar to enter the input fluid quantity cache (Fluidinput.amount NBT), read),), can
Then every 20- promote the multiple of the number of runes (minimum is 1) to perform a fluid transfer into the real blood altar,
The maximum value of each fluid to the maximum value of LP to the maximum value and temporary capacity (BufferCapAcity),
LP to the maximum value (SYPHONMAX) is 20*transfer multiplier
The temporary capacity is the blood altar capacity (CAPACITY)/10, that is, 1000*capacity multiplier. The output is the same, and because the input input is first judged and then the output is judged, the fluid input in the previous input will be advanced.
Energy
In fact, like encyclopedia, it is the charging energy of each charging frequency and the blood altar without working.
Make item
Determined by each TICK
If it is no longer synthetic and COOLDOWNAFTERCRAFTING> 0, COOLDOWNAFTERCRAFTING 1,
If there is a synthetic table, first use the number of charging energy points. If you are not enough, consume once (liquiddrained) = consumption rate*(1+ consumption multiplier) to take the small value in the number of fluids in the blood magic altar)
(Too strange, only speed runes can accelerate, and efficiency is reduced deduction)
If the above two are not executed, the progress is the rate of return.
If the progress is sufficient, convert all items into the finished product and convert it into the finished product.
At a multiples of 100 in the world and at the end of the synthetic or synthetic cooling, the altar is closed.
Dabanic energy
Determined by each TICK
Orb charge rate = Orb consumption rate*(1+ consumption multiplier)
Orb consumption rate:
Weak 2
Apprentice 5
Magician 15
Master 25
Archmage 50
Stick the source code
There may be some problems in it.(Because my pork nose code level is cloudy out)
Uh, then you will not use Matlab to study the final hand in one night. The integrated package is DJ2, and the two altars are used.
Promoting 19 promoted runes (because not default pizi will not be computing power)
The synthetic altar brings 3296LP/T to the transfer rate of 3296LP/T, and the 39 super -capacity runes bring a temporary cache (abominable slate) of 41144, and then 49 charging energy+49 speed brings 2891 to 2891./T's charging point number and 100W charging point are launched, and the 540P/T soul network input speed (DJ2 level six or pearls is 50) (very bad and then the supply of blood can not be available)
(The reason for writing this tutorial is that the pork nose teammates have a whole two defense altar. The transfer rate of the two altars is 50, and the input speed of the soul network is also 50.Blood Magic)
It is broken to set up an uncertain vocabulary for the community tutorial, and can only be used as a personal tutorial.