Merge branch '7.2.x' of github.com:BuildCraft/BuildCraft into 7.2.x

This commit is contained in:
asiekierka 2015-09-19 12:33:50 +02:00
commit bab7c68f4c
42 changed files with 254 additions and 118 deletions

View file

@ -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);

View file

@ -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"));

View file

@ -26,6 +26,10 @@ version = "7.2.0"
group= "com.mod-buildcraft"
archivesBaseName = "buildcraft" // the name that all artifacts will use as a base. artifacts names follow this pattern: [baseName]-[appendix]-[version]-[classifier].[extension]
ext.mcModInfo = new groovy.json.JsonSlurper().parse(file("buildcraft_resources/mcmod.info"))
ext.priv = parseConfig(file('private.properties'))
minecraft {
version = "1.7.10-10.13.4.1490-1.7.10" // McVersion-ForgeVersion this variable is later changed to contain only the MC version, while the apiVersion variable is used for the forge version. Yeah its stupid, and will be changed eentually.
@ -61,6 +65,12 @@ sourceSets {
}
}
// Obfuscated Jar location
ext.jarFile = zipTree(jar.archivePath)
// Add API dir to the IDEA module
idea.module.sourceDirs += sourceSets.api.java.srcDirs
processResources
{
// replace stuff in mcmod.info, nothing else
@ -82,6 +92,30 @@ processResources
// extra jar section
// -------------------
def createMCModInfo(def id, def taskName)
{
File temp = new File("build/processing/" + taskName + "/mcmod.info")
temp.parentFile.mkdirs()
if (temp.exists())
temp.delete()
temp.createNewFile()
temp.write(groovy.json.JsonOutput.toJson([ext.mcModInfo[id]]))
temp.deleteOnExit()
return temp
}
def parseConfig(File config) {
if (!config.exists())
return null;
config.withReader {
def prop = new Properties()
prop.load(it)
return (new ConfigSlurper().parse(prop))
}
}
// add a source jar
task sourceJar(type: Jar) {
from sourceSets.main.allSource
@ -112,6 +146,98 @@ task apiJar(type: Jar) {
classifier = 'api'
}
task coreJar(type: Jar, dependsOn: reobf) {
destinationDir = file("modules")
classifier = 'core'
doFirst {
from(createMCModInfo(0, name).parentFile)
from(project.ext.jarFile) {
includes.addAll(["assets/buildcraft/**", "assets/buildcraftcore/**", "buildcraft/BuildCraftCore**", "buildcraft/BuildCraftMod**", "buildcraft/core/**", "buildcraft/api/**", "cofh/**", "changelog/**", "LICENSE**", "versions.txt"])
}
}
}
task buildersJar(type: Jar, dependsOn: reobf) {
destinationDir = file("modules")
classifier = 'builders'
doFirst {
from(createMCModInfo(1, name).parentFile)
from(project.ext.jarFile) {
includes.addAll(["assets/buildcraftbuilders/**", "buildcraft/builders/**", "buildcraft/BuildCraftBuilders**", "LICENSE"])
}
}
}
task energyJar(type: Jar, dependsOn: reobf) {
destinationDir = file("modules")
classifier = 'energy'
doFirst {
from(createMCModInfo(2, name).parentFile)
from(project.ext.jarFile) {
includes.addAll(["assets/buildcraftenergy/**", "buildcraft/energy/**", "buildcraft/BuildCraftEnergy**", "LICENSE"])
}
}
}
task factoryJar(type: Jar, dependsOn: reobf) {
destinationDir = file("modules")
classifier = 'factory'
doFirst {
from(createMCModInfo(3, name).parentFile)
from(project.ext.jarFile) {
includes.addAll(["assets/buildcraftfactory/**", "buildcraft/factory/**", "buildcraft/BuildCraftFactory**", "LICENSE"])
}
}
}
task siliconJar(type: Jar, dependsOn: reobf) {
destinationDir = file("modules")
classifier = 'silicon'
doFirst {
from(createMCModInfo(4, name).parentFile)
from(project.ext.jarFile) {
includes.addAll(["assets/buildcraftsilicon/**", "buildcraft/silicon/**", "buildcraft/BuildCraftSilicon**", "LICENSE"])
}
}
}
task transportJar(type: Jar, dependsOn: reobf) {
destinationDir = file("modules")
classifier = 'transport'
doFirst {
from(createMCModInfo(5, name).parentFile)
from(project.ext.jarFile) {
includes.addAll(["assets/buildcrafttransport/**", "buildcraft/transport/**", "buildcraft/BuildCraftTransport**", "LICENSE"])
}
}
}
task roboticsJar(type: Jar, dependsOn: reobf) {
destinationDir = file("modules")
classifier = 'robotics'
doFirst {
from(createMCModInfo(6, name).parentFile)
from(project.ext.jarFile) {
includes.addAll(["assets/buildcraftrobotics/**", "buildcraft/robotics/**", "buildcraft/BuildCraftRobotics**", "LICENSE"])
}
}
}
// add api classes to main package
jar {
from sourceSets.api.output
@ -133,11 +259,17 @@ build.dependsOn sourceJar, javadocJar, deobfJar, apiJar
// create the deployerJars dependency configuration
configurations {
deployerJars
sshAntTask
}
dependencies {
// dependency in deployerJars, for maven deployment. see definition in mavenDeployer{} below
deployerJars "org.apache.maven.wagon:wagon-ssh:2.2"
sshAntTask 'org.apache.ant:ant-jsch:1.9.6', 'com.jcraft:jsch:0.1.53'
}
clean{
delete "modules"
}
// specify artifacts to be uploaded
@ -147,8 +279,52 @@ artifacts {
archives javadocJar
archives deobfJar
archives apiJar
// Modules
archives coreJar
archives buildersJar
archives energyJar
archives factoryJar
archives siliconJar
archives transportJar
archives roboticsJar
}
def sftp(String subPath, Closure antFileset = {}) {
ant {
taskdef(name: 'scp', classname: 'org.apache.tools.ant.taskdefs.optional.ssh.Scp',
classpath: configurations.sshAntTask.asPath)
Map sftpArgs = [
verbose : 'yes',
todir : priv.username + "@" + priv.host + ":" + priv.remotedir + version + "/" + subPath,
port: priv.port,
password: priv.password,
sftp: true,
trust: 'yes'
]
delegate.scp(sftpArgs) {
antFileset.delegate = delegate
antFileset()
}
}
}
task upload(dependsOn: build) {
description = 'Update files on remote server.'
doFirst {
sftp("") {
fileset(dir: libsDir)
}
sftp("modules") {
fileset(dir: 'modules')
}
}
}
if (ext.priv == null)
upload.enabled = false;
uploadArchives {
// make sure this happens after reobfuscation
dependsOn 'reobf'

View file

@ -546,6 +546,7 @@ bc_update.new_version=§cNew version of BuildCraft available: %s for Minecraft %
bc_update.download=§cDownload from http://www.mod-buildcraft.com/download
bc_update.once=This message only displays once
bc_update.again=Type '/buildcraft version' if you want to see it again
bc_update.changelog=Type '/buildcraft changelog' to see the changelog
chat.buildcraft.quarry.tooSmall=[BuildCraft] Quarry size is outside of chunkloading bounds or too small %d %d (%d)
chat.buildcraft.quarry.chunkloadInfo=[BuildCraft] The quarry at %d %d %d will keep %d chunks loaded

View file

@ -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());

View file

@ -36,6 +36,7 @@ public class TickHandlerCore {
player.addChatMessage(new ChatComponentTranslation("bc_update.download"));
player.addChatMessage(new ChatComponentTranslation("bc_update.once"));
player.addChatMessage(new ChatComponentTranslation("bc_update.again"));
player.addChatMessage(new ChatComponentTranslation("bc_update.changelog"));
}
nagged = true;

View file

@ -19,5 +19,13 @@ public class SubCommandVersion extends SubCommand {
sender.addChatMessage(new ChatComponentTranslation("command.buildcraft.version", Version.getVersion(),
CoreProxy.proxy.getMinecraftVersion(), Version.getRecommendedVersion())
.setChatStyle(new ChatStyle().setColor(Version.isOutdated() ? EnumChatFormatting.RED : EnumChatFormatting.GREEN)));
if (Version.needsUpdateNoticeAndMarkAsSeen()) {
sender.addChatMessage(new ChatComponentTranslation("bc_update.new_version",
Version.getRecommendedVersion(),
CoreProxy.proxy.getMinecraftVersion()));
sender.addChatMessage(new ChatComponentTranslation("bc_update.download"));
sender.addChatMessage(new ChatComponentTranslation("bc_update.changelog"));
}
}
}

View file

@ -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);
}

