mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-21 22:48:57 +01:00
Experimental annotation changes (#12028)
This commit is contained in:
parent
54b2e9d973
commit
d4a957849c
25 changed files with 19 additions and 59 deletions
.editorconfigCONTRIBUTING.md
paper-api/src/main/java/org/bukkit
Registry.java
block
entity
AbstractWindCharge.javaBogged.javaBreeze.javaBreezeWindCharge.javaCreaking.javaOminousItemSpawner.javaWindCharge.java
boat
inventory
paper-server
patches/sources/net/minecraft
src/main/java
io/papermc/paper/registry/data
org/bukkit/craftbukkit/util
|
@ -1,32 +1,32 @@
|
|||
[*]
|
||||
charset=utf-8
|
||||
end_of_line=lf
|
||||
insert_final_newline=true
|
||||
indent_style=space
|
||||
indent_size=4
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
ij_any_block_comment_add_space = false
|
||||
ij_any_block_comment_at_first_column = false
|
||||
ij_any_line_comment_at_first_column = false
|
||||
ij_any_line_comment_add_space = true
|
||||
|
||||
[*.tiny]
|
||||
indent_style=tab
|
||||
indent_style = tab
|
||||
|
||||
[*.bat]
|
||||
end_of_line=crlf
|
||||
end_of_line = crlf
|
||||
|
||||
[*.yml]
|
||||
indent_size=2
|
||||
indent_size = 2
|
||||
|
||||
[*.patch]
|
||||
trim_trailing_whitespace=false
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
[*.java]
|
||||
ij_continuation_indent_size = 4
|
||||
ij_java_class_count_to_use_import_on_demand = 999999
|
||||
ij_java_insert_inner_class_imports = false
|
||||
ij_java_names_count_to_use_import_on_demand = 999999
|
||||
ij_java_imports_layout = *,|,$*
|
||||
ij_java_imports_layout = *, |, $*
|
||||
ij_java_generate_final_locals = true
|
||||
ij_java_generate_final_parameters = true
|
||||
ij_java_method_parameters_new_line_after_left_paren = true
|
||||
|
@ -40,5 +40,5 @@ ij_java_use_fq_class_names = true
|
|||
[paper-server/src/minecraft/resources/data/**/*.json]
|
||||
indent_size = 2
|
||||
|
||||
[paper-api-generator/generated/**/*.java]
|
||||
ij_java_imports_layout = $*,|,*
|
||||
[paper-api/src/generated/java/**/*.java]
|
||||
ij_java_imports_layout = $*, |, *
|
||||
|
|
|
@ -208,7 +208,8 @@ required.
|
|||
with `// Paper end - <COMMIT DESCRIPTION>`.
|
||||
- One-line changes should have `// Paper - <COMMIT DESCRIPTION>` at the end of the line.
|
||||
|
||||
> [!NOTE] These comments are incredibly important to be able to keep track of changes
|
||||
> [!NOTE]
|
||||
> These comments are incredibly important to be able to keep track of changes
|
||||
> across files and to remember what they are for, even a decade into the future.
|
||||
|
||||
Here's an example of how to mark changes by Paper:
|
||||
|
|
|
@ -271,7 +271,6 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
|||
* @see JukeboxSong
|
||||
* @deprecated use {@link RegistryAccess#getRegistry(RegistryKey)} with {@link RegistryKey#JUKEBOX_SONG}
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@Deprecated(since = "1.21")
|
||||
Registry<JukeboxSong> JUKEBOX_SONG = legacyRegistryFor(JukeboxSong.class);
|
||||
/**
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
package org.bukkit.block;
|
||||
|
||||
import org.bukkit.loot.Lootable;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
/**
|
||||
* Represents a captured state of a crafter.
|
||||
*/
|
||||
|
|
|
@ -1,10 +1,7 @@
|
|||
package org.bukkit.block;
|
||||
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
/**
|
||||
* Represents a captured state of a creaking heart.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
public interface CreakingHeart extends TileState {
|
||||
}
|
||||
|
|
|
@ -4,7 +4,6 @@ import java.util.Collection;
|
|||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.spawner.TrialSpawnerConfiguration;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package org.bukkit.block;
|
||||
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
/**
|
||||
* Represents a captured state of a trial spawner.
|
||||
*/
|
||||
|
|
|
@ -1,14 +1,12 @@
|
|||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Orientable;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
/**
|
||||
* 'active' is whether the block is active.
|
||||
* <br>
|
||||
* 'natural' is whether this is a naturally generated block.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
public interface CreakingHeart extends Orientable {
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
/**
|
||||
* 'tip' indicates whether this block is a tip.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
public interface HangingMoss extends BlockData {
|
||||
|
||||
/**
|
||||
|
|
|
@ -2,7 +2,6 @@ package org.bukkit.block.data.type;
|
|||
|
||||
import org.bukkit.block.BlockFace;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
|
@ -11,7 +10,6 @@ import org.jetbrains.annotations.NotNull;
|
|||
*
|
||||
* 'bottom' denotes whether this is a bottom block.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
public interface MossyCarpet extends BlockData {
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package org.bukkit.entity;
|
||||
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
/**
|
||||
* Represents a Wind Charge.
|
||||
*/
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package org.bukkit.entity;
|
||||
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
/**
|
||||
* Represents a Bogged Skeleton.
|
||||
*/
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package org.bukkit.entity;
|
||||
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
/**
|
||||
* Represents a Breeze. Whoosh!
|
||||
*/
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package org.bukkit.entity;
|
||||
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
/**
|
||||
* Represents a Wind Charge.
|
||||
*/
|
||||
|
|
|
@ -1,11 +1,8 @@
|
|||
package org.bukkit.entity;
|
||||
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
/**
|
||||
* Represents a Creaking.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
public interface Creaking extends Monster {
|
||||
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package org.bukkit.entity;
|
||||
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package org.bukkit.entity;
|
||||
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
/**
|
||||
* Represents a Wind Charge.
|
||||
*/
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
package org.bukkit.entity.boat;
|
||||
|
||||
import org.bukkit.entity.Boat;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
/**
|
||||
* Represents an pale oak boat.
|
||||
* Represents a pale oak boat.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
public interface PaleOakBoat extends Boat {
|
||||
}
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
package org.bukkit.entity.boat;
|
||||
|
||||
import org.bukkit.entity.ChestBoat;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
/**
|
||||
* Represents an pale oak chest boat.
|
||||
* Represents a pale oak chest boat.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
public interface PaleOakChestBoat extends ChestBoat {
|
||||
}
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package org.bukkit.inventory;
|
||||
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
/**
|
||||
* Interface to the inventory of a Crafter.
|
||||
*/
|
||||
|
|
|
@ -2,11 +2,9 @@ package org.bukkit.inventory.meta;
|
|||
|
||||
import java.util.List;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@ApiStatus.Experimental
|
||||
public interface BundleMeta extends ItemMeta {
|
||||
|
||||
/**
|
||||
|
|
|
@ -938,7 +938,7 @@
|
|||
- player.resetSentInfo();
|
||||
+ // entityplayer.resetSentInfo();
|
||||
+ player.getBukkitEntity().updateScaledHealth(); // CraftBukkit - Update scaled health on respawn and worldchange
|
||||
+ player.refreshEntityData(player); // CraftBukkkit - SPIGOT-7218: sync metadata
|
||||
+ player.refreshEntityData(player); // CraftBukkit - SPIGOT-7218: sync metadata
|
||||
player.connection.send(new ClientboundSetHeldSlotPacket(player.getInventory().selected));
|
||||
+ // CraftBukkit start - from GameRules
|
||||
+ int i = player.serverLevel().getGameRules().getBoolean(GameRules.RULE_REDUCEDDEBUGINFO) ? 22 : 23;
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
int ageValue = state.getValue(AGE);
|
||||
if (ageValue < 2) {
|
||||
- level.setBlock(pos, state.setValue(AGE, Integer.valueOf(ageValue + 1)), 2);
|
||||
+ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockGrowEvent(level, pos, state.setValue(CocoaBlock.AGE, ageValue + 1), 2); // CraftBukkkit
|
||||
+ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockGrowEvent(level, pos, state.setValue(CocoaBlock.AGE, ageValue + 1), 2); // CraftBukkit
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
package io.papermc.paper.registry.data;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.google.common.collect.Iterables;
|
||||
import com.google.common.collect.Lists;
|
||||
import io.papermc.paper.registry.PaperRegistryBuilder;
|
||||
import io.papermc.paper.registry.RegistryKey;
|
||||
import io.papermc.paper.registry.TypedKey;
|
||||
import io.papermc.paper.registry.data.util.Checks;
|
||||
import io.papermc.paper.registry.data.util.Conversions;
|
||||
import io.papermc.paper.registry.set.PaperRegistrySets;
|
||||
|
@ -189,7 +187,6 @@ public class PaperEnchantmentRegistryEntry implements EnchantmentRegistryEntry {
|
|||
|
||||
@Override
|
||||
public Builder anvilCost(final @Range(from = 0, to = Integer.MAX_VALUE) int anvilCost) {
|
||||
Preconditions.checkArgument(anvilCost >= 0, "anvilCost must be non-negative");
|
||||
this.anvilCost = OptionalInt.of(asArgumentMin(anvilCost, "anvilCost", 0));
|
||||
return this;
|
||||
}
|
||||
|
|
|
@ -590,7 +590,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
|||
e.getStringUUID()
|
||||
);
|
||||
} else {
|
||||
// Ensure player flag is not needed
|
||||
// Ensure misc flag is not needed
|
||||
Preconditions.checkArgument(
|
||||
nmsEntity.getType().canSerialize() || allowMiscSerialization,
|
||||
"Cannot serialize misc non-saveable entity %s(%s) without the MISC flag",
|
||||
|
|
Loading…
Add table
Reference in a new issue