mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-30 12:11:35 +01:00
Update to Minecraft 1.20.2
By: md_5 <git@md-5.net>
This commit is contained in:
parent
e589401ea7
commit
a67391a13e
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
<groupId>org.bukkit</groupId>
|
<groupId>org.bukkit</groupId>
|
||||||
<artifactId>bukkit</artifactId>
|
<artifactId>bukkit</artifactId>
|
||||||
<version>1.20.1-R0.1-SNAPSHOT</version>
|
<version>1.20.2-R0.1-SNAPSHOT</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>Bukkit</name>
|
<name>Bukkit</name>
|
||||||
@ -35,14 +35,14 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.guava</groupId>
|
<groupId>com.google.guava</groupId>
|
||||||
<artifactId>guava</artifactId>
|
<artifactId>guava</artifactId>
|
||||||
<version>31.1-jre</version>
|
<version>32.1.2-jre</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- bundled with Minecraft, should be kept in sync -->
|
<!-- bundled with Minecraft, should be kept in sync -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.code.gson</groupId>
|
<groupId>com.google.code.gson</groupId>
|
||||||
<artifactId>gson</artifactId>
|
<artifactId>gson</artifactId>
|
||||||
<version>2.10</version>
|
<version>2.10.1</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- bundled with Minecraft, should be kept in sync -->
|
<!-- bundled with Minecraft, should be kept in sync -->
|
||||||
@ -55,7 +55,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.yaml</groupId>
|
<groupId>org.yaml</groupId>
|
||||||
<artifactId>snakeyaml</artifactId>
|
<artifactId>snakeyaml</artifactId>
|
||||||
<version>2.0</version>
|
<version>2.2</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- not part of the API proper -->
|
<!-- not part of the API proper -->
|
||||||
|
@ -52,8 +52,11 @@ public abstract class GameEvent implements Keyed {
|
|||||||
@Deprecated
|
@Deprecated
|
||||||
public static final GameEvent ENTITY_KILLED = getEvent("entity_die");
|
public static final GameEvent ENTITY_KILLED = getEvent("entity_die");
|
||||||
public static final GameEvent ENTITY_PLACE = getEvent("entity_place");
|
public static final GameEvent ENTITY_PLACE = getEvent("entity_place");
|
||||||
public static final GameEvent ENTITY_ROAR = getEvent("entity_roar");
|
public static final GameEvent ENTITY_ACTION = getEvent("entity_action");
|
||||||
public static final GameEvent ENTITY_SHAKE = getEvent("entity_shake");
|
@Deprecated
|
||||||
|
public static final GameEvent ENTITY_ROAR = getEvent("entity_action");
|
||||||
|
@Deprecated
|
||||||
|
public static final GameEvent ENTITY_SHAKE = getEvent("entity_action");
|
||||||
public static final GameEvent EQUIP = getEvent("equip");
|
public static final GameEvent EQUIP = getEvent("equip");
|
||||||
public static final GameEvent EXPLODE = getEvent("explode");
|
public static final GameEvent EXPLODE = getEvent("explode");
|
||||||
public static final GameEvent FLAP = getEvent("flap");
|
public static final GameEvent FLAP = getEvent("flap");
|
||||||
@ -77,7 +80,7 @@ public abstract class GameEvent implements Keyed {
|
|||||||
public static final GameEvent PROJECTILE_LAND = getEvent("projectile_land");
|
public static final GameEvent PROJECTILE_LAND = getEvent("projectile_land");
|
||||||
public static final GameEvent PROJECTILE_SHOOT = getEvent("projectile_shoot");
|
public static final GameEvent PROJECTILE_SHOOT = getEvent("projectile_shoot");
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public static final GameEvent RAVAGER_ROAR = getEvent("entity_roar");
|
public static final GameEvent RAVAGER_ROAR = getEvent("entity_action");
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public static final GameEvent RING_BELL = getEvent("block_change");
|
public static final GameEvent RING_BELL = getEvent("block_change");
|
||||||
public static final GameEvent SCULK_SENSOR_TENDRILS_CLICKING = getEvent("sculk_sensor_tendrils_clicking");
|
public static final GameEvent SCULK_SENSOR_TENDRILS_CLICKING = getEvent("sculk_sensor_tendrils_clicking");
|
||||||
@ -91,8 +94,9 @@ public abstract class GameEvent implements Keyed {
|
|||||||
public static final GameEvent STEP = getEvent("step");
|
public static final GameEvent STEP = getEvent("step");
|
||||||
public static final GameEvent SWIM = getEvent("swim");
|
public static final GameEvent SWIM = getEvent("swim");
|
||||||
public static final GameEvent TELEPORT = getEvent("teleport");
|
public static final GameEvent TELEPORT = getEvent("teleport");
|
||||||
|
public static final GameEvent UNEQUIP = getEvent("unequip");
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public static final GameEvent WOLF_SHAKING = getEvent("entity_shake");
|
public static final GameEvent WOLF_SHAKING = getEvent("entity_action");
|
||||||
public static final GameEvent RESONATE_1 = getEvent("resonate_1");
|
public static final GameEvent RESONATE_1 = getEvent("resonate_1");
|
||||||
public static final GameEvent RESONATE_2 = getEvent("resonate_2");
|
public static final GameEvent RESONATE_2 = getEvent("resonate_2");
|
||||||
public static final GameEvent RESONATE_3 = getEvent("resonate_3");
|
public static final GameEvent RESONATE_3 = getEvent("resonate_3");
|
||||||
|
@ -206,6 +206,10 @@ public final class GameRule<T> {
|
|||||||
* Whether vines will spread.
|
* Whether vines will spread.
|
||||||
*/
|
*/
|
||||||
public static final GameRule<Boolean> DO_VINES_SPREAD = new GameRule<>("doVinesSpread", Boolean.class);
|
public static final GameRule<Boolean> DO_VINES_SPREAD = new GameRule<>("doVinesSpread", Boolean.class);
|
||||||
|
/**
|
||||||
|
* Whether ender pearls will vanish on player death.
|
||||||
|
*/
|
||||||
|
public static final GameRule<Boolean> ENDER_PEARLS_VANISH_ON_DEATH = new GameRule<>("enderPearlsVanishOnDeath", Boolean.class);
|
||||||
|
|
||||||
// Numerical rules
|
// Numerical rules
|
||||||
/**
|
/**
|
||||||
|
@ -598,6 +598,12 @@ public enum Sound implements Keyed {
|
|||||||
BLOCK_SOUL_SOIL_HIT("block.soul_soil.hit"),
|
BLOCK_SOUL_SOIL_HIT("block.soul_soil.hit"),
|
||||||
BLOCK_SOUL_SOIL_PLACE("block.soul_soil.place"),
|
BLOCK_SOUL_SOIL_PLACE("block.soul_soil.place"),
|
||||||
BLOCK_SOUL_SOIL_STEP("block.soul_soil.step"),
|
BLOCK_SOUL_SOIL_STEP("block.soul_soil.step"),
|
||||||
|
BLOCK_SPONGE_ABSORB("block.sponge.absorb"),
|
||||||
|
BLOCK_SPONGE_BREAK("block.sponge.break"),
|
||||||
|
BLOCK_SPONGE_FALL("block.sponge.fall"),
|
||||||
|
BLOCK_SPONGE_HIT("block.sponge.hit"),
|
||||||
|
BLOCK_SPONGE_PLACE("block.sponge.place"),
|
||||||
|
BLOCK_SPONGE_STEP("block.sponge.step"),
|
||||||
BLOCK_SPORE_BLOSSOM_BREAK("block.spore_blossom.break"),
|
BLOCK_SPORE_BLOSSOM_BREAK("block.spore_blossom.break"),
|
||||||
BLOCK_SPORE_BLOSSOM_FALL("block.spore_blossom.fall"),
|
BLOCK_SPORE_BLOSSOM_FALL("block.spore_blossom.fall"),
|
||||||
BLOCK_SPORE_BLOSSOM_HIT("block.spore_blossom.hit"),
|
BLOCK_SPORE_BLOSSOM_HIT("block.spore_blossom.hit"),
|
||||||
@ -660,6 +666,11 @@ public enum Sound implements Keyed {
|
|||||||
BLOCK_WET_GRASS_HIT("block.wet_grass.hit"),
|
BLOCK_WET_GRASS_HIT("block.wet_grass.hit"),
|
||||||
BLOCK_WET_GRASS_PLACE("block.wet_grass.place"),
|
BLOCK_WET_GRASS_PLACE("block.wet_grass.place"),
|
||||||
BLOCK_WET_GRASS_STEP("block.wet_grass.step"),
|
BLOCK_WET_GRASS_STEP("block.wet_grass.step"),
|
||||||
|
BLOCK_WET_SPONGE_BREAK("block.wet_sponge.break"),
|
||||||
|
BLOCK_WET_SPONGE_FALL("block.wet_sponge.fall"),
|
||||||
|
BLOCK_WET_SPONGE_HIT("block.wet_sponge.hit"),
|
||||||
|
BLOCK_WET_SPONGE_PLACE("block.wet_sponge.place"),
|
||||||
|
BLOCK_WET_SPONGE_STEP("block.wet_sponge.step"),
|
||||||
BLOCK_WOODEN_BUTTON_CLICK_OFF("block.wooden_button.click_off"),
|
BLOCK_WOODEN_BUTTON_CLICK_OFF("block.wooden_button.click_off"),
|
||||||
BLOCK_WOODEN_BUTTON_CLICK_ON("block.wooden_button.click_on"),
|
BLOCK_WOODEN_BUTTON_CLICK_ON("block.wooden_button.click_on"),
|
||||||
BLOCK_WOODEN_DOOR_CLOSE("block.wooden_door.close"),
|
BLOCK_WOODEN_DOOR_CLOSE("block.wooden_door.close"),
|
||||||
|
@ -260,6 +260,10 @@ public interface Tag<T extends Keyed> extends Keyed {
|
|||||||
* Vanilla block tag representing all terracotta.
|
* Vanilla block tag representing all terracotta.
|
||||||
*/
|
*/
|
||||||
Tag<Material> TERRACOTTA = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("terracotta"), Material.class);
|
Tag<Material> TERRACOTTA = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("terracotta"), Material.class);
|
||||||
|
/**
|
||||||
|
* Vanilla block tag representing all concrete powder.
|
||||||
|
*/
|
||||||
|
Tag<Material> CONCRETE_POWDER = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("concrete_powder"), Material.class);
|
||||||
/**
|
/**
|
||||||
* Vanilla block tag representing all blocks which complete the find tree
|
* Vanilla block tag representing all blocks which complete the find tree
|
||||||
* tutorial.
|
* tutorial.
|
||||||
@ -499,6 +503,10 @@ public interface Tag<T extends Keyed> extends Keyed {
|
|||||||
* Vanilla block tag representing all blocks that play combination step sounds.
|
* Vanilla block tag representing all blocks that play combination step sounds.
|
||||||
*/
|
*/
|
||||||
Tag<Material> COMBINATION_STEP_SOUND_BLOCKS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("combination_step_sound_blocks"), Material.class);
|
Tag<Material> COMBINATION_STEP_SOUND_BLOCKS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("combination_step_sound_blocks"), Material.class);
|
||||||
|
/**
|
||||||
|
* Vanilla block tag representing all blocks that play step sounds with camels on sand.
|
||||||
|
*/
|
||||||
|
Tag<Material> CAMEL_SAND_STEP_SOUND_BLOCKS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("camel_sand_step_sound_blocks"), Material.class);
|
||||||
/**
|
/**
|
||||||
* Vanilla block tag representing all blocks that block vibration signals.
|
* Vanilla block tag representing all blocks that block vibration signals.
|
||||||
*/
|
*/
|
||||||
@ -950,6 +958,10 @@ public interface Tag<T extends Keyed> extends Keyed {
|
|||||||
* Vanilla tag representing entities which are dismounted when underwater.
|
* Vanilla tag representing entities which are dismounted when underwater.
|
||||||
*/
|
*/
|
||||||
Tag<EntityType> ENTITY_TYPES_DISMOUNTS_UNDERWATER = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("dismounts_underwater"), EntityType.class);
|
Tag<EntityType> ENTITY_TYPES_DISMOUNTS_UNDERWATER = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("dismounts_underwater"), EntityType.class);
|
||||||
|
/**
|
||||||
|
* Vanilla tag representing entities which are not controlled by their mount.
|
||||||
|
*/
|
||||||
|
Tag<EntityType> ENTITY_TYPES_NON_CONTROLLING_RIDER = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("non_controlling_rider"), EntityType.class);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns whether or not this tag has an entry for the specified item.
|
* Returns whether or not this tag has an entry for the specified item.
|
||||||
|
@ -53,6 +53,10 @@ public enum Attribute implements Keyed {
|
|||||||
* Luck bonus of an Entity.
|
* Luck bonus of an Entity.
|
||||||
*/
|
*/
|
||||||
GENERIC_LUCK("generic.luck"),
|
GENERIC_LUCK("generic.luck"),
|
||||||
|
/**
|
||||||
|
* Maximum absorption of an Entity.
|
||||||
|
*/
|
||||||
|
MAX_ABSORPTION("generic.max_absorption"),
|
||||||
/**
|
/**
|
||||||
* Strength with which a horse will jump.
|
* Strength with which a horse will jump.
|
||||||
*/
|
*/
|
||||||
|
@ -34,7 +34,9 @@ public interface DataPack extends Keyed {
|
|||||||
* This is related to the server version to work.
|
* This is related to the server version to work.
|
||||||
*
|
*
|
||||||
* @return the pack version
|
* @return the pack version
|
||||||
|
* @deprecated packs can support multiple versions
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public int getPackFormat();
|
public int getPackFormat();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -5,6 +5,7 @@ import com.google.common.collect.ImmutableMap;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.NoSuchElementException;
|
import java.util.NoSuchElementException;
|
||||||
import org.bukkit.Color;
|
import org.bukkit.Color;
|
||||||
|
import org.bukkit.NamespacedKey;
|
||||||
import org.bukkit.configuration.serialization.ConfigurationSerializable;
|
import org.bukkit.configuration.serialization.ConfigurationSerializable;
|
||||||
import org.bukkit.configuration.serialization.SerializableAs;
|
import org.bukkit.configuration.serialization.SerializableAs;
|
||||||
import org.bukkit.entity.LivingEntity;
|
import org.bukkit.entity.LivingEntity;
|
||||||
@ -108,8 +109,14 @@ public class PotionEffect implements ConfigurationSerializable {
|
|||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
private static PotionEffectType getEffectType(@NotNull Map<?, ?> map) {
|
private static PotionEffectType getEffectType(@NotNull Map<?, ?> map) {
|
||||||
int type = getInt(map, TYPE);
|
PotionEffectType effect;
|
||||||
PotionEffectType effect = PotionEffectType.getById(type);
|
if (map.get(TYPE) instanceof String) {
|
||||||
|
String type = (String) map.get(TYPE);
|
||||||
|
effect = PotionEffectType.getByKey(NamespacedKey.fromString(type));
|
||||||
|
} else {
|
||||||
|
int type = getInt(map, TYPE);
|
||||||
|
effect = PotionEffectType.getById(type);
|
||||||
|
}
|
||||||
if (effect != null) {
|
if (effect != null) {
|
||||||
return effect;
|
return effect;
|
||||||
}
|
}
|
||||||
@ -136,7 +143,7 @@ public class PotionEffect implements ConfigurationSerializable {
|
|||||||
@NotNull
|
@NotNull
|
||||||
public Map<String, Object> serialize() {
|
public Map<String, Object> serialize() {
|
||||||
return ImmutableMap.<String, Object>builder()
|
return ImmutableMap.<String, Object>builder()
|
||||||
.put(TYPE, type.getId())
|
.put(TYPE, type.getKey().toString())
|
||||||
.put(DURATION, duration)
|
.put(DURATION, duration)
|
||||||
.put(AMPLIFIER, amplifier)
|
.put(AMPLIFIER, amplifier)
|
||||||
.put(AMBIENT, ambient)
|
.put(AMBIENT, ambient)
|
||||||
|
@ -27,7 +27,7 @@ public class PotionEffectTypeWrapper extends PotionEffectType {
|
|||||||
*/
|
*/
|
||||||
@NotNull
|
@NotNull
|
||||||
public PotionEffectType getType() {
|
public PotionEffectType getType() {
|
||||||
return PotionEffectType.getById(getId());
|
return PotionEffectType.getByKey(getKey());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user