mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-17 02:55:06 +00:00
Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4f1938c635 | ||
|
|
3e237cf3ca | ||
|
|
30d3f3d87a | ||
|
|
cab88fe8c2 |
No files matched your search
@@ -17,7 +17,6 @@ import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms.IMCEvent;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms.IMCMessage;
|
||||
import cpw.mods.fml.common.event.FMLLoadCompleteEvent;
|
||||
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.FMLServerStartedEvent;
|
||||
@@ -25,7 +24,6 @@ import cpw.mods.fml.common.event.FMLServerStoppedEvent;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||
import cpw.mods.fml.common.registry.EntityRegistry;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import crazypants.enderio.api.IMC;
|
||||
import crazypants.enderio.block.BlockDarkSteelAnvil;
|
||||
@@ -885,14 +883,4 @@ public class EnderIO {
|
||||
public void serverStopped(FMLServerStoppedEvent event) {
|
||||
HyperCubeRegister.unload();
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void remap(FMLMissingMappingsEvent event) {
|
||||
for (FMLMissingMappingsEvent.MissingMapping missingMapping : event.getAll()) {
|
||||
if (missingMapping.type == GameRegistry.Type.ITEM
|
||||
&& missingMapping.name.equals("EnderIO:itemInfiniteTravelStaff")) {
|
||||
missingMapping.remap(itemTeleportStaff);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -55,22 +55,22 @@ public class KeyTracker {
|
||||
public KeyTracker() {
|
||||
glideKey = new KeyBinding(
|
||||
EnderIO.lang.localize("keybind.glidertoggle"),
|
||||
Keyboard.KEY_NONE,
|
||||
Keyboard.KEY_G,
|
||||
EnderIO.lang.localize("category.darksteelarmor"));
|
||||
ClientRegistry.registerKeyBinding(glideKey);
|
||||
soundDetectorKey = new KeyBinding(
|
||||
EnderIO.lang.localize("keybind.soundlocator"),
|
||||
Keyboard.KEY_NONE,
|
||||
Keyboard.KEY_L,
|
||||
EnderIO.lang.localize("category.darksteelarmor"));
|
||||
ClientRegistry.registerKeyBinding(soundDetectorKey);
|
||||
nightVisionKey = new KeyBinding(
|
||||
EnderIO.lang.localize("keybind.nightvision"),
|
||||
Keyboard.KEY_NONE,
|
||||
Keyboard.KEY_P,
|
||||
EnderIO.lang.localize("category.darksteelarmor"));
|
||||
ClientRegistry.registerKeyBinding(nightVisionKey);
|
||||
gogglesKey = new KeyBinding(
|
||||
EnderIO.lang.localize("keybind.gogglesofrevealing"),
|
||||
Keyboard.KEY_NONE,
|
||||
Keyboard.KEY_R,
|
||||
EnderIO.lang.localize("category.darksteelarmor"));
|
||||
ClientRegistry.registerKeyBinding(gogglesKey);
|
||||
|
||||
@@ -94,12 +94,12 @@ public class KeyTracker {
|
||||
|
||||
yetaWrenchMode = new KeyBinding(
|
||||
EnderIO.lang.localize("keybind.yetawrenchmode"),
|
||||
Keyboard.KEY_NONE,
|
||||
Keyboard.KEY_Y,
|
||||
EnderIO.lang.localize("category.tools"));
|
||||
ClientRegistry.registerKeyBinding(yetaWrenchMode);
|
||||
|
||||
magnetKey = new KeyBinding(
|
||||
EnderIO.lang.localize("keybind.magnet"), Keyboard.KEY_NONE, EnderIO.lang.localize("category.tools"));
|
||||
EnderIO.lang.localize("keybind.magnet"), Keyboard.CHAR_NONE, EnderIO.lang.localize("category.tools"));
|
||||
ClientRegistry.registerKeyBinding(magnetKey);
|
||||
}
|
||||
|
||||
@@ -155,38 +155,38 @@ public class KeyTracker {
|
||||
}
|
||||
|
||||
private void handleJump() {
|
||||
if (!JumpUpgrade.isEquipped(Minecraft.getMinecraft().thePlayer)) {
|
||||
return;
|
||||
}
|
||||
if (jumpKey.isPressed()) {
|
||||
if (!JumpUpgrade.isEquipped(Minecraft.getMinecraft().thePlayer)) {
|
||||
return;
|
||||
}
|
||||
toggleDarkSteelController(Type.JUMP, "darksteel.upgrade.jump");
|
||||
}
|
||||
}
|
||||
|
||||
private void handleSpeed() {
|
||||
if (!SpeedUpgrade.isEquipped(Minecraft.getMinecraft().thePlayer)) {
|
||||
return;
|
||||
}
|
||||
if (speedKey.isPressed()) {
|
||||
if (!SpeedUpgrade.isEquipped(Minecraft.getMinecraft().thePlayer)) {
|
||||
return;
|
||||
}
|
||||
toggleDarkSteelController(Type.SPEED, "darksteel.upgrade.speed");
|
||||
}
|
||||
}
|
||||
|
||||
private void handleStepAssist() {
|
||||
if (!JumpUpgrade.isEquipped(Minecraft.getMinecraft().thePlayer)) {
|
||||
return;
|
||||
}
|
||||
if (stepAssistKey.isPressed()) {
|
||||
if (!JumpUpgrade.isEquipped(Minecraft.getMinecraft().thePlayer)) {
|
||||
return;
|
||||
}
|
||||
toggleDarkSteelController(Type.STEP_ASSIST, "darksteel.upgrade.stepAssist");
|
||||
}
|
||||
}
|
||||
|
||||
private void handleGoggles() {
|
||||
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||
if (!GogglesOfRevealingUpgrade.isUpgradeEquipped(player)) {
|
||||
return;
|
||||
}
|
||||
if (gogglesKey.isPressed()) {
|
||||
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||
if (!GogglesOfRevealingUpgrade.isUpgradeEquipped(player)) {
|
||||
return;
|
||||
}
|
||||
boolean isActive = !DarkSteelItems.itemDarkSteelHelmet.isGogglesUgradeActive();
|
||||
sendEnabledChatMessage("darksteel.upgrade.gogglesOfRevealing", isActive);
|
||||
DarkSteelItems.itemDarkSteelHelmet.setGogglesUgradeActive(isActive);
|
||||
@@ -235,18 +235,20 @@ public class KeyTracker {
|
||||
}
|
||||
|
||||
private void handleGlide() {
|
||||
if (glideKey.isPressed()
|
||||
&& DarkSteelController.instance.isGliderUpgradeEquipped(Minecraft.getMinecraft().thePlayer)) {
|
||||
if (!DarkSteelController.instance.isGliderUpgradeEquipped(Minecraft.getMinecraft().thePlayer)) {
|
||||
return;
|
||||
}
|
||||
if (glideKey.isPressed()) {
|
||||
toggleDarkSteelController(Type.GLIDE, "darksteel.upgrade.glider");
|
||||
}
|
||||
}
|
||||
|
||||
private void handleNightVision() {
|
||||
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||
if (!DarkSteelController.instance.isNightVisionUpgradeOrEnchEquipped(player)) {
|
||||
return;
|
||||
}
|
||||
if (nightVisionKey.isPressed()) {
|
||||
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||
if (!DarkSteelController.instance.isNightVisionUpgradeOrEnchEquipped(player)) {
|
||||
return;
|
||||
}
|
||||
boolean isActive = !DarkSteelController.instance.isNightVisionActive();
|
||||
if (isActive) {
|
||||
player.worldObj.playSound(
|
||||
@@ -274,7 +276,10 @@ public class KeyTracker {
|
||||
public boolean isSoundDetectorUpgradeEquipped(EntityClientPlayerMP player) {
|
||||
ItemStack helmet = player.getEquipmentInSlot(4);
|
||||
SoundDetectorUpgrade upgrade = SoundDetectorUpgrade.loadFromItem(helmet);
|
||||
return upgrade != null;
|
||||
if (upgrade == null) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public KeyBinding getYetaWrenchMode() {
|
||||
|
||||
@@ -65,12 +65,6 @@ public class ItemTeleportStaff extends ItemTravelStaff {
|
||||
return equipped;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int extractEnergy(ItemStack container, int maxExtract, boolean simulate) {
|
||||
// Don't allow extracting energy.
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void extractInternal(ItemStack item, int powerUse) {
|
||||
// Do nothing, as we have infinite energy.
|
||||
|
||||
@@ -309,15 +309,13 @@ public class TravelController {
|
||||
|
||||
// Map of distance to coordinate for eligible travel destinations (within angle).
|
||||
Map<Double, BlockCoord> distanceMap = new TreeMap<>();
|
||||
// Limit the max distance at which we'll display an out of range message.
|
||||
// Otherwise, you could trigger the message for any travel anchor on the entire server.
|
||||
double maxMessageDistance = 1.25 * source.getMaxDistanceTravelled();
|
||||
boolean displayOutOfRangeMessage = false;
|
||||
boolean outOfRange = false;
|
||||
for (BlockCoord p : travelDestinations) {
|
||||
Vector3d block = new Vector3d(p.x + 0.5, p.y + 0.5, p.z + 0.5);
|
||||
block.sub(eye);
|
||||
double distance = block.length();
|
||||
if (distance > maxMessageDistance) {
|
||||
if (distance > source.getMaxDistanceTravelled()) {
|
||||
outOfRange = true;
|
||||
continue;
|
||||
}
|
||||
block.normalize();
|
||||
@@ -325,15 +323,11 @@ public class TravelController {
|
||||
double angle = Math.acos(look.dot(block));
|
||||
// Roughly 5 degrees
|
||||
if (angle < 0.087) {
|
||||
if (distance > source.getMaxDistanceTravelled()) {
|
||||
displayOutOfRangeMessage = true;
|
||||
} else {
|
||||
distanceMap.put(distance, p);
|
||||
}
|
||||
distanceMap.put(distance, p);
|
||||
}
|
||||
}
|
||||
|
||||
if (displayOutOfRangeMessage && distanceMap.isEmpty()) {
|
||||
if (outOfRange && distanceMap.isEmpty()) {
|
||||
player.addChatComponentMessage(new ChatComponentTranslation("enderio.blockTravelPlatform.outOfRange"));
|
||||
}
|
||||
|
||||
|
||||
@@ -1216,7 +1216,7 @@ enderio.weatherObelisk.fuelTank=Barometric Flux Tank
|
||||
enchantment.enderio.soulBound=Soulbound
|
||||
description.enchantment.enderio.soulBound=Prevents item from being lost on death
|
||||
enderio.category.darksteelarmor=Dark Steel Armor
|
||||
enderio.category.tools=EnderIO - Tools
|
||||
enderio.category.tools=Tools
|
||||
enderio.keybind.glidertoggle=Glider Toggle
|
||||
enderio.keybind.gogglesofrevealing=Goggles of Revealing
|
||||
enderio.keybind.nightvision=Night Vision
|
||||
|
||||
@@ -1107,7 +1107,7 @@ enderio.config.spawner.tooltip=Mir sind die geistreichen Tooltips ausgegangen
|
||||
|
||||
#Keybinds/Waila/NEI/Tooltips
|
||||
enderio.category.darksteelarmor=Dunkelstahlrüstung
|
||||
enderio.category.tools=EnderIO - Werkzeuge
|
||||
enderio.category.tools=Werkzeuge
|
||||
enderio.keybind.glidertoggle=Gleiterschaltung
|
||||
enderio.keybind.gogglesofrevealing=Brille der Enthüllung
|
||||
enderio.keybind.nightvision=Nachtsicht
|
||||
|
||||
@@ -1375,7 +1375,7 @@ enderio.config.spawner.tooltip=I ran out of witty tooltips.
|
||||
|
||||
#Keybinds/Waila/NEI/Tooltips
|
||||
enderio.category.darksteelarmor=Dark Steel Armor
|
||||
enderio.category.tools=EnderIO - Tools
|
||||
enderio.category.tools=Tools
|
||||
enderio.keybind.glidertoggle=Glider Toggle
|
||||
enderio.keybind.gogglesofrevealing=Goggles of Revealing
|
||||
enderio.keybind.nightvision=Night Vision
|
||||
|
||||
@@ -976,7 +976,7 @@ enderio.config.spawner.tooltip=Me he quedado sin descripciones ingeniosas.
|
||||
|
||||
#Keybinds/Waila/NEI/Tooltips
|
||||
enderio.category.darksteelarmor=Armadura de Acero Oscuro
|
||||
enderio.category.tools=EnderIO - Herramientas
|
||||
enderio.category.tools=Herramientas
|
||||
enderio.keybind.glidertoggle=Activar/Desactivar Planeador
|
||||
enderio.keybind.gogglesofrevealing=Gafas de Revelación
|
||||
enderio.keybind.nightvision=Visión Nocturna
|
||||
|
||||
@@ -978,7 +978,7 @@ enderio.config.spawner.tooltip=Me he quedado sin descripciones ingeniosas.
|
||||
|
||||
#Keybinds/Waila/NEI/Tooltips
|
||||
enderio.category.darksteelarmor=Armadura de Acero Oscuro
|
||||
enderio.category.tools=EnderIO - Herramientas
|
||||
enderio.category.tools=Herramientas
|
||||
enderio.keybind.glidertoggle=Activar/Desactivar Planeador
|
||||
enderio.keybind.gogglesofrevealing=Gafas de Revelación
|
||||
enderio.keybind.nightvision=Visión Nocturna
|
||||
|
||||
@@ -976,7 +976,7 @@ enderio.config.spawner.tooltip=Me he quedado sin descripciones ingeniosas.
|
||||
|
||||
#Keybinds/Waila/NEI/Tooltips
|
||||
enderio.category.darksteelarmor=Armadura de Acero Oscuro
|
||||
enderio.category.tools=EnderIO - Herramientas
|
||||
enderio.category.tools=Herramientas
|
||||
enderio.keybind.glidertoggle=Activar/Desactivar Planeador
|
||||
enderio.keybind.gogglesofrevealing=Gafas de Revelación
|
||||
enderio.keybind.nightvision=Visión Nocturna
|
||||
|
||||
@@ -976,7 +976,7 @@ enderio.config.spawner.tooltip=Me he quedado sin descripciones ingeniosas.
|
||||
|
||||
#Keybinds/Waila/NEI/Tooltips
|
||||
enderio.category.darksteelarmor=Armadura de Acero Oscuro
|
||||
enderio.category.tools=EnderIO - Herramientas
|
||||
enderio.category.tools=Herramientas
|
||||
enderio.keybind.glidertoggle=Activar/Desactivar Planeador
|
||||
enderio.keybind.gogglesofrevealing=Gafas de Revelación
|
||||
enderio.keybind.nightvision=Visión Nocturna
|
||||
|
||||
@@ -976,7 +976,7 @@ enderio.config.spawner.tooltip=Me he quedado sin descripciones ingeniosas.
|
||||
|
||||
#Keybinds/Waila/NEI/Tooltips
|
||||
enderio.category.darksteelarmor=Armadura de Acero Oscuro
|
||||
enderio.category.tools=EnderIO - Herramientas
|
||||
enderio.category.tools=Herramientas
|
||||
enderio.keybind.glidertoggle=Activar/Desactivar Planeador
|
||||
enderio.keybind.gogglesofrevealing=Gafas de Revelación
|
||||
enderio.keybind.nightvision=Visión Nocturna
|
||||
|
||||
@@ -993,7 +993,7 @@ enderio.config.spawner.tooltip=Je suis a cours d'infobulles marrantes.
|
||||
|
||||
#Keybinds/Waila/NEI/Tooltips
|
||||
enderio.category.darksteelarmor=Armure d'Acier Sombre
|
||||
enderio.category.tools=EnderIO - Outils
|
||||
enderio.category.tools=Outils
|
||||
enderio.keybind.glidertoggle=Mode Planeur
|
||||
enderio.keybind.gogglesofrevealing=Lunettes de Révélation
|
||||
enderio.keybind.nightvision=Vision Nocturne
|
||||
|
||||
@@ -1289,7 +1289,7 @@ enderio.config.spawner.tooltip=У меня закончились остроум
|
||||
|
||||
#Keybinds/Waila/NEI/Tooltips
|
||||
enderio.category.darksteelarmor=Броня из тёмной стали
|
||||
enderio.category.tools=EnderIO - Инструменты
|
||||
enderio.category.tools=Инструменты
|
||||
enderio.keybind.glidertoggle=Переключить планер
|
||||
enderio.keybind.gogglesofrevealing=Очки откровения
|
||||
enderio.keybind.nightvision=Ночное зрение
|
||||
|
||||
@@ -1369,7 +1369,7 @@ enderio.config.spawner.tooltip=我已经想不出什么有趣的提示文本了.
|
||||
|
||||
#Keybinds/Waila/NEI/Tooltips
|
||||
enderio.category.darksteelarmor=玄铁护甲
|
||||
enderio.category.tools=EnderIO - 工具
|
||||
enderio.category.tools=工具
|
||||
enderio.keybind.glidertoggle=滑翔开关
|
||||
enderio.keybind.gogglesofrevealing=揭示护目镜
|
||||
enderio.keybind.nightvision=夜视
|
||||
@@ -1391,4 +1391,4 @@ enderio.tooltip.oredict=矿物辞典:
|
||||
enderio.tooltip.meta=Meta:
|
||||
enderio.tooltip.uid=UID:
|
||||
enderio.tooltip.anvilupgrades=铁砧升级:
|
||||
enderio.waila.config.hiddenfacades=隐形栅栏
|
||||
enderio.waila.config.hiddenfacades=隐形栅栏
|
||||
@@ -1225,7 +1225,7 @@ enderio.gui.weather.requiredfluid=Required Fluid: %s L
|
||||
enderio.weatherObelisk.fuelTank=Barometric Flux Tank
|
||||
description.enchantment.enderio.soulBound=Prevents item from being lost on death
|
||||
enderio.category.darksteelarmor=Dark Steel Armor
|
||||
enderio.category.tools=EnderIO - Tools
|
||||
enderio.category.tools=Tools
|
||||
enderio.keybind.glidertoggle=Glider Toggle
|
||||
enderio.keybind.gogglesofrevealing=Goggles of Revealing
|
||||
enderio.keybind.nightvision=Night Vision
|
||||
|
||||
Reference in new issue
Block a user