@@ -31,30 +31,30 @@ public NetNodeImpl(final TileMultiblockMachineController owner) {
3131 @ Override
3232 public void onMachineTick () {
3333 super .onMachineTick ();
34- if (isWorking ()) {
35- if (owner .getTicksExisted () % 10 == 0 ) {
34+ if (this . isWorking ()) {
35+ if (this . owner .getTicksExisted () % 10 == 0 ) {
3636 double total = 0 ;
37- for (final double value : recipeConsumers .values ()) {
37+ for (final double value : this . recipeConsumers .values ()) {
3838 total += value ;
3939 }
40- computationPointConsumption = total ;
41- recipeConsumers .clear ();
40+ this . computationPointConsumption = total ;
41+ this . recipeConsumers .clear ();
4242 }
4343 } else {
44- computationPointConsumption = 0 ;
44+ this . computationPointConsumption = 0 ;
4545 }
4646 }
4747
4848 @ ZenMethod
4949 public void checkComputationPoint (final RecipeCheckEvent event ,
5050 final double pointRequired ,
5151 final ResearchCognitionData ... researchRequired ) {
52- if (centerPos == null || center == null ) {
52+ if (this . centerPos == null || this . center == null ) {
5353 event .setFailed ("novaeng.hypernet.prrocessor.link.false" );
5454 return ;
5555 }
5656
57- double generation = center .getComputationPointGeneration () - center .getComputationPointConsumption ();
57+ double generation = this . center .getComputationPointGeneration () - this . center .getComputationPointConsumption ();
5858 if (generation < pointRequired ) {
5959 event .setFailed ("算力不足!预期:"
6060 + NovaEngUtils .formatFLOPS (pointRequired ) + ",当前:"
@@ -72,12 +72,12 @@ public void checkComputationPoint(final RecipeCheckEvent event,
7272 @ ZenMethod
7373 public void checkResearch (final RecipeCheckEvent event ,
7474 final ResearchCognitionData ... researchRequired ) {
75- if (centerPos == null || center == null ) {
75+ if (this . centerPos == null || this . center == null ) {
7676 event .setFailed ("novaeng.hypernet.prrocessor.link.false" );
7777 return ;
7878 }
7979
80- Collection <Database > nodes = center .getNode (Database .class );
80+ Collection <Database > nodes = this . center .getNode (Database .class );
8181 if (nodes .isEmpty ()) {
8282 event .setFailed ("计算网络中未找到数据库!" );
8383 return ;
@@ -92,26 +92,26 @@ public void checkResearch(final RecipeCheckEvent event,
9292 }
9393
9494 public void onRecipeStart (final RecipeStartEvent event , final double computation ) {
95- recipeConsumers .put (event .getRecipeThread (), computation * event .getActiveRecipe ().getParallelism ());
95+ this . recipeConsumers .put (event .getRecipeThread (), computation * event .getActiveRecipe ().getParallelism ());
9696 }
9797
9898 public void onRecipeStart (final FactoryRecipeStartEvent event , final double computation ) {
99- recipeConsumers .put (event .getRecipeThread (), computation * event .getActiveRecipe ().getParallelism ());
99+ this . recipeConsumers .put (event .getRecipeThread (), computation * event .getActiveRecipe ().getParallelism ());
100100 }
101101
102102 public void onRecipePreTick (final RecipeTickEvent event , final double computation , final boolean triggerFailure ) {
103- if (centerPos == null ) {
103+ if (this . centerPos == null ) {
104104 event .setFailed (true , "novaeng.hypernet.prrocessor.link.false" );
105105 return ;
106106 }
107- if (center == null ) {
107+ if (this . center == null ) {
108108 event .preventProgressing ("novaeng.hypernet.prrocessor.link.false" );
109109 return ;
110110 }
111111 double required = computation * event .getActiveRecipe ().getParallelism ();
112- recipeConsumers .put (event .getRecipeThread (), required );
112+ this . recipeConsumers .put (event .getRecipeThread (), required );
113113
114- if (!center .consumeComputationPoint (required )) {
114+ if (!this . center .consumeComputationPoint (required )) {
115115 String failureMessage = "算力不足!预期需求:" +
116116 NovaEngUtils .formatFLOPS (required );
117117
@@ -124,18 +124,18 @@ public void onRecipePreTick(final RecipeTickEvent event, final double computatio
124124 }
125125
126126 public void onRecipePreTick (final FactoryRecipeTickEvent event , final double computation , final boolean triggerFailure ) {
127- if (centerPos == null ) {
127+ if (this . centerPos == null ) {
128128 event .setFailed (true , "novaeng.hypernet.prrocessor.link.false" );
129129 return ;
130130 }
131- if (center == null ) {
131+ if (this . center == null ) {
132132 event .preventProgressing ("novaeng.hypernet.prrocessor.link.false" );
133133 return ;
134134 }
135135 double required = computation * event .getActiveRecipe ().getParallelism ();
136- recipeConsumers .put (event .getRecipeThread (), required );
136+ this . recipeConsumers .put (event .getRecipeThread (), required );
137137
138- if (!center .consumeComputationPoint (required )) {
138+ if (!this . center .consumeComputationPoint (required )) {
139139 String failureMessage = "算力不足!预期需求:" +
140140 NovaEngUtils .formatFLOPS (required );
141141
@@ -148,7 +148,7 @@ public void onRecipePreTick(final FactoryRecipeTickEvent event, final double com
148148 }
149149
150150 public void onRecipeFinished (final RecipeThread thread ) {
151- recipeConsumers .removeDouble (thread );
151+ this . recipeConsumers .removeDouble (thread );
152152 }
153153
154154 @ Override
@@ -160,12 +160,12 @@ public void readNBT(final NBTTagCompound customData) {
160160 @ Override
161161 public void writeNBT () {
162162 super .writeNBT ();
163- NBTTagCompound tag = owner .getCustomDataTag ();
164- tag .setDouble ("c" , computationPointConsumption );
163+ NBTTagCompound tag = this . owner .getCustomDataTag ();
164+ tag .setDouble ("c" , this . computationPointConsumption );
165165 }
166166
167167 @ Override
168168 public double getComputationPointConsumption () {
169- return computationPointConsumption ;
169+ return this . computationPointConsumption ;
170170 }
171171}
0 commit comments