View file

@ -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)));
}
}
}

View file

@ -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;
}

View file

@ -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);
}

View file

@ -16,7 +16,7 @@ import net.minecraft.world.World;
public class CommandTargetContainer extends CommandTarget {
@Override
public Class getHandledClass() {
public Class<?> getHandledClass() {
return Container.class;
}

View file

@ -16,7 +16,7 @@ import net.minecraft.world.World;
public class CommandTargetEntity extends CommandTarget {
@Override
public Class getHandledClass() {
public Class<?> getHandledClass() {
return Entity.class;
}

View file

@ -16,7 +16,7 @@ import net.minecraft.world.World;
public class CommandTargetTile extends CommandTarget {
@Override
public Class getHandledClass() {
public Class<?> getHandledClass() {
return TileEntity.class;
}

View file

@ -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);

View file

@ -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

View file

@ -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);
}
}

View file

@ -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;

View file

@ -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) {

View file

@ -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;

View file

@ -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() {

View file

@ -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());
}

View file

@ -156,7 +156,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);
}

View file

@ -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;
}

View file

@ -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);

View file

@ -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);

View file

@ -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]);
}
}

View file

@ -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);
}
}

View file

@ -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;

View file

@ -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;
}
}

View file

@ -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;
}

View file

@ -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);
}
}

