mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-19 19:25:48 +00:00
Added a new feature to the debug fish
SlimefunTag support
This commit is contained in:
parent
80608b1e08
commit
805c2eafcc
@ -1,5 +1,5 @@
|
|||||||
# Table of contents
|
# Table of contents
|
||||||
- [Release Candidate 25 (TBD)](#release-candidate-25-tbd)
|
- [Release Candidate 25 (20 Jun 2021)](#release-candidate-25-20-jun-2021)
|
||||||
- [Release Candidate 24 (03 Jun 2021)](#release-candidate-24-03-jun-2021)
|
- [Release Candidate 24 (03 Jun 2021)](#release-candidate-24-03-jun-2021)
|
||||||
- [Release Candidate 23 (19 May 2021)](#release-candidate-23-19-may-2021)
|
- [Release Candidate 23 (19 May 2021)](#release-candidate-23-19-may-2021)
|
||||||
- [Release Candidate 22 (18 Apr 2021)](#release-candidate-22-18-apr-2021)
|
- [Release Candidate 22 (18 Apr 2021)](#release-candidate-22-18-apr-2021)
|
||||||
@ -25,7 +25,7 @@
|
|||||||
- [Release Candidate 2 (29 Sep 2019)](#release-candidate-2-29-sep-2019)
|
- [Release Candidate 2 (29 Sep 2019)](#release-candidate-2-29-sep-2019)
|
||||||
- [Release Candidate 1 (26 Sep 2019)](#release-candidate-1-26-sep-2019)
|
- [Release Candidate 1 (26 Sep 2019)](#release-candidate-1-26-sep-2019)
|
||||||
|
|
||||||
## Release Candidate 25 (TBD)
|
## Release Candidate 25 (20 Jun 2021)
|
||||||
|
|
||||||
#### Additions
|
#### Additions
|
||||||
* Added "4 Charcoal -> 1 Coal" recipe to the Compressor
|
* Added "4 Charcoal -> 1 Coal" recipe to the Compressor
|
||||||
@ -40,6 +40,7 @@
|
|||||||
* Added "Raw Iron -> Iron Dust" recipe to the Ore Crusher
|
* Added "Raw Iron -> Iron Dust" recipe to the Ore Crusher
|
||||||
* Added "Raw Gold -> Gold Dust" recipe to the Ore Crusher
|
* Added "Raw Gold -> Gold Dust" recipe to the Ore Crusher
|
||||||
* Added "Raw Copper -> Copper Dust" recipe to the Ore Crusher
|
* Added "Raw Copper -> Copper Dust" recipe to the Ore Crusher
|
||||||
|
* Debug Fish can now read Slimefun Tags for vanilla blocks
|
||||||
|
|
||||||
#### Changes
|
#### Changes
|
||||||
* (API) Removed `SlimefunItem#getID()` (renamed to `SlimefunItem#getId()`)
|
* (API) Removed `SlimefunItem#getID()` (renamed to `SlimefunItem#getId()`)
|
||||||
@ -48,7 +49,7 @@
|
|||||||
* (API) Removed AsyncReactorProcessCompleteEvent
|
* (API) Removed AsyncReactorProcessCompleteEvent
|
||||||
|
|
||||||
#### Fixes
|
#### Fixes
|
||||||
* Fixed 3105
|
* Fixed #3105
|
||||||
|
|
||||||
## Release Candidate 24 (03 Jun 2021)
|
## Release Candidate 24 (03 Jun 2021)
|
||||||
https://thebusybiscuit.github.io/builds/TheBusyBiscuit/Slimefun4/stable/#24
|
https://thebusybiscuit.github.io/builds/TheBusyBiscuit/Slimefun4/stable/#24
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
package io.github.thebusybiscuit.slimefun4.implementation.listeners;
|
package io.github.thebusybiscuit.slimefun4.implementation.listeners;
|
||||||
|
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.Set;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
@ -27,6 +29,8 @@ import io.github.thebusybiscuit.slimefun4.implementation.SlimefunItems;
|
|||||||
import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin;
|
import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin;
|
||||||
import io.github.thebusybiscuit.slimefun4.utils.HeadTexture;
|
import io.github.thebusybiscuit.slimefun4.utils.HeadTexture;
|
||||||
import io.github.thebusybiscuit.slimefun4.utils.SlimefunUtils;
|
import io.github.thebusybiscuit.slimefun4.utils.SlimefunUtils;
|
||||||
|
import io.github.thebusybiscuit.slimefun4.utils.tags.SlimefunTag;
|
||||||
|
|
||||||
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
|
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
|
||||||
import me.mrCookieSlime.Slimefun.api.BlockStorage;
|
import me.mrCookieSlime.Slimefun.api.BlockStorage;
|
||||||
|
|
||||||
@ -100,6 +104,26 @@ public class DebugFishListener implements Listener {
|
|||||||
} catch (Exception x) {
|
} catch (Exception x) {
|
||||||
SlimefunPlugin.logger().log(Level.SEVERE, "An Exception occurred while using a Debug-Fish", x);
|
SlimefunPlugin.logger().log(Level.SEVERE, "An Exception occurred while using a Debug-Fish", x);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// Read applicable Slimefun tags
|
||||||
|
Set<SlimefunTag> tags = new HashSet<>();
|
||||||
|
|
||||||
|
for (SlimefunTag tag : SlimefunTag.values()) {
|
||||||
|
if (tag.isTagged(b.getType())) {
|
||||||
|
tags.add(tag);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!tags.isEmpty()) {
|
||||||
|
p.sendMessage(" ");
|
||||||
|
p.sendMessage(ChatColors.color("&dSlimefun tags for: &e") + b.getType().name());
|
||||||
|
|
||||||
|
for (SlimefunTag tag : tags) {
|
||||||
|
p.sendMessage(ChatColors.color("&d* &e") + tag.name());
|
||||||
|
}
|
||||||
|
|
||||||
|
p.sendMessage(" ");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user