mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-22 04:52:25 +00:00
Move Config variables into their own class, (in api because other stuff in API references config, may make sense to move it back to common later), and move Blocks and Items into final variables in their own classes. It looks a lot cleaner this way and my OCD can finally rest now.
60 lines
913 B
Java
60 lines
913 B
Java
package mekanism.common.tile;
|
|
|
|
import java.util.Map;
|
|
|
|
import mekanism.api.MekanismConfig.usage;
|
|
import mekanism.common.block.BlockMachine.MachineType;
|
|
import mekanism.common.recipe.RecipeHandler.Recipe;
|
|
|
|
public class TileEntityCrusher extends TileEntityElectricMachine
|
|
{
|
|
public float crushMatrix = 0;
|
|
|
|
public TileEntityCrusher()
|
|
{
|
|
super("Crusher.ogg", "Crusher", usage.crusherUsage, 200, MachineType.CRUSHER.baseEnergy);
|
|
}
|
|
|
|
@Override
|
|
public void onUpdate()
|
|
{
|
|
super.onUpdate();
|
|
|
|
if(worldObj.isRemote)
|
|
{
|
|
if(crushMatrix < 6)
|
|
{
|
|
crushMatrix+=0.2F;
|
|
}
|
|
else {
|
|
crushMatrix = 0;
|
|
}
|
|
}
|
|
}
|
|
|
|
public float getMatrix()
|
|
{
|
|
float matrix = 0;
|
|
|
|
if(crushMatrix <= 3)
|
|
{
|
|
return crushMatrix;
|
|
}
|
|
else {
|
|
return 3 - (crushMatrix-3);
|
|
}
|
|
}
|
|
|
|
@Override
|
|
public Map getRecipes()
|
|
{
|
|
return Recipe.CRUSHER.get();
|
|
}
|
|
|
|
@Override
|
|
public float getVolumeMultiplier()
|
|
{
|
|
return 0.5F;
|
|
}
|
|
}
|