Parameterization
This commit is contained in:
parent
80307e4c8e
commit
ec19d2a8d5
|
@ -36,7 +36,7 @@ public abstract class RedstoneBoardRegistry {
|
|||
|
||||
public abstract RedstoneBoardRobotNBT getEmptyRobotBoard();
|
||||
|
||||
public abstract RedstoneBoardNBT getRedstoneBoard(NBTTagCompound nbt);
|
||||
public abstract RedstoneBoardNBT<?> getRedstoneBoard(NBTTagCompound nbt);
|
||||
|
||||
public abstract RedstoneBoardNBT<?> getRedstoneBoard(String id);
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ public abstract class ResourceId {
|
|||
|
||||
public static ResourceId load(NBTTagCompound nbt) {
|
||||
try {
|
||||
Class cls;
|
||||
Class<?> cls;
|
||||
if (nbt.hasKey("class")) {
|
||||
// Migration support for 6.4.x
|
||||
cls = RobotManager.getResourceIdByLegacyClassName(nbt.getString("class"));
|
||||
|
|
|
@ -419,7 +419,7 @@ public class BuildCraftCore extends BuildCraftMod {
|
|||
// BuildCraft 6.1.4 and below - migration only
|
||||
StatementManager.registerParameterClass("buildcraft:stackTrigger", StatementParameterItemStack.class);
|
||||
StatementManager.registerParameterClass("buildcraft:stackAction", StatementParameterItemStack.class);
|
||||
|
||||
|
||||
StatementManager.registerParameterClass(StatementParameterItemStack.class);
|
||||
StatementManager.registerParameterClass(StatementParameterItemStackExact.class);
|
||||
StatementManager.registerParameterClass(StatementParameterDirection.class);
|
||||
|
|
|
@ -475,7 +475,7 @@ public class BuildCraftTransport extends BuildCraftMod {
|
|||
new BptPipeRotatable(pipeItemsEmzuli);
|
||||
|
||||
for (Item itemPipe : BlockGenericPipe.pipes.keySet()) {
|
||||
Class<? extends Pipe> klazz = BlockGenericPipe.pipes.get(itemPipe);
|
||||
Class<? extends Pipe<?>> klazz = BlockGenericPipe.pipes.get(itemPipe);
|
||||
|
||||
if (IDiamondPipe.class.isAssignableFrom(klazz)) {
|
||||
new BptPipeFiltered(itemPipe);
|
||||
|
@ -700,18 +700,18 @@ public class BuildCraftTransport extends BuildCraftMod {
|
|||
InterModComms.processIMC(event);
|
||||
}
|
||||
|
||||
public static Item buildPipe(Class<? extends Pipe> clas, Object... ingredients) {
|
||||
public static Item buildPipe(Class<? extends Pipe<?>> clas, Object... ingredients) {
|
||||
return buildPipe(clas, BCCreativeTab.get("pipes"), ingredients);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static Item buildPipe(Class<? extends Pipe> clas,
|
||||
public static Item buildPipe(Class<? extends Pipe<?>> clas,
|
||||
String descr, BCCreativeTab creativeTab,
|
||||
Object... ingredients) {
|
||||
return buildPipe(clas, creativeTab, ingredients);
|
||||
}
|
||||
|
||||
public static Item buildPipe(Class<? extends Pipe> clas, BCCreativeTab creativeTab,
|
||||
public static Item buildPipe(Class<? extends Pipe<?>> clas, BCCreativeTab creativeTab,
|
||||
Object... ingredients) {
|
||||
ItemPipe res = BlockGenericPipe.registerPipe(clas, creativeTab);
|
||||
res.setUnlocalizedName(clas.getSimpleName());
|
||||
|
|
|
@ -37,7 +37,7 @@ public class BCConfigElement<T> extends ConfigElement<T> {
|
|||
continue;
|
||||
}
|
||||
|
||||
ConfigElement temp = new BCConfigElement(child);
|
||||
ConfigElement<?> temp = new BCConfigElement<Object>(child);
|
||||
if (temp.showInGui()) {
|
||||
elements.add(temp);
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ public class ConfigManager implements IModGuiFactory {
|
|||
|
||||
for (String s : config.getCategoryNames()) {
|
||||
if (!s.contains(".")) {
|
||||
configElements.add(new BCConfigElement(config.getCategory(s)));
|
||||
configElements.add(new BCConfigElement<Object>(config.getCategory(s)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -73,7 +73,7 @@ public abstract class SubCommand implements IModCommand {
|
|||
}
|
||||
|
||||
@Override
|
||||
public List addTabCompletionOptions(ICommandSender sender, String[] text) {
|
||||
public List<?> addTabCompletionOptions(ICommandSender sender, String[] text) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.world.World;
|
||||
|
||||
public abstract class CommandTarget {
|
||||
public abstract Class getHandledClass();
|
||||
public abstract Class<?> getHandledClass();
|
||||
public abstract ICommandReceiver handle(EntityPlayer player, ByteBuf data, World world);
|
||||
public abstract void write(ByteBuf data, Object target);
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ import net.minecraft.world.World;
|
|||
|
||||
public class CommandTargetContainer extends CommandTarget {
|
||||
@Override
|
||||
public Class getHandledClass() {
|
||||
public Class<?> getHandledClass() {
|
||||
return Container.class;
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ import net.minecraft.world.World;
|
|||
|
||||
public class CommandTargetEntity extends CommandTarget {
|
||||
@Override
|
||||
public Class getHandledClass() {
|
||||
public Class<?> getHandledClass() {
|
||||
return Entity.class;
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ import net.minecraft.world.World;
|
|||
|
||||
public class CommandTargetTile extends CommandTarget {
|
||||
@Override
|
||||
public Class getHandledClass() {
|
||||
public Class<?> getHandledClass() {
|
||||
return TileEntity.class;
|
||||
}
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ public class BoardProgrammingRecipe implements IProgrammingRecipe {
|
|||
@Override
|
||||
public List<ItemStack> getOptions(int width, int height) {
|
||||
List<ItemStack> options = new ArrayList<ItemStack>(width * height);
|
||||
for (RedstoneBoardNBT nbt : RedstoneBoardRegistry.instance.getAllBoardNBTs()) {
|
||||
for (RedstoneBoardNBT<?> nbt : RedstoneBoardRegistry.instance.getAllBoardNBTs()) {
|
||||
ItemStack stack = new ItemStack(BuildCraftRobotics.redstoneBoard);
|
||||
nbt.createBoard(NBTUtils.getItemData(stack));
|
||||
options.add(stack);
|
||||
|
|
|
@ -49,7 +49,7 @@ public class DockingStationPipe extends DockingStation implements IRequestProvid
|
|||
return 0;
|
||||
}
|
||||
|
||||
((PipeTransportItems) ((Pipe) getPipe().getPipe()).transport)
|
||||
((PipeTransportItems) ((Pipe<?>) getPipe().getPipe()).transport)
|
||||
.injectItem(item, from);
|
||||
}
|
||||
return stack.stackSize;
|
||||
|
@ -182,7 +182,7 @@ public class DockingStationPipe extends DockingStation implements IRequestProvid
|
|||
return null;
|
||||
}
|
||||
|
||||
return (IFluidHandler) ((Pipe) getPipe().getPipe()).transport;
|
||||
return (IFluidHandler) ((Pipe<?>) getPipe().getPipe()).transport;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -212,7 +212,7 @@ public class DockingStationPipe extends DockingStation implements IRequestProvid
|
|||
if (getPipe() == null || getPipe().getPipe() == null) {
|
||||
return false;
|
||||
}
|
||||
return ((Pipe) getPipe().getPipe()).isInitialized();
|
||||
return ((Pipe<?>) getPipe().getPipe()).isInitialized();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -39,7 +39,7 @@ public class ItemRedstoneBoard extends ItemBuildCraft {
|
|||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean advanced) {
|
||||
RedstoneBoardNBT board = getBoardNBT(stack);
|
||||
RedstoneBoardNBT<?> board = getBoardNBT(stack);
|
||||
board.addInformation(stack, player, list, advanced);
|
||||
}
|
||||
|
||||
|
@ -65,14 +65,14 @@ public class ItemRedstoneBoard extends ItemBuildCraft {
|
|||
}
|
||||
}
|
||||
|
||||
public static ItemStack createStack(RedstoneBoardNBT boardNBT) {
|
||||
public static ItemStack createStack(RedstoneBoardNBT<?> boardNBT) {
|
||||
ItemStack stack = new ItemStack(BuildCraftRobotics.redstoneBoard);
|
||||
NBTTagCompound nbtData = NBTUtils.getItemData(stack);
|
||||
boardNBT.createBoard(nbtData);
|
||||
return stack;
|
||||
}
|
||||
|
||||
public static RedstoneBoardNBT getBoardNBT(ItemStack stack) {
|
||||
public static RedstoneBoardNBT<?> getBoardNBT(ItemStack stack) {
|
||||
return getBoardNBT(getNBT(stack));
|
||||
}
|
||||
|
||||
|
@ -84,7 +84,7 @@ public class ItemRedstoneBoard extends ItemBuildCraft {
|
|||
return cpt;
|
||||
}
|
||||
|
||||
private static RedstoneBoardNBT getBoardNBT(NBTTagCompound cpt) {
|
||||
private static RedstoneBoardNBT<?> getBoardNBT(NBTTagCompound cpt) {
|
||||
return RedstoneBoardRegistry.instance.getRedstoneBoard(cpt);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ public class RobotIntegrationRecipe extends IntegrationRecipeBC {
|
|||
public List<List<ItemStack>> generateExampleExpansions() {
|
||||
ArrayList<List<ItemStack>> list = new ArrayList<List<ItemStack>>();
|
||||
ArrayList<ItemStack> example = new ArrayList<ItemStack>();
|
||||
for (RedstoneBoardNBT nbt : RedstoneBoardRegistry.instance.getAllBoardNBTs()) {
|
||||
for (RedstoneBoardNBT<?> nbt : RedstoneBoardRegistry.instance.getAllBoardNBTs()) {
|
||||
ItemStack stack = new ItemStack(BuildCraftRobotics.redstoneBoard);
|
||||
nbt.createBoard(NBTUtils.getItemData(stack));
|
||||
example.add(stack);
|
||||
|
@ -49,7 +49,7 @@ public class RobotIntegrationRecipe extends IntegrationRecipeBC {
|
|||
@Override
|
||||
public List<ItemStack> generateExampleOutput() {
|
||||
ArrayList<ItemStack> example = new ArrayList<ItemStack>();
|
||||
for (RedstoneBoardNBT nbt : RedstoneBoardRegistry.instance.getAllBoardNBTs()) {
|
||||
for (RedstoneBoardNBT<?> nbt : RedstoneBoardRegistry.instance.getAllBoardNBTs()) {
|
||||
example.add(ItemRobot.createRobotStack((RedstoneBoardRobotNBT) nbt, 0));
|
||||
}
|
||||
return example;
|
||||
|
|
|
@ -57,7 +57,7 @@ public final class RobotUtils {
|
|||
boards = Lists.reverse((List<RedstoneBoardNBT<?>>) boards);
|
||||
}
|
||||
boolean found = false;
|
||||
for (RedstoneBoardNBT boardNBT : boards) {
|
||||
for (RedstoneBoardNBT<?> boardNBT : boards) {
|
||||
if (found) {
|
||||
return (RedstoneBoardRobotNBT) boardNBT;
|
||||
} else if (ItemRobot.getRobotNBT(stack) == boardNBT) {
|
||||
|
|
|
@ -38,7 +38,7 @@ public class AIRobotShutdown extends AIRobot {
|
|||
@Override
|
||||
public void update() {
|
||||
if (skip == 0) {
|
||||
List boxes = robot.worldObj.getCollidingBoundingBoxes(robot,
|
||||
List<?> boxes = robot.worldObj.getCollidingBoundingBoxes(robot,
|
||||
getRobotBox().addCoord(robot.motionX, -0.075f, robot.motionZ));
|
||||
if (boxes.size() == 0) {
|
||||
robot.motionY = -0.075f;
|
||||
|
|
|
@ -72,7 +72,7 @@ public class GuiZonePlan extends GuiAdvancedInterface {
|
|||
private GuiBetterButton tool, fsButton;
|
||||
|
||||
private List inventorySlots;
|
||||
private List savedButtonList;
|
||||
private List<GuiBetterButton> savedButtonList;
|
||||
|
||||
private GuiTextField textField;
|
||||
|
||||
|
@ -334,8 +334,8 @@ public class GuiZonePlan extends GuiAdvancedInterface {
|
|||
uploadMap();
|
||||
refreshSelectedArea();
|
||||
|
||||
container.inventorySlots = new LinkedList();
|
||||
buttonList = new LinkedList();
|
||||
container.inventorySlots = new LinkedList<Object>();
|
||||
buttonList = new LinkedList<GuiBetterButton>();
|
||||
}
|
||||
|
||||
private void toWindowed() {
|
||||
|
|
|
@ -68,7 +68,7 @@ import buildcraft.transport.render.PipeRendererWorld;
|
|||
|
||||
public class BlockGenericPipe extends BlockBuildCraft implements IColorRemovable {
|
||||
|
||||
public static Map<Item, Class<? extends Pipe>> pipes = new HashMap<Item, Class<? extends Pipe>>();
|
||||
public static Map<Item, Class<? extends Pipe<?>>> pipes = new HashMap<Item, Class<? extends Pipe<?>>>();
|
||||
public static Map<BlockIndex, Pipe<?>> pipeRemoved = new HashMap<BlockIndex, Pipe<?>>();
|
||||
|
||||
private static long lastRemovedDate = -1;
|
||||
|
@ -632,7 +632,7 @@ public class BlockGenericPipe extends BlockBuildCraft implements IColorRemovable
|
|||
} else if (currentItem.getItem() instanceof IToolWrench) {
|
||||
// Only check the instance at this point. Call the IToolWrench
|
||||
// interface callbacks for the individual pipe/logic calls
|
||||
if (pipe.blockActivated(player)) {
|
||||
if (pipe.blockActivated(player, ForgeDirection.getOrientation(side))) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -686,7 +686,7 @@ public class BlockGenericPipe extends BlockBuildCraft implements IColorRemovable
|
|||
clickedGate.openGui(player);
|
||||
return true;
|
||||
} else {
|
||||
if (pipe.blockActivated(player)) {
|
||||
if (pipe.blockActivated(player, ForgeDirection.getOrientation(side))) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -876,7 +876,7 @@ public class BlockGenericPipe extends BlockBuildCraft implements IColorRemovable
|
|||
}
|
||||
|
||||
/* Registration ******************************************************** */
|
||||
public static ItemPipe registerPipe(Class<? extends Pipe> clas, BCCreativeTab creativeTab) {
|
||||
public static ItemPipe registerPipe(Class<? extends Pipe<?>> clas, BCCreativeTab creativeTab) {
|
||||
ItemPipe item = new ItemPipe(creativeTab);
|
||||
item.setUnlocalizedName("buildcraftPipe." + clas.getSimpleName().toLowerCase(Locale.ENGLISH));
|
||||
GameRegistry.registerItem(item, item.getUnlocalizedName());
|
||||
|
@ -1092,7 +1092,7 @@ public class BlockGenericPipe extends BlockBuildCraft implements IColorRemovable
|
|||
public IIcon getIcon(IBlockAccess world, int i, int j, int k, int side) {
|
||||
TileEntity tile = world.getTileEntity(i, j, k);
|
||||
if (tile instanceof TileGenericPipe) {
|
||||
Pipe pipe = (Pipe) ((TileGenericPipe) tile).getPipe();
|
||||
Pipe<?> pipe = (Pipe<?>) ((TileGenericPipe) tile).getPipe();
|
||||
return pipe.getIconProvider().getIcon(pipe.getIconIndexForItem());
|
||||
}
|
||||
|
||||
|
|
|
@ -154,7 +154,7 @@ public class ItemPipe extends ItemBuildCraft implements IItemPipe {
|
|||
int color = (stack.getItemDamage() - 1) & 15;
|
||||
list.add(ColorUtils.getFormattingTooltip(color) + EnumChatFormatting.ITALIC + StringUtils.localize("color." + ColorUtils.getName(color)));
|
||||
}
|
||||
Class<? extends Pipe> pipe = BlockGenericPipe.pipes.get(this);
|
||||
Class<? extends Pipe<?>> pipe = BlockGenericPipe.pipes.get(this);
|
||||
List<String> toolTip = PipeToolTipManager.getToolTip(pipe, advanced);
|
||||
list.addAll(toolTip);
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ import buildcraft.transport.pipes.PipePowerWood;
|
|||
*/
|
||||
public final class PipeConnectionBans {
|
||||
|
||||
private static final SetMultimap<Class<? extends Pipe>, Class<? extends Pipe>> connectionBans = HashMultimap.create();
|
||||
private static final SetMultimap<Class<? extends Pipe<?>>, Class<? extends Pipe<?>>> connectionBans = HashMultimap.create();
|
||||
|
||||
static {
|
||||
// Fluid pipes
|
||||
|
@ -65,7 +65,7 @@ public final class PipeConnectionBans {
|
|||
*
|
||||
* @param types
|
||||
*/
|
||||
public static void banConnection(Class<? extends Pipe>... types) {
|
||||
public static void banConnection(Class<? extends Pipe<?>>... types) {
|
||||
if (types.length == 0) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ public final class PipeToolTipManager {
|
|||
toolTips.put(pipe, toolTip);
|
||||
}
|
||||
|
||||
public static List<String> getToolTip(Class<? extends Pipe> pipe, boolean advanced) {
|
||||
public static List<String> getToolTip(Class<? extends Pipe<?>> pipe, boolean advanced) {
|
||||
List<String> tips = new ArrayList<String>();
|
||||
addTipToList("tip." + pipe.getSimpleName(), tips);
|
||||
|
||||
|
|
|
@ -184,7 +184,7 @@ public class PipeTransportFluids extends PipeTransport implements IFluidHandler,
|
|||
return flowRate;
|
||||
}
|
||||
|
||||
public void initFromPipe(Class<? extends Pipe> pipeClass) {
|
||||
public void initFromPipe(Class<? extends Pipe<?>> pipeClass) {
|
||||
capacity = 25 * Math.min(1000, BuildCraftTransport.pipeFluidsBaseFlowRate);
|
||||
flowRate = fluidCapacities.get(pipeClass);
|
||||
travelDelay = MathUtils.clamp(Math.round(16F / (flowRate / BuildCraftTransport.pipeFluidsBaseFlowRate)), 1, MAX_TRAVEL_DELAY);
|
||||
|
|
|
@ -88,7 +88,7 @@ public class PipeTransportPower extends PipeTransport implements IDebuggable {
|
|||
return IPipeTile.PipeType.POWER;
|
||||
}
|
||||
|
||||
public void initFromPipe(Class<? extends Pipe> pipeClass) {
|
||||
public void initFromPipe(Class<? extends Pipe<?>> pipeClass) {
|
||||
if (BuildCraftTransport.usePipeLoss) {
|
||||
maxPower = 10240;
|
||||
powerResistance = powerResistances.get(pipeClass);
|
||||
|
@ -332,7 +332,7 @@ public class PipeTransportPower extends PipeTransport implements IDebuggable {
|
|||
if (nearbyTile.getPipe() == null || nearbyTile.getPipeType() != IPipeTile.PipeType.POWER) {
|
||||
continue;
|
||||
}
|
||||
PipeTransportPower nearbyTransport = (PipeTransportPower) ((Pipe) nearbyTile.getPipe()).transport;
|
||||
PipeTransportPower nearbyTransport = (PipeTransportPower) ((Pipe<?>) nearbyTile.getPipe()).transport;
|
||||
nearbyTransport.requestEnergy(ForgeDirection.VALID_DIRECTIONS[i].getOpposite(), transferQuery[i]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,6 +46,6 @@ public class ContainerDiamondPipe extends BuildCraftContainer {
|
|||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer entityplayer) {
|
||||
return ((Pipe) pipe).container.isUseableByPlayer(entityplayer);
|
||||
return ((Pipe<?>) pipe).container.isUseableByPlayer(entityplayer);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ public class PacketFluidUpdate extends PacketCoordinates {
|
|||
return;
|
||||
}
|
||||
|
||||
Pipe pipe = (Pipe) pipeTile.getPipe();
|
||||
Pipe<?> pipe = (Pipe<?>) pipeTile.getPipe();
|
||||
|
||||
if (!(pipe.transport instanceof PipeTransportFluids)) {
|
||||
return;
|
||||
|
|
|
@ -11,9 +11,9 @@ package buildcraft.transport.pipes.events;
|
|||
import buildcraft.transport.Pipe;
|
||||
|
||||
public abstract class PipeEvent {
|
||||
public final Pipe pipe;
|
||||
public final Pipe<?> pipe;
|
||||
|
||||
public PipeEvent(Pipe pipe) {
|
||||
public PipeEvent(Pipe<?> pipe) {
|
||||
this.pipe = pipe;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ import buildcraft.transport.Pipe;
|
|||
public abstract class PipeEventFluid extends PipeEvent {
|
||||
public final FluidStack fluidStack;
|
||||
|
||||
public PipeEventFluid(Pipe pipe, FluidStack fluidStack) {
|
||||
public PipeEventFluid(Pipe<?> pipe, FluidStack fluidStack) {
|
||||
super(pipe);
|
||||
this.fluidStack = fluidStack;
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ public abstract class PipeEventFluid extends PipeEvent {
|
|||
public static class FindDest extends PipeEventFluid {
|
||||
public final Multiset<ForgeDirection> destinations;
|
||||
|
||||
public FindDest(Pipe pipe, FluidStack fluidStack, Multiset<ForgeDirection> destinations) {
|
||||
public FindDest(Pipe<?> pipe, FluidStack fluidStack, Multiset<ForgeDirection> destinations) {
|
||||
super(pipe, fluidStack);
|
||||
this.destinations = destinations;
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ public abstract class PipeEventItem extends PipeEvent {
|
|||
|
||||
public final TravelingItem item;
|
||||
|
||||
public PipeEventItem(Pipe pipe, TravelingItem item) {
|
||||
public PipeEventItem(Pipe<?> pipe, TravelingItem item) {
|
||||
super(pipe);
|
||||
this.item = item;
|
||||
}
|
||||
|
@ -29,13 +29,13 @@ public abstract class PipeEventItem extends PipeEvent {
|
|||
public static class Entered extends PipeEventItem {
|
||||
public boolean cancelled = false;
|
||||
|
||||
public Entered(Pipe pipe, TravelingItem item) {
|
||||
public Entered(Pipe<?> pipe, TravelingItem item) {
|
||||
super(pipe, item);
|
||||
}
|
||||
}
|
||||
|
||||
public static class ReachedCenter extends PipeEventItem {
|
||||
public ReachedCenter(Pipe pipe, TravelingItem item) {
|
||||
public ReachedCenter(Pipe<?> pipe, TravelingItem item) {
|
||||
super(pipe, item);
|
||||
}
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ public abstract class PipeEventItem extends PipeEvent {
|
|||
public final TileEntity dest;
|
||||
public boolean handled = false;
|
||||
|
||||
public ReachedEnd(Pipe pipe, TravelingItem item, TileEntity dest) {
|
||||
public ReachedEnd(Pipe<?> pipe, TravelingItem item, TileEntity dest) {
|
||||
super(pipe, item);
|
||||
this.dest = dest;
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ public abstract class PipeEventItem extends PipeEvent {
|
|||
public EntityItem entity;
|
||||
public ForgeDirection direction;
|
||||
|
||||
public DropItem(Pipe pipe, TravelingItem item, EntityItem entity) {
|
||||
public DropItem(Pipe<?> pipe, TravelingItem item, EntityItem entity) {
|
||||
super(pipe, item);
|
||||
this.entity = entity;
|
||||
this.direction = item.output != ForgeDirection.UNKNOWN ? item.output : item.input;
|
||||
|
@ -65,7 +65,7 @@ public abstract class PipeEventItem extends PipeEvent {
|
|||
public final List<ForgeDirection> destinations;
|
||||
public boolean shuffle = true;
|
||||
|
||||
public FindDest(Pipe pipe, TravelingItem item, List<ForgeDirection> destinations) {
|
||||
public FindDest(Pipe<?> pipe, TravelingItem item, List<ForgeDirection> destinations) {
|
||||
super(pipe, item);
|
||||
this.destinations = destinations;
|
||||
}
|
||||
|
@ -74,7 +74,7 @@ public abstract class PipeEventItem extends PipeEvent {
|
|||
public static class AdjustSpeed extends PipeEventItem {
|
||||
public boolean handled = false;
|
||||
|
||||
public AdjustSpeed(Pipe pipe, TravelingItem item) {
|
||||
public AdjustSpeed(Pipe<?> pipe, TravelingItem item) {
|
||||
super(pipe, item);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,14 +11,14 @@ public abstract class PipeEventPower extends PipeEvent {
|
|||
*/
|
||||
public int power;
|
||||
|
||||
public PipeEventPower(Pipe pipe, ForgeDirection from, int power) {
|
||||
public PipeEventPower(Pipe<?> pipe, ForgeDirection from, int power) {
|
||||
super(pipe);
|
||||
this.from = from;
|
||||
this.power = power;
|
||||
}
|
||||
|
||||
public static class Request extends PipeEventPower {
|
||||
public Request(Pipe pipe, ForgeDirection from, int power) {
|
||||
public Request(Pipe<?> pipe, ForgeDirection from, int power) {
|
||||
super(pipe, from, power);
|
||||
}
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ public abstract class PipeEventPower extends PipeEvent {
|
|||
public static class Receive extends PipeEventPower {
|
||||
public boolean override;
|
||||
|
||||
public Receive(Pipe pipe, ForgeDirection from, int power) {
|
||||
public Receive(Pipe<?> pipe, ForgeDirection from, int power) {
|
||||
super(pipe, from, power);
|
||||
this.override = false;
|
||||
}
|
||||
|
|
|
@ -80,7 +80,7 @@ public class ActionValve extends BCStatement implements IActionInternal {
|
|||
IPipe pipe = ((Gate) container).getPipe();
|
||||
|
||||
if (pipe != null && pipe instanceof Pipe) {
|
||||
PipeTransport transport = ((Pipe) pipe).transport;
|
||||
PipeTransport transport = ((Pipe<?>) pipe).transport;
|
||||
if (parameters[0] != null && parameters[0] instanceof StatementParameterDirection) {
|
||||
ForgeDirection side = ((StatementParameterDirection) parameters[0]).direction;
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@ public class StripesHandlerDispenser implements IStripesHandler {
|
|||
return true;
|
||||
}
|
||||
|
||||
Class c = stack.getItem().getClass();
|
||||
Class<?> c = stack.getItem().getClass();
|
||||
while (c != Item.class) {
|
||||
if (items.contains(c)) {
|
||||
return true;
|
||||
|
|
|
@ -40,7 +40,7 @@ public class StripesHandlerEntityInteract implements IStripesHandler {
|
|||
IStripesActivator activator) {
|
||||
|
||||
AxisAlignedBB box = AxisAlignedBB.getBoundingBox(x, y, z, x + 1, y + 1, z + 1);
|
||||
List entities = world.getEntitiesWithinAABBExcludingEntity(null, box);
|
||||
List<?> entities = world.getEntitiesWithinAABBExcludingEntity(null, box);
|
||||
if (entities.size() <= 0) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ public class StripesHandlerMinecartDestroy implements IStripesHandler {
|
|||
ForgeDirection direction, ItemStack stack, EntityPlayer player,
|
||||
IStripesActivator activator) {
|
||||
AxisAlignedBB box = AxisAlignedBB.getBoundingBox(x, y, z, x + 1, y + 1, z + 1);
|
||||
List entities = world.getEntitiesWithinAABBExcludingEntity(null, box);
|
||||
List<?> entities = world.getEntitiesWithinAABBExcludingEntity(null, box);
|
||||
if (entities.size() <= 0) {
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue