コード例 #1
0
 @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();
 }
コード例 #2
0
 @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();
 }
コード例 #3
0
 @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();
 }
コード例 #4
0
 @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();
 }
コード例 #5
0
 @Override
 protected MutableBoundedValue<Float> constructValue(Float value) {
   return SpongeValueFactory.boundedBuilder(this.key)
       .actualValue(value)
       .defaultValue(0F)
       .minimum(0F)
       .maximum(Float.MAX_VALUE)
       .build();
 }
コード例 #6
0
 @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();
 }
コード例 #7
0
 @Override
 public MutableBoundedValue<Integer> totalExperience() {
   return SpongeValueFactory.boundedBuilder(Keys.TOTAL_EXPERIENCE)
       .defaultValue(0)
       .minimum(0)
       .maximum(Integer.MAX_VALUE)
       .actualValue(this.totalExp)
       .build();
 }
コード例 #8
0
 @Override
 public MutableBoundedValue<Integer> level() {
   return SpongeValueFactory.boundedBuilder(Keys.EXPERIENCE_LEVEL)
       .defaultValue(0)
       .minimum(0)
       .maximum(Integer.MAX_VALUE)
       .actualValue(this.level)
       .build();
 }
コード例 #9
0
 @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();
 }
コード例 #10
0
 @Override
 protected Value<DyeColor> constructValue(DyeColor actualValue) {
   return SpongeValueFactory.getInstance()
       .createValue(Keys.DYE_COLOR, actualValue, DyeColors.BLACK);
 }
コード例 #11
0
 @Override
 protected ListValue<TradeOffer> constructValue(List<TradeOffer> actualValue) {
   return SpongeValueFactory.getInstance().createListValue(Keys.TRADE_OFFERS, actualValue);
 }