Git Product home page Git Product logo

huskyui-plugin's Introduction

HuskyUI

A simple, lightweight UI system for, as of right now, chest GUIs.

Java Docs

Forum Topic

HuskyUI Wiki

Implementation Examples

Hotbar Compass using ElementRegistry

RunnableAction testAction = new RunnableAction(registry, ActionType.NONE,"");
testAction.setRunnable(context -> {
    StateContainer container = new StateContainer();
    Page testPage = Page.builder()
            .setTitle(Text.of(TextColors.GOLD,"Navigator"))
            .setAutoPaging(true)
            .addElement(new Element(
                    ItemStack.builder()
                        .itemType(ItemTypes.DIAMOND)
                        .add(Keys.DISPLAY_NAME,Text.of(TextColors.BLUE,"Diamond Rush"))
                        .build()
                    ))
            .addElement(new Element(
                    ItemStack.builder()
                            .itemType(ItemTypes.FIREWORKS)
                            .add(Keys.DISPLAY_NAME,Text.of(TextColors.RED,"Fireworks Palooza"))
                            .build()
            ))
            .addElement(new Element(
                    ItemStack.builder()
                            .itemType(ItemTypes.MINECART)
                            .add(Keys.DISPLAY_NAME,Text.of(TextColors.GRAY,"Roller Coasters"))
                            .build()
            ))
            .build("testpage");
    container.setInitialState(testPage);
    container.launchFor(context.getObserver());
});
ActionableElement testElement = new ActionableElement(
                                    testAction,
                                    ItemStack.builder()
                                            .itemType(ItemTypes.COMPASS)
                                            .add(Keys.DISPLAY_NAME, Text.of(TextColors.GOLD,"Navigator"))
                                            .build());

HuskyUI.getElementRegistry().registerAutoElement(4,testElement);
ItemStack litMC = ItemStack.builder()
        .itemType(ItemTypes.REDSTONE_TORCH)
        .add(Keys.DISPLAY_NAME,Text.of(TextColors.RED,"LitMC"))
        .build();
HuskyUI.getElementRegistry().registerAutoElement(0,new Element(litMC));
HuskyUI.getElementRegistry().registerAutoElement(8,new Element(litMC));

HuskyUI.getElementRegistry().registerAutoElement(new Element(ItemStack.builder().itemType(ItemTypes.MINECART).add(Keys.DISPLAY_NAME,Text.of("movable 1")).build()));
HuskyUI.getElementRegistry().registerAutoElement(new Element(ItemStack.builder().itemType(ItemTypes.MINECART).add(Keys.DISPLAY_NAME,Text.of("movable 2")).build()));
HuskyUI.getElementRegistry().registerAutoElement(new Element(ItemStack.builder().itemType(ItemTypes.MINECART).add(Keys.DISPLAY_NAME,Text.of("movable 3")).build()));

Result (with some movement of the movable carts.)

img

Generic Example

StateContainer container = new StateContainer();
container.addState(
    Page.builder()
        .setUpdatable(true)
        .setUpdater(page -> {
            int count = 0;
            for(Inventory slot: page.getPageView().slots()){

                if(!slot.peek().isPresent() && count == page.getTicks()%page.getPageView().capacity()){
                    slot.set(ItemStack.of(ItemTypes.STAINED_GLASS_PANE,count));
                }else{
                    if(slot.peek().isPresent()) {
                        ItemStack stack = slot.peek().get();
                        if (stack.getType() == ItemTypes.STAINED_GLASS_PANE) {
                            slot.set(ItemStack.empty());
                        }
                    }
                }
                count++;
            }
        })
        .setUpdateTickRate(20)
        .setTitle(Text.of(TextColors.RED,"BLARG"))
            .addElement(new ActionableElement(new Action(container,ActionType.NORMAL,"test2"),ItemStack.builder().
                    itemType(ItemTypes.COOKIE)
                    .build()))
        .build("test")
);
container.addState(
    Page.builder()
        .setUpdatable(false)
        .setTitle(Text.of(TextColors.GREEN,"alt"))
        .addElement(new ActionableElement(new Action(container,ActionType.BACK,"test"),ItemStack.builder().
                itemType(ItemTypes.COOKIE)
                .build()))
        .setParent("test")
        .build("test2")
);
container.launchFor(plr);

huskyui-plugin's People

Contributors

ferusgrim avatar redrield avatar waterpicker avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

