Skip to content
This repository has been archived by the owner on Nov 24, 2022. It is now read-only.

Commit

Permalink
update: 1.18-pre5
Browse files Browse the repository at this point in the history
  • Loading branch information
DrexHD committed Nov 19, 2021
1 parent 874e3e5 commit 68aa916
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
matrix:
# Use these Java versions
java: [
16 # Minimum supported by Minecraft
17 # Minimum supported by Minecraft
]
# and run on both Linux and Windows
os: [ ubuntu-20.04, windows-latest ]
Expand Down
13 changes: 7 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ plugins {

apply plugin: 'com.github.johnrengelman.shadow'

sourceCompatibility = JavaVersion.VERSION_16
targetCompatibility = JavaVersion.VERSION_16
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17

version gitVersion()
def details = versionDetails()
Expand Down Expand Up @@ -92,8 +92,9 @@ dependencies {
// DiscordFab
implementation "com.github.DrexHD:DiscordFab:${project.discordfab_version}"

// Json
implementation "com.googlecode.json-simple:json-simple:${project.json_simple}"
// Gson
//implementation "com.googlecode.json-simple:json-simple:${project.json_simple}"
implementation 'com.google.code.gson:gson:2.8.8'
}

task remapJar(type: net.fabricmc.loom.task.RemapJarTask, overwrite: true) {
Expand Down Expand Up @@ -121,8 +122,8 @@ tasks.withType(JavaCompile).configureEach {
// If Javadoc is generated, this must be specified in that task too.
it.options.encoding = "UTF-8"

// Minecraft 1.17 (21w19a) upwards uses Java 16.
it.options.release = 16
// Minecraft 1.18 upwards uses Java 17.
it.options.release = 17
}

java {
Expand Down
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
org.gradle.jvmargs=-Xmx2G

# Fabric Properties
minecraft_version=21w44a
yarn_mappings=21w44a+build.1
minecraft_version=1.18-pre5
yarn_mappings=1.18-pre5+build.2
loader_version=0.12.3

# Fabric api
fabric_version=0.41.2+1.18
fabric_version=0.42.4+1.18

# Mod Properties
mod_version=1.20.3
mod_version=1.20.4
mod_version_nick=ModernTimes
mod_version_type=release
maven_group=org.kilocraft.essentials
Expand Down
5 changes: 2 additions & 3 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Tue Sep 03 13:46:41 CEST 2019
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import org.kilocraft.essentials.config.main.sections.ModerationConfigSection;
import org.kilocraft.essentials.events.PlayerEvents;
import org.kilocraft.essentials.user.preference.Preferences;
import org.objectweb.asm.Opcodes;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
Expand Down Expand Up @@ -96,7 +97,7 @@ public Collection<Team> changeScoreboardPacket(ServerScoreboard serverScoreboard
method = "onPlayerConnect",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/server/PlayerManager;broadcastChatMessage(Lnet/minecraft/text/Text;Lnet/minecraft/network/MessageType;Ljava/util/UUID;)V"
target = "Lnet/minecraft/server/PlayerManager;broadcast(Lnet/minecraft/text/Text;Lnet/minecraft/network/MessageType;Ljava/util/UUID;)V"
),
index = 0
)
Expand All @@ -108,11 +109,11 @@ public Text modifyJoinMessage(Text text) {
method = "onPlayerConnect",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/server/PlayerManager;broadcastChatMessage(Lnet/minecraft/text/Text;Lnet/minecraft/network/MessageType;Ljava/util/UUID;)V"
target = "Lnet/minecraft/server/PlayerManager;broadcast(Lnet/minecraft/text/Text;Lnet/minecraft/network/MessageType;Ljava/util/UUID;)V"
)
)
public void shouldBroadCastJoin(PlayerManager playerManager, Text message, MessageType type, UUID sender, ClientConnection connection, ServerPlayerEntity player) {
if (!KiloEssentials.getUserManager().getOnline(player).getPreference(Preferences.VANISH)) playerManager.broadcastChatMessage(message, type, sender);
if (!KiloEssentials.getUserManager().getOnline(player).getPreference(Preferences.VANISH)) playerManager.broadcast(message, type, sender);
}

@Inject(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public abstract class ServerPlayNetworkHandlerMixin {
method = "onDisconnected",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/server/PlayerManager;broadcastChatMessage(Lnet/minecraft/text/Text;Lnet/minecraft/network/MessageType;Ljava/util/UUID;)V"
target = "Lnet/minecraft/server/PlayerManager;broadcast(Lnet/minecraft/text/Text;Lnet/minecraft/network/MessageType;Ljava/util/UUID;)V"
),
index = 0
)
Expand All @@ -46,11 +46,11 @@ public Text modifyLeaveMessage(Text text) {
method = "onDisconnected",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/server/PlayerManager;broadcastChatMessage(Lnet/minecraft/text/Text;Lnet/minecraft/network/MessageType;Ljava/util/UUID;)V"
target = "Lnet/minecraft/server/PlayerManager;broadcast(Lnet/minecraft/text/Text;Lnet/minecraft/network/MessageType;Ljava/util/UUID;)V"
)
)
public void shouldBroadCastLeave(PlayerManager playerManager, Text message, MessageType type, UUID sender) {
if (!KiloEssentials.getUserManager().getOnline(this.player).getPreference(Preferences.VANISH)) playerManager.broadcastChatMessage(message, type, sender);
if (!KiloEssentials.getUserManager().getOnline(this.player).getPreference(Preferences.VANISH)) playerManager.broadcast(message, type, sender);
}

@Inject(at = @At(value = "RETURN"), method = "onDisconnected")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ public class ServerSettings implements NBTStorage {
public static boolean patch_tnt_duping = true;
public static int patch_save_interval = 6000;


public ServerSettings() {
NBTStorageUtil.addCallback(this);
}
Expand Down Expand Up @@ -83,7 +82,7 @@ public static int getViewDistance() {
}

public static void setViewDistance(int viewDistance) {
ServerSettings.setInt("tick_utils.view_distance", viewDistance);
ServerSettings.setInt("view_distance", viewDistance);
}

public static void registerSettings() {
Expand Down
1 change: 0 additions & 1 deletion src/main/resources/mod.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,4 @@ git_hash=${git_hash}
git_hash_full=${git_hash_full}
git_branch=${git_branch}
build_type=${build_type}
debug_bar_text=&fTPS: %s &fMSPT: &a%s &r&fE: &a%s&r &fLC: &a%s &r&f(%s/%s)
datafixer_schema=0

0 comments on commit 68aa916

Please sign in to comment.