Official 1.10 port

- updated IC2 API
This commit is contained in:
aidancbrady committed 2016-07-14 02:24:31 -04:00
1 parent 26ae2c8de3
commit c703ddf956
24 files changed
+154 -13

No files matched your search

@@ -1,17 +1,17 @@
package buildcraft.api.core;
import io.netty.buffer.ByteBuf;
import java.util.Locale;
import java.util.Map;
import com.google.common.collect.Maps;
import net.minecraft.nbt.NBTBase;
import net.minecraft.nbt.NBTBase.NBTPrimitive;
import net.minecraft.nbt.NBTTagByte;
import net.minecraft.nbt.NBTTagString;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.IStringSerializable;
import io.netty.buffer.ByteBuf;
import com.google.common.collect.Maps;
public enum EnumPipePart implements IStringSerializable, INetworkLoadable_BC8<EnumPipePart> {
DOWN(EnumFacing.DOWN),
@@ -100,7 +100,7 @@ public enum EnumPipePart implements IStringSerializable, INetworkLoadable_BC8<En
String string = nbtString.getString();
return nameMap.containsKey(string) ? nameMap.get(string) : CENTER;
} else {
byte ord = ((NBTPrimitive) base).getByte();
byte ord = ((NBTTagByte) base).getByte();
if (ord < 0 || ord > 6) return CENTER;
return values()[ord];
}
Binary file not shown.
+23 -1
View File
@@ -2,18 +2,40 @@ package ic2.api.reactor;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
/**
* Interface implemented by the tile entity of nuclear reactors.
* Interface implemented nuclear reactors, expected to be a {@link TileEntity}, but does not have to be.
*/
public interface IReactor {
/**
* Return the tile entity representing the reactor core.
* <br/>
* If null, {@link #getReactorWorld()} and {@link #getReactorPos()} can still be used if it's world and/or position are desired.
*
* @return the reactor core's TE or null.
*/
public TileEntity getCoreTe();
/**
* Return the reactor's current world instance (it's position can be acquired using {@link #getReactorPos()}.
* <br/>
* Should be the same world as {@link #getCoreTe()} returns if it's not null.
*
* @return The reactor's world object
*/
public World getReactorWorld(); //getWorld has obfuscation issues (https://github.com/md-5/SpecialSource/issues/12)
/**
* Return the reactor's current position in the world ({@link #getReactorWorld()}.
* <br/>
* Should be the same position as {@link #getCoreTe()} returns if it's not null.
*
* @return The reactor's current position
*/
public BlockPos getReactorPos(); //As would getPos
/**
* Get the reactor's heat.
*
Binary file not shown.
@@ -0,0 +1,22 @@
package ic2.api.reactor;
/**
* Interface implemented nuclear reactor chambers
*/
public interface IReactorChamber {
/**
* Return the {@link IReactor} this chamber is for
*
* @return The reactor
*/
public IReactor getReactorInstance();
/**
* Returns <code>true</code> if the chamber is a reactor wall opposed to an actual chamber of items
* <br/>
* eg: {@link TileEntityReactorChamberElectric} returns <code>false</code>, but {@link TileEntityReactorVessel} returns <code>true</code>
*
* @return If the chamber is a wall or not
*/
public boolean isWall();
}
@@ -1,20 +1,21 @@
package ic2.api.recipe;
import ic2.api.item.IC2Items;
import java.util.ArrayList;
import java.util.List;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidContainerRegistry;
import net.minecraftforge.fluids.FluidContainerRegistry.FluidContainerData;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.IFluidContainerItem;
import ic2.api.item.IC2Items;
public class RecipeInputFluidContainer implements IRecipeInput {
public RecipeInputFluidContainer(Fluid fluid) {
this(fluid, FluidContainerRegistry.BUCKET_VOLUME);
this(fluid, Fluid.BUCKET_VOLUME);
}
public RecipeInputFluidContainer(Fluid fluid, int amount) {