PhysicsDropType class
Пакет: com.hypixel.hytale.server.core.asset.type.blocktype.config
Файл: com/hypixel/hytale/server/core/asset/type/blocktype/config/PhysicsDropType.java
Поля (1)
| Модификаторы | Тип | Имя |
|---|---|---|
final |
BuilderCodec<PhysicsDropType> |
CODEC |
Методы (2)
| Модификаторы | Возврат | Сигнатура |
|---|---|---|
public |
String |
getDropListIdString getDropListId() |
public |
String |
getItemIdString getItemId() |
Исходный код
Показать/скрыть
class="kw">package com.hypixel.hytale.server.core.asset.type.blocktype.config;
class="kw">import com.hypixel.hytale.assetstore.codec.ContainedAssetCodec;
class="kw">import com.hypixel.hytale.codec.Codec;
class="kw">import com.hypixel.hytale.codec.KeyedCodec;
class="kw">import com.hypixel.hytale.codec.builder.BuilderCodec;
class="kw">import com.hypixel.hytale.server.core.asset.type.item.config.Item;
class="kw">import com.hypixel.hytale.server.core.asset.type.item.config.ItemDropList;
class="kw">import javax.annotation.Nonnull;
class="kw">import javax.annotation.Nullable;
class="kw">public class PhysicsDropType {
class="kw">public class="kw">static class="kw">final BuilderCodec<PhysicsDropType> CODEC = BuilderCodec.builder(PhysicsDropType.class, PhysicsDropType::new)
.append(new KeyedCodec<>("ItemId", Codec.STRING), (var0, var1) -> var0.itemId = var1, var0 -> var0.itemId)
.addValidatorLate(() -> Item.VALIDATOR_CACHE.getValidator().late())
.add()
.<String>append(
new KeyedCodec<>("DropList", new ContainedAssetCodec<>(ItemDropList.class, ItemDropList.CODEC)),
(var0, var1) -> var0.dropListId = var1,
var0 -> var0.dropListId
)
.addValidatorLate(() -> ItemDropList.VALIDATOR_CACHE.getValidator().late())
.add()
.build();
class="kw">protected String itemId;
class="kw">protected String dropListId;
class="kw">public PhysicsDropType(String var1, String var2) {
this.itemId = var1;
this.dropListId = var2;
}
class="kw">protected PhysicsDropType() {
}
class="kw">public String getItemId() {
class="kw">return this.itemId;
}
class="kw">public String getDropListId() {
class="kw">return this.dropListId;
}
@Nullable
class="kw">public PhysicsDropType withoutDrops() {
class="kw">return null;
}
@Nonnull
@Override
class="kw">public String toString() {
class="kw">return "PhysicsDropType{itemId=" + this.itemId + ", dropListId='" + this.dropListId + "'}";
}
}