conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
=======
/**
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
>>>>>>>
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
<<<<<<<
import net.minecraft.util.EnumFacing;
=======
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraftforge.common.util.ForgeDirection;
>>>>>>>
import net.minecraft.util.EnumFacing;
<<<<<<<
transport.initFromPipe(getClass());
}
@Override
public boolean blockActivated(EntityPlayer entityplayer) {
return logic.blockActivated(entityplayer);
}
@Override
public void onNeighborBlockChange(int blockId) {
logic.switchOnRedstone();
super.onNeighborBlockChange(blockId);
}
@Override
public void onBlockPlaced() {
logic.onBlockPlaced();
super.onBlockPlaced();
}
@Override
public void initialize() {
logic.initialize();
super.initialize();
}
@Override
public boolean outputOpen(EnumFacing to) {
return super.outputOpen(to) && logic.outputOpen(to);
}
@Override
@SideOnly(Side.CLIENT)
public IIconProvider getIconProvider() {
return BuildCraftTransport.instance.pipeIconProvider;
}
@Override
public int getIconIndex(EnumFacing direction) {
if (direction == null) {
return standardIconIndex;
}
if (container != null && container.getBlockMetadata() == direction.ordinal()) {
return standardIconIndex;
}
return solidIconIndex;
}
@Override
protected void actionsActivated(Collection<StatementSlot> actions) {
super.actionsActivated(actions);
for (StatementSlot action : actions) {
if (action.statement instanceof ActionPipeDirection) {
logic.setFacing(((ActionPipeDirection) action.statement).direction);
break;
}
}
}
@Override
public LinkedList<IActionInternal> getActions() {
LinkedList<IActionInternal> action = super.getActions();
for (EnumFacing direction : EnumFacing.VALUES) {
if (container.isPipeConnected(direction)) {
action.add(BuildCraftTransport.actionPipeDirection[direction.ordinal()]);
}
}
return action;
}
@Override
public boolean canConnectRedstone() {
return true;
}
=======
transport.initFromPipe(getClass());
}
@Override
public boolean blockActivated(EntityPlayer entityplayer, ForgeDirection side) {
return logic.blockActivated(entityplayer, side);
}
@Override
public void onNeighborBlockChange(int blockId) {
logic.switchOnRedstone();
super.onNeighborBlockChange(blockId);
}
@Override
public void onBlockPlaced() {
logic.onBlockPlaced();
super.onBlockPlaced();
}
@Override
public void initialize() {
logic.initialize();
super.initialize();
}
@Override
public boolean outputOpen(ForgeDirection to) {
return super.outputOpen(to) && logic.outputOpen(to);
}
@Override
@SideOnly(Side.CLIENT)
public IIconProvider getIconProvider() {
return BuildCraftTransport.instance.pipeIconProvider;
}
@Override
public int getIconIndex(ForgeDirection direction) {
if (direction == ForgeDirection.UNKNOWN) {
return standardIconIndex;
}
if (container != null && container.getBlockMetadata() == direction.ordinal()) {
return standardIconIndex;
}
return solidIconIndex;
}
@Override
protected void actionsActivated(Collection<StatementSlot> actions) {
super.actionsActivated(actions);
for (StatementSlot action : actions) {
if (action.statement instanceof ActionPipeDirection) {
logic.setFacing(((ActionPipeDirection) action.statement).direction);
break;
}
}
}
@Override
public LinkedList<IActionInternal> getActions() {
LinkedList<IActionInternal> action = super.getActions();
for (ForgeDirection direction : ForgeDirection.VALID_DIRECTIONS) {
if (container.isPipeConnected(direction)) {
action.add(BuildCraftTransport.actionPipeDirection[direction.ordinal()]);
}
}
return action;
}
@Override
public boolean canConnectRedstone() {
return true;
}
>>>>>>>
transport.initFromPipe(getClass());
}
@Override
public boolean blockActivated(EntityPlayer entityplayer, EnumFacing side) {
return logic.blockActivated(entityplayer, EnumPipePart.fromFacing(side));
}
@Override
public void onNeighborBlockChange(int blockId) {
logic.switchOnRedstone();
super.onNeighborBlockChange(blockId);
}
@Override
public void onBlockPlaced() {
logic.onBlockPlaced();
super.onBlockPlaced();
}
@Override
public void initialize() {
logic.initialize();
super.initialize();
}
@Override
public boolean outputOpen(EnumFacing to) {
return super.outputOpen(to) && logic.outputOpen(to);
}
@Override
@SideOnly(Side.CLIENT)
public IIconProvider getIconProvider() {
return BuildCraftTransport.instance.pipeIconProvider;
}
@Override
public int getIconIndex(EnumFacing direction) {
if (direction == null) {
return standardIconIndex;
}
if (container != null && container.getBlockMetadata() == direction.ordinal()) {
return standardIconIndex;
}
return solidIconIndex;
}
@Override
protected void actionsActivated(Collection<StatementSlot> actions) {
super.actionsActivated(actions);
for (StatementSlot action : actions) {
if (action.statement instanceof ActionPipeDirection) {
logic.setFacing(((ActionPipeDirection) action.statement).direction);
break;
}
}
}
@Override
public LinkedList<IActionInternal> getActions() {
LinkedList<IActionInternal> action = super.getActions();
for (EnumFacing direction : EnumFacing.VALUES) {
if (container.isPipeConnected(direction)) {
action.add(BuildCraftTransport.actionPipeDirection[direction.ordinal()]);
}
}
return action;
}
@Override
public boolean canConnectRedstone() {
return true;
} |
<<<<<<<
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
=======
/**
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
>>>>>>>
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
<<<<<<<
=======
import net.minecraftforge.common.util.ForgeDirection;
>>>>>>>
<<<<<<<
private EntityItem target;
private float maxRange;
private IStackFilter stackFilter;
private int pickTime = -1;
private IZone zone;
public AIRobotFetchItem(EntityRobotBase iRobot) {
super(iRobot);
}
public AIRobotFetchItem(EntityRobotBase iRobot, float iMaxRange, IStackFilter iStackFilter, IZone iZone) {
this(iRobot);
maxRange = iMaxRange;
stackFilter = iStackFilter;
zone = iZone;
}
@Override
public void preempt(AIRobot ai) {
if (target != null && target.isDead) {
terminate();
}
}
@Override
public void update() {
if (target == null) {
scanForItem();
} else {
pickTime++;
if (pickTime > 5) {
TransactorSimple inventoryInsert = new TransactorSimple(robot);
target.getEntityItem().stackSize -= inventoryInsert.inject(target.getEntityItem(), null, true);
if (target.getEntityItem().stackSize <= 0) {
target.setDead();
}
terminate();
}
}
}
@Override
public void delegateAIEnded(AIRobot ai) {
if (ai instanceof AIRobotGotoBlock) {
if (target == null) {
// This would happen after a load. As we reached the item
// location already, just consider that the item is not there
// anymore and allow user to try to find another one.
setSuccess(false);
terminate();
return;
}
if (!ai.success()) {
robot.unreachableEntityDetected(target);
terminate();
}
}
}
@Override
public void end() {
if (target != null) {
BoardRobotPicker.targettedItems.remove(target.getEntityId());
}
}
private void scanForItem() {
double previousDistance = Double.MAX_VALUE;
TransactorSimple inventoryInsert = new TransactorSimple(robot);
for (Object o : robot.worldObj.loadedEntityList) {
Entity e = (Entity) o;
if (!e.isDead && e instanceof EntityItem && !BoardRobotPicker.targettedItems.contains(e.getEntityId()) && !robot.isKnownUnreachable(e)
&& (zone == null || zone.contains(Utils.getVec(e)))) {
double dx = e.posX - robot.posX;
double dy = e.posY - robot.posY;
double dz = e.posZ - robot.posZ;
double sqrDistance = dx * dx + dy * dy + dz * dz;
double maxDistance = maxRange * maxRange;
if (sqrDistance >= maxDistance) {
continue;
} else if (stackFilter != null && !stackFilter.matches(((EntityItem) e).getEntityItem())) {
continue;
} else {
EntityItem item = (EntityItem) e;
if (inventoryInsert.inject(item.getEntityItem(), null, false) > 0) {
if (target == null) {
previousDistance = sqrDistance;
target = item;
} else {
if (sqrDistance < previousDistance) {
previousDistance = sqrDistance;
target = item;
}
}
}
}
}
}
if (target != null) {
BoardRobotPicker.targettedItems.add(target.getEntityId());
if (Math.floor(target.posX) != Math.floor(robot.posX) || Math.floor(target.posY) != Math.floor(robot.posY) || Math.floor(
target.posZ) != Math.floor(robot.posZ)) {
startDelegateAI(new AIRobotGotoBlock(robot, Utils.getPos(target)));
}
} else {
// No item was found, terminate this AI
setSuccess(false);
terminate();
}
}
@Override
public int getEnergyCost() {
return 15;
}
=======
private EntityItem target;
private float maxRange;
private IStackFilter stackFilter;
private int pickTime = -1;
private IZone zone;
public AIRobotFetchItem(EntityRobotBase iRobot) {
super(iRobot);
}
public AIRobotFetchItem(EntityRobotBase iRobot, float iMaxRange, IStackFilter iStackFilter, IZone iZone) {
this(iRobot);
maxRange = iMaxRange;
stackFilter = iStackFilter;
zone = iZone;
}
@Override
public void preempt(AIRobot ai) {
if (target != null && target.isDead) {
terminate();
}
}
@Override
public void update() {
if (target == null) {
scanForItem();
} else {
pickTime++;
if (pickTime > 5) {
TransactorSimple inventoryInsert = new TransactorSimple(robot);
target.getEntityItem().stackSize -= inventoryInsert.inject(
target.getEntityItem(), ForgeDirection.UNKNOWN,
true);
if (target.getEntityItem().stackSize <= 0) {
target.setDead();
}
terminate();
}
}
}
@Override
public void delegateAIEnded(AIRobot ai) {
if (ai instanceof AIRobotGotoBlock) {
if (target == null) {
// This would happen after a load. As we reached the item
// location already, just consider that the item is not there
// anymore and allow user to try to find another one.
setSuccess(false);
terminate();
return;
}
if (!ai.success()) {
robot.unreachableEntityDetected(target);
setSuccess(false);
terminate();
}
}
}
@Override
public void end() {
if (target != null) {
BoardRobotPicker.targettedItems.remove(target.getEntityId());
}
}
private void scanForItem() {
double previousDistance = Double.MAX_VALUE;
TransactorSimple inventoryInsert = new TransactorSimple(robot);
for (Object o : robot.worldObj.loadedEntityList) {
Entity e = (Entity) o;
if (!e.isDead
&& e instanceof EntityItem
&& !BoardRobotPicker.targettedItems.contains(e.getEntityId())
&& !robot.isKnownUnreachable(e)
&& (zone == null || zone.contains(e.posX, e.posY, e.posZ))) {
double dx = e.posX - robot.posX;
double dy = e.posY - robot.posY;
double dz = e.posZ - robot.posZ;
double sqrDistance = dx * dx + dy * dy + dz * dz;
double maxDistance = maxRange * maxRange;
if (sqrDistance >= maxDistance) {
continue;
} else if (stackFilter != null && !stackFilter.matches(((EntityItem) e).getEntityItem())) {
continue;
} else {
EntityItem item = (EntityItem) e;
if (inventoryInsert.inject(item.getEntityItem(), ForgeDirection.UNKNOWN, false) > 0) {
if (target == null) {
previousDistance = sqrDistance;
target = item;
} else {
if (sqrDistance < previousDistance) {
previousDistance = sqrDistance;
target = item;
}
}
}
}
}
}
if (target != null) {
BoardRobotPicker.targettedItems.add(target.getEntityId());
if (Math.floor(target.posX) != Math.floor(robot.posX) || Math.floor(target.posY) != Math.floor(robot.posY)
|| Math.floor(target.posZ) != Math.floor(robot.posZ)) {
startDelegateAI(new AIRobotGotoBlock(robot, (int) Math.floor(target.posX),
(int) Math.floor(target.posY), (int) Math.floor(target.posZ)));
}
} else {
// No item was found, terminate this AI
setSuccess(false);
terminate();
}
}
@Override
public int getEnergyCost() {
return 15;
}
>>>>>>>
private EntityItem target;
private float maxRange;
private IStackFilter stackFilter;
private int pickTime = -1;
private IZone zone;
public AIRobotFetchItem(EntityRobotBase iRobot) {
super(iRobot);
}
public AIRobotFetchItem(EntityRobotBase iRobot, float iMaxRange, IStackFilter iStackFilter, IZone iZone) {
this(iRobot);
maxRange = iMaxRange;
stackFilter = iStackFilter;
zone = iZone;
}
@Override
public void preempt(AIRobot ai) {
if (target != null && target.isDead) {
terminate();
}
}
@Override
public void update() {
if (target == null) {
scanForItem();
} else {
pickTime++;
if (pickTime > 5) {
TransactorSimple inventoryInsert = new TransactorSimple(robot);
target.getEntityItem().stackSize -= inventoryInsert.inject(target.getEntityItem(), null, true);
if (target.getEntityItem().stackSize <= 0) {
target.setDead();
}
terminate();
}
}
}
@Override
public void delegateAIEnded(AIRobot ai) {
if (ai instanceof AIRobotGotoBlock) {
if (target == null) {
// This would happen after a load. As we reached the item
// location already, just consider that the item is not there
// anymore and allow user to try to find another one.
setSuccess(false);
terminate();
return;
}
if (!ai.success()) {
robot.unreachableEntityDetected(target);
setSuccess(false);
terminate();
}
}
}
@Override
public void end() {
if (target != null) {
BoardRobotPicker.targettedItems.remove(target.getEntityId());
}
}
private void scanForItem() {
double previousDistance = Double.MAX_VALUE;
TransactorSimple inventoryInsert = new TransactorSimple(robot);
for (Object o : robot.worldObj.loadedEntityList) {
Entity e = (Entity) o;
if (!e.isDead && e instanceof EntityItem && !BoardRobotPicker.targettedItems.contains(e.getEntityId()) && !robot.isKnownUnreachable(e)
&& (zone == null || zone.contains(Utils.getVec(e)))) {
double dx = e.posX - robot.posX;
double dy = e.posY - robot.posY;
double dz = e.posZ - robot.posZ;
double sqrDistance = dx * dx + dy * dy + dz * dz;
double maxDistance = maxRange * maxRange;
if (sqrDistance >= maxDistance) {
continue;
} else if (stackFilter != null && !stackFilter.matches(((EntityItem) e).getEntityItem())) {
continue;
} else {
EntityItem item = (EntityItem) e;
if (inventoryInsert.inject(item.getEntityItem(), null, false) > 0) {
if (target == null) {
previousDistance = sqrDistance;
target = item;
} else {
if (sqrDistance < previousDistance) {
previousDistance = sqrDistance;
target = item;
}
}
}
}
}
}
if (target != null) {
BoardRobotPicker.targettedItems.add(target.getEntityId());
if (Math.floor(target.posX) != Math.floor(robot.posX) || Math.floor(target.posY) != Math.floor(robot.posY) || Math.floor(
target.posZ) != Math.floor(robot.posZ)) {
startDelegateAI(new AIRobotGotoBlock(robot, Utils.getPos(target)));
}
} else {
// No item was found, terminate this AI
setSuccess(false);
terminate();
}
}
@Override
public int getEnergyCost() {
return 15;
} |
<<<<<<<
=======
import buildcraft.lib.net.PacketBufferBC;
import buildcraft.lib.net.cache.BuildCraftObjectCaches;
>>>>>>>
import buildcraft.lib.net.PacketBufferBC;
import buildcraft.lib.net.cache.BuildCraftObjectCaches;
<<<<<<<
ItemStack stack = StackUtil.asNonNull(buffer.readItemStack());
TravellingItem item = new TravellingItem(stack);
=======
int stackId = buffer.readInt();
int stackSize = buffer.readShort();
Supplier<ItemStack> link = BuildCraftObjectCaches.retrieveItemStack(stackId);
TravellingItem item = new TravellingItem(link, stackSize);
>>>>>>>
int stackId = buffer.readInt();
int stackSize = buffer.readShort();
Supplier<ItemStack> link = BuildCraftObjectCaches.retrieveItemStack(stackId);
TravellingItem item = new TravellingItem(link, stackSize);
<<<<<<<
buffer.writeByte(from.ordinal());
buffer.writeByte(item.to == null ? 7 : item.to.ordinal());
buffer.writeByte(colour == null ? 16 : colour.getMetadata());
buffer.writeInt(delay);
// Specifically here - writing out the full stack each packet isn't good
buffer.writeItemStack(stack);
=======
PacketBufferBC buf = PacketBufferBC.asPacketBufferBc(buffer);
buf.writeEnumValue(from);
buf.writeEnumValue(item.to);
buf.writeEnumValue(colour);
buf.writeInt(delay);
buf.writeInt(stackId);
buf.writeShort(stack.stackSize);
>>>>>>>
PacketBufferBC buf = PacketBufferBC.asPacketBufferBc(buffer);
buf.writeEnumValue(from);
buf.writeEnumValue(item.to);
buf.writeEnumValue(colour);
buf.writeInt(delay);
buf.writeInt(stackId);
buf.writeShort(stack.getCount()); |
<<<<<<<
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
=======
/**
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
>>>>>>>
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
<<<<<<<
import net.minecraft.util.EnumFacing;
=======
import net.minecraftforge.common.util.ForgeDirection;
>>>>>>>
import net.minecraft.util.EnumFacing; |
<<<<<<<
if (world.getBlockState(spring).getBlock() == BCCoreBlocks.SPRING) {
BCLog.logger.info("Found block at " + spring);
=======
if (world.getBlockState(spring).getBlock() == BCCoreBlocks.spring) {
>>>>>>>
if (world.getBlockState(spring).getBlock() == BCCoreBlocks.SPRING) { |
<<<<<<<
BuildCraftAPI.fakePlayerProvider = FakePlayerUtil.INSTANCE;
FillerManager.registry = FillerRegistry.INSTANCE;
=======
BuildCraftAPI.fakePlayerProvider = FakePlayerProvider.INSTANCE;
>>>>>>>
FillerManager.registry = FillerRegistry.INSTANCE;
BuildCraftAPI.fakePlayerProvider = FakePlayerProvider.INSTANCE; |
<<<<<<<
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
=======
import buildcraft.api.core.render.ISprite;
>>>>>>>
import buildcraft.api.core.render.ISprite;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; |
<<<<<<<
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
=======
/**
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
>>>>>>>
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
<<<<<<<
import net.minecraft.util.EnumFacing;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
=======
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraftforge.common.util.ForgeDirection;
>>>>>>>
import net.minecraft.util.EnumFacing;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import buildcraft.BuildCraftTransport;
<<<<<<<
public class PipeItemsSandstone extends Pipe<PipeTransportItems>implements IPipeConnectionForced {
=======
public class PipeItemsSandstone extends Pipe<PipeTransportItems> implements IPipeConnectionForced {
>>>>>>>
public class PipeItemsSandstone extends Pipe<PipeTransportItems> implements IPipeConnectionForced { |
<<<<<<<
private final List<PodVolume> volumes;
=======
private String nodeSelector;
>>>>>>>
private String nodeSelector;
private final List<PodVolume> volumes; |
<<<<<<<
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
=======
/**
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
>>>>>>>
/**
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
<<<<<<<
import net.minecraft.util.EnumFacing;
=======
>>>>>>>
import net.minecraft.util.EnumFacing; |
<<<<<<<
/** {@link JsonModel} but any element can change depening on variables. */
public class JsonVariableModel extends JsonVariableObject {
=======
/** {@link JsonModel} but any element can change depending on variables. */
public class JsonVariableModel {
>>>>>>>
/** {@link JsonModel} but any element can change depending on variables. */
public class JsonVariableModel extends JsonVariableObject { |
<<<<<<<
import java.io.IOException;
=======
import java.io.ByteArrayInputStream;
>>>>>>>
import java.io.IOException;
import java.io.ByteArrayInputStream;
<<<<<<<
import hudson.slaves.NodeProperty;
import hudson.slaves.NodePropertyDescriptor;
import hudson.util.DescribableList;
import jenkins.model.Jenkins;
=======
import org.apache.commons.lang.StringUtils;
>>>>>>>
import org.apache.commons.lang.StringUtils;
import hudson.slaves.NodeProperty;
import hudson.slaves.NodePropertyDescriptor;
import hudson.util.DescribableList;
import jenkins.model.Jenkins; |
<<<<<<<
public static Map<String, IStatement> statements = new HashMap<String, IStatement>();
public static Map<String, Class<? extends IStatementParameter>> parameters = new HashMap<String, Class<? extends IStatementParameter>>();
private static List<ITriggerProvider> triggerProviders = new LinkedList<ITriggerProvider>();
private static List<IActionProvider> actionProviders = new LinkedList<IActionProvider>();
/** Deactivate constructor */
private StatementManager() {}
public static void registerTriggerProvider(ITriggerProvider provider) {
if (provider != null && !triggerProviders.contains(provider)) {
triggerProviders.add(provider);
}
}
public static void registerActionProvider(IActionProvider provider) {
if (provider != null && !actionProviders.contains(provider)) {
actionProviders.add(provider);
}
}
public static void registerStatement(IStatement statement) {
statements.put(statement.getUniqueTag(), statement);
}
public static void registerParameterClass(Class<? extends IStatementParameter> param) {
parameters.put(createParameter(param).getUniqueTag(), param);
}
@Deprecated
public static void registerParameterClass(String name, Class<? extends IStatementParameter> param) {
parameters.put(name, param);
}
public static List<ITriggerExternal> getExternalTriggers(EnumFacing side, TileEntity entity) {
List<ITriggerExternal> result;
if (entity instanceof IOverrideDefaultStatements) {
result = ((IOverrideDefaultStatements) entity).overrideTriggers();
if (result != null) {
return result;
}
}
result = new LinkedList<ITriggerExternal>();
for (ITriggerProvider provider : triggerProviders) {
Collection<ITriggerExternal> toAdd = provider.getExternalTriggers(side, entity);
if (toAdd != null) {
for (ITriggerExternal t : toAdd) {
if (!result.contains(t)) {
result.add(t);
}
}
}
}
return result;
}
public static List<IActionExternal> getExternalActions(EnumFacing side, TileEntity entity) {
List<IActionExternal> result = new LinkedList<IActionExternal>();
if (entity instanceof IOverrideDefaultStatements) {
result = ((IOverrideDefaultStatements) entity).overrideActions();
if (result != null) {
return result;
} else {
result = new LinkedList<IActionExternal>();
}
}
for (IActionProvider provider : actionProviders) {
Collection<IActionExternal> toAdd = provider.getExternalActions(side, entity);
if (toAdd != null) {
for (IActionExternal t : toAdd) {
if (!result.contains(t)) {
result.add(t);
}
}
}
}
return result;
}
public static List<ITriggerInternal> getInternalTriggers(IStatementContainer container) {
List<ITriggerInternal> result = new LinkedList<ITriggerInternal>();
for (ITriggerProvider provider : triggerProviders) {
Collection<ITriggerInternal> toAdd = provider.getInternalTriggers(container);
if (toAdd != null) {
for (ITriggerInternal t : toAdd) {
if (!result.contains(t)) {
result.add(t);
}
}
}
}
return result;
}
public static List<IActionInternal> getInternalActions(IStatementContainer container) {
List<IActionInternal> result = new LinkedList<IActionInternal>();
for (IActionProvider provider : actionProviders) {
Collection<IActionInternal> toAdd = provider.getInternalActions(container);
if (toAdd != null) {
for (IActionInternal t : toAdd) {
if (!result.contains(t)) {
result.add(t);
}
}
}
}
return result;
}
public static IStatementParameter createParameter(String kind) {
return createParameter(parameters.get(kind));
}
private static IStatementParameter createParameter(Class<? extends IStatementParameter> param) {
try {
return param.newInstance();
} catch (InstantiationException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
}
return null;
}
// /**
// * Generally, this function should be called by every mod implementing
// * the Statements API ***as a container*** (that is, adding its own gates)
// * on the client side from a given Item of choice.
// */
// @SideOnly(Side.CLIENT)
// public static void registerIcons(TextureAtlasSpriteRegister register) {
// for (IStatement statement : statements.values()) {
// statement.registerIcons(register);
// }
//
// for (Class<? extends IStatementParameter> parameter : parameters.values()) {
// createParameter(parameter).registerIcons(register);
// }
// }
=======
public static Map<String, IStatement> statements = new HashMap<String, IStatement>();
public static Map<String, Class<? extends IStatementParameter>> parameters = new HashMap<String, Class<? extends IStatementParameter>>();
private static List<ITriggerProvider> triggerProviders = new LinkedList<ITriggerProvider>();
private static List<IActionProvider> actionProviders = new LinkedList<IActionProvider>();
/**
* Deactivate constructor
*/
private StatementManager() {
}
public static void registerTriggerProvider(ITriggerProvider provider) {
if (provider != null && !triggerProviders.contains(provider)) {
triggerProviders.add(provider);
}
}
public static void registerActionProvider(IActionProvider provider) {
if (provider != null && !actionProviders.contains(provider)) {
actionProviders.add(provider);
}
}
public static void registerStatement(IStatement statement) {
statements.put(statement.getUniqueTag(), statement);
}
public static void registerParameterClass(Class<? extends IStatementParameter> param) {
parameters.put(createParameter(param).getUniqueTag(), param);
}
@Deprecated
public static void registerParameterClass(String name, Class<? extends IStatementParameter> param) {
parameters.put(name, param);
}
public static List<ITriggerExternal> getExternalTriggers(ForgeDirection side, TileEntity entity) {
List<ITriggerExternal> result;
if (entity instanceof IOverrideDefaultStatements) {
result = ((IOverrideDefaultStatements) entity).overrideTriggers();
if (result != null) {
return result;
}
}
result = new LinkedList<ITriggerExternal>();
for (ITriggerProvider provider : triggerProviders) {
Collection<ITriggerExternal> toAdd = provider.getExternalTriggers(side, entity);
if (toAdd != null) {
for (ITriggerExternal t : toAdd) {
if (!result.contains(t)) {
result.add(t);
}
}
}
}
return result;
}
public static List<IActionExternal> getExternalActions(ForgeDirection side, TileEntity entity) {
List<IActionExternal> result = new LinkedList<IActionExternal>();
if (entity instanceof IOverrideDefaultStatements) {
result = ((IOverrideDefaultStatements) entity).overrideActions();
if (result != null) {
return result;
} else {
result = new LinkedList<IActionExternal>();
}
}
for (IActionProvider provider : actionProviders) {
Collection<IActionExternal> toAdd = provider.getExternalActions(side, entity);
if (toAdd != null) {
for (IActionExternal t : toAdd) {
if (!result.contains(t)) {
result.add(t);
}
}
}
}
return result;
}
public static List<ITriggerInternal> getInternalTriggers(IStatementContainer container) {
List<ITriggerInternal> result = new LinkedList<ITriggerInternal>();
for (ITriggerProvider provider : triggerProviders) {
Collection<ITriggerInternal> toAdd = provider.getInternalTriggers(container);
if (toAdd != null) {
for (ITriggerInternal t : toAdd) {
if (!result.contains(t)) {
result.add(t);
}
}
}
}
return result;
}
public static List<IActionInternal> getInternalActions(IStatementContainer container) {
List<IActionInternal> result = new LinkedList<IActionInternal>();
for (IActionProvider provider : actionProviders) {
Collection<IActionInternal> toAdd = provider.getInternalActions(container);
if (toAdd != null) {
for (IActionInternal t : toAdd) {
if (!result.contains(t)) {
result.add(t);
}
}
}
}
return result;
}
public static IStatementParameter createParameter(String kind) {
return createParameter(parameters.get(kind));
}
private static IStatementParameter createParameter(Class<? extends IStatementParameter> param) {
try {
return param.newInstance();
} catch (InstantiationException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (Error error) {
BCLog.logErrorAPI(error, IStatementParameter.class);
throw error;
}
return null;
}
/**
* Generally, this function should be called by every mod implementing
* the Statements API ***as a container*** (that is, adding its own gates)
* on the client side from a given Item of choice.
*/
@SideOnly(Side.CLIENT)
public static void registerIcons(IIconRegister register) {
for (IStatement statement : statements.values()) {
statement.registerIcons(register);
}
for (Class<? extends IStatementParameter> parameter : parameters.values()) {
createParameter(parameter).registerIcons(register);
}
}
>>>>>>>
public static Map<String, IStatement> statements = new HashMap<String, IStatement>();
public static Map<String, Class<? extends IStatementParameter>> parameters = new HashMap<String, Class<? extends IStatementParameter>>();
private static List<ITriggerProvider> triggerProviders = new LinkedList<ITriggerProvider>();
private static List<IActionProvider> actionProviders = new LinkedList<IActionProvider>();
/** Deactivate constructor */
private StatementManager() {}
public static void registerTriggerProvider(ITriggerProvider provider) {
if (provider != null && !triggerProviders.contains(provider)) {
triggerProviders.add(provider);
}
}
public static void registerActionProvider(IActionProvider provider) {
if (provider != null && !actionProviders.contains(provider)) {
actionProviders.add(provider);
}
}
public static void registerStatement(IStatement statement) {
statements.put(statement.getUniqueTag(), statement);
}
public static void registerParameterClass(Class<? extends IStatementParameter> param) {
parameters.put(createParameter(param).getUniqueTag(), param);
}
@Deprecated
public static void registerParameterClass(String name, Class<? extends IStatementParameter> param) {
parameters.put(name, param);
}
public static List<ITriggerExternal> getExternalTriggers(EnumFacing side, TileEntity entity) {
List<ITriggerExternal> result;
if (entity instanceof IOverrideDefaultStatements) {
result = ((IOverrideDefaultStatements) entity).overrideTriggers();
if (result != null) {
return result;
}
}
result = new LinkedList<ITriggerExternal>();
for (ITriggerProvider provider : triggerProviders) {
Collection<ITriggerExternal> toAdd = provider.getExternalTriggers(side, entity);
if (toAdd != null) {
for (ITriggerExternal t : toAdd) {
if (!result.contains(t)) {
result.add(t);
}
}
}
}
return result;
}
public static List<IActionExternal> getExternalActions(EnumFacing side, TileEntity entity) {
List<IActionExternal> result = new LinkedList<IActionExternal>();
if (entity instanceof IOverrideDefaultStatements) {
result = ((IOverrideDefaultStatements) entity).overrideActions();
if (result != null) {
return result;
} else {
result = new LinkedList<IActionExternal>();
}
}
for (IActionProvider provider : actionProviders) {
Collection<IActionExternal> toAdd = provider.getExternalActions(side, entity);
if (toAdd != null) {
for (IActionExternal t : toAdd) {
if (!result.contains(t)) {
result.add(t);
}
}
}
}
return result;
}
public static List<ITriggerInternal> getInternalTriggers(IStatementContainer container) {
List<ITriggerInternal> result = new LinkedList<ITriggerInternal>();
for (ITriggerProvider provider : triggerProviders) {
Collection<ITriggerInternal> toAdd = provider.getInternalTriggers(container);
if (toAdd != null) {
for (ITriggerInternal t : toAdd) {
if (!result.contains(t)) {
result.add(t);
}
}
}
}
return result;
}
public static List<IActionInternal> getInternalActions(IStatementContainer container) {
List<IActionInternal> result = new LinkedList<IActionInternal>();
for (IActionProvider provider : actionProviders) {
Collection<IActionInternal> toAdd = provider.getInternalActions(container);
if (toAdd != null) {
for (IActionInternal t : toAdd) {
if (!result.contains(t)) {
result.add(t);
}
}
}
}
return result;
}
public static IStatementParameter createParameter(String kind) {
return createParameter(parameters.get(kind));
}
private static IStatementParameter createParameter(Class<? extends IStatementParameter> param) {
try {
return param.newInstance();
} catch (InstantiationException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (Error error) {
BCLog.logErrorAPI(error, IStatementParameter.class);
throw error;
}
return null;
}
// /**
// * Generally, this function should be called by every mod implementing
// * the Statements API ***as a container*** (that is, adding its own gates)
// * on the client side from a given Item of choice.
// */
// @SideOnly(Side.CLIENT)
// public static void registerIcons(TextureAtlasSpriteRegister register) {
// for (IStatement statement : statements.values()) {
// statement.registerIcons(register);
// }
//
// for (Class<? extends IStatementParameter> parameter : parameters.values()) {
// createParameter(parameter).registerIcons(register);
// }
// } |
<<<<<<<
IBlockState state = getCurrentStateForBlock(BCFactoryBlocks.HEAT_EXCHANGE_END);
=======
IBlockState state = getCurrentStateForBlock(BCFactoryBlocks.heatExchangeStart);
>>>>>>>
IBlockState state = getCurrentStateForBlock(BCFactoryBlocks.HEAT_EXCHANGE_START);
<<<<<<<
if (state.getBlock() != BCFactoryBlocks.HEAT_EXCHANGE_MIDDLE) {
=======
if (state.getBlock() != BCFactoryBlocks.heatExchangeMiddle) {
// BCLog.logger.warn("Not middle @ " + search + " (" + i + ")");
>>>>>>>
if (state.getBlock() != BCFactoryBlocks.HEAT_EXCHANGE_MIDDLE) {
// BCLog.logger.warn("Not middle @ " + search + " (" + i + ")");
<<<<<<<
search = search.offset(facing);
state = getLocalState(search);
if (state.getBlock() != BCFactoryBlocks.HEAT_EXCHANGE_END) {
=======
if (state.getBlock() != BCFactoryBlocks.heatExchangeEnd) {
// BCLog.logger.warn("Not end @ " + search);
>>>>>>>
if (state.getBlock() != BCFactoryBlocks.HEAT_EXCHANGE_END) {
// BCLog.logger.warn("Not end @ " + search); |
<<<<<<<
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
=======
/**
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
>>>>>>>
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
<<<<<<<
import net.minecraft.block.state.IBlockState;
=======
import net.minecraft.item.ItemBlock;
>>>>>>>
import net.minecraft.block.state.IBlockState;
import net.minecraft.item.ItemBlock;
<<<<<<<
import net.minecraft.util.Vec3;
=======
>>>>>>>
import net.minecraft.util.Vec3;
<<<<<<<
import buildcraft.BuildCraftCore;
=======
import buildcraft.api.core.Position;
import buildcraft.core.BlockBuildTool;
>>>>>>>
import buildcraft.core.BlockDecoration; |
<<<<<<<
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
=======
/**
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
>>>>>>>
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
<<<<<<<
for (int i = 0; i < crafters.size(); i++) {
engine.sendGUINetworkData(this, (ICrafting) crafters.get(i));
}
}
=======
for (Object crafter : crafters) {
engine.sendGUINetworkData(this, (ICrafting) crafter);
}
}
>>>>>>>
for (Object crafter : crafters) {
engine.sendGUINetworkData(this, (ICrafting) crafter);
}
} |
<<<<<<<
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
=======
/**
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
>>>>>>>
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */ |
<<<<<<<
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
=======
/**
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
>>>>>>>
/**
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
<<<<<<<
=======
import net.minecraftforge.common.DimensionManager;
>>>>>>>
<<<<<<<
private IGuiReturnHandler obj;
private byte[] extraData;
private boolean tileReturn;
private BlockPos pos;
private int entityId;
private ByteBuf heldData;
public PacketGuiReturn() {}
public PacketGuiReturn(IGuiReturnHandler obj) {
this.obj = obj;
this.extraData = null;
this.tempWorld = obj.getWorld();
}
public PacketGuiReturn(IGuiReturnHandler obj, byte[] extraData) {
this.obj = obj;
this.extraData = extraData;
this.tempWorld = obj.getWorld();
}
@Override
public void writeData(ByteBuf data) {
super.writeData(data);
if (obj instanceof TileEntity) {
TileEntity tile = (TileEntity) obj;
data.writeBoolean(true);
data.writeInt(tile.getPos().getX());
data.writeInt(tile.getPos().getY());
data.writeInt(tile.getPos().getZ());
} else if (obj instanceof Entity) {
Entity entity = (Entity) obj;
data.writeBoolean(false);
data.writeInt(entity.getEntityId());
} else {
return;
}
ByteBuf guiData = Unpooled.buffer();
obj.writeGuiData(guiData);
if (extraData != null) {
guiData.writeBytes(extraData);
}
int length = guiData.readableBytes();
data.writeInt(length);
data.writeBytes(guiData);
}
@Override
public void readData(ByteBuf data) {
super.readData(data);
tileReturn = data.readBoolean();
if (tileReturn) {
pos = new BlockPos(data.readInt(), data.readInt(), data.readInt());
int length = data.readInt();
heldData = data.readBytes(length);
} else {
entityId = data.readInt();
int length = data.readInt();
heldData = data.readBytes(length);
}
}
public void sendPacket() {
BuildCraftCore.instance.sendToServer(this);
}
@Override
public void applyData(World world, EntityPlayer player) {
if (tileReturn) {
TileEntity tile = world.getTileEntity(pos);
if (tile instanceof IGuiReturnHandler) {
IGuiReturnHandler handler = (IGuiReturnHandler) tile;
handler.readGuiData(heldData, null);
}
} else {
Entity ent = world.getEntityByID(entityId);
if (ent instanceof IGuiReturnHandler) {
IGuiReturnHandler handler = (IGuiReturnHandler) ent;
handler.readGuiData(heldData, null);
}
}
}
=======
private EntityPlayer sender;
private IGuiReturnHandler obj;
private byte[] extraData;
public PacketGuiReturn() {
}
public PacketGuiReturn(EntityPlayer sender) {
this.sender = sender;
}
public PacketGuiReturn(IGuiReturnHandler obj) {
this.obj = obj;
this.extraData = null;
}
public PacketGuiReturn(IGuiReturnHandler obj, byte[] extraData) {
this.obj = obj;
this.extraData = extraData;
}
@Override
public void writeData(ByteBuf data) {
data.writeInt(obj.getWorld().provider.dimensionId);
if (obj instanceof TileEntity) {
TileEntity tile = (TileEntity) obj;
data.writeBoolean(true);
data.writeInt(tile.xCoord);
data.writeInt(tile.yCoord);
data.writeInt(tile.zCoord);
} else if (obj instanceof Entity) {
Entity entity = (Entity) obj;
data.writeBoolean(false);
data.writeInt(entity.getEntityId());
} else {
return;
}
obj.writeGuiData(data);
if (extraData != null) {
data.writeBytes(extraData);
}
}
@Override
public void readData(ByteBuf data) {
int dim = data.readInt();
World world = DimensionManager.getWorld(dim);
boolean tileReturn = data.readBoolean();
if (tileReturn) {
int x = data.readInt();
int y = data.readInt();
int z = data.readInt();
TileEntity t = world.getTileEntity(x, y, z);
if (t instanceof IGuiReturnHandler) {
((IGuiReturnHandler) t).readGuiData(data, sender);
}
} else {
int entityId = data.readInt();
Entity entity = world.getEntityByID(entityId);
if (entity instanceof IGuiReturnHandler) {
((IGuiReturnHandler) entity).readGuiData(data, sender);
}
}
}
public void sendPacket() {
BuildCraftCore.instance.sendToServer(this);
}
@Override
public int getID() {
return PacketIds.GUI_RETURN;
}
>>>>>>>
private IGuiReturnHandler obj;
private byte[] extraData;
private boolean tileReturn;
private BlockPos pos;
private int entityId;
private ByteBuf heldData;
public PacketGuiReturn() {}
public PacketGuiReturn(IGuiReturnHandler obj) {
this.obj = obj;
this.extraData = null;
this.tempWorld = obj.getWorld();
}
public PacketGuiReturn(IGuiReturnHandler obj, byte[] extraData) {
this.obj = obj;
this.extraData = extraData;
this.tempWorld = obj.getWorld();
}
@Override
public void writeData(ByteBuf data) {
super.writeData(data);
if (obj instanceof TileEntity) {
TileEntity tile = (TileEntity) obj;
data.writeBoolean(true);
data.writeInt(tile.getPos().getX());
data.writeInt(tile.getPos().getY());
data.writeInt(tile.getPos().getZ());
} else if (obj instanceof Entity) {
Entity entity = (Entity) obj;
data.writeBoolean(false);
data.writeInt(entity.getEntityId());
} else {
return;
}
ByteBuf guiData = Unpooled.buffer();
obj.writeGuiData(guiData);
if (extraData != null) {
guiData.writeBytes(extraData);
}
int length = guiData.readableBytes();
data.writeInt(length);
data.writeBytes(guiData);
}
@Override
public void readData(ByteBuf data) {
super.readData(data);
tileReturn = data.readBoolean();
if (tileReturn) {
pos = new BlockPos(data.readInt(), data.readInt(), data.readInt());
int length = data.readInt();
heldData = data.readBytes(length);
} else {
entityId = data.readInt();
int length = data.readInt();
heldData = data.readBytes(length);
}
}
public void sendPacket() {
BuildCraftCore.instance.sendToServer(this);
}
@Override
public void applyData(World world, EntityPlayer player) {
if (tileReturn) {
TileEntity tile = world.getTileEntity(pos);
if (tile instanceof IGuiReturnHandler) {
IGuiReturnHandler handler = (IGuiReturnHandler) tile;
handler.readGuiData(heldData, null);
}
} else {
Entity ent = world.getEntityByID(entityId);
if (ent instanceof IGuiReturnHandler) {
IGuiReturnHandler handler = (IGuiReturnHandler) ent;
handler.readGuiData(heldData, null);
}
}
} |
<<<<<<<
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
=======
/**
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
>>>>>>>
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */ |
<<<<<<<
public List<Container> getContainers() throws UnrecoverableKeyException, CertificateEncodingException, NoSuchAlgorithmException, KeyStoreException, IOException {
if(!Jenkins.get().hasPermission(Computer.EXTENDED_READ)) {
=======
public List<Container> getContainers() throws KubernetesAuthException, IOException {
if(!Jenkins.get().hasPermission(Jenkins.ADMINISTER)) {
>>>>>>>
public List<Container> getContainers() throws KubernetesAuthException, IOException {
if(!Jenkins.get().hasPermission(Computer.EXTENDED_READ)) {
<<<<<<<
public List<Event> getPodEvents() throws UnrecoverableKeyException, CertificateEncodingException, NoSuchAlgorithmException, KeyStoreException, IOException {
if(!Jenkins.get().hasPermission(Computer.EXTENDED_READ)) {
=======
public List<Event> getPodEvents() throws KubernetesAuthException, IOException {
if(!Jenkins.get().hasPermission(Jenkins.ADMINISTER)) {
>>>>>>>
public List<Event> getPodEvents() throws KubernetesAuthException, IOException {
if(!Jenkins.get().hasPermission(Computer.EXTENDED_READ)) {
<<<<<<<
StaplerRequest req, StaplerResponse rsp) throws UnrecoverableKeyException, CertificateEncodingException, NoSuchAlgorithmException, KeyStoreException, IOException {
Jenkins.get().checkPermission(Computer.EXTENDED_READ);
=======
StaplerRequest req, StaplerResponse rsp) throws KubernetesAuthException, IOException {
Jenkins.get().checkPermission(Jenkins.ADMINISTER);
>>>>>>>
StaplerRequest req, StaplerResponse rsp) throws KubernetesAuthException, IOException {
Jenkins.get().checkPermission(Computer.EXTENDED_READ); |
<<<<<<<
public void getSubItems(CreativeTabs tab, NonNullList<ItemStack> subItems) {
if (!this.isInCreativeTab(tab))
return;
=======
@SideOnly(Side.CLIENT)
public FontRenderer getFontRenderer(ItemStack stack) {
return SpecialColourFontRenderer.INSTANCE;
}
@Override
@SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs tab, NonNullList<ItemStack> subItems) {
>>>>>>>
@SideOnly(Side.CLIENT)
public FontRenderer getFontRenderer(ItemStack stack) {
return SpecialColourFontRenderer.INSTANCE;
}
@Override
public void getSubItems(CreativeTabs tab, NonNullList<ItemStack> subItems) {
if (!this.isInCreativeTab(tab))
return; |
<<<<<<<
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
=======
/**
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
>>>>>>>
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
<<<<<<<
private IStackFilter filter;
private int quantity;
public AIRobotGotoStationAndLoad(EntityRobotBase iRobot) {
super(iRobot);
}
public AIRobotGotoStationAndLoad(EntityRobotBase iRobot, IStackFilter iFilter, int iQuantity) {
this(iRobot);
filter = iFilter;
quantity = iQuantity;
}
@Override
public void start() {
startDelegateAI(new AIRobotGotoStationToLoad(robot, filter, quantity));
}
@Override
public void delegateAIEnded(AIRobot ai) {
if (ai instanceof AIRobotGotoStationToLoad) {
if (ai.success()) {
startDelegateAI(new AIRobotLoad(robot, filter, quantity));
} else {
setSuccess(false);
terminate();
}
} else if (ai instanceof AIRobotGotoStationToLoad) {
setSuccess(ai.success());
terminate();
}
}
=======
private IStackFilter filter;
private int quantity;
public AIRobotGotoStationAndLoad(EntityRobotBase iRobot) {
super(iRobot);
}
public AIRobotGotoStationAndLoad(EntityRobotBase iRobot, IStackFilter iFilter, int iQuantity) {
this(iRobot);
filter = iFilter;
quantity = iQuantity;
}
@Override
public void start() {
startDelegateAI(new AIRobotGotoStationToLoad(robot, filter, quantity));
}
@Override
public void delegateAIEnded(AIRobot ai) {
if (ai instanceof AIRobotGotoStationToLoad) {
if (filter != null && ai.success()) {
startDelegateAI(new AIRobotLoad(robot, filter, quantity));
} else {
setSuccess(false);
terminate();
}
} else if (ai instanceof AIRobotLoad) {
setSuccess(ai.success());
terminate();
}
}
>>>>>>>
private IStackFilter filter;
private int quantity;
public AIRobotGotoStationAndLoad(EntityRobotBase iRobot) {
super(iRobot);
}
public AIRobotGotoStationAndLoad(EntityRobotBase iRobot, IStackFilter iFilter, int iQuantity) {
this(iRobot);
filter = iFilter;
quantity = iQuantity;
}
@Override
public void start() {
startDelegateAI(new AIRobotGotoStationToLoad(robot, filter, quantity));
}
@Override
public void delegateAIEnded(AIRobot ai) {
if (ai instanceof AIRobotGotoStationToLoad) {
if (filter != null && ai.success()) {
startDelegateAI(new AIRobotLoad(robot, filter, quantity));
} else {
setSuccess(false);
terminate();
}
} else if (ai instanceof AIRobotLoad) {
setSuccess(ai.success());
terminate();
}
} |
<<<<<<<
import net.minecraft.client.gui.FontRenderer;
=======
import gnu.trove.map.hash.TIntObjectHashMap;
>>>>>>>
import gnu.trove.map.hash.TIntObjectHashMap;
import net.minecraft.client.gui.FontRenderer;
<<<<<<<
import buildcraft.transport.BCTransportBlocks;
=======
>>>>>>> |
<<<<<<<
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
=======
/**
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
>>>>>>>
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
<<<<<<<
public AIRobotDisposeItems(EntityRobotBase iRobot) {
super(iRobot);
}
@Override
public void start() {
startDelegateAI(new AIRobotGotoStationAndUnload(robot));
}
@Override
public void delegateAIEnded(AIRobot ai) {
if (ai instanceof AIRobotGotoStationAndUnload) {
if (ai.success()) {
if (robot.containsItems()) {
startDelegateAI(new AIRobotGotoStationAndUnload(robot));
} else {
terminate();
}
} else {
for (IInvSlot slot : InventoryIterator.getIterable(robot)) {
if (slot.getStackInSlot() != null) {
final EntityItem entity = new EntityItem(robot.worldObj, robot.posX, robot.posY, robot.posZ, slot.getStackInSlot());
robot.worldObj.spawnEntityInWorld(entity);
slot.setStackInSlot(null);
}
}
terminate();
}
}
}
=======
public AIRobotDisposeItems(EntityRobotBase iRobot) {
super(iRobot);
}
@Override
public void start() {
startDelegateAI(new AIRobotGotoStationAndUnload(robot));
}
@Override
public void delegateAIEnded(AIRobot ai) {
if (ai instanceof AIRobotGotoStationAndUnload) {
if (ai.success()) {
if (robot.containsItems()) {
startDelegateAI(new AIRobotGotoStationAndUnload(robot));
} else {
terminate();
}
} else {
for (IInvSlot slot : InventoryIterator.getIterable(robot)) {
if (slot.getStackInSlot() != null) {
final EntityItem entity = new EntityItem(
robot.worldObj,
robot.posX,
robot.posY,
robot.posZ,
slot.getStackInSlot());
robot.worldObj.spawnEntityInWorld(entity);
slot.setStackInSlot(null);
}
}
terminate();
}
}
}
>>>>>>>
public AIRobotDisposeItems(EntityRobotBase iRobot) {
super(iRobot);
}
@Override
public void start() {
startDelegateAI(new AIRobotGotoStationAndUnload(robot));
}
@Override
public void delegateAIEnded(AIRobot ai) {
if (ai instanceof AIRobotGotoStationAndUnload) {
if (ai.success()) {
if (robot.containsItems()) {
startDelegateAI(new AIRobotGotoStationAndUnload(robot));
} else {
terminate();
}
} else {
for (IInvSlot slot : InventoryIterator.getIterable(robot)) {
if (slot.getStackInSlot() != null) {
final EntityItem entity = new EntityItem(robot.worldObj, robot.posX, robot.posY, robot.posZ, slot.getStackInSlot());
robot.worldObj.spawnEntityInWorld(entity);
slot.setStackInSlot(null);
}
}
terminate();
}
}
} |
<<<<<<<
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
=======
/**
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
>>>>>>>
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
<<<<<<<
import net.minecraft.util.EnumFacing;
import net.minecraft.util.Vec3;
=======
import net.minecraftforge.common.util.ForgeDirection;
>>>>>>>
import net.minecraft.util.EnumFacing;
import net.minecraft.util.Vec3;
<<<<<<<
import buildcraft.core.lib.utils.Utils;
=======
import buildcraft.core.lib.utils.AverageInt;
>>>>>>>
import buildcraft.core.lib.utils.AverageInt;
import buildcraft.core.lib.utils.Utils; |
<<<<<<<
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
=======
/**
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
>>>>>>>
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
<<<<<<<
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.event.ModelBakeEvent;
=======
import cpw.mods.fml.client.event.ConfigChangedEvent;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLInterModComms;
import cpw.mods.fml.common.event.FMLMissingMappingsEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
>>>>>>>
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.event.ModelBakeEvent;
<<<<<<<
import buildcraft.core.lib.network.base.ChannelHandler;
import buildcraft.core.lib.network.base.PacketHandler;
import buildcraft.core.proxy.CoreProxy;
import buildcraft.factory.*;
import buildcraft.factory.render.ChuteRenderModel;
=======
import buildcraft.core.lib.network.ChannelHandler;
import buildcraft.core.lib.network.PacketHandler;
import buildcraft.factory.BlockAutoWorkbench;
import buildcraft.factory.BlockFloodGate;
import buildcraft.factory.BlockHopper;
import buildcraft.factory.BlockMiningWell;
import buildcraft.factory.BlockPlainPipe;
import buildcraft.factory.BlockPump;
import buildcraft.factory.BlockRefinery;
import buildcraft.factory.BlockTank;
import buildcraft.factory.FactoryGuiHandler;
import buildcraft.factory.FactoryProxy;
import buildcraft.factory.FactoryProxyClient;
import buildcraft.factory.PumpDimensionList;
import buildcraft.factory.TileAutoWorkbench;
import buildcraft.factory.TileFloodGate;
import buildcraft.factory.TileHopper;
import buildcraft.factory.TileMiningWell;
import buildcraft.factory.TilePump;
import buildcraft.factory.TileRefinery;
import buildcraft.factory.TileTank;
>>>>>>>
import buildcraft.core.lib.network.base.ChannelHandler;
import buildcraft.core.lib.network.base.PacketHandler;
import buildcraft.factory.*;
import buildcraft.factory.render.ChuteRenderModel;
<<<<<<<
pumpDimensionList = new PumpDimensionList(BuildCraftCore.mainConfigManager.get("general.pumpDimensionControl").getString());
if (BuildCraftCore.mainConfiguration.hasChanged()) {
BuildCraftCore.mainConfiguration.save();
}
}
}
@SubscribeEvent
public void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent event) {
if ("BuildCraft|Core".equals(event.modID)) {
reloadConfig(event.isWorldRunning ? ConfigManager.RestartRequirement.NONE : ConfigManager.RestartRequirement.WORLD);
}
}
@Mod.EventHandler
public void processIMCRequests(FMLInterModComms.IMCEvent event) {
InterModComms.processIMC(event);
}
=======
pumpDimensionList = new PumpDimensionList(BuildCraftCore.mainConfigManager.get("general.pumpDimensionControl").getString());
if (BuildCraftCore.mainConfiguration.hasChanged()) {
BuildCraftCore.mainConfiguration.save();
}
}
}
@SubscribeEvent
public void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent event) {
if ("BuildCraft|Core".equals(event.modID)) {
reloadConfig(event.isWorldRunning ? ConfigManager.RestartRequirement.NONE : ConfigManager.RestartRequirement.WORLD);
}
}
@Mod.EventHandler
public void processIMCRequests(FMLInterModComms.IMCEvent event) {
InterModComms.processIMC(event);
}
>>>>>>>
pumpDimensionList = new PumpDimensionList(BuildCraftCore.mainConfigManager.get("general.pumpDimensionControl").getString());
if (BuildCraftCore.mainConfiguration.hasChanged()) {
BuildCraftCore.mainConfiguration.save();
}
}
}
@SubscribeEvent
public void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent event) {
if ("BuildCraft|Core".equals(event.modID)) {
reloadConfig(event.isWorldRunning ? ConfigManager.RestartRequirement.NONE : ConfigManager.RestartRequirement.WORLD);
}
}
@Mod.EventHandler
public void processIMCRequests(FMLInterModComms.IMCEvent event) {
InterModComms.processIMC(event);
} |
<<<<<<<
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
=======
/**
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
>>>>>>>
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
<<<<<<<
@SideOnly(Side.CLIENT)
@SubscribeEvent
public void handleBlockHighlight(DrawBlockHighlightEvent e) {
if (e.target.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) {
int x = MathHelper.floor_double(e.target.hitVec.xCoord);
int y = MathHelper.floor_double(e.target.hitVec.yCoord);
int z = MathHelper.floor_double(e.target.hitVec.zCoord);
BlockPos pos = new BlockPos(x, y, z);
IBlockState state = e.player.worldObj.getBlockState(pos);
Block block = state.getBlock();
if (block instanceof ICustomHighlight) {
AxisAlignedBB[] aabbs = ((ICustomHighlight) block).getBoxes(e.player.worldObj, pos, state);
Vec3 nPos = e.player.getPositionEyes(e.partialTicks).subtract(0, e.player.getEyeHeight(), 0);
// Highlight "breathing"
long millis = System.currentTimeMillis();
float expansion = (millis % 5000) / 2500F - 1;
expansion *= Math.PI * 2;
expansion = (MathHelper.sin(expansion) + 1) / 2;
expansion *= ((ICustomHighlight) block).getBreathingCoefficent();
GL11.glEnable(GL11.GL_BLEND);
OpenGlHelper.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ZERO);
GL11.glColor4f(0.0F, 0.0F, 0.0F, 0.4F);
GL11.glLineWidth(2F);
GL11.glDisable(GL11.GL_TEXTURE_2D);
GL11.glDepthMask(false);
double exp = ((ICustomHighlight) block).getExpansion();
exp += expansion / 32D;
nPos = nPos.subtract(x, y, z);
for (AxisAlignedBB aabb : aabbs) {
AxisAlignedBB changed = aabb.expand(exp, exp, exp).offset(-nPos.xCoord, -nPos.yCoord, -nPos.zCoord);
RenderGlobal.func_181561_a(changed);
}
GL11.glDepthMask(true);
GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glDisable(GL11.GL_BLEND);
e.setCanceled(true);
}
}
}
=======
@SideOnly(Side.CLIENT)
@SubscribeEvent
public void handleBlockHighlight(DrawBlockHighlightEvent e) {
if (e.target.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) {
int x = e.target.blockX;
int y = e.target.blockY;
int z = e.target.blockZ;
Block block = e.player.worldObj.getBlock(x, y, z);
if (block instanceof ICustomHighlight) {
AxisAlignedBB[] aabbs = ((ICustomHighlight) block).getBoxes(e.player.worldObj, x, y, z, e.player);
Vec3 pos = e.player.getPosition(e.partialTicks);
GL11.glEnable(GL11.GL_BLEND);
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
GL11.glColor4f(0.0F, 0.0F, 0.0F, 0.4F);
GL11.glLineWidth(2.0F);
GL11.glDisable(GL11.GL_TEXTURE_2D);
GL11.glDepthMask(false);
double exp = ((ICustomHighlight) block).getExpansion();
for (AxisAlignedBB aabb : aabbs) {
RenderGlobal.drawOutlinedBoundingBox(aabb.copy().expand(exp, exp, exp)
.offset(x, y, z)
.offset(-pos.xCoord, -pos.yCoord, -pos.zCoord), -1);
}
GL11.glDepthMask(true);
GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glDisable(GL11.GL_BLEND);
e.setCanceled(true);
}
}
}
>>>>>>>
@SideOnly(Side.CLIENT)
@SubscribeEvent
public void handleBlockHighlight(DrawBlockHighlightEvent e) {
if (e.target.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) {
int x = MathHelper.floor_double(e.target.hitVec.xCoord);
int y = MathHelper.floor_double(e.target.hitVec.yCoord);
int z = MathHelper.floor_double(e.target.hitVec.zCoord);
BlockPos pos = new BlockPos(x, y, z);
IBlockState state = e.player.worldObj.getBlockState(pos);
Block block = state.getBlock();
if (block instanceof ICustomHighlight) {
AxisAlignedBB[] aabbs = ((ICustomHighlight) block).getBoxes(e.player.worldObj, pos, state);
Vec3 nPos = e.player.getPositionEyes(e.partialTicks).subtract(0, e.player.getEyeHeight(), 0);
// Highlight "breathing"
long millis = System.currentTimeMillis();
float expansion = (millis % 5000) / 2500F - 1;
expansion *= Math.PI * 2;
expansion = (MathHelper.sin(expansion) + 1) / 2;
expansion *= ((ICustomHighlight) block).getBreathingCoefficent();
GL11.glEnable(GL11.GL_BLEND);
OpenGlHelper.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ZERO);
GL11.glColor4f(0.0F, 0.0F, 0.0F, 0.4F);
GL11.glLineWidth(2F);
GL11.glDisable(GL11.GL_TEXTURE_2D);
GL11.glDepthMask(false);
double exp = ((ICustomHighlight) block).getExpansion();
exp += expansion / 32D;
nPos = nPos.subtract(x, y, z);
for (AxisAlignedBB aabb : aabbs) {
AxisAlignedBB changed = aabb.expand(exp, exp, exp).offset(-nPos.xCoord, -nPos.yCoord, -nPos.zCoord);
RenderGlobal.func_181561_a(changed);
}
GL11.glDepthMask(true);
GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glDisable(GL11.GL_BLEND);
e.setCanceled(true);
}
}
} |
<<<<<<<
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
=======
/**
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
>>>>>>>
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
<<<<<<<
@Override
public Template getTemplate(Box box, World world, IStatementParameter[] parameters) {
int xMin = (int) box.pMin().xCoord;
int yMin = (int) box.pMin().yCoord;
int zMin = (int) box.pMin().zCoord;
=======
@Override
public Template getTemplate(Box box, World world, IStatementParameter[] parameters) {
int xMin = (int) box.pMin().x;
int yMin = (int) box.pMin().y;
int zMin = (int) box.pMin().z;
>>>>>>>
@Override
public Template getTemplate(Box box, World world, IStatementParameter[] parameters) {
int xMin = (int) box.pMin().xCoord;
int yMin = (int) box.pMin().yCoord;
int zMin = (int) box.pMin().zCoord; |
<<<<<<<
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
=======
/**
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
>>>>>>>
/**
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
<<<<<<<
private Entity target;
private int delay = 10;
public AIRobotAttack(EntityRobotBase iRobot) {
super(iRobot);
}
public AIRobotAttack(EntityRobotBase iRobot, Entity iTarget) {
this(iRobot);
target = iTarget;
}
@Override
public void preempt(AIRobot ai) {
if (ai instanceof AIRobotGotoBlock) {
// target may become null in the event of a load. In that case, just
// go to the expected location.
if (target != null && robot.getDistanceToEntity(target) <= 2.0) {
abortDelegateAI();
robot.setItemActive(true);
}
}
}
@Override
public void update() {
if (target.isDead) {
terminate();
return;
}
if (robot.getDistanceToEntity(target) > 2.0) {
startDelegateAI(new AIRobotGotoBlock(robot, Utils.getPos(target)));
robot.setItemActive(false);
return;
}
delay++;
if (delay > 20) {
delay = 0;
((EntityRobot) robot).attackTargetEntityWithCurrentItem(target);
robot.aimItemAt(Utils.getPos(target));
}
}
@Override
public void end() {
robot.setItemActive(false);
}
@Override
public void delegateAIEnded(AIRobot ai) {
if (ai instanceof AIRobotGotoBlock) {
if (!ai.success()) {
robot.unreachableEntityDetected(target);
}
terminate();
}
}
@Override
public int getEnergyCost() {
return BuilderAPI.BREAK_ENERGY * 2 / 20;
}
=======
private Entity target;
private int delay = 10;
public AIRobotAttack(EntityRobotBase iRobot) {
super(iRobot);
}
public AIRobotAttack(EntityRobotBase iRobot, Entity iTarget) {
this(iRobot);
target = iTarget;
}
@Override
public void preempt(AIRobot ai) {
if (ai instanceof AIRobotGotoBlock) {
// target may become null in the event of a load. In that case, just
// go to the expected location.
if (target != null && robot.getDistanceToEntity(target) <= 2.0) {
abortDelegateAI();
robot.setItemActive(true);
}
}
}
@Override
public void update() {
if (target == null || target.isDead) {
terminate();
return;
}
if (robot.getDistanceToEntity(target) > 2.0) {
startDelegateAI(new AIRobotGotoBlock(robot, (int) Math.floor(target.posX),
(int) Math.floor(target.posY), (int) Math.floor(target.posZ)));
robot.setItemActive(false);
return;
}
delay++;
if (delay > 20) {
delay = 0;
((EntityRobot) robot).attackTargetEntityWithCurrentItem(target);
robot.aimItemAt((int) Math.floor(target.posX), (int) Math.floor(target.posY),
(int) Math.floor(target.posZ));
}
}
@Override
public void end() {
robot.setItemActive(false);
}
@Override
public void delegateAIEnded(AIRobot ai) {
if (ai instanceof AIRobotGotoBlock) {
if (!ai.success()) {
robot.unreachableEntityDetected(target);
}
terminate();
}
}
@Override
public int getEnergyCost() {
return BuilderAPI.BREAK_ENERGY * 2 / 20;
}
>>>>>>>
private Entity target;
private int delay = 10;
public AIRobotAttack(EntityRobotBase iRobot) {
super(iRobot);
}
public AIRobotAttack(EntityRobotBase iRobot, Entity iTarget) {
this(iRobot);
target = iTarget;
}
@Override
public void preempt(AIRobot ai) {
if (ai instanceof AIRobotGotoBlock) {
// target may become null in the event of a load. In that case, just
// go to the expected location.
if (target != null && robot.getDistanceToEntity(target) <= 2.0) {
abortDelegateAI();
robot.setItemActive(true);
}
}
}
@Override
public void update() {
if (target == null || target.isDead) {
terminate();
return;
}
if (robot.getDistanceToEntity(target) > 2.0) {
startDelegateAI(new AIRobotGotoBlock(robot, Utils.getPos(target)));
robot.setItemActive(false);
return;
}
delay++;
if (delay > 20) {
delay = 0;
((EntityRobot) robot).attackTargetEntityWithCurrentItem(target);
robot.aimItemAt(Utils.getPos(target));
}
}
@Override
public void end() {
robot.setItemActive(false);
}
@Override
public void delegateAIEnded(AIRobot ai) {
if (ai instanceof AIRobotGotoBlock) {
if (!ai.success()) {
robot.unreachableEntityDetected(target);
}
terminate();
}
}
@Override
public int getEnergyCost() {
return BuilderAPI.BREAK_ENERGY * 2 / 20;
} |
<<<<<<<
import buildcraft.builders.client.render.RenderArchitect;
import buildcraft.builders.client.render.RenderQuarry;
import buildcraft.builders.container.ContainerArchitect;
import buildcraft.builders.container.ContainerQuarry;
import buildcraft.builders.gui.ContainerBlueprintLibrary;
import buildcraft.builders.gui.GuiArchitect;
import buildcraft.builders.gui.GuiBlueprintLibrary;
import buildcraft.builders.gui.GuiQuarry;
import buildcraft.builders.tile.TileArchitect_Neptune;
import buildcraft.builders.tile.TileLibrary_Neptune;
import buildcraft.builders.tile.TileQuarry;
=======
>>>>>>>
import buildcraft.builders.client.render.RenderArchitect;
import buildcraft.builders.client.render.RenderBuilder;
import buildcraft.builders.client.render.RenderQuarry;
import buildcraft.builders.container.ContainerArchitect;
import buildcraft.builders.container.ContainerQuarry;
import buildcraft.builders.gui.ContainerBlueprintLibrary;
import buildcraft.builders.gui.GuiArchitect;
import buildcraft.builders.gui.GuiBlueprintLibrary;
import buildcraft.builders.gui.GuiQuarry;
import buildcraft.builders.tile.TileArchitect_Neptune;
import buildcraft.builders.tile.TileBuilder_Neptune;
import buildcraft.builders.tile.TileLibrary_Neptune;
import buildcraft.builders.tile.TileQuarry;
<<<<<<<
=======
import buildcraft.builders.client.render.RenderArchitect;
import buildcraft.builders.client.render.RenderBuilder;
import buildcraft.builders.container.ContainerArchitect;
import buildcraft.builders.gui.ContainerBlueprintLibrary;
import buildcraft.builders.gui.GuiArchitect;
import buildcraft.builders.gui.GuiBlueprintLibrary;
import buildcraft.builders.tile.TileArchitect_Neptune;
import buildcraft.builders.tile.TileBuilder_Neptune;
import buildcraft.builders.tile.TileLibrary_Neptune;
>>>>>>>
<<<<<<<
ClientRegistry.bindTileEntitySpecialRenderer(TileQuarry.class, new RenderQuarry());
=======
ClientRegistry.bindTileEntitySpecialRenderer(TileBuilder_Neptune.class, new RenderBuilder());
>>>>>>>
ClientRegistry.bindTileEntitySpecialRenderer(TileBuilder_Neptune.class, new RenderBuilder());
ClientRegistry.bindTileEntitySpecialRenderer(TileQuarry.class, new RenderQuarry()); |
<<<<<<<
import buildcraft.builders.blueprints.BlueprintDatabase;
=======
import buildcraft.api.recipes.BuildcraftRecipes;
import buildcraft.core.recipes.RefineryRecipeManager;
>>>>>>>
import buildcraft.api.recipes.BuildcraftRecipes;
import buildcraft.builders.blueprints.BlueprintDatabase;
<<<<<<<
@SideOnly(Side.CLIENT)
public static IIconProvider iconProvider;
=======
@SideOnly(Side.CLIENT)
public static IIconProvider iconProvider;
>>>>>>>
@SideOnly(Side.CLIENT)
public static IIconProvider iconProvider;
<<<<<<<
=======
>>>>>>>
<<<<<<<
BlueprintDatabase.init(evt.getModConfigurationDirectory());
=======
BuildcraftRecipes.assemblyTable = AssemblyRecipeManager.INSTANCE;
BuildcraftRecipes.refinery = RefineryRecipeManager.INSTANCE;
>>>>>>>
BlueprintDatabase.init(evt.getModConfigurationDirectory());
BuildcraftRecipes.assemblyTable = AssemblyRecipeManager.INSTANCE;
BuildcraftRecipes.refinery = RefineryRecipeManager.INSTANCE; |
<<<<<<<
=======
import io.netty.channel.SimpleChannelInboundHandler;
import io.netty.channel.ChannelHandler.Sharable;
>>>>>>>
import io.netty.channel.SimpleChannelInboundHandler;
<<<<<<<
=======
import cpw.mods.fml.common.network.NetworkRegistry;
>>>>>>> |
<<<<<<<
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
=======
/**
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
>>>>>>>
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
<<<<<<<
/** Deactivate constructor */
private RenderBox() {}
public static void doRender(World world, TextureManager t, ResourceLocation texture, Box box) {
GL11.glPushMatrix();
GL11.glDisable(GL11.GL_LIGHTING);
box.createLaserData();
for (LaserData l : box.lasersData) {
l.update();
GL11.glPushMatrix();
GL11.glTranslated(0.5F, 0.5F, 0.5F);
RenderLaser.doRenderLaser(world, t, l, texture);
GL11.glPopMatrix();
}
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glPopMatrix();
}
=======
/**
* Deactivate constructor
*/
private RenderBox() {
}
public static void doRender(TextureManager t, ResourceLocation texture, Box box) {
GL11.glPushMatrix();
GL11.glDisable(GL11.GL_LIGHTING);
box.createLaserData();
for (LaserData l : box.lasersData) {
l.update();
GL11.glPushMatrix();
GL11.glTranslated(0.5F, 0.5F, 0.5F);
RenderLaser.doRenderLaser(t, l, texture);
GL11.glPopMatrix();
}
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glPopMatrix();
}
>>>>>>>
/** Deactivate constructor */
private RenderBox() {}
public static void doRender(World world, TextureManager t, ResourceLocation texture, Box box) {
GL11.glPushMatrix();
GL11.glDisable(GL11.GL_LIGHTING);
box.createLaserData();
for (LaserData l : box.lasersData) {
l.update();
GL11.glPushMatrix();
GL11.glTranslated(0.5F, 0.5F, 0.5F);
RenderLaser.doRenderLaser(world, t, l, texture);
GL11.glPopMatrix();
}
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glPopMatrix();
} |
<<<<<<<
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
=======
/**
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
>>>>>>>
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */ |
<<<<<<<
@PipeEventPriority(priority = -100)
public void eventHandler(PipeEventItem.FindDest event) {
IPipeTile container = event.pipe.getTile();
LinkedList<EnumFacing> correctColored = new LinkedList<EnumFacing>();
LinkedList<EnumFacing> notColored = new LinkedList<EnumFacing>();
boolean encounteredColor = false;
int myColor = event.item.color == null ? -1 : event.item.color.ordinal();
for (EnumFacing dir : event.destinations) {
int sideColor = -1;
// Get the side's color
// (1/2) From this pipe's outpost
PipePluggable pluggable = container.getPipePluggable(dir);
if (pluggable != null && pluggable instanceof LensPluggable && ((LensPluggable) pluggable).isFilter) {
sideColor = ((LensPluggable) pluggable).color;
}
// (2/2) From the other pipe's outpost
IPipe otherPipe = container.getNeighborPipe(dir);
if (otherPipe != null && otherPipe.getTile() != null) {
IPipeTile otherContainer = otherPipe.getTile();
pluggable = otherContainer.getPipePluggable(dir.getOpposite());
if (pluggable != null && pluggable instanceof LensPluggable && ((LensPluggable) pluggable).isFilter) {
int otherColor = ((LensPluggable) pluggable).color;
// Check if colors conflict - if so, the side is unpassable
if (sideColor >= 0 && otherColor != sideColor) {
continue;
} else {
sideColor = otherColor;
}
}
}
if (myColor == sideColor) {
encounteredColor = true;
correctColored.add(dir);
}
if (sideColor == -1) {
notColored.add(dir);
}
}
event.destinations.clear();
event.destinations.addAll(encounteredColor ? correctColored : notColored);
}
=======
@PipeEventPriority(priority = -100)
public void eventHandler(PipeEventItem.FindDest event) {
IPipeTile container = event.pipe.getTile();
LinkedList<ForgeDirection> correctColored = new LinkedList<ForgeDirection>();
LinkedList<ForgeDirection> notColored = new LinkedList<ForgeDirection>();
boolean encounteredColor = false;
int myColor = event.item.color == null ? -1 : event.item.color.ordinal();
for (ForgeDirection dir : event.destinations) {
int sideColor = -1;
int sideLensColor = -1;
// Get the side's color
// (1/2) From this pipe's outpost
PipePluggable pluggable = container.getPipePluggable(dir);
if (pluggable != null && pluggable instanceof LensPluggable) {
if (((LensPluggable) pluggable).isFilter) {
sideColor = ((LensPluggable) pluggable).color;
} else {
sideLensColor = ((LensPluggable) pluggable).color;
}
}
// (2/2) From the other pipe's outpost
IPipe otherPipe = container.getNeighborPipe(dir);
if (otherPipe != null && otherPipe.getTile() != null) {
IPipeTile otherContainer = otherPipe.getTile();
pluggable = otherContainer.getPipePluggable(dir.getOpposite());
if (pluggable != null && pluggable instanceof LensPluggable && ((LensPluggable) pluggable).isFilter) {
int otherColor = ((LensPluggable) pluggable).color;
if (sideColor >= 0 && otherColor != sideColor) {
// Filter colors conflict - the side is unpassable
continue;
} else if (sideLensColor >= 0) {
// The closer lens color differs from the further away filter color - the side is unpassable OR treated as colorless
if (sideLensColor == otherColor) {
sideColor = -1;
} else {
continue;
}
} else {
sideColor = otherColor;
}
}
}
if (myColor == sideColor) {
encounteredColor = true;
correctColored.add(dir);
}
if (sideColor == -1) {
notColored.add(dir);
}
}
event.destinations.clear();
event.destinations.addAll(encounteredColor ? correctColored : notColored);
}
>>>>>>>
@PipeEventPriority(priority = -100)
public void eventHandler(PipeEventItem.FindDest event) {
IPipeTile container = event.pipe.getTile();
LinkedList<EnumFacing> correctColored = new LinkedList<EnumFacing>();
LinkedList<EnumFacing> notColored = new LinkedList<EnumFacing>();
boolean encounteredColor = false;
int myColor = event.item.color == null ? -1 : event.item.color.ordinal();
for (EnumFacing dir : event.destinations) {
int sideColor = -1;
int sideLensColor = -1;
// Get the side's color
// (1/2) From this pipe's outpost
PipePluggable pluggable = container.getPipePluggable(dir);
if (pluggable != null && pluggable instanceof LensPluggable) {
if (((LensPluggable) pluggable).isFilter) {
sideColor = ((LensPluggable) pluggable).color;
} else {
sideLensColor = ((LensPluggable) pluggable).color;
}
}
// (2/2) From the other pipe's outpost
IPipe otherPipe = container.getNeighborPipe(dir);
if (otherPipe != null && otherPipe.getTile() != null) {
IPipeTile otherContainer = otherPipe.getTile();
pluggable = otherContainer.getPipePluggable(dir.getOpposite());
if (pluggable != null && pluggable instanceof LensPluggable && ((LensPluggable) pluggable).isFilter) {
int otherColor = ((LensPluggable) pluggable).color;
if (sideColor >= 0 && otherColor != sideColor) {
// Filter colors conflict - the side is unpassable
continue;
} else if (sideLensColor >= 0) {
// The closer lens color differs from the further away filter color - the side is unpassable OR treated as colorless
if (sideLensColor == otherColor) {
sideColor = -1;
} else {
continue;
}
} else {
sideColor = otherColor;
}
}
}
if (myColor == sideColor) {
encounteredColor = true;
correctColored.add(dir);
}
if (sideColor == -1) {
notColored.add(dir);
}
}
event.destinations.clear();
event.destinations.addAll(encounteredColor ? correctColored : notColored);
} |
<<<<<<<
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
=======
/**
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
>>>>>>>
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
<<<<<<<
import net.minecraft.util.EnumFacing;
=======
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraftforge.common.util.ForgeDirection;
>>>>>>>
import net.minecraft.util.EnumFacing;
<<<<<<<
public static class Neighbor {
public TileEntity tile;
public EnumPipePart side;
public Neighbor(TileEntity tile, EnumPipePart side) {
this.tile = tile;
this.side = side;
}
}
private final boolean high;
public TriggerEnergy(boolean high) {
super("buildcraft:energyStored" + (high ? "high" : "low"));
this.setBuildCraftLocation("core", "triggers/trigger_energy_storage_" + (high ? "high" : "low"));
this.high = high;
}
@Override
public String getDescription() {
return StringUtils.localize("gate.trigger.machine.energyStored." + (high ? "high" : "low"));
}
private boolean isTriggeredEnergyHandler(IEnergyConnection connection, EnumPipePart part) {
int energyStored, energyMaxStored;
EnumFacing side = part.face;
if (connection instanceof IEnergyHandler) {
energyStored = ((IEnergyHandler) connection).getEnergyStored(side);
energyMaxStored = ((IEnergyHandler) connection).getMaxEnergyStored(side);
} else if (connection instanceof IEnergyProvider) {
energyStored = ((IEnergyProvider) connection).getEnergyStored(side);
energyMaxStored = ((IEnergyProvider) connection).getMaxEnergyStored(side);
} else if (connection instanceof IEnergyReceiver) {
energyStored = ((IEnergyReceiver) connection).getEnergyStored(side);
energyMaxStored = ((IEnergyReceiver) connection).getMaxEnergyStored(side);
} else {
return false;
}
if (energyMaxStored > 0) {
float level = energyStored / energyMaxStored;
if (high) {
return level > 0.95F;
} else {
return level < 0.05F;
}
}
return false;
}
protected static boolean isTriggered(Object tile, EnumPipePart side) {
if (tile instanceof IEnergyConnection) {
return ((IEnergyConnection) tile).canConnectEnergy(side.opposite().face);
}
return false;
}
protected boolean isActive(Object tile, EnumPipePart side) {
if (isTriggered(tile, side)) {
return isTriggeredEnergyHandler((IEnergyConnection) tile, side.opposite());
}
return false;
}
public static boolean isTriggeringPipe(TileEntity tile) {
if (tile instanceof IPipeTile) {
IPipeTile pipeTile = (IPipeTile) tile;
if (pipeTile.getPipeType() == IPipeTile.PipeType.POWER && pipeTile.getPipe() instanceof IEnergyHandler) {
return true;
}
}
return false;
}
// @Override
// @SideOnly(Side.CLIENT)
// public void registerIcons(TextureAtlasSpriteRegister iconRegister) {
// icon = iconRegister.registerIcon("buildcraftcore:triggers/trigger_energy_storage_" + (high ? "high" : "low"));
// }
@Override
public boolean isTriggerActive(IStatementContainer source, IStatementParameter[] parameters) {
// Internal check
if (isTriggeringPipe(source.getTile())) {
return isActive(((IPipeTile) source.getTile()).getPipe(), null);
}
Neighbor triggeringNeighbor = getTriggeringNeighbor(source.getTile());
if (triggeringNeighbor != null) {
return isActive(triggeringNeighbor.tile, triggeringNeighbor.side);
}
return false;
}
public static Neighbor getTriggeringNeighbor(TileEntity parent) {
if (parent instanceof IPipeTile) {
for (EnumPipePart side : EnumPipePart.validFaces()) {
TileEntity tile = ((IPipeTile) parent).getNeighborTile(side.face);
if (tile != null && isTriggered(tile, side)) {
return new Neighbor(tile, side);
}
}
} else {
for (EnumPipePart side : EnumPipePart.validFaces()) {
TileEntity tile = parent.getWorld().getTileEntity(parent.getPos().offset(side.face));
if (tile != null && isTriggered(tile, side)) {
return new Neighbor(tile, side);
}
}
}
return null;
}
=======
public static class Neighbor {
public TileEntity tile;
public ForgeDirection side;
public Neighbor(TileEntity tile, ForgeDirection side) {
this.tile = tile;
this.side = side;
}
}
private final boolean high;
public TriggerEnergy(boolean high) {
super("buildcraft:energyStored" + (high ? "high" : "low"));
this.high = high;
}
@Override
public String getDescription() {
return StringUtils.localize("gate.trigger.machine.energyStored." + (high ? "high" : "low"));
}
private boolean isTriggeredEnergyHandler(IEnergyConnection connection, ForgeDirection side) {
int energyStored, energyMaxStored;
if (connection instanceof IEnergyHandler) {
energyStored = ((IEnergyHandler) connection).getEnergyStored(side);
energyMaxStored = ((IEnergyHandler) connection).getMaxEnergyStored(side);
} else if (connection instanceof IEnergyProvider) {
energyStored = ((IEnergyProvider) connection).getEnergyStored(side);
energyMaxStored = ((IEnergyProvider) connection).getMaxEnergyStored(side);
} else if (connection instanceof IEnergyReceiver) {
energyStored = ((IEnergyReceiver) connection).getEnergyStored(side);
energyMaxStored = ((IEnergyReceiver) connection).getMaxEnergyStored(side);
} else {
return false;
}
if (energyMaxStored > 0) {
float level = (float) energyStored / (float) energyMaxStored;
if (high) {
return level > 0.95F;
} else {
return level < 0.05F;
}
}
return false;
}
protected static boolean isTriggered(Object tile, ForgeDirection side) {
return (tile instanceof IEnergyHandler || tile instanceof IEnergyProvider || tile instanceof IEnergyReceiver)
&& (((IEnergyConnection) tile).canConnectEnergy(side.getOpposite()));
}
protected boolean isActive(Object tile, ForgeDirection side) {
if (isTriggered(tile, side)) {
return isTriggeredEnergyHandler((IEnergyConnection) tile, side.getOpposite());
}
return false;
}
public static boolean isTriggeringPipe(TileEntity tile) {
if (tile instanceof IPipeTile) {
IPipeTile pipeTile = (IPipeTile) tile;
if (pipeTile.getPipeType() == IPipeTile.PipeType.POWER && pipeTile.getPipe() instanceof IEnergyHandler) {
return true;
}
}
return false;
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister iconRegister) {
icon = iconRegister.registerIcon("buildcraftcore:triggers/trigger_energy_storage_" + (high ? "high" : "low"));
}
@Override
public boolean isTriggerActive(IStatementContainer source, IStatementParameter[] parameters) {
// Internal check
if (isTriggeringPipe(source.getTile())) {
return isActive(((IPipeTile) source.getTile()).getPipe(), ForgeDirection.UNKNOWN);
}
Neighbor triggeringNeighbor = getTriggeringNeighbor(source.getTile());
if (triggeringNeighbor != null) {
return isActive(triggeringNeighbor.tile, triggeringNeighbor.side);
}
return false;
}
public static Neighbor getTriggeringNeighbor(TileEntity parent) {
if (parent instanceof IPipeTile) {
for (ForgeDirection side : ForgeDirection.VALID_DIRECTIONS) {
TileEntity tile = ((IPipeTile) parent).getNeighborTile(side);
if (tile != null && isTriggered(tile, side)) {
return new Neighbor(tile, side);
}
}
} else {
for (ForgeDirection side : ForgeDirection.VALID_DIRECTIONS) {
TileEntity tile = parent.getWorldObj().getTileEntity(
parent.xCoord + side.offsetX,
parent.yCoord + side.offsetY,
parent.zCoord + side.offsetZ
);
if (tile != null && isTriggered(tile, side)) {
return new Neighbor(tile, side);
}
}
}
return null;
}
>>>>>>>
public static class Neighbor {
public TileEntity tile;
public EnumPipePart side;
public Neighbor(TileEntity tile, EnumPipePart side) {
this.tile = tile;
this.side = side;
}
}
private final boolean high;
public TriggerEnergy(boolean high) {
super("buildcraft:energyStored" + (high ? "high" : "low"));
this.setBuildCraftLocation("core", "triggers/trigger_energy_storage_" + (high ? "high" : "low"));
this.high = high;
}
@Override
public String getDescription() {
return StringUtils.localize("gate.trigger.machine.energyStored." + (high ? "high" : "low"));
}
private boolean isTriggeredEnergyHandler(IEnergyConnection connection, EnumPipePart part) {
int energyStored, energyMaxStored;
EnumFacing side = part.face;
if (connection instanceof IEnergyHandler) {
energyStored = ((IEnergyHandler) connection).getEnergyStored(side);
energyMaxStored = ((IEnergyHandler) connection).getMaxEnergyStored(side);
} else if (connection instanceof IEnergyProvider) {
energyStored = ((IEnergyProvider) connection).getEnergyStored(side);
energyMaxStored = ((IEnergyProvider) connection).getMaxEnergyStored(side);
} else if (connection instanceof IEnergyReceiver) {
energyStored = ((IEnergyReceiver) connection).getEnergyStored(side);
energyMaxStored = ((IEnergyReceiver) connection).getMaxEnergyStored(side);
} else {
return false;
}
if (energyMaxStored > 0) {
float level = (float) energyStored / (float) energyMaxStored;
if (high) {
return level > 0.95F;
} else {
return level < 0.05F;
}
}
return false;
}
protected static boolean isTriggered(Object tile, EnumPipePart side) {
if (tile instanceof IEnergyConnection) {
return ((IEnergyConnection) tile).canConnectEnergy(side.opposite().face);
}
return false;
}
protected boolean isActive(Object tile, EnumPipePart side) {
if (isTriggered(tile, side)) {
return isTriggeredEnergyHandler((IEnergyConnection) tile, side.opposite());
}
return false;
}
public static boolean isTriggeringPipe(TileEntity tile) {
if (tile instanceof IPipeTile) {
IPipeTile pipeTile = (IPipeTile) tile;
if (pipeTile.getPipeType() == IPipeTile.PipeType.POWER && pipeTile.getPipe() instanceof IEnergyHandler) {
return true;
}
}
return false;
}
// @Override
// @SideOnly(Side.CLIENT)
// public void registerIcons(TextureAtlasSpriteRegister iconRegister) {
// icon = iconRegister.registerIcon("buildcraftcore:triggers/trigger_energy_storage_" + (high ? "high" : "low"));
// }
@Override
public boolean isTriggerActive(IStatementContainer source, IStatementParameter[] parameters) {
// Internal check
if (isTriggeringPipe(source.getTile())) {
return isActive(((IPipeTile) source.getTile()).getPipe(), null);
}
Neighbor triggeringNeighbor = getTriggeringNeighbor(source.getTile());
if (triggeringNeighbor != null) {
return isActive(triggeringNeighbor.tile, triggeringNeighbor.side);
}
return false;
}
public static Neighbor getTriggeringNeighbor(TileEntity parent) {
if (parent instanceof IPipeTile) {
for (EnumPipePart side : EnumPipePart.validFaces()) {
TileEntity tile = ((IPipeTile) parent).getNeighborTile(side.face);
if (tile != null && isTriggered(tile, side)) {
return new Neighbor(tile, side);
}
}
} else {
for (EnumPipePart side : EnumPipePart.validFaces()) {
TileEntity tile = parent.getWorld().getTileEntity(parent.getPos().offset(side.face));
if (tile != null && isTriggered(tile, side)) {
return new Neighbor(tile, side);
}
}
}
return null;
} |
<<<<<<<
private boolean isDistillable(FluidStack fluid) {
IRefineryRecipeManager manager = BuildcraftRecipeRegistry.refineryRecipes;
return manager.getDistillationRegistry().getRecipeForInput(fluid) != null;
}
=======
>>>>>>>
<<<<<<<
currentRecipe = BuildcraftRecipeRegistry.refineryRecipes.getDistillationRegistry().getRecipeForInput(tankIn
.getFluid());
=======
currentRecipe =
BuildcraftRecipeRegistry.refineryRecipes.getDistilationRegistry().getRecipeForInput(tankIn.getFluid());
>>>>>>>
currentRecipe =
BuildcraftRecipeRegistry.refineryRecipes.getDistillationRegistry().getRecipeForInput(tankIn.getFluid()); |
<<<<<<<
import buildcraft.api.core.BCLog;
=======
import java.io.File;
import net.minecraft.init.Blocks;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.common.network.NetworkRegistry;
import net.minecraftforge.oredict.OreDictionary;
>>>>>>>
<<<<<<<
import buildcraft.lib.registry.RegistryHelper;
import net.minecraft.init.Blocks;
import net.minecraft.server.MinecraftServer;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.common.FMLCommonHandler;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.common.event.FMLServerStartedEvent;
import net.minecraftforge.fml.common.network.NetworkRegistry;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.oredict.OreDictionary;
import java.io.File;
import java.util.Arrays;
//@formatter:off
@Mod(modid = BCCore.MODID,
name = "BuildCraft Core",
version = BCLib.VERSION,
acceptedMinecraftVersions = "[1.10.2]",
dependencies = "required-after:buildcraftlib",
guiFactory = "buildcraft.core.config.ConfigManager")
//@formatter:on
=======
import buildcraft.lib.registry.CreativeTabManager.CreativeTabBC;
@Mod(//
modid = BCCore.MODID,//
name = "BuildCraft Core",//
version = BCLib.VERSION,//
dependencies = "required-after:buildcraftlib@[" + BCLib.VERSION + "]",//
acceptedMinecraftVersions = "[1.11]",//
guiFactory = "buildcraft.core.client.ConfigGuiFactoryBC"//
)
>>>>>>>
import buildcraft.lib.registry.CreativeTabManager.CreativeTabBC;
import net.minecraft.init.Blocks;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.common.network.NetworkRegistry;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.oredict.OreDictionary;
import java.io.File;
@Mod(//
modid = BCCore.MODID,//
name = "BuildCraft Core",//
version = BCLib.VERSION,//
dependencies = "required-after:buildcraftlib@[" + BCLib.VERSION + "]",//
acceptedMinecraftVersions = "[1.11]",//
guiFactory = "buildcraft.core.client.ConfigGuiFactoryBC"//
) |
<<<<<<<
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
=======
/**
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
>>>>>>>
/**
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
<<<<<<<
public SchematicEntity schematic;
/** This value is set by builders to identify in which order entities are being built. It can be used later for
* unique identification within a blueprint. */
public int sequenceNumber;
@Override
public void writeToWorld(IBuilderContext context) {
schematic.writeToWorld(context);
}
@Override
public Vec3 getDestination() {
NBTTagList nbttaglist = schematic.entityNBT.getTagList("Pos", 6);
Vec3 pos = new Vec3(nbttaglist.getDoubleAt(0), nbttaglist.getDoubleAt(1), nbttaglist.getDoubleAt(2));
return pos;
}
@Override
public LinkedList<ItemStack> getRequirements(IBuilderContext context) {
LinkedList<ItemStack> results = new LinkedList<ItemStack>();
Collections.addAll(results, schematic.storedRequirements);
return results;
}
@Override
public SchematicEntity getSchematic() {
return schematic;
}
@Override
public boolean isAlreadyBuilt(IBuilderContext context) {
return schematic.isAlreadyBuilt(context);
}
@Override
public void writeToNBT(NBTTagCompound nbt, MappingRegistry registry) {
NBTTagCompound schematicNBT = new NBTTagCompound();
SchematicFactory.getFactory(schematic.getClass()).saveSchematicToWorldNBT(schematicNBT, schematic, registry);
nbt.setTag("schematic", schematicNBT);
}
@Override
public void readFromNBT(NBTTagCompound nbt, MappingRegistry registry) throws MappingNotFoundException {
schematic = (SchematicEntity) SchematicFactory.createSchematicFromWorldNBT(nbt.getCompoundTag("schematic"), registry);
}
@Override
public int getEnergyRequirement() {
return schematic.getEnergyRequirement(stackConsumed);
}
@Override
public int buildTime() {
return schematic.buildTime();
}
=======
public SchematicEntity schematic;
/**
* This value is set by builders to identify in which order entities are
* being built. It can be used later for unique identification within a
* blueprint.
*/
public int sequenceNumber;
@Override
public boolean writeToWorld(IBuilderContext context) {
schematic.writeToWorld(context);
return true;
}
@Override
public Position getDestination() {
NBTTagList nbttaglist = schematic.entityNBT.getTagList("Pos", 6);
Position pos = new Position(nbttaglist.func_150309_d(0),
nbttaglist.func_150309_d(1), nbttaglist.func_150309_d(2));
return pos;
}
@Override
public LinkedList<ItemStack> getRequirements(IBuilderContext context) {
LinkedList<ItemStack> results = new LinkedList<ItemStack>();
Collections.addAll(results, schematic.storedRequirements);
return results;
}
@Override
public SchematicEntity getSchematic() {
return schematic;
}
@Override
public boolean isAlreadyBuilt(IBuilderContext context) {
return schematic.isAlreadyBuilt(context);
}
@Override
public void writeToNBT(NBTTagCompound nbt, MappingRegistry registry) {
NBTTagCompound schematicNBT = new NBTTagCompound();
SchematicFactory.getFactory(schematic.getClass())
.saveSchematicToWorldNBT(schematicNBT, schematic, registry);
nbt.setTag("schematic", schematicNBT);
}
@Override
public void readFromNBT(NBTTagCompound nbt, MappingRegistry registry) throws MappingNotFoundException {
schematic = (SchematicEntity) SchematicFactory
.createSchematicFromWorldNBT(nbt.getCompoundTag("schematic"), registry);
}
@Override
public int getEnergyRequirement() {
return schematic.getEnergyRequirement(stackConsumed);
}
@Override
public int buildTime() {
return schematic.buildTime();
}
>>>>>>>
public SchematicEntity schematic;
/** This value is set by builders to identify in which order entities are being built. It can be used later for
* unique identification within a blueprint. */
public int sequenceNumber;
@Override
public boolean writeToWorld(IBuilderContext context) {
schematic.writeToWorld(context);
return true;
}
@Override
public Vec3 getDestination() {
NBTTagList nbttaglist = schematic.entityNBT.getTagList("Pos", 6);
Vec3 pos = new Vec3(nbttaglist.getDoubleAt(0), nbttaglist.getDoubleAt(1), nbttaglist.getDoubleAt(2));
return pos;
}
@Override
public LinkedList<ItemStack> getRequirements(IBuilderContext context) {
LinkedList<ItemStack> results = new LinkedList<ItemStack>();
Collections.addAll(results, schematic.storedRequirements);
return results;
}
@Override
public SchematicEntity getSchematic() {
return schematic;
}
@Override
public boolean isAlreadyBuilt(IBuilderContext context) {
return schematic.isAlreadyBuilt(context);
}
@Override
public void writeToNBT(NBTTagCompound nbt, MappingRegistry registry) {
NBTTagCompound schematicNBT = new NBTTagCompound();
SchematicFactory.getFactory(schematic.getClass()).saveSchematicToWorldNBT(schematicNBT, schematic, registry);
nbt.setTag("schematic", schematicNBT);
}
@Override
public void readFromNBT(NBTTagCompound nbt, MappingRegistry registry) throws MappingNotFoundException {
schematic = (SchematicEntity) SchematicFactory.createSchematicFromWorldNBT(nbt.getCompoundTag("schematic"), registry);
}
@Override
public int getEnergyRequirement() {
return schematic.getEnergyRequirement(stackConsumed);
}
@Override
public int buildTime() {
return schematic.buildTime();
} |
<<<<<<<
@Issue("JENKINS-57717")
@Test
public void runInPodWithShowRawYamlFalse() throws Exception {
r.assertBuildStatusSuccess(r.waitForCompletion(b));
r.assertLogNotContains("value: container-env-var-value", b);
}
=======
@Test
public void computerCantBeConfigured() throws Exception {
r.jenkins.setSecurityRealm(r.createDummySecurityRealm());
r.jenkins.setAuthorizationStrategy(new MockAuthorizationStrategy().
grant(Jenkins.ADMINISTER).everywhere().to("admin"));
SemaphoreStep.waitForStart("pod/1", b);
Optional<KubernetesSlave> optionalNode = r.jenkins.getNodes().stream().filter(KubernetesSlave.class::isInstance).map(KubernetesSlave.class::cast).findAny();
assertTrue(optionalNode.isPresent());
KubernetesSlave node = optionalNode.get();
JenkinsRule.WebClient wc = r.createWebClient().login("admin");
wc.getOptions().setPrintContentOnFailingStatusCode(false);
HtmlPage nodeIndex = wc.getPage(node);
assertNotXPath(nodeIndex, "//*[text() = 'configure']");
wc.assertFails(node.toComputer().getUrl()+"configure", 403);
SemaphoreStep.success("pod/1", null);
}
private void assertNotXPath(HtmlPage page, String xpath) {
HtmlElement documentElement = page.getDocumentElement();
assertNull("There should not be an object that matches XPath:" + xpath, DomNodeUtil.selectSingleNode(documentElement, xpath));
}
>>>>>>>
@Test
public void computerCantBeConfigured() throws Exception {
r.jenkins.setSecurityRealm(r.createDummySecurityRealm());
r.jenkins.setAuthorizationStrategy(new MockAuthorizationStrategy().
grant(Jenkins.ADMINISTER).everywhere().to("admin"));
SemaphoreStep.waitForStart("pod/1", b);
Optional<KubernetesSlave> optionalNode = r.jenkins.getNodes().stream().filter(KubernetesSlave.class::isInstance).map(KubernetesSlave.class::cast).findAny();
assertTrue(optionalNode.isPresent());
KubernetesSlave node = optionalNode.get();
JenkinsRule.WebClient wc = r.createWebClient().login("admin");
wc.getOptions().setPrintContentOnFailingStatusCode(false);
HtmlPage nodeIndex = wc.getPage(node);
assertNotXPath(nodeIndex, "//*[text() = 'configure']");
wc.assertFails(node.toComputer().getUrl()+"configure", 403);
SemaphoreStep.success("pod/1", null);
}
private void assertNotXPath(HtmlPage page, String xpath) {
HtmlElement documentElement = page.getDocumentElement();
assertNull("There should not be an object that matches XPath:" + xpath, DomNodeUtil.selectSingleNode(documentElement, xpath));
}
@Issue("JENKINS-57717")
@Test
public void runInPodWithShowRawYamlFalse() throws Exception {
r.assertBuildStatusSuccess(r.waitForCompletion(b));
r.assertLogNotContains("value: container-env-var-value", b);
} |
<<<<<<<
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
=======
/**
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
>>>>>>>
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
<<<<<<<
// TODO: Clean this when world unloaded
public static Set<Integer> targettedItems = new HashSet<Integer>();
=======
public static Set<Integer> targettedItems = new HashSet<Integer>();
>>>>>>>
public static Set<Integer> targettedItems = new HashSet<Integer>(); |
<<<<<<<
import java.io.File;
=======
>>>>>>>
import java.io.File;
<<<<<<<
templateItem = new ItemBlueprintTemplate(templateItemId.getInt());
=======
templateItem = new ItemBptTemplate();
>>>>>>>
templateItem = new ItemBlueprintTemplate();
<<<<<<<
blueprintItem = new ItemBlueprintStandard(blueprintItemId.getInt());
=======
blueprintItem = new ItemBptBluePrint();
>>>>>>>
blueprintItem = new ItemBlueprintStandard(); |
<<<<<<<
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
=======
/**
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
>>>>>>>
/**
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
<<<<<<<
private static final Map<String, BCCreativeTab> tabs = new HashMap<String, BCCreativeTab>();
private final String name;
private ItemStack icon;
public BCCreativeTab(String name) {
super("buildcraft." + name);
this.name = name;
tabs.put(name, this);
}
public static BCCreativeTab get(String name) {
System.out.println(name + " = " + tabs.get(name));
return tabs.get(name);
}
public void setIcon(ItemStack icon) {
this.icon = icon;
}
private ItemStack getItem() {
if (icon == null || icon.getItem() == null) {
return new ItemStack(Blocks.brick_block, 1);
}
return icon;
}
@Override
public ItemStack getIconItemStack() {
return getItem();
}
@Override
public Item getTabIconItem() {
return getItem().getItem();
}
=======
private static final Map<String, BCCreativeTab> tabs = new HashMap<String, BCCreativeTab>();
private ItemStack icon;
public BCCreativeTab(String name) {
super("buildcraft." + name);
tabs.put(name, this);
}
public static BCCreativeTab get(String name) {
return tabs.get(name);
}
public void setIcon(ItemStack icon) {
this.icon = icon;
}
private ItemStack getItem() {
if (icon == null || icon.getItem() == null) {
return new ItemStack(Blocks.brick_block, 1);
}
return icon;
}
@Override
public ItemStack getIconItemStack() {
return getItem();
}
@Override
public Item getTabIconItem() {
return getItem().getItem();
}
>>>>>>>
private static final Map<String, BCCreativeTab> tabs = new HashMap<String, BCCreativeTab>();
private ItemStack icon;
public BCCreativeTab(String name) {
super("buildcraft." + name);
tabs.put(name, this);
}
public static BCCreativeTab get(String name) {
System.out.println(name + " = " + tabs.get(name));
return tabs.get(name);
}
public void setIcon(ItemStack icon) {
this.icon = icon;
}
private ItemStack getItem() {
if (icon == null || icon.getItem() == null) {
return new ItemStack(Blocks.brick_block, 1);
}
return icon;
}
@Override
public ItemStack getIconItemStack() {
return getItem();
}
@Override
public Item getTabIconItem() {
return getItem().getItem();
} |
<<<<<<<
=======
import cpw.mods.fml.common.event.FMLInterModComms.IMCEvent;
import cpw.mods.fml.common.event.FMLInterModComms.IMCMessage;
>>>>>>> |
<<<<<<<
import java.io.IOException;
import java.util.List;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.ITickable;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
=======
import java.io.IOException;
import java.util.List;
import javax.annotation.Nonnull;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.ITickable;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
>>>>>>>
import java.io.IOException;
import java.util.List;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.ITickable;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
<<<<<<<
import buildcraft.api.tiles.ITileAreaProvider;
import buildcraft.api.tiles.TilesAPI;
=======
>>>>>>>
import buildcraft.api.tiles.ITileAreaProvider;
import buildcraft.api.tiles.TilesAPI;
<<<<<<<
import buildcraft.lib.misc.MessageUtil;
import buildcraft.lib.misc.data.Box;
=======
import buildcraft.lib.misc.BoundingBoxUtil;
import buildcraft.lib.misc.NBTUtilBC;
>>>>>>>
import buildcraft.lib.misc.data.Box;
<<<<<<<
import buildcraft.builders.BCBuildersBlocks;
import buildcraft.builders.filling.Filling;
import buildcraft.builders.snapshot.ITileForTemplateBuilder;
import buildcraft.builders.snapshot.Template;
import buildcraft.builders.snapshot.Template.BuildingInfo;
import buildcraft.builders.snapshot.TemplateBuilder;
import buildcraft.core.BCCoreStatements;
import buildcraft.core.marker.volume.VolumeBox;
import buildcraft.core.marker.volume.WorldSavedDataVolumeBoxes;
=======
import buildcraft.builders.addon.AddonFillingPlanner;
import buildcraft.builders.filling.Filling;
import buildcraft.builders.snapshot.ITileForTemplateBuilder;
import buildcraft.builders.snapshot.SnapshotBuilder;
import buildcraft.builders.snapshot.Template;
import buildcraft.builders.snapshot.TemplateBuilder;
import buildcraft.core.marker.volume.EnumAddonSlot;
import buildcraft.core.marker.volume.Lock;
import buildcraft.core.marker.volume.VolumeBox;
import buildcraft.core.marker.volume.WorldSavedDataVolumeBoxes;
>>>>>>>
import buildcraft.builders.BCBuildersBlocks;
import buildcraft.builders.filling.Filling;
import buildcraft.builders.snapshot.ITileForTemplateBuilder;
import buildcraft.builders.snapshot.SnapshotBuilder;
import buildcraft.builders.snapshot.Template;
import buildcraft.builders.snapshot.Template.BuildingInfo;
import buildcraft.builders.snapshot.TemplateBuilder;
import buildcraft.core.BCCoreStatements;
import buildcraft.core.marker.volume.VolumeBox;
import buildcraft.core.marker.volume.WorldSavedDataVolumeBoxes;
<<<<<<<
public final ItemHandlerSimple invResources;
=======
public final ItemHandlerSimple invResources =
itemManager.addInvHandler(
"resources",
new ItemHandlerSimple(
27,
(slot, stack) -> Filling.INSTANCE.getItemBlocks().contains(stack.getItem()),
StackInsertionFunction.getDefaultInserter(),
this::onSlotChange
),
EnumAccess.INSERT,
EnumPipePart.VALUES
);
>>>>>>>
public final ItemHandlerSimple invResources; |
<<<<<<<
import cpw.mods.fml.common.network.NetworkRegistry;
=======
>>>>>>>
import cpw.mods.fml.common.network.NetworkRegistry;
<<<<<<<
=======
import cpw.mods.fml.common.network.NetworkRegistry;
>>>>>>> |
<<<<<<<
worldObj.spawnEntityInWorld(new EntityMechanicalArm(worldObj, box.xMin + Utils.pipeMaxPos, yCoord + blueprintBuilder.blueprint.sizeY - 1
+ Utils.pipeMinPos, box.zMin + Utils.pipeMaxPos, blueprintBuilder.blueprint.sizeX - 2 + Utils.pipeMinPos * 2, blueprintBuilder.blueprint.sizeZ
- 2 + Utils.pipeMinPos * 2, this));
=======
worldObj.spawnEntityInWorld(new EntityMechanicalArm(worldObj, box.xMin + CoreConstants.PIPE_MAX_POS, yCoord + bluePrintBuilder.bluePrint.sizeY - 1
+ CoreConstants.PIPE_MIN_POS, box.zMin + CoreConstants.PIPE_MAX_POS, bluePrintBuilder.bluePrint.sizeX - 2 + CoreConstants.PIPE_MIN_POS * 2, bluePrintBuilder.bluePrint.sizeZ
- 2 + CoreConstants.PIPE_MIN_POS * 2, this));
>>>>>>>
worldObj.spawnEntityInWorld(new EntityMechanicalArm(worldObj, box.xMin + CoreConstants.PIPE_MAX_POS, yCoord + blueprintBuilder.blueprint.sizeY - 1
+ CoreConstants.PIPE_MIN_POS, box.zMin + CoreConstants.PIPE_MAX_POS, blueprintBuilder.blueprint.sizeX - 2 + CoreConstants.PIPE_MIN_POS * 2, blueprintBuilder.blueprint.sizeZ
- 2 + CoreConstants.PIPE_MIN_POS * 2, this));
<<<<<<<
if (!blueprintIterator.hasNext())
return;
if (powerHandler.useEnergy(25, 25, false) != 25)
=======
float mj = 25 * BuildCraftFactory.miningMultiplier;
powerHandler.configure(50 * BuildCraftFactory.miningMultiplier, 100 * BuildCraftFactory.miningMultiplier, mj, MAX_ENERGY * BuildCraftFactory.miningMultiplier);
if (powerHandler.useEnergy(mj, mj, true) != mj)
>>>>>>>
if (!blueprintIterator.hasNext())
return;
float mj = 25 * BuildCraftFactory.miningMultiplier;
powerHandler.configure(50 * BuildCraftFactory.miningMultiplier, 100 * BuildCraftFactory.miningMultiplier, mj, MAX_ENERGY * BuildCraftFactory.miningMultiplier);
if (powerHandler.useEnergy(mj, mj, true) != mj)
<<<<<<<
Integer[][] columnHeights = new Integer[blueprintBuilder.blueprint.sizeX - 2][blueprintBuilder.blueprint.sizeZ - 2];
boolean[][] blockedColumns = new boolean[blueprintBuilder.blueprint.sizeX - 2][blueprintBuilder.blueprint.sizeZ - 2];
for (int searchY = yCoord + 3; searchY >= 0; --searchY) {
=======
Integer[][] columnHeights = new Integer[bluePrintBuilder.bluePrint.sizeX - 2][bluePrintBuilder.bluePrint.sizeZ - 2];
boolean[][] blockedColumns = new boolean[bluePrintBuilder.bluePrint.sizeX - 2][bluePrintBuilder.bluePrint.sizeZ - 2];
for (int searchY = yCoord + 3; searchY >= 1 && searchY >= yCoord - BuildCraftFactory.miningDepth; --searchY) {
>>>>>>>
Integer[][] columnHeights = new Integer[blueprintBuilder.blueprint.sizeX - 2][blueprintBuilder.blueprint.sizeZ - 2];
boolean[][] blockedColumns = new boolean[blueprintBuilder.blueprint.sizeX - 2][blueprintBuilder.blueprint.sizeZ - 2];
for (int searchY = yCoord + 3; searchY >= 0; --searchY) { |
<<<<<<<
import net.minecraftforge.common.ForgeDirection;
import static net.minecraftforge.common.ForgeDirection.*;
=======
import net.minecraft.nbt.NBTTagList;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraftforge.common.util.ForgeDirection;
>>>>>>>
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraftforge.common.util.ForgeDirection;
<<<<<<<
private void build() {
if (blueprintBuilder == null)
=======
@Override
public void doWork(PowerHandler workProvider) {
if (worldObj.isRemote) {
>>>>>>>
private void build() {
if (blueprintBuilder == null) {
return;
} else if (blueprintIterator == null) {
return;
} else if (!blueprintIterator.hasNext()) {
return;
}
float mj = 25;
if (powerHandler.useEnergy(mj, mj, true) != mj) {
<<<<<<<
if (nbt.hasKey("box")) {
box.initialize(nbt.getCompoundTag("box"));
=======
if (nbttagcompound.hasKey("path")) {
path = new LinkedList<BlockIndex>();
NBTTagList list = nbttagcompound.getTagList("path", Utils.NBTTag_Types.NBTTagCompound.ordinal());
for (int i = 0; i < list.tagCount(); ++i) {
path.add(new BlockIndex(list.getCompoundTagAt(i)));
}
>>>>>>>
if (nbt.hasKey("box")) {
box.initialize(nbt.getCompoundTag("box"));
<<<<<<<
=======
// @Override
// public int powerRequest(ForgeDirection from) {
// if ((bluePrintBuilder != null || currentPathIterator != null) && !done)
// return powerProvider.getMaxEnergyReceived();
// else
// return 0;
// }
@Override
public void updateEntity() {
super.updateEntity();
if ((bluePrintBuilder == null || bluePrintBuilder.done) && box.isInitialized() && (builderRobot == null || builderRobot.done())) {
box.deleteLasers();
box.reset();
if (!worldObj.isRemote) {
sendNetworkUpdate();
}
return;
}
if (!box.isInitialized() && bluePrintBuilder == null && builderRobot != null) {
builderRobot.setDead();
builderRobot = null;
}
}
>>>>>>> |
<<<<<<<
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
=======
/**
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
>>>>>>>
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */ |
<<<<<<<
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
=======
/**
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
>>>>>>>
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the
* contents of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
<<<<<<<
=======
import net.minecraftforge.common.util.ForgeDirection;
>>>>>>>
<<<<<<<
public TileGenericPipe container;
protected boolean shouldSendPacket = false;
protected boolean[] inputsOpen = new boolean[EnumFacing.VALUES.length];
protected boolean[] outputsOpen = new boolean[EnumFacing.VALUES.length];
public PipeTransport() {
for (int b = 0; b < EnumFacing.VALUES.length; b++) {
inputsOpen[b] = true;
outputsOpen[b] = true;
}
}
public abstract IPipeTile.PipeType getPipeType();
public World getWorld() {
return container.getWorld();
}
public void readFromNBT(NBTTagCompound nbt) {
if (nbt.hasKey("inputOpen") && nbt.hasKey("outputOpen")) {
BitSet inputBuf = BitSetUtils.fromByteArray(new byte[] { nbt.getByte("inputOpen") });
BitSet outputBuf = BitSetUtils.fromByteArray(new byte[] { nbt.getByte("outputOpen") });
for (int b = 0; b < EnumFacing.VALUES.length; b++) {
inputsOpen[b] = inputBuf.get(b);
outputsOpen[b] = outputBuf.get(b);
}
}
}
public void writeToNBT(NBTTagCompound nbt) {
BitSet inputBuf = new BitSet(EnumFacing.VALUES.length);
BitSet outputBuf = new BitSet(EnumFacing.VALUES.length);
for (int b = 0; b < EnumFacing.VALUES.length; b++) {
if (inputsOpen[b]) {
inputBuf.set(b, true);
} else {
inputBuf.set(b, false);
}
if (outputsOpen[b]) {
outputBuf.set(b, true);
} else {
outputBuf.set(b, false);
}
}
nbt.setByte("inputOpen", BitSetUtils.toByteArray(inputBuf)[0]);
nbt.setByte("outputOpen", BitSetUtils.toByteArray(outputBuf)[0]);
}
public void updateEntity() {}
public void setTile(TileGenericPipe tile) {
this.container = tile;
}
public boolean canPipeConnect(TileEntity tile, EnumFacing side) {
return true;
}
public void onNeighborBlockChange(int blockId) {}
public void onBlockPlaced() {}
public void initialize() {}
public boolean inputOpen(EnumFacing from) {
return inputsOpen[from.ordinal()];
}
public boolean outputOpen(EnumFacing to) {
return outputsOpen[to.ordinal()];
}
public void allowInput(EnumFacing from, boolean allow) {
if (from != null) {
inputsOpen[from.ordinal()] = allow;
}
}
public void allowOutput(EnumFacing to, boolean allow) {
if (to != null) {
outputsOpen[to.ordinal()] = allow;
}
}
public void dropContents() {}
public List<ItemStack> getDroppedItems() {
return new ArrayList<ItemStack>();
}
public void sendDescriptionPacket() {}
public boolean delveIntoUnloadedChunks() {
return false;
}
=======
public TileGenericPipe container;
protected boolean[] inputsOpen = new boolean[ForgeDirection.VALID_DIRECTIONS.length];
protected boolean[] outputsOpen = new boolean[ForgeDirection.VALID_DIRECTIONS.length];
public PipeTransport() {
for (int b = 0; b < ForgeDirection.VALID_DIRECTIONS.length; b++) {
inputsOpen[b] = true;
outputsOpen[b] = true;
}
}
public abstract IPipeTile.PipeType getPipeType();
public World getWorld() {
return container.getWorldObj();
}
public void readFromNBT(NBTTagCompound nbt) {
if (nbt.hasKey("inputOpen") && nbt.hasKey("outputOpen")) {
BitSet inputBuf = BitSetUtils.fromByteArray(new byte[]{nbt.getByte("inputOpen")});
BitSet outputBuf = BitSetUtils.fromByteArray(new byte[]{nbt.getByte("outputOpen")});
for (int b = 0; b < ForgeDirection.VALID_DIRECTIONS.length; b++) {
inputsOpen[b] = inputBuf.get(b);
outputsOpen[b] = outputBuf.get(b);
}
}
}
public void writeToNBT(NBTTagCompound nbt) {
BitSet inputBuf = new BitSet(ForgeDirection.VALID_DIRECTIONS.length);
BitSet outputBuf = new BitSet(ForgeDirection.VALID_DIRECTIONS.length);
for (int b = 0; b < ForgeDirection.VALID_DIRECTIONS.length; b++) {
if (inputsOpen[b]) {
inputBuf.set(b, true);
} else {
inputBuf.set(b, false);
}
if (outputsOpen[b]) {
outputBuf.set(b, true);
} else {
outputBuf.set(b, false);
}
}
nbt.setByte("inputOpen", BitSetUtils.toByteArray(inputBuf)[0]);
nbt.setByte("outputOpen", BitSetUtils.toByteArray(outputBuf)[0]);
}
public void updateEntity() {
}
public void setTile(TileGenericPipe tile) {
this.container = tile;
}
public boolean canPipeConnect(TileEntity tile, ForgeDirection side) {
return true;
}
public void onNeighborChange(ForgeDirection direction) {
}
public void onBlockPlaced() {
}
public void initialize() {
}
public boolean inputOpen(ForgeDirection from) {
return inputsOpen[from.ordinal()];
}
public boolean outputOpen(ForgeDirection to) {
return outputsOpen[to.ordinal()];
}
public void allowInput(ForgeDirection from, boolean allow) {
if (from != ForgeDirection.UNKNOWN) {
inputsOpen[from.ordinal()] = allow;
}
}
public void allowOutput(ForgeDirection to, boolean allow) {
if (to != ForgeDirection.UNKNOWN) {
outputsOpen[to.ordinal()] = allow;
}
}
public void dropContents() {
}
public List<ItemStack> getDroppedItems() {
return new ArrayList<ItemStack>();
}
public void sendDescriptionPacket() {
}
public boolean delveIntoUnloadedChunks() {
return false;
}
>>>>>>>
public TileGenericPipe container;
protected boolean shouldSendPacket = false;
protected boolean[] inputsOpen = new boolean[EnumFacing.VALUES.length];
protected boolean[] outputsOpen = new boolean[EnumFacing.VALUES.length];
public PipeTransport() {
for (int b = 0; b < EnumFacing.VALUES.length; b++) {
inputsOpen[b] = true;
outputsOpen[b] = true;
}
}
public abstract IPipeTile.PipeType getPipeType();
public World getWorld() {
return container.getWorld();
}
public void readFromNBT(NBTTagCompound nbt) {
if (nbt.hasKey("inputOpen") && nbt.hasKey("outputOpen")) {
BitSet inputBuf = BitSetUtils.fromByteArray(new byte[]{nbt.getByte("inputOpen")});
BitSet outputBuf = BitSetUtils.fromByteArray(new byte[]{nbt.getByte("outputOpen")});
for (int b = 0; b < EnumFacing.VALUES.length; b++) {
inputsOpen[b] = inputBuf.get(b);
outputsOpen[b] = outputBuf.get(b);
}
}
}
public void writeToNBT(NBTTagCompound nbt) {
BitSet inputBuf = new BitSet(EnumFacing.VALUES.length);
BitSet outputBuf = new BitSet(EnumFacing.VALUES.length);
for (int b = 0; b < EnumFacing.VALUES.length; b++) {
if (inputsOpen[b]) {
inputBuf.set(b, true);
} else {
inputBuf.set(b, false);
}
if (outputsOpen[b]) {
outputBuf.set(b, true);
} else {
outputBuf.set(b, false);
}
}
nbt.setByte("inputOpen", BitSetUtils.toByteArray(inputBuf)[0]);
nbt.setByte("outputOpen", BitSetUtils.toByteArray(outputBuf)[0]);
}
public void updateEntity() {}
public void setTile(TileGenericPipe tile) {
this.container = tile;
}
public boolean canPipeConnect(TileEntity tile, EnumFacing side) {
return true;
}
public void onNeighborChange(EnumFacing direction) {}
public void onBlockPlaced() {}
public void initialize() {}
public boolean inputOpen(EnumFacing from) {
return inputsOpen[from.ordinal()];
}
public boolean outputOpen(EnumFacing to) {
return outputsOpen[to.ordinal()];
}
public void allowInput(EnumFacing from, boolean allow) {
if (from != null) {
inputsOpen[from.ordinal()] = allow;
}
}
public void allowOutput(EnumFacing to, boolean allow) {
if (to != null) {
outputsOpen[to.ordinal()] = allow;
}
}
public void dropContents() {}
public List<ItemStack> getDroppedItems() {
return new ArrayList<ItemStack>();
}
public void sendDescriptionPacket() {}
public boolean delveIntoUnloadedChunks() {
return false;
} |
<<<<<<<
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
=======
/**
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
>>>>>>>
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
<<<<<<<
=======
import cpw.mods.fml.common.eventhandler.Event.Result;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
>>>>>>> |
<<<<<<<
/** Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
=======
/**
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
>>>>>>>
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */ |
<<<<<<<
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
=======
/**
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
>>>>>>>
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
<<<<<<<
=======
import buildcraft.api.core.BlockIndex;
import buildcraft.api.core.BuildCraftAPI;
>>>>>>>
import buildcraft.api.core.BuildCraftAPI; |
<<<<<<<
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
=======
/**
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
>>>>>>>
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
<<<<<<<
public IInventory craftResult;
private final TileAutoWorkbench tile;
private int lastProgress;
private ItemStack prevOutput;
public ContainerAutoWorkbench(EntityPlayer player, TileAutoWorkbench t) {
super(player, t.getSizeInventory());
craftResult = new InventoryCraftResult();
this.tile = t;
addSlotToContainer(new SlotUntouchable(craftResult, 0, 93, 27));
addSlotToContainer(new SlotOutput(tile, TileAutoWorkbench.SLOT_RESULT, 124, 35));
for (int y = 0; y < 3; y++) {
for (int x = 0; x < 3; x++) {
addSlotToContainer(new SlotWorkbench(tile, 10 + x + y * 3, 30 + x * 18, 17 + y * 18));
}
}
for (int x = 0; x < 9; x++) {
addSlotToContainer(new Slot(tile, x, 8 + x * 18, 84));
}
for (int y = 0; y < 3; y++) {
for (int x = 0; x < 9; x++) {
addSlotToContainer(new Slot(player.inventory, x + y * 9 + 9, 8 + x * 18, 115 + y * 18));
}
}
for (int x = 0; x < 9; x++) {
addSlotToContainer(new Slot(player.inventory, x, 8 + x * 18, 173));
}
onCraftMatrixChanged(tile);
}
@Override
public void onCraftGuiOpened(ICrafting icrafting) {
super.onCraftGuiOpened(icrafting);
icrafting.sendProgressBarUpdate(this, 0, tile.progress);
}
@Override
public void detectAndSendChanges() {
super.detectAndSendChanges();
for (int i = 0; i < crafters.size(); i++) {
ICrafting icrafting = (ICrafting) crafters.get(i);
if (lastProgress != tile.progress) {
icrafting.sendProgressBarUpdate(this, 0, tile.progress);
}
}
ItemStack output = craftResult.getStackInSlot(0);
if (output != prevOutput) {
prevOutput = output;
onCraftMatrixChanged(tile.craftMatrix);
}
lastProgress = tile.progress;
}
@Override
public void updateProgressBar(int id, int data) {
switch (id) {
case 0:
tile.progress = data;
break;
}
}
@Override
public final void onCraftMatrixChanged(IInventory inv) {
super.onCraftMatrixChanged(inv);
tile.craftMatrix.rebuildCache();
ItemStack output = tile.craftMatrix.getRecipeOutput();
craftResult.setInventorySlotContents(0, output);
}
@Override
public ItemStack slotClick(int i, int j, int modifier, EntityPlayer entityplayer) {
ItemStack stack = super.slotClick(i, j, modifier, entityplayer);
onCraftMatrixChanged(tile.craftMatrix);
return stack;
}
@Override
public boolean canInteractWith(EntityPlayer entityplayer) {
return tile.isUseableByPlayer(entityplayer);
}
=======
public IInventory craftResult;
private final TileAutoWorkbench tile;
private int lastProgress;
private ItemStack prevOutput;
public ContainerAutoWorkbench(InventoryPlayer inventoryplayer, TileAutoWorkbench t) {
super(t.getSizeInventory());
craftResult = new InventoryCraftResult();
this.tile = t;
addSlotToContainer(new SlotUntouchable(craftResult, 0, 93, 27));
addSlotToContainer(new SlotOutput(tile, TileAutoWorkbench.SLOT_RESULT, 124, 35));
for (int y = 0; y < 3; y++) {
for (int x = 0; x < 3; x++) {
addSlotToContainer(new SlotWorkbench(tile, 10 + x + y * 3, 30 + x * 18, 17 + y * 18));
}
}
for (int x = 0; x < 9; x++) {
addSlotToContainer(new Slot(tile, x, 8 + x * 18, 84));
}
for (int y = 0; y < 3; y++) {
for (int x = 0; x < 9; x++) {
addSlotToContainer(new Slot(inventoryplayer, x + y * 9 + 9, 8 + x * 18, 115 + y * 18));
}
}
for (int x = 0; x < 9; x++) {
addSlotToContainer(new Slot(inventoryplayer, x, 8 + x * 18, 173));
}
onCraftMatrixChanged(tile);
}
@Override
public void addCraftingToCrafters(ICrafting icrafting) {
super.addCraftingToCrafters(icrafting);
icrafting.sendProgressBarUpdate(this, 0, tile.progress);
}
@Override
public void detectAndSendChanges() {
super.detectAndSendChanges();
for (Object crafter : crafters) {
ICrafting icrafting = (ICrafting) crafter;
if (lastProgress != tile.progress) {
icrafting.sendProgressBarUpdate(this, 0, tile.progress);
}
}
ItemStack output = craftResult.getStackInSlot(0);
if (output != prevOutput) {
prevOutput = output;
onCraftMatrixChanged(tile.craftMatrix);
}
lastProgress = tile.progress;
}
@Override
public void updateProgressBar(int id, int data) {
switch (id) {
case 0:
tile.progress = data;
break;
}
}
@Override
public final void onCraftMatrixChanged(IInventory inv) {
super.onCraftMatrixChanged(inv);
tile.craftMatrix.rebuildCache();
ItemStack output = tile.craftMatrix.getRecipeOutput();
craftResult.setInventorySlotContents(0, output);
}
@Override
public ItemStack slotClick(int i, int j, int modifier, EntityPlayer entityplayer) {
ItemStack stack = super.slotClick(i, j, modifier, entityplayer);
onCraftMatrixChanged(tile.craftMatrix);
return stack;
}
@Override
public boolean canInteractWith(EntityPlayer entityplayer) {
return tile.isUseableByPlayer(entityplayer);
}
>>>>>>>
public IInventory craftResult;
private final TileAutoWorkbench tile;
private int lastProgress;
private ItemStack prevOutput;
public ContainerAutoWorkbench(EntityPlayer player, TileAutoWorkbench t) {
super(player, t.getSizeInventory());
craftResult = new InventoryCraftResult();
this.tile = t;
addSlotToContainer(new SlotUntouchable(craftResult, 0, 93, 27));
addSlotToContainer(new SlotOutput(tile, TileAutoWorkbench.SLOT_RESULT, 124, 35));
for (int y = 0; y < 3; y++) {
for (int x = 0; x < 3; x++) {
addSlotToContainer(new SlotWorkbench(tile, 10 + x + y * 3, 30 + x * 18, 17 + y * 18));
}
}
for (int x = 0; x < 9; x++) {
addSlotToContainer(new Slot(tile, x, 8 + x * 18, 84));
}
for (int y = 0; y < 3; y++) {
for (int x = 0; x < 9; x++) {
addSlotToContainer(new Slot(player.inventory, x + y * 9 + 9, 8 + x * 18, 115 + y * 18));
}
}
for (int x = 0; x < 9; x++) {
addSlotToContainer(new Slot(player.inventory, x, 8 + x * 18, 173));
}
onCraftMatrixChanged(tile);
}
@Override
public void onCraftGuiOpened(ICrafting icrafting) {
super.onCraftGuiOpened(icrafting);
icrafting.sendProgressBarUpdate(this, 0, tile.progress);
}
@Override
public void detectAndSendChanges() {
super.detectAndSendChanges();
for (Object crafter : crafters) {
ICrafting icrafting = (ICrafting) crafter;
if (lastProgress != tile.progress) {
icrafting.sendProgressBarUpdate(this, 0, tile.progress);
}
}
ItemStack output = craftResult.getStackInSlot(0);
if (output != prevOutput) {
prevOutput = output;
onCraftMatrixChanged(tile.craftMatrix);
}
lastProgress = tile.progress;
}
@Override
public void updateProgressBar(int id, int data) {
switch (id) {
case 0:
tile.progress = data;
break;
}
}
@Override
public final void onCraftMatrixChanged(IInventory inv) {
super.onCraftMatrixChanged(inv);
tile.craftMatrix.rebuildCache();
ItemStack output = tile.craftMatrix.getRecipeOutput();
craftResult.setInventorySlotContents(0, output);
}
@Override
public ItemStack slotClick(int i, int j, int modifier, EntityPlayer entityplayer) {
ItemStack stack = super.slotClick(i, j, modifier, entityplayer);
onCraftMatrixChanged(tile.craftMatrix);
return stack;
}
@Override
public boolean canInteractWith(EntityPlayer entityplayer) {
return tile.isUseableByPlayer(entityplayer);
} |
<<<<<<<
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
=======
/**
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
>>>>>>>
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
<<<<<<<
public ActionStationAcceptItems() {
super("buildcraft:station.accept_items");
setBuildCraftLocation("robotics", "triggers/action_station_accept_items");
StatementManager.statements.put("buildcraft:station.drop_in_pipe", this);
}
@Override
public String getDescription() {
return StringUtils.localize("gate.action.station.accept_items");
}
// @Override
// public void registerIcons(TextureAtlasSpriteRegister iconRegister) {
// icon = iconRegister.registerIcon("buildcraftrobotics:triggers/action_station_accept_items");
// }
@Override
public int maxParameters() {
return 3;
}
@Override
public IStatementParameter createParameter(int index) {
return new StatementParameterItemStack();
}
@Override
public boolean insert(DockingStation station, EntityRobot robot, StatementSlot actionSlot, IInvSlot invSlot, boolean doInsert) {
if (!super.insert(station, robot, actionSlot, invSlot, doInsert)) {
return false;
}
IInjectable injectable = station.getItemOutput();
if (injectable == null) {
return false;
}
EnumFacing injectSide = station.side().getOpposite();
if (!injectable.canInjectItems(injectSide)) {
return false;
}
if (!doInsert) {
return true;
}
ItemStack stack = invSlot.getStackInSlot();
int used = injectable.injectItem(stack, doInsert, injectSide, null);
if (used > 0) {
stack.stackSize -= used;
if (stack.stackSize > 0) {
invSlot.setStackInSlot(stack);
} else {
invSlot.setStackInSlot(null);
}
return true;
}
return false;
}
=======
public ActionStationAcceptItems() {
super("buildcraft:station.accept_items");
StatementManager.statements.put("buildcraft:station.drop_in_pipe", this);
}
@Override
public String getDescription() {
return StringUtils.localize("gate.action.station.accept_items");
}
@Override
public void registerIcons(IIconRegister iconRegister) {
icon = iconRegister.registerIcon("buildcraftrobotics:triggers/action_station_accept_items");
}
@Override
public int maxParameters() {
return 3;
}
@Override
public IStatementParameter createParameter(int index) {
return new StatementParameterItemStack();
}
>>>>>>>
public ActionStationAcceptItems() {
super("buildcraft:station.accept_items");
setBuildCraftLocation("robotics", "triggers/action_station_accept_items");
StatementManager.statements.put("buildcraft:station.drop_in_pipe", this);
}
@Override
public String getDescription() {
return StringUtils.localize("gate.action.station.accept_items");
}
@Override
public int maxParameters() {
return 3;
}
@Override
public IStatementParameter createParameter(int index) {
return new StatementParameterItemStack();
} |
<<<<<<<
this.serverUrl = source.serverUrl;
this.skipTlsVerify = source.skipTlsVerify;
this.addMasterProxyEnvVars = source.addMasterProxyEnvVars;
this.namespace = source.namespace;
this.webSocket = source.webSocket;
this.directConnection = source.directConnection;
this.jenkinsUrl = source.jenkinsUrl;
this.jenkinsTunnel = source.jenkinsTunnel;
this.credentialsId = source.credentialsId;
this.containerCap = source.containerCap;
this.retentionTimeout = source.retentionTimeout;
this.connectTimeout = source.connectTimeout;
this.usageRestricted = source.usageRestricted;
this.maxRequestsPerHost = source.maxRequestsPerHost;
this.podRetention = source.podRetention;
this.waitForPodSec = source.waitForPodSec;
setPodLabels(source.podLabels);
=======
>>>>>>>
<<<<<<<
public FormValidation doCheckDirectConnection(@QueryParameter boolean value, @QueryParameter String jenkinsUrl, @QueryParameter boolean webSocket) throws IOException, ServletException {
=======
@RequirePOST
@SuppressWarnings("unused") // used by jelly
public FormValidation doCheckRetentionTimeout(@QueryParameter String value) {
return FormValidation.validateIntegerInRange(value, DEFAULT_RETENTION_TIMEOUT_MINUTES, Integer.MAX_VALUE);
}
@SuppressWarnings("unused") // used by jelly
public FormValidation doCheckDirectConnection(@QueryParameter boolean value, @QueryParameter String jenkinsUrl) throws IOException, ServletException {
>>>>>>>
@RequirePOST
@SuppressWarnings("unused") // used by jelly
public FormValidation doCheckRetentionTimeout(@QueryParameter String value) {
return FormValidation.validateIntegerInRange(value, DEFAULT_RETENTION_TIMEOUT_MINUTES, Integer.MAX_VALUE);
}
@SuppressWarnings("unused") // used by jelly
public FormValidation doCheckDirectConnection(@QueryParameter boolean value, @QueryParameter String jenkinsUrl, @QueryParameter boolean webSocket) throws IOException, ServletException {
<<<<<<<
public FormValidation doCheckWebSocket(@QueryParameter boolean webSocket, @QueryParameter boolean directConnection, @QueryParameter String jenkinsTunnel) {
if (webSocket) {
if (!WebSockets.isSupported()) {
return FormValidation.error("WebSocket support is not enabled in this Jenkins installation");
}
if (Util.fixEmpty(jenkinsTunnel) != null) {
return FormValidation.error("Tunneling is not currently supported in WebSocket mode");
}
}
return FormValidation.ok();
}
=======
@SuppressWarnings("unused") // used by jelly
>>>>>>>
public FormValidation doCheckWebSocket(@QueryParameter boolean webSocket, @QueryParameter boolean directConnection, @QueryParameter String jenkinsTunnel) {
if (webSocket) {
if (!WebSockets.isSupported()) {
return FormValidation.error("WebSocket support is not enabled in this Jenkins installation");
}
if (Util.fixEmpty(jenkinsTunnel) != null) {
return FormValidation.error("Tunneling is not currently supported in WebSocket mode");
}
}
return FormValidation.ok();
}
@SuppressWarnings("unused") // used by jelly |
<<<<<<<
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
=======
/**
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
>>>>>>>
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
<<<<<<<
@Override
public Collection<IActionInternal> getInternalActions(IStatementContainer container) {
LinkedList<IActionInternal> result = new LinkedList<IActionInternal>();
TileEntity tile = container.getTile();
if (!(tile instanceof IPipeTile)) {
return result;
}
IPipeTile pipeTile = (IPipeTile) tile;
List<DockingStation> stations = RobotUtils.getStations(pipeTile);
if (stations.size() == 0) {
return result;
}
result.add(BuildCraftRobotics.actionRobotGotoStation);
result.add(BuildCraftRobotics.actionRobotWorkInArea);
result.add(BuildCraftRobotics.actionRobotLoadUnloadArea);
result.add(BuildCraftRobotics.actionRobotWakeUp);
result.add(BuildCraftRobotics.actionRobotFilter);
result.add(BuildCraftRobotics.actionRobotFilterTool);
result.add(BuildCraftRobotics.actionStationForbidRobot);
result.add(BuildCraftRobotics.actionStationForceRobot);
if (pipeTile.getPipeType() == PipeType.ITEM) {
result.add(BuildCraftRobotics.actionStationRequestItems);
result.add(BuildCraftRobotics.actionStationAcceptItems);
}
if (pipeTile.getPipeType() == PipeType.FLUID) {
result.add(BuildCraftRobotics.actionStationAcceptFluids);
}
for (DockingStation station : stations) {
TileEntity sideTile = ((TileGenericPipe) tile).getTile(station.side);
Block sideBlock = ((TileGenericPipe) tile).getBlock(station.side);
if (sideTile instanceof IPipeTile) {
continue;
}
if (station.getItemInput() != null) {
result.add(BuildCraftRobotics.actionStationProvideItems);
}
if (station.getFluidInput() != null) {
result.add(BuildCraftRobotics.actionStationProvideFluids);
}
if (station.getRequestProvider() != null) {
result.add(BuildCraftRobotics.actionStationMachineRequestItems);
}
}
return result;
}
@Override
public Collection<IActionExternal> getExternalActions(EnumFacing side, TileEntity tile) {
return null;
}
=======
@Override
public Collection<IActionInternal> getInternalActions(IStatementContainer container) {
LinkedList<IActionInternal> result = new LinkedList<IActionInternal>();
TileEntity tile = container.getTile();
if (!(tile instanceof IPipeTile)) {
return result;
}
IPipeTile pipeTile = (IPipeTile) tile;
List<DockingStation> stations = RobotUtils.getStations(pipeTile);
if (stations.size() == 0) {
return result;
}
result.add(BuildCraftRobotics.actionRobotGotoStation);
result.add(BuildCraftRobotics.actionRobotWorkInArea);
result.add(BuildCraftRobotics.actionRobotLoadUnloadArea);
result.add(BuildCraftRobotics.actionRobotWakeUp);
result.add(BuildCraftRobotics.actionRobotFilter);
result.add(BuildCraftRobotics.actionRobotFilterTool);
result.add(BuildCraftRobotics.actionStationForbidRobot);
result.add(BuildCraftRobotics.actionStationForceRobot);
if (pipeTile.getPipeType() == PipeType.ITEM) {
result.add(BuildCraftRobotics.actionStationRequestItems);
result.add(BuildCraftRobotics.actionStationAcceptItems);
}
if (pipeTile.getPipeType() == PipeType.FLUID) {
result.add(BuildCraftRobotics.actionStationAcceptFluids);
}
for (DockingStation station : stations) {
if (station.getItemInput() != null) {
result.add(BuildCraftRobotics.actionStationProvideItems);
}
if (station.getFluidInput() != null) {
result.add(BuildCraftRobotics.actionStationProvideFluids);
}
if (station.getRequestProvider() != null) {
result.add(BuildCraftRobotics.actionStationMachineRequestItems);
}
}
return result;
}
@Override
public Collection<IActionExternal> getExternalActions(ForgeDirection side, TileEntity tile) {
return null;
}
>>>>>>>
@Override
public Collection<IActionInternal> getInternalActions(IStatementContainer container) {
LinkedList<IActionInternal> result = new LinkedList<IActionInternal>();
TileEntity tile = container.getTile();
if (!(tile instanceof IPipeTile)) {
return result;
}
IPipeTile pipeTile = (IPipeTile) tile;
List<DockingStation> stations = RobotUtils.getStations(pipeTile);
if (stations.size() == 0) {
return result;
}
result.add(BuildCraftRobotics.actionRobotGotoStation);
result.add(BuildCraftRobotics.actionRobotWorkInArea);
result.add(BuildCraftRobotics.actionRobotLoadUnloadArea);
result.add(BuildCraftRobotics.actionRobotWakeUp);
result.add(BuildCraftRobotics.actionRobotFilter);
result.add(BuildCraftRobotics.actionRobotFilterTool);
result.add(BuildCraftRobotics.actionStationForbidRobot);
result.add(BuildCraftRobotics.actionStationForceRobot);
if (pipeTile.getPipeType() == PipeType.ITEM) {
result.add(BuildCraftRobotics.actionStationRequestItems);
result.add(BuildCraftRobotics.actionStationAcceptItems);
}
if (pipeTile.getPipeType() == PipeType.FLUID) {
result.add(BuildCraftRobotics.actionStationAcceptFluids);
}
for (DockingStation station : stations) {
if (station.getItemInput() != null) {
result.add(BuildCraftRobotics.actionStationProvideItems);
}
if (station.getFluidInput() != null) {
result.add(BuildCraftRobotics.actionStationProvideFluids);
}
if (station.getRequestProvider() != null) {
result.add(BuildCraftRobotics.actionStationMachineRequestItems);
}
}
return result;
}
@Override
public Collection<IActionExternal> getExternalActions(EnumFacing side, TileEntity tile) {
return null;
} |
<<<<<<<
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
=======
/**
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
>>>>>>>
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
<<<<<<<
private AreaType areaType;
=======
private final AreaType areaType;
>>>>>>>
private final AreaType areaType; |
<<<<<<<
import net.minecraft.util.math.Vec3d;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
=======
>>>>>>>
import net.minecraft.util.math.Vec3d;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
<<<<<<<
renderTank(sizes.tankIn, tile.tankIn, combinedLight, bb);
renderTank(sizes.tankOutGas, tile.tankOutGas, combinedLight, bb);
renderTank(sizes.tankOutLiquid, tile.tankOutLiquid, combinedLight, bb);
=======
renderTank(sizes.tankIn, tile.smoothedTankIn, combinedLight, partialTicks, vb);
renderTank(sizes.tankOutGas, tile.smoothedTankOutGas, combinedLight, partialTicks, vb);
renderTank(sizes.tankOutLiquid, tile.smoothedTankOutLiquid, combinedLight, partialTicks, vb);
>>>>>>>
renderTank(sizes.tankIn, tile.smoothedTankIn, combinedLight, partialTicks, bb);
renderTank(sizes.tankOutGas, tile.smoothedTankOutGas, combinedLight, partialTicks, bb);
renderTank(sizes.tankOutLiquid, tile.smoothedTankOutLiquid, combinedLight, partialTicks, bb);
<<<<<<<
private static void renderTank(Size size, Tank tank, int combinedLight, BufferBuilder bb) {
FluidStack fluid = tank.getFluidForRender();
=======
public static void renderTank(TankSize size, FluidSmoother tank, int combinedLight, float partialTicks, VertexBuffer vb) {
FluidStackInterp fluid = tank.getFluidForRender(partialTicks);
>>>>>>>
public static void renderTank(TankSize size, FluidSmoother tank, int combinedLight, float partialTicks, BufferBuilder bb) {
FluidStackInterp fluid = tank.getFluidForRender(partialTicks);
<<<<<<<
FluidRenderer.renderFluid(FluidSpriteType.STILL, fluid, tank.getCapacity(), size.min, size.max, bb, null);
=======
FluidRenderer.renderFluid(FluidSpriteType.STILL, fluid.fluid, fluid.amount, tank.getCapacity(), size.min, size.max, vb, null);
>>>>>>>
FluidRenderer.renderFluid(FluidSpriteType.STILL, fluid.fluid, fluid.amount, tank.getCapacity(), size.min, size.max, bb, null);
<<<<<<<
static class Size {
final Vec3d min, max;
public Size(int sx, int sy, int sz, int ex, int ey, int ez) {
this(new Vec3d(sx, sy, sz).scale(1 / 16.0), new Vec3d(ex, ey, ez).scale(1 / 16.0));
}
public Size(Vec3d min, Vec3d max) {
this.min = min;
this.max = max;
}
public Size shrink(double by) {
return new Size(min.addVector(by, by, by), max.subtract(by, by, by));
}
public Size rotateY() {
Vec3d _min = rotateY(min);
Vec3d _max = rotateY(max);
return new Size(VecUtil.min(_min, _max), VecUtil.max(_min, _max));
}
private static Vec3d rotateY(Vec3d vec) {
return new Vec3d(//
1 - vec.z,//
vec.y,//
vec.x//
);
}
}
=======
>>>>>>>
static class Size {
final Vec3d min, max;
public Size(int sx, int sy, int sz, int ex, int ey, int ez) {
this(new Vec3d(sx, sy, sz).scale(1 / 16.0), new Vec3d(ex, ey, ez).scale(1 / 16.0));
}
public Size(Vec3d min, Vec3d max) {
this.min = min;
this.max = max;
}
public Size shrink(double by) {
return new Size(min.addVector(by, by, by), max.subtract(by, by, by));
}
public Size rotateY() {
Vec3d _min = rotateY(min);
Vec3d _max = rotateY(max);
return new Size(VecUtil.min(_min, _max), VecUtil.max(_min, _max));
}
private static Vec3d rotateY(Vec3d vec) {
return new Vec3d(//
1 - vec.z,//
vec.y,//
vec.x//
);
}
} |
<<<<<<<
//check if the data is present as we only process in post-init
FacadeBlockStateInfo stone = getInfoForBlock(Blocks.STONE);
if (stone != null) {
FacadePhasedState[] states = {
stone.createPhased(false, null),//
getInfoForBlock(Blocks.PLANKS).createPhased(false, EnumDyeColor.RED),//
getInfoForBlock(Blocks.LOG).createPhased(false, EnumDyeColor.CYAN),//
};
FullFacadeInstance inst = new FullFacadeInstance(states);
subItems.add(createItemStack(inst));
for (FacadeBlockStateInfo info : FacadeStateManager.validFacadeStates.values()) {
if (info.isVisible) {
subItems.add(createItemStack(FullFacadeInstance.createSingle(info, false)));
subItems.add(createItemStack(FullFacadeInstance.createSingle(info, true)));
}
=======
FacadePhasedState[] states = {//
FacadeStateManager.getInfoForBlock(Blocks.STONE).createPhased(false, null),//
FacadeStateManager.getInfoForBlock(Blocks.PLANKS).createPhased(false, EnumDyeColor.RED),//
FacadeStateManager.getInfoForBlock(Blocks.LOG).createPhased(false, EnumDyeColor.CYAN),//
};
FacadeInstance inst = new FacadeInstance(states);
subItems.add(createItemStack(inst));
for (FacadeBlockStateInfo info : FacadeStateManager.validFacadeStates.values()) {
if (info.isVisible) {
subItems.add(createItemStack(FacadeInstance.createSingle(info, false)));
subItems.add(createItemStack(FacadeInstance.createSingle(info, true)));
>>>>>>>
//check if the data is present as we only process in post-init
FacadeBlockStateInfo stone = getInfoForBlock(Blocks.STONE);
if (stone != null) {
FacadePhasedState[] states = {//
FacadeStateManager.getInfoForBlock(Blocks.STONE).createPhased(false, null),//
FacadeStateManager.getInfoForBlock(Blocks.PLANKS).createPhased(false, EnumDyeColor.RED),//
FacadeStateManager.getInfoForBlock(Blocks.LOG).createPhased(false, EnumDyeColor.CYAN),//
};
FacadeInstance inst = new FacadeInstance(states);
subItems.add(createItemStack(inst));
for (FacadeBlockStateInfo info : FacadeStateManager.validFacadeStates.values()) {
if (info.isVisible) {
subItems.add(createItemStack(FacadeInstance.createSingle(info, false)));
subItems.add(createItemStack(FacadeInstance.createSingle(info, true)));
}
<<<<<<<
public void addInformation(ItemStack stack, World world, List<String> tooltip, ITooltipFlag flag) {
FullFacadeInstance states = getStates(stack);
=======
public void addInformation(ItemStack stack, EntityPlayer player, List<String> tooltip, boolean advanced) {
FacadeInstance states = getStates(stack);
>>>>>>>
public void addInformation(ItemStack stack, World world, List<String> tooltip, ITooltipFlag flag) {
FacadeInstance states = getStates(stack); |
<<<<<<<
AssemblyRecipe recp = new AssemblyRecipeBasic(name, multiplier * 10_000 * MjAPI.MJ, inputs.build(), output);
AssemblyRecipeRegistry.REGISTRY.register(recp);
=======
AssemblyRecipe recp = new AssemblyRecipe(name, multiplier * 10_000L * MjAPI.MJ, inputs.build(), output);
AssemblyRecipeRegistry.INSTANCE.addRecipe(recp);
>>>>>>>
AssemblyRecipe recp = new AssemblyRecipeBasic(name, multiplier * 10_000L * MjAPI.MJ, inputs.build(), output);
AssemblyRecipeRegistry.REGISTRY.register(recp); |
<<<<<<<
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
=======
/**
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
>>>>>>>
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
<<<<<<<
@Override
public Object getClientGuiElement(int id, EntityPlayer player, World world, int x, int y, int z) {
BlockPos pos = new BlockPos(x, y, z);
if (world.isAirBlock(pos)) {
return null;
}
TileEntity tile = world.getTileEntity(pos);
switch (id) {
case GuiIds.ARCHITECT_TABLE:
if (!(tile instanceof TileArchitect)) {
return null;
}
return new GuiArchitect(player, (TileArchitect) tile);
case GuiIds.BLUEPRINT_LIBRARY:
if (!(tile instanceof TileBlueprintLibrary)) {
return null;
}
return new GuiBlueprintLibrary(player, (TileBlueprintLibrary) tile);
case GuiIds.BUILDER:
if (!(tile instanceof TileBuilder)) {
return null;
}
return new GuiBuilder(player, (TileBuilder) tile);
case GuiIds.FILLER:
if (!(tile instanceof TileFiller)) {
return null;
}
return new GuiFiller(player, (TileFiller) tile);
case GuiIds.URBANIST:
if (!(tile instanceof TileUrbanist)) {
return null;
}
return new GuiUrbanist(player, (TileUrbanist) tile);
default:
return null;
}
}
@Override
public Object getServerGuiElement(int id, EntityPlayer player, World world, int x, int y, int z) {
BlockPos pos = new BlockPos(x, y, z);
if (world.isAirBlock(pos)) {
return null;
}
TileEntity tile = world.getTileEntity(pos);
switch (id) {
case GuiIds.ARCHITECT_TABLE:
if (!(tile instanceof TileArchitect)) {
return null;
}
return new ContainerArchitect(player, (TileArchitect) tile);
case GuiIds.BLUEPRINT_LIBRARY:
if (!(tile instanceof TileBlueprintLibrary)) {
return null;
}
return new ContainerBlueprintLibrary(player, (TileBlueprintLibrary) tile);
case GuiIds.BUILDER:
if (!(tile instanceof TileBuilder)) {
return null;
}
return new ContainerBuilder(player, (TileBuilder) tile);
case GuiIds.FILLER:
if (!(tile instanceof TileFiller)) {
return null;
}
return new ContainerFiller(player, (TileFiller) tile);
case GuiIds.URBANIST:
if (!(tile instanceof TileUrbanist)) {
return null;
} else {
return new ContainerUrbanist(player, (TileUrbanist) tile);
}
default:
return null;
}
}
=======
@Override
public Object getClientGuiElement(int id, EntityPlayer player, World world, int x, int y, int z) {
if (!world.blockExists(x, y, z)) {
return null;
}
TileEntity tile = world.getTileEntity(x, y, z);
switch (id) {
case GuiIds.ARCHITECT_TABLE:
if (!(tile instanceof TileArchitect)) {
return null;
}
return new GuiArchitect(player, (TileArchitect) tile);
case GuiIds.BLUEPRINT_LIBRARY:
if (!(tile instanceof TileBlueprintLibrary)) {
return null;
}
return new GuiBlueprintLibrary(player, (TileBlueprintLibrary) tile);
case GuiIds.BUILDER:
if (!(tile instanceof TileBuilder)) {
return null;
}
return new GuiBuilder(player.inventory, (TileBuilder) tile);
case GuiIds.FILLER:
if (!(tile instanceof TileFiller)) {
return null;
}
return new GuiFiller(player.inventory, (TileFiller) tile);
default:
return null;
}
}
@Override
public Object getServerGuiElement(int id, EntityPlayer player, World world, int x, int y, int z) {
if (!world.blockExists(x, y, z)) {
return null;
}
TileEntity tile = world.getTileEntity(x, y, z);
switch (id) {
case GuiIds.ARCHITECT_TABLE:
if (!(tile instanceof TileArchitect)) {
return null;
}
return new ContainerArchitect(player, (TileArchitect) tile);
case GuiIds.BLUEPRINT_LIBRARY:
if (!(tile instanceof TileBlueprintLibrary)) {
return null;
}
return new ContainerBlueprintLibrary(player, (TileBlueprintLibrary) tile);
case GuiIds.BUILDER:
if (!(tile instanceof TileBuilder)) {
return null;
}
return new ContainerBuilder(player.inventory, (TileBuilder) tile);
case GuiIds.FILLER:
if (!(tile instanceof TileFiller)) {
return null;
}
return new ContainerFiller(player.inventory, (TileFiller) tile);
default:
return null;
}
}
>>>>>>>
@Override
public Object getClientGuiElement(int id, EntityPlayer player, World world, int x, int y, int z) {
BlockPos pos = new BlockPos(x, y, z);
if (world.isAirBlock(pos)) {
return null;
}
TileEntity tile = world.getTileEntity(pos);
switch (id) {
case GuiIds.ARCHITECT_TABLE:
if (!(tile instanceof TileArchitect)) {
return null;
}
return new GuiArchitect(player, (TileArchitect) tile);
case GuiIds.BLUEPRINT_LIBRARY:
if (!(tile instanceof TileBlueprintLibrary)) {
return null;
}
return new GuiBlueprintLibrary(player, (TileBlueprintLibrary) tile);
case GuiIds.BUILDER:
if (!(tile instanceof TileBuilder)) {
return null;
}
return new GuiBuilder(player, (TileBuilder) tile);
case GuiIds.FILLER:
if (!(tile instanceof TileFiller)) {
return null;
}
return new GuiFiller(player, (TileFiller) tile);
default:
return null;
}
}
@Override
public Object getServerGuiElement(int id, EntityPlayer player, World world, int x, int y, int z) {
BlockPos pos = new BlockPos(x, y, z);
if (world.isAirBlock(pos)) {
return null;
}
TileEntity tile = world.getTileEntity(pos);
switch (id) {
case GuiIds.ARCHITECT_TABLE:
if (!(tile instanceof TileArchitect)) {
return null;
}
return new ContainerArchitect(player, (TileArchitect) tile);
case GuiIds.BLUEPRINT_LIBRARY:
if (!(tile instanceof TileBlueprintLibrary)) {
return null;
}
return new ContainerBlueprintLibrary(player, (TileBlueprintLibrary) tile);
case GuiIds.BUILDER:
if (!(tile instanceof TileBuilder)) {
return null;
}
return new ContainerBuilder(player, (TileBuilder) tile);
case GuiIds.FILLER:
if (!(tile instanceof TileFiller)) {
return null;
}
return new ContainerFiller(player, (TileFiller) tile);
default:
return null;
}
} |
<<<<<<<
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
=======
/**
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
>>>>>>>
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
<<<<<<<
@Override
public void addRecipe(String id, int energyCost, ItemStack output, Object... input) {
if (output == null) {
throw new IllegalArgumentException("Cannot have a null output!");
}
addRecipe(id, new FlexibleRecipe<ItemStack>(id, output, energyCost, 0, input));
}
@Override
public void addRecipe(IFlexibleRecipe<ItemStack> recipe) {
addRecipe(recipe.getId(), recipe);
}
=======
@Override
public void addRecipe(String id, int energyCost, ItemStack output, Object... input) {
addRecipe(id, new FlexibleRecipe<ItemStack>(id, output, energyCost, 0, input));
}
>>>>>>>
@Override
public void addRecipe(String id, int energyCost, ItemStack output, Object... input) {
if (output == null) {
throw new IllegalArgumentException("Cannot have a null output!");
}
addRecipe(id, new FlexibleRecipe<ItemStack>(id, output, energyCost, 0, input));
}
@Override
public void addRecipe(IFlexibleRecipe<ItemStack> recipe) {
addRecipe(recipe.getId(), recipe);
}
<<<<<<<
@Override
public void removeRecipe(IFlexibleRecipe<ItemStack> recipe) {
removeRecipe(recipe.getId());
}
=======
public IFlexibleRecipe<ItemStack> getRecipe(String id) {
return assemblyRecipes.get(id);
}
>>>>>>>
@Override
public void removeRecipe(IFlexibleRecipe<ItemStack> recipe) {
removeRecipe(recipe.getId());
} |
<<<<<<<
import org.apache.cxf.configuration.jsse.TLSClientParameters;
import org.apache.cxf.configuration.security.AuthorizationPolicy;
import org.apache.cxf.jaxrs.client.JAXRSClientFactory;
import org.apache.cxf.jaxrs.client.WebClient;
import org.apache.cxf.message.Message;
import org.apache.cxf.transport.http.HTTPConduit;
import org.apache.cxf.transport.http.auth.HttpAuthSupplier;
import java.io.File;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
=======
import javax.annotation.CheckForNull;
>>>>>>>
import javax.annotation.CheckForNull;
import java.io.IOException;
<<<<<<<
public Kubernetes createKubernetes() throws UnrecoverableKeyException, NoSuchAlgorithmException, KeyStoreException, IOException {
WebClient webClient = createWebClient();
return JAXRSClientFactory.fromClient(webClient, Kubernetes.class);
}
/**
* adapted from {@link KubernetesFactory#createWebClient(java.lang.String)} to offer programmatic configuration
* @return
*/
private WebClient createWebClient() throws NoSuchAlgorithmException, UnrecoverableKeyException, KeyStoreException, IOException {
List<Object> providers = createProviders();
AuthorizationHeaderFilter authorizationHeaderFilter = new AuthorizationHeaderFilter();
providers.add(authorizationHeaderFilter);
WebClient webClient = WebClient.create(serviceAddress, providers);
=======
public KubernetesClient createClient() {
ConfigBuilder builder = new ConfigBuilder().withMasterUrl(serviceAddress);
>>>>>>>
public KubernetesClient createClient() throws NoSuchAlgorithmException, UnrecoverableKeyException, KeyStoreException, IOException {
ConfigBuilder builder = new ConfigBuilder().withMasterUrl(serviceAddress);
<<<<<<<
if (credentials instanceof TokenProducer) {
final String token = ((TokenProducer)credentials).getToken(serviceAddress, caCertData, skipTlsVerify);
final HTTPConduit conduit = WebClient.getConfig(webClient).getHttpConduit();
conduit.setAuthSupplier(new HttpAuthSupplier() {
@Override
public boolean requiresRequestCaching() {
return false;
}
@Override
public String getAuthorization(AuthorizationPolicy authorizationPolicy, URI uri, Message message, String s) {
return "Bearer " + token;
}
});
=======
if (credentials instanceof UsernamePasswordCredentials) {
UsernamePasswordCredentials usernamePassword = (UsernamePasswordCredentials) credentials;
builder.withUsername(usernamePassword.getUsername()).withPassword(Secret.toString(usernamePassword.getPassword()));
} else if (credentials instanceof BearerTokenCredential) {
builder.withOauthToken(((BearerTokenCredential) credentials).getToken());
>>>>>>>
if (credentials instanceof TokenProducer) {
final String token = ((TokenProducer)credentials).getToken(serviceAddress, caCertData, skipTlsVerify);
builder.withOauthToken(token); |
<<<<<<<
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
=======
/**
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
>>>>>>>
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
<<<<<<<
import net.minecraft.util.EnumFacing;
=======
import net.minecraftforge.common.util.ForgeDirection;
>>>>>>>
import net.minecraft.util.EnumFacing;
import buildcraft.BuildCraftTransport;
<<<<<<<
return checkExtractFiltered(sidedInventory, doRemove, from);
}
private ItemStack[] checkExtractFiltered(ISidedInventory inventory, boolean doRemove, EnumFacing from) {
for (int k : inventory.getSlotsForFace(from)) {
ItemStack stack = inventory.getStackInSlot(k);
if (stack == null || stack.stackSize <= 0) {
continue;
}
if (!inventory.canExtractItem(k, stack, from)) {
continue;
}
boolean matches = isFiltered(stack);
boolean isBlackList = settings.getFilterMode() == FilterMode.BLACK_LIST;
if ((isBlackList && matches) || (!isBlackList && !matches)) {
continue;
}
if (doRemove) {
int maxStackSize = stack.stackSize;
int stackSize = Math.min(maxStackSize, battery.getEnergyStored() / 10);
speedMultiplier = Math.min(4.0F, battery.getEnergyStored() * 10 / stackSize);
int energyUsed = (int) (stackSize * 10 * speedMultiplier);
battery.useEnergy(energyUsed, energyUsed, false);
stack = inventory.decrStackSize(k, stackSize);
}
return new ItemStack[] { stack };
}
return null;
}
private ItemStack[] checkExtractRoundRobin(ISidedInventory inventory, boolean doRemove, EnumFacing from) {
for (int i : inventory.getSlotsForFace(from)) {
ItemStack stack = inventory.getStackInSlot(i);
if (stack != null && stack.stackSize > 0) {
ItemStack filter = getCurrentFilter();
if (filter == null) {
return null;
}
if (!StackHelper.isMatchingItemOrList(filter, stack)) {
continue;
}
if (!inventory.canExtractItem(i, stack, from)) {
continue;
}
if (doRemove) {
// In Round Robin mode, extract only 1 item regardless of power level.
stack = inventory.decrStackSize(i, 1);
incrementFilter();
} else {
stack = stack.copy();
stack.stackSize = 1;
}
return new ItemStack[] { stack };
}
}
return null;
}
private boolean isFiltered(ItemStack stack) {
for (int i = 0; i < filters.getSizeInventory(); i++) {
ItemStack filter = filters.getStackInSlot(i);
if (filter == null) {
return false;
}
if (StackHelper.isMatchingItemOrList(filter, stack)) {
return true;
}
}
return false;
}
private void incrementFilter() {
currentFilter++;
int count = 0;
while (filters.getStackInSlot(currentFilter % filters.getSizeInventory()) == null && count < filters.getSizeInventory()) {
currentFilter++;
count++;
}
}
private ItemStack getCurrentFilter() {
ItemStack filter = filters.getStackInSlot(currentFilter % filters.getSizeInventory());
if (filter == null) {
incrementFilter();
}
return filters.getStackInSlot(currentFilter % filters.getSizeInventory());
}
public IInventory getFilters() {
return filters;
}
public EmeraldPipeSettings getSettings() {
return settings;
}
@Override
public void writeData(ByteBuf data) {
NBTTagCompound nbt = new NBTTagCompound();
writeToNBT(nbt);
NetworkUtils.writeNBT(data, nbt);
}
@Override
public void readData(ByteBuf data) {
NBTTagCompound nbt = NetworkUtils.readNBT(data);
readFromNBT(nbt);
}
@Override
public void readFromNBT(NBTTagCompound nbt) {
super.readFromNBT(nbt);
filters.readFromNBT(nbt);
settings.readFromNBT(nbt);
currentFilter = nbt.getInteger("currentFilter");
}
@Override
public void writeToNBT(NBTTagCompound nbt) {
super.writeToNBT(nbt);
filters.writeToNBT(nbt);
settings.writeToNBT(nbt);
nbt.setInteger("currentFilter", currentFilter);
}
@Override
public void writeGuiData(ByteBuf data) {
data.writeByte((byte) settings.getFilterMode().ordinal());
}
@Override
public void readGuiData(ByteBuf data, EntityPlayer sender) {
settings.setFilterMode(FilterMode.values()[data.readByte()]);
}
=======
boolean matches = isFiltered(stack);
boolean isBlackList = settings.getFilterMode() == FilterMode.BLACK_LIST;
if ((isBlackList && matches) || (!isBlackList && !matches)) {
continue;
}
if (doRemove) {
int maxStackSize = stack.stackSize;
int stackSize = Math.min(maxStackSize, battery.getEnergyStored() / 10);
if (stackSize > 0) {
speedMultiplier = Math.min(4.0F, battery.getEnergyStored() * 10 / stackSize);
int energyUsed = (int) (stackSize * 10 * speedMultiplier);
battery.useEnergy(energyUsed, energyUsed, false);
stack = inventory.decrStackSize(k, stackSize);
} else {
return null;
}
}
return new ItemStack[]{stack};
}
return null;
}
private ItemStack[] checkExtractRoundRobin(ISidedInventory inventory, boolean doRemove, ForgeDirection from) {
for (int i : inventory.getAccessibleSlotsFromSide(from.ordinal())) {
ItemStack stack = inventory.getStackInSlot(i);
if (stack != null && stack.stackSize > 0) {
ItemStack filter = getCurrentFilter();
if (filter == null) {
return null;
}
if (!StackHelper.isMatchingItemOrList(filter, stack)) {
continue;
}
if (!inventory.canExtractItem(i, stack, from.ordinal())) {
continue;
}
if (doRemove) {
// In Round Robin mode, extract only 1 item regardless of power level.
stack = inventory.decrStackSize(i, 1);
incrementFilter();
} else {
stack = stack.copy();
stack.stackSize = 1;
}
return new ItemStack[]{stack};
}
}
return null;
}
private boolean isFiltered(ItemStack stack) {
for (int i = 0; i < filters.getSizeInventory(); i++) {
ItemStack filter = filters.getStackInSlot(i);
if (filter == null) {
return false;
}
if (StackHelper.isMatchingItemOrList(filter, stack)) {
return true;
}
}
return false;
}
private void incrementFilter() {
currentFilter = (currentFilter + 1) % filters.getSizeInventory();
int count = 0;
while (filters.getStackInSlot(currentFilter) == null && count < filters.getSizeInventory()) {
currentFilter = (currentFilter + 1) % filters.getSizeInventory();
count++;
}
}
private ItemStack getCurrentFilter() {
ItemStack filter = filters.getStackInSlot(currentFilter);
if (filter == null) {
incrementFilter();
}
return filters.getStackInSlot(currentFilter);
}
public IInventory getFilters() {
return filters;
}
public EmeraldPipeSettings getSettings() {
return settings;
}
@Override
public void writeData(ByteBuf data) {
NBTTagCompound nbt = new NBTTagCompound();
filters.writeToNBT(nbt);
settings.writeToNBT(nbt);
NetworkUtils.writeNBT(data, nbt);
data.writeByte(currentFilter);
}
@Override
public void readData(ByteBuf data) {
NBTTagCompound nbt = NetworkUtils.readNBT(data);
filters.readFromNBT(nbt);
settings.readFromNBT(nbt);
currentFilter = data.readUnsignedByte();
}
@Override
public void readFromNBT(NBTTagCompound nbt) {
super.readFromNBT(nbt);
filters.readFromNBT(nbt);
settings.readFromNBT(nbt);
currentFilter = nbt.getInteger("currentFilter") % filters.getSizeInventory();
}
@Override
public void writeToNBT(NBTTagCompound nbt) {
super.writeToNBT(nbt);
filters.writeToNBT(nbt);
settings.writeToNBT(nbt);
nbt.setInteger("currentFilter", currentFilter);
}
@Override
public void writeGuiData(ByteBuf data) {
data.writeByte((byte) settings.getFilterMode().ordinal());
}
@Override
public void readGuiData(ByteBuf data, EntityPlayer sender) {
settings.setFilterMode(FilterMode.values()[data.readByte()]);
}
>>>>>>>
return checkExtractFiltered(sidedInventory, doRemove, from);
}
private ItemStack[] checkExtractFiltered(ISidedInventory inventory, boolean doRemove, EnumFacing from) {
for (int k : inventory.getSlotsForFace(from)) {
ItemStack stack = inventory.getStackInSlot(k);
if (stack == null || stack.stackSize <= 0) {
continue;
}
if (!inventory.canExtractItem(k, stack, from)) {
continue;
}
boolean matches = isFiltered(stack);
boolean isBlackList = settings.getFilterMode() == FilterMode.BLACK_LIST;
if ((isBlackList && matches) || (!isBlackList && !matches)) {
continue;
}
if (doRemove) {
int maxStackSize = stack.stackSize;
int stackSize = Math.min(maxStackSize, battery.getEnergyStored() / 10);
if (stackSize > 0) {
speedMultiplier = Math.min(4.0F, battery.getEnergyStored() * 10 / stackSize);
int energyUsed = (int) (stackSize * 10 * speedMultiplier);
battery.useEnergy(energyUsed, energyUsed, false);
stack = inventory.decrStackSize(k, stackSize);
} else {
return null;
}
}
return new ItemStack[] { stack };
}
return null;
}
private ItemStack[] checkExtractRoundRobin(ISidedInventory inventory, boolean doRemove, EnumFacing from) {
for (int i : inventory.getSlotsForFace(from)) {
ItemStack stack = inventory.getStackInSlot(i);
if (stack != null && stack.stackSize > 0) {
ItemStack filter = getCurrentFilter();
if (filter == null) {
return null;
}
if (!StackHelper.isMatchingItemOrList(filter, stack)) {
continue;
}
if (!inventory.canExtractItem(i, stack, from)) {
continue;
}
if (doRemove) {
// In Round Robin mode, extract only 1 item regardless of power level.
stack = inventory.decrStackSize(i, 1);
incrementFilter();
} else {
stack = stack.copy();
stack.stackSize = 1;
}
return new ItemStack[] { stack };
}
}
return null;
}
private boolean isFiltered(ItemStack stack) {
for (int i = 0; i < filters.getSizeInventory(); i++) {
ItemStack filter = filters.getStackInSlot(i);
if (filter == null) {
return false;
}
if (StackHelper.isMatchingItemOrList(filter, stack)) {
return true;
}
}
return false;
}
private void incrementFilter() {
currentFilter = (currentFilter + 1) % filters.getSizeInventory();
int count = 0;
while (filters.getStackInSlot(currentFilter) == null && count < filters.getSizeInventory()) {
currentFilter = (currentFilter + 1) % filters.getSizeInventory();
count++;
}
}
private ItemStack getCurrentFilter() {
ItemStack filter = filters.getStackInSlot(currentFilter);
if (filter == null) {
incrementFilter();
}
return filters.getStackInSlot(currentFilter);
}
public IInventory getFilters() {
return filters;
}
public EmeraldPipeSettings getSettings() {
return settings;
}
@Override
public void writeData(ByteBuf data) {
NBTTagCompound nbt = new NBTTagCompound();
filters.writeToNBT(nbt);
settings.writeToNBT(nbt);
NetworkUtils.writeNBT(data, nbt);
data.writeByte(currentFilter);
}
@Override
public void readData(ByteBuf data) {
NBTTagCompound nbt = NetworkUtils.readNBT(data);
filters.readFromNBT(nbt);
settings.readFromNBT(nbt);
currentFilter = data.readUnsignedByte();
}
@Override
public void readFromNBT(NBTTagCompound nbt) {
super.readFromNBT(nbt);
filters.readFromNBT(nbt);
settings.readFromNBT(nbt);
currentFilter = nbt.getInteger("currentFilter") % filters.getSizeInventory();
}
@Override
public void writeToNBT(NBTTagCompound nbt) {
super.writeToNBT(nbt);
filters.writeToNBT(nbt);
settings.writeToNBT(nbt);
nbt.setInteger("currentFilter", currentFilter);
}
@Override
public void writeGuiData(ByteBuf data) {
data.writeByte((byte) settings.getFilterMode().ordinal());
}
@Override
public void readGuiData(ByteBuf data, EntityPlayer sender) {
settings.setFilterMode(FilterMode.values()[data.readByte()]);
} |
<<<<<<<
import static org.apache.commons.lang.StringUtils.isBlank;
import static org.csanchez.jenkins.plugins.kubernetes.KubernetesCloud.*;
import static org.csanchez.jenkins.plugins.kubernetes.PodTemplateUtils.*;
import java.net.MalformedURLException;
import java.net.URL;
=======
>>>>>>>
import static org.apache.commons.lang.StringUtils.isBlank;
import static org.csanchez.jenkins.plugins.kubernetes.PodTemplateUtils.*;
import java.net.MalformedURLException;
import java.net.URL;
<<<<<<<
import jenkins.model.Jenkins;
=======
import static org.csanchez.jenkins.plugins.kubernetes.KubernetesCloud.JNLP_NAME;
import static org.csanchez.jenkins.plugins.kubernetes.PodTemplateUtils.combine;
import static org.csanchez.jenkins.plugins.kubernetes.PodTemplateUtils.substituteEnv;
>>>>>>>
import jenkins.model.Jenkins;
import static org.csanchez.jenkins.plugins.kubernetes.KubernetesCloud.JNLP_NAME;
import static org.csanchez.jenkins.plugins.kubernetes.PodTemplateUtils.combine;
import static org.csanchez.jenkins.plugins.kubernetes.PodTemplateUtils.substituteEnv; |
<<<<<<<
=======
import cpw.mods.fml.client.IModGuiFactory;
import cpw.mods.fml.client.config.GuiConfig;
import cpw.mods.fml.client.config.IConfigElement;
>>>>>>>
<<<<<<<
public static Configuration config;
private final BuildCraftMod mod;
public static class GuiConfigManager extends GuiConfig {
public GuiConfigManager(GuiScreen parentScreen) {
super(parentScreen, new ArrayList<IConfigElement>(), "BuildCraft|Core", "config", false, false, I18n.format("config.buildcraft"));
for (String s : config.getCategoryNames()) {
if (!s.contains(".")) {
configElements.add(new BCConfigElement(config.getCategory(s)));
}
}
}
}
public enum RestartRequirement {
NONE,
WORLD,
GAME;
}
/** Needed for forge IModGuiFactory */
public ConfigManager() {
mod = null;
}
public ConfigManager(Configuration c, BuildCraftMod mod) {
config = c;
this.mod = mod;
}
public ConfigCategory getCat(String name) {
return config.getCategory(name);
}
public Property get(String iName) {
int sep = iName.lastIndexOf(".");
return get(iName.substring(0, sep), iName.substring(sep + 1));
}
public Property get(String catName, String propName) {
ConfigCategory c = config.getCategory(catName);
return c.get(propName);
}
private Property create(String s, Object o) {
Property p = null;
if (o instanceof Integer) {
p = new Property(s, o.toString(), Property.Type.INTEGER);
} else if (o instanceof String) {
p = new Property(s, (String) o, Property.Type.STRING);
} else if (o instanceof Double) {
p = new Property(s, o.toString(), Property.Type.DOUBLE);
} else if (o instanceof Float) {
p = new Property(s, o.toString(), Property.Type.DOUBLE);
} else if (o instanceof Boolean) {
p = new Property(s, o.toString(), Property.Type.BOOLEAN);
} else if (o instanceof String[]) {
p = new Property(s, (String[]) o, Property.Type.STRING);
} else {
return null;
}
return p;
}
public Property register(String catName, String propName, Object property, String comment, RestartRequirement restartRequirement) {
ConfigCategory c = config.getCategory(catName);
ConfigCategory parent = c;
while (parent != null) {
parent.setLanguageKey("config." + parent.getQualifiedName());
parent = parent.parent;
}
Property p;
if (c.get(propName) != null) {
p = c.get(propName);
} else {
p = create(propName, property);
c.put(propName, p);
}
p.comment = comment;
RestartRequirement r = restartRequirement;
p.setLanguageKey("config." + catName + "." + propName);
p.setRequiresWorldRestart(r == RestartRequirement.WORLD);
p.setRequiresMcRestart(r == RestartRequirement.GAME);
mod.putOption(catName + "." + propName, p);
return p;
}
public Property register(String name, Object property, String comment, RestartRequirement restartRequirement) {
String prefix = name.substring(0, name.lastIndexOf("."));
String suffix = name.substring(name.lastIndexOf(".") + 1);
return register(prefix, suffix, property, comment, restartRequirement);
}
@Override
public void initialize(Minecraft minecraftInstance) {
}
@Override
public Class<? extends GuiScreen> mainConfigGuiClass() {
return GuiConfigManager.class;
}
@Override
public Set<RuntimeOptionCategoryElement> runtimeGuiCategories() {
return null;
}
@Override
public RuntimeOptionGuiHandler getHandlerFor(RuntimeOptionCategoryElement element) {
return null;
}
=======
public static Configuration config;
public static class GuiConfigManager extends GuiConfig {
public GuiConfigManager(GuiScreen parentScreen) {
super(parentScreen, new ArrayList<IConfigElement>(), "BuildCraft|Core", "config", false, false, I18n.format("config.buildcraft"));
for (String s : config.getCategoryNames()) {
if (!s.contains(".")) {
configElements.add(new BCConfigElement<Object>(config.getCategory(s)));
}
}
}
}
public enum RestartRequirement {
NONE, WORLD, GAME
}
public ConfigManager() {
}
public ConfigManager(Configuration c) {
config = c;
}
public ConfigCategory getCat(String name) {
return config.getCategory(name);
}
public Property get(String iName) {
int sep = iName.lastIndexOf(".");
return get(iName.substring(0, sep), iName.substring(sep + 1));
}
public Property get(String catName, String propName) {
ConfigCategory c = config.getCategory(catName);
return c.get(propName);
}
private Property create(String s, Object o) {
Property p;
if (o instanceof Integer) {
p = new Property(s, o.toString(), Property.Type.INTEGER);
} else if (o instanceof String) {
p = new Property(s, (String) o, Property.Type.STRING);
} else if (o instanceof Double || o instanceof Float) {
p = new Property(s, o.toString(), Property.Type.DOUBLE);
} else if (o instanceof Boolean) {
p = new Property(s, o.toString(), Property.Type.BOOLEAN);
} else if (o instanceof String[]) {
p = new Property(s, (String[]) o, Property.Type.STRING);
} else {
return null;
}
return p;
}
public Property register(String catName, String propName, Object property, String comment, RestartRequirement restartRequirement) {
ConfigCategory c = config.getCategory(catName);
ConfigCategory parent = c;
while (parent != null) {
parent.setLanguageKey("config." + parent.getQualifiedName());
parent = parent.parent;
}
Property p;
if (c.get(propName) != null) {
p = c.get(propName);
} else {
p = create(propName, property);
c.put(propName, p);
}
p.comment = comment;
RestartRequirement r = restartRequirement;
p.setLanguageKey("config." + catName + "." + propName);
p.setRequiresWorldRestart(r == RestartRequirement.WORLD);
p.setRequiresMcRestart(r == RestartRequirement.GAME);
return p;
}
public Property register(String name, Object property, String comment, RestartRequirement restartRequirement) {
String prefix = name.substring(0, name.lastIndexOf("."));
String suffix = name.substring(name.lastIndexOf(".") + 1);
return register(prefix, suffix, property, comment, restartRequirement);
}
@Override
public void initialize(Minecraft minecraftInstance) {
}
@Override
public Class<? extends GuiScreen> mainConfigGuiClass() {
return GuiConfigManager.class;
}
@Override
public Set<RuntimeOptionCategoryElement> runtimeGuiCategories() {
return null;
}
@Override
public RuntimeOptionGuiHandler getHandlerFor(RuntimeOptionCategoryElement element) {
return null;
}
>>>>>>>
public static Configuration config;
private final BuildCraftMod mod;
public static class GuiConfigManager extends GuiConfig {
public GuiConfigManager(GuiScreen parentScreen) {
super(parentScreen, new ArrayList<IConfigElement>(), "BuildCraft|Core", "config", false, false, I18n.format("config.buildcraft"));
for (String s : config.getCategoryNames()) {
if (!s.contains(".")) {
configElements.add(new BCConfigElement<Object>(config.getCategory(s)));
}
}
}
}
public enum RestartRequirement {
NONE,
WORLD,
GAME;
}
/** Needed for forge IModGuiFactory */
public ConfigManager() {
mod = null;
}
public ConfigManager(Configuration c, BuildCraftMod mod) {
config = c;
this.mod = mod;
}
public ConfigCategory getCat(String name) {
return config.getCategory(name);
}
public Property get(String iName) {
int sep = iName.lastIndexOf(".");
return get(iName.substring(0, sep), iName.substring(sep + 1));
}
public Property get(String catName, String propName) {
ConfigCategory c = config.getCategory(catName);
return c.get(propName);
}
private Property create(String s, Object o) {
Property p;
if (o instanceof Integer) {
p = new Property(s, o.toString(), Property.Type.INTEGER);
} else if (o instanceof String) {
p = new Property(s, (String) o, Property.Type.STRING);
} else if (o instanceof Double || o instanceof Float) {
p = new Property(s, o.toString(), Property.Type.DOUBLE);
} else if (o instanceof Float) {
p = new Property(s, o.toString(), Property.Type.DOUBLE);
} else if (o instanceof Boolean) {
p = new Property(s, o.toString(), Property.Type.BOOLEAN);
} else if (o instanceof String[]) {
p = new Property(s, (String[]) o, Property.Type.STRING);
} else {
return null;
}
return p;
}
public Property register(String catName, String propName, Object property, String comment, RestartRequirement restartRequirement) {
ConfigCategory c = config.getCategory(catName);
ConfigCategory parent = c;
while (parent != null) {
parent.setLanguageKey("config." + parent.getQualifiedName());
parent = parent.parent;
}
Property p;
if (c.get(propName) != null) {
p = c.get(propName);
} else {
p = create(propName, property);
c.put(propName, p);
}
p.comment = comment;
RestartRequirement r = restartRequirement;
p.setLanguageKey("config." + catName + "." + propName);
p.setRequiresWorldRestart(r == RestartRequirement.WORLD);
p.setRequiresMcRestart(r == RestartRequirement.GAME);
mod.putOption(catName + "." + propName, p);
return p;
}
public Property register(String name, Object property, String comment, RestartRequirement restartRequirement) {
String prefix = name.substring(0, name.lastIndexOf("."));
String suffix = name.substring(name.lastIndexOf(".") + 1);
return register(prefix, suffix, property, comment, restartRequirement);
}
@Override
public void initialize(Minecraft minecraftInstance) {
}
@Override
public Class<? extends GuiScreen> mainConfigGuiClass() {
return GuiConfigManager.class;
}
@Override
public Set<RuntimeOptionCategoryElement> runtimeGuiCategories() {
return null;
}
@Override
public RuntimeOptionGuiHandler getHandlerFor(RuntimeOptionCategoryElement element) {
return null;
} |
<<<<<<<
import buildcraft.core.render.RenderingOil;
import buildcraft.core.robots.EntityRobot;
import buildcraft.core.robots.EntityRobotBuilder;
=======
>>>>>>>
import buildcraft.core.robots.EntityRobot;
import buildcraft.core.robots.EntityRobotBuilder;
<<<<<<<
=======
import com.mojang.authlib.GameProfile;
>>>>>>> |
<<<<<<<
renderTank(sizes.tankIn, tile.smoothedTankIn, combinedLight, partialTicks, bb);
renderTank(sizes.tankOutGas, tile.smoothedTankOutGas, combinedLight, partialTicks, bb);
renderTank(sizes.tankOutLiquid, tile.smoothedTankOutLiquid, combinedLight, partialTicks, bb);
=======
renderTank(sizes.tankIn, tile.smoothedTankIn, combinedLight, partialTicks, vb);
renderTank(sizes.tankOutGas, tile.smoothedTankGasOut, combinedLight, partialTicks, vb);
renderTank(sizes.tankOutLiquid, tile.smoothedTankLiquidOut, combinedLight, partialTicks, vb);
>>>>>>>
renderTank(sizes.tankIn, tile.smoothedTankIn, combinedLight, partialTicks, bb);
renderTank(sizes.tankOutGas, tile.smoothedTankGasOut, combinedLight, partialTicks, bb);
renderTank(sizes.tankOutLiquid, tile.smoothedTankLiquidOut, combinedLight, partialTicks, bb); |
<<<<<<<
private int slaveConnectTimeout;
private int activeDeadlineSeconds;
=======
private int slaveConnectTimeout = PodTemplate.DEFAULT_SLAVE_JENKINS_CONNECTION_TIMEOUT;
>>>>>>>
private int slaveConnectTimeout = PodTemplate.DEFAULT_SLAVE_JENKINS_CONNECTION_TIMEOUT;
private int activeDeadlineSeconds; |
<<<<<<<
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
=======
/**
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
>>>>>>>
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
<<<<<<<
=======
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraftforge.common.util.ForgeDirection;
>>>>>>>
<<<<<<<
@Override
public String getDescription() {
return StringUtils.localize("gate.trigger.redstone.input." + (active ? "active" : "inactive"));
}
=======
@Override
public String getDescription() {
return StringUtils.localize("gate.trigger.redstone.input." + (active ? "active" : "inactive"));
}
@Override
public IStatementParameter createParameter(int index) {
IStatementParameter param = null;
if (index == 0) {
param = new StatementParameterRedstoneGateSideOnly();
}
return param;
}
@Override
public int maxParameters() {
return 1;
}
>>>>>>>
@Override
public String getDescription() {
return StringUtils.localize("gate.trigger.redstone.input." + (active ? "active" : "inactive"));
} |
<<<<<<<
import buildcraft.builders.blueprints.BlueprintDatabase;
import java.io.File;
import java.util.TreeMap;
import java.util.logging.Logger;
import net.minecraft.block.Block;
import net.minecraft.block.BlockFluid;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.EntityList;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Icon;
import net.minecraftforge.client.event.TextureStitchEvent;
import net.minecraftforge.common.Configuration;
import net.minecraftforge.common.IPlantable;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.common.Property;
import net.minecraftforge.event.ForgeSubscribe;
=======
>>>>>>> |
<<<<<<<
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
=======
/**
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
>>>>>>>
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
<<<<<<<
import net.minecraftforge.client.event.ModelBakeEvent;
=======
import cpw.mods.fml.client.event.ConfigChangedEvent;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLInterModComms;
import cpw.mods.fml.common.event.FMLInterModComms.IMCEvent;
import cpw.mods.fml.common.event.FMLMissingMappingsEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.event.FMLServerStartingEvent;
import cpw.mods.fml.common.event.FMLServerStoppingEvent;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.TickEvent;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
>>>>>>>
import net.minecraftforge.client.event.ModelBakeEvent; |
<<<<<<<
@Test(timeout = 40000)
=======
/**
* Test that multiple command execution in parallel works
* @throws Exception
*/
@Test(timeout = 10000)
>>>>>>>
/**
* Test that multiple command execution in parallel works
* @throws Exception
*/
@Test(timeout = 40000) |
<<<<<<<
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
=======
/**
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
>>>>>>>
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
<<<<<<<
=======
import cpw.mods.fml.relauncher.Side;
>>>>>>>
<<<<<<<
import buildcraft.core.lib.network.base.Packet;
=======
import buildcraft.core.lib.fluids.Tank;
import buildcraft.core.lib.network.Packet;
>>>>>>>
import buildcraft.core.lib.fluids.Tank;
import buildcraft.core.lib.network.base.Packet;
<<<<<<<
import io.netty.buffer.ByteBuf;
=======
public abstract class TileAbstractBuilder extends TileBuildCraft implements ITileBuilder, IInventory, IBoxProvider,
IBuildingItemsProvider, ICommandReceiver {
public LinkedList<LaserData> pathLasers = new LinkedList<LaserData>();
public HashSet<BuildingItem> buildersInAction = new HashSet<BuildingItem>();
private int rfPrev = 0;
private int rfUnchangedCycles = 0;
public TileAbstractBuilder() {
super();
/**
* The builder should not act as a gigantic energy buffer, thus we keep enough
* build energy to build about 2 stacks' worth of blocks.
*/
this.setBattery(new RFBattery(2 * 64 * BuilderAPI.BUILD_ENERGY, 1000, 0));
}
@Override
public void initialize() {
super.initialize();
if (worldObj.isRemote) {
BuildCraftCore.instance.sendToServer(new PacketCommand(this, "uploadBuildersInAction", null));
}
}
private Packet createLaunchItemPacket(final BuildingItem i) {
return new PacketCommand(this, "launchItem", new CommandWriter() {
public void write(ByteBuf data) {
i.writeData(data);
}
});
}
@Override
public void receiveCommand(String command, Side side, Object sender, ByteBuf stream) {
if (side.isServer() && "uploadBuildersInAction".equals(command)) {
for (BuildingItem i : buildersInAction) {
BuildCraftCore.instance.sendToPlayer((EntityPlayer) sender, createLaunchItemPacket(i));
}
} else if (side.isClient() && "launchItem".equals(command)) {
BuildingItem item = new BuildingItem();
item.readData(stream);
buildersInAction.add(item);
}
}
@Override
public void updateEntity() {
super.updateEntity();
RFBattery battery = this.getBattery();
if (rfPrev != battery.getEnergyStored()) {
rfPrev = battery.getEnergyStored();
rfUnchangedCycles = 0;
}
Iterator<BuildingItem> itemIterator = buildersInAction.iterator();
BuildingItem i;
while (itemIterator.hasNext()) {
i = itemIterator.next();
i.update();
if (i.isDone()) {
itemIterator.remove();
}
}
if (rfPrev != battery.getEnergyStored()) {
rfPrev = battery.getEnergyStored();
rfUnchangedCycles = 0;
}
rfUnchangedCycles++;
>>>>>>>
import io.netty.buffer.ByteBuf; |
<<<<<<<
import buildcraft.transport.blueprints.BptBlockPipe;
=======
>>>>>>>
import buildcraft.transport.blueprints.BptBlockPipe;
<<<<<<<
=======
import java.util.LinkedList;
import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import net.minecraftforge.common.config.Configuration;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.common.config.Property;
import net.minecraftforge.oredict.RecipeSorter;
>>>>>>>
<<<<<<<
pipeWaterproof = new ItemBuildCraft(CreativeTabBuildCraft.TIER_2);
=======
Property facadeBlacklistProp = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_GENERAL, "facade.blacklist", new String[] {
Block.blockRegistry.getNameForObject(Blocks.bedrock),
Block.blockRegistry.getNameForObject(Blocks.command_block),
Block.blockRegistry.getNameForObject(Blocks.end_portal_frame),
Block.blockRegistry.getNameForObject(Blocks.grass),
Block.blockRegistry.getNameForObject(Blocks.leaves),
Block.blockRegistry.getNameForObject(Blocks.leaves2),
Block.blockRegistry.getNameForObject(Blocks.lit_pumpkin),
Block.blockRegistry.getNameForObject(Blocks.lit_redstone_lamp),
Block.blockRegistry.getNameForObject(Blocks.mob_spawner),
Block.blockRegistry.getNameForObject(Blocks.monster_egg),
Block.blockRegistry.getNameForObject(Blocks.redstone_lamp),
Block.blockRegistry.getNameForObject(Blocks.double_stone_slab),
Block.blockRegistry.getNameForObject(Blocks.double_wooden_slab),
Block.blockRegistry.getNameForObject(Blocks.sponge),
BuildCraftConfiguration.surroundWithQuotes(Block.blockRegistry.getNameForObject(BuildCraftBuilders.architectBlock)),
BuildCraftConfiguration.surroundWithQuotes(Block.blockRegistry.getNameForObject(BuildCraftBuilders.builderBlock)),
BuildCraftConfiguration.surroundWithQuotes(Block.blockRegistry.getNameForObject(BuildCraftBuilders.fillerBlock)),
BuildCraftConfiguration.surroundWithQuotes(Block.blockRegistry.getNameForObject(BuildCraftBuilders.libraryBlock)),
BuildCraftConfiguration.surroundWithQuotes(Block.blockRegistry.getNameForObject(BuildCraftFactory.autoWorkbenchBlock)),
BuildCraftConfiguration.surroundWithQuotes(Block.blockRegistry.getNameForObject(BuildCraftFactory.floodGateBlock)),
BuildCraftConfiguration.surroundWithQuotes(Block.blockRegistry.getNameForObject(BuildCraftFactory.miningWellBlock)),
BuildCraftConfiguration.surroundWithQuotes(Block.blockRegistry.getNameForObject(BuildCraftFactory.pumpBlock)),
BuildCraftConfiguration.surroundWithQuotes(Block.blockRegistry.getNameForObject(BuildCraftFactory.quarryBlock)),
BuildCraftConfiguration.surroundWithQuotes(Block.blockRegistry.getNameForObject(BuildCraftTransport.filteredBufferBlock)),
});
facadeBlacklistProp.comment = "Blocks listed here will not have facades created. The format is modid:blockname.\nFor mods with a | character, the value needs to be surrounded with quotes.";
facadeBlacklist = facadeBlacklistProp.getStringList();
pipeWaterproof = new ItemBuildCraft();
>>>>>>>
Property facadeBlacklistProp = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_GENERAL, "facade.blacklist", new String[] {
Block.blockRegistry.getNameForObject(Blocks.bedrock),
Block.blockRegistry.getNameForObject(Blocks.command_block),
Block.blockRegistry.getNameForObject(Blocks.end_portal_frame),
Block.blockRegistry.getNameForObject(Blocks.grass),
Block.blockRegistry.getNameForObject(Blocks.leaves),
Block.blockRegistry.getNameForObject(Blocks.leaves2),
Block.blockRegistry.getNameForObject(Blocks.lit_pumpkin),
Block.blockRegistry.getNameForObject(Blocks.lit_redstone_lamp),
Block.blockRegistry.getNameForObject(Blocks.mob_spawner),
Block.blockRegistry.getNameForObject(Blocks.monster_egg),
Block.blockRegistry.getNameForObject(Blocks.redstone_lamp),
Block.blockRegistry.getNameForObject(Blocks.double_stone_slab),
Block.blockRegistry.getNameForObject(Blocks.double_wooden_slab),
Block.blockRegistry.getNameForObject(Blocks.sponge),
BuildCraftConfiguration.surroundWithQuotes(Block.blockRegistry.getNameForObject(BuildCraftBuilders.architectBlock)),
BuildCraftConfiguration.surroundWithQuotes(Block.blockRegistry.getNameForObject(BuildCraftBuilders.builderBlock)),
BuildCraftConfiguration.surroundWithQuotes(Block.blockRegistry.getNameForObject(BuildCraftBuilders.fillerBlock)),
BuildCraftConfiguration.surroundWithQuotes(Block.blockRegistry.getNameForObject(BuildCraftBuilders.libraryBlock)),
BuildCraftConfiguration.surroundWithQuotes(Block.blockRegistry.getNameForObject(BuildCraftFactory.autoWorkbenchBlock)),
BuildCraftConfiguration.surroundWithQuotes(Block.blockRegistry.getNameForObject(BuildCraftFactory.floodGateBlock)),
BuildCraftConfiguration.surroundWithQuotes(Block.blockRegistry.getNameForObject(BuildCraftFactory.miningWellBlock)),
BuildCraftConfiguration.surroundWithQuotes(Block.blockRegistry.getNameForObject(BuildCraftFactory.pumpBlock)),
BuildCraftConfiguration.surroundWithQuotes(Block.blockRegistry.getNameForObject(BuildCraftFactory.quarryBlock)),
BuildCraftConfiguration.surroundWithQuotes(Block.blockRegistry.getNameForObject(BuildCraftTransport.filteredBufferBlock)),
});
facadeBlacklistProp.comment = "Blocks listed here will not have facades created. The format is modid:blockname.\nFor mods with a | character, the value needs to be surrounded with quotes.";
facadeBlacklist = facadeBlacklistProp.getStringList();
pipeWaterproof = new ItemBuildCraft(CreativeTabBuildCraft.TIER_2);
<<<<<<<
robotStationItem = new ItemRobotStation();
robotStationItem.setUnlocalizedName("robotStation");
CoreProxy.proxy.registerItem(robotStationItem);
filteredBufferBlock = new BlockFilteredBuffer();
CoreProxy.proxy.registerBlock(filteredBufferBlock.setBlockName("filteredBufferBlock"));
=======
>>>>>>>
robotStationItem = new ItemRobotStation();
robotStationItem.setUnlocalizedName("robotStation");
CoreProxy.proxy.registerItem(robotStationItem);
filteredBufferBlock = new BlockFilteredBuffer();
CoreProxy.proxy.registerBlock(filteredBufferBlock.setBlockName("filteredBufferBlock")); |
<<<<<<<
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
=======
/**
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
>>>>>>>
/**
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
<<<<<<<
=======
import cpw.mods.fml.relauncher.Side;
>>>>>>>
<<<<<<<
=======
import buildcraft.api.core.BCLog;
import buildcraft.api.core.BlockIndex;
>>>>>>>
import buildcraft.api.core.BCLog;
<<<<<<<
import buildcraft.api.enums.EnumBlueprintType;
import buildcraft.api.properties.BuildCraftProperties;
import buildcraft.api.robots.EntityRobotBase;
=======
import buildcraft.api.core.IPathProvider;
import buildcraft.api.core.Position;
import buildcraft.api.core.SafeTimeTracker;
>>>>>>>
import buildcraft.api.core.IPathProvider;
import buildcraft.api.core.SafeTimeTracker;
import buildcraft.api.enums.EnumBlueprintType;
import buildcraft.api.properties.BuildCraftProperties; |
<<<<<<<
renderer.render(plug, x, y, z, partialTicks, bb);
=======
Minecraft.getMinecraft().mcProfiler.startSection(plug.getClass());
renderer.render(plug, x, y, z, partialTicks, vb);
Minecraft.getMinecraft().mcProfiler.endSection();
>>>>>>>
Minecraft.getMinecraft().mcProfiler.startSection(plug.getClass());
renderer.render(plug, x, y, z, partialTicks, bb);
Minecraft.getMinecraft().mcProfiler.endSection();
<<<<<<<
renderer.render(flow, x, y, z, partialTicks, bb);
=======
Minecraft.getMinecraft().mcProfiler.startSection(flow.getClass());
renderer.render(flow, x, y, z, partialTicks, vb);
Minecraft.getMinecraft().mcProfiler.endSection();
>>>>>>>
Minecraft.getMinecraft().mcProfiler.startSection(flow.getClass());
renderer.render(flow, x, y, z, partialTicks, bb);
Minecraft.getMinecraft().mcProfiler.endSection();
<<<<<<<
renderer.render(behaviour, x, y, z, partialTicks, bb);
=======
Minecraft.getMinecraft().mcProfiler.startSection(behaviour.getClass());
renderer.render(behaviour, x, y, z, partialTicks, vb);
Minecraft.getMinecraft().mcProfiler.endSection();
>>>>>>>
Minecraft.getMinecraft().mcProfiler.startSection(behaviour.getClass());
renderer.render(behaviour, x, y, z, partialTicks, bb);
Minecraft.getMinecraft().mcProfiler.endSection(); |
<<<<<<<
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
=======
/**
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
>>>>>>>
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */ |
<<<<<<<
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
=======
/**
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
>>>>>>>
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
<<<<<<<
=======
import net.minecraftforge.common.util.ForgeDirection;
>>>>>>>
<<<<<<<
private BlockPos useToBlock;
private int useCycles = 0;
public AIRobotStripesHandler(EntityRobotBase iRobot) {
super(iRobot);
}
public AIRobotStripesHandler(EntityRobotBase iRobot, BlockPos index) {
this(iRobot);
useToBlock = index;
}
@Override
public void start() {
robot.aimItemAt(useToBlock);
robot.setItemActive(true);
}
@Override
public void update() {
useCycles++;
if (useCycles > 60) {
ItemStack stack = robot.getHeldItem();
EnumFacing direction = EnumFacing.NORTH;
EntityPlayer player = CoreProxy.proxy.getBuildCraftPlayer((WorldServer) robot.worldObj, useToBlock).get();
player.rotationPitch = 0;
player.rotationYaw = 180;
for (IStripesHandler handler : PipeManager.stripesHandlers) {
if (handler.getType() == StripesHandlerType.ITEM_USE && handler.shouldHandle(stack)) {
if (handler.handle(robot.worldObj, useToBlock, direction, stack, player, this)) {
robot.setItemInUse(null);
terminate();
return;
}
}
}
terminate();
}
}
@Override
public void end() {
robot.setItemActive(false);
}
@Override
public int getEnergyCost() {
return 15;
}
@Override
public void sendItem(ItemStack stack, EnumFacing direction) {
InvUtils.dropItems(robot.worldObj, stack, Utils.getPos(robot));
}
@Override
public void dropItem(ItemStack stack, EnumFacing direction) {
sendItem(stack, direction);
}
=======
private BlockIndex useToBlock;
private int useCycles = 0;
public AIRobotStripesHandler(EntityRobotBase iRobot) {
super(iRobot);
}
public AIRobotStripesHandler(EntityRobotBase iRobot, BlockIndex index) {
this(iRobot);
useToBlock = index;
}
@Override
public void start() {
robot.aimItemAt(useToBlock.x, useToBlock.y, useToBlock.z);
robot.setItemActive(true);
}
@Override
public void update() {
if (useToBlock == null) {
setSuccess(false);
terminate();
return;
}
useCycles++;
if (useCycles > 60) {
ItemStack stack = robot.getHeldItem();
ForgeDirection direction = ForgeDirection.NORTH;
Position p = new Position(useToBlock.x, useToBlock.y, useToBlock.z);
EntityPlayer player = CoreProxy.proxy.getBuildCraftPlayer(
(WorldServer) robot.worldObj, (int) p.x, (int) p.y,
(int) p.z).get();
player.rotationPitch = 0;
player.rotationYaw = 180;
for (IStripesHandler handler : PipeManager.stripesHandlers) {
if (handler.getType() == StripesHandlerType.ITEM_USE
&& handler.shouldHandle(stack)) {
if (handler.handle(robot.worldObj, (int) p.x, (int) p.y,
(int) p.z, direction, stack, player, this)) {
robot.setItemInUse(null);
terminate();
return;
}
}
}
terminate();
}
}
@Override
public void end() {
robot.setItemActive(false);
}
@Override
public int getEnergyCost() {
return 15;
}
@Override
public void sendItem(ItemStack stack, ForgeDirection direction) {
InvUtils.dropItems(robot.worldObj, stack, (int) Math.floor(robot.posX),
(int) Math.floor(robot.posY), (int) Math.floor(robot.posZ));
}
@Override
public void dropItem(ItemStack stack, ForgeDirection direction) {
sendItem(stack, direction);
}
>>>>>>>
private BlockPos useToBlock;
private int useCycles = 0;
public AIRobotStripesHandler(EntityRobotBase iRobot) {
super(iRobot);
}
public AIRobotStripesHandler(EntityRobotBase iRobot, BlockPos index) {
this(iRobot);
useToBlock = index;
}
@Override
public void start() {
robot.aimItemAt(useToBlock);
robot.setItemActive(true);
}
@Override
public void update() {
if (useToBlock == null) {
setSuccess(false);
terminate();
return;
}
useCycles++;
if (useCycles > 60) {
ItemStack stack = robot.getHeldItem();
EnumFacing direction = EnumFacing.NORTH;
EntityPlayer player = CoreProxy.proxy.getBuildCraftPlayer((WorldServer) robot.worldObj, useToBlock).get();
player.rotationPitch = 0;
player.rotationYaw = 180;
for (IStripesHandler handler : PipeManager.stripesHandlers) {
if (handler.getType() == StripesHandlerType.ITEM_USE && handler.shouldHandle(stack)) {
if (handler.handle(robot.worldObj, useToBlock, direction, stack, player, this)) {
robot.setItemInUse(null);
terminate();
return;
}
}
}
terminate();
}
}
@Override
public void end() {
robot.setItemActive(false);
}
@Override
public int getEnergyCost() {
return 15;
}
@Override
public void sendItem(ItemStack stack, EnumFacing direction) {
InvUtils.dropItems(robot.worldObj, stack, Utils.getPos(robot));
}
@Override
public void dropItem(ItemStack stack, EnumFacing direction) {
sendItem(stack, direction);
} |
<<<<<<<
import buildcraft.factory.client.render.RenderMiningWell;
import buildcraft.factory.client.render.RenderPump;
import buildcraft.factory.client.render.RenderTank;
import buildcraft.factory.client.render.RenderTube;
import buildcraft.factory.container.ContainerAutoCraftItems;
import buildcraft.factory.container.ContainerChute;
import buildcraft.factory.gui.GuiAutoCraftItems;
import buildcraft.factory.gui.GuiChute;
import buildcraft.factory.tile.*;
import buildcraft.factory.tile.TileChute;
import buildcraft.factory.tile.TileMiningWell;
import buildcraft.factory.tile.TilePump;
import buildcraft.factory.tile.TileTank;
import buildcraft.lib.client.render.tile.RenderMultiRenderers;
import buildcraft.lib.client.sprite.SpriteHolderRegistry;
=======
>>>>>>>
<<<<<<<
import net.minecraftforge.client.model.obj.OBJLoader;
=======
>>>>>>>
import net.minecraftforge.client.model.obj.OBJLoader;
<<<<<<<
TileMiningWell.TUBE_END_TEXTURE = SpriteHolderRegistry.getHolder(new ResourceLocation("buildcraftfactory", "blocks/plain_pipe/end"));
TileMiningWell.TUBE_SIDE_TEXTURE = SpriteHolderRegistry.getHolder(new ResourceLocation("buildcraftfactory", "blocks/plain_pipe/side"));
ClientRegistry.bindTileEntitySpecialRenderer(TileMiningWell.class, new RenderMultiRenderers(new RenderMiningWell(), new RenderTube()));
TilePump.TUBE_END_TEXTURE = SpriteHolderRegistry.getHolder(new ResourceLocation("buildcraftfactory", "blocks/tube/end"));
TilePump.TUBE_SIDE_TEXTURE = SpriteHolderRegistry.getHolder(new ResourceLocation("buildcraftfactory", "blocks/tube/side"));
ClientRegistry.bindTileEntitySpecialRenderer(TilePump.class, new RenderMultiRenderers(new RenderPump(), new RenderTube()));
ClientRegistry.bindTileEntitySpecialRenderer(TileTank.class, new RenderTank());
OBJLoader.INSTANCE.addDomain("buildcraftfactory");
=======
ClientRegistry.bindTileEntitySpecialRenderer(TileMiningWell.class, new RenderMiningWell());
ClientRegistry.bindTileEntitySpecialRenderer(TilePump.class, new RenderPump());
// ClientRegistry.bindTileEntitySpecialRenderer(TileTank.class, new RenderTank());
>>>>>>>
ClientRegistry.bindTileEntitySpecialRenderer(TileMiningWell.class, new RenderMiningWell());
ClientRegistry.bindTileEntitySpecialRenderer(TilePump.class, new RenderPump());
// ClientRegistry.bindTileEntitySpecialRenderer(TileTank.class, new RenderTank());
OBJLoader.INSTANCE.addDomain("buildcraftfactory"); |
<<<<<<<
ItemStack current = entity.getItem();
if (current.isEmpty() || current.getCount() < min || min < 1 || max < min) {
=======
if (min < 1) {
min = 1;
}
if (max < min) {
return StackUtil.EMPTY;
}
ItemStack current = entity.getEntityItem();
if (current.isEmpty() || current.getCount() < min) {
>>>>>>>
if (min < 1) {
min = 1;
}
if (max < min) {
return StackUtil.EMPTY;
}
ItemStack current = entity.getItem();
if (current.isEmpty() || current.getCount() < min) { |
<<<<<<<
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.StatCollector;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
=======
>>>>>>> |
<<<<<<<
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
=======
/**
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
>>>>>>>
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
<<<<<<<
import net.minecraft.util.EnumFacing;
=======
import net.minecraftforge.common.util.ForgeDirection;
>>>>>>>
import net.minecraft.util.EnumFacing;
<<<<<<<
private final HashMap<String, ActionFiller> actionMap = new HashMap<String, ActionFiller>();
=======
private final HashMap<String, ActionFiller> actionMap = new HashMap<String, ActionFiller>();
@Override
public Collection<IActionInternal> getInternalActions(IStatementContainer container) {
return null;
}
>>>>>>>
private final HashMap<String, ActionFiller> actionMap = new HashMap<String, ActionFiller>(); |
<<<<<<<
=======
import buildcraft.core.tile.TileMarkerPath;
import buildcraft.core.tile.TileMarkerVolume;
import buildcraft.core.tile.TilePowerConsumerTester;
>>>>>>>
import buildcraft.core.tile.TileMarkerPath;
import buildcraft.core.tile.TileMarkerVolume;
import buildcraft.core.tile.TilePowerConsumerTester;
<<<<<<<
public static final BlockEngine_BC8 ENGINE = null;
public static final BlockSpring SPRING = null;
public static final BlockDecoration DECORATED = null;
public static final BlockMarkerVolume MARKER_VOLUME = null;
public static final BlockMarkerPath MARKER_PATH = null;
@SubscribeEvent
public static void registerBlocks(RegistryEvent.Register<Block> event) {
BlockEngine_BC8 tempEngine = new BlockEngine_BC8(Material.IRON, "block.engine.bc");
tempEngine.registerEngine(EnumEngineType.WOOD, TileEngineRedstone_BC8::new);
tempEngine.registerEngine(EnumEngineType.CREATIVE, TileEngineCreative::new);
RegistryHelper.registerBlocks(event,
new BlockSpring("block.spring"),
new BlockMarkerVolume(Material.CIRCUITS, "block.marker.volume"),
new BlockMarkerPath(Material.CIRCUITS, "block.marker.path"),
tempEngine
);
=======
public static BlockEngine_BC8 engine;
public static BlockSpring spring;
public static BlockDecoration decorated;
public static BlockMarkerVolume markerVolume;
public static BlockMarkerPath markerPath;
public static BlockPowerConsumerTester powerTester;
public static void preInit() {
spring = BlockBCBase_Neptune.register(new BlockSpring("block.spring"), ItemBlockSpring::new);
markerVolume = BlockBCBase_Neptune.register(new BlockMarkerVolume(Material.CIRCUITS, "block.marker.volume"));
markerPath = BlockBCBase_Neptune.register(new BlockMarkerPath(Material.CIRCUITS, "block.marker.path"));
>>>>>>>
public static final BlockEngine_BC8 ENGINE = null;
public static final BlockSpring SPRING = null;
public static final BlockDecoration DECORATED = null;
public static final BlockMarkerVolume MARKER_VOLUME = null;
public static final BlockMarkerPath MARKER_PATH = null;
public static final BlockPowerConsumerTester powerTester = null;
@SubscribeEvent
public static void registerBlocks(RegistryEvent.Register<Block> event) {
BlockEngine_BC8 tempEngine = new BlockEngine_BC8(Material.IRON, "block.engine.bc");
tempEngine.registerEngine(EnumEngineType.WOOD, TileEngineRedstone_BC8::new);
tempEngine.registerEngine(EnumEngineType.CREATIVE, TileEngineCreative::new);
RegistryHelper.registerBlocks(event,
new BlockSpring("block.spring"),
new BlockMarkerVolume(Material.CIRCUITS, "block.marker.volume"),
new BlockMarkerPath(Material.CIRCUITS, "block.marker.path"),
tempEngine
);
<<<<<<<
if (BCLib.DEV) {
event.getRegistry().register(new ItemBlockDecorated(DECORATED));
}
}
@SubscribeEvent
public static void registerVariants(ModelRegistryEvent event) {
RegistryHelper.registerVariants(
ENGINE,
SPRING,
DECORATED,
MARKER_VOLUME,
MARKER_PATH
);
=======
if (BCLib.DEV) {
powerTester = BlockBCBase_Neptune.register(new BlockPowerConsumerTester(Material.IRON, "block.power_tester"));
}
TileBC_Neptune.registerTile(TileMarkerVolume.class, "tile.marker.volume");
TileBC_Neptune.registerTile(TileMarkerPath.class, "tile.marker.path");
TileBC_Neptune.registerTile(TileEngineRedstone_BC8.class, "tile.engine.wood");
TileBC_Neptune.registerTile(TileEngineCreative.class, "tile.engine.creative");
TileBC_Neptune.registerTile(TilePowerConsumerTester.class, "tile.power_tester");
>>>>>>>
if (BCLib.DEV) {
event.getRegistry().register(new ItemBlockDecorated(DECORATED));
}
}
@SubscribeEvent
public static void registerVariants(ModelRegistryEvent event) {
RegistryHelper.registerVariants(
ENGINE,
SPRING,
DECORATED,
MARKER_VOLUME,
MARKER_PATH
); |
<<<<<<<
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
=======
/**
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
>>>>>>>
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
<<<<<<<
=======
import cpw.mods.fml.common.event.FMLInterModComms.IMCEvent;
import cpw.mods.fml.common.event.FMLInterModComms.IMCMessage;
>>>>>>>
<<<<<<<
private static final Set<IMCHandler> handlers = new HashSet<IMCHandler>();
=======
private static final Set<IMCHandler> handlers = new HashSet<IMCHandler>();
/**
* Deactivate constructor
*/
private InterModComms() {
}
>>>>>>>
private static final Set<IMCHandler> handlers = new HashSet<IMCHandler>(); |
<<<<<<<
(resourceLimitEphemeral == null ? "" : ", resourceLimitEphemeral='" + resourceLimitEphemeral + '\'') +
", workspaceVolume=" + workspaceVolume +
=======
(workspaceVolume == null ? "" : ", workspaceVolume='" + workspaceVolume + '\'') +
(podRetention == null ? "" : ", podRetention='" + podRetention + '\'') +
>>>>>>>
(resourceLimitEphemeral == null ? "" : ", resourceLimitEphemeral='" + resourceLimitEphemeral + '\'') +
(workspaceVolume == null ? "" : ", workspaceVolume='" + workspaceVolume + '\'') +
(podRetention == null ? "" : ", podRetention='" + podRetention + '\'') + |
<<<<<<<
public abstract void readData(DataInputStream data) throws IOException;
=======
public abstract void readData(ByteBuf data);
public abstract Type getType();
>>>>>>>
public abstract void readData(ByteBuf data); |
<<<<<<<
=======
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraftforge.common.util.ForgeDirection;
>>>>>>>
<<<<<<<
@Override
public void onNeighborBlockChange(World world, BlockPos pos, IBlockState state, Block block) {
super.onNeighborBlockChange(world, pos, state, block);
TileEntity tile = world.getTileEntity(pos);
if (tile instanceof TileFloodGate) {
((TileFloodGate) tile).onNeighborBlockChange(block);
}
}
=======
@Override
public void onNeighborBlockChange(World world, int x, int y, int z, Block block) {
super.onNeighborBlockChange(world, x, y, z, block);
TileEntity tile = world.getTileEntity(x, y, z);
if (tile instanceof TileFloodGate) {
((TileFloodGate) tile).onNeighborBlockChange(block);
}
}
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister register) {
super.registerBlockIcons(register);
valve = register.registerIcon("buildcraftfactory:floodGateBlock/valve");
transparent = register.registerIcon("buildcraftcore:misc/transparent");
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side) {
if (renderPass == 1) {
if (side != 1) {
TileEntity tile = world.getTileEntity(x, y, z);
if (tile instanceof TileFloodGate) {
return ((TileFloodGate) tile).isSideBlocked(side) ? transparent : valve;
}
}
return transparent;
} else {
return super.getIcon(world, x, y, z, side);
}
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int metadata) {
if (renderPass == 1) {
if (side == 1) {
return null;
}
return valve;
} else {
return super.getIcon(side, metadata);
}
}
>>>>>>>
@Override
public void onNeighborBlockChange(World world, BlockPos pos, IBlockState state, Block block) {
super.onNeighborBlockChange(world, pos, state, block);
TileEntity tile = world.getTileEntity(pos);
if (tile instanceof TileFloodGate) {
((TileFloodGate) tile).onNeighborBlockChange(block);
}
} |
<<<<<<<
import buildcraft.api.power.PowerFramework;
=======
import buildcraft.api.power.PowerHandler;
import buildcraft.api.power.PowerHandler.PowerReceiver;
import buildcraft.api.power.PowerHandler.Type;
>>>>>>>
import buildcraft.api.power.PowerHandler;
import buildcraft.api.power.PowerHandler.PowerReceiver;
import buildcraft.api.power.PowerHandler.Type;
<<<<<<<
=======
import net.minecraftforge.common.ForgeDirection;
>>>>>>>
import net.minecraftforge.common.ForgeDirection; |
<<<<<<<
=======
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
>>>>>>>
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
<<<<<<<
import net.minecraftforge.fml.common.network.ByteBufUtils;
=======
>>>>>>>
<<<<<<<
import buildcraft.lib.misc.LocaleUtil;
import buildcraft.lib.misc.StringUtilBC;
import io.netty.buffer.ByteBuf;
=======
import buildcraft.lib.misc.StackUtil;
import buildcraft.lib.net.PacketBufferBC;
import buildcraft.lib.net.cache.BuildCraftObjectCaches;
import buildcraft.lib.net.cache.NetworkedFluidStackCache;
>>>>>>>
import buildcraft.lib.misc.LocaleUtil;
import buildcraft.lib.net.PacketBufferBC;
import buildcraft.lib.net.cache.BuildCraftObjectCaches;
import buildcraft.lib.net.cache.NetworkedFluidStackCache;
<<<<<<<
public void writeToBuffer(ByteBuf buffer) {
NBTTagCompound tankData = new NBTTagCompound();
super.writeToNBT(tankData);
ByteBufUtils.writeTag(buffer, tankData);
}
public void readFromBuffer(ByteBuf buffer) {
NBTTagCompound tankData = ByteBufUtils.readTag(buffer);
super.readFromNBT(tankData);
}
=======
public void writeToBuffer(PacketBufferBC buffer) {
if (fluid == null) {
buffer.writeBoolean(false);
} else {
buffer.writeBoolean(true);
buffer.writeInt(BuildCraftObjectCaches.CACHE_FLUIDS.server().store(fluid));
}
buffer.writeInt(getFluidAmount());
}
public void readFromBuffer(PacketBufferBC buffer) {
if (buffer.readBoolean()) {
clientFluid = BuildCraftObjectCaches.CACHE_FLUIDS.client().retrieve(buffer.readInt());
} else {
clientFluid = null;
}
clientAmount = buffer.readInt();
}
>>>>>>>
public void writeToBuffer(PacketBufferBC buffer) {
if (fluid == null) {
buffer.writeBoolean(false);
} else {
buffer.writeBoolean(true);
buffer.writeInt(BuildCraftObjectCaches.CACHE_FLUIDS.server().store(fluid));
}
buffer.writeInt(getFluidAmount());
}
public void readFromBuffer(PacketBufferBC buffer) {
if (buffer.readBoolean()) {
clientFluid = BuildCraftObjectCaches.CACHE_FLUIDS.client().retrieve(buffer.readInt());
} else {
clientFluid = null;
}
clientAmount = buffer.readInt();
} |
<<<<<<<
=======
import buildcraft.transport.triggers.ActionRedstoneFaderOutput;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLInterModComms.IMCEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
import java.util.LinkedList;
import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import net.minecraftforge.common.config.Configuration;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.common.config.Property;
import net.minecraftforge.oredict.RecipeSorter;
>>>>>>>
<<<<<<<
(DefaultProps.NET_CHANNEL_NAME + "-TRANSPORT", new PacketHandlerTransport());
=======
(DefaultProps.NET_CHANNEL_NAME + "-TRANSPORT", new BuildCraftChannelHandler(), new PacketHandlerTransport());
>>>>>>>
(DefaultProps.NET_CHANNEL_NAME + "-TRANSPORT", new BuildCraftChannelHandler(), new PacketHandlerTransport()); |
<<<<<<<
public interface IStripesPipe extends IPipe, IStripesActivator {}
=======
import cofh.api.energy.IEnergyHandler;
public interface IStripesPipe extends IPipe, IStripesActivator, IEnergyHandler {
}
>>>>>>>
import cofh.api.energy.IEnergyHandler;
public interface IStripesPipe extends IPipe, IStripesActivator, IEnergyHandler {} |
<<<<<<<
public void renderAddonFast(AddonFillingPlanner addon, EntityPlayer player, float partialTicks, BufferBuilder builder) {
List<BlockPos> blocksShouldBePlaced = new ArrayList<>(addon.buildingInfo.toPlace);
blocksShouldBePlaced.sort(Comparator.comparing((BlockPos blockPos) ->
=======
public void renderAddonFast(AddonFillingPlanner addon, EntityPlayer player, float partialTicks, VertexBuffer vb) {
addon.buildingInfo.box.getBlocksInArea().stream()
.filter(blockPos ->
addon.buildingInfo.getSnapshot().data.get(
addon.buildingInfo.getSnapshot().posToIndex(
addon.buildingInfo.fromWorld(blockPos)
)
)
)
.filter(player.world::isAirBlock)
.sorted(Comparator.comparing((BlockPos blockPos) ->
>>>>>>>
public void renderAddonFast(AddonFillingPlanner addon, EntityPlayer player, float partialTicks, BufferBuilder builder) {
addon.buildingInfo.box.getBlocksInArea().stream()
.filter(blockPos ->
addon.buildingInfo.getSnapshot().data.get(
addon.buildingInfo.getSnapshot().posToIndex(
addon.buildingInfo.fromWorld(blockPos)
)
)
)
.filter(player.world::isAirBlock)
.sorted(Comparator.comparing((BlockPos blockPos) -> |
<<<<<<<
Property templateItemId = BuildCraftCore.mainConfiguration.getItem("templateItem.id", DefaultProps.TEMPLATE_ITEM_ID);
Property blueprintItemId = BuildCraftCore.mainConfiguration.getItem("blueprintItem.id", DefaultProps.BLUEPRINT_ITEM_ID);
Property markerId = BuildCraftCore.mainConfiguration.getBlock("marker.id", DefaultProps.MARKER_ID);
Property pathMarkerId = BuildCraftCore.mainConfiguration.getBlock("pathMarker.id", DefaultProps.PATH_MARKER_ID);
Property fillerId = BuildCraftCore.mainConfiguration.getBlock("filler.id", DefaultProps.FILLER_ID);
Property builderId = BuildCraftCore.mainConfiguration.getBlock("builder.id", DefaultProps.BUILDER_ID);
Property architectId = BuildCraftCore.mainConfiguration.getBlock("architect.id", DefaultProps.ARCHITECT_ID);
Property libraryId = BuildCraftCore.mainConfiguration.getBlock("blueprintLibrary.id", DefaultProps.BLUEPRINT_LIBRARY_ID);
Property urbanistId = BuildCraftCore.mainConfiguration.getBlock("urbanist.id", DefaultProps.URBANIST_ID);
=======
>>>>>>>
<<<<<<<
if (evt.map.textureType == 0) {
for (FillerPattern pattern : FillerPattern.patterns.values()) {
=======
if (evt.map.getTextureType() == 0) {
for (FillerPattern pattern : FillerPattern.patterns) {
>>>>>>>
if (evt.map.getTextureType() == 0) {
for (FillerPattern pattern : FillerPattern.patterns.values()) { |
<<<<<<<
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
=======
/**
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
>>>>>>>
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */ |
<<<<<<<
import cpw.mods.fml.common.network.PacketDispatcher;
import cpw.mods.fml.common.network.Player;
import java.util.LinkedList;
import java.util.List;
import java.util.ListIterator;
import java.util.Set;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.network.packet.Packet3Chat;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.ChatMessageComponent;
import net.minecraft.world.ChunkCoordIntPair;
import net.minecraftforge.common.ForgeChunkManager;
import net.minecraftforge.common.ForgeChunkManager.Ticket;
import net.minecraftforge.common.ForgeChunkManager.Type;
import net.minecraftforge.common.ForgeDirection;
=======
>>>>>>>
import java.util.LinkedList;
import java.util.List;
import java.util.ListIterator;
import java.util.Set;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.ChunkCoordIntPair;
import net.minecraftforge.common.ForgeChunkManager;
import net.minecraftforge.common.ForgeChunkManager.Ticket;
import net.minecraftforge.common.ForgeChunkManager.Type;
import net.minecraftforge.common.util.ForgeDirection;
<<<<<<<
if (blueprintBuilder != null) {
builderDone = !blueprintIterator.hasNext();
=======
if (bluePrintBuilder != null) {
builderDone = bluePrintBuilder.done;
>>>>>>>
if (blueprintBuilder != null) {
builderDone = !blueprintIterator.hasNext();
<<<<<<<
if (columnVisitListIsUpdated && nextTarget == null && !visitList.isEmpty())
{
nextTarget = visitList.removeFirst();
}
else if (columnVisitListIsUpdated && nextTarget == null)
{
return false;
}
=======
if (columnVisitListIsUpdated && nextTarget == null && !visitList.isEmpty()) {
nextTarget = visitList.removeFirst();
} else if (columnVisitListIsUpdated && nextTarget == null) {
return false;
}
>>>>>>>
if (columnVisitListIsUpdated && nextTarget == null && !visitList.isEmpty()) {
nextTarget = visitList.removeFirst();
} else if (columnVisitListIsUpdated && nextTarget == null) {
return false;
}
<<<<<<<
Integer[][] columnHeights = new Integer[blueprintBuilder.blueprint.sizeX - 2][blueprintBuilder.blueprint.sizeZ - 2];
boolean[][] blockedColumns = new boolean[blueprintBuilder.blueprint.sizeX - 2][blueprintBuilder.blueprint.sizeZ - 2];
for (int searchY = yCoord + 3; searchY >= 0; --searchY) {
=======
Integer[][] columnHeights = new Integer[bluePrintBuilder.bluePrint.sizeX - 2][bluePrintBuilder.bluePrint.sizeZ - 2];
boolean[][] blockedColumns = new boolean[bluePrintBuilder.bluePrint.sizeX - 2][bluePrintBuilder.bluePrint.sizeZ - 2];
for (int searchY = yCoord + 3; searchY >= 1 && searchY >= yCoord - BuildCraftFactory.miningDepth; --searchY) {
>>>>>>>
Integer[][] columnHeights = new Integer[blueprintBuilder.blueprint.sizeX - 2][blueprintBuilder.blueprint.sizeZ - 2];
boolean[][] blockedColumns = new boolean[blueprintBuilder.blueprint.sizeX - 2][blueprintBuilder.blueprint.sizeZ - 2];
for (int searchY = yCoord + 3; searchY >= 0; --searchY) {
<<<<<<<
if (visitList.size() > blueprintBuilder.blueprint.sizeZ * blueprintBuilder.blueprint.sizeX * 2)
=======
if (visitList.size() > bluePrintBuilder.bluePrint.sizeZ * bluePrintBuilder.bluePrint.sizeX * 2) {
>>>>>>>
if (visitList.size() > blueprintBuilder.blueprint.sizeZ * blueprintBuilder.blueprint.sizeX * 2) {
<<<<<<<
if (placedBy != null && CoreProxy.proxy.isSimulating(worldObj)) {
PacketDispatcher.sendPacketToPlayer(
new Packet3Chat(ChatMessageComponent.createFromText(String.format("[BUILDCRAFT] The quarry at %d, %d, %d will not work because there are no more chunkloaders available",
xCoord, yCoord, zCoord))), (Player) placedBy);
=======
if (placedBy != null && !worldObj.isRemote) {
placedBy.addChatMessage(new ChatComponentText(
String.format(
"[BUILDCRAFT] The quarry at %d, %d, %d will not work because there are no more chunkloaders available",
xCoord, yCoord, zCoord)));
>>>>>>>
if (placedBy != null && !worldObj.isRemote) {
placedBy.addChatMessage(new ChatComponentText(
String.format(
"[BUILDCRAFT] The quarry at %d, %d, %d will not work because there are no more chunkloaders available",
xCoord, yCoord, zCoord)));
<<<<<<<
if (placedBy != null) {
PacketDispatcher.sendPacketToPlayer(
new Packet3Chat(ChatMessageComponent.createFromText(String.format("Quarry size is outside of chunkloading bounds or too small %d %d (%d)", xSize, zSize,
chunkTicket.getMaxChunkListDepth()))), (Player) placedBy);
=======
if (placedBy != null) {
placedBy.addChatMessage(new ChatComponentText(
String.format(
"Quarry size is outside of chunkloading bounds or too small %d %d (%d)",
xSize, zSize,
chunkTicket.getMaxChunkListDepth())));
>>>>>>>
if (placedBy != null) {
placedBy.addChatMessage(new ChatComponentText(
String.format(
"Quarry size is outside of chunkloading bounds or too small %d %d (%d)",
xSize, zSize,
chunkTicket.getMaxChunkListDepth())));
<<<<<<<
private void initializeBlueprintBuilder() {
Blueprint blueprint = Blueprint.create(box.sizeX(), box.sizeY(), box.sizeZ());
=======
private void initializeBluePrintBuilder() {
BptBlueprint bluePrint = new BptBlueprint(box.sizeX(), box.sizeY(), box.sizeZ());
for (int i = 0; i < bluePrint.sizeX; ++i) {
for (int j = 0; j < bluePrint.sizeY; ++j) {
for (int k = 0; k < bluePrint.sizeZ; ++k) {
bluePrint.setBlock(i, j, k, null);
}
}
}
>>>>>>>
private void initializeBlueprintBuilder() {
Blueprint blueprint = Blueprint.create(box.sizeX(), box.sizeY(), box.sizeZ());
<<<<<<<
blueprint.setSchematic(worldObj, 0, h, 0, BuildCraftFactory.frameBlock.blockID, 0);
blueprint.setSchematic(worldObj, 0, h, blueprint.sizeZ - 1, BuildCraftFactory.frameBlock.blockID, 0);
blueprint.setSchematic(worldObj, blueprint.sizeX - 1, h, 0, BuildCraftFactory.frameBlock.blockID, 0);
blueprint.setSchematic(worldObj, blueprint.sizeX - 1, h, blueprint.sizeZ - 1, BuildCraftFactory.frameBlock.blockID, 0);
=======
bluePrint.setBlock(0, h, 0, BuildCraftFactory.frameBlock);
bluePrint.setBlock(0, h, bluePrint.sizeZ - 1, BuildCraftFactory.frameBlock);
bluePrint.setBlock(bluePrint.sizeX - 1, h, 0, BuildCraftFactory.frameBlock);
bluePrint.setBlock(bluePrint.sizeX - 1, h, bluePrint.sizeZ - 1, BuildCraftFactory.frameBlock);
>>>>>>>
blueprint.setSchematic(worldObj, 0, h, 0, BuildCraftFactory.frameBlock, 0);
blueprint.setSchematic(worldObj, 0, h, blueprint.sizeZ - 1, BuildCraftFactory.frameBlock, 0);
blueprint.setSchematic(worldObj, blueprint.sizeX - 1, h, 0, BuildCraftFactory.frameBlock, 0);
blueprint.setSchematic(worldObj, blueprint.sizeX - 1, h, blueprint.sizeZ - 1, BuildCraftFactory.frameBlock, 0); |
<<<<<<<
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
=======
/**
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
>>>>>>>
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
* <p/>
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
<<<<<<<
private static final int MAX_HARVEST_LEVEL = 3;
private int harvestLevel = 0;
public BoardRobotMiner(EntityRobotBase iRobot) {
super(iRobot);
detectHarvestLevel();
}
@Override
public void delegateAIEnded(AIRobot ai) {
super.delegateAIEnded(ai);
if (ai instanceof AIRobotFetchAndEquipItemStack) {
detectHarvestLevel();
}
}
private void detectHarvestLevel() {
ItemStack stack = robot.getHeldItem();
if (stack != null && stack.getItem().getToolClasses(stack).contains("pickaxe")) {
ItemPickaxe pickaxe = (ItemPickaxe) stack.getItem();
harvestLevel = pickaxe.getHarvestLevel(stack, "pickaxe");
}
}
@Override
public RedstoneBoardRobotNBT getNBTHandler() {
return BCBoardNBT.REGISTRY.get("miner");
}
@Override
public boolean isExpectedTool(ItemStack stack) {
return stack != null && stack.getItem().getToolClasses(stack).contains("pickaxe");
}
@Override
public boolean isExpectedBlock(World world, BlockPos pos) {
return BuildCraftAPI.getWorldProperty("ore@hardness=" + Math.min(MAX_HARVEST_LEVEL, harvestLevel)).get(world, pos);
}
=======
private static final int MAX_HARVEST_LEVEL = 3;
private int harvestLevel = 0;
public BoardRobotMiner(EntityRobotBase iRobot) {
super(iRobot);
detectHarvestLevel();
}
@Override
public void delegateAIEnded(AIRobot ai) {
super.delegateAIEnded(ai);
if (ai instanceof AIRobotFetchAndEquipItemStack) {
if (ai.success()) {
detectHarvestLevel();
}
}
}
private void detectHarvestLevel() {
ItemStack stack = robot.getHeldItem();
if (stack != null && stack.getItem() != null && stack.getItem().getToolClasses(stack).contains("pickaxe")) {
harvestLevel = stack.getItem().getHarvestLevel(stack, "pickaxe");
}
}
@Override
public RedstoneBoardRobotNBT getNBTHandler() {
return BCBoardNBT.REGISTRY.get("miner");
}
@Override
public boolean isExpectedTool(ItemStack stack) {
return stack != null && stack.getItem().getToolClasses(stack).contains("pickaxe");
}
@Override
public boolean isExpectedBlock(World world, int x, int y, int z) {
return BuildCraftAPI.getWorldProperty("ore@hardness=" + Math.min(MAX_HARVEST_LEVEL, harvestLevel))
.get(world, x, y, z);
}
>>>>>>>
private static final int MAX_HARVEST_LEVEL = 3;
private int harvestLevel = 0;
public BoardRobotMiner(EntityRobotBase iRobot) {
super(iRobot);
detectHarvestLevel();
}
@Override
public void delegateAIEnded(AIRobot ai) {
super.delegateAIEnded(ai);
if (ai instanceof AIRobotFetchAndEquipItemStack) {
if (ai.success()) {
detectHarvestLevel();
}
}
}
private void detectHarvestLevel() {
ItemStack stack = robot.getHeldItem();
if (stack != null && stack.getItem() != null && stack.getItem().getToolClasses(stack).contains("pickaxe")) {
harvestLevel = stack.getItem().getHarvestLevel(stack, "pickaxe");
}
}
@Override
public RedstoneBoardRobotNBT getNBTHandler() {
return BCBoardNBT.REGISTRY.get("miner");
}
@Override
public boolean isExpectedTool(ItemStack stack) {
return stack != null && stack.getItem().getToolClasses(stack).contains("pickaxe");
}
@Override
public boolean isExpectedBlock(World world, BlockPos pos) {
return BuildCraftAPI.getWorldProperty("ore@hardness=" + Math.min(MAX_HARVEST_LEVEL, harvestLevel)).get(world, pos);
} |
<<<<<<<
import buildcraft.api.fuels.IronEngineCoolant;
import buildcraft.api.fuels.IronEngineCoolant.Coolant;
import buildcraft.api.fuels.IronEngineFuel;
import buildcraft.api.fuels.IronEngineFuel.Fuel;
=======
import buildcraft.api.core.NetworkData;
import buildcraft.api.core.StackKey;
import buildcraft.api.fuels.BuildcraftFuelRegistry;
import buildcraft.api.fuels.ICoolant;
import buildcraft.api.fuels.IFuel;
>>>>>>>
import buildcraft.api.core.StackKey;
import buildcraft.api.fuels.BuildcraftFuelRegistry;
import buildcraft.api.fuels.ICoolant;
import buildcraft.api.fuels.IFuel;
<<<<<<<
private TankManager tankManager = new TankManager();
private Fuel currentFuel = null;
=======
private TankManager<Tank> tankManager = new TankManager<Tank>();
private IFuel currentFuel;
>>>>>>>
private TankManager<Tank> tankManager = new TankManager<Tank>();
private IFuel currentFuel;
<<<<<<<
if (!this.constantPower) {
currentOutput = currentFuel.powerPerCycle;
}
addEnergy(currentFuel.powerPerCycle);
heat += currentFuel.powerPerCycle * HEAT_PER_MJ * getBiomeTempScalar();
=======
final float powerPerCycle = currentFuel.getPowerPerCycle();
addEnergy(powerPerCycle);
heat += powerPerCycle * HEAT_PER_MJ * getBiomeTempScalar();
>>>>>>>
if (!this.constantPower) {
currentOutput = currentFuel.getPowerPerCycle();
}
addEnergy(currentFuel.getPowerPerCycle());
heat += currentFuel.getPowerPerCycle() * HEAT_PER_MJ * getBiomeTempScalar(); |
<<<<<<<
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
*
* The BuildCraft API is distributed under the terms of the MIT License. Please check the contents of the license, which
* should be located as "LICENSE.API" in the BuildCraft source code distribution. */
=======
/**
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
* <p/>
* The BuildCraft API is distributed under the terms of the MIT License.
* Please check the contents of the license, which should be located
* as "LICENSE.API" in the BuildCraft source code distribution.
*/
>>>>>>>
/**
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
* <p/>
* The BuildCraft API is distributed under the terms of the MIT License.
* Please check the contents of the license, which should be located
* as "LICENSE.API" in the BuildCraft source code distribution.
*/
<<<<<<<
=======
import net.minecraftforge.common.util.ForgeDirection;
>>>>>>> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.