Skip to content

Commit

Permalink
fix door animation duplication issue, mark for release 1.18.1r2
Browse files Browse the repository at this point in the history
Signed-off-by: Mineshafter61 <yuhang.061@gmail.com>
  • Loading branch information
Mineshafter61 committed Feb 1, 2022
1 parent 722f318 commit 8171928
Show file tree
Hide file tree
Showing 10 changed files with 7 additions and 6 deletions.
Binary file modified .gradle/7.2/executionHistory/executionHistory.bin
Binary file not shown.
Binary file modified .gradle/7.2/executionHistory/executionHistory.lock
Binary file not shown.
Binary file modified .gradle/7.2/fileHashes/fileHashes.bin
Binary file not shown.
Binary file modified .gradle/7.2/fileHashes/fileHashes.lock
Binary file not shown.
Binary file modified .gradle/7.2/fileHashes/resourceHashesCache.bin
Binary file not shown.
Binary file modified .gradle/buildOutputCleanup/buildOutputCleanup.lock
Binary file not shown.
Binary file modified .gradle/buildOutputCleanup/outputFiles.bin
Binary file not shown.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins {
}

group 'org.mikeshafter'
version '1.18.1b4'
version '1.18.1r2'

compileJava.options.encoding 'UTF-8'

Expand Down
Binary file modified build/tmp/compileJava/previous-compilation-data.bin
Binary file not shown.
11 changes: 6 additions & 5 deletions src/main/java/mikeshafter/mikestcaddons/SignActionSwap.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import com.bergerkiller.bukkit.tc.signactions.SignAction;
import com.bergerkiller.bukkit.tc.signactions.SignActionType;
import com.bergerkiller.bukkit.tc.utils.SignBuildOptions;
import org.bukkit.plugin.Plugin;

import java.util.Set;

Expand All @@ -25,8 +24,7 @@ private void swap(MinecartMember<?> member) {
Set<ConfigurationNode> attachments = fullConfig.getNode("attachments").getNodes();
if (attachments != null) {
for (ConfigurationNode node : attachments) {
Plugin plugin = MikesTCAddons.getPlugin(MikesTCAddons.class);
plugin.getLogger().info("1 "+node.getHeader());

ConfigurationNode attachment = member.getProperties().getModel().getConfig().getNode("attachments");
attachment.set(node.getPath(), swap(node));
fullConfig.set("attachments", attachment);
Expand All @@ -47,10 +45,13 @@ private ConfigurationNode swap(ConfigurationNode attachmentNode) {
if (animationNames.contains("door_R")) {
for (String name : animationNames) {
if (name.contains("door_R")) {
// Plugin plugin = MikesTCAddons.getPlugin(MikesTCAddons.class);
// plugin.getLogger().info(name);
// plugin.getLogger().info("door_L"+name.substring(6));
// set to new node
animations.set("door_L"+name.substring(6), animations.getNode(name));
// remove
attachmentNode.remove(name);
animations.remove(name);
attachmentNode.set("animations", animations);
}
}
Expand All @@ -63,7 +64,7 @@ else if (animationNames.contains("door_L")) {
// set to new node
animations.set("door_R"+name.substring(6), animations.getNode(name));
// remove
attachmentNode.remove(name);
animations.remove(name);
attachmentNode.set("animations", animations);
}
}
Expand Down

0 comments on commit 8171928

Please sign in to comment.