Compare commits
No commits in common. "19ab653181393bbd843e29442714ac0b089e9cb8" and "648535fd222d928f0b43feee5b8438a5a92bd8fc" have entirely different histories.
19ab653181
...
648535fd22
4 changed files with 6 additions and 20 deletions
4
pom.xml
4
pom.xml
|
@ -17,8 +17,8 @@
|
||||||
<maven.compiler.target>21</maven.compiler.target>
|
<maven.compiler.target>21</maven.compiler.target>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
|
||||||
<project.nms.version>v1_21_R1</project.nms.version>
|
<project.nms.version>v1_21_R2</project.nms.version>
|
||||||
<project.minecraft.version>1.21.1</project.minecraft.version>
|
<project.minecraft.version>1.21.3</project.minecraft.version>
|
||||||
<project.spigot.version>${project.minecraft.version}-R0.1-SNAPSHOT</project.spigot.version>
|
<project.spigot.version>${project.minecraft.version}-R0.1-SNAPSHOT</project.spigot.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
|
|
|
@ -142,7 +142,7 @@ public record TweaksConfig(
|
||||||
boolean swingEnabled = config.getBoolean("swing.enabled");
|
boolean swingEnabled = config.getBoolean("swing.enabled");
|
||||||
|
|
||||||
TweaksConfig.config = new TweaksConfig(
|
TweaksConfig.config = new TweaksConfig(
|
||||||
metrics, debug, locale,
|
debug, metrics, locale,
|
||||||
worldborderExpand, worldborderHide,
|
worldborderExpand, worldborderHide,
|
||||||
brandEnabled, brandText, brandShowPing, brandShowMspt,
|
brandEnabled, brandText, brandShowPing, brandShowMspt,
|
||||||
doorDoubleOpen, doorKnocking,
|
doorDoubleOpen, doorKnocking,
|
||||||
|
|
|
@ -49,14 +49,8 @@ public class KnockbackModule extends TweaksModule implements Listener {
|
||||||
modifiers.put(type, new Vector(mod, mod >= 1 ? mod : 1, mod)); // don't touch vertical
|
modifiers.put(type, new Vector(mod, mod >= 1 ? mod : 1, mod)); // don't touch vertical
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!modifiers.isEmpty()) {
|
if (!modifiers.isEmpty())
|
||||||
registerEvents(this);
|
registerEvents(this);
|
||||||
|
|
||||||
try {
|
|
||||||
Class.forName("com.destroystokyo.paper.event.entity.EntityKnockbackByEntityEvent");
|
|
||||||
DebugLogger.warning("Ignore that. Server performance will NOT be affected.");
|
|
||||||
} catch (ClassNotFoundException ignored) { }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
|
|
|
@ -1,12 +1,11 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2025 Minecon724
|
* Copyright (C) 2024 Minecon724
|
||||||
* Tweaks724 is licensed under the GNU General Public License. See the LICENSE.md file
|
* Tweaks724 is licensed under the GNU General Public License. See the LICENSE.md file
|
||||||
* in the project root for the full license text.
|
* in the project root for the full license text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package eu.m724.tweaks.redstone;
|
package eu.m724.tweaks.redstone;
|
||||||
|
|
||||||
import eu.m724.tweaks.DebugLogger;
|
|
||||||
import eu.m724.tweaks.Language;
|
import eu.m724.tweaks.Language;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.NamespacedKey;
|
import org.bukkit.NamespacedKey;
|
||||||
|
@ -19,21 +18,14 @@ public class GatewayItem {
|
||||||
private final NamespacedKey gatewayKey;
|
private final NamespacedKey gatewayKey;
|
||||||
|
|
||||||
public GatewayItem(Plugin plugin) {
|
public GatewayItem(Plugin plugin) {
|
||||||
var start = System.nanoTime();
|
|
||||||
|
|
||||||
this.gatewayKey = new NamespacedKey(plugin, "gateway");
|
this.gatewayKey = new NamespacedKey(plugin, "gateway");
|
||||||
var recipe = new ShapelessRecipe(gatewayKey, itemStack());
|
|
||||||
|
|
||||||
// this takes a long time for some reason. The first one especially
|
var recipe = new ShapelessRecipe(gatewayKey, itemStack());
|
||||||
// do this somewhere off measure to JIT and skew the measurement: new RecipeChoice.MaterialChoice(Material.DIRT);
|
|
||||||
recipe.addIngredient(Material.NETHER_STAR);
|
recipe.addIngredient(Material.NETHER_STAR);
|
||||||
recipe.addIngredient(Material.ENDER_CHEST);
|
recipe.addIngredient(Material.ENDER_CHEST);
|
||||||
recipe.addIngredient(Material.CHORUS_FLOWER);
|
recipe.addIngredient(Material.CHORUS_FLOWER);
|
||||||
recipe.addIngredient(Material.DAYLIGHT_DETECTOR);
|
recipe.addIngredient(Material.DAYLIGHT_DETECTOR);
|
||||||
|
|
||||||
plugin.getServer().addRecipe(recipe);
|
plugin.getServer().addRecipe(recipe);
|
||||||
|
|
||||||
DebugLogger.finer("Adding the recipe took %d ms, which is a long time", (System.nanoTime() - start) / 1000000);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public ItemStack itemStack() {
|
public ItemStack itemStack() {
|
||||||
|
|
Loading…
Reference in a new issue