Skip to content

Commit

Permalink
Update to 1.20.5
Browse files Browse the repository at this point in the history
  • Loading branch information
senseiwells committed Apr 28, 2024
1 parent 3b2c710 commit 52ded92
Show file tree
Hide file tree
Showing 57 changed files with 923 additions and 907 deletions.
16 changes: 9 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id "maven-publish"
id "fabric-loom" version "1.4-SNAPSHOT"
id 'me.modmuss50.mod-publish-plugin' version '0.3.4'
id "fabric-loom" version "1.6-SNAPSHOT"
id 'me.modmuss50.mod-publish-plugin' version '0.5.1'
}

repositories {
Expand All @@ -21,9 +21,12 @@ repositories {
maven {
url 'https://www.cursemaven.com'
}
maven {
url = "https://api.modrinth.com/maven"
}
}

version = project.minecraft_version + "-" + project.mod_version
version = "${mod_version}+mc${minecraft_version}"
group = project.maven_group

//configurations.configureEach {
Expand All @@ -37,7 +40,7 @@ dependencies {
mappings "net.fabricmc:yarn:${yarn_mappings}:v2"
modImplementation "net.fabricmc:fabric-loader:${loader_version}"

modImplementation "com.github.gnembon:fabric-carpet:${carpet_version}"
modImplementation "com.github.senseiwells:fabric-carpet:${carpet_version}"
modImplementation "com.terraformersmc:modmenu:${modmenu_version}"

// Required for Arucas
Expand All @@ -46,8 +49,7 @@ dependencies {
include implementation("com.github.senseiwells:Arucas:${arucas}")
include implementation("net.bytebuddy:byte-buddy:${bytebuddy_version}")

// Mixin Extras
//include implementation(annotationProcessor("com.github.llamalad7.mixinextras:mixinextras-fabric:${mixin_extras_version}"))
modCompileOnly "maven.modrinth:essentialaddons:1.4.1+mc1.20.5"

// Runtime Fabric API
modImplementation "net.fabricmc.fabric-api:fabric-api:${fabric_version}"
Expand All @@ -62,7 +64,7 @@ processResources {
filesMatching("fabric.mod.json") {
def map = [
"version" : mod_version,
"carpet_dependency" : ">=" + carpet_version,
// "carpet_dependency" : ">=" + carpet_version,
"minecraft_dependency": minecraft_dependency
]
expand map
Expand Down
16 changes: 8 additions & 8 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ systemProp.org.gradle.internal.http.socketTimeout=180000
# Done to increase the memory available to gradle.
org.gradle.jvmargs=-Xmx4G
# Fabric Properties
minecraft_version=1.20.4
yarn_mappings=1.20.4+build.1
loader_version=0.15.0
minecraft_version=1.20.5
yarn_mappings=1.20.5+build.1
loader_version=0.15.10
# Mod Properties
mod_version=1.4.2
mod_version=1.5.0
maven_group=essential-client
# Dependencies
carpet_version=1.4.128
fabric_version=0.91.1+1.20.4
modmenu_version=9.0.0-pre.1
carpet_version=8639fa9d957bc41d205280017ffe325093c924ad
fabric_version=0.97.6+1.20.5
modmenu_version=10.0.0-beta.1
arucas_version=d4a71bde0640e678a75795a156d9d38aad4c6f30
bytebuddy_version=1.14.11
minecraft_dependency=1.20.x
minecraft_dependency=1.20.x
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
import me.senseiwells.essentialclient.feature.CraftingSharedConstants;
import me.senseiwells.essentialclient.feature.GameRuleNetworkHandler;
import me.senseiwells.essentialclient.feature.chunkdebug.ChunkClientNetworkHandler;
import me.senseiwells.essentialclient.feature.chunkdebug.ChunkGrid;
import me.senseiwells.essentialclient.feature.keybinds.ClientKeyBinds;
import me.senseiwells.essentialclient.rule.ClientRules;
import me.senseiwells.essentialclient.utils.EssentialUtils;
import me.senseiwells.essentialclient.utils.clientscript.ClientScriptUtils;
import me.senseiwells.essentialclient.utils.clientscript.ClientTickSyncer;
import me.senseiwells.essentialclient.utils.clientscript.MinecraftDeobfuscator;
import me.senseiwells.essentialclient.utils.clientscript.ScriptNetworkHandler;
import me.senseiwells.essentialclient.utils.config.Config;
import me.senseiwells.essentialclient.utils.config.ConfigClientNick;
import me.senseiwells.essentialclient.utils.config.ConfigPlayerClient;
Expand All @@ -33,7 +33,6 @@
public class EssentialClient implements ModInitializer, CarpetExtension {
public static final ChunkClientNetworkHandler CHUNK_NET_HANDLER;
public static final GameRuleNetworkHandler GAME_RULE_NET_HANDLER;
public static final ScriptNetworkHandler SCRIPT_NET_HANDLER;

public static final Logger LOGGER;
public static final LocalDateTime START_TIME;
Expand All @@ -45,7 +44,6 @@ public class EssentialClient implements ModInitializer, CarpetExtension {
LOGGER = LogManager.getLogger("EssentialClient");
CHUNK_NET_HANDLER = new ChunkClientNetworkHandler();
GAME_RULE_NET_HANDLER = new GameRuleNetworkHandler();
SCRIPT_NET_HANDLER = new ScriptNetworkHandler();
START_TIME = LocalDateTime.now();
VERSION = EssentialUtils.getEssentialVersion();
NETWORK_HANDLERS = new LinkedHashSet<>();
Expand All @@ -57,12 +55,13 @@ public class EssentialClient implements ModInitializer, CarpetExtension {

NETWORK_HANDLERS.add(CHUNK_NET_HANDLER);
NETWORK_HANDLERS.add(GAME_RULE_NET_HANDLER);
NETWORK_HANDLERS.add(SCRIPT_NET_HANDLER);
}

@Override
public void onInitialize() {
CarpetServer.manageExtension(CarpetClient.INSTANCE);
NETWORK_HANDLERS.forEach(NetworkHandler::registerCustomPayloads);

// Run async for faster boot, saves ~2000ms on my machine
new Thread(() -> {
CONFIG_SET.forEach(Config::readConfig);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ private Object getBlockNbt(Arguments arguments) {
ScriptBlockState blockState = this.ensurePosition(arguments);
BlockEntity blockEntity = EssentialUtils.getWorld().getBlockEntity(blockState.pos);
if (blockEntity != null) {
NbtCompound compound = blockEntity.createNbt();
NbtCompound compound = blockEntity.createNbt(EssentialUtils.getWorld().getRegistryManager());
return ClientScriptUtils.nbtToMap(arguments.getInterpreter(), compound, 10);
}
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ public List<MemberFunction> defineMethods() {
MemberFunction.of("getNbt", this::getNbt),
MemberFunction.of("getTranslatedName", this::getTranslatedName),
MemberFunction.of("getHitbox", this::getHitbox),
MemberFunction.of("collidesWith", 2, this::collidesWithBlockAtPos),
MemberFunction.of("canSpawnAt", 1, this::canSpawnPos)
MemberFunction.of("collidesWith", 2, this::collidesWithBlockAtPos)
// MemberFunction.of("canSpawnAt", 1, this::canSpawnPos)
);
}

Expand Down Expand Up @@ -607,18 +607,18 @@ private boolean collidesWithBlockAtPos(Arguments arguments) {
return entity.collidesWithStateAtPos(pos.getBlockPos(), block.state);
}

@FunctionDoc(
name = "canSpawnAt",
desc = "This checks whether the entity can spawn at given position with regard to light and hitbox",
params = {
@ParameterDoc(type = PosDef.class, name = "pos", desc = "the position to check")
},
returns = @ReturnDoc(type = BooleanDef.class, desc = "whether entity type can spawn at given position"),
examples = "entity.canSpawnAt(new Pos(0,0,0));"
)
private boolean canSpawnPos(Arguments arguments) {
Entity entity = arguments.nextPrimitive(this);
ScriptPos pos = arguments.nextPrimitive(PosDef.class);
return EssentialUtils.canSpawn(EssentialUtils.getWorld(), pos.getBlockPos(), entity.getType());
}
// @FunctionDoc(
// name = "canSpawnAt",
// desc = "This checks whether the entity can spawn at given position with regard to light and hitbox",
// params = {
// @ParameterDoc(type = PosDef.class, name = "pos", desc = "the position to check")
// },
// returns = @ReturnDoc(type = BooleanDef.class, desc = "whether entity type can spawn at given position"),
// examples = "entity.canSpawnAt(new Pos(0,0,0));"
// )
// private boolean canSpawnPos(Arguments arguments) {
// Entity entity = arguments.nextPrimitive(this);
// ScriptPos pos = arguments.nextPrimitive(PosDef.class);
// return EssentialUtils.canSpawn(EssentialUtils.getWorld(), pos.getBlockPos(), entity.getType());
// }
}
Loading

0 comments on commit 52ded92

Please sign in to comment.