huskyui-plugin's Issues

RunnableAction#runAction doesn't make a super call

This is the current RunnableAction#runAction method.

    @Override
    public void runAction(@Nonnull final String currentState) {
        if (this.runnable != null) {
            this.runnable.run(this);
        } else {
            this.getObserver().sendMessage(Text.of(TextColors.RED, "Cannot run a null action!"));
        }
    }

This is, technically, fine. Because you should be able to define your own actions without necessarily moving your position in the GUI.

However, rather than making people forcefully call this every time that isn't the case, I suggest an alternative:

Rework Actions entirely.

Have fun.

jk, I'll probably make a PR on it soon. <3

NoSuchFieldError: AIR clicking on any item from a GUI

I installed Market (that uses HuskyUI), and clicking on any slot (having or no items) throw this exception.
Stacktrace:

> [03:31:07] [Server thread/ERROR] [Sponge]: Could not pass ClickInventoryEvent$Primary$Impl to Plugin{id=huskyui, name=HuskyUI, version=0.3.0, description=A framework for Inventory UI., source=/home/container/mods/HuskyUI-v0.3.0.jar}
java.lang.NoSuchFieldError: AIR
at com.codehusky.huskyui.states.Page.lambda$generatePageView$1(Page.java:229) ~[Page.class:?]
at org.spongepowered.common.item.inventory.custom.CustomInventoryListener.handle(CustomInventoryListener.java:52) ~[CustomInventoryListener.class:1.10.2-2281-5.2.0-BETA-2464]
at org.spongepowered.common.item.inventory.custom.CustomInventoryListener.handle(CustomInventoryListener.java:35) ~[CustomInventoryListener.class:1.10.2-2281-5.2.0-BETA-2464]
at org.spongepowered.common.event.RegisteredListener.handle(RegisteredListener.java:95) ~[RegisteredListener.class:1.10.2-2281-5.2.0-BETA-2464]
at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:313) ~[SpongeModEventManager.class:1.10.2-2281-5.2.0-BETA-2464]
at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:342) ~[SpongeModEventManager.class:1.10.2-2281-5.2.0-BETA-2464]
at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:326) ~[SpongeModEventManager.class:1.10.2-2281-5.2.0-BETA-2464]
at org.spongepowered.common.SpongeImpl.postEvent(SpongeImpl.java:143) ~[SpongeImpl.class:1.10.2-2281-5.2.0-BETA-2464]
at org.spongepowered.common.event.tracking.phase.packet.PacketFunction.lambda$static$33(PacketFunction.java:708) ~[PacketFunction.class:1.10.2-2281-5.2.0-BETA-2464]
at org.spongepowered.common.event.tracking.phase.packet.PacketPhase.unwind(PacketPhase.java:324) [PacketPhase.class:1.10.2-2281-5.2.0-BETA-2464]
at org.spongepowered.common.event.tracking.CauseTracker.completePhase(CauseTracker.java:225) [CauseTracker.class:1.10.2-2281-5.2.0-BETA-2464]
at org.spongepowered.common.event.tracking.CauseTracker.switchToPhase(CauseTracker.java:167) [CauseTracker.class:1.10.2-2281-5.2.0-BETA-2464]
at org.spongepowered.common.network.PacketUtil.onProcessPacket(PacketUtil.java:156) [PacketUtil.class:1.10.2-2281-5.2.0-BETA-2464]
at net.minecraft.network.PacketThreadUtil$1.redirect$onProcessPacket$zjj000(SourceFile:539) [fl$1.class:?]
at net.minecraft.network.PacketThreadUtil$1.run(SourceFile:13) [fl$1.class:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_131]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_131]
at net.minecraft.util.Util.func_181617_a(SourceFile:45) [h.class:?]
at org.spongepowered.common.SpongeImplHooks.onUtilRunTask(SpongeImplHooks.java:241) [SpongeImplHooks.class:1.10.2-2281-5.2.0-BETA-2464]
at net.minecraft.server.MinecraftServer.redirect$onRun$zhp000(MinecraftServer.java:3932) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:668) [MinecraftServer.class:?]
at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:387) [ld.class:?]
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:613) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:471) [MinecraftServer.class:?]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_131]

Add CI?

Might be worth adding something like Travis or Circle CI to the project to check PRs for compilation errors and the like

Failed to register crates and keys. /hc reload failed

