mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-15 17:45:08 +00:00
Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0fc5c4c1a8 | ||
|
|
c790ed0220 | ||
|
|
0a92304ed5 | ||
|
|
e2ef134751 |
No files matched your search
+20
-53
@@ -1,4 +1,4 @@
|
||||
//version: 1696265388
|
||||
//version: 1692122114
|
||||
/*
|
||||
DO NOT CHANGE THIS FILE!
|
||||
Also, you may replace this file at any time if there is an update available.
|
||||
@@ -89,23 +89,6 @@ def out = services.get(StyledTextOutputFactory).create('an-output')
|
||||
def projectJavaVersion = JavaLanguageVersion.of(8)
|
||||
|
||||
boolean disableSpotless = project.hasProperty("disableSpotless") ? project.disableSpotless.toBoolean() : false
|
||||
boolean disableCheckstyle = project.hasProperty("disableCheckstyle") ? project.disableCheckstyle.toBoolean() : false
|
||||
|
||||
final String CHECKSTYLE_CONFIG = """
|
||||
<!DOCTYPE module PUBLIC
|
||||
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
|
||||
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
|
||||
<module name="Checker">
|
||||
<module name="TreeWalker">
|
||||
<!-- Use CHECKSTYLE:OFF and CHECKSTYLE:ON comments to suppress checkstyle lints in a block -->
|
||||
<module name="SuppressionCommentFilter"/>
|
||||
<module name="AvoidStarImport">
|
||||
<!-- Allow static wildcard imports for cases like Opcodes and LWJGL classes, these don't get created accidentally by the IDE -->
|
||||
<property name="allowStaticMemberImports" value="true"/>
|
||||
</module>
|
||||
</module>
|
||||
</module>
|
||||
"""
|
||||
|
||||
checkPropertyExists("modName")
|
||||
checkPropertyExists("modId")
|
||||
@@ -157,17 +140,6 @@ if (!disableSpotless) {
|
||||
apply from: Blowdryer.file('spotless.gradle')
|
||||
}
|
||||
|
||||
if (!disableCheckstyle) {
|
||||
apply plugin: 'checkstyle'
|
||||
tasks.named("checkstylePatchedMc") { enabled = false }
|
||||
tasks.named("checkstyleMcLauncher") { enabled = false }
|
||||
tasks.named("checkstyleIdeVirtualMain") { enabled = false }
|
||||
tasks.named("checkstyleInjectedTags") { enabled = false }
|
||||
checkstyle {
|
||||
config = resources.text.fromString(CHECKSTYLE_CONFIG)
|
||||
}
|
||||
}
|
||||
|
||||
String javaSourceDir = "src/main/java/"
|
||||
String scalaSourceDir = "src/main/scala/"
|
||||
String kotlinSourceDir = "src/main/kotlin/"
|
||||
@@ -628,10 +600,15 @@ repositories {
|
||||
}
|
||||
maven {
|
||||
name = "ic2"
|
||||
url = getURL("https://maven.ic2.player.to/", "https://maven2.ic2.player.to/")
|
||||
content {
|
||||
includeGroup "net.industrial-craft"
|
||||
url = "https://maven.ic2.player.to/"
|
||||
metadataSources {
|
||||
mavenPom()
|
||||
artifact()
|
||||
}
|
||||
}
|
||||
maven {
|
||||
name = "ic2-mirror"
|
||||
url = "https://maven2.ic2.player.to/"
|
||||
metadataSources {
|
||||
mavenPom()
|
||||
artifact()
|
||||
@@ -793,14 +770,23 @@ ext.java17PatchDependenciesCfg = configurations.create("java17PatchDependencies"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
def lwjgl3ifyVersion = '1.5.0'
|
||||
def lwjgl3ifyVersion = '1.4.0'
|
||||
def asmVersion = '9.4'
|
||||
if (modId != 'lwjgl3ify') {
|
||||
java17Dependencies("com.github.GTNewHorizons:lwjgl3ify:${lwjgl3ifyVersion}")
|
||||
}
|
||||
if (modId != 'hodgepodge') {
|
||||
java17Dependencies('com.github.GTNewHorizons:Hodgepodge:2.3.7')
|
||||
java17Dependencies('com.github.GTNewHorizons:Hodgepodge:2.2.26')
|
||||
}
|
||||
|
||||
java17PatchDependencies('net.minecraft:launchwrapper:1.17.2') {transitive = false}
|
||||
java17PatchDependencies("org.ow2.asm:asm:${asmVersion}")
|
||||
java17PatchDependencies("org.ow2.asm:asm-commons:${asmVersion}")
|
||||
java17PatchDependencies("org.ow2.asm:asm-tree:${asmVersion}")
|
||||
java17PatchDependencies("org.ow2.asm:asm-analysis:${asmVersion}")
|
||||
java17PatchDependencies("org.ow2.asm:asm-util:${asmVersion}")
|
||||
java17PatchDependencies('org.ow2.asm:asm-deprecated:7.1')
|
||||
java17PatchDependencies("org.apache.commons:commons-lang3:3.12.0")
|
||||
java17PatchDependencies("com.github.GTNewHorizons:lwjgl3ify:${lwjgl3ifyVersion}:forgePatches") {transitive = false}
|
||||
}
|
||||
|
||||
@@ -1590,25 +1576,6 @@ def getSecondaryArtifacts() {
|
||||
return secondaryArtifacts
|
||||
}
|
||||
|
||||
def getURL(String main, String fallback) {
|
||||
return pingURL(main, 10000) ? main : fallback
|
||||
}
|
||||
|
||||
// credit: https://stackoverflow.com/a/3584332
|
||||
def pingURL(String url, int timeout) {
|
||||
url = url.replaceFirst("^https", "http") // Otherwise an exception may be thrown on invalid SSL certificates.
|
||||
try {
|
||||
HttpURLConnection connection = (HttpURLConnection) new URL(url).openConnection()
|
||||
connection.setConnectTimeout(timeout)
|
||||
connection.setReadTimeout(timeout)
|
||||
connection.setRequestMethod("HEAD")
|
||||
int responseCode = connection.getResponseCode()
|
||||
return 200 <= responseCode && responseCode <= 399
|
||||
} catch (IOException ignored) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
// For easier scripting of things that require variables defined earlier in the buildscript
|
||||
if (file('addon.late.gradle.kts').exists()) {
|
||||
apply from: 'addon.late.gradle.kts'
|
||||
|
||||
+4
-4
@@ -3,20 +3,20 @@
|
||||
dependencies {
|
||||
api('com.github.GTNewHorizons:EnderCore:0.2.17:dev')
|
||||
implementation('com.github.GTNewHorizons:ForestryMC:4.6.14:dev')
|
||||
implementation('com.github.GTNewHorizons:NotEnoughItems:2.4.3-GTNH:dev')
|
||||
implementation('com.github.GTNewHorizons:NotEnoughItems:2.4.2-GTNH:dev')
|
||||
implementation("com.github.GTNewHorizons:GTNHLib:0.0.13:dev")
|
||||
api('com.github.GTNewHorizons:BuildCraft:7.1.36:dev')
|
||||
api('curse.maven:cofh-lib-220333:2388748') // https://www.curseforge.com/minecraft/mc-mods/cofh-lib/files/2388748
|
||||
shadowImplementation('cglib:cglib-nodep:3.3.0')
|
||||
|
||||
compileOnly('com.github.GTNewHorizons:waila:1.6.0:api') {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-259-GTNH:api') {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-254-GTNH:api') {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:Baubles:1.0.1.16:dev') {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.44.30:dev') {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.44.16-pre-experimental:dev') {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:Railcraft:9.15.0:api') {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:StorageDrawers:1.12.0-GTNH:api') {transitive = false}
|
||||
implementation('com.github.GTNewHorizons:Chisel:2.11.4-GTNH:dev') {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:OpenComputers:1.9.17-GTNH:api') {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:OpenComputers:1.9.15-GTNH:api') {transitive = false}
|
||||
compileOnly('curse.maven:minefactory-reloaded-66672:2366150') // https://www.curseforge.com/minecraft/mc-mods/minefactory-reloaded/files/2366150
|
||||
compileOnly('thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev')
|
||||
compileOnly('curse.maven:ee3-65509:2305023') // https://www.curseforge.com/minecraft/mc-mods/ee3/files/2305023
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package crazypants.enderio;
|
||||
|
||||
import static crazypants.enderio.EnderIO.*;
|
||||
import static crazypants.enderio.EnderIO.MODID;
|
||||
import static crazypants.enderio.EnderIO.MOD_NAME;
|
||||
import static crazypants.enderio.EnderIO.VERSION;
|
||||
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.File;
|
||||
@@ -786,7 +788,7 @@ public class EnderIO {
|
||||
@EventHandler
|
||||
public void loadComplete(FMLLoadCompleteEvent event) {
|
||||
processImc(FMLInterModComms.fetchRuntimeMessages(this)); // Some mods send IMCs during PostInit, so we catch
|
||||
// them here.
|
||||
// them here.
|
||||
}
|
||||
|
||||
private static String getXPJuiceName() {
|
||||
|
||||
@@ -94,10 +94,11 @@ public interface ITelePad extends ITravelAccessable {
|
||||
/**
|
||||
* Util method to set all coords using a {@link BlockCoord} object.
|
||||
*
|
||||
* @param coords The coords to set this telepad to.
|
||||
* @see #setX(int)
|
||||
* @see #setY(int)
|
||||
* @see #setZ(int)
|
||||
*
|
||||
* @param coords The coords to set this telepad to.
|
||||
*/
|
||||
void setCoords(BlockCoord coords);
|
||||
|
||||
|
||||
@@ -14,8 +14,9 @@ import cpw.mods.fml.common.eventhandler.Cancelable;
|
||||
* <li>Staff of travelling</li>
|
||||
* <li>Telepad</li>
|
||||
* </ul>
|
||||
* <p>
|
||||
*
|
||||
* As well as any externally added teleports, assuming they fire this event manually.
|
||||
*
|
||||
*/
|
||||
@Cancelable
|
||||
public class TeleportEntityEvent extends EntityEvent {
|
||||
|
||||
@@ -88,7 +88,7 @@ public abstract class AbstractConduit implements IConduit {
|
||||
* If this is true, it will trigger a reconnection on the next Tick.
|
||||
* <p>
|
||||
* Use the method needUpdateConnections() instead of setting this to true.
|
||||
*
|
||||
*
|
||||
* @see needUpdateConnections()
|
||||
*/
|
||||
private boolean needUpdateConnections = false;
|
||||
|
||||
@@ -47,13 +47,7 @@ import crazypants.enderio.api.tool.ITool;
|
||||
import crazypants.enderio.conduit.facade.ItemConduitFacade.FacadeType;
|
||||
import crazypants.enderio.conduit.geom.CollidableComponent;
|
||||
import crazypants.enderio.conduit.geom.ConduitConnectorType;
|
||||
import crazypants.enderio.conduit.gui.ExternalConnectionContainer;
|
||||
import crazypants.enderio.conduit.gui.GuiExternalConnection;
|
||||
import crazypants.enderio.conduit.gui.GuiExternalConnectionSelector;
|
||||
import crazypants.enderio.conduit.gui.PacketFluidChannel;
|
||||
import crazypants.enderio.conduit.gui.PacketFluidFilter;
|
||||
import crazypants.enderio.conduit.gui.PacketOpenConduitUI;
|
||||
import crazypants.enderio.conduit.gui.PacketSlotVisibility;
|
||||
import crazypants.enderio.conduit.gui.*;
|
||||
import crazypants.enderio.conduit.gui.item.PacketExistingItemFilterSnapshot;
|
||||
import crazypants.enderio.conduit.gui.item.PacketModItemFilter;
|
||||
import crazypants.enderio.conduit.liquid.PacketFluidLevel;
|
||||
|
||||
@@ -55,10 +55,11 @@ public class ConduitDisplayMode {
|
||||
* Use this constructor if you have custom display logic, it will use {@code IConduit.class} as the conduitType, and
|
||||
* the passed name as the override name.
|
||||
*
|
||||
* @see #ConduitDisplayMode(Class, IWidgetIcon, IWidgetIcon)
|
||||
*
|
||||
* @param name The override name.
|
||||
* @param widgetSelected The widget to render when this type is selected.
|
||||
* @param widgetUnselected The widget to render when this type is unselected.
|
||||
* @see #ConduitDisplayMode(Class, IWidgetIcon, IWidgetIcon)
|
||||
*/
|
||||
public ConduitDisplayMode(String name, IWidgetIcon widgetSelected, IWidgetIcon widgetUnselected) {
|
||||
this(IConduit.class, widgetSelected, widgetUnselected);
|
||||
|
||||
@@ -2,8 +2,7 @@ package crazypants.enderio.conduit;
|
||||
|
||||
import static crazypants.enderio.ModObject.blockPainter;
|
||||
import static crazypants.enderio.material.Alloy.*;
|
||||
import static crazypants.enderio.material.Material.CONDUIT_BINDER;
|
||||
import static crazypants.enderio.material.Material.PHASED_IRON_NUGGET;
|
||||
import static crazypants.enderio.material.Material.*;
|
||||
import static crazypants.enderio.material.endergy.AlloyEndergy.*;
|
||||
import static crazypants.util.RecipeUtil.addShaped;
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ public class ConduitUtil {
|
||||
}
|
||||
}
|
||||
if (con.getNetwork() != null) { // this should have been destroyed when destroying the neighbours network but
|
||||
// lets just make
|
||||
// lets just make
|
||||
// sure
|
||||
con.getNetwork().destroyNetwork();
|
||||
}
|
||||
|
||||
@@ -50,6 +50,7 @@ import crazypants.enderio.conduit.power.IPowerConduit;
|
||||
import crazypants.enderio.conduit.redstone.IRedstoneConduit;
|
||||
import crazypants.enderio.conduit.redstone.InsulatedRedstoneConduit;
|
||||
import crazypants.enderio.config.Config;
|
||||
import li.cil.oc.api.network.*;
|
||||
import li.cil.oc.api.network.Message;
|
||||
import li.cil.oc.api.network.Node;
|
||||
import mekanism.api.gas.Gas;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package crazypants.enderio.conduit.gui;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.Rectangle;
|
||||
import java.awt.*;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package crazypants.enderio.conduit.gui.item;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.*;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
|
||||
@@ -612,7 +612,8 @@ public class ItemConduit extends AbstractConduit implements IItemConduit {
|
||||
|
||||
@Override
|
||||
public ItemStack createItem() {
|
||||
return new ItemStack(EnderIO.itemItemConduit, 1, metaData);
|
||||
ItemStack result = new ItemStack(EnderIO.itemItemConduit, 1, metaData);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -30,7 +30,7 @@ public interface IItemFilter {
|
||||
|
||||
/**
|
||||
* Checks if the given item passes the filter or not.
|
||||
*
|
||||
*
|
||||
* @param inv the attached inventory - or null when used without an inventory (eg for a GUI)
|
||||
* @param item the item to check
|
||||
* @return true if the item is allowed to pass
|
||||
|
||||
@@ -13,6 +13,7 @@ import crazypants.enderio.EnderIOTab;
|
||||
import crazypants.enderio.ModObject;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author matthias
|
||||
*/
|
||||
public class ItemPowerItemFilter extends Item implements IItemFilterUpgrade, IResourceTooltipProvider {
|
||||
|
||||
@@ -19,6 +19,7 @@ import crazypants.enderio.conduit.item.NetworkedInventory;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author matthias
|
||||
*/
|
||||
public class PowerItemFilter implements IItemFilter {
|
||||
|
||||
@@ -157,11 +157,11 @@ public abstract class AbstractLiquidConduit extends AbstractConduit implements I
|
||||
boolean res;
|
||||
if (mode == RedstoneControlMode.OFF) {
|
||||
// if checking for no signal, must be no signal from both
|
||||
res = RedstoneControlMode.isConditionMet(mode, signal)
|
||||
res = mode.isConditionMet(mode, signal)
|
||||
&& (col != DyeColor.RED || isConditionMetByExternalSignal(dir, mode, col));
|
||||
} else {
|
||||
// if checking for a signal, either is fine
|
||||
res = RedstoneControlMode.isConditionMet(mode, signal)
|
||||
res = mode.isConditionMet(mode, signal)
|
||||
|| (col == DyeColor.RED && isConditionMetByExternalSignal(dir, mode, col));
|
||||
}
|
||||
return res;
|
||||
@@ -180,12 +180,7 @@ public abstract class AbstractLiquidConduit extends AbstractConduit implements I
|
||||
}
|
||||
}
|
||||
|
||||
return RedstoneControlMode.isConditionMet(mode, externalSignal);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ConnectionMode getDefaultConnectionMode() {
|
||||
return ConnectionMode.INPUT;
|
||||
return mode.isConditionMet(mode, externalSignal);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
package crazypants.enderio.conduit.liquid;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package crazypants.enderio.conduit.liquid;
|
||||
|
||||
import static com.enderio.core.client.render.CubeRenderer.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
@@ -17,7 +19,6 @@ import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
import com.enderio.core.client.render.BoundingBox;
|
||||
import com.enderio.core.client.render.CubeRenderer;
|
||||
import com.enderio.core.client.render.RenderUtil;
|
||||
import com.enderio.core.common.util.ForgeDirectionOffsets;
|
||||
import com.enderio.core.common.vecmath.Vector2f;
|
||||
@@ -95,12 +96,12 @@ public class LiquidConduitRenderer extends DefaultConduitRenderer implements IRe
|
||||
List<Vertex> corners = component.bound
|
||||
.getCornersWithUvForFace(component.dir, tex.getMinU(), tex.getMaxU(), tex.getMinV(), tex.getMaxV());
|
||||
for (Vertex c : corners) {
|
||||
CubeRenderer.addVecWithUV(c.xyz, c.uv.x, c.uv.y);
|
||||
addVecWithUV(c.xyz, c.uv.x, c.uv.y);
|
||||
}
|
||||
// back face
|
||||
for (int i = corners.size() - 1; i >= 0; i--) {
|
||||
Vertex c = corners.get(i);
|
||||
CubeRenderer.addVecWithUV(c.xyz, c.uv.x, c.uv.y);
|
||||
addVecWithUV(c.xyz, c.uv.x, c.uv.y);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -303,7 +304,7 @@ public class LiquidConduitRenderer extends DefaultConduitRenderer implements IRe
|
||||
float transY = (bound.sizeY() - sizeY) / 2;
|
||||
|
||||
Vector3d translation = new Vector3d(0, transY, 0);
|
||||
CubeRenderer.setupVertices(bound.translate(translation));
|
||||
setupVertices(bound.translate(translation));
|
||||
}
|
||||
|
||||
private void calculateRatios(LiquidConduit conduit) {
|
||||
|
||||
@@ -84,8 +84,6 @@ public final class Config {
|
||||
public static boolean reinforcedObsidianEnabled = true;
|
||||
public static boolean reinforcedObsidianUseDarkSteelBlocks = false;
|
||||
|
||||
public static boolean enforceOfflinePlayerUUID = false;
|
||||
|
||||
public static boolean useAlternateBinderRecipe = false;
|
||||
|
||||
public static boolean useAlternateTesseractModel = false;
|
||||
@@ -1037,13 +1035,6 @@ public final class Config {
|
||||
"Enable per tick sampling on individual power inputs and outputs. This allows slightly more detailed messages from the RF Reader but has a negative impact on server performance.")
|
||||
.getBoolean(detailedPowerTrackingEnabled);
|
||||
|
||||
enforceOfflinePlayerUUID = config.get(
|
||||
sectionAdvanced.name,
|
||||
"enforceOfflinePlayerUUID",
|
||||
false,
|
||||
"Enforces to use the players offline UUID. Recommendet to use before creating your world, otherwise it might breaks all secuity related things.")
|
||||
.getBoolean(enforceOfflinePlayerUUID);
|
||||
|
||||
useSneakMouseWheelYetaWrench = config.get(
|
||||
sectionPersonal.name,
|
||||
"useSneakMouseWheelYetaWrench",
|
||||
|
||||
@@ -2,7 +2,7 @@ package crazypants.enderio.item;
|
||||
|
||||
import static crazypants.enderio.material.Alloy.*;
|
||||
import static crazypants.enderio.material.Material.VIBRANT_CYSTAL;
|
||||
import static crazypants.enderio.material.endergy.AlloyEndergy.STELLAR_ALLOY;
|
||||
import static crazypants.enderio.material.endergy.AlloyEndergy.*;
|
||||
import static crazypants.util.RecipeUtil.addShaped;
|
||||
|
||||
import net.minecraft.init.Blocks;
|
||||
|
||||
@@ -41,9 +41,9 @@ public class AbstractMachineRenderer implements ISimpleBlockRenderingHandler, II
|
||||
private CustomCubeRenderer ccr = new CustomCubeRenderer();
|
||||
|
||||
private PaintedBlockRenderer paintedRenderer = new PaintedBlockRenderer(this.getRenderId(), null); // passthrough
|
||||
// renderer for
|
||||
// paintable
|
||||
// machines
|
||||
// renderer for
|
||||
// paintable
|
||||
// machines
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
|
||||
@@ -9,10 +9,7 @@ import com.enderio.core.common.vecmath.VecmathUtil;
|
||||
|
||||
import crazypants.enderio.EnderIO;
|
||||
import crazypants.enderio.network.PacketHandler;
|
||||
import crazypants.enderio.power.Capacitors;
|
||||
import crazypants.enderio.power.ICapacitor;
|
||||
import crazypants.enderio.power.IInternalPoweredTile;
|
||||
import crazypants.enderio.power.PowerHandlerUtil;
|
||||
import crazypants.enderio.power.*;
|
||||
|
||||
public abstract class AbstractPoweredMachineEntity extends AbstractMachineEntity implements IInternalPoweredTile {
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ import crazypants.enderio.machine.recipe.RecipeBonusType;
|
||||
* progress' recipe for a machine is stored to and retrieved from a machines TileEntity soley based on its UID.
|
||||
*
|
||||
* @author cp
|
||||
*
|
||||
*/
|
||||
public interface IMachineRecipe {
|
||||
|
||||
@@ -49,7 +50,7 @@ public interface IMachineRecipe {
|
||||
/**
|
||||
* Returns the output from a single 'cycle' of the recipe (even if the inputs would allow the recipe to be crafted
|
||||
* several times).
|
||||
* <p>
|
||||
*
|
||||
* This method must not return null. If no output is generated an empty array should be returned.
|
||||
*
|
||||
* @param randomChance a random number to be used as a seed for determining whether '% chance' outputs are returned.
|
||||
|
||||
@@ -3,6 +3,7 @@ package crazypants.enderio.machine;
|
||||
import static crazypants.enderio.EnderIO.itemBasicCapacitor;
|
||||
import static crazypants.enderio.material.Alloy.*;
|
||||
import static crazypants.enderio.material.Material.*;
|
||||
import static crazypants.util.RecipeUtil.*;
|
||||
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
@@ -23,7 +24,6 @@ import crazypants.enderio.material.FrankenSkull;
|
||||
import crazypants.enderio.material.MachinePart;
|
||||
import crazypants.enderio.material.Material;
|
||||
import crazypants.enderio.power.Capacitors;
|
||||
import crazypants.util.RecipeUtil;
|
||||
|
||||
public class MachineRecipes {
|
||||
|
||||
@@ -62,24 +62,13 @@ public class MachineRecipes {
|
||||
String silicon = SILICON.oreDict;
|
||||
|
||||
if (Config.addPeacefulRecipes) {
|
||||
RecipeUtil.addShaped(
|
||||
frankenZombie,
|
||||
"gdg",
|
||||
"dzd",
|
||||
"gdg",
|
||||
'g',
|
||||
"ingotGold",
|
||||
'd',
|
||||
"gemDiamond",
|
||||
'z',
|
||||
zombieController);
|
||||
RecipeUtil
|
||||
.addShaped(sentientEnder, "ddd", "ded", "dgd", 'g', "blockGold", 'd', "gemDiamond", 'e', enderRes);
|
||||
addShaped(frankenZombie, "gdg", "dzd", "gdg", 'g', "ingotGold", 'd', "gemDiamond", 'z', zombieController);
|
||||
addShaped(sentientEnder, "ddd", "ded", "dgd", 'g', "blockGold", 'd', "gemDiamond", 'e', enderRes);
|
||||
}
|
||||
|
||||
// stirling gen
|
||||
ItemStack stirlingGen = new ItemStack(EnderIO.blockStirlingGenerator, 1, 0);
|
||||
RecipeUtil.addShaped(
|
||||
addShaped(
|
||||
stirlingGen,
|
||||
"bbb",
|
||||
"bfb",
|
||||
@@ -96,7 +85,7 @@ public class MachineRecipes {
|
||||
// Combustion Gen
|
||||
ItemStack res = new ItemStack(EnderIO.blockTank, 1, 0);
|
||||
ItemStack comGen = new ItemStack(EnderIO.blockCombustionGenerator, 1, 0);
|
||||
RecipeUtil.addShaped(
|
||||
addShaped(
|
||||
comGen,
|
||||
"eee",
|
||||
"rmr",
|
||||
@@ -114,7 +103,7 @@ public class MachineRecipes {
|
||||
|
||||
// ZombieGen
|
||||
ItemStack zg = new ItemStack(EnderIO.blockZombieGenerator, 1, 0);
|
||||
RecipeUtil.addShaped(
|
||||
addShaped(
|
||||
zg,
|
||||
"eee",
|
||||
"qzq",
|
||||
@@ -128,7 +117,7 @@ public class MachineRecipes {
|
||||
|
||||
// FrankenzombieGen
|
||||
ItemStack fg = new ItemStack(EnderIO.blockFrankenZombieGenerator, 1, 0);
|
||||
RecipeUtil.addShaped(
|
||||
addShaped(
|
||||
fg,
|
||||
"eee",
|
||||
"qzq",
|
||||
@@ -142,7 +131,7 @@ public class MachineRecipes {
|
||||
|
||||
// EnderGen
|
||||
ItemStack eg = new ItemStack(EnderIO.blockEnderGenerator, 1, 0);
|
||||
RecipeUtil.addShaped(
|
||||
addShaped(
|
||||
eg,
|
||||
"eee",
|
||||
"qzq",
|
||||
@@ -156,18 +145,17 @@ public class MachineRecipes {
|
||||
|
||||
// KillerJoe
|
||||
ItemStack kj = new ItemStack(EnderIO.blockKillerJoe, 1, 0);
|
||||
RecipeUtil.addShaped(kj, "sss", "qzq", "qqq", 's', darkSteel, 'q', fusedQuartz, 'z', frankenZombie);
|
||||
addShaped(kj, "sss", "qzq", "qqq", 's', darkSteel, 'q', fusedQuartz, 'z', frankenZombie);
|
||||
|
||||
// Wireless charger
|
||||
ItemStack wirelessCharger = new ItemStack(EnderIO.blockWirelessCharger);
|
||||
// addShaped(wirelessCharger, "svs", "imi", "scs", 's', electricSteel, 'i', silicon, 'm', machineChassi, 'c',
|
||||
// capacitor3, 'v', vibCry);
|
||||
RecipeUtil
|
||||
.addShaped(wirelessCharger, "sss", "ses", "scs", 's', electricalSteel, 'c', capacitor3, 'e', enderRes);
|
||||
addShaped(wirelessCharger, "sss", "ses", "scs", 's', electricalSteel, 'c', capacitor3, 'e', enderRes);
|
||||
|
||||
// Crafter
|
||||
ItemStack crafter = new ItemStack(EnderIO.blockCrafter, 1, 0);
|
||||
RecipeUtil.addShaped(
|
||||
addShaped(
|
||||
crafter,
|
||||
"iti",
|
||||
"imi",
|
||||
@@ -189,7 +177,7 @@ public class MachineRecipes {
|
||||
} else {
|
||||
zombieBit = zombieController;
|
||||
}
|
||||
RecipeUtil.addShaped(
|
||||
addShaped(
|
||||
poweredSpawner,
|
||||
"ese",
|
||||
"eme",
|
||||
@@ -214,16 +202,15 @@ public class MachineRecipes {
|
||||
} else {
|
||||
glassSides = "glass";
|
||||
}
|
||||
RecipeUtil
|
||||
.addShaped(reservoir, "gfg", "gcg", "gfg", 'g', glassSides, 'c', Items.cauldron, 'f', fusedQuartz);
|
||||
addShaped(reservoir, "gfg", "gcg", "gfg", 'g', glassSides, 'c', Items.cauldron, 'f', fusedQuartz);
|
||||
}
|
||||
|
||||
// Tanks
|
||||
ItemStack basicTank = new ItemStack(EnderIO.blockTank, 1, 0);
|
||||
RecipeUtil.addShaped(basicTank, "ibi", "bgb", "ibi", 'g', "glass", 'i', "ingotIron", 'b', Blocks.iron_bars);
|
||||
addShaped(basicTank, "ibi", "bgb", "ibi", 'g', "glass", 'i', "ingotIron", 'b', Blocks.iron_bars);
|
||||
|
||||
ItemStack advTank = new ItemStack(EnderIO.blockTank, 1, 1);
|
||||
RecipeUtil.addShaped(
|
||||
addShaped(
|
||||
advTank,
|
||||
"ibi",
|
||||
"bgb",
|
||||
@@ -238,7 +225,7 @@ public class MachineRecipes {
|
||||
// mill
|
||||
ItemStack crusher = new ItemStack(EnderIO.blockCrusher, 1, 0);
|
||||
if (Config.useHardRecipes) {
|
||||
RecipeUtil.addShaped(
|
||||
addShaped(
|
||||
crusher,
|
||||
"ooo",
|
||||
"fmf",
|
||||
@@ -254,7 +241,7 @@ public class MachineRecipes {
|
||||
'o',
|
||||
Blocks.obsidian);
|
||||
} else {
|
||||
RecipeUtil.addShaped(
|
||||
addShaped(
|
||||
crusher,
|
||||
"fff",
|
||||
"imi",
|
||||
@@ -272,7 +259,7 @@ public class MachineRecipes {
|
||||
// alloy smelter
|
||||
ItemStack alloySmelter = new ItemStack(EnderIO.blockAlloySmelter, 1, 0);
|
||||
if (Config.useHardRecipes) {
|
||||
RecipeUtil.addShaped(
|
||||
addShaped(
|
||||
alloySmelter,
|
||||
"bfb",
|
||||
"fmf",
|
||||
@@ -286,7 +273,7 @@ public class MachineRecipes {
|
||||
'f',
|
||||
Blocks.furnace);
|
||||
} else {
|
||||
RecipeUtil.addShaped(
|
||||
addShaped(
|
||||
alloySmelter,
|
||||
"bfb",
|
||||
"fmf",
|
||||
@@ -303,7 +290,7 @@ public class MachineRecipes {
|
||||
|
||||
// Vat
|
||||
ItemStack still = new ItemStack(EnderIO.blockVat, 1, 0);
|
||||
RecipeUtil.addShaped(
|
||||
addShaped(
|
||||
still,
|
||||
"eve",
|
||||
"tmt",
|
||||
@@ -323,14 +310,13 @@ public class MachineRecipes {
|
||||
|
||||
ItemStack capBank1 = BlockItemCapBank
|
||||
.createItemStackWithPower(CapBankType.getMetaFromType(CapBankType.SIMPLE), 0);
|
||||
RecipeUtil.addShaped(capBank1, "bcb", "cmc", "bcb", 'b', "ingotIron", 'c', capacitor, 'm', "blockRedstone");
|
||||
addShaped(capBank1, "bcb", "cmc", "bcb", 'b', "ingotIron", 'c', capacitor, 'm', "blockRedstone");
|
||||
ItemStack capBank2 = BlockItemCapBank
|
||||
.createItemStackWithPower(CapBankType.getMetaFromType(CapBankType.ACTIVATED), 0);
|
||||
RecipeUtil
|
||||
.addShaped(capBank2, "bcb", "cmc", "bcb", 'b', electricalSteel, 'c', capacitor2, 'm', "blockRedstone");
|
||||
addShaped(capBank2, "bcb", "cmc", "bcb", 'b', electricalSteel, 'c', capacitor2, 'm', "blockRedstone");
|
||||
ItemStack capBank3 = BlockItemCapBank
|
||||
.createItemStackWithPower(CapBankType.getMetaFromType(CapBankType.VIBRANT), 0);
|
||||
RecipeUtil.addShaped(capBank3, "bcb", "cmc", "bcb", 'b', electricalSteel, 'c', capacitor3, 'm', vibCry);
|
||||
addShaped(capBank3, "bcb", "cmc", "bcb", 'b', electricalSteel, 'c', capacitor3, 'm', vibCry);
|
||||
|
||||
ConvertOldRecipe convertRecipe = new ConvertOldRecipe();
|
||||
GameRegistry.addRecipe(convertRecipe);
|
||||
@@ -365,7 +351,7 @@ public class MachineRecipes {
|
||||
// painter
|
||||
ItemStack painter = new ItemStack(EnderIO.blockPainter, 1, 0);
|
||||
if (Config.useHardRecipes) {
|
||||
RecipeUtil.addShaped(
|
||||
addShaped(
|
||||
painter,
|
||||
"qqq",
|
||||
"mdm",
|
||||
@@ -381,7 +367,7 @@ public class MachineRecipes {
|
||||
'd',
|
||||
"gemDiamond");
|
||||
} else {
|
||||
RecipeUtil.addShaped(
|
||||
addShaped(
|
||||
painter,
|
||||
"qdq",
|
||||
"mMm",
|
||||
@@ -405,7 +391,7 @@ public class MachineRecipes {
|
||||
} else {
|
||||
zombieBit = zombieController;
|
||||
}
|
||||
RecipeUtil.addShaped(
|
||||
addShaped(
|
||||
farm,
|
||||
"ehe",
|
||||
"eme",
|
||||
@@ -425,7 +411,7 @@ public class MachineRecipes {
|
||||
// transceiver
|
||||
ItemStack transceiver = new ItemStack(EnderIO.blockTransceiver, 1, 0);
|
||||
if (Config.transceiverUseEasyRecipe) {
|
||||
RecipeUtil.addShaped(
|
||||
addShaped(
|
||||
transceiver,
|
||||
"oeo",
|
||||
"pdp",
|
||||
@@ -441,7 +427,7 @@ public class MachineRecipes {
|
||||
'd',
|
||||
Items.diamond);
|
||||
} else {
|
||||
RecipeUtil.addShaped(
|
||||
addShaped(
|
||||
transceiver,
|
||||
"oeo",
|
||||
"pdp",
|
||||
@@ -456,7 +442,7 @@ public class MachineRecipes {
|
||||
fusedQuartz,
|
||||
'd',
|
||||
endCry);
|
||||
RecipeUtil.addShapeless(transceiver, new ItemStack(EnderIO.blockHyperCube, 1, 0));
|
||||
addShapeless(transceiver, new ItemStack(EnderIO.blockHyperCube, 1, 0));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -468,7 +454,7 @@ public class MachineRecipes {
|
||||
ItemStack vibSolarPanel = new ItemStack(EnderIO.blockSolarPanel, 1, 2);
|
||||
|
||||
if (Config.useHardRecipes) {
|
||||
RecipeUtil.addShaped(
|
||||
addShaped(
|
||||
solarPanel,
|
||||
"efe",
|
||||
"pfp",
|
||||
@@ -483,7 +469,7 @@ public class MachineRecipes {
|
||||
energeticAlloy,
|
||||
'p',
|
||||
phasedGold);
|
||||
RecipeUtil.addShaped(
|
||||
addShaped(
|
||||
advSolarPanel,
|
||||
"efe",
|
||||
"pfp",
|
||||
@@ -498,7 +484,7 @@ public class MachineRecipes {
|
||||
phasedIron,
|
||||
'p',
|
||||
phasedGold);
|
||||
RecipeUtil.addShaped(
|
||||
addShaped(
|
||||
vibSolarPanel,
|
||||
"efe",
|
||||
"pfp",
|
||||
@@ -514,7 +500,7 @@ public class MachineRecipes {
|
||||
'p',
|
||||
phasedGold);
|
||||
} else {
|
||||
RecipeUtil.addShaped(
|
||||
addShaped(
|
||||
solarPanel,
|
||||
"efe",
|
||||
"pfp",
|
||||
@@ -529,7 +515,7 @@ public class MachineRecipes {
|
||||
energeticAlloy,
|
||||
'c',
|
||||
redstoneAlloy);
|
||||
RecipeUtil.addShaped(
|
||||
addShaped(
|
||||
advSolarPanel,
|
||||
"efe",
|
||||
"pfp",
|
||||
@@ -544,7 +530,7 @@ public class MachineRecipes {
|
||||
phasedIron,
|
||||
'c',
|
||||
electricalSteel);
|
||||
RecipeUtil.addShaped(
|
||||
addShaped(
|
||||
vibSolarPanel,
|
||||
"efe",
|
||||
"pfp",
|
||||
@@ -567,7 +553,7 @@ public class MachineRecipes {
|
||||
ItemStack powerConduit = new ItemStack(EnderIO.itemPowerConduit, 1, 0);
|
||||
ItemStack redstoneConduit = new ItemStack(EnderIO.itemRedstoneConduit, 1, 2);
|
||||
ItemStack mJMonitor = new ItemStack(EnderIO.blockPowerMonitor, 1, 0);
|
||||
RecipeUtil.addShaped(
|
||||
addShaped(
|
||||
mJMonitor,
|
||||
"sms",
|
||||
"sMs",
|
||||
@@ -585,11 +571,11 @@ public class MachineRecipes {
|
||||
|
||||
// Enchanter
|
||||
ItemStack enchanter = new ItemStack(EnderIO.blockEnchanter);
|
||||
RecipeUtil.addShaped(enchanter, "dbd", "sss", " s ", 'd', "gemDiamond", 'b', Items.book, 's', darkSteel);
|
||||
addShaped(enchanter, "dbd", "sss", " s ", 'd', "gemDiamond", 'b', Items.book, 's', darkSteel);
|
||||
|
||||
// Vacuum Chest
|
||||
ItemStack vacuumChest = new ItemStack(EnderIO.blockVacuumChest);
|
||||
RecipeUtil.addShaped(vacuumChest, "iii", "ici", "ipi", 'i', "ingotIron", 'c', "chestWood", 'p', pulCry);
|
||||
addShaped(vacuumChest, "iii", "ici", "ipi", 'i', "ingotIron", 'c', "chestWood", 'p', pulCry);
|
||||
|
||||
// Soul Binder
|
||||
Object enderBit;
|
||||
@@ -602,7 +588,7 @@ public class MachineRecipes {
|
||||
ItemStack zombieSkull = new ItemStack(Items.skull, 1, 4);
|
||||
ItemStack skeletonSkull = new ItemStack(Items.skull, 1, 0);
|
||||
ItemStack soulBinder = new ItemStack(EnderIO.blockSoulFuser);
|
||||
RecipeUtil.addShaped(
|
||||
addShaped(
|
||||
soulBinder,
|
||||
"ses",
|
||||
"zmc",
|
||||
@@ -623,7 +609,7 @@ public class MachineRecipes {
|
||||
// Attractor
|
||||
ItemStack attractor = new ItemStack(EnderIO.blockAttractor);
|
||||
ItemStack attractorCrystal = new ItemStack(EnderIO.itemMaterial, 1, Material.ATTRACTOR_CRYSTAL.ordinal());
|
||||
RecipeUtil.addShaped(
|
||||
addShaped(
|
||||
attractor,
|
||||
" c ",
|
||||
"ese",
|
||||
@@ -643,7 +629,7 @@ public class MachineRecipes {
|
||||
EnderIO.blockEndermanSkull,
|
||||
1,
|
||||
BlockEndermanSkull.SkullType.TORMENTED.ordinal());
|
||||
RecipeUtil.addShaped(
|
||||
addShaped(
|
||||
aversion,
|
||||
" c ",
|
||||
"ese",
|
||||
@@ -660,12 +646,12 @@ public class MachineRecipes {
|
||||
// Experience
|
||||
ItemStack xp = new ItemStack(EnderIO.blockExperianceOblisk);
|
||||
ItemStack xpItem = new ItemStack(EnderIO.itemXpTransfer);
|
||||
RecipeUtil.addShaped(xp, " x ", " s ", "sms", 's', soularium, 'm', machineChassi, 'x', xpItem);
|
||||
addShaped(xp, " x ", " s ", "sms", 's', soularium, 'm', machineChassi, 'x', xpItem);
|
||||
|
||||
// Weather
|
||||
ItemStack weather = new ItemStack(EnderIO.blockWeatherObelisk);
|
||||
ItemStack weatherItem = new ItemStack(EnderIO.itemMaterial, 1, Material.WEATHER_CRYSTAL.ordinal());
|
||||
RecipeUtil.addShaped(
|
||||
addShaped(
|
||||
weather,
|
||||
" x ",
|
||||
"ese",
|
||||
@@ -700,14 +686,14 @@ public class MachineRecipes {
|
||||
EnderIO.blockElectricLight,
|
||||
1,
|
||||
BlockItemElectricLight.Type.WIRELESS_INV.ordinal());
|
||||
RecipeUtil.addShapeless(wirelessLamp, poweredLamp, enderRes);
|
||||
RecipeUtil.addShapeless(wirelessLamp, wirelessLampInv, Blocks.redstone_torch);
|
||||
RecipeUtil.addShapeless(wirelessLampInv, poweredLampInv, enderRes);
|
||||
RecipeUtil.addShapeless(wirelessLampInv, wirelessLamp, Blocks.redstone_torch);
|
||||
addShapeless(wirelessLamp, poweredLamp, enderRes);
|
||||
addShapeless(wirelessLamp, wirelessLampInv, Blocks.redstone_torch);
|
||||
addShapeless(wirelessLampInv, poweredLampInv, enderRes);
|
||||
addShapeless(wirelessLampInv, wirelessLamp, Blocks.redstone_torch);
|
||||
|
||||
// inventory panel
|
||||
ItemStack awareness = new ItemStack(EnderIO.itemFunctionUpgrade, 1, FunctionUpgrade.INVENTORY_PANEL.ordinal());
|
||||
RecipeUtil.addShaped(
|
||||
addShaped(
|
||||
awareness,
|
||||
"bsb",
|
||||
"ses",
|
||||
@@ -721,7 +707,7 @@ public class MachineRecipes {
|
||||
'i',
|
||||
electricalSteel);
|
||||
ItemStack invPanel = new ItemStack(EnderIO.blockInventoryPanel);
|
||||
RecipeUtil.addShaped(
|
||||
addShaped(
|
||||
invPanel,
|
||||
"dad",
|
||||
"psp",
|
||||
@@ -741,7 +727,7 @@ public class MachineRecipes {
|
||||
|
||||
// powered light
|
||||
if (Config.useHardRecipes) {
|
||||
RecipeUtil.addShaped(
|
||||
addShaped(
|
||||
poweredLamp,
|
||||
"ggg",
|
||||
"sds",
|
||||
@@ -755,7 +741,7 @@ public class MachineRecipes {
|
||||
'c',
|
||||
capacitor);
|
||||
} else {
|
||||
RecipeUtil.addShaped(
|
||||
addShaped(
|
||||
poweredLamp,
|
||||
"ggg",
|
||||
"sds",
|
||||
@@ -770,19 +756,19 @@ public class MachineRecipes {
|
||||
capacitor);
|
||||
}
|
||||
ItemStack invPoweredLamp = new ItemStack(EnderIO.blockElectricLight, 1, 1);
|
||||
RecipeUtil.addShapeless(invPoweredLamp, poweredLamp, Blocks.redstone_torch);
|
||||
RecipeUtil.addShapeless(poweredLamp, invPoweredLamp, Blocks.redstone_torch);
|
||||
addShapeless(invPoweredLamp, poweredLamp, Blocks.redstone_torch);
|
||||
addShapeless(poweredLamp, invPoweredLamp, Blocks.redstone_torch);
|
||||
|
||||
// light
|
||||
ItemStack lamp = new ItemStack(EnderIO.blockElectricLight, 1, 2);
|
||||
RecipeUtil.addShaped(lamp, " ", "ggg", "isi", 'g', "glass", 's', "glowstone", 'i', "ingotIron");
|
||||
addShaped(lamp, " ", "ggg", "isi", 'g', "glass", 's', "glowstone", 'i', "ingotIron");
|
||||
ItemStack invLamp = new ItemStack(EnderIO.blockElectricLight, 1, 3);
|
||||
RecipeUtil.addShapeless(invLamp, lamp, Blocks.redstone_torch);
|
||||
RecipeUtil.addShapeless(lamp, invLamp, Blocks.redstone_torch);
|
||||
addShapeless(invLamp, lamp, Blocks.redstone_torch);
|
||||
addShapeless(lamp, invLamp, Blocks.redstone_torch);
|
||||
|
||||
// MJ Reader
|
||||
|
||||
RecipeUtil.addShaped(
|
||||
addShaped(
|
||||
mJReader,
|
||||
"epe",
|
||||
"gcg",
|
||||
@@ -802,7 +788,7 @@ public class MachineRecipes {
|
||||
|
||||
// Slice'N'Splice
|
||||
ItemStack sns = new ItemStack(EnderIO.blockSliceAndSplice);
|
||||
RecipeUtil.addShaped(
|
||||
addShaped(
|
||||
sns,
|
||||
"iki",
|
||||
"ams",
|
||||
@@ -822,28 +808,8 @@ public class MachineRecipes {
|
||||
ItemStack itemBuffer = Type.getStack(Type.ITEM);
|
||||
ItemStack powerBuffer = Type.getStack(Type.POWER);
|
||||
ItemStack omniBuffer = Type.getStack(Type.OMNI);
|
||||
RecipeUtil.addShaped(
|
||||
itemBuffer,
|
||||
"isi",
|
||||
"scs",
|
||||
"isi",
|
||||
'i',
|
||||
"ingotIron",
|
||||
's',
|
||||
"ingotElectricalSteel",
|
||||
'c',
|
||||
"chestWood");
|
||||
RecipeUtil.addShaped(
|
||||
powerBuffer,
|
||||
"isi",
|
||||
"sfs",
|
||||
"isi",
|
||||
'i',
|
||||
"ingotIron",
|
||||
's',
|
||||
"ingotElectricalSteel",
|
||||
'f',
|
||||
machineChassis);
|
||||
RecipeUtil.addShapeless(omniBuffer, itemBuffer, powerBuffer);
|
||||
addShaped(itemBuffer, "isi", "scs", "isi", 'i', "ingotIron", 's', "ingotElectricalSteel", 'c', "chestWood");
|
||||
addShaped(powerBuffer, "isi", "sfs", "isi", 'i', "ingotIron", 's', "ingotElectricalSteel", 'f', machineChassis);
|
||||
addShapeless(omniBuffer, itemBuffer, powerBuffer);
|
||||
}
|
||||
}
|
||||
@@ -20,6 +20,7 @@ import crazypants.enderio.Log;
|
||||
|
||||
/**
|
||||
* This is not in the FakePlayer hierarchy for reasons.
|
||||
*
|
||||
*/
|
||||
public class FakeFarmPlayer extends EntityPlayerMP {
|
||||
|
||||
|
||||
@@ -120,6 +120,7 @@ public enum Fertilizer {
|
||||
/**
|
||||
* Returns the singleton instance for the fertilizer that was given as parameter. If the given item is no
|
||||
* fertilizer, it will return an instance of Fertilizer.None.
|
||||
*
|
||||
*/
|
||||
public static Fertilizer getInstance(ItemStack stack) {
|
||||
for (Fertilizer fertilizer : validFertilizers) {
|
||||
@@ -143,7 +144,7 @@ public enum Fertilizer {
|
||||
|
||||
/**
|
||||
* Tries to apply the given item on the given block using the type-specific method. SFX is played on success.
|
||||
* <p>
|
||||
*
|
||||
* If the item was successfully applied, the stacksize will be decreased if appropriate. The caller will need to
|
||||
* check for stacksize 0 and null the inventory slot if needed.
|
||||
*
|
||||
|
||||
@@ -37,7 +37,7 @@ public class NaturaBerryFarmer extends PickableFarmer {
|
||||
block = farm.getBlock(checkBlock);
|
||||
|
||||
if (super.canHarvest(farm, bc, block, meta)) { // redundant check because our canHarvest checks all 5 blocks
|
||||
// so a bush may be invalid in
|
||||
// so a bush may be invalid in
|
||||
// the stack of 5
|
||||
IHarvestResult blockRes = super.harvestBlock(farm, checkBlock, block, meta);
|
||||
|
||||
|
||||
@@ -301,7 +301,7 @@ public class TileInventoryPanel extends AbstractMachineEntity implements IFluidH
|
||||
|
||||
/**
|
||||
* This is called by PacketUpdateExtractionDisabled on the client side
|
||||
*
|
||||
*
|
||||
* @param extractionDisabled if extraction is disabled
|
||||
*/
|
||||
void updateExtractionDisabled(boolean extractionDisabled) {
|
||||
|
||||
@@ -151,7 +151,7 @@ public class TileSoulBinder extends AbstractPoweredTaskEntity implements IHaveEx
|
||||
|
||||
/**
|
||||
* Computes the required amount of XP to start the current recipe.
|
||||
*
|
||||
*
|
||||
* @return 0 if no XP is required, negative when more than required XP is stored.
|
||||
*/
|
||||
private int getXPRequired() {
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
package crazypants.enderio.material;
|
||||
|
||||
import static com.enderio.core.common.util.OreDictionaryHelper.*;
|
||||
import static crazypants.enderio.material.Alloy.*;
|
||||
import static crazypants.enderio.material.Material.*;
|
||||
import static crazypants.enderio.material.endergy.AlloyEndergy.*;
|
||||
import static crazypants.enderio.power.Capacitors.*;
|
||||
import static crazypants.util.RecipeUtil.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@@ -21,7 +23,6 @@ import crazypants.enderio.config.Config;
|
||||
import crazypants.enderio.item.ItemEnderFood.EnderFood;
|
||||
import crazypants.enderio.material.endergy.AlloyEndergy;
|
||||
import crazypants.enderio.power.Capacitors;
|
||||
import crazypants.util.RecipeUtil;
|
||||
|
||||
public class MaterialRecipes {
|
||||
|
||||
@@ -62,7 +63,7 @@ public class MaterialRecipes {
|
||||
// Allow free conversion of additional/legacy oreDict name items into
|
||||
// our item because we only register recipes for the primary oreDict
|
||||
// name. Use a 2-to-2 recipe because the 1-to-n is already in use.
|
||||
RecipeUtil.addShapeless(alloy.getStackIngot(2), oreDictName, oreDictName);
|
||||
addShapeless(alloy.getStackIngot(2), oreDictName, oreDictName);
|
||||
}
|
||||
}
|
||||
isPrimaryName = true;
|
||||
@@ -71,7 +72,7 @@ public class MaterialRecipes {
|
||||
if (isPrimaryName) {
|
||||
isPrimaryName = false;
|
||||
} else {
|
||||
RecipeUtil.addShapeless(alloy.getStackBlock(2), oreDictName, oreDictName);
|
||||
addShapeless(alloy.getStackBlock(2), oreDictName, oreDictName);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -86,7 +87,7 @@ public class MaterialRecipes {
|
||||
// Allow free conversion of additional/legacy oreDict name items into
|
||||
// our item because we only register recipes for the primary oreDict
|
||||
// name. Use a 2-to-2 recipe because the 1-to-n is already in use.
|
||||
RecipeUtil.addShapeless(alloy.getStackIngot(2), oreDictName, oreDictName);
|
||||
addShapeless(alloy.getStackIngot(2), oreDictName, oreDictName);
|
||||
}
|
||||
}
|
||||
isPrimaryName = true;
|
||||
@@ -95,7 +96,7 @@ public class MaterialRecipes {
|
||||
if (isPrimaryName) {
|
||||
isPrimaryName = false;
|
||||
} else {
|
||||
RecipeUtil.addShapeless(alloy.getStackBlock(2), oreDictName, oreDictName);
|
||||
addShapeless(alloy.getStackBlock(2), oreDictName, oreDictName);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -130,9 +131,9 @@ public class MaterialRecipes {
|
||||
OreDictionary.registerOre("itemSkull", new ItemStack(EnderIO.blockEndermanSkull));
|
||||
|
||||
// Glass stuff for compatibility
|
||||
RecipeUtil.addShaped(new ItemStack(Blocks.glass_pane, 16, 0), "eee", "eee", 'e', pureGlass);
|
||||
RecipeUtil.addShapeless(new ItemStack(Blocks.glass), pureGlass);
|
||||
RecipeUtil.addShaped(new ItemStack(Items.glass_bottle, 3, 0), "g g", " g ", 'g', pureGlass);
|
||||
addShaped(new ItemStack(Blocks.glass_pane, 16, 0), "eee", "eee", 'e', pureGlass);
|
||||
addShapeless(new ItemStack(Blocks.glass), pureGlass);
|
||||
addShaped(new ItemStack(Items.glass_bottle, 3, 0), "g g", " g ", 'g', pureGlass);
|
||||
|
||||
Material.registerOres(EnderIO.itemMaterial);
|
||||
MachinePart.registerOres(EnderIO.itemMachinePart);
|
||||
@@ -169,7 +170,7 @@ public class MaterialRecipes {
|
||||
|
||||
// Capacitors
|
||||
if (Config.useHardRecipes) {
|
||||
RecipeUtil.addShaped(
|
||||
addShaped(
|
||||
BASIC_CAPACITOR.getItemStack(),
|
||||
" gr",
|
||||
"gig",
|
||||
@@ -180,7 +181,7 @@ public class MaterialRecipes {
|
||||
"ingotGold",
|
||||
'i',
|
||||
ingotCopper);
|
||||
RecipeUtil.addShaped(
|
||||
addShaped(
|
||||
ACTIVATED_CAPACITOR.getItemStack(),
|
||||
"iii",
|
||||
"cCc",
|
||||
@@ -191,7 +192,7 @@ public class MaterialRecipes {
|
||||
BASIC_CAPACITOR.getItemStack(),
|
||||
'C',
|
||||
"dustCoal");
|
||||
RecipeUtil.addShaped(
|
||||
addShaped(
|
||||
ENDER_CAPACITOR.getItemStack(),
|
||||
"iii",
|
||||
"cCc",
|
||||
@@ -205,7 +206,7 @@ public class MaterialRecipes {
|
||||
|
||||
String prismarine = OreDictionary.doesOreNameExist("shardPrismarine") ? "shardPrismarine"
|
||||
: "itemPulsatingCrystal";
|
||||
RecipeUtil.addShaped(
|
||||
addShaped(
|
||||
CRYSTALLINE_CAPACITOR.getItemStack(),
|
||||
"iii",
|
||||
"cCc",
|
||||
@@ -216,7 +217,7 @@ public class MaterialRecipes {
|
||||
capacitorEnder,
|
||||
'C',
|
||||
prismarine);
|
||||
RecipeUtil.addShaped(
|
||||
addShaped(
|
||||
MELODIC_CAPACITOR.getItemStack(),
|
||||
"iii",
|
||||
"cCc",
|
||||
@@ -227,7 +228,7 @@ public class MaterialRecipes {
|
||||
CRYSTALLINE_CAPACITOR.getItemStack(),
|
||||
'C',
|
||||
endSteel);
|
||||
RecipeUtil.addShaped(
|
||||
addShaped(
|
||||
STELLAR_CAPACITOR.getItemStack(),
|
||||
"iii",
|
||||
"cCc",
|
||||
@@ -239,7 +240,7 @@ public class MaterialRecipes {
|
||||
'C',
|
||||
PRECIENT_CRYSTAL.oreDict);
|
||||
|
||||
RecipeUtil.addShaped(
|
||||
addShaped(
|
||||
SILVER_CAPACITOR.getItemStack(),
|
||||
" sr",
|
||||
"sis",
|
||||
@@ -250,7 +251,7 @@ public class MaterialRecipes {
|
||||
"ingotSilver",
|
||||
'i',
|
||||
"ingotLead");
|
||||
RecipeUtil.addShaped(
|
||||
addShaped(
|
||||
ENDERGETIC_CAPACITOR.getItemStack(),
|
||||
"iii",
|
||||
"cCc",
|
||||
@@ -261,7 +262,7 @@ public class MaterialRecipes {
|
||||
SILVER_CAPACITOR.getItemStack(),
|
||||
'C',
|
||||
"dustCoal");
|
||||
RecipeUtil.addShaped(
|
||||
addShaped(
|
||||
ENDERGISED_CAPACITOR.getItemStack(),
|
||||
"iii",
|
||||
"cCc",
|
||||
@@ -274,7 +275,7 @@ public class MaterialRecipes {
|
||||
"glowstone");
|
||||
|
||||
} else {
|
||||
RecipeUtil.addShaped(
|
||||
addShaped(
|
||||
BASIC_CAPACITOR.getItemStack(),
|
||||
" gr",
|
||||
"gig",
|
||||
@@ -285,7 +286,7 @@ public class MaterialRecipes {
|
||||
"ingotGold",
|
||||
'i',
|
||||
ingotCopper);
|
||||
RecipeUtil.addShaped(
|
||||
addShaped(
|
||||
ACTIVATED_CAPACITOR.getItemStack(),
|
||||
" i ",
|
||||
"cCc",
|
||||
@@ -296,7 +297,7 @@ public class MaterialRecipes {
|
||||
BASIC_CAPACITOR.getItemStack(),
|
||||
'C',
|
||||
"dustCoal");
|
||||
RecipeUtil.addShaped(
|
||||
addShaped(
|
||||
ENDER_CAPACITOR.getItemStack(),
|
||||
" i ",
|
||||
"cCc",
|
||||
@@ -310,7 +311,7 @@ public class MaterialRecipes {
|
||||
|
||||
String prismarine = OreDictionary.doesOreNameExist("shardPrismarine") ? "shardPrismarine"
|
||||
: "itemPulsatingCrystal";
|
||||
RecipeUtil.addShaped(
|
||||
addShaped(
|
||||
CRYSTALLINE_CAPACITOR.getItemStack(),
|
||||
" i ",
|
||||
"cCc",
|
||||
@@ -321,7 +322,7 @@ public class MaterialRecipes {
|
||||
capacitorEnder,
|
||||
'C',
|
||||
prismarine);
|
||||
RecipeUtil.addShaped(
|
||||
addShaped(
|
||||
MELODIC_CAPACITOR.getItemStack(),
|
||||
" i ",
|
||||
"cCc",
|
||||
@@ -332,7 +333,7 @@ public class MaterialRecipes {
|
||||
CRYSTALLINE_CAPACITOR.getItemStack(),
|
||||
'C',
|
||||
endSteel);
|
||||
RecipeUtil.addShaped(
|
||||
addShaped(
|
||||
STELLAR_CAPACITOR.getItemStack(),
|
||||
" i ",
|
||||
"cCc",
|
||||
@@ -344,7 +345,7 @@ public class MaterialRecipes {
|
||||
'C',
|
||||
PRECIENT_CRYSTAL.oreDict);
|
||||
|
||||
RecipeUtil.addShaped(
|
||||
addShaped(
|
||||
SILVER_CAPACITOR.getItemStack(),
|
||||
" sr",
|
||||
"sis",
|
||||
@@ -355,7 +356,7 @@ public class MaterialRecipes {
|
||||
"ingotSilver",
|
||||
'i',
|
||||
"ingotLead");
|
||||
RecipeUtil.addShaped(
|
||||
addShaped(
|
||||
ENDERGETIC_CAPACITOR.getItemStack(),
|
||||
" i ",
|
||||
"cCc",
|
||||
@@ -366,7 +367,7 @@ public class MaterialRecipes {
|
||||
SILVER_CAPACITOR.getItemStack(),
|
||||
'C',
|
||||
"dustCoal");
|
||||
RecipeUtil.addShaped(
|
||||
addShaped(
|
||||
ENDERGISED_CAPACITOR.getItemStack(),
|
||||
" i ",
|
||||
"cCc",
|
||||
@@ -382,37 +383,37 @@ public class MaterialRecipes {
|
||||
// Conduit Binder
|
||||
ItemStack cbc = BINDER_COMPOSITE.getStack(8);
|
||||
if (Config.useAlternateBinderRecipe) {
|
||||
RecipeUtil.addShaped(cbc, "gcg", "sgs", "gcg", 'g', Blocks.gravel, 's', "sand", 'c', Items.clay_ball);
|
||||
addShaped(cbc, "gcg", "sgs", "gcg", 'g', Blocks.gravel, 's', "sand", 'c', Items.clay_ball);
|
||||
} else {
|
||||
RecipeUtil.addShaped(cbc, "ggg", "scs", "ggg", 'g', Blocks.gravel, 's', "sand", 'c', Items.clay_ball);
|
||||
addShaped(cbc, "ggg", "scs", "ggg", 'g', Blocks.gravel, 's', "sand", 'c', Items.clay_ball);
|
||||
}
|
||||
GameRegistry.addSmelting(BINDER_COMPOSITE.getStack(), CONDUIT_BINDER.getStack(4), 0);
|
||||
|
||||
// Nuggets
|
||||
ItemStack phasedIronNugget = new ItemStack(EnderIO.itemMaterial, 9, Material.PHASED_IRON_NUGGET.ordinal());
|
||||
RecipeUtil.addShapeless(phasedIronNugget, phasedIron);
|
||||
addShapeless(phasedIronNugget, phasedIron);
|
||||
phasedIronNugget = phasedIronNugget.copy();
|
||||
phasedIronNugget.stackSize = 1;
|
||||
RecipeUtil.addShaped(PHASED_IRON.getStackIngot(), "eee", "eee", "eee", 'e', phasedIronNugget);
|
||||
addShaped(PHASED_IRON.getStackIngot(), "eee", "eee", "eee", 'e', phasedIronNugget);
|
||||
|
||||
ItemStack vibrantNugget = new ItemStack(EnderIO.itemMaterial, 9, Material.VIBRANT_NUGGET.ordinal());
|
||||
RecipeUtil.addShapeless(vibrantNugget, phasedGold);
|
||||
addShapeless(vibrantNugget, phasedGold);
|
||||
vibrantNugget = vibrantNugget.copy();
|
||||
vibrantNugget.stackSize = 1;
|
||||
RecipeUtil.addShaped(PHASED_GOLD.getStackIngot(), "eee", "eee", "eee", 'e', vibrantNugget);
|
||||
addShaped(PHASED_GOLD.getStackIngot(), "eee", "eee", "eee", 'e', vibrantNugget);
|
||||
|
||||
ItemStack endSteelNugget = new ItemStack(EnderIO.itemMaterial, 9, Material.END_STEEL_NUGGET.ordinal());
|
||||
RecipeUtil.addShapeless(endSteelNugget, endSteel);
|
||||
addShapeless(endSteelNugget, endSteel);
|
||||
endSteelNugget = endSteelNugget.copy();
|
||||
endSteelNugget.stackSize = 1;
|
||||
RecipeUtil.addShaped(END_STEEL.getStackIngot(), "eee", "eee", "eee", 'e', endSteelNugget);
|
||||
addShaped(END_STEEL.getStackIngot(), "eee", "eee", "eee", 'e', endSteelNugget);
|
||||
|
||||
// Crystals
|
||||
ItemStack pulsCry = new ItemStack(EnderIO.itemMaterial, 1, Material.PULSATING_CYSTAL.ordinal());
|
||||
RecipeUtil.addShaped(pulsCry, "nnn", "ngn", "nnn", 'n', phasedIronNugget, 'g', "gemDiamond");
|
||||
addShaped(pulsCry, "nnn", "ngn", "nnn", 'n', phasedIronNugget, 'g', "gemDiamond");
|
||||
|
||||
ItemStack vibCry = new ItemStack(EnderIO.itemMaterial, 1, Material.VIBRANT_CYSTAL.ordinal());
|
||||
RecipeUtil.addShaped(vibCry, "nnn", "ngn", "nnn", 'n', vibrantNugget, 'g', "gemEmerald");
|
||||
addShaped(vibCry, "nnn", "ngn", "nnn", 'n', vibrantNugget, 'g', "gemEmerald");
|
||||
|
||||
// Smelting
|
||||
ItemStack dustIron = new ItemStack(EnderIO.itemPowderIngot, 1, PowderIngot.POWDER_IRON.ordinal());
|
||||
@@ -425,23 +426,23 @@ public class MaterialRecipes {
|
||||
|
||||
// Ender Dusts
|
||||
ItemStack enderDust = new ItemStack(EnderIO.itemPowderIngot, 1, PowderIngot.POWDER_ENDER.ordinal());
|
||||
RecipeUtil.addShaped(new ItemStack(Items.ender_pearl), "eee", "eee", "eee", 'e', enderDust);
|
||||
addShaped(new ItemStack(Items.ender_pearl), "eee", "eee", "eee", 'e', enderDust);
|
||||
|
||||
// Dark Iron Bars
|
||||
ItemStack diBars = new ItemStack(EnderIO.blockDarkIronBars, 16, 0);
|
||||
RecipeUtil.addShaped(diBars, "ddd", "ddd", 'd', darkSteel);
|
||||
addShaped(diBars, "ddd", "ddd", 'd', darkSteel);
|
||||
|
||||
// Dark Iron Bars
|
||||
ItemStack soBars = new ItemStack(EnderIO.blockSoulariumBars, 16, 0);
|
||||
RecipeUtil.addShaped(soBars, "ddd", "ddd", 'd', soularium);
|
||||
addShaped(soBars, "ddd", "ddd", 'd', soularium);
|
||||
|
||||
// Dark Iron Bars
|
||||
ItemStack esBars = new ItemStack(EnderIO.blockEndSteelBars, 16, 0);
|
||||
RecipeUtil.addShaped(esBars, "ddd", "ddd", 'd', endSteel);
|
||||
addShaped(esBars, "ddd", "ddd", 'd', endSteel);
|
||||
|
||||
// Fused Quartz Frame
|
||||
RecipeUtil.addShaped(fusedQuartzFrame, "bsb", "s s", "bsb", 'b', conduitBinder, 's', "stickWood");
|
||||
RecipeUtil.addShaped(fusedQuartzFrame, "bsb", "s s", "bsb", 'b', conduitBinder, 's', "woodStick");
|
||||
addShaped(fusedQuartzFrame, "bsb", "s s", "bsb", 'b', conduitBinder, 's', "stickWood");
|
||||
addShaped(fusedQuartzFrame, "bsb", "s s", "bsb", 'b', conduitBinder, 's', "woodStick");
|
||||
|
||||
// Machine Chassis
|
||||
|
||||
@@ -450,10 +451,10 @@ public class MaterialRecipes {
|
||||
ItemStack chassis = new ItemStack(EnderIO.itemMachinePart, 1, MachinePart.MACHINE_CHASSI.ordinal());
|
||||
String mat = Config.useSteelInChassi == true && steelIngots != null && !steelIngots.isEmpty() ? "ingotSteel"
|
||||
: "ingotIron";
|
||||
RecipeUtil.addShaped(chassis, "fif", "ici", "fif", 'f', Blocks.iron_bars, 'i', mat, 'c', capacitor);
|
||||
addShaped(chassis, "fif", "ici", "fif", 'f', Blocks.iron_bars, 'i', mat, 'c', capacitor);
|
||||
|
||||
ItemStack soulchassis = new ItemStack(EnderIO.itemMachinePart, 1, MachinePart.SOUL_MACHINE_CHASSIS.ordinal());
|
||||
RecipeUtil.addShaped(
|
||||
addShaped(
|
||||
soulchassis,
|
||||
"fif",
|
||||
"ici",
|
||||
@@ -469,7 +470,7 @@ public class MaterialRecipes {
|
||||
EnderIO.itemMachinePart,
|
||||
1,
|
||||
MachinePart.END_STEEL_MACHINE_CHASSIS.ordinal());
|
||||
RecipeUtil.addShaped(
|
||||
addShaped(
|
||||
endchassis,
|
||||
"fif",
|
||||
"ici",
|
||||
@@ -483,8 +484,8 @@ public class MaterialRecipes {
|
||||
|
||||
// Basic Gear
|
||||
ItemStack gear = new ItemStack(EnderIO.itemMachinePart, 1, MachinePart.BASIC_GEAR.ordinal());
|
||||
RecipeUtil.addShaped(gear, "scs", "c c", "scs", 's', "stickWood", 'c', "cobblestone");
|
||||
RecipeUtil.addShaped(gear, "scs", "c c", "scs", 's', "woodStick", 'c', "cobblestone");
|
||||
addShaped(gear, "scs", "c c", "scs", 's', "stickWood", 'c', "cobblestone");
|
||||
addShaped(gear, "scs", "c c", "scs", 's', "woodStick", 'c', "cobblestone");
|
||||
|
||||
// Weather Crystal
|
||||
ItemStack main = Config.useHardRecipes
|
||||
@@ -501,7 +502,7 @@ public class MaterialRecipes {
|
||||
if (Config.reinforcedObsidianUseDarkSteelBlocks) {
|
||||
corners = Alloy.DARK_STEEL.getOreBlock();
|
||||
}
|
||||
RecipeUtil.addShaped(
|
||||
addShaped(
|
||||
reinfObs,
|
||||
"dbd",
|
||||
"bob",
|
||||
@@ -514,39 +515,25 @@ public class MaterialRecipes {
|
||||
Blocks.obsidian);
|
||||
}
|
||||
|
||||
RecipeUtil.addShaped(
|
||||
EnderIO.blockDarkSteelAnvil,
|
||||
"bbb",
|
||||
" i ",
|
||||
"iii",
|
||||
'b',
|
||||
DARK_STEEL.getOreBlock(),
|
||||
'i',
|
||||
darkSteel);
|
||||
addShaped(EnderIO.blockDarkSteelAnvil, "bbb", " i ", "iii", 'b', DARK_STEEL.getOreBlock(), 'i', darkSteel);
|
||||
|
||||
RecipeUtil.addShaped(
|
||||
new ItemStack(EnderIO.blockDarkSteelLadder, 12),
|
||||
"b",
|
||||
"b",
|
||||
"b",
|
||||
'b',
|
||||
EnderIO.blockDarkIronBars);
|
||||
addShaped(new ItemStack(EnderIO.blockDarkSteelLadder, 12), "b", "b", "b", 'b', EnderIO.blockDarkIronBars);
|
||||
|
||||
for (Alloy alloy : Alloy.values()) {
|
||||
RecipeUtil.addShaped(alloy.getStackBlock(), "iii", "iii", "iii", 'i', alloy.getOreIngot());
|
||||
RecipeUtil.addShaped(alloy.getStackBall(5), " i ", "iii", " i ", 'i', alloy.getOreIngot());
|
||||
RecipeUtil.addShapeless(alloy.getStackIngot(9), alloy.getOreBlock());
|
||||
addShaped(alloy.getStackBlock(), "iii", "iii", "iii", 'i', alloy.getOreIngot());
|
||||
addShaped(alloy.getStackBall(5), " i ", "iii", " i ", 'i', alloy.getOreIngot());
|
||||
addShapeless(alloy.getStackIngot(9), alloy.getOreBlock());
|
||||
}
|
||||
|
||||
for (AlloyEndergy alloy : AlloyEndergy.values()) {
|
||||
RecipeUtil.addShaped(alloy.getStackBlock(), "iii", "iii", "iii", 'i', alloy.getOreIngot());
|
||||
RecipeUtil.addShaped(alloy.getStackBall(5), " i ", "iii", " i ", 'i', alloy.getOreIngot());
|
||||
RecipeUtil.addShapeless(alloy.getStackIngot(9), alloy.getOreBlock());
|
||||
addShaped(alloy.getStackBlock(), "iii", "iii", "iii", 'i', alloy.getOreIngot());
|
||||
addShaped(alloy.getStackBall(5), " i ", "iii", " i ", 'i', alloy.getOreIngot());
|
||||
addShapeless(alloy.getStackIngot(9), alloy.getOreBlock());
|
||||
}
|
||||
|
||||
// DS Rod
|
||||
ItemStack darkRod = new ItemStack(EnderIO.itemMaterial, 1, Material.DARK_STEEL_ROD.ordinal());
|
||||
RecipeUtil.addShaped(darkRod, " ns", "nsn", "sn ", 's', darkSteel, 'n', endSteelNugget);
|
||||
addShaped(darkRod, " ns", "nsn", "sn ", 's', darkSteel, 'n', endSteelNugget);
|
||||
|
||||
// Food
|
||||
ItemStack flour = new ItemStack(EnderIO.itemPowderIngot, 1, PowderIngot.FLOUR.ordinal());
|
||||
@@ -555,14 +542,14 @@ public class MaterialRecipes {
|
||||
GameRegistry.addSmelting(flour, bread, 0.35f);
|
||||
|
||||
ItemStack enderios = EnderFood.ENDERIOS.getStack();
|
||||
RecipeUtil.addShapeless(enderios, Items.bowl, Items.milk_bucket, "cropWheat", "dustEnderPearl");
|
||||
addShapeless(enderios, Items.bowl, Items.milk_bucket, "cropWheat", "dustEnderPearl");
|
||||
|
||||
if (OreDictionaryHelper.hasCopper()) {
|
||||
if (hasCopper()) {
|
||||
ItemStack dustCopper = new ItemStack(EnderIO.itemPowderIngot, 1, PowderIngot.POWDER_COPPER.ordinal());
|
||||
ItemStack ingotCoppper = OreDictionaryPreferences.instance.getPreferred(OreDictionaryHelper.INGOT_COPPER);
|
||||
GameRegistry.addSmelting(dustCopper, ingotCoppper, 0);
|
||||
}
|
||||
if (OreDictionaryHelper.hasTin()) {
|
||||
if (hasTin()) {
|
||||
ItemStack dustTin = new ItemStack(EnderIO.itemPowderIngot, 1, PowderIngot.POWDER_TIN.ordinal());
|
||||
ItemStack ingotTin = OreDictionaryPreferences.instance.getPreferred(OreDictionaryHelper.INGOT_TIN);
|
||||
GameRegistry.addSmelting(dustTin, ingotTin, 0);
|
||||
|
||||
@@ -18,15 +18,7 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
import net.minecraft.util.ChatStyle;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.IChatComponent;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.MovementInput;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.util.*;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.RenderWorldLastEvent;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
@@ -165,9 +157,9 @@ public class TravelController {
|
||||
// no energy check or anything else needed
|
||||
// but the player must actually be equipped with one of these
|
||||
if (equippedItem != null && equippedItem.getItem() instanceof ItemTeleportStaff) {
|
||||
return null;
|
||||
return "not staff";
|
||||
}
|
||||
return "not staff";
|
||||
return null;
|
||||
default:
|
||||
throw new AssertionError("unidentified travel source");
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ public interface IWailaInfoProvider {
|
||||
|
||||
/**
|
||||
* Adds the block's info to the WAILA information
|
||||
*
|
||||
*
|
||||
* @param tooltip - current list of strings in the WAILA body
|
||||
* @param world
|
||||
* @param x
|
||||
|
||||
@@ -4,8 +4,9 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
|
||||
/**
|
||||
* Values taken from OpenMods EnchantmentUtils to ensure consistent behavior
|
||||
*
|
||||
*
|
||||
* @see {@link https://github.com/OpenMods/OpenModsLib/blob/master/src/main/java/openmods/utils/EnchantmentUtils.java}
|
||||
*
|
||||
*/
|
||||
public class XpUtil {
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ public class BaublesUtil {
|
||||
|
||||
/**
|
||||
* Do NOT modify this inventory on the client side of a singleplayer game!
|
||||
* <p>
|
||||
*
|
||||
* Wrap it in a ShadowInventory if you need to.
|
||||
*/
|
||||
public IInventory getBaubles(EntityPlayer player) {
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
package crazypants.util;
|
||||
|
||||
import static crazypants.enderio.material.Material.*;
|
||||
import static crazypants.enderio.material.Material.BINDER_COMPOSITE;
|
||||
import static crazypants.enderio.material.Material.CONDUIT_BINDER;
|
||||
import static crazypants.enderio.material.Material.PHASED_IRON_NUGGET;
|
||||
import static crazypants.enderio.material.Material.SILICON;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
||||
@@ -10,8 +10,9 @@ import crazypants.enderio.Log;
|
||||
|
||||
/**
|
||||
* This is a near-verbatim copy of Galacticraft's API class 'AccessInventoryGC'.
|
||||
* <p>
|
||||
*
|
||||
* We don't need the extended functionality and already have more APIs included than is good for our sanity.
|
||||
*
|
||||
*/
|
||||
public class GalacticraftUtil {
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraftforge.common.UsernameCache;
|
||||
|
||||
import com.enderio.core.common.util.PlayerUtil;
|
||||
@@ -14,7 +13,6 @@ import com.google.common.base.Charsets;
|
||||
import com.mojang.authlib.GameProfile;
|
||||
|
||||
import crazypants.enderio.Log;
|
||||
import crazypants.enderio.config.Config;
|
||||
|
||||
public class UserIdent {
|
||||
|
||||
@@ -78,7 +76,7 @@ public class UserIdent {
|
||||
* changes, implement them and write a log message.
|
||||
*/
|
||||
public static @Nonnull UserIdent create(@Nonnull String suuid, @Nullable String playerName) {
|
||||
if (NONE_MARKER.equals(suuid) || Config.enforceOfflinePlayerUUID) {
|
||||
if (NONE_MARKER.equals(suuid)) {
|
||||
return new UserIdent(null, playerName);
|
||||
}
|
||||
try {
|
||||
@@ -112,7 +110,8 @@ public class UserIdent {
|
||||
*/
|
||||
public static @Nonnull UserIdent create(@Nullable GameProfile gameProfile) {
|
||||
if (gameProfile != null && (gameProfile.getId() != null || gameProfile.getName() != null)) {
|
||||
if (gameProfile.getName() != null && (Config.enforceOfflinePlayerUUID || !isOnlineMode())) {
|
||||
if (gameProfile.getId() != null && gameProfile.getName() != null
|
||||
&& gameProfile.getId().equals(offlineUUID(gameProfile.getName()))) {
|
||||
return new UserIdent(null, gameProfile.getName());
|
||||
} else {
|
||||
return new UserIdent(gameProfile.getId(), gameProfile.getName());
|
||||
@@ -122,11 +121,6 @@ public class UserIdent {
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean isOnlineMode() {
|
||||
MinecraftServer server = MinecraftServer.getServer();
|
||||
return server != null ? server.isServerInOnlineMode() : true;
|
||||
}
|
||||
|
||||
private static @Nonnull UUID offlineUUID(String playerName) {
|
||||
UUID result = UUID.nameUUIDFromBytes(("OfflinePlayer:" + playerName).getBytes(Charsets.UTF_8));
|
||||
return result != null ? result : new UUID(-1, -1);
|
||||
@@ -227,9 +221,6 @@ public class UserIdent {
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj instanceof UUID) {
|
||||
return getUUID().equals(obj);
|
||||
}
|
||||
return this == obj;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user