Refactoring for translation

This commit is contained in:
drcrazy 2017-09-08 02:03:35 +03:00
parent 8a8205b4b1
commit ab1802ba5e
48 changed files with 240 additions and 118 deletions

View file

@ -1,3 +1,27 @@
/*
* This file is part of TechReborn, licensed under the MIT License (MIT).
*
* Copyright (c) 2017 TechReborn
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package techreborn.tiles;
import net.minecraft.entity.player.EntityPlayer;

View file

@ -102,13 +102,13 @@ public class TileRollingMachine extends TilePowerAcceptor
}
@Override
public void updateEntity() {
super.updateEntity();
public void update() {
super.update();
this.charge(2);
if (!this.world.isRemote) {
this.currentRecipe = RollingMachineRecipe.instance.findMatchingRecipe(this.craftMatrix, this.world);
if (!this.currentRecipe.isEmpty() && this.canMake()) {
if (this.tickTime >= this.runTime) {
if (this.tickTime >= TileRollingMachine.runTime) {
this.currentRecipe = RollingMachineRecipe.instance.findMatchingRecipe(this.craftMatrix, this.world);
if (!this.currentRecipe.isEmpty()) {
boolean hasCrafted = false;
@ -136,7 +136,7 @@ public class TileRollingMachine extends TilePowerAcceptor
}
}
if (!this.currentRecipe.isEmpty()) {
if (this.canUseEnergy(energyPerTick) && this.tickTime < this.runTime) {
if (this.canUseEnergy(energyPerTick) && this.tickTime < TileRollingMachine.runTime) {
this.useEnergy(energyPerTick);
this.tickTime++;
}
@ -225,10 +225,10 @@ public class TileRollingMachine extends TilePowerAcceptor
}
public int getBurnTimeRemainingScaled(final int scale) {
if (this.tickTime == 0 || this.runTime == 0) {
if (this.tickTime == 0 || TileRollingMachine.runTime == 0) {
return 0;
}
return this.tickTime * scale / this.runTime;
return this.tickTime * scale / TileRollingMachine.runTime;
}
@Override

View file

@ -22,7 +22,7 @@
* SOFTWARE.
*/
package techreborn.tiles;
package techreborn.tiles.storage;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
@ -57,8 +57,8 @@ public class TileAdjustableSU extends TilePowerAcceptor implements IToolDrop {
}
@Override
public void updateEntity() {
super.updateEntity();
public void update() {
super.update();
if (ticks == 100) {
euChange = -1;
ticks = 0;

View file

@ -22,7 +22,7 @@
* SOFTWARE.
*/
package techreborn.tiles;
package techreborn.tiles.teir1;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.ISidedInventory;