Skip to content

Commit

Permalink
Merge branch '1.20'
Browse files Browse the repository at this point in the history
  • Loading branch information
Sunekaer committed Jan 15, 2024
2 parents ea783e1 + ff18431 commit 677ce33
Show file tree
Hide file tree
Showing 49 changed files with 1,434 additions and 486 deletions.
13 changes: 9 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
## [3.0.3]
## 79.0.0

### Fixed

- An issue causing some of the kill commands to not always kill all the entities they should.
- Improved performance on the clear chunk and scan chunk commands
- Added a teleport to dimension command
- Added drain command which can drain an area of it’s fluid. Currently takes the location the player is looking at
- Improved the output of /oredist
- Fixed some permission issues
- Added repair item command
- Added print command
- Added copy command
31 changes: 21 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id "architectury-plugin" version "3.4-SNAPSHOT"
id "dev.architectury.loom" version "1.1-SNAPSHOT" apply false
id "me.modmuss50.mod-publish-plugin" version "0.3.0"
id "dev.architectury.loom" version "1.4-SNAPSHOT" apply false
id "me.modmuss50.mod-publish-plugin" version "0.4.5"
}

architectury {
Expand All @@ -10,17 +10,29 @@ architectury {

subprojects {
apply plugin: "dev.architectury.loom"
apply plugin: "maven-publish"

loom {
silentMojangMappingsLicense()
}

dependencies {
minecraft "com.mojang:minecraft:${rootProject.minecraft_version}"
// The following line declares the mojmap mappings, you may use other mappings as well
mappings loom.officialMojangMappings()
// The following line declares the yarn mappings you may select this one as well.
// mappings "net.fabricmc:yarn:1.19.2+build.28:v2"
}

publishing {
repositories {
if (providers.environmentVariable("NANITE_TOKEN").isPresent()) {
maven {
url "https://maven.nanite.dev/releases"
credentials {
username = "nanite"
password = providers.environmentVariable("NANITE_TOKEN").get()
}
}
}
}
}
}

Expand All @@ -29,10 +41,9 @@ allprojects {
apply plugin: "architectury-plugin"
apply plugin: "maven-publish"

ext.ENV = System.getenv()

archivesBaseName = rootProject.archives_base_name
version = "${rootProject.mod_version}-build.${ENV.GITHUB_RUN_NUMBER ?: 9999}+mc${rootProject.minecraft_version}"
version = rootProject.mod_version
group = rootProject.maven_group

repositories {
Expand All @@ -57,13 +68,13 @@ publishMods {

def fabricOptions = publishOptions {
file = project.provider { project(":fabric").tasks.remapJar }.flatMap { it.archiveFile }
displayName = "${project.name} Fabric ${mod_version}+mc${minecraft_version}"
displayName = "[FABRIC][${minecraft_version}] ${project.name} ${mod_version}"
modLoaders.add("fabric")
}

def forgeOptions = publishOptions {
file = project.provider { project(":forge").tasks.remapJar }.flatMap { it.archiveFile }
displayName = "${project.name} Forge ${mod_version}+mc${minecraft_version}"
displayName = "[FORGE][${minecraft_version}] ${project.name} ${mod_version}"
modLoaders.add("forge")
}

Expand Down Expand Up @@ -102,4 +113,4 @@ publishMods {
from(modrinthOptions, forgeOptions)
}
}
}
}
14 changes: 1 addition & 13 deletions common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,8 @@ dependencies {
publishing {
publications {
mavenCommon(MavenPublication) {
artifactId = rootProject.archives_base_name + "-" + project.name
artifactId = "${rootProject.archivesBaseName}-${project.name}"
from components.java
}
}

repositories {
if (ENV.NANITE_TOKEN) {
maven {
url "https://maven.nanite.dev/releases"
credentials {
username = "nanite"
password = "${ENV.NANITE_TOKEN}"
}
}
}
}
}
13 changes: 6 additions & 7 deletions common/src/main/java/com/sunekaer/toolkit/Toolkit.java
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
package com.sunekaer.toolkit;

import com.mojang.brigadier.arguments.ArgumentType;
import com.sunekaer.toolkit.commands.CommandClear;
import com.sunekaer.toolkit.commands.level.ClearCommand;
import com.sunekaer.toolkit.commands.TKCommand;
import com.sunekaer.toolkit.event.PlayerEvents;
import com.sunekaer.toolkit.jobs.ServerTickJobRunner;
import com.sunekaer.toolkit.network.Handler;
import dev.architectury.event.events.common.CommandRegistrationEvent;
import dev.architectury.event.events.common.LifecycleEvent;
import dev.architectury.event.events.common.PlayerEvent;
import net.minecraft.commands.synchronization.ArgumentTypeInfo;
import net.minecraft.commands.synchronization.ArgumentTypeInfos;
import dev.architectury.event.events.common.TickEvent;
import net.minecraft.server.MinecraftServer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand All @@ -21,7 +20,7 @@

public class Toolkit {
private static final Logger LOGGER = LoggerFactory.getLogger(Toolkit.class);
public static final String MODID = "toolkit";
public static final String MOD_ID = "toolkit";

public static final DefaultedValue<Boolean> SHOW_ON_JOIN_MESSAGE = new DefaultedValue<>(true);
public static final DefaultedValue<String> JOIN_MESSAGE = new DefaultedValue<>("Hello from ToolKit, this message can be change or disabled in config.");
Expand All @@ -33,7 +32,7 @@ public static void init() {
Handler.init();
LifecycleEvent.SERVER_STOPPING.register(Toolkit::onServerStopping);
LifecycleEvent.SETUP.register(Toolkit::setup);

TickEvent.SERVER_POST.register((server) -> ServerTickJobRunner.get().onTick(server));
}

// Poor mans basic config system :cry:
Expand Down Expand Up @@ -82,7 +81,7 @@ private static void setup() {
}

private static void onServerStopping(MinecraftServer minecraftServer) {
CommandClear.EXECUTOR.shutdownNow();
ClearCommand.EXECUTOR.shutdownNow();
}

public static class DefaultedValue<T> implements Supplier<T> {
Expand Down
12 changes: 12 additions & 0 deletions common/src/main/java/com/sunekaer/toolkit/ToolkitPlatform.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
package com.sunekaer.toolkit;

import dev.architectury.injectables.annotations.ExpectPlatform;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.tags.TagKey;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.entity.BlockEntity;
import org.jetbrains.annotations.Nullable;

import java.nio.file.Path;
import java.util.List;

public class ToolkitPlatform {
@ExpectPlatform
Expand All @@ -21,4 +28,9 @@ public static TagKey<Block> getOresTag() {
public static Path getGamePath() {
throw new AssertionError();
}

@ExpectPlatform
public static List<ItemStack> getInventoryFromBlockEntity(Level level, BlockPos pos, @Nullable Direction direction) {
throw new AssertionError();
}
}

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 677ce33

Please sign in to comment.