aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CollectionLogManager.java
diff options
context:
space:
mode:
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.java56
1 files changed, 28 insertions, 28 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 edfc0f7f..c550ce53 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CollectionLogManager.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CollectionLogManager.java
@@ -10,35 +10,35 @@ import net.minecraft.entity.item.EntityArmorStand;
import java.util.regex.Matcher;
public class CollectionLogManager {
- private static final CollectionLogManager INSTANCE = new CollectionLogManager();
+ private static final CollectionLogManager INSTANCE = new CollectionLogManager();
- public static CollectionLogManager getInstance() {
- return INSTANCE;
- }
+ public static CollectionLogManager getInstance() {
+ return INSTANCE;
+ }
- public void onEntityMetadataUpdated(int entityId) {
- System.out.println("entity created:" + entityId);
- WorldClient world = Minecraft.getMinecraft().theWorld;
- if (world != null) {
- Entity entity = world.getEntityByID(entityId);
+ public void onEntityMetadataUpdated(int entityId) {
+ System.out.println("entity created:" + entityId);
+ WorldClient world = Minecraft.getMinecraft().theWorld;
+ if (world != null) {
+ Entity entity = world.getEntityByID(entityId);
- 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("iter entry");
- if (entry.type.equalsIgnoreCase("itemdrop")) {
- Matcher matcher = entry.regex.matcher(customName);
- if (matcher.matches()) {
- System.out.println("Match found!");
- System.out.println("Count: " + matcher.group("count"));
- System.out.println("Name: " + matcher.group("itemname"));
- } else {
- System.out.println("Doesn't match: " + customName);
- }
- }
- }
- }
- }
- }
+ 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("iter entry");
+ if (entry.type.equalsIgnoreCase("itemdrop")) {
+ Matcher matcher = entry.regex.matcher(customName);
+ if (matcher.matches()) {
+ System.out.println("Match found!");
+ System.out.println("Count: " + matcher.group("count"));
+ System.out.println("Name: " + matcher.group("itemname"));
+ } else {
+ System.out.println("Doesn't match: " + customName);
+ }
+ }
+ }
+ }
+ }
+ }
}