classpublicPriority 3
GameModeType
com.hypixel.hytale.server.core.asset.type.gamemode.GameModeType
implements JsonAssetWithMap<String, DefaultAssetMap<String, GameModeType>>
5
Methods
5
Public Methods
5
Fields
1
Constructors
Constants
AssetBuilderCodec<String, GameModeType>CODEC= AssetBuilderCodec.builder(
GameModeType.class,
GameModeType::new,
Code...
ValidatorCache<String>VALIDATOR_CACHE= new ValidatorCache<>(new AssetKeyValidator<>(GameModeType::getAssetStore))
Constructors
protected
GameModeType()Methods
Public Methods (5)
publicstatic
DefaultAssetMap<String, GameModeType> getAssetMap()publicstatic
AssetStore<String, GameModeType, DefaultAssetMap<String, GameModeType>> getAssetStore()@Nonnull
public
String getId()public
String getInteractionsOnEnter()@Nullable
public
String[] getPermissionGroups()@Nonnull
Fields
Protected Fields (2)
protected
AssetExtraInfo.Data dataprotected
String idPrivate/Package Fields (3)
private
AssetStore<String, GameModeType, DefaultAssetMap<String, GameModeType>> ASSET_STOREprivate
String interactionsOnEnterprivate
String[] permissionGroupsInheritance
Parent
Current
Interface
Child
Use mouse wheel to zoom, drag to pan. Click nodes to navigate.
Related Classes
Source Code
package com.hypixel.hytale.server.core.asset.type.gamemode;
import com.hypixel.hytale.assetstore.AssetExtraInfo;
import com.hypixel.hytale.assetstore.AssetKeyValidator;
import com.hypixel.hytale.assetstore.AssetStore;
import com.hypixel.hytale.assetstore.codec.AssetBuilderCodec;
import com.hypixel.hytale.assetstore.map.DefaultAssetMap;
import com.hypixel.hytale.assetstore.map.JsonAssetWithMap;
import com.hypixel.hytale.codec.Codec;
import com.hypixel.hytale.codec.KeyedCodec;
import com.hypixel.hytale.codec.validation.ValidatorCache;
import com.hypixel.hytale.common.util.ArrayUtil;
import com.hypixel.hytale.protocol.GameMode;
import com.hypixel.hytale.server.core.modules.interaction.interaction.config.RootInteraction;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
public class GameModeType implements JsonAssetWithMap<String, DefaultAssetMap<String, GameModeType>> {
@Nonnull
public static final AssetBuilderCodec<String, GameModeType> CODEC = AssetBuilderCodec.builder(
GameModeType.class,
GameModeType::new,
Codec.STRING,
(gmType, s) -> gmType.id = s,
gmType -> gmType.id,
(gmType, data) -> gmType.data = data,
gmType -> gmType.data
)
.append(new KeyedCodec<>("PermissionGroups", Codec.STRING_ARRAY), (gmType, o) -> gmType.permissionGroups = o, gmType -> gmType.permissionGroups)
.add()
.<String>append(
new KeyedCodec<>("InteractionsOnEnter", RootInteraction.CHILD_ASSET_CODEC),
(gmType, interactions) -> gmType.interactionsOnEnter = interactions,
gmType -> gmType.interactionsOnEnter
)
.addValidatorLate(() -> RootInteraction.VALIDATOR_CACHE.getValidator().late())
.add()
.build();
private static AssetStore<String, GameModeType, DefaultAssetMap<String, GameModeType>> ASSET_STORE;
@Nonnull
public static final ValidatorCache<String> VALIDATOR_CACHE = new ValidatorCache<>(new AssetKeyValidator<>(GameModeType::getAssetStore));
protected AssetExtraInfo.Data data;
protected String id;
private String[] permissionGroups;
private String interactionsOnEnter;
@Nonnull
public static AssetStore<String, GameModeType, DefaultAssetMap<String, GameModeType>> getAssetStore() {
// $VF: Couldn't be decompiled
// Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!)
// java.lang.StackOverflowError
// at org.jetbrains.java.decompiler.struct.gen.generics.GenericType.remap(GenericType.java:350)
// at org.jetbrains.java.decompiler.struct.gen.generics.GenericType.getGenericSuperType(GenericType.java:693)
// at org.jetbrains.java.decompiler.modules.decompiler.exps.InvocationExprent.lambda$isMappingInBounds$18(InvocationExprent.java:1608)
// at org.jetbrains.java.decompiler.modules.decompiler.exps.InvocationExprent.lambda$isMappingInBounds$19(InvocationExprent.java:1648)
//
// Bytecode:
// 00: getstatic com/hypixel/hytale/server/core/asset/type/gamemode/GameModeType.ASSET_STORE Lcom/hypixel/hytale/assetstore/AssetStore;
// 03: ifnonnull 0e
// 06: ldc com/hypixel/hytale/server/core/asset/type/gamemode/GameModeType
// 08: invokestatic com/hypixel/hytale/assetstore/AssetRegistry.getAssetStore (Ljava/lang/Class;)Lcom/hypixel/hytale/assetstore/AssetStore;
// 0b: putstatic com/hypixel/hytale/server/core/asset/type/gamemode/GameModeType.ASSET_STORE Lcom/hypixel/hytale/assetstore/AssetStore;
// 0e: getstatic com/hypixel/hytale/server/core/asset/type/gamemode/GameModeType.ASSET_STORE Lcom/hypixel/hytale/assetstore/AssetStore;
// 11: areturn
}
public static DefaultAssetMap<String, GameModeType> getAssetMap() {
// $VF: Couldn't be decompiled
// Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!)
// java.lang.StackOverflowError
// at org.jetbrains.java.decompiler.modules.decompiler.exps.InvocationExprent.lambda$isMappingInBounds$19(InvocationExprent.java:1648)
//
// Bytecode:
// 0: invokestatic com/hypixel/hytale/server/core/asset/type/gamemode/GameModeType.getAssetStore ()Lcom/hypixel/hytale/assetstore/AssetStore;
// 3: invokevirtual com/hypixel/hytale/assetstore/AssetStore.getAssetMap ()Lcom/hypixel/hytale/assetstore/AssetMap;
// 6: checkcast com/hypixel/hytale/assetstore/map/DefaultAssetMap
// 9: areturn
}
@Nonnull
public static GameModeType fromGameMode(@Nonnull GameMode gameMode) {
// $VF: Couldn't be decompiled
// Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!)
// java.lang.StackOverflowError
// at java.base/java.util.HashMap.hash(HashMap.java:338)
// at java.base/java.util.HashMap.getNode(HashMap.java:577)
// at java.base/java.util.HashMap.containsKey(HashMap.java:603)
// at org.jetbrains.java.decompiler.struct.gen.VarType.remap(VarType.java:428)
// at org.jetbrains.java.decompiler.struct.gen.generics.GenericType.remap(GenericType.java:350)
// at org.jetbrains.java.decompiler.struct.gen.generics.GenericType.getGenericSuperType(GenericType.java:693)
// at org.jetbrains.java.decompiler.modules.decompiler.exps.InvocationExprent.lambda$isMappingInBounds$18(InvocationExprent.java:1608)
// at org.jetbrains.java.decompiler.modules.decompiler.exps.InvocationExprent.lambda$isMappingInBounds$19(InvocationExprent.java:1648)
//
// Bytecode:
// 00: invokestatic com/hypixel/hytale/server/core/asset/type/gamemode/GameModeType.getAssetStore ()Lcom/hypixel/hytale/assetstore/AssetStore;
// 03: invokevirtual com/hypixel/hytale/assetstore/AssetStore.getAssetMap ()Lcom/hypixel/hytale/assetstore/AssetMap;
// 06: checkcast com/hypixel/hytale/assetstore/map/DefaultAssetMap
// 09: aload 0
// 0a: invokevirtual com/hypixel/hytale/protocol/GameMode.name ()Ljava/lang/String;
// 0d: invokevirtual com/hypixel/hytale/assetstore/map/DefaultAssetMap.getAsset (Ljava/lang/Object;)Lcom/hypixel/hytale/assetstore/JsonAsset;
// 10: checkcast com/hypixel/hytale/server/core/asset/type/gamemode/GameModeType
// 13: astore 1
// 14: aload 1
// 15: ifnonnull 22
// 18: new com/hypixel/hytale/server/core/asset/type/gamemode/GameModeType
// 1b: dup
// 1c: invokespecial com/hypixel/hytale/server/core/asset/type/gamemode/GameModeType.<init> ()V
// 1f: goto 23
// 22: aload 1
// 23: areturn
}
protected GameModeType() {
}
@Nullable
public String getInteractionsOnEnter() {
return this.interactionsOnEnter;
}
@Nonnull
public String[] getPermissionGroups() {
return this.permissionGroups == null ? ArrayUtil.EMPTY_STRING_ARRAY : this.permissionGroups;
}
public String getId() {
return this.id;
}
}