Skip to content

Commit 2761ede

Browse files
committed
Various fixes, clean, etc
1 parent 4b467d1 commit 2761ede

File tree

17 files changed

+88
-63
lines changed

17 files changed

+88
-63
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,19 @@
22

33
<img alt="Factions Mod Icon" src="src/main/resources/assets/factions/icon.png">
44

5+
<p style="color:red;">### **YOU ARE ON THE FORK MADE BY ARONA74**
6+
7+
This fork was made to provide lastest features and bug fixes of Factions Mod to MC 1.20.1 version.
8+
9+
Features NOT included:
10+
- Translations
11+
- GUI
12+
- Prevent Explosions in claims
13+
14+
No support will be provided by original Factions Mod dev team, this fork is provided as is.
15+
16+
&nbsp;</p>
17+
518
# Factions Mod
619

720
Highly customizable, lightweight and elegant factions mod for the [Fabric loader][fabric] in Minecraft 1.20.1

build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ group = project.maven_group
1212

1313
repositories {
1414
maven { url "https://jitpack.io" }
15+
maven { url 'https://repo.bluecolored.de/releases' }
1516
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
1617
maven { url "https://repo.mikeprimm.com/" }
1718
maven { url "https://maven.nucleoid.xyz/" }
@@ -43,7 +44,7 @@ dependencies {
4344
include "com.flowpowered:flow-math:${project.flow_version}"
4445
implementation "com.flowpowered:flow-math:${project.flow_version}"
4546
modCompileOnly "us.dynmap:DynmapCoreAPI:${project.dynmap_api_version}"
46-
modCompileOnly "com.github.BlueMap-Minecraft:BlueMapAPI:${project.bluemap_api_version}"
47+
modCompileOnly "de.bluecolored.bluemap:BlueMapAPI:${project.bluemap_api_version}"
4748
modCompileOnly "maven.modrinth:styled-chat:${project.styled_chat_version}"
4849
modCompileOnly "xyz.jpenilla:squaremap-api:${project.squaremap_api_version}"
4950
}

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ yarn_mappings=1.20.1+build.10
66
loader_version=0.14.22
77

88
# Mod Properties
9-
mod_version = 2.5.1.custom2.9.0
9+
mod_version = 2.9.0
1010
maven_group = io.icker
1111
archives_base_name = factions
1212

@@ -16,6 +16,6 @@ lucko_permissions_version=0.3.1
1616
dynmap_api_version=3.7-SNAPSHOT
1717
papi_version=2.1.3+1.20.1
1818
styled_chat_version=7dmapSQA
19-
bluemap_api_version=v2.5.1
19+
bluemap_api_version=2.7.1
2020
squaremap_api_version=1.2.3
2121
flow_version=1.0.3

src/main/java/io/icker/factions/api/events/FactionEvents.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public interface MemberJoin {
106106
void onMemberJoin(Faction faction, User user);
107107
}
108108

109-
// TODO add Reason: LEAVE, KICK, DISBAND
109+
// TO DO add Reason: LEAVE, KICK, DISBAND
110110
@FunctionalInterface
111111
public interface MemberLeave {
112112
void onMemberLeave(Faction faction, User user);

src/main/java/io/icker/factions/api/events/PlayerEvents.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@
44

55
import net.fabricmc.fabric.api.event.Event;
66
import net.fabricmc.fabric.api.event.EventFactory;
7-
import net.minecraft.block.BlockState;
7+
//import net.minecraft.block.BlockState;
88
import net.minecraft.entity.Entity;
99
import net.minecraft.entity.damage.DamageSource;
1010
import net.minecraft.entity.player.PlayerEntity;
1111
import net.minecraft.item.ItemUsageContext;
1212
import net.minecraft.server.network.ServerPlayerEntity;
1313
import net.minecraft.util.ActionResult;
1414
import net.minecraft.util.math.BlockPos;
15-
import net.minecraft.world.BlockView;
15+
//import net.minecraft.world.BlockView;
1616
import net.minecraft.world.World;
17-
import net.minecraft.world.explosion.Explosion;
17+
//import net.minecraft.world.explosion.Explosion;
1818

1919
/** Events related to player actions */
2020
public class PlayerEvents {

src/main/java/io/icker/factions/api/persistents/Claim.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ public Claim(int x, int z, String level, UUID factionID) {
4040
this.accessLevel = Rank.MEMBER;
4141
}
4242

43-
@SuppressWarnings("unused")
4443
public Claim() {}
4544

4645
public String getKey() {

src/main/java/io/icker/factions/api/persistents/Faction.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,8 @@ public Faction(String name, String description, String motd, Formatting color, b
7676
this.power = power;
7777
}
7878

79-
@SuppressWarnings("unused")
8079
public Faction() {}
8180

82-
@SuppressWarnings("unused")
8381
public String getKey() {
8482
return id.toString();
8583
}
@@ -102,7 +100,6 @@ public static Collection<Faction> all() {
102100
return STORE.values();
103101
}
104102

105-
@SuppressWarnings("unused")
106103
public static List<Faction> allBut(UUID id) {
107104
return STORE.values().stream().filter(f -> f.id != id).toList();
108105
}
@@ -305,7 +302,7 @@ public static void save() {
305302
Database.save(Faction.class, STORE.values().stream().toList());
306303
}
307304

308-
// TODO(samu): import per-player power patch
305+
// TO DO(samu): import per-player power patch
309306
public int calculateMaxPower() {
310307
return FactionsMod.CONFIG.POWER.BASE
311308
+ (getUsers().size() * FactionsMod.CONFIG.POWER.MEMBER)

src/main/java/io/icker/factions/api/persistents/Relationship.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,5 @@ public Relationship(UUID target, Status status) {
2929
this.status = status;
3030
}
3131

32-
@SuppressWarnings("unused")
3332
public Relationship() {}
3433
}

src/main/java/io/icker/factions/api/persistents/User.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ public User(UUID id) {
6363

6464
public User() {}
6565

66-
@SuppressWarnings("unused")
6766
public String getKey() {
6867
return id.toString();
6968
}

src/main/java/io/icker/factions/command/ClaimCommand.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,8 @@ private int setAccessLevel(CommandContext<ServerCommandSource> context, boolean
278278
case LEADER -> claim.accessLevel = User.Rank.OWNER;
279279
case COMMANDER -> claim.accessLevel = User.Rank.LEADER;
280280
case MEMBER -> claim.accessLevel = User.Rank.COMMANDER;
281+
case GUEST -> throw new UnsupportedOperationException("Unimplemented case: " + claim.accessLevel);
282+
default -> throw new IllegalArgumentException("Unexpected value: " + claim.accessLevel);
281283
}
282284
} else {
283285
if (claim.accessLevel.ordinal() <= user.rank.ordinal()) {
@@ -296,6 +298,8 @@ private int setAccessLevel(CommandContext<ServerCommandSource> context, boolean
296298
.fail().send(player, false);
297299
return 0;
298300
}
301+
case GUEST -> throw new UnsupportedOperationException("Unimplemented case: " + claim.accessLevel);
302+
default -> throw new IllegalArgumentException("Unexpected value: " + claim.accessLevel);
299303
}
300304
}
301305

0 commit comments

Comments
 (0)