Hello, need a little help. We have been trying to use huskycrates on pixelmon server but having an issue. error on /hc reload.

attached startup console under error console.

07.02 11:32:23 [Server] Server thread/ERROR [HuskyCrates]: Printing out ItemID ObjectMappingException below!
07.02 11:32:23 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: ninja.leaping.configurate.objectmapping.ObjectMappingException: Input 'pixelmon:dratini' was not a valid value for type org.spongepowered.api.item.ItemType
07.02 11:32:23 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at org.spongepowered.common.config.CatalogTypeTypeSerializer.deserialize(CatalogTypeTypeSerializer.java:49)
07.02 11:32:23 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at org.spongepowered.common.config.CatalogTypeTypeSerializer.deserialize(CatalogTypeTypeSerializer.java:39)
07.02 11:32:23 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at ninja.leaping.configurate.SimpleConfigurationNode.getValue(SimpleConfigurationNode.java:232)
07.02 11:32:23 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at ninja.leaping.configurate.ConfigurationNode.getValue(ConfigurationNode.java:595)
07.02 11:32:23 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at com.codehusky.huskycrates.crate.virtual.Item.(Item.java:77)
07.02 11:32:23 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at com.codehusky.huskycrates.crate.virtual.Slot.(Slot.java:41)
07.02 11:32:23 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at com.codehusky.huskycrates.crate.virtual.Crate.(Crate.java:139)
07.02 11:32:23 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at com.codehusky.huskycrates.HuskyCrates.loadConfig(HuskyCrates.java:226)
07.02 11:32:23 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at com.codehusky.huskycrates.HuskyCrates.reload(HuskyCrates.java:402)
07.02 11:32:23 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at com.codehusky.huskycrates.command.ReloadCommand.execute(ReloadCommand.java:17)
07.02 11:32:23 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at org.spongepowered.api.command.args.ChildCommandElementExecutor.execute(ChildCommandElementExecutor.java:255)
07.02 11:32:23 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at org.spongepowered.api.command.spec.CommandSpec.process(CommandSpec.java:388)
07.02 11:32:23 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at org.spongepowered.common.command.SpongeCommandDispatcher.process(SpongeCommandDispatcher.java:355)
07.02 11:32:23 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at org.spongepowered.common.command.SpongeCommandManager.process(SpongeCommandManager.java:360)
07.02 11:32:23 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at net.minecraft.command.ServerCommandManager.func_71556_a(SourceFile:665)
07.02 11:32:23 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at net.minecraft.network.NetHandlerPlayServer.func_147361_d(NetHandlerPlayServer.java:962)
07.02 11:32:23 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at net.minecraft.network.NetHandlerPlayServer.func_147354_a(NetHandlerPlayServer.java:941)
07.02 11:32:23 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at net.minecraft.network.play.client.CPacketChatMessage.func_148833_a(SourceFile:37)
07.02 11:32:23 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at net.minecraft.network.play.client.CPacketChatMessage.func_148833_a(SourceFile:9)
07.02 11:32:23 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at org.spongepowered.common.event.tracking.phase.packet.PacketPhaseUtil.onProcessPacket(PacketPhaseUtil.java:219)
07.02 11:32:23 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at net.minecraft.network.PacketThreadUtil$1.redirect$zlc000$impl$redirectToPhaseTracker(SourceFile:540)
07.02 11:32:23 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at net.minecraft.network.PacketThreadUtil$1.run(SourceFile:13)
07.02 11:32:23 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
07.02 11:32:23 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at java.util.concurrent.FutureTask.run(FutureTask.java:266)
07.02 11:32:23 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at net.minecraft.util.Util.func_181617_a(SourceFile:46)
07.02 11:32:23 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at org.spongepowered.common.SpongeImplHooks.onUtilRunTask(SpongeImplHooks.java:310)
07.02 11:32:23 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at net.minecraft.server.MinecraftServer.redirect$zjg000$onRun(MinecraftServer.java:4682)
07.02 11:32:23 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:723)
07.02 11:32:23 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:397)
07.02 11:32:23 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:668)
07.02 11:32:23 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:526)
07.02 11:32:23 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at java.lang.Thread.run(Thread.java:748)
07.02 11:32:23 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: com.codehusky.huskycrates.exception.ConfigParseError: Supplied Item ID is not valid! Issue can be located at ShinyCrate.slots.6.displayItem.id
07.02 11:32:23 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at com.codehusky.huskycrates.crate.virtual.Item.(Item.java:81)
07.02 11:32:23 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at com.codehusky.huskycrates.crate.virtual.Slot.(Slot.java:41)
07.02 11:32:23 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at com.codehusky.huskycrates.crate.virtual.Crate.(Crate.java:139)
07.02 11:32:23 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at com.codehusky.huskycrates.HuskyCrates.loadConfig(HuskyCrates.java:226)
07.02 11:32:23 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at com.codehusky.huskycrates.HuskyCrates.reload(HuskyCrates.java:402)
07.02 11:32:23 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at com.codehusky.huskycrates.command.ReloadCommand.execute(ReloadCommand.java:17)
07.02 11:32:23 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at org.spongepowered.api.command.args.ChildCommandElementExecutor.execute(ChildCommandElementExecutor.java:255)
07.02 11:32:23 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at org.spongepowered.api.command.spec.CommandSpec.process(CommandSpec.java:388)
07.02 11:32:23 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at org.spongepowered.common.command.SpongeCommandDispatcher.process(SpongeCommandDispatcher.java:355)
07.02 11:32:23 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at org.spongepowered.common.command.SpongeCommandManager.process(SpongeCommandManager.java:360)
07.02 11:32:23 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at net.minecraft.command.ServerCommandManager.func_71556_a(SourceFile:665)
07.02 11:32:23 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at net.minecraft.network.NetHandlerPlayServer.func_147361_d(NetHandlerPlayServer.java:962)
07.02 11:32:23 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at net.minecraft.network.NetHandlerPlayServer.func_147354_a(NetHandlerPlayServer.java:941)
07.02 11:32:23 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at net.minecraft.network.play.client.CPacketChatMessage.func_148833_a(SourceFile:37)
07.02 11:32:23 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at net.minecraft.network.play.client.CPacketChatMessage.func_148833_a(SourceFile:9)
07.02 11:32:23 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at org.spongepowered.common.event.tracking.phase.packet.PacketPhaseUtil.onProcessPacket(PacketPhaseUtil.java:219)
07.02 11:32:23 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at net.minecraft.network.PacketThreadUtil$1.redirect$zlc000$impl$redirectToPhaseTracker(SourceFile:540)
07.02 11:32:23 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at net.minecraft.network.PacketThreadUtil$1.run(SourceFile:13)
07.02 11:32:23 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
07.02 11:32:23 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at java.util.concurrent.FutureTask.run(FutureTask.java:266)
07.02 11:32:23 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at net.minecraft.util.Util.func_181617_a(SourceFile:46)
07.02 11:32:23 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at org.spongepowered.common.SpongeImplHooks.onUtilRunTask(SpongeImplHooks.java:310)
07.02 11:32:23 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at net.minecraft.server.MinecraftServer.redirect$zjg000$onRun(MinecraftServer.java:4682)
07.02 11:32:23 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:723)
07.02 11:32:23 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:397)
07.02 11:32:23 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:668)
07.02 11:32:23 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:526)
07.02 11:32:23 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at java.lang.Thread.run(Thread.java:748)

