9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2025-12-26 02:19:19 +00:00

Updated Upstream (Leaves)

Upstream has released updates that appear to apply and compile correctly

Leaves Changes:
LeavesMC/Leaves@08bfa446 Lithium Sleeping Block Entity(#618) (#630)
LeavesMC/Leaves@610eee60 fix: fix bot resume CME (#635)
LeavesMC/Leaves@04dac366 Fix vanilla display name (#638)
LeavesMC/Leaves@e5aba7eb feat: hopper counter unlimited speed(#625) (#639)
LeavesMC/Leaves@e44e469a fix: fix SleepingBlockEntity crash when /tick freeze (#640)
LeavesMC/Leaves@5d653e31 fix: fix faster chunk serialization patch (#641)
LeavesMC/Leaves@cb6cd658 [ci/skip] chore: fix patch header
LeavesMC/Leaves@8d9a5b2f [ci/skip]chore: rename hopper counter enable config (#644)
LeavesMC/Leaves@cc019e8f [ci/skip] feat: add Bukkit.getFeatureManager api (#645)
LeavesMC/Leaves@81da0c5e [ci/skip] Bring back LivingEntity effect CME (#648)
LeavesMC/Leaves@ea91106a fix: fix hopper counter config (#646)
LeavesMC/Leaves@230e0987 feat: mount action(#619) (#649)
LeavesMC/Leaves@d9f7afc4 fix: fix sleeping block entity(#654) (#655)
LeavesMC/Leaves@12f665c0 Refactor actions (#650)
LeavesMC/Leaves@c29ff9a8 feat: swap action (#657)
LeavesMC/Leaves@3c09044e fix: fix grindstone curse book overstacking(#658) (#659)
LeavesMC/Leaves@e05f3f7c Update paper, revert #632 (#662)
LeavesMC/Leaves@0c866281 Bot Improvements (#661)
LeavesMC/Leaves@956f0227 feat: add skipTripwireHookPlacementValidation to mc-technical-mode, and format config (#664)
LeavesMC/Leaves@e047327c fix: fix bot use raytrace (#669)
LeavesMC/Leaves@29327349 Fix #667 (#668)
LeavesMC/Leaves@08f53c97 Fix bot cant get entity tracker (#670)
LeavesMC/Leaves@e0d62b4e fix photographer bugs (#666)
LeavesMC/Leaves@d094bdad fix: fix raid(#626) (#671)
LeavesMC/Leaves@678d4e20 Revert "Fix bot cant get entity tracker (#670)"
LeavesMC/Leaves@e298d097 [ci/skip] fix: fix patch name (#672)
LeavesMC/Leaves@099be5b8 [ci/skip] fix: fix push to api fail when commit contains double quotation marks (#677)
LeavesMC/Leaves@ba8993d3 Fix fakeplayer cant get entity tracker correctly (#676)
LeavesMC/Leaves@d93e9766  feat: merge old raid config, fix bugs (#680)
LeavesMC/Leaves@bf55b2a4 fix: fix sleeping block entity bug (#682)
LeavesMC/Leaves@5366b382 Fix creative no clip with projectile (#683)
LeavesMC/Leaves@e55edbf8 Resolves #685  (#687)
LeavesMC/Leaves@a591ec57 Do not tick Arrow life regardless (#688)
LeavesMC/Leaves@3623aea8 fix: stupid me (#689)
LeavesMC/Leaves@73e63912 feat: update leavesclip to 3.0.7 (#681)
LeavesMC/Leaves@bb5a1dff [ci/skip] fix: fix comment (#692)
LeavesMC/Leaves@d87bc544 Fix #690 (#691)
LeavesMC/Leaves@79d9ef74 Update paper (#693)
LeavesMC/Leaves@71790286 Fix optimize noise generation
LeavesMC/Leaves@3ffbde0b Optimize config transfer and remove
LeavesMC/Leaves@62e62242 feat: add logger for internal plugin, and format api code (#696)
LeavesMC/Leaves@f37e9d37 Fix fakeplayer break action
LeavesMC/Leaves@aeb8e07d Fix fakeplayer break action * 2
LeavesMC/Leaves@40af0399 Fix StackableShulker config validator
LeavesMC/Leaves@122c7365 Fix fakeplayer use action
LeavesMC/Leaves@0ee80784 fix: fix photographer bugs (#699)
LeavesMC/Leaves@a30c9abb Remove, and opt config and config command
LeavesMC/Leaves@4b21a968 New shears wrench (#700)
LeavesMC/Leaves@0f40159c Enhance update suppression (#701)
LeavesMC/Leaves@374605cd Fix bot (#705)
LeavesMC/Leaves@ff563baf Fix creative no clip can attract xp-orb (#706)
LeavesMC/Leaves@f0de3ecd refactor: use client side judgement instead of special judgement (#708)
This commit is contained in:
Dreeam
2025-08-20 05:53:22 +08:00
parent ff7c6beeb6
commit e7915c3726
15 changed files with 302 additions and 104 deletions

View File

@@ -1,11 +1,15 @@
package org.leavesmc.leaves.plugin;
import io.papermc.paper.plugin.configuration.PluginMeta;
import io.papermc.paper.plugin.lifecycle.event.LifecycleEventManager;
import org.bukkit.Bukkit;
import org.bukkit.Server;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.generator.BiomeProvider;
import org.bukkit.generator.ChunkGenerator;
import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.PluginBase;
import org.bukkit.plugin.PluginDescriptionFile;
import org.bukkit.plugin.PluginLoader;
@@ -24,10 +28,12 @@ public class MinecraftInternalPlugin extends PluginBase {
private boolean enabled = true;
private final PluginDescriptionFile pdf;
private final PluginLogger logger;
public MinecraftInternalPlugin() {
String pluginName = "Minecraft";
pdf = new PluginDescriptionFile(pluginName, "1.0", "nms");
logger = new PluginLogger(this);
}
public void setEnabled(boolean enabled) {
@@ -35,27 +41,47 @@ public class MinecraftInternalPlugin extends PluginBase {
}
@Override
public File getDataFolder() {
throw new UnsupportedOperationException("Not supported.");
}
@Override
public PluginDescriptionFile getDescription() {
public @NotNull PluginDescriptionFile getDescription() {
return pdf;
}
@Override
public io.papermc.paper.plugin.configuration.PluginMeta getPluginMeta() {
public @NotNull PluginMeta getPluginMeta() {
return pdf;
}
@Override
public FileConfiguration getConfig() {
public @NotNull PluginLogger getLogger() {
return logger;
}
@Override
public @NotNull Server getServer() {
return Bukkit.getServer();
}
@Override
public boolean isEnabled() {
return enabled;
}
@Override
public @NotNull PluginLoader getPluginLoader() {
throw new UnsupportedOperationException("Not supported.");
}
@Override
public InputStream getResource(String filename) {
public @NotNull File getDataFolder() {
throw new UnsupportedOperationException("Not supported.");
}
@Override
public @NotNull FileConfiguration getConfig() {
throw new UnsupportedOperationException("Not supported.");
}
@Override
public InputStream getResource(@NotNull String filename) {
throw new UnsupportedOperationException("Not supported.");
}
@@ -70,7 +96,7 @@ public class MinecraftInternalPlugin extends PluginBase {
}
@Override
public void saveResource(String resourcePath, boolean replace) {
public void saveResource(@NotNull String resourcePath, boolean replace) {
throw new UnsupportedOperationException("Not supported.");
}
@@ -79,26 +105,6 @@ public class MinecraftInternalPlugin extends PluginBase {
throw new UnsupportedOperationException("Not supported.");
}
@Override
public PluginLogger getLogger() {
throw new UnsupportedOperationException("Not supported.");
}
@Override
public PluginLoader getPluginLoader() {
throw new UnsupportedOperationException("Not supported.");
}
@Override
public Server getServer() {
throw new UnsupportedOperationException("Not supported.");
}
@Override
public boolean isEnabled() {
return enabled;
}
@Override
public void onDisable() {
throw new UnsupportedOperationException("Not supported.");
@@ -125,7 +131,7 @@ public class MinecraftInternalPlugin extends PluginBase {
}
@Override
public ChunkGenerator getDefaultWorldGenerator(String worldName, String id) {
public ChunkGenerator getDefaultWorldGenerator(@NotNull String worldName, String id) {
throw new UnsupportedOperationException("Not supported.");
}
@@ -135,17 +141,17 @@ public class MinecraftInternalPlugin extends PluginBase {
}
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, String @NotNull [] args) {
throw new UnsupportedOperationException("Not supported.");
}
@Override
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
public List<String> onTabComplete(@NotNull CommandSender sender, @NotNull Command command, @NotNull String alias, String @NotNull [] args) {
throw new UnsupportedOperationException("Not supported.");
}
@Override
public @NotNull io.papermc.paper.plugin.lifecycle.event.LifecycleEventManager<org.bukkit.plugin.Plugin> getLifecycleManager() {
public @NotNull LifecycleEventManager<@NotNull Plugin> getLifecycleManager() {
throw new UnsupportedOperationException("Not supported.");
}
}

View File

@@ -224,7 +224,7 @@ public class Recorder extends Connection {
try {
replayFile.saveMetaData(metaData);
} catch (IOException e) {
e.printStackTrace();
LOGGER.severe("Error saving metadata", e);
}
});
}
@@ -234,13 +234,8 @@ public class Recorder extends Connection {
}
private void savePacket(Packet<?> packet, final ConnectionProtocol protocol) {
try {
final long timestamp = getCurrentTimeAndUpdate();
replayFile.savePacket(timestamp, packet, protocol);
} catch (Exception e) {
LOGGER.severe("Error saving packet");
e.printStackTrace();
}
final long timestamp = getCurrentTimeAndUpdate();
replayFile.savePacket(timestamp, packet, protocol);
}
public boolean isSaved() {

View File

@@ -121,7 +121,7 @@ public class ReplayFile {
}
}
public void savePacket(long timestamp, Packet<?> packet, ConnectionProtocol protocol) throws Exception {
public void savePacket(long timestamp, Packet<?> packet, ConnectionProtocol protocol) {
byte[] data = getPacketBytes(packet, protocol);
saveService.execute(() -> {
try {
@@ -129,8 +129,7 @@ public class ReplayFile {
packetStream.writeInt(data.length);
packetStream.write(data);
} catch (Exception e) {
LOGGER.severe("Error saving packet");
e.printStackTrace();
LOGGER.severe("Error saving packet", e);
}
});
}

View File

@@ -77,7 +77,6 @@ public class ServerPhotographer extends ServerPlayer {
@Override
public void tick() {
super.tick();
super.doTick();
if (this.getServer().getTickCount() % 10 == 0) {
connection.resetPosition();