diff --git a/ReleaseNotes.txt b/ReleaseNotes.txt
index c4f995d6..40434ec3 100644
--- a/ReleaseNotes.txt
+++ b/ReleaseNotes.txt
@@ -1,3 +1,11 @@
+0.11.1
+#497 Alloy only mode broken
+#500 Server crash with TravelStaff
+#502 Fixed ore dictionary integration of EIO silicon
+#503 Capacitor full gate condition does not trigger
+#506 Added zh_TW localisation (mymagadsl)
+#508 Fixed zooming of distant travel anchors
+
0.11.0
Features
- #473 New config options for Staff of Travelling to allow teleporting to limited in various ways
diff --git a/build.xml b/build.xml
index a1d65658..b2dab883 100644
--- a/build.xml
+++ b/build.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/common/crazypants/enderio/machine/alloy/TileAlloySmelter.java b/common/crazypants/enderio/machine/alloy/TileAlloySmelter.java
index a118f392..09a211ea 100644
--- a/common/crazypants/enderio/machine/alloy/TileAlloySmelter.java
+++ b/common/crazypants/enderio/machine/alloy/TileAlloySmelter.java
@@ -70,6 +70,9 @@ public class TileAlloySmelter extends AbstractPoweredTaskEntity {
}
IMachineRecipe nextRecipe = MachineRecipeRegistry.instance.getRecipeForInputs(getMachineName(), getInputs());
+ if(mode == Mode.ALLOY && nextRecipe instanceof VanillaSmeltingRecipe) {
+ nextRecipe = null;
+ }
if(nextRecipe == null) {
return null; // no template
}
diff --git a/common/crazypants/enderio/material/MaterialRecipes.java b/common/crazypants/enderio/material/MaterialRecipes.java
index bb71b10a..1d862e6e 100644
--- a/common/crazypants/enderio/material/MaterialRecipes.java
+++ b/common/crazypants/enderio/material/MaterialRecipes.java
@@ -44,20 +44,21 @@ public class MaterialRecipes {
OreDictionary.registerOre("glass", Block.glass);
+ }
+
+ public static void registerExternalOresInDictionary() {
/**
* Register AE1's Silicon, remove after AE2 is out.
*/
- if(Loader.isModLoaded("AppliedEnergistics"))
- {
- try
- {
+ if(Loader.isModLoaded("AppliedEnergistics")) {
+ try {
Class materialsAE = Class.forName("appeng.api.Materials");
+ GameRegistry.findItem("AppliedEnergistics", "matSilicon");
Object matSilicon = materialsAE.getField("matSilicon").get(materialsAE);
if(matSilicon instanceof ItemStack) {
OreDictionary.registerOre("itemSilicon", ((ItemStack) matSilicon).copy());
}
- } catch (Throwable t)
- {
+ } catch (Throwable t) {
/** just ignore any issues. **/
}
}
diff --git a/common/crazypants/enderio/teleport/ItemTravelStaff.java b/common/crazypants/enderio/teleport/ItemTravelStaff.java
index b9722ea0..68e7e0b8 100644
--- a/common/crazypants/enderio/teleport/ItemTravelStaff.java
+++ b/common/crazypants/enderio/teleport/ItemTravelStaff.java
@@ -1,23 +1,15 @@
package crazypants.enderio.teleport;
+
import cofh.api.energy.IEnergyContainerItem;
import cofh.api.energy.ItemEnergyContainer;
-import cpw.mods.fml.common.registry.GameRegistry;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import crazypants.enderio.*;
+import crazypants.enderio.Config;
+import crazypants.enderio.EnderIO;
+import crazypants.enderio.EnderIOTab;
+import crazypants.enderio.ModObject;
import crazypants.util.BlockCoord;
import crazypants.util.Util;
-import crazypants.vecmath.Vector3d;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.World;
-
-import java.util.List;
+import net.minecraft.entity.player.*;
public class ItemTravelStaff extends ItemEnergyContainer implements IEnergyContainerItem {
@@ -51,7 +43,7 @@ public class ItemTravelStaff extends ItemEnergyContainer implements IEnergyConta
@Override
public void onCreated(ItemStack itemStack, World world, EntityPlayer entityPlayer) {
- setFull(itemStack);
+ setEnergy(itemStack, 0);
}
@Override
@@ -84,19 +76,20 @@ public class ItemTravelStaff extends ItemEnergyContainer implements IEnergyConta
return equipped;
}
- if(TravelController.instance.hasTarget()) {
- BlockCoord target = TravelController.instance.selectedCoord;
- TileEntity te = world.getTileEntity(target.x, target.y, target.z);
- if(te instanceof ITravelAccessable) {
- ITravelAccessable ta = (ITravelAccessable) te;
- if(ta.getRequiresPassword(player)) {
- player.openGui(EnderIO.instance, GuiHandler.GUI_ID_TRAVEL_AUTH, world, target.x, target.y, target.z);
- return equipped;
+ if(world.isRemote) {
+ if(TravelController.instance.hasTarget()) {
+ BlockCoord target = TravelController.instance.selectedCoord;
+ TileEntity te = world.getBlockTileEntity(target.x, target.y, target.z);
+ if(te instanceof ITravelAccessable) {
+ ITravelAccessable ta = (ITravelAccessable) te;
+ if(ta.getRequiresPassword(player.username)) {
+ Packet packet = TravelPacketHandler.createOpenAuthGuiPacket(target.x, target.y, target.z);
+ PacketDispatcher.sendPacketToServer(packet);
+ return equipped;
+ }
}
- }
- if(world.isRemote) {
if(TravelController.instance.isTargetEnderIO()) {
TravelController.instance.openEnderIO(equipped, world, player);
} else if(Config.travelAnchorEnabled) {
diff --git a/common/crazypants/enderio/teleport/TravelController.java b/common/crazypants/enderio/teleport/TravelController.java
index d3b21424..8e615e4e 100644
--- a/common/crazypants/enderio/teleport/TravelController.java
+++ b/common/crazypants/enderio/teleport/TravelController.java
@@ -46,11 +46,11 @@ public class TravelController {
private boolean selectionEnabled = true;
- private double referenceScalingDistance;
-
private double fovRad;
- private Minecraft mc = Minecraft.getMinecraft();
+
+ private double tanFovRad;
+
private TravelController() {
}
@@ -106,9 +106,10 @@ public class TravelController {
currentView.setViewMatrix(mv);
currentView.setViewport(0, 0, mc.displayWidth, mc.displayHeight);
- fovRad = Math.toRadians(fov) / 2;
- referenceScalingDistance = 1d / Math.tan(fovRad);
- }
+
+ fovRad = Math.toRadians(fov) / 2;
+ tanFovRad = Math.tanh(fovRad);
+ }
@SideOnly(Side.CLIENT)
@SubscribeEvent
@@ -198,7 +199,7 @@ public class TravelController {
}
int requiredPower = 0;
- if(source == TravelSource.STAFF) {
+ if(source == TravelSource.STAFF_BLINK) {
requiredPower = getRequiredPower(player, source, coord);
if(requiredPower < 0) {
return false;
@@ -401,13 +402,16 @@ public class TravelController {
candidates.put(bc, ratio);
}
+ //smoothly zoom to a larger size, starting when the point is the middle 20% of the screen
float start = 0.2f;
float end = 0.01f;
double mix = MathHelper.clamp_float((start - ratio) / (start - end), 0, 1);
double scale = 1;
if(mix > 0) {
- double d = Math.tan(fovRad) * currentView.getEyePoint().distance(loc) * 0.01;
- scale = d / referenceScalingDistance;
+ double d = tanFovRad * currentView.getEyePoint().distance(loc);
+ scale = d / tanFovRad;
+
+ scale = scale * 0.1;// why I need this is completely beyond me.
//only apply 70% of the scaling so more distance targets are still smaller than closer targets
float nf = 1 - MathHelper.clamp_float((float) currentView.getEyePoint().distanceSquared(loc) / TravelSource.STAFF.maxDistanceTravelledSq, 0, 1);
@@ -416,10 +420,6 @@ public class TravelController {
scale = (scale * mix) + (1 - mix);
scale = Math.max(1, scale);
}
-
- if(bc.equals(selectedCoord)) {
- return scale;
- }
return scale;
}
@@ -450,7 +450,6 @@ public class TravelController {
}
public boolean isStaffEquipped(EntityClientPlayerMP thePlayer) {
- ItemStack item = thePlayer.getCurrentEquippedItem();
return item != null && item.getItem() == EnderIO.itemTravelStaff;
}
diff --git a/common/crazypants/enderio/teleport/TravelPacketHandler.java b/common/crazypants/enderio/teleport/TravelPacketHandler.java
index 6c1cb9f2..52b5c24f 100644
--- a/common/crazypants/enderio/teleport/TravelPacketHandler.java
+++ b/common/crazypants/enderio/teleport/TravelPacketHandler.java
@@ -1,12 +1,14 @@
package crazypants.enderio.teleport;
+
import crazypants.enderio.IPacketProcessor;
import crazypants.enderio.PacketHandler;
+
//TODO:1.7
public class TravelPacketHandler implements IPacketProcessor/*, IConnectionHandler*/ {
- @Override
+
public boolean canProcessPacket(int packetID) {
return packetID == PacketHandler.ID_TRAVEL_AUTH_ACCESS_MODE || packetID == PacketHandler.ID_TRAVEL_AUTH_GUI || packetID == PacketHandler.ID_TRAVEL_PLATFORM
|| packetID == PacketHandler.ID_TRAVEL_STAFF_DRAIN
@@ -255,4 +257,5 @@ public class TravelPacketHandler implements IPacketProcessor/*, IConnectionHandl
// @Override
// public void clientLoggedIn(NetHandler clientHandler, INetworkManager manager, Packet1Login login) {
// }
+
}
diff --git a/common/crazypants/enderio/trigger/TriggerEnderIO.java b/common/crazypants/enderio/trigger/TriggerEnderIO.java
index d7b41f3d..4f7d29bb 100644
--- a/common/crazypants/enderio/trigger/TriggerEnderIO.java
+++ b/common/crazypants/enderio/trigger/TriggerEnderIO.java
@@ -46,7 +46,7 @@ public class TriggerEnderIO implements ITrigger {
return capacitorBank.getEnergyStored() != 0;
}
if(triggerID == 2) {
- return capacitorBank.getEnergyStored() == capacitorBank.getMaxEnergyStored();
+ return capacitorBank.getMaxEnergyStored() - capacitorBank.getEnergyStored() < 5;
}
if(triggerID == 3 || triggerID == 4) {
ItemStack[] items = new ItemStack[capacitorBank.getSizeInventory()];
diff --git a/resources/assets/enderio/config/AlloySmelterRecipes_Core.xml b/resources/assets/enderio/config/AlloySmelterRecipes_Core.xml
index a5e78ebb..d9f17557 100644
--- a/resources/assets/enderio/config/AlloySmelterRecipes_Core.xml
+++ b/resources/assets/enderio/config/AlloySmelterRecipes_Core.xml
@@ -34,8 +34,8 @@ sand/cobble/wood=0.1
-
-
+
+