Startup console:

07.02 13:35:43 [Server] Server thread/INFO [HuskyCrates]: Loading Crates...
07.02 13:35:43 [Server] Server thread/ERROR [HuskyCrates]: Printing out ItemID ObjectMappingException below!
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: ninja.leaping.configurate.objectmapping.ObjectMappingException: Input 'pixelmon.pokegive %p random shiny' was not a valid value for type org.spongepowered.api.item.ItemType
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at org.spongepowered.common.config.CatalogTypeTypeSerializer.deserialize(CatalogTypeTypeSerializer.java:49)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at org.spongepowered.common.config.CatalogTypeTypeSerializer.deserialize(CatalogTypeTypeSerializer.java:39)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at ninja.leaping.configurate.SimpleConfigurationNode.getValue(SimpleConfigurationNode.java:232)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at ninja.leaping.configurate.ConfigurationNode.getValue(ConfigurationNode.java:595)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at com.codehusky.huskycrates.crate.virtual.Item.(Item.java:77)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at com.codehusky.huskycrates.crate.virtual.Slot.(Slot.java:41)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at com.codehusky.huskycrates.crate.virtual.Crate.(Crate.java:139)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at com.codehusky.huskycrates.HuskyCrates.loadConfig(HuskyCrates.java:226)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at com.codehusky.huskycrates.HuskyCrates.gameStarted(HuskyCrates.java:327)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at org.spongepowered.common.event.listener.GameStartedServerEventListener_HuskyCrates_gameStarted8.handle(Unknown Source)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at org.spongepowered.common.event.RegisteredListener.handle(RegisteredListener.java:97)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:383)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at org.spongepowered.mod.event.SpongeModEventManager.extendedPost(SpongeModEventManager.java:458)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:419)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at org.spongepowered.common.SpongeImpl.postEvent(SpongeImpl.java:255)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at org.spongepowered.mod.SpongeMod.onStateEvent(SpongeMod.java:361)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at java.lang.reflect.Method.invoke(Method.java:498)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at com.google.common.eventbus.EventBus.post(EventBus.java:217)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:219)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:197)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at java.lang.reflect.Method.invoke(Method.java:498)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at com.google.common.eventbus.EventBus.post(EventBus.java:217)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at net.minecraftforge.fml.common.LoadController.redirect$zza000$forgeImpl$PostEvent(LoadController.java:568)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:136)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at net.minecraftforge.fml.common.Loader.serverStarted(Loader.java:804)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at net.minecraftforge.fml.common.FMLCommonHandler.handleServerStarted(FMLCommonHandler.java:302)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:488)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.crate.virtual.Item::80]: at java.lang.Thread.run(Thread.java:748)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: com.codehusky.huskycrates.exception.ConfigParseError: Supplied Item ID is not valid! Issue can be located at shinycrate.slots.0.displayItem.id
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at com.codehusky.huskycrates.crate.virtual.Item.(Item.java:81)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at com.codehusky.huskycrates.crate.virtual.Slot.(Slot.java:41)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at com.codehusky.huskycrates.crate.virtual.Crate.(Crate.java:139)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at com.codehusky.huskycrates.HuskyCrates.loadConfig(HuskyCrates.java:226)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at com.codehusky.huskycrates.HuskyCrates.gameStarted(HuskyCrates.java:327)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at org.spongepowered.common.event.listener.GameStartedServerEventListener_HuskyCrates_gameStarted8.handle(Unknown Source)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at org.spongepowered.common.event.RegisteredListener.handle(RegisteredListener.java:97)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:383)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at org.spongepowered.mod.event.SpongeModEventManager.extendedPost(SpongeModEventManager.java:458)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:419)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at org.spongepowered.common.SpongeImpl.postEvent(SpongeImpl.java:255)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at org.spongepowered.mod.SpongeMod.onStateEvent(SpongeMod.java:361)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at java.lang.reflect.Method.invoke(Method.java:498)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at com.google.common.eventbus.EventBus.post(EventBus.java:217)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:219)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:197)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at java.lang.reflect.Method.invoke(Method.java:498)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at com.google.common.eventbus.EventBus.post(EventBus.java:217)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at net.minecraftforge.fml.common.LoadController.redirect$zza000$forgeImpl$PostEvent(LoadController.java:568)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:136)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at net.minecraftforge.fml.common.Loader.serverStarted(Loader.java:804)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at net.minecraftforge.fml.common.FMLCommonHandler.handleServerStarted(FMLCommonHandler.java:302)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:488)
07.02 13:35:43 [Server] Server thread/INFO [STDERR]: [com.codehusky.huskycrates.HuskyCrates:loadConfig:285]: at java.lang.Thread.run(Thread.java:748)
07.02 13:35:43 [Server] Server thread/ERROR [HuskyCrates]: Failed to register crates and keys. Please review the errors printed above.
07.02 13:35:43 [Server] Server thread/INFO [com.zaxxer.hikari.HikariDataSource]: HikariPool-1 - Starting...
07.02 13:35:45 [Server] Server thread/INFO [com.zaxxer.hikari.HikariDataSource]: HikariPool-1 - Start completed.
07.02 13:35:45 [Server] Server thread/INFO [HuskyCrates]: Begin Database Load...
07.02 13:35:45 [Server] Server thread/INFO [HuskyCrates]: End Database Load.
07.02 13:35:45 [Server] Server thread/ERROR [HuskyCrates]: Crates has started with errors. Please review the issue(s) above.

