Keybinds almost fully implemented, just need save/load functionality
This commit is contained in:
parent
a44fd2c2f1
commit
3d6870525d
12 changed files with 158 additions and 68 deletions
|
@ -11,8 +11,6 @@ import net.machinemuse.powersuits.item.ItemUtils;
|
|||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.settings.KeyBinding;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
|
@ -33,6 +31,10 @@ public class ClickableKeybinding extends ClickableButton {
|
|||
return toggled;
|
||||
}
|
||||
|
||||
public void doToggleTick() {
|
||||
doToggleIf(keybind.pressed);
|
||||
}
|
||||
|
||||
public void doToggleIf(boolean value) {
|
||||
if (value && !toggled) {
|
||||
toggleModules();
|
||||
|
@ -45,13 +47,11 @@ public class ClickableKeybinding extends ClickableButton {
|
|||
if (player == null) {
|
||||
return;
|
||||
}
|
||||
for (ItemStack stack : ItemUtils.getModularItemsInInventory(player)) {
|
||||
NBTTagCompound itemTag = ItemUtils.getMuseItemTag(stack);
|
||||
for (ClickableModule module : boundModules) {
|
||||
ItemUtils.toggleModule(itemTag, module.getModule().getName(), toggleval);
|
||||
String valstring = toggleval ? " on" : " off";
|
||||
player.sendChatToPlayer("Toggled " + module.getModule().getName() + valstring);
|
||||
ItemUtils.toggleModuleForPlayer(player, module.getModule().getName(), toggleval);
|
||||
}
|
||||
}
|
||||
|
||||
toggleval = !toggleval;
|
||||
}
|
||||
|
||||
|
@ -115,4 +115,5 @@ public class ClickableKeybinding extends ClickableButton {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@ import net.machinemuse.powersuits.common.ModCompatability;
|
|||
import net.machinemuse.powersuits.common.PowersuitsMod;
|
||||
import net.machinemuse.powersuits.event.ThaumRenderEventHandler;
|
||||
import net.machinemuse.powersuits.network.MusePacketHandler;
|
||||
import net.machinemuse.powersuits.tick.ClientTickHandler;
|
||||
import net.machinemuse.powersuits.tick.PlayerTickHandlerClient;
|
||||
import net.machinemuse.powersuits.tick.RenderTickHandler;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
|
@ -27,6 +28,7 @@ import cpw.mods.fml.relauncher.Side;
|
|||
*/
|
||||
public class ClientProxy extends CommonProxy {
|
||||
private static ToolRenderer toolRenderer = new ToolRenderer();
|
||||
private static ClientTickHandler clientTickHandler;
|
||||
private static RenderTickHandler renderTickHandler;
|
||||
private static PlayerTickHandlerClient playerTickHandler;
|
||||
public static KeybindKeyHandler keybindHandler;
|
||||
|
@ -65,7 +67,10 @@ public class ClientProxy extends CommonProxy {
|
|||
renderTickHandler = new RenderTickHandler();
|
||||
TickRegistry.registerTickHandler(renderTickHandler, Side.CLIENT);
|
||||
|
||||
if(ModCompatability.isThaumCraftLoaded() && ModCompatability.enableThaumGogglesModule()) {
|
||||
clientTickHandler = new ClientTickHandler();
|
||||
TickRegistry.registerTickHandler(clientTickHandler, Side.CLIENT);
|
||||
|
||||
if (ModCompatability.isThaumCraftLoaded() && ModCompatability.enableThaumGogglesModule()) {
|
||||
MinecraftForge.EVENT_BUS.register(new ThaumRenderEventHandler());
|
||||
}
|
||||
|
||||
|
|
|
@ -169,7 +169,7 @@ public class Config {
|
|||
|
||||
module = new PowerModule(ModularCommon.MODULE_ENERGY_SHIELD, ARMORONLY, MuseIcon.ENERGY_SHIELD, ModularCommon.CATEGORY_ARMOR)
|
||||
.setDescription("Energy shields are much lighter than plating, but consume energy.")
|
||||
.addInstallCost(copyAndResize(ItemComponent.fieldEmitter, 4))
|
||||
.addInstallCost(copyAndResize(ItemComponent.fieldEmitter, 2))
|
||||
.addTradeoffProperty("Field Strength", ModularCommon.ARMOR_VALUE_ENERGY, 6, " Points")
|
||||
.addTradeoffProperty("Field Strength", ModularCommon.ARMOR_ENERGY_CONSUMPTION, 500, "J");
|
||||
ModuleManager.addModule(module);
|
||||
|
@ -204,7 +204,6 @@ public class Config {
|
|||
.addTradeoffProperty("Overclock", ModularCommon.PICKAXE_HARVEST_SPEED, 18);
|
||||
ModuleManager.addModule(module);
|
||||
|
||||
|
||||
module = new PowerModule(ModularCommon.MODULE_DIAMOND_PICK_UPGRADE, TOOLONLY, MuseIcon.DIAMOND_PICK, ModularCommon.CATEGORY_TOOL_ADDON)
|
||||
.setDescription("Add diamonds to allow your pickaxe module to mine Obsidian. *REQUIRES PICKAXE MODULE TO WORK*")
|
||||
.addInstallCost(copyAndResize(ItemComponent.solenoid, 1))
|
||||
|
@ -214,6 +213,7 @@ public class Config {
|
|||
module = new PowerModule(ModularCommon.MODULE_AQUA_AFFINITY, TOOLONLY, MuseIcon.AQUA_AFFINITY, ModularCommon.CATEGORY_TOOL_ADDON)
|
||||
.setDescription("Reduces the speed penalty for using your tool underwater.")
|
||||
.addInstallCost(copyAndResize(ItemComponent.servoMotor, 1))
|
||||
.setToggleable(true)
|
||||
.addBaseProperty(ModularCommon.AQUA_AFFINITY_ENERGY_CONSUMPTION, 0, "J")
|
||||
.addBaseProperty(ModularCommon.UNDERWATER_HARVEST_SPEED, 0.2, "%")
|
||||
.addTradeoffProperty("Power", ModularCommon.AQUA_AFFINITY_ENERGY_CONSUMPTION, 100)
|
||||
|
@ -249,6 +249,7 @@ public class Config {
|
|||
|
||||
module = new PowerModule(ModularCommon.MODULE_SPRINT_ASSIST, LEGSONLY, MuseIcon.SPRINT_ASSIST, ModularCommon.CATEGORY_MOVEMENT)
|
||||
.setDescription("A set of servo motors to help you sprint (double-tap forward) faster.")
|
||||
.setToggleable(true)
|
||||
.addInstallCost(copyAndResize(ItemComponent.servoMotor, 4));
|
||||
ModuleManager.addSimpleTradeoff(
|
||||
module, "Power",
|
||||
|
@ -262,6 +263,7 @@ public class Config {
|
|||
|
||||
module = new PowerModule(ModularCommon.MODULE_JUMP_ASSIST, LEGSONLY, MuseIcon.JUMP_ASSIST, ModularCommon.CATEGORY_MOVEMENT)
|
||||
.setDescription("Another set of servo motors to help you jump higher.")
|
||||
.setToggleable(true)
|
||||
.addInstallCost(copyAndResize(ItemComponent.servoMotor, 4));
|
||||
ModuleManager.addSimpleTradeoff(
|
||||
module, "Power",
|
||||
|
@ -276,6 +278,7 @@ public class Config {
|
|||
module = new PowerModule(ModularCommon.MODULE_SHOCK_ABSORBER, FEETONLY, MuseIcon.SHOCK_ABSORBER, ModularCommon.CATEGORY_MOVEMENT)
|
||||
.setDescription("With some servos, springs, and padding, you should be able to negate a portion of fall damage.")
|
||||
.addInstallCost(copyAndResize(ItemComponent.servoMotor, 2))
|
||||
.setToggleable(true)
|
||||
.addInstallCost(new ItemStack(Block.cloth, 2));
|
||||
ModuleManager.addSimpleTradeoff(
|
||||
module, "Power",
|
||||
|
@ -284,6 +287,7 @@ public class Config {
|
|||
ModuleManager.addModule(module);
|
||||
|
||||
module = new PowerModule(ModularCommon.MODULE_GLIDER, TORSOONLY, MuseIcon.GLIDER, ModularCommon.CATEGORY_MOVEMENT)
|
||||
.setToggleable(true)
|
||||
.setDescription(
|
||||
"Tack on some wings to turn downward into forward momentum. Press sneak+forward while falling to activate.")
|
||||
.addInstallCost(copyAndResize(ItemComponent.gliderWing, 2));
|
||||
|
@ -296,6 +300,7 @@ public class Config {
|
|||
|
||||
module = new PowerModule(ModularCommon.MODULE_JETPACK, TORSOONLY, MuseIcon.JETPACK, ModularCommon.CATEGORY_MOVEMENT)
|
||||
.setDescription("A jetpack should allow you to jump indefinitely, or at least until you run out of power.")
|
||||
.setToggleable(true)
|
||||
.addInstallCost(copyAndResize(ItemComponent.ionThruster, 4))
|
||||
.addBaseProperty(ModularCommon.JET_ENERGY_CONSUMPTION, 0, "J/s")
|
||||
.addBaseProperty(ModularCommon.JET_THRUST, 0, "N")
|
||||
|
@ -305,6 +310,7 @@ public class Config {
|
|||
|
||||
module = new PowerModule(ModularCommon.MODULE_JETBOOTS, FEETONLY, MuseIcon.JETBOOTS, ModularCommon.CATEGORY_MOVEMENT)
|
||||
.setDescription("Jet boots are not as strong as a jetpack, but they should at least be strong enough to counteract gravity.")
|
||||
.setToggleable(true)
|
||||
.addInstallCost(copyAndResize(ItemComponent.ionThruster, 2))
|
||||
.addBaseProperty(ModularCommon.JET_ENERGY_CONSUMPTION, 0)
|
||||
.addBaseProperty(ModularCommon.JET_THRUST, 0)
|
||||
|
@ -315,12 +321,14 @@ public class Config {
|
|||
module = new PowerModule(ModularCommon.MODULE_WATER_ELECTROLYZER, HEADONLY, MuseIcon.WATER_ELECTROLYZER, ModularCommon.CATEGORY_ENVIRONMENTAL)
|
||||
.setDescription("When you run out of air, this module will jolt the water around you, electrolyzing a small bubble to breathe from.")
|
||||
.addInstallCost(copyAndResize(ItemComponent.lvcapacitor, 1))
|
||||
.setToggleable(true)
|
||||
.addBaseProperty(ModularCommon.WATERBREATHING_ENERGY_CONSUMPTION, 1000, "J");
|
||||
ModuleManager.addModule(module);
|
||||
|
||||
module = new PowerModule(ModularCommon.MODULE_SWIM_BOOST, LEGSONLY, MuseIcon.SWIM_BOOST, ModularCommon.CATEGORY_MOVEMENT)
|
||||
.setDescription(
|
||||
"By refitting an ion thruster for underwater use, you may be able to add extra forward (or backward) thrust when underwater.")
|
||||
.setToggleable(true)
|
||||
.addInstallCost(copyAndResize(ItemComponent.ionThruster, 1))
|
||||
.addInstallCost(copyAndResize(ItemComponent.solenoid, 2))
|
||||
.addTradeoffProperty("Thrust", ModularCommon.SWIM_BOOST_ENERGY_CONSUMPTION, 100, "J")
|
||||
|
@ -329,12 +337,14 @@ public class Config {
|
|||
|
||||
module = new PowerModule(ModularCommon.MODULE_CLIMB_ASSIST, LEGSONLY, MuseIcon.STEP_ASSIST, ModularCommon.CATEGORY_MOVEMENT)
|
||||
.setDescription("A pair of dedicated servos allow you to effortlessly step up 1m-high ledges.")
|
||||
.setToggleable(true)
|
||||
.addInstallCost(copyAndResize(ItemComponent.servoMotor, 2));
|
||||
ModuleManager.addModule(module);
|
||||
|
||||
module = new PowerModule(ModularCommon.MODULE_TINT, ARMORONLY, MuseIcon.NETHERSTAR, ModularCommon.CATEGORY_COSMETIC)
|
||||
.setDescription("Give your armor some coloured tinting to customize your armor's appearance.")
|
||||
.addInstallCost(copyAndResize(ItemComponent.laserHologram, 1))
|
||||
.setToggleable(true)
|
||||
.addTradeoffProperty("Red Intensity", ModularCommon.RED_TINT, 1, "%")
|
||||
.addTradeoffProperty("Green Intensity", ModularCommon.GREEN_TINT, 1, "%")
|
||||
.addTradeoffProperty("Blue Intensity", ModularCommon.BLUE_TINT, 1, "%");
|
||||
|
@ -342,6 +352,7 @@ public class Config {
|
|||
|
||||
module = new PowerModule(ModularCommon.MODULE_TRANSPARENT_ARMOR, ARMORONLY, MuseIcon.TRANSPARENT_ARMOR, ModularCommon.CATEGORY_COSMETIC)
|
||||
.setDescription("Make the item transparent, so you can show off your skin without losing armor.")
|
||||
.setToggleable(true)
|
||||
.addInstallCost(copyAndResize(ItemComponent.laserHologram, 1));
|
||||
ModuleManager.addModule(module);
|
||||
|
||||
|
@ -424,8 +435,8 @@ public class Config {
|
|||
}
|
||||
|
||||
public static boolean doAdditionalInfo() {
|
||||
if(FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT){
|
||||
if(Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) {
|
||||
if (FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT) {
|
||||
if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,9 +17,9 @@ public abstract class MuseLogger {
|
|||
protected final static String ERRORPREFIX = "MMMPS - ERROR - ";
|
||||
|
||||
public static void logDebug(String string) {
|
||||
if(Config.isDebugging()) {
|
||||
if (Config.isDebugging()) {
|
||||
Side side = FMLCommonHandler.instance().getEffectiveSide();
|
||||
Logger.getLogger("MMMPS DEBUG").info(side + ": " + string);
|
||||
Logger.getLogger("STDOUT").info(DEBUGPREFIX + side + ": " + string);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,7 @@ public abstract class MuseLogger {
|
|||
*/
|
||||
public static void logError(String string) {
|
||||
Side side = FMLCommonHandler.instance().getEffectiveSide();
|
||||
Logger.getLogger("MMMPS ERROR").info(side + ": " + string);
|
||||
Logger.getLogger("STDERR").info(ERRORPREFIX + side + ": " + string);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ import java.util.List;
|
|||
import java.util.Set;
|
||||
|
||||
import net.machinemuse.general.MuseMathUtils;
|
||||
import net.machinemuse.powersuits.common.MuseLogger;
|
||||
import net.machinemuse.powersuits.powermodule.ModuleManager;
|
||||
import net.machinemuse.powersuits.powermodule.PowerModule;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -42,12 +43,20 @@ public class ItemUtils {
|
|||
}
|
||||
|
||||
public static boolean isModuleActive(NBTTagCompound itemTag, String moduleName) {
|
||||
if (itemTag.hasKey(moduleName) && itemTag.getCompoundTag(moduleName).getBoolean(ACTIVE)) {
|
||||
if (ItemUtils.tagHasModule(itemTag, moduleName) && itemTag.getCompoundTag(moduleName).getBoolean(ACTIVE)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void toggleModule(NBTTagCompound itemTag, String name, boolean toggleval) {
|
||||
if (ItemUtils.tagHasModule(itemTag, name)) {
|
||||
MuseLogger.logDebug("Toggling " + name + ": " + toggleval);
|
||||
NBTTagCompound moduleTag = itemTag.getCompoundTag(name);
|
||||
moduleTag.setBoolean(ACTIVE, toggleval);
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean itemHasModule(ItemStack stack, String moduleName) {
|
||||
return tagHasModule(getMuseItemTag(stack), moduleName);
|
||||
}
|
||||
|
@ -251,9 +260,7 @@ public class ItemUtils {
|
|||
* Sets the value of the given nbt tag, or removes it if the value would be
|
||||
* zero.
|
||||
*/
|
||||
public static void setDoubleOrRemove(NBTTagCompound itemProperties,
|
||||
String string,
|
||||
double value) {
|
||||
public static void setDoubleOrRemove(NBTTagCompound itemProperties, String string, double value) {
|
||||
if (itemProperties != null) {
|
||||
if (value == 0) {
|
||||
itemProperties.removeTag(string);
|
||||
|
@ -491,10 +498,12 @@ public class ItemUtils {
|
|||
return installedModules;
|
||||
}
|
||||
|
||||
public static void toggleModule(NBTTagCompound itemTag, String name, boolean toggleval) {
|
||||
if (ItemUtils.tagHasModule(itemTag, name)) {
|
||||
NBTTagCompound moduleTag = itemTag.getCompoundTag(name);
|
||||
moduleTag.setBoolean(ACTIVE, toggleval);
|
||||
public static void toggleModuleForPlayer(EntityPlayer player, String name, boolean toggleval) {
|
||||
for (ItemStack stack : ItemUtils.modularItemsEquipped(player)) {
|
||||
NBTTagCompound itemTag = ItemUtils.getMuseItemTag(stack);
|
||||
toggleModule(itemTag, name, toggleval);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -87,6 +87,26 @@ public abstract class MusePacket {
|
|||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public boolean readBoolean() {
|
||||
try {
|
||||
boolean read = datain.readBoolean();
|
||||
return read;
|
||||
} catch (IOException e) {
|
||||
MuseLogger.logError("PROBLEM READING DOUBLE FROM PACKET D:");
|
||||
e.printStackTrace();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public void writeBoolean(boolean val) {
|
||||
try {
|
||||
dataout.writeBoolean(val);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public double readDouble() {
|
||||
try {
|
||||
double read = datain.readDouble();
|
||||
|
|
|
@ -16,6 +16,7 @@ import net.machinemuse.powersuits.network.packets.MusePacketInstallModuleRequest
|
|||
import net.machinemuse.powersuits.network.packets.MusePacketInventoryRefresh;
|
||||
import net.machinemuse.powersuits.network.packets.MusePacketPlayerUpdate;
|
||||
import net.machinemuse.powersuits.network.packets.MusePacketSalvageModuleRequest;
|
||||
import net.machinemuse.powersuits.network.packets.MusePacketToggleRequest;
|
||||
import net.machinemuse.powersuits.network.packets.MusePacketTweakRequest;
|
||||
import net.minecraft.client.entity.EntityClientPlayerMP;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -44,6 +45,7 @@ public class MusePacketHandler implements IPacketHandler {
|
|||
addPacketType(4, MusePacketTweakRequest.class);
|
||||
addPacketType(5, MusePacketFallDistance.class);
|
||||
addPacketType(6, MusePacketPlayerUpdate.class);
|
||||
addPacketType(6, MusePacketToggleRequest.class);
|
||||
|
||||
NetworkRegistry.instance().registerChannel(this,
|
||||
Config.getNetworkChannelName());
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
package net.machinemuse.powersuits.network.packets;
|
||||
|
||||
import java.io.DataInputStream;
|
||||
|
||||
import net.machinemuse.powersuits.item.ItemUtils;
|
||||
import net.machinemuse.powersuits.network.MusePacket;
|
||||
import net.minecraft.client.entity.EntityClientPlayerMP;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import cpw.mods.fml.common.network.Player;
|
||||
|
||||
public class MusePacketToggleRequest extends MusePacket {
|
||||
|
||||
String module;
|
||||
boolean value;
|
||||
|
||||
protected MusePacketToggleRequest(Player player, String module, boolean active) {
|
||||
super(player);
|
||||
writeString(module);
|
||||
writeBoolean(active);
|
||||
}
|
||||
|
||||
protected MusePacketToggleRequest(Player player, DataInputStream data) {
|
||||
super(player, data);
|
||||
module = readString(64);
|
||||
value = readBoolean();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleClient(EntityClientPlayerMP player) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleServer(EntityPlayerMP player) {
|
||||
ItemUtils.toggleModuleForPlayer(player, module, value);
|
||||
}
|
||||
|
||||
}
|
|
@ -31,8 +31,10 @@ public class ModuleManager {
|
|||
double propertyValue = 0;
|
||||
NBTTagCompound itemTag = ItemUtils.getMuseItemTag(stack);
|
||||
for (PowerModule module : moduleList) {
|
||||
if (ItemUtils.isModuleActive(itemTag, module.getName())) {
|
||||
propertyValue = module.applyPropertyModifiers(itemTag, propertyName, propertyValue);
|
||||
}
|
||||
}
|
||||
return propertyValue;
|
||||
}
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ import java.util.Map;
|
|||
import java.util.Set;
|
||||
|
||||
import net.machinemuse.general.gui.MuseIcon;
|
||||
import net.machinemuse.powersuits.item.ItemUtils;
|
||||
import net.machinemuse.powersuits.powermodule.property.IPropertyModifier;
|
||||
import net.machinemuse.powersuits.powermodule.property.PropertyModifierFlatAdditive;
|
||||
import net.machinemuse.powersuits.powermodule.property.PropertyModifierLinearAdditive;
|
||||
|
@ -26,7 +27,7 @@ public class PowerModule {
|
|||
protected NBTTagCompound defaultTag;
|
||||
protected Map<String, List<IPropertyModifier>> propertyModifiers;
|
||||
protected static Map<String, String> units = new HashMap();
|
||||
protected boolean toggleable = true;
|
||||
protected boolean toggleable = false;
|
||||
|
||||
public PowerModule(String name, boolean[] validSlots, MuseIcon icon, String category) {
|
||||
this.name = name;
|
||||
|
@ -37,6 +38,7 @@ public class PowerModule {
|
|||
this.propertyModifiers = new HashMap();
|
||||
this.installCost = new ArrayList();
|
||||
this.defaultTag = new NBTTagCompound();
|
||||
this.defaultTag.setBoolean(ItemUtils.ACTIVE, true);
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
|
@ -58,6 +60,7 @@ public class PowerModule {
|
|||
public boolean isToggleable() {
|
||||
return toggleable;
|
||||
}
|
||||
|
||||
public PowerModule setToggleable(boolean value) {
|
||||
this.toggleable = value;
|
||||
return this;
|
||||
|
|
|
@ -2,6 +2,8 @@ package net.machinemuse.powersuits.tick;
|
|||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import net.machinemuse.general.gui.clickable.ClickableKeybinding;
|
||||
import net.machinemuse.powersuits.client.KeybindManager;
|
||||
import cpw.mods.fml.common.ITickHandler;
|
||||
import cpw.mods.fml.common.TickType;
|
||||
|
||||
|
@ -15,15 +17,13 @@ public class ClientTickHandler implements ITickHandler {
|
|||
|
||||
@Override
|
||||
public void tickStart(EnumSet<TickType> type, Object... tickData) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
for (ClickableKeybinding kb : KeybindManager.getKeybindings()) {
|
||||
kb.doToggleTick();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tickEnd(EnumSet<TickType> type, Object... tickData) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
public void tickEnd(EnumSet<TickType> type, Object... tickData) {}
|
||||
|
||||
@Override
|
||||
public EnumSet<TickType> ticks() {
|
||||
|
|
|
@ -47,7 +47,6 @@ public class PlayerTickHandlerClient implements ITickHandler {
|
|||
EntityPlayerMP player = (EntityPlayerMP) rawPlayer;
|
||||
handleServer(player);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void handleClient(EntityClientPlayerMP player) {
|
||||
|
|
Loading…
Reference in a new issue