aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CollectionLogManager.java
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-10-16 15:50:41 -0400
committerGitHub <noreply@github.com>2021-10-16 15:50:41 -0400
commit7c00af18febf6c0b833c7633b4fb60a9a1bb93af (patch)
treef02de145362d6a1399651ade4a130d565d7f0ba3 /src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CollectionLogManager.java
parentb11742988dec635b5c5da7c2363803cbfafb37b1 (diff)
downloadnotenoughupdates-7c00af18febf6c0b833c7633b4fb60a9a1bb93af.tar.gz
notenoughupdates-7c00af18febf6c0b833c7633b4fb60a9a1bb93af.tar.bz2
notenoughupdates-7c00af18febf6c0b833c7633b4fb60a9a1bb93af.zip
Code Clean Up (#2)
* intellij code clean up * optimize imports * format * intellij suggestions * fix empty catch issues
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CollectionLogManager.java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CollectionLogManager.java20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CollectionLogManager.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CollectionLogManager.java
index 00809d87..54700927 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CollectionLogManager.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CollectionLogManager.java
@@ -11,29 +11,29 @@ import java.util.regex.Matcher;
public class CollectionLogManager {
- private static CollectionLogManager INSTANCE = new CollectionLogManager();
+ private static final CollectionLogManager INSTANCE = new CollectionLogManager();
public static CollectionLogManager getInstance() {
return INSTANCE;
}
public void onEntityMetadataUpdated(int entityId) {
- System.out.println("entity created:"+entityId);
+ System.out.println("entity created:" + entityId);
WorldClient world = Minecraft.getMinecraft().theWorld;
- if(world != null) {
+ if (world != null) {
Entity entity = world.getEntityByID(entityId);
- if(entity instanceof EntityArmorStand && entity.hasCustomName()) {
+ if (entity instanceof EntityArmorStand && entity.hasCustomName()) {
String customName = entity.getName();
- System.out.println("got name:"+customName);
- for(CollectionConstant.DropEntry entry : Constants.COLLECTIONLOG.dropdata) {
+ System.out.println("got name:" + customName);
+ for (CollectionConstant.DropEntry entry : Constants.COLLECTIONLOG.dropdata) {
System.out.println("iter entry");
- if(entry.type.equalsIgnoreCase("itemdrop")) {
+ if (entry.type.equalsIgnoreCase("itemdrop")) {
Matcher matcher = entry.regex.matcher(customName);
- if(matcher.matches()) {
+ if (matcher.matches()) {
System.out.println("Match found!");
- System.out.println("Count: "+matcher.group("count"));
- System.out.println("Name: "+matcher.group("itemname"));
+ System.out.println("Count: " + matcher.group("count"));
+ System.out.println("Name: " + matcher.group("itemname"));
} else {
System.out.println("Doesn't match: " + customName);
}