Handle big elements count in autopage

Currently if there are too many elements in an autopage the page will grow too big for a normal chest ui and appear bugged out.

We need to generate new subpages on the fly to account for this.

Throwing some huge error

10.02 11:50:08 [Server] Server thread/INFO [STDOUT]: [com.codehusky.huskyui.HuskyUI:onItemClick:326]: Primary{cancelled=false, cause=Cause[Context=Context["sponge:spawn_type"=SpongeSpawnType{id=sponge:dropped_item, name=DroppedItem}], Stack={net.minecraft.inventory.ContainerPlayer@43e1e0c3, EntityPlayerMP['LilMsJester'/46435, l='PixelmonWorld', x=1689.30, y=78.00, z=-633.85]}], context=Context["sponge:spawn_type"=SpongeSpawnType{id=sponge:dropped_item, name=DroppedItem}], cursorTransaction=Transaction{original=SpongeItemStackSnapshot{itemType=Item{Name=flint}, quantity=8}, default=SpongeItemStackSnapshot{itemType=ItemAir{Name=null}, quantity=0}, custom=null, valid=true}, entities=[EntityItem['item.item.flint'/193363, l='PixelmonWorld', x=1689.30, y=79.32, z=-633.85]], entitySnapshots=null, source=net.minecraft.inventory.ContainerPlayer@43e1e0c3, targetInventory=net.minecraft.inventory.ContainerPlayer@43e1e0c3, transactions=[]} 10.02 11:50:08 [Server] Server thread/ERROR [Sponge]: Could not pass ClickInventoryEvent$Drop$Outside$Primary$Impl to Plugin{id=huskyui, name=HuskyUI, version=0.5.1, description=A framework for Inventory UI., source=/mods/HuskyUI-v0.5.1-API7-8.jar} 10.02 11:50:08 [Server] INFO java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 10.02 11:50:08 [Server] INFO at java.util.ArrayList.rangeCheck(ArrayList.java:657) ~[?:1.8.0_151] 10.02 11:50:08 [Server] INFO at java.util.ArrayList.get(ArrayList.java:433) ~[?:1.8.0_151] 10.02 11:50:08 [Server] INFO at com.codehusky.huskyui.HuskyUI.onItemClick(HuskyUI.java:328) ~[HuskyUI.class:?] 10.02 11:50:08 [Server] INFO at org.spongepowered.common.event.listener.ClickInventoryEventListener_HuskyUI_onItemClick72.handle(Unknown Source) ~[?:?] 10.02 11:50:08 [Server] INFO at org.spongepowered.common.event.RegisteredListener.handle(RegisteredListener.java:95) ~[RegisteredListener.class:1.12.2-2555-7.1.0-BETA-2844] 10.02 11:50:08 [Server] INFO at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:338) [SpongeModEventManager.class:1.12.2-2555-7.1.0-BETA-2844] 10.02 11:50:08 [Server] INFO at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:315) [SpongeModEventManager.class:1.12.2-2555-7.1.0-BETA-2844] 10.02 11:50:08 [Server] INFO at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:367) [SpongeModEventManager.class:1.12.2-2555-7.1.0-BETA-2844] 10.02 11:50:08 [Server] INFO at org.spongepowered.common.event.SpongeEventManager.post(SpongeEventManager.java:422) [SpongeEventManager.class:1.12.2-2555-7.1.0-BETA-2844] 10.02 11:50:08 [Server] INFO at org.spongepowered.common.SpongeImpl.postEvent(SpongeImpl.java:207) [SpongeImpl.class:1.12.2-2555-7.1.0-BETA-2844] 10.02 11:50:08 [Server] INFO at org.spongepowered.common.event.tracking.phase.packet.BasicInventoryPacketState.unwind(BasicInventoryPacketState.java:201) [BasicInventoryPacketState.class:1.12.2-2555-7.1.0-BETA-2844] 10.02 11:50:08 [Server] INFO at org.spongepowered.common.event.tracking.phase.packet.BasicInventoryPacketState.unwind(BasicInventoryPacketState.java:55) [BasicInventoryPacketState.class:1.12.2-2555-7.1.0-BETA-2844] 10.02 11:50:08 [Server] INFO at org.spongepowered.common.event.tracking.PhaseTracker.completePhase(PhaseTracker.java:232) [PhaseTracker.class:1.12.2-2555-7.1.0-BETA-2844] 10.02 11:50:08 [Server] INFO at org.spongepowered.common.event.tracking.PhaseContext.close(PhaseContext.java:394) [PhaseContext.class:1.12.2-2555-7.1.0-BETA-2844] 10.02 11:50:08 [Server] INFO at org.spongepowered.common.network.PacketUtil.onProcessPacket(PacketUtil.java:151) [PacketUtil.class:1.12.2-2555-7.1.0-BETA-2844] 10.02 11:50:08 [Server] INFO at net.minecraft.network.PacketThreadUtil$1.redirect$onProcessPacket$zkl000(SourceFile:539) [hv$1.class:?] 10.02 11:50:08 [Server] INFO at net.minecraft.network.PacketThreadUtil$1.run(SourceFile:13) [hv$1.class:?] 10.02 11:50:08 [Server] INFO at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_151] 10.02 11:50:08 [Server] INFO at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_151] 10.02 11:50:08 [Server] INFO at net.minecraft.util.Util.func_181617_a(SourceFile:46) [h.class:?] 10.02 11:50:08 [Server] INFO at org.spongepowered.common.SpongeImplHooks.onUtilRunTask(SpongeImplHooks.java:274) [SpongeImplHooks.class:1.12.2-2555-7.1.0-BETA-2844] 10.02 11:50:08 [Server] INFO at net.minecraft.server.MinecraftServer.redirect$onRun$zja000(MinecraftServer.java:4007) [MinecraftServer.class:?] 10.02 11:50:08 [Server] INFO at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:721) [MinecraftServer.class:?] 10.02 11:50:08 [Server] INFO at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:396) [nz.class:?] 10.02 11:50:08 [Server] INFO at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:666) [MinecraftServer.class:?] 10.02 11:50:08 [Server] INFO at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:524) [MinecraftServer.class:?] 10.02 11:50:11 [Multicraft] Skipped 1 lines due to rate limit (30/s)

PageBuilder#addElement improperly places Elements

        public PageBuilder addElement(@Nonnull final Element element) {
            this.elements.put(this.elements.size(), element);
            return this;
        }

Considering that the key to this Map is an Integer, it's entirely possible that this.elements.size() doesn't always represent the correct placement.

We will have to find a solution to this.

Example:

public void test(final PageBuilder builder) {
    builder.putElement(2, someElement);
    builder.putElement(6, someOtherElement);
    builder.addElement(evenAnotherElement);
}

By the time PageBuilder#addElement is called, Map#size() will return 2. Meaning PageBuilder#addElement will actually overwrite the first value.

CommandAction

Something to run commands with options for running as server or as player.

Suggestion: rework of API to make Actions easier to deal with

Regarding this API usage:

builder.putElement(slot, new ActionableElement(
    new RunnableAction(container, ActionType.NONE, "", context -> {}),
    item
));

This is messy for a number of reasons:

  • There is no reason to provide the StateContainer to an Action - context can be passed when necessary.
  • Even if the ActionType is NONE, you still have to pass a goalState. Even though this could be made a default property of an Action, such that if only the container and effective consumer (context -> {}) is passed, it still isn't as clean as it could be. In reality, goalState logic is just another consumer permanently attached to the Action, when they could easily be merged together.

I propose:

ActionableElement::new(ItemStack, Consumer<ActionContext>)

Here, ActionContext replaces what was initially RunnableAction and replaces the functionality of the consumer, however here it is not the RunnableAction passed into the anonymous function - it is an object specifically for the runnable's context.

To replace the functionality of goalState transition being easily requested with ActionType I propose Actions.GO and Actions.BACK, where Actions is an interface consisting of static default Consumer<ActionContext which automatically change the state.

Actions.GO could be defined as state -> context -> context.setState(state), which allows the use of Actions.GO("some_state").

Actions.BACK could be defined context -> context.setState(context.getParent()) or just context -> context.back(). It is useful to shorten this, because of the following scenario.

new ActionableElement(item, context -> {
    context.getObserver().sendMessage(...);
    context.back();
});

This allows for the previous functionality where a runnable can be executed AND the state can be changed at once.

bug when interacting with some inventories

some error

[03:24:55] [Server thread/INFO] [STDOUT]: [com.codehusky.huskyui.HuskyUI:onItemClick:326]: Primary{cancelled=false, cause=Cause[Context=Context["sponge:spawn_type"=SpongeSpawnType{id=sponge:dropped_item, name=DroppedItem}], Stack={net.minecraft.inventory.ContainerPlayer@1d604a51, EntityPlayerMP['Skeletonman0'/127, l='world', x=12639.51, y=156.02, z=-20947.17]}], context=Context["sponge:spawn_type"=SpongeSpawnType{id=sponge:dropped_item, name=DroppedItem}], cursorTransaction=Transaction{original=SpongeItemStackSnapshot{itemType=chisel:stonebrick, quantity=1}, default=SpongeItemStackSnapshot{itemType=minecraft:air, quantity=0}, custom=null, valid=true}, entities=[EntityItem['item.tile.chisel.stonebrick'/80986, l='world', x=12639.51, y=157.34, z=-20947.17]], entitySnapshots=null, source=net.minecraft.inventory.ContainerPlayer@1d604a51, targetInventory=net.minecraft.inventory.ContainerPlayer@1d604a51, transactions=[]}
>
[03:24:55] [Server thread/ERROR] [Sponge]: Could not pass ClickInventoryEvent$Drop$Outside$Primary$Impl to Plugin{id=huskyui, name=HuskyUI, version=0.5.1, description=A framework for Inventory UI., source=/home/container/mods/HuskyUI-v0.5.1-API7-8.jar}
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.rangeCheck(ArrayList.java:657) ~[?:1.8.0_161]
at java.util.ArrayList.get(ArrayList.java:433) ~[?:1.8.0_161]
at com.codehusky.huskyui.HuskyUI.onItemClick(HuskyUI.java:328) ~[HuskyUI.class:?]
at org.spongepowered.common.event.listener.ClickInventoryEventListener_HuskyUI_onItemClick43.handle(Unknown Source) ~[?:?]
at org.spongepowered.common.event.RegisteredListener.handle(RegisteredListener.java:95) ~[RegisteredListener.class:1.12.2-2611-7.1.0-BETA-2939]
at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:335) [SpongeModEventManager.class:1.12.2-2611-7.1.0-BETA-2939]
at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:312) [SpongeModEventManager.class:1.12.2-2
611-7.1.0-BETA-2939]
at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:364) [SpongeModEventManager.class:1.12.2-2611-7.1.0-BETA-2939]
at org.spongepowered.common.event.SpongeEventManager.post(SpongeEventManager.java:427) [SpongeEventManager.class:1.12.2-2611-7.1.0-BETA-2939]
at org.spongepowered.common.SpongeImpl.postEvent(SpongeImpl.java:207) [SpongeImpl.class:1.12.2-2611-7.1.0-BETA-2939]
at org.spongepowered.common.event.tracking.phase.packet.BasicInventoryPacketState.unwind(BasicInventoryPacketState.java:202) [BasicInventoryPacketState.class:1.12.2-2611-7.1.0-BETA-2939]
at org.spongepowered.common.event.tracking.phase.packet.BasicInventoryPacketState.unwind(BasicInventoryPacketState.java:55) [BasicInventoryPacketState.class:1.12.2-2611-7.1.0-BETA-2939]
at org.spongepowered.common.event.tracking.PhaseTracker.completePhase(PhaseTracker.java:211) [PhaseTracker.class:1.12.2-2611-7.1.0-BETA-2939]
at org.spongepowered.common.event.tracking.PhaseContext.close(PhaseContext.java:392) [PhaseContext.class:1.12.2-2611-7.1.0-BETA-2939]
at org.spongepowered.common.network.PacketUtil.onProcessPacket(PacketUtil.java:151) [PacketUtil.class:1.12.2-2611-7.1.0-BETA-2939]
at net.minecraft.network.PacketThreadUtil$1.redirect$onProcessPacket$zla000(SourceFile:539) [hv$1.class:?]
at net.minecraft.network.PacketThreadUtil$1.run(SourceFile:13) [hv$1.class:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_161]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_161]
at net.minecraft.util.Util.func_181617_a(SourceFile:46) [h.class:?]
at org.spongepowered.common.SpongeImplHooks.onUtilRunTask(SpongeImplHooks.java:276) [SpongeImplHooks.class:1.12.2-2611-7.1.0-BETA-2939]
at net.minecraft.server.MinecraftServer.redirect$onRun$zjf000(MinecraftServer.java:4003) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:721) [MinecraftServer.class:?]
at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:396) [nz.class:?]
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:666) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:524) [MinecraftServer.class:?]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_161]

Latest release still contains bStats

The latest release here on GitHub still contains even though it has been removed from source.
A clean build with produces the correct jar. So you might want to clean your build environment ;)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.