From 13f8e60ef510a5fff917adc36d717f4de47fb471 Mon Sep 17 00:00:00 2001 From: lijinhong11 <62691956+lijinhong11@users.noreply.github.com> Date: Sat, 18 Apr 2026 10:05:11 +0000 Subject: [PATCH 1/4] update usages --- docs/en/archived/baguette-of-wisdom.md | 108 +++++++++--------- docs/en/creating-addons/tutorial-1.md | 18 +-- docs/en/creating-addons/tutorial-2.md | 16 +-- docs/en/creating-addons/tutorial-3.md | 4 +- docs/en/creating-addons/tutorial-4.md | 22 ++-- .../contributing/getting-started.md | 14 +-- .../contributing/master-project.md | 28 ++--- .../reference/blocks/creating-new-blocks.md | 2 +- 8 files changed, 107 insertions(+), 105 deletions(-) diff --git a/docs/en/archived/baguette-of-wisdom.md b/docs/en/archived/baguette-of-wisdom.md index c169246..35734a9 100644 --- a/docs/en/archived/baguette-of-wisdom.md +++ b/docs/en/archived/baguette-of-wisdom.md @@ -27,25 +27,25 @@ You know the drill by now: === "Java" ```java title="MyAddon.java" NamespacedKey baguetteOfWisdomKey = new NamespacedKey(this, "baguette_of_wisdom"); - ItemStack baguetteOfWisdom = ItemStackBuilder.pylonItem(Material.BREAD, baguetteOfWisdomKey) + ItemStack baguetteOfWisdom = ItemStackBuilder.rebar(Material.BREAD, baguetteOfWisdomKey) .build(); - PylonItem.register(BaguetteOfWisdom.class, baguetteOfWisdom); - BasePages.FOOD.addItem(baguetteOfWisdomKey); + RebarItem.register(BaguetteOfWisdom.class, baguetteOfWisdom); + PylonPages.FOOD.addItem(baguetteOfWisdomKey); ``` === "Kotlin" ```kotlin title="MyAddon.kt" val baguetteOfWisdomKey = NamespacedKey(this, "baguette_of_wisdom") - val baguetteOfWisdom = ItemStackBuilder.pylonItem(Material.BREAD, baguetteOfWisdomKey) + val baguetteOfWisdom = ItemStackBuilder.rebar(Material.BREAD, baguetteOfWisdomKey) .build() - PylonItem.register(baguetteOfWisdom) - BasePages.FOOD.addItem(baguetteOfWisdomKey) + RebarItem.register(baguetteOfWisdom) + PylonPages.FOOD.addItem(baguetteOfWisdomKey) ``` === "Java" ```java title="BaguetteOfWisdom.java" - public class BaguetteOfWisdom extends PylonItem { + public class BaguetteOfWisdom extends RebarItem { public BaguetteOfWisdom(@NotNull ItemStack stack) { super(stack); } @@ -53,7 +53,7 @@ You know the drill by now: ``` === "Kotlin" ```kotlin title="BaguetteOfWisdom.kt" - class BaguetteOfWisdom(stack: ItemStack) : PylonItem(stack) + class BaguetteOfWisdom(stack: ItemStack) : RebarItem(stack) ``` ```yaml title="en.yml" @@ -70,7 +70,7 @@ Now, let's add a config value for the max XP capacity: === "Java" ```java title="BaguetteOfWisdom.java" hl_lines="2" - public class BaguetteOfWisdom extends PylonItem { + public class BaguetteOfWisdom extends RebarItem { private final int xpCapacity = getSettings().getOrThrow("xp-capacity", ConfigAdapter.INT); public BaguetteOfWisdom(@NotNull ItemStack stack) { @@ -80,7 +80,7 @@ Now, let's add a config value for the max XP capacity: ``` === "Kotlin" ```kotlin title="BaguetteOfWisdom.kt" hl_lines="2" - class BaguetteOfWisdom(stack: ItemStack) : PylonItem(stack) { + class BaguetteOfWisdom(stack: ItemStack) : RebarItem(stack) { private val xpCapacity: Int = settings.getOrThrow("xp-capacity", ConfigAdapter.INT) } ``` @@ -109,7 +109,7 @@ item: === "Java" ```java title="BaguetteOfWisdom.java" hl_lines="8-14" - public class BaguetteOfWisdom extends PylonItem { + public class BaguetteOfWisdom extends RebarItem { private final int xpCapacity = getSettings().getOrThrow("xp-capacity", ConfigAdapter.INT); public BaguetteOfWisdom(@NotNull ItemStack stack) { @@ -117,9 +117,9 @@ item: } @Override - public @NotNull List getPlaceholders() { + public @NotNull List getPlaceholders() { return List.of( - PylonArgument.of("xp_capacity", UnitFormat.EXPERIENCE.format(xpCapacity)) + RebarArgument.of("xp_capacity", UnitFormat.EXPERIENCE.format(xpCapacity)) // TODO add stored_xp placeholder ); } @@ -127,11 +127,11 @@ item: ``` === "Kotlin" ```kotlin title="BaguetteOfWisdom.kt" hl_lines="4-7" - class BaguetteOfWisdom(stack: ItemStack) : PylonItem(stack) { + class BaguetteOfWisdom(stack: ItemStack) : RebarItem(stack) { private val xpCapacity: Int = settings.getOrThrow("xp-capacity", ConfigAdapter.class) override fun getPlaceholders() = listOf( - PylonArgument.of("xp_capacity", UnitFormat.EXPERIENCE.format(xpCapacity)) + RebarArgument.of("xp_capacity", UnitFormat.EXPERIENCE.format(xpCapacity)) // TODO add stored_xp placeholder ) } @@ -143,11 +143,11 @@ All of this should be familiar from the [advanced lore] section. Next, let's allow the player to charge by right clicking, and discharge by shift right clicking. -We can use the [PylonInteractor] class to do this: +We can use the [RebarInteractor] class to do this: === "Java" ```java title="BaguetteOfWisdom.java" hl_lines="1 16-23" - public class BaguetteOfWisdom extends PylonItem implements PylonInteractor { + public class BaguetteOfWisdom extends RebarItem implements RebarInteractor { private final int xpCapacity = getSettings().getOrThrow("xp-capacity", ConfigAdapter.INT); public BaguetteOfWisdom(@NotNull ItemStack stack) { @@ -155,9 +155,9 @@ We can use the [PylonInteractor] class to do this: } @Override - public @NotNull List getPlaceholders() { + public @NotNull List getPlaceholders() { return List.of( - PylonArgument.of("xp_capacity", UnitFormat.EXPERIENCE.format(xpCapacity)) + RebarArgument.of("xp_capacity", UnitFormat.EXPERIENCE.format(xpCapacity)) // TODO add stored_xp placeholder ); } @@ -175,11 +175,11 @@ We can use the [PylonInteractor] class to do this: === "Kotlin" ```kotlin title="BaguetteOfWisdom.kt" hl_lines="1 9-15" - class BaguetteOfWisdom(stack: ItemStack) : PylonItem(stack), PylonInteractor { + class BaguetteOfWisdom(stack: ItemStack) : RebarItem(stack), RebarInteractor { private val xpCapacity: Int = settings.getOrThrow("xp-capacity", ConfigAdapter.class) override fun getPlaceholders() = listOf( - PylonArgument.of("xp_capacity", UnitFormat.EXPERIENCE.format(xpCapacity)) + RebarArgument.of("xp_capacity", UnitFormat.EXPERIENCE.format(xpCapacity)) // TODO add stored_xp placeholder ) @@ -233,7 +233,7 @@ As you can see, we need to provide three things to set a PDC value: the **key**, The serializer is just a 'thing' that describes how to convert your type into a more primitive type that can be stored on disk - we won't go into details. You need a serializer for every type that you want to store - so you can't store, for example, `MyAddon` in a persistent data container as there is no serializer for it and it doesn't make sense to create one anyway. -!!! info "You can find a full list of serializers [here](https://pylonmc.github.io/pylon-core/docs/javadoc/io/github/pylonmc/pylon/core/datatypes/PylonSerializers.html)" +!!! info "You can find a full list of serializers [here](https://pylonmc.github.io/rebar/docs/javadoc/io/github/pylonmc/rebar/datatypes/PylonSerializers.html)" Ok. But what we really need to do is 'top up' the stored xp using the player's experience: @@ -365,10 +365,10 @@ Finally, let's add in the placeholder for the stored charge: === "Java" ```java title="BaguetteOfWisdom.java" hl_lines="5-10" @Override - public @NotNull List getPlaceholders() { + public @NotNull List getPlaceholders() { return List.of( - PylonArgument.of("xp_capacity", UnitFormat.EXPERIENCE.format(xpCapacity)), - PylonArgument.of("stored_xp", UnitFormat.EXPERIENCE.format( + RebarArgument.of("xp_capacity", UnitFormat.EXPERIENCE.format(xpCapacity)), + RebarArgument.of("stored_xp", UnitFormat.EXPERIENCE.format( getStack().getPersistentDataContainer().get( new NamespacedKey(MyAddon.getInstance(), "stored_xp"), PylonSerializers.INTEGER @@ -380,8 +380,8 @@ Finally, let's add in the placeholder for the stored charge: === "Kotlin" ```kotlin title="BaguetteOfWisdom.kt" hl_lines="3-8" override fun getPlaceholders() = listOf( - PylonArgument.of("xp_capacity", UnitFormat.EXPERIENCE.format(xpCapacity)), - PylonArgument.of("stored_xp", UnitFormat.EXPERIENCE.format( + RebarArgument.of("xp_capacity", UnitFormat.EXPERIENCE.format(xpCapacity)), + RebarArgument.of("stored_xp", UnitFormat.EXPERIENCE.format( stack.persistentDataContainer.get( NamespacedKey(MyAddon.instance, "stored_xp"), PylonSerializers.INTEGER @@ -405,14 +405,14 @@ When something like this happens, your first port of call should always be the s ```title="console" [12:51:22 WARN]: java.lang.NullPointerException: Cannot invoke "java.lang.Float.floatValue()" because the return value of "io.papermc.paper.persistence.PersistentDataContainerView.get(org.bukkit.NamespacedKey, org.bukkit.persistence.PersistentDataType)" is null [12:51:22 WARN]: at my-addon-MODIFIED-1757418660070.jar//io.github.pylonmc.myaddon.BaguetteOfWisdom.getPlaceholders(BaguetteOfWisdom.java:28) -[12:51:22 WARN]: at pylon-core-0.11.2.jar//io.github.pylonmc.pylon.core.guide.button.ItemButton.getItemProvider(ItemButton.kt:47) +[12:51:22 WARN]: at rebar-0.11.2.jar//io.github.pylonmc.pylon.core.guide.button.ItemButton.getItemProvider(ItemButton.kt:47) [12:51:22 WARN]: at xyz.xenondevs.invui.gui.SlotElement$ItemSlotElement.getItemStack(SlotElement.java:44) [12:51:22 WARN]: at xyz.xenondevs.invui.window.AbstractWindow.redrawItem(AbstractWindow.java:109) [12:51:22 WARN]: at xyz.xenondevs.invui.window.AbstractSingleWindow.initItems(AbstractSingleWindow.java:58) [12:51:22 WARN]: at xyz.xenondevs.invui.window.AbstractWindow.open(AbstractWindow.java:279) [12:51:22 WARN]: at xyz.xenondevs.invui.window.AbstractWindow$AbstractBuilder.open(AbstractWindow.java:679) -[12:51:22 WARN]: at pylon-core-0.11.2.jar//io.github.pylonmc.pylon.core.guide.pages.base.GuidePage.open(GuidePage.kt:28) -[12:51:22 WARN]: at pylon-core-0.11.2.jar//io.github.pylonmc.pylon.core.guide.button.PageButton.handleClick(PageButton.kt:38) +[12:51:22 WARN]: at rebar-0.11.2.jar//io.github.pylonmc.pylon.core.guide.pages.base.GuidePage.open(GuidePage.kt:28) +[12:51:22 WARN]: at rebar-0.11.2.jar//io.github.pylonmc.pylon.core.guide.button.PageButton.handleClick(PageButton.kt:38) [12:51:22 WARN]: at xyz.xenondevs.invui.gui.AbstractGui.handleClick(AbstractGui.java:95) [12:51:22 WARN]: at xyz.xenondevs.invui.window.AbstractSingleWindow.handleClick(AbstractSingleWindow.java:84) [12:51:22 WARN]: at xyz.xenondevs.invui.window.AbstractWindow.handleClickEvent(AbstractWindow.java:199) @@ -454,7 +454,7 @@ So it looks like the error occurred on line 28, in the `getPlaceholders` functio Simply put, the guide also needs to call `getPlaceholders` to display the item to you. The error only appears once you open the guide - or once you give yourself the item with `/py give`. !!! Note "Kotlin - null safety" - If you've been following along in Kotlin, you may have noticed that your error is different from the one above. Additionally, if you played around with the code a bit, you may have noticed that the Kotlin code refuses to compile unless you add a `!!` after the call to `get(...)` in the `getPlaceholders` function. This is because Kotlin actually tracks nulls in the type system, and will error during compile time instead of run time if you try to use a potentially null value without checking for null first. The `!!` tells the compiler, "hey, I know what I'm doing, this value will never be null." This is one of the advantages of using Kotlin over Java, as it can help catch potential null pointer exceptions before they even happen, and is one of the reasons why Pylon Core is written in Kotlin. In this situation, an Elvis operator (`?:`) or a call to `getOrDefault` would have been more appropriate, but for the purposes of this tutorial, we will leave it as is. + If you've been following along in Kotlin, you may have noticed that your error is different from the one above. Additionally, if you played around with the code a bit, you may have noticed that the Kotlin code refuses to compile unless you add a `!!` after the call to `get(...)` in the `getPlaceholders` function. This is because Kotlin actually tracks nulls in the type system, and will error during compile time instead of run time if you try to use a potentially null value without checking for null first. The `!!` tells the compiler, "hey, I know what I'm doing, this value will never be null." This is one of the advantages of using Kotlin over Java, as it can help catch potential null pointer exceptions before they even happen, and is one of the reasons why Rebar is written in Kotlin. In this situation, an Elvis operator (`?:`) or a call to `getOrDefault` would have been more appropriate, but for the purposes of this tutorial, we will leave it as is. This actually makes perfect sense if you think about it. At no point do we set a default value for the stored XP, so of course any call to get it will return null. @@ -465,20 +465,20 @@ To add a default value for stored XP to the PDC, we can modify the itemstack its === "Java" ```java title="MyAddon.java" hl_lines="3-7" NamespacedKey baguetteOfWisdomKey = new NamespacedKey(this, "baguette_of_wisdom"); - ItemStack baguetteOfWisdom = ItemStackBuilder.pylonItem(Material.BREAD, baguetteOfWisdomKey) + ItemStack baguetteOfWisdom = ItemStackBuilder.rebar(Material.BREAD, baguetteOfWisdomKey) .editPdc(pdc -> pdc.set( new NamespacedKey(this, "stored_xp"), PylonSerializers.INTEGER, 0 )) .build(); - PylonItem.register(BaguetteOfWisdom.class, baguetteOfWisdom); - BasePages.FOOD.addItem(baguetteOfWisdomKey); + RebarItem.register(BaguetteOfWisdom.class, baguetteOfWisdom); + PylonPages.FOOD.addItem(baguetteOfWisdomKey); ``` === "Kotlin" ```kotlin title="MyAddon.kt" hl_lines="3-9" val baguetteOfWisdomKey = NamespacedKey(this, "baguette_of_wisdom") - val baguetteOfWisdom = ItemStackBuilder.pylonItem(Material.BREAD, baguetteOfWisdomKey) + val baguetteOfWisdom = ItemStackBuilder.rebar(Material.BREAD, baguetteOfWisdomKey) .editPdc { pdc -> pdc.set( NamespacedKey(this, "stored_xp"), @@ -487,8 +487,8 @@ To add a default value for stored XP to the PDC, we can modify the itemstack its ) } .build() - PylonItem.register(baguetteOfWisdom) - BasePages.FOOD.addItem(baguetteOfWisdomKey) + RebarItem.register(baguetteOfWisdom) + PylonPages.FOOD.addItem(baguetteOfWisdomKey) ``` Now let's try again. @@ -507,7 +507,7 @@ First, we could pull out the get/set code into their own functions: === "Java" ```java title="BaguetteOfWisdom.java" hl_lines="4-10 12-17" - public class BaguetteOfWisdom extends PylonItem implements PylonInteractor { + public class BaguetteOfWisdom extends RebarItem implements RebarInteractor { ... public void setStoredXp(int xp) { @@ -528,7 +528,7 @@ First, we could pull out the get/set code into their own functions: ``` === "Kotlin" ```kotlin title="BaguetteOfWisdom.kt" hl_lines="4-17" - class BaguetteOfWisdom(stack: ItemStack) : PylonItem(stack), PylonInteractor { + class BaguetteOfWisdom(stack: ItemStack) : RebarItem(stack), RebarInteractor { ... var storedXp: Int @@ -552,7 +552,7 @@ First, we could pull out the get/set code into their own functions: Alternatively, Pylon provides a property delegate for persistent data values that can be used to simplify this even further: ```kotlin title="BaguetteOfWisdom.kt" hl_lines="4-8" - class BaguetteOfWisdom(stack: ItemStack) : PylonItem(stack), PylonInteractor { + class BaguetteOfWisdom(stack: ItemStack) : RebarItem(stack), RebarInteractor { ... var storedXp: Int by persistentData( @@ -567,15 +567,15 @@ And now, we can use these functions in the rest of the code, which is much clean === "Java" ```java title="BaguetteOfWisdom.java" hl_lines="9 17 23 26 36" - public class BaguetteOfWisdom extends PylonItem implements PylonInteractor { + public class BaguetteOfWisdom extends RebarItem implements RebarInteractor { ... @Override - public @NotNull List getPlaceholders() { + public @NotNull List getPlaceholders() { return List.of( - PylonArgument.of("xp_capacity", UnitFormat.EXPERIENCE.format(xpCapacity)), - PylonArgument.of("stored_xp", UnitFormat.EXPERIENCE.format(getStoredXp())) + RebarArgument.of("xp_capacity", UnitFormat.EXPERIENCE.format(xpCapacity)), + RebarArgument.of("stored_xp", UnitFormat.EXPERIENCE.format(getStoredXp())) ); } @@ -612,13 +612,13 @@ And now, we can use these functions in the rest of the code, which is much clean === "Kotlin" ```kotlin title="BaguetteOfWisdom.kt" hl_lines="7 13 19 22 32" - class BaguetteOfWisdom(stack: ItemStack) : PylonItem(stack), PylonInteractor { + class BaguetteOfWisdom(stack: ItemStack) : RebarItem(stack), RebarInteractor { ... override fun getPlaceholders() = listOf( - PylonArgument.of("xp_capacity", UnitFormat.EXPERIENCE.format(xpCapacity)), - PylonArgument.of("stored_xp", UnitFormat.EXPERIENCE.format(storedXp)) + RebarArgument.of("xp_capacity", UnitFormat.EXPERIENCE.format(xpCapacity)), + RebarArgument.of("stored_xp", UnitFormat.EXPERIENCE.format(storedXp)) ) override fun onUsedToRightClick(event: PlayerInteractEvent) { @@ -655,7 +655,7 @@ The second thing we should do is reuse NamespacedKeys. This is more of a 'best p === "Java" ```java title="BaguetteOfWisdom.java" hl_lines="2 8 16" - public class BaguetteOfWisdom extends PylonItem implements PylonInteractor { + public class BaguetteOfWisdom extends RebarItem implements RebarInteractor { public static final NamespacedKey STORED_XP_KEY = new NamespacedKey(MyAddon.getInstance(), "stored_xp"); ... @@ -677,7 +677,7 @@ The second thing we should do is reuse NamespacedKeys. This is more of a 'best p ``` === "Kotlin" ```kotlin title="BaguetteOfWisdom.kt" hl_lines="2-4 10 16" - class BaguetteOfWisdom(stack: ItemStack) : PylonItem(stack), PylonInteractor { + class BaguetteOfWisdom(stack: ItemStack) : RebarItem(stack), RebarInteractor { companion object { val STORED_XP_KEY = NamespacedKey(MyAddon.instance, "stored_xp") } @@ -704,7 +704,7 @@ The second thing we should do is reuse NamespacedKeys. This is more of a 'best p === "Java" ```java title="MyAddon.java" hl_lines="3" - ItemStack baguetteOfWisdom = ItemStackBuilder.pylonItem(Material.BREAD, baguetteOfWisdomKey) + ItemStack baguetteOfWisdom = ItemStackBuilder.rebar(Material.BREAD, baguetteOfWisdomKey) .editPdc(pdc -> pdc.set( BaguetteOfWisdom.STORED_XP_KEY, PylonSerializers.INTEGER, @@ -714,7 +714,7 @@ The second thing we should do is reuse NamespacedKeys. This is more of a 'best p ``` === "Kotlin" ```kotlin title="MyAddon.kt" hl_lines="4" - val baguetteOfWisdom = ItemStackBuilder.pylonItem(Material.BREAD, baguetteOfWisdomKey) + val baguetteOfWisdom = ItemStackBuilder.rebar(Material.BREAD, baguetteOfWisdomKey) .editPdc { pdc -> pdc.set( BaguetteOfWisdom.STORED_XP_KEY, @@ -727,7 +727,7 @@ The second thing we should do is reuse NamespacedKeys. This is more of a 'best p And that's it! -[PlayerInteractEntityEvent]: https://jd.papermc.io/paper/1.21.8/org/bukkit/event/player/PlayerInteractEntityEvent.html -[PylonItemEntityInteractor]: https://pylonmc.github.io/pylon-core/docs/javadoc/io/github/pylonmc/pylon/core/item/base/PylonItemEntityInteractor.html +[PlayerInteractEntityEvent]: https://jd.papermc.io/paper/1.21.11/org/bukkit/event/player/PlayerInteractEntityEvent.html +[RebarItemEntityInteractor]: https://pylonmc.github.io/rebar/docs/javadoc/io/github/pylonmc/rebar/item/base/RebarItemEntityInteractor.html [Persistent data container]: https://docs.papermc.io/paper/dev/pdc/ -[PylonInteractor]: https://pylonmc.github.io/pylon-core/docs/javadoc/io/github/pylonmc/pylon/core/item/base/PylonInteractor.html +[RebarInteractor]: https://pylonmc.github.io/rebar/docs/javadoc/io/github/pylonmc/rebar/item/base/RebarInteractor.html diff --git a/docs/en/creating-addons/tutorial-1.md b/docs/en/creating-addons/tutorial-1.md index ff8a65d..fb34e07 100644 --- a/docs/en/creating-addons/tutorial-1.md +++ b/docs/en/creating-addons/tutorial-1.md @@ -28,10 +28,10 @@ The second thing we need is an actual item. We'll use [ItemStackBuilder] for thi [ItemStackBuilder] contains several different methods to help you create [ItemStack]s. For example, you can use `.set(, )` to set some of the item's values, like enchantments, whether the item is unbreakable, and so on. -**Whenever you're creating a Rebar item, make sure you use `ItemStackBuilder.rebarItem(, )`.** There are others ways to create [ItemStack]s, but **do not** use these to create Rebar items. +**Whenever you're creating a Rebar item, make sure you use `ItemStackBuilder.rebar(, )`.** There are others ways to create [ItemStack]s, but **do not** use these to create Rebar items. -??? question "Why use `ItemStackBuilder.rebarItem`, and not any of the other ways to create an [ItemStack]?" - Under the hood, Rebar stores item keys in [PersistentDataContainer]s, or PDCs. When you call `ItemStackBuilder.rebarItem` and supply a key, that key is written to the item's PDC automatically. If you supply your own item stack, its PDC won't contain the item's key, and Rebar won't be able to differentiate that item with a regular Minecraft item. +??? question "Why use `ItemStackBuilder.rebar`, and not any of the other ways to create an [ItemStack]?" + Under the hood, Rebar stores item keys in [PersistentDataContainer]s, or PDCs. When you call `ItemStackBuilder.rebar` and supply a key, that key is written to the item's PDC automatically. If you supply your own item stack, its PDC won't contain the item's key, and Rebar won't be able to differentiate that item with a regular Minecraft item. [ItemStackBuilder] also sets the name and lore of the item to the default translation keys (which will be explained later in this tutorial). @@ -42,7 +42,7 @@ public final class ExampleAddonItems { // ... - public static final ItemStack baguette = ItemStackBuilder.rebarItem(Material.BREAD, baguetteKey) + public static final ItemStack baguette = ItemStackBuilder.rebar(Material.BREAD, baguetteKey) .set(DataComponentTypes.FOOD, FoodProperties.food().nutrition(6)) .build(); @@ -61,7 +61,7 @@ public final class ExampleAddonItems { // ... - public static final ItemStack baguette = ItemStackBuilder.rebarItem(Material.BREAD, baguetteKey) + public static final ItemStack baguette = ItemStackBuilder.rebar(Material.BREAD, baguetteKey) .set(DataComponentTypes.FOOD, FoodProperties.food().nutrition(6)) .build(); @@ -84,7 +84,7 @@ public final class ExampleAddonItems { // ... - public static final ItemStack baguette = ItemStackBuilder.rebarItem(Material.BREAD, baguetteKey) + public static final ItemStack baguette = ItemStackBuilder.rebar(Material.BREAD, baguetteKey) .set(DataComponentTypes.FOOD, FoodProperties.food().nutrition(6)) .build(); @@ -95,7 +95,7 @@ public final class ExampleAddonItems { // ... RebarItem.register(RebarItem.class, baguette); - BasePages.FOOD.addItem(baguetteKey); + PylonPages.FOOD.addItem(baguetteKey); } } ``` @@ -296,7 +296,7 @@ public final class ExampleAddonItems { // ... - public static final ItemStack baguette = ItemStackBuilder.rebarItem(Material.BREAD, baguetteKey) + public static final ItemStack baguette = ItemStackBuilder.rebar(Material.BREAD, baguetteKey) .set(DataComponentTypes.FOOD, FoodProperties.food().nutrition(6)) .build(); @@ -307,7 +307,7 @@ public final class ExampleAddonItems { // ... RebarItem.register(RebarItem.class, baguette); - BasePages.FOOD.addItem(baguetteKey); + PylonPages.FOOD.addItem(baguetteKey); } } ``` diff --git a/docs/en/creating-addons/tutorial-2.md b/docs/en/creating-addons/tutorial-2.md index 2d8b0fe..5b71247 100644 --- a/docs/en/creating-addons/tutorial-2.md +++ b/docs/en/creating-addons/tutorial-2.md @@ -21,7 +21,7 @@ public final class ExampleAddonItems { // ... - public static final ItemStack baguetteFlamethrower = ItemStackBuilder.rebarItem(Material.BREAD, baguetteFlamethrowerKey) + public static final ItemStack baguetteFlamethrower = ItemStackBuilder.rebar(Material.BREAD, baguetteFlamethrowerKey) .build(); // ... @@ -31,7 +31,7 @@ public final class ExampleAddonItems { // ... RebarItem.register(RebarItem.class, baguette); - BasePages.FOOD.addItem(baguetteKey); + PylonPages.FOOD.addItem(baguetteKey); } } ``` @@ -76,7 +76,7 @@ public class BaguetteFlamethrower extends RebarItem implements RebarItemEntityIn } @Override - public void onUsedToRightClickEntity(@NotNull PlayerInteractEntityEvent event) { + public void onUsedToRightClickEntity(@NotNull PlayerInteractEntityEvent event, @NotNull EventPriority priority) { event.getRightClicked().setFireTicks(40); } } @@ -133,7 +133,7 @@ public class BaguetteFlamethrower extends RebarItem implements RebarItemEntityIn } @Override - public void onUsedToRightClickEntity(@NotNull PlayerInteractEntityEvent event) { + public void onUsedToRightClickEntity(@NotNull PlayerInteractEntityEvent event, @NotNull EventPriority priority) { event.getRightClicked().setFireTicks(40); } } @@ -160,7 +160,7 @@ public class BaguetteFlamethrower extends RebarItem implements RebarItemEntityIn } @Override - public void onUsedToRightClickEntity(@NotNull PlayerInteractEntityEvent event) { + public void onUsedToRightClickEntity(@NotNull PlayerInteractEntityEvent event, @NotNull EventPriority priority) { event.getRightClicked().setFireTicks(burnTimeTicks); } } @@ -190,7 +190,7 @@ public class BaguetteFlamethrower extends RebarItem implements RebarItemEntityIn } @Override - public void onUsedToRightClickEntity(@NotNull PlayerInteractEntityEvent event) { + public void onUsedToRightClickEntity(@NotNull PlayerInteractEntityEvent event, @NotNull EventPriority priority) { event.getRightClicked().setFireTicks(burnTimeTicks); } } @@ -203,7 +203,7 @@ public final class ExampleAddonItems { // ... - public static final ItemStack baguetteFlamethrower = ItemStackBuilder.rebarItem(Material.BREAD, baguetteFlamethrowerKey) + public static final ItemStack baguetteFlamethrower = ItemStackBuilder.rebar(Material.BREAD, baguetteFlamethrowerKey) .build(); // ... @@ -213,7 +213,7 @@ public final class ExampleAddonItems { // ... RebarItem.register(RebarItem.class, baguette); - BasePages.FOOD.addItem(baguetteKey); + PylonPages.FOOD.addItem(baguetteKey); } } ``` diff --git a/docs/en/creating-addons/tutorial-3.md b/docs/en/creating-addons/tutorial-3.md index 869eb90..af5669c 100644 --- a/docs/en/creating-addons/tutorial-3.md +++ b/docs/en/creating-addons/tutorial-3.md @@ -115,7 +115,7 @@ public class BaguetteFlamethrower extends RebarItem implements RebarItemEntityIn } @Override - public void onUsedToRightClickEntity(@NotNull PlayerInteractEntityEvent event) { + public void onUsedToRightClickEntity(@NotNull PlayerInteractEntityEvent event, @NotNull EventPriority priority) { event.getRightClicked().setFireTicks(burnTimeTicks); } @@ -155,7 +155,7 @@ public class BaguetteFlamethrower extends RebarItem implements RebarItemEntityIn } @Override - public void onUsedToRightClickEntity(@NotNull PlayerInteractEntityEvent event) { + public void onUsedToRightClickEntity(@NotNull PlayerInteractEntityEvent event, @NotNull EventPriority priority) { event.getRightClicked().setFireTicks(burnTimeTicks); } diff --git a/docs/en/creating-addons/tutorial-4.md b/docs/en/creating-addons/tutorial-4.md index 5a21592..9ae3334 100644 --- a/docs/en/creating-addons/tutorial-4.md +++ b/docs/en/creating-addons/tutorial-4.md @@ -53,7 +53,7 @@ public final class ExampleAddonItems { // ... - public static final ItemStack countingBaguette = ItemStackBuilder.pylonItem(Material.BREAD, countingBaguetteKey) + public static final ItemStack countingBaguette = ItemStackBuilder.rebar(Material.BREAD, countingBaguetteKey) .build(); // ... @@ -62,8 +62,8 @@ public final class ExampleAddonItems { // ... - PylonItem.register(CountingBaguette.class, countingBaguette); - BasePages.FOOD.addItem(countingBaguette); + RebarItem.register(CountingBaguette.class, countingBaguette); + PylonPages.FOOD.addItem(countingBaguette); } } ``` @@ -71,7 +71,7 @@ public final class ExampleAddonItems { ```java title="CountingBaguette.java" -public class CountingBaguette extends PylonItem { +public class CountingBaguette extends RebarItem { public CountingBaguette(@NotNull ItemStack stack) { super(stack); } @@ -90,13 +90,13 @@ item: First, we need to detect when the player right clicks: ```java title="CountingBaguette.java" hl_lines="1 6-10" -public class CountingBaguette extends PylonItem implements PylonInteractor { +public class CountingBaguette extends RebarItem implements RebarInteractor { public CountingBaguette(@NotNull ItemStack stack) { super(stack); } @Override - public void onUsedToRightClick(@NotNull PlayerInteractEvent event) { + public void onUsedToClick(@NotNull PlayerInteractEvent event, @NotNull EventPriority priority) { // TODO send stored value to player // TODO increment stored value } @@ -111,7 +111,7 @@ To store a piece of data in a persistent data container, we need two other thing For convenience, Pylon supplies a range of types in the [PylonSerializers] file. This includes all the default types provided by Paper, but also some extra types (like UUID, Vector, BlockPosition, ItemStack, and more). ```java title="CountingBaguette.java" hl_lines="2 10-12" -public class CountingBaguette extends PylonItem implements PylonInteractor { +public class CountingBaguette extends RebarItem implements RebarInteractor { public static final NamespacedKey COUNT_KEY = new NamespacedKey(MyAddon.getInstance(), "count"); public CountingBaguette(@NotNull ItemStack stack) { @@ -119,7 +119,7 @@ public class CountingBaguette extends PylonItem implements PylonInteractor { } @Override - public void onUsedToRightClick(@NotNull PlayerInteractEvent event) { + public void onUsedToClick(@NotNull PlayerInteractEvent event, @NotNull EventPriority priority) { int count = getStack().getPersistentDataContainer().get(COUNT_KEY, PylonSerializers.INTEGER); event.getPlayer().sendMessage(String.valueOf(count)); getStack().editPersistentDataContainer(pdc -> pdc.set(COUNT_KEY, PylonSerializers.INTEGER, count + 1)); @@ -133,11 +133,11 @@ You may have noticed that we have not set a starting value for the count yet. In ```java title="CountingBaguette.java" hl_lines="3" NamespacedKey countingBaguetteKey = new NamespacedKey(this, "counting_baguette"); -ItemStack countingBaguette = ItemStackBuilder.pylonItem(Material.BREAD, countingBaguetteKey) +ItemStack countingBaguette = ItemStackBuilder.rebar(Material.BREAD, countingBaguetteKey) .editPdc(pdc -> pdc.set(CountingBaguette.COUNT_KEY, PylonSerializers.INTEGER, 0)) .build(); -PylonItem.register(CountingBaguette.class, countingBaguette); -BasePages.FOOD.addItem(countingBaguette); +RebarItem.register(CountingBaguette.class, countingBaguette); +PylonPages.FOOD.addItem(countingBaguette); ``` And that's it! The data we stored will persist as long as the item exists. diff --git a/docs/en/documentation/contributing/getting-started.md b/docs/en/documentation/contributing/getting-started.md index 2541cab..55a9e74 100644 --- a/docs/en/documentation/contributing/getting-started.md +++ b/docs/en/documentation/contributing/getting-started.md @@ -1,26 +1,26 @@ # Getting started -Pylon Core is written in [Kotlin](https://kotlinlang.org/), a language similar to Java, but with more modern features and concise syntax. If you know Java, you'll be able to pick up Kotlin very quickly. +Rebar is written in [Kotlin](https://kotlinlang.org/), a language similar to Java, but with more modern features and concise syntax. If you know Java, you'll be able to pick up Kotlin very quickly. -Pylon Base is written in Java. +Pylon is written in Java. ## How to get started 1. Clone the `pylon` repository: `git clone https://github.com/pylonmc/pylon` (or use a GUI like Github Desktop) -2. If you're using IntelliJ, it'll set everything up automatically. If not, run `./gradlew`. This will clone the `pylon-core` and `pylon-base` repositories. -3. If you want to submit your changes to the Pylon project, **delete the `pylon-core` or `pylon-base` directory (depending on which one you want to contribute to), fork the pylon-core or pylon-base repository, and clone your fork into the same directory.** Otherwise, you won't be able to open a pull request with your changes (unless you're a Pylon developer and have access to the Pylon repositories). +2. If you're using IntelliJ, it'll set everything up automatically. If not, run `./gradlew`. This will clone the `rebar` and `pylon-base` repositories. +3. If you want to submit your changes to the Pylon project, **delete the `rebar` or `pylon-base` directory (depending on which one you want to contribute to), fork the rebar or pylon-base repository, and clone your fork into the same directory.** Otherwise, you won't be able to open a pull request with your changes (unless you're a Pylon developer and have access to the Pylon repositories). See the [Pylon Master Project](master-project.md) page for more information about the master repository. ## Submitting your contributions -We generally welcome contributions for both Core and Base, but it's best check with the Pylon team before making any major changes, because we might already have something planned out that won't fit well with your changes. Hop on our Discord server and have a chat with us if you're interested in doing anything major, or have any questions about contributing :) +We generally welcome contributions for both Rebar and Pylon, but it's best check with the Pylon team before making any major changes, because we might already have something planned out that won't fit well with your changes. Hop on our Discord server and have a chat with us if you're interested in doing anything major, or have any questions about contributing :) Once you're done with your changes, open a pull request and give some information about what you did and why you did it. ## Tests -Pylon Core has a set of integration tests. Tests should only be added for critical functionality such as block storage and recipes. +Rebar has a set of integration tests. Tests should only be added for critical functionality such as block storage and recipes. ## Custom Dokka @@ -29,7 +29,7 @@ Pylon uses a custom version of Dokka to generate Javadocs. This is because the d 1. Clone the `pylonmc/dokka` repository: `git clone https://github.com/pylonmc/dokka` 2. Checkout the `pylon` branch: `git checkout pylon` 3. In the root directory, execute `./gradlew publishToMavenLocal -Pversion=2.1.0-pylon-SNAPSHOT`. Note that as Dokka is a very large project, the first build will take a long time. On Seggan's decent-ish laptop, the first run took about 10 minutes. Subsequent builds will be much faster as long s you don't delete the build cache. -4. Now, in the Pylon master project, execute `./gradlew :pylon-core:pylon-core:dokkaGenerate -PusePylonDokka=true`. The generated output will be under `pylon/pylon-core/pylon-core/build/dokka`. +4. Now, in the Pylon master project, execute `./gradlew :rebar:rebar:dokkaGenerate -PusePylonDokka=true`. The generated output will be under `pylon/rebar/rebar/build/dokka`. ## I'm stuck, what next? diff --git a/docs/en/documentation/contributing/master-project.md b/docs/en/documentation/contributing/master-project.md index d3b2560..9bb5419 100644 --- a/docs/en/documentation/contributing/master-project.md +++ b/docs/en/documentation/contributing/master-project.md @@ -1,28 +1,30 @@ -# The Pylon Master Project +# The Pylon & Rebar Project -Pylon has a master repository that contains both `pylon-core` and `pylon-base`. This allows you to run base using your very own home-baked version of core, which allows you to test new features much more easily. This is what the 'How to get started' section used. We recommend you make changes to both Base and Core using the master repository, and the rest of this guide will assume you're using it. +PylonMC has two repositries: one contains `rebar` and one contains `pylon`. This allows you to run base using your very own home-baked version of core, which allows you to test new features much more easily. This is what the 'How to get started' section used. We recommend you make changes to both Base and Core using the master repository, and the rest of this guide will assume you're using it. ## Project structure -The master project is structured as such: +The project is structured as such: ``` pylon/ - pylon-base/ - pylon-core/ - dokka-plugin/ - nms/ - pylon-core/ - test/ + src/ +rebar/ + dokka-plugin/ + nms/ + rebar/ + src/ + test/ ``` -`pylon-base` contains the Base addon for Pylon. `pylon-core` has four subprojects: `dokka-plugin`, `nms`, `pylon-core`, and `test`. `dokka-plugin` contains a custom Dokka plugin we use to help with formatting Javadocs. `nms` contains all the Pylon Core code that touches server internals. It is in a separate subproject to effectively isolate potentially unstable code from the rest of the project. `pylon-core` contains the main Pylon Core code, and `test` contains the integration tests for Pylon Core. + +`pylon` is the Base addon for Rebar. `rebar` has four subprojects: `dokka-plugin`, `nms`, `rebar`, and `test`. `dokka-plugin` contains a custom Dokka plugin we use to help with formatting Javadocs. `nms` contains all the Rebar code that touches server internals. It is in a separate subproject to effectively isolate potentially unstable code from the rest of the project. `rebar` contains the main Rebar code, and `test` contains the integration tests for Rebar. ## Tasks The Pylon master project contains a few tasks that are useful for development: | Task | Alias | Description | |------------------------------|---------------------|------------------------------------------------------------------------------------------------------------| -| `runServer` | `runSnapshotServer` | Runs a Minecraft server with the current version of Pylon Base and Pylon Core | -| `:pylon-base:runServer` | `runStableServer` | Runs a Minecraft server with the latest stable version of Pylon Core and the current version of Pylon Base | -| `:pylon-core:test:runServer` | `runLiveTests` | Executes the integration tests for Pylon Core | +| `runServer` | `runSnapshotServer` | Runs a Minecraft server with the current version of Rebar and Rebar | +| `:pylon-base:runServer` | `runStableServer` | Runs a Minecraft server with the latest stable version of Rebar and the current version of Pylon | +| `:rebar:test:runServer` | `runLiveTests` | Executes the integration tests for Rebar | !!! danger If you are launching the tasks using the aliases from IntelliJ and attach the debugger, you will notice that it will not work. I have no idea why this happens. In order to successfully attach the debugger, you need to run the actual tasks, not the aliases. For example, instead of running `runSnapshotServer`, run `runServer`. \ No newline at end of file diff --git a/docs/en/documentation/reference/blocks/creating-new-blocks.md b/docs/en/documentation/reference/blocks/creating-new-blocks.md index 993fc0e..7baf76a 100644 --- a/docs/en/documentation/reference/blocks/creating-new-blocks.md +++ b/docs/en/documentation/reference/blocks/creating-new-blocks.md @@ -6,7 +6,7 @@ Adding a custom block requires 3 things: - A block class - A `NamespacedKey` that identifies your block -- A corresponding `PylonItem` (Not strictly needed, but recommended so players can place your block) +- A corresponding `RebarItem` (Not strictly needed, but recommended so players can place your block) ## Block classes From d847a2da71213186a551657693c4fa0360a0b5d2 Mon Sep 17 00:00:00 2001 From: lijinhong11 <62691956+lijinhong11@users.noreply.github.com> Date: Sat, 18 Apr 2026 10:09:39 +0000 Subject: [PATCH 2/4] oops --- docs/en/documentation/contributing/master-project.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/en/documentation/contributing/master-project.md b/docs/en/documentation/contributing/master-project.md index 9bb5419..41a3864 100644 --- a/docs/en/documentation/contributing/master-project.md +++ b/docs/en/documentation/contributing/master-project.md @@ -11,11 +11,10 @@ rebar/ dokka-plugin/ nms/ rebar/ - src/ test/ ``` -`pylon` is the Base addon for Rebar. `rebar` has four subprojects: `dokka-plugin`, `nms`, `rebar`, and `test`. `dokka-plugin` contains a custom Dokka plugin we use to help with formatting Javadocs. `nms` contains all the Rebar code that touches server internals. It is in a separate subproject to effectively isolate potentially unstable code from the rest of the project. `rebar` contains the main Rebar code, and `test` contains the integration tests for Rebar. +`pylon` is the base addon for Rebar. `rebar` has four subprojects: `dokka-plugin`, `nms`, `rebar`, and `test`. `dokka-plugin` contains a custom Dokka plugin we use to help with formatting Javadocs. `nms` contains all the Rebar code that touches server internals. It is in a separate subproject to effectively isolate potentially unstable code from the rest of the project. `rebar` contains the main Rebar code, and `test` contains the integration tests for Rebar. ## Tasks The Pylon master project contains a few tasks that are useful for development: From e55e9dd9e98f05dd55fab28bf5de2dfe74bc10ad Mon Sep 17 00:00:00 2001 From: lijinhong11 <62691956+lijinhong11@users.noreply.github.com> Date: Sat, 18 Apr 2026 13:31:03 +0000 Subject: [PATCH 3/4] fix usages --- docs/en/archived/baguette-of-wisdom.md | 6 +++--- docs/en/documentation/contributing/getting-started.md | 4 ++-- docs/en/documentation/contributing/master-project.md | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/en/archived/baguette-of-wisdom.md b/docs/en/archived/baguette-of-wisdom.md index 35734a9..cee33fc 100644 --- a/docs/en/archived/baguette-of-wisdom.md +++ b/docs/en/archived/baguette-of-wisdom.md @@ -233,7 +233,7 @@ As you can see, we need to provide three things to set a PDC value: the **key**, The serializer is just a 'thing' that describes how to convert your type into a more primitive type that can be stored on disk - we won't go into details. You need a serializer for every type that you want to store - so you can't store, for example, `MyAddon` in a persistent data container as there is no serializer for it and it doesn't make sense to create one anyway. -!!! info "You can find a full list of serializers [here](https://pylonmc.github.io/rebar/docs/javadoc/io/github/pylonmc/rebar/datatypes/PylonSerializers.html)" +!!! info "You can find a full list of serializers [here](https://pylonmc.github.io/rebar/docs/javadoc/io/github/pylonmc/rebar/datatypes/RebarSerializers.html)" Ok. But what we really need to do is 'top up' the stored xp using the player's experience: @@ -405,13 +405,13 @@ When something like this happens, your first port of call should always be the s ```title="console" [12:51:22 WARN]: java.lang.NullPointerException: Cannot invoke "java.lang.Float.floatValue()" because the return value of "io.papermc.paper.persistence.PersistentDataContainerView.get(org.bukkit.NamespacedKey, org.bukkit.persistence.PersistentDataType)" is null [12:51:22 WARN]: at my-addon-MODIFIED-1757418660070.jar//io.github.pylonmc.myaddon.BaguetteOfWisdom.getPlaceholders(BaguetteOfWisdom.java:28) -[12:51:22 WARN]: at rebar-0.11.2.jar//io.github.pylonmc.pylon.core.guide.button.ItemButton.getItemProvider(ItemButton.kt:47) +[12:51:22 WARN]: at pylon-core-0.11.2.jar//io.github.pylonmc.pylon.core.guide.button.ItemButton.getItemProvider(ItemButton.kt:47) [12:51:22 WARN]: at xyz.xenondevs.invui.gui.SlotElement$ItemSlotElement.getItemStack(SlotElement.java:44) [12:51:22 WARN]: at xyz.xenondevs.invui.window.AbstractWindow.redrawItem(AbstractWindow.java:109) [12:51:22 WARN]: at xyz.xenondevs.invui.window.AbstractSingleWindow.initItems(AbstractSingleWindow.java:58) [12:51:22 WARN]: at xyz.xenondevs.invui.window.AbstractWindow.open(AbstractWindow.java:279) [12:51:22 WARN]: at xyz.xenondevs.invui.window.AbstractWindow$AbstractBuilder.open(AbstractWindow.java:679) -[12:51:22 WARN]: at rebar-0.11.2.jar//io.github.pylonmc.pylon.core.guide.pages.base.GuidePage.open(GuidePage.kt:28) +[12:51:22 WARN]: at pylon-core-0.11.2.jar//io.github.pylonmc.pylon.core.guide.pages.base.GuidePage.open(GuidePage.kt:28) [12:51:22 WARN]: at rebar-0.11.2.jar//io.github.pylonmc.pylon.core.guide.button.PageButton.handleClick(PageButton.kt:38) [12:51:22 WARN]: at xyz.xenondevs.invui.gui.AbstractGui.handleClick(AbstractGui.java:95) [12:51:22 WARN]: at xyz.xenondevs.invui.window.AbstractSingleWindow.handleClick(AbstractSingleWindow.java:84) diff --git a/docs/en/documentation/contributing/getting-started.md b/docs/en/documentation/contributing/getting-started.md index 55a9e74..9f17175 100644 --- a/docs/en/documentation/contributing/getting-started.md +++ b/docs/en/documentation/contributing/getting-started.md @@ -7,8 +7,8 @@ Pylon is written in Java. ## How to get started 1. Clone the `pylon` repository: `git clone https://github.com/pylonmc/pylon` (or use a GUI like Github Desktop) -2. If you're using IntelliJ, it'll set everything up automatically. If not, run `./gradlew`. This will clone the `rebar` and `pylon-base` repositories. -3. If you want to submit your changes to the Pylon project, **delete the `rebar` or `pylon-base` directory (depending on which one you want to contribute to), fork the rebar or pylon-base repository, and clone your fork into the same directory.** Otherwise, you won't be able to open a pull request with your changes (unless you're a Pylon developer and have access to the Pylon repositories). +2. If you're using IntelliJ, it'll set everything up automatically. If not, run `./gradlew`. This will clone the `rebar` and `pylon` repositories. +3. If you want to submit your changes to the Pylon project, **delete the `rebar` or `pylon` directory (depending on which one you want to contribute to), fork the rebar or pylon repository, and clone your fork into the same directory.** Otherwise, you won't be able to open a pull request with your changes (unless you're a Pylon developer and have access to the Pylon repositories). See the [Pylon Master Project](master-project.md) page for more information about the master repository. diff --git a/docs/en/documentation/contributing/master-project.md b/docs/en/documentation/contributing/master-project.md index 41a3864..bff3aa2 100644 --- a/docs/en/documentation/contributing/master-project.md +++ b/docs/en/documentation/contributing/master-project.md @@ -21,9 +21,9 @@ The Pylon master project contains a few tasks that are useful for development: | Task | Alias | Description | |------------------------------|---------------------|------------------------------------------------------------------------------------------------------------| -| `runServer` | `runSnapshotServer` | Runs a Minecraft server with the current version of Rebar and Rebar | -| `:pylon-base:runServer` | `runStableServer` | Runs a Minecraft server with the latest stable version of Rebar and the current version of Pylon | -| `:rebar:test:runServer` | `runLiveTests` | Executes the integration tests for Rebar | +| `runServer` | `runSnapshotServer` | Runs a Minecraft server with the current version of Rebar and Pylon | +| `:pylon:runServer` | `runStableServer` | Runs a Minecraft server with the latest stable version of Rebar and the current version of Pylon | +| `:rebar:test:runServer` | `runLiveTests` | Executes the integration tests for Rebar | !!! danger If you are launching the tasks using the aliases from IntelliJ and attach the debugger, you will notice that it will not work. I have no idea why this happens. In order to successfully attach the debugger, you need to run the actual tasks, not the aliases. For example, instead of running `runSnapshotServer`, run `runServer`. \ No newline at end of file From fbf6419e125c1d70e7fa0a070b2cb47cb6537bec Mon Sep 17 00:00:00 2001 From: lijinhong11 <62691956+lijinhong11@users.noreply.github.com> Date: Sun, 19 Apr 2026 00:16:35 +0000 Subject: [PATCH 4/4] resolve --- docs/en/documentation/contributing/master-project.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/en/documentation/contributing/master-project.md b/docs/en/documentation/contributing/master-project.md index bff3aa2..43b112d 100644 --- a/docs/en/documentation/contributing/master-project.md +++ b/docs/en/documentation/contributing/master-project.md @@ -1,6 +1,6 @@ -# The Pylon & Rebar Project +# The Parallel Dev Repo Project -PylonMC has two repositries: one contains `rebar` and one contains `pylon`. This allows you to run base using your very own home-baked version of core, which allows you to test new features much more easily. This is what the 'How to get started' section used. We recommend you make changes to both Base and Core using the master repository, and the rest of this guide will assume you're using it. +PylonMC has a repositry called: `parallel-dev-repo`. This allows you to run base using your very own home-baked version of core, which allows you to test new features much more easily. This is what the 'How to get started' section used. We recommend you make changes to both Pylon and Rebar using the repository, and the rest of this guide will assume you're using it. ## Project structure The project is structured as such: