@Override public MutableBoundedValue<Short> spawnRange() { return SpongeValueFactory.boundedBuilder(Keys.SPAWNER_SPAWN_RANGE) .minimum((short) 0) .maximum(Short.MAX_VALUE) .defaultValue((short) 4) .actualValue(this.spawnRange) .build(); }
@Override public MutableBoundedValue<Short> remainingDelay() { return SpongeValueFactory.boundedBuilder(Keys.SPAWNER_REMAINING_DELAY) .minimum((short) 0) .maximum(this.maximumDelay) .defaultValue((short) 20) .actualValue(this.remainingDelay) .build(); }
@Override public MutableBoundedValue<Short> maximumNearbyEntities() { return SpongeValueFactory.boundedBuilder(Keys.SPAWNER_MAXIMUM_NEARBY_ENTITIES) .minimum((short) 0) .maximum(Short.MAX_VALUE) .defaultValue((short) 6) .actualValue(this.maximumEntities) .build(); }
@Override public MutableBoundedValue<Short> requiredPlayerRange() { return SpongeValueFactory.boundedBuilder(Keys.SPAWNER_REQURED_PLAYER_RANGE) .minimum((short) 0) .maximum(Short.MAX_VALUE) .defaultValue((short) 16) .actualValue(this.playerRange) .build(); }
@Override protected MutableBoundedValue<Float> constructValue(Float value) { return SpongeValueFactory.boundedBuilder(this.key) .actualValue(value) .defaultValue(0F) .minimum(0F) .maximum(Float.MAX_VALUE) .build(); }
@Override public MutableBoundedValue<Short> maximumSpawnDelay() { return SpongeValueFactory.boundedBuilder(Keys.SPAWNER_MAXIMUM_DELAY) .minimum((short) 1) .maximum(Short.MAX_VALUE) .defaultValue((short) 800) .actualValue(this.maximumDelay) .build(); }
@Override public MutableBoundedValue<Integer> totalExperience() { return SpongeValueFactory.boundedBuilder(Keys.TOTAL_EXPERIENCE) .defaultValue(0) .minimum(0) .maximum(Integer.MAX_VALUE) .actualValue(this.totalExp) .build(); }
@Override public MutableBoundedValue<Integer> level() { return SpongeValueFactory.boundedBuilder(Keys.EXPERIENCE_LEVEL) .defaultValue(0) .minimum(0) .maximum(Integer.MAX_VALUE) .actualValue(this.level) .build(); }
@Override public ImmutableBoundedValue<Integer> getExperienceBetweenLevels() { return SpongeValueFactory.boundedBuilder(Keys.EXPERIENCE_FROM_START_OF_LEVEL) .defaultValue(0) .actualValue(this.expBetweenLevels) .minimum(0) .maximum(Integer.MAX_VALUE) .build() .asImmutable(); }
@Override protected Value<DyeColor> constructValue(DyeColor actualValue) { return SpongeValueFactory.getInstance() .createValue(Keys.DYE_COLOR, actualValue, DyeColors.BLACK); }
@Override protected ListValue<TradeOffer> constructValue(List<TradeOffer> actualValue) { return SpongeValueFactory.getInstance().createListValue(Keys.TRADE_OFFERS, actualValue); }