View file

@ -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;
}

View file

@ -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;

View file

@ -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;

View file

@ -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;
}

View file

@ -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;
}

Binary file not shown.

View file

@ -1,6 +1,6 @@
#Tue May 06 21:57:37 CEST 2014
#Mon Sep 14 16:20:35 CEST 2015
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-1.12-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.6-bin.zip

View file

@ -1,55 +0,0 @@
# This script requires a copy of pngout, kzip and jq.
# THIS SCRIPT IS HIGHLY TEMPORARY - SHOULD BE REPLACED WITH A GRADLE VERSION
#!/bin/sh
rm -rf dist
mkdir -p dist/tmp
mkdir -p dist/misc
mkdir -p dist/modules
cd dist
cp ../build/libs/buildcraft-$1* .
cd tmp
unzip ../../build/libs/buildcraft-$1.jar
rm ../buildcraft-$1.jar
for i in `find -name *.png`; do ../../tools/pngout "$i"; done
../../tools/kzip -r -y ../buildcraft-$1.jar *
# Function to extract modules mcmod.info data
modinfo(){
../../tools/jq ".[] | select( .modid == \"$1\" )" mcmod.info.json > mcmod.info
}
# Move mcmod.info for safe keeping
mv mcmod.info mcmod.info.json
modinfo "BuildCraft|Core"
../../tools/kzip -r -y ../modules/buildcraft-$1-core.jar assets/buildcraft assets/buildcraftcore buildcraft/BuildCraftCore* buildcraft/core \
buildcraft/BuildCraftMod* buildcraft/api \
cofh LICENSE* changelog mcmod.info versions.txt
modinfo "BuildCraft|Builders"
../../tools/kzip -r -y ../modules/buildcraft-$1-builders.jar assets/buildcraftbuilders buildcraft/BuildCraftBuilders* buildcraft/builders LICENSE mcmod.info
modinfo "BuildCraft|Energy"
../../tools/kzip -r -y ../modules/buildcraft-$1-energy.jar assets/buildcraftenergy buildcraft/BuildCraftEnergy* buildcraft/energy LICENSE mcmod.info
modinfo "BuildCraft|Factory"
../../tools/kzip -r -y ../modules/buildcraft-$1-factory.jar assets/buildcraftfactory buildcraft/BuildCraftFactory* buildcraft/factory LICENSE mcmod.info
modinfo "BuildCraft|Robotics"
../../tools/kzip -r -y ../modules/buildcraft-$1-robotics.jar assets/buildcraftrobotics buildcraft/BuildCraftRobotics* buildcraft/robotics LICENSE mcmod.info
modinfo "BuildCraft|Silicon"
../../tools/kzip -r -y ../modules/buildcraft-$1-silicon.jar assets/buildcraftsilicon buildcraft/BuildCraftSilicon* buildcraft/silicon LICENSE mcmod.info
modinfo "BuildCraft|Transport"
../../tools/kzip -r -y ../modules/buildcraft-$1-transport.jar assets/buildcrafttransport buildcraft/BuildCraftTransport* buildcraft/transport LICENSE mcmod.info
# Move back mcmod.info
mv mcmod.info.json mcmod.info
cd ..
rm -rf tmp
cd ..

View file

@ -0,0 +1,5 @@
remotedir = /home/exemple/
host = thehost
port = 22
username = ****
password = ******