Skip to content

Commit

Permalink
不允许汇流生物与玩家组队
Browse files Browse the repository at this point in the history
Jar MineTeam 0.0.3
  • Loading branch information
XiaoHuNao committed Sep 23, 2024
1 parent fcef787 commit f453409
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ dependencies {
implementation fg.deobf(jarJar("com.xiaohunao.equipment_benediction:EquipmentBenediction:1.20.1-0.0.5")) {
jarJar.ranged(it, "[1.20.1-0.0.5,)")
}
implementation fg.deobf(jarJar("curse.maven:mineteam-1100774:5734043")) {
jarJar.ranged(it, "[forge-1.20.1-0.0.2,)")
implementation fg.deobf(jarJar("curse.maven:mineteam-1100774:5748443")) {
jarJar.ranged(it, "[forge-1.20.1-0.0.3,)")
}
implementation fg.deobf(jarJar("curse.maven:enemybanner-1005952:5556424")){
jarJar.ranged(it, "[forge-1.20.1-0.0.7,)")
Expand Down
10 changes: 10 additions & 0 deletions src/main/java/org/confluence/mod/event/ForgeEvents.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.confluence.mod.event;

import com.xiaohunao.mine_team.common.event.RegisterTeamDataEvent;
import it.unimi.dsi.fastutil.objects.Object2IntMap;
import it.unimi.dsi.fastutil.objects.ObjectIterator;
import net.minecraft.ChatFormatting;
Expand Down Expand Up @@ -418,4 +419,13 @@ public static void explosionDetonate(ExplosionEvent.Detonate event) {
event.getAffectedEntities().removeIf(entity -> entity instanceof ItemEntity);
}
}

@SubscribeEvent
public static void onRegisterTeamData(RegisterTeamDataEvent event) {
ModEntities.ENTITIES.getEntries().forEach(entry -> {
EntityType<?> entityType = entry.get();
event.registerTeamData(entityType,data -> data.setCanTeam(false));
});
}

}

0 comments on commit f453409

Please sign in to comment.