// 
// Decompiled by Procyon v0.6.0
// 

package com.hypixel.hytale.builtin.beds;

import com.hypixel.hytale.server.core.plugin.JavaPluginInit;
import com.hypixel.hytale.builtin.beds.sleep.resources.WorldSomnolence;
import com.hypixel.hytale.component.ResourceType;
import com.hypixel.hytale.builtin.beds.sleep.components.SleepTracker;
import com.hypixel.hytale.builtin.beds.sleep.components.PlayerSomnolence;
import com.hypixel.hytale.server.core.universe.world.storage.EntityStore;
import com.hypixel.hytale.component.ComponentType;
import com.hypixel.hytale.server.core.plugin.JavaPlugin;

public class BedsPlugin extends JavaPlugin
{
    private static BedsPlugin instance;
    private ComponentType<EntityStore, PlayerSomnolence> playerSomnolenceComponentType;
    private ComponentType<EntityStore, SleepTracker> sleepTrackerComponentType;
    private ResourceType<EntityStore, WorldSomnolence> worldSomnolenceResourceType;
    
    public static BedsPlugin getInstance() {
        return BedsPlugin.instance;
    }
    
    public BedsPlugin(final JavaPluginInit init) {
        super(init);
    }
    
    @Override
    protected void setup() {
        // 
        // This method could not be decompiled.
        // 
        // Original Bytecode:
        // 
        //     1: putstatic       com/hypixel/hytale/builtin/beds/BedsPlugin.instance:Lcom/hypixel/hytale/builtin/beds/BedsPlugin;
        //     4: aload_0         /* this */
        //     5: aload_0         /* this */
        //     6: invokevirtual   com/hypixel/hytale/builtin/beds/BedsPlugin.getEntityStoreRegistry:()Lcom/hypixel/hytale/component/ComponentRegistryProxy;
        //     9: ldc             Lcom/hypixel/hytale/builtin/beds/sleep/components/PlayerSomnolence;.class
        //    11: invokedynamic   BootstrapMethod #0, get:()Ljava/util/function/Supplier;
        //    16: invokevirtual   com/hypixel/hytale/component/ComponentRegistryProxy.registerComponent:(Ljava/lang/Class;Ljava/util/function/Supplier;)Lcom/hypixel/hytale/component/ComponentType;
        //    19: putfield        com/hypixel/hytale/builtin/beds/BedsPlugin.playerSomnolenceComponentType:Lcom/hypixel/hytale/component/ComponentType;
        //    22: aload_0         /* this */
        //    23: aload_0         /* this */
        //    24: invokevirtual   com/hypixel/hytale/builtin/beds/BedsPlugin.getEntityStoreRegistry:()Lcom/hypixel/hytale/component/ComponentRegistryProxy;
        //    27: ldc             Lcom/hypixel/hytale/builtin/beds/sleep/components/SleepTracker;.class
        //    29: invokedynamic   BootstrapMethod #1, get:()Ljava/util/function/Supplier;
        //    34: invokevirtual   com/hypixel/hytale/component/ComponentRegistryProxy.registerComponent:(Ljava/lang/Class;Ljava/util/function/Supplier;)Lcom/hypixel/hytale/component/ComponentType;
        //    37: putfield        com/hypixel/hytale/builtin/beds/BedsPlugin.sleepTrackerComponentType:Lcom/hypixel/hytale/component/ComponentType;
        //    40: aload_0         /* this */
        //    41: aload_0         /* this */
        //    42: invokevirtual   com/hypixel/hytale/builtin/beds/BedsPlugin.getEntityStoreRegistry:()Lcom/hypixel/hytale/component/ComponentRegistryProxy;
        //    45: ldc             Lcom/hypixel/hytale/builtin/beds/sleep/resources/WorldSomnolence;.class
        //    47: invokedynamic   BootstrapMethod #2, get:()Ljava/util/function/Supplier;
        //    52: invokevirtual   com/hypixel/hytale/component/ComponentRegistryProxy.registerResource:(Ljava/lang/Class;Ljava/util/function/Supplier;)Lcom/hypixel/hytale/component/ResourceType;
        //    55: putfield        com/hypixel/hytale/builtin/beds/BedsPlugin.worldSomnolenceResourceType:Lcom/hypixel/hytale/component/ResourceType;
        //    58: aload_0         /* this */
        //    59: invokevirtual   com/hypixel/hytale/builtin/beds/BedsPlugin.getEntityStoreRegistry:()Lcom/hypixel/hytale/component/ComponentRegistryProxy;
        //    62: new             Lcom/hypixel/hytale/builtin/beds/sleep/systems/world/StartSlumberSystem;
        //    65: dup            
        //    66: invokespecial   com/hypixel/hytale/builtin/beds/sleep/systems/world/StartSlumberSystem.<init>:()V
        //    69: invokevirtual   com/hypixel/hytale/component/ComponentRegistryProxy.registerSystem:(Lcom/hypixel/hytale/component/system/ISystem;)V
        //    72: aload_0         /* this */
        //    73: invokevirtual   com/hypixel/hytale/builtin/beds/BedsPlugin.getEntityStoreRegistry:()Lcom/hypixel/hytale/component/ComponentRegistryProxy;
        //    76: new             Lcom/hypixel/hytale/builtin/beds/sleep/systems/player/UpdateSleepPacketSystem;
        //    79: dup            
        //    80: invokespecial   com/hypixel/hytale/builtin/beds/sleep/systems/player/UpdateSleepPacketSystem.<init>:()V
        //    83: invokevirtual   com/hypixel/hytale/component/ComponentRegistryProxy.registerSystem:(Lcom/hypixel/hytale/component/system/ISystem;)V
        //    86: aload_0         /* this */
        //    87: invokevirtual   com/hypixel/hytale/builtin/beds/BedsPlugin.getEntityStoreRegistry:()Lcom/hypixel/hytale/component/ComponentRegistryProxy;
        //    90: new             Lcom/hypixel/hytale/builtin/beds/sleep/systems/player/WakeUpOnDismountSystem;
        //    93: dup            
        //    94: invokespecial   com/hypixel/hytale/builtin/beds/sleep/systems/player/WakeUpOnDismountSystem.<init>:()V
        //    97: invokevirtual   com/hypixel/hytale/component/ComponentRegistryProxy.registerSystem:(Lcom/hypixel/hytale/component/system/ISystem;)V
        //   100: aload_0         /* this */
        //   101: invokevirtual   com/hypixel/hytale/builtin/beds/BedsPlugin.getEntityStoreRegistry:()Lcom/hypixel/hytale/component/ComponentRegistryProxy;
        //   104: new             Lcom/hypixel/hytale/builtin/beds/sleep/systems/player/RegisterTrackerSystem;
        //   107: dup            
        //   108: invokespecial   com/hypixel/hytale/builtin/beds/sleep/systems/player/RegisterTrackerSystem.<init>:()V
        //   111: invokevirtual   com/hypixel/hytale/component/ComponentRegistryProxy.registerSystem:(Lcom/hypixel/hytale/component/system/ISystem;)V
        //   114: aload_0         /* this */
        //   115: invokevirtual   com/hypixel/hytale/builtin/beds/BedsPlugin.getEntityStoreRegistry:()Lcom/hypixel/hytale/component/ComponentRegistryProxy;
        //   118: new             Lcom/hypixel/hytale/builtin/beds/sleep/systems/world/UpdateWorldSlumberSystem;
        //   121: dup            
        //   122: invokespecial   com/hypixel/hytale/builtin/beds/sleep/systems/world/UpdateWorldSlumberSystem.<init>:()V
        //   125: invokevirtual   com/hypixel/hytale/component/ComponentRegistryProxy.registerSystem:(Lcom/hypixel/hytale/component/system/ISystem;)V
        //   128: aload_0         /* this */
        //   129: invokevirtual   com/hypixel/hytale/builtin/beds/BedsPlugin.getEntityStoreRegistry:()Lcom/hypixel/hytale/component/ComponentRegistryProxy;
        //   132: new             new            !!! ERROR
        //   135: dup            
        //   136: invokespecial   invokespecial  !!! ERROR
        //   139: invokevirtual   com/hypixel/hytale/component/ComponentRegistryProxy.registerSystem:(Lcom/hypixel/hytale/component/system/ISystem;)V
        //   142: getstatic       com/hypixel/hytale/server/core/modules/interaction/interaction/config/Interaction.CODEC:Lcom/hypixel/hytale/assetstore/codec/AssetCodecMapCodec;
        //   145: ldc             "Bed"
        //   147: ldc             Lcom/hypixel/hytale/builtin/beds/interactions/BedInteraction;.class
        //   149: getstatic       com/hypixel/hytale/builtin/beds/interactions/BedInteraction.CODEC:Lcom/hypixel/hytale/codec/builder/BuilderCodec;
        //   152: invokevirtual   com/hypixel/hytale/assetstore/codec/AssetCodecMapCodec.register:(Ljava/lang/String;Ljava/lang/Class;Lcom/hypixel/hytale/codec/builder/BuilderCodec;)Lcom/hypixel/hytale/assetstore/codec/AssetCodecMapCodec;
        //   155: pop            
        //   156: return         
        // 
        // The error that occurred was:
        // 
        // java.lang.ClassCastException
        // 
        throw new IllegalStateException("An error occurred while decompiling this method.");
    }
    
    public ComponentType<EntityStore, PlayerSomnolence> getPlayerSomnolenceComponentType() {
        return this.playerSomnolenceComponentType;
    }
    
    public ComponentType<EntityStore, SleepTracker> getSleepTrackerComponentType() {
        return this.sleepTrackerComponentType;
    }
    
    public ResourceType<EntityStore, WorldSomnolence> getWorldSomnolenceResourceType() {
        return this.worldSomnolenceResourceType;
    }
}
