mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-22 04:52:25 +00:00
Fixed mod IDs, fixed generator recipes, added enabling/disabling of generators via config
This commit is contained in:
1 parent
4adbc332f9
commit
b355b80cf4
34 files changed
+283
-151
No files matched your search
@@ -6,11 +6,11 @@ import java.util.HashSet;
|
||||
import java.util.List;
|
||||
|
||||
import mekanism.api.MekanismConfig.general;
|
||||
import mekanism.api.MekanismConfig.machines;
|
||||
import mekanism.api.MekanismConfig.usage;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.MekanismBlocks;
|
||||
import mekanism.common.Tier.BaseTier;
|
||||
import mekanism.common.base.IBlockType;
|
||||
import mekanism.common.base.IFactory.RecipeType;
|
||||
import mekanism.common.block.BlockMachine;
|
||||
import mekanism.common.recipe.ShapedMekanismRecipe;
|
||||
@@ -118,7 +118,7 @@ public class BlockStateMachine extends ExtendedBlockState
|
||||
}
|
||||
}
|
||||
|
||||
public static enum MachineType implements IStringSerializable
|
||||
public static enum MachineType implements IStringSerializable, IBlockType
|
||||
{
|
||||
ENRICHMENT_CHAMBER(MachineBlock.MACHINE_BLOCK_1, 0, "EnrichmentChamber", 3, TileEntityEnrichmentChamber.class, true, false, true, Plane.HORIZONTAL, true),
|
||||
OSMIUM_COMPRESSOR(MachineBlock.MACHINE_BLOCK_1, 1, "OsmiumCompressor", 4, TileEntityOsmiumCompressor.class, true, false, true, Plane.HORIZONTAL, true),
|
||||
@@ -162,14 +162,14 @@ public class BlockStateMachine extends ExtendedBlockState
|
||||
|
||||
public MachineBlock typeBlock;
|
||||
public int meta;
|
||||
public String machineName;
|
||||
public String blockName;
|
||||
public int guiId;
|
||||
public double baseEnergy;
|
||||
public Class<? extends TileEntity> tileEntityClass;
|
||||
public boolean isElectric;
|
||||
public boolean hasModel;
|
||||
public boolean supportsUpgrades;
|
||||
public Collection<ShapedMekanismRecipe> machineRecipes = new HashSet<ShapedMekanismRecipe>();
|
||||
public Collection<ShapedMekanismRecipe> blockRecipes = new HashSet<ShapedMekanismRecipe>();
|
||||
public Predicate<EnumFacing> facingPredicate;
|
||||
public boolean activable;
|
||||
|
||||
@@ -177,7 +177,7 @@ public class BlockStateMachine extends ExtendedBlockState
|
||||
{
|
||||
typeBlock = block;
|
||||
meta = i;
|
||||
machineName = s;
|
||||
blockName = s;
|
||||
guiId = j;
|
||||
tileEntityClass = tileClass;
|
||||
isElectric = electric;
|
||||
@@ -186,25 +186,35 @@ public class BlockStateMachine extends ExtendedBlockState
|
||||
facingPredicate = predicate;
|
||||
activable = hasActiveTexture;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getBlockName()
|
||||
{
|
||||
return blockName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEnabled()
|
||||
{
|
||||
return machines.isEnabled(this.machineName);
|
||||
return general.machinesManager.isEnabled(blockName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addRecipes(Collection<ShapedMekanismRecipe> recipes)
|
||||
{
|
||||
machineRecipes.addAll(recipes);
|
||||
blockRecipes.addAll(recipes);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addRecipe(ShapedMekanismRecipe recipe)
|
||||
{
|
||||
machineRecipes.add(recipe);
|
||||
blockRecipes.add(recipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<ShapedMekanismRecipe> getRecipes()
|
||||
{
|
||||
return machineRecipes;
|
||||
return blockRecipes;
|
||||
}
|
||||
|
||||
public static List<MachineType> getValidMachines()
|
||||
@@ -361,7 +371,7 @@ public class BlockStateMachine extends ExtendedBlockState
|
||||
|
||||
public String getDescription()
|
||||
{
|
||||
return LangUtils.localize("tooltip." + machineName);
|
||||
return LangUtils.localize("tooltip." + blockName);
|
||||
}
|
||||
|
||||
public ItemStack getStack()
|
||||
|
||||
Reference in new issue
Block a user