Compare commits
4 commits
648535fd22
...
19ab653181
Author | SHA1 | Date | |
---|---|---|---|
19ab653181 | |||
e0d7e636a6 | |||
9bcdcc17ba | |||
a48fe97b4d |
4 changed files with 20 additions and 6 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_R2</project.nms.version>
|
<project.nms.version>v1_21_R1</project.nms.version>
|
||||||
<project.minecraft.version>1.21.3</project.minecraft.version>
|
<project.minecraft.version>1.21.1</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(
|
||||||
debug, metrics, locale,
|
metrics, debug, locale,
|
||||||
worldborderExpand, worldborderHide,
|
worldborderExpand, worldborderHide,
|
||||||
brandEnabled, brandText, brandShowPing, brandShowMspt,
|
brandEnabled, brandText, brandShowPing, brandShowMspt,
|
||||||
doorDoubleOpen, doorKnocking,
|
doorDoubleOpen, doorKnocking,
|
||||||
|
|
|
@ -49,8 +49,14 @@ 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,11 +1,12 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2024 Minecon724
|
* Copyright (C) 2025 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;
|
||||||
|
@ -18,14 +19,21 @@ public class GatewayItem {
|
||||||
private final NamespacedKey gatewayKey;
|
private final NamespacedKey gatewayKey;
|
||||||
|
|
||||||
public GatewayItem(Plugin plugin) {
|
public GatewayItem(Plugin plugin) {
|
||||||
this.gatewayKey = new NamespacedKey(plugin, "gateway");
|
var start = System.nanoTime();
|
||||||
|
|
||||||
|
this.gatewayKey = new NamespacedKey(plugin, "gateway");
|
||||||
var recipe = new ShapelessRecipe(gatewayKey, itemStack());
|
var recipe = new ShapelessRecipe(gatewayKey, itemStack());
|
||||||
|
|
||||||
|
// this takes a long time for some reason. The first one especially
|
||||||
|
// 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