Skip to content

Commit

Permalink
Compiles 1.20 but doesn't run due to mojang fucking up enddragonfight
Browse files Browse the repository at this point in the history
  • Loading branch information
quat1024 committed Jun 10, 2023
1 parent 844593e commit 13751cd
Show file tree
Hide file tree
Showing 71 changed files with 2,355 additions and 40 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ For documentation, view the `docs/2.x/` folder.
Versions prior to 2.5 were developed separately, one codebase per version. Maintaining that was difficult, so everything is now in a giant Gradle subproject. This is also unwieldy but in a different way - if you're having trouble fitting the damn thing into RAM, comment out a few subprojects from `settings.gradle`.

* `core` - Truly version-independent code, only depends on a (slightly old version of) google gson. Lowest-common-denominator code.
* `core-plus-minecraft-1.16-thru-1.19.4` - Code that depends on only the common subset of Minecraft 1.16.5, 1.18.2, 1.19.2, and 1.19.4 (using the [crossroad](https://github.com/CrackedPolishedBlackstoneBricksMC/crossroad) jar intersection tool).
* `core-plus-minecraft-1.16.5-thru-1.20` - Code that depends on only the common subset of Minecraft 1.16.5, 1.18.2, 1.19.2, and 1.19.4 (using the [crossroad](https://github.com/CrackedPolishedBlackstoneBricksMC/crossroad) jar intersection tool).
* `common-xxx` - Allows accessing Minecraft (through [minivan](https://github.com/CrackedPolishedBlackstoneBricksMC/minivan), formerly [VanillaGradle](https://github.com/SpongePowered/VanillaGradle)) and writing the code of mixins. Contains glue between the version-independent core and the Minecraft version in question.
* Technically `core-plus-minecraft` can also write mixins, but IDE support is weak; my intersection tool currently doesn't emit method bodies
* `fabric-xxx` and `forge-xxx` - Can refer to Minecraft as well as features from the specific modloader. This is generally just a tiny bit of glue code, initialization using modloader services, platform-specific mixins, blah blah.
Expand Down
6 changes: 3 additions & 3 deletions common-1.16.5/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ buildscript {
}

evaluationDependsOn(":core") // fuck gradle episode 151905105
evaluationDependsOn(":core-plus-minecraft-1.16-thru-1.19.4") // fuck gradle episode 151905105
evaluationDependsOn(":core-plus-minecraft-1.16.5-thru-1.20") // fuck gradle episode 151905105

apply plugin: "java"
apply plugin: "agency.highlysuspect.minivan"
Expand Down Expand Up @@ -41,12 +41,12 @@ dependencies {
compileOnly "org.jetbrains:annotations:24.0.1"

implementation project(":core")
implementation project(":core-plus-minecraft-1.16-thru-1.19.4")
implementation project(":core-plus-minecraft-1.16.5-thru-1.20")
}

processResources {
from project(":core").sourceSets.main.resources
from project(":core-plus-minecraft-1.16-thru-1.19.4").sourceSets.main.resources
from project(":core-plus-minecraft-1.16.5-thru-1.20").sourceSets.main.resources
}

tasks.withType(GenerateModuleMetadata) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,19 @@
import agency.highlysuspect.apathy.core.CoreGenOptions;
import agency.highlysuspect.apathy.core.wrapper.Attacker;
import agency.highlysuspect.apathy.core.wrapper.AttackerTag;
import agency.highlysuspect.apathy.core.wrapper.AttackerType;
import agency.highlysuspect.apathy.core.wrapper.DragonDuck;
import agency.highlysuspect.apathy.coreplusminecraft.ApathyPlusMinecraft;
import agency.highlysuspect.apathy.coreplusminecraft.PlayerSetManagerGuts;
import com.mojang.brigadier.context.CommandContext;
import net.minecraft.commands.CommandSourceStack;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Registry;
import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.ComponentUtils;
import net.minecraft.network.chat.TextComponent;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.tags.Tag;
import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.world.effect.MobEffect;
Expand Down Expand Up @@ -91,6 +93,16 @@ public void explodeNoBlockInteraction(Level level, Entity who, double x, double
level.explode(who, x, y, z, strength, Explosion.BlockInteraction.NONE);
}

@Override
public void sendSuccess(CommandContext<CommandSourceStack> cmd, Component message, boolean impersonal) {
cmd.getSource().sendSuccess(message, impersonal);
}

@Override
public ServerLevel serverLevel(Entity ent) {
return (ServerLevel) ent.level;
}

public void noticePlayerAttack(Player player, Entity provoked) {
Level level = player.level;
if(level.isClientSide) return;
Expand Down
6 changes: 3 additions & 3 deletions common-1.18.2/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ buildscript {
}

evaluationDependsOn(":core") // fuck gradle episode 151905105
evaluationDependsOn(":core-plus-minecraft-1.16-thru-1.19.4") // fuck gradle episode 151905105
evaluationDependsOn(":core-plus-minecraft-1.16.5-thru-1.20") // fuck gradle episode 151905105

apply plugin: "java"
apply plugin: "agency.highlysuspect.minivan"
Expand Down Expand Up @@ -40,12 +40,12 @@ dependencies {
compileOnly "org.jetbrains:annotations:24.0.1"

implementation project(":core")
implementation project(":core-plus-minecraft-1.16-thru-1.19.4")
implementation project(":core-plus-minecraft-1.16.5-thru-1.20")
}

processResources {
from project(":core").sourceSets.main.resources
from project(":core-plus-minecraft-1.16-thru-1.19.4").sourceSets.main.resources
from project(":core-plus-minecraft-1.16.5-thru-1.20").sourceSets.main.resources
}

tasks.withType(GenerateModuleMetadata) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@
import agency.highlysuspect.apathy.core.wrapper.DragonDuck;
import agency.highlysuspect.apathy.coreplusminecraft.ApathyPlusMinecraft;
import agency.highlysuspect.apathy.coreplusminecraft.PlayerSetManagerGuts;
import com.mojang.brigadier.context.CommandContext;
import net.minecraft.commands.CommandSourceStack;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Registry;
import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.ComponentUtils;
import net.minecraft.network.chat.TextComponent;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.tags.TagKey;
import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.world.effect.MobEffect;
Expand Down Expand Up @@ -88,6 +91,16 @@ public void explodeNoBlockInteraction(Level level, Entity who, double x, double
level.explode(who, x, y, z, strength, Explosion.BlockInteraction.NONE);
}

@Override
public void sendSuccess(CommandContext<CommandSourceStack> cmd, Component message, boolean impersonal) {
cmd.getSource().sendSuccess(message, impersonal);
}

@Override
public ServerLevel serverLevel(Entity ent) {
return (ServerLevel) ent.level;
}

public void noticePlayerAttack(Player player, Entity provoked) {
Level level = player.level;
if(level.isClientSide) return;
Expand Down
4 changes: 2 additions & 2 deletions common-1.19.2-begrudgingly/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ dependencies {
compileOnly "org.jetbrains:annotations:24.0.1"

implementation project(":core")
implementation project(":core-plus-minecraft-1.16-thru-1.19.4")
implementation project(":core-plus-minecraft-1.16.5-thru-1.20")
}

processResources {
from project(":core").sourceSets.main.resources
from project(":core-plus-minecraft-1.16-thru-1.19.4").sourceSets.main.resources
from project(":core-plus-minecraft-1.16.5-thru-1.20").sourceSets.main.resources
}

tasks.withType(GenerateModuleMetadata) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
import agency.highlysuspect.apathy.coreplusminecraft.ApathyPlusMinecraft;
import agency.highlysuspect.apathy.coreplusminecraft.MinecraftConv;
import agency.highlysuspect.apathy.coreplusminecraft.PlayerSetManagerGuts;
import com.mojang.brigadier.context.CommandContext;
import net.minecraft.commands.CommandSourceStack;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Registry;
import net.minecraft.network.chat.Component;
Expand Down Expand Up @@ -93,6 +95,16 @@ public void explodeNoBlockInteraction(Level level, Entity who, double x, double
level.explode(who, x, y, z, strength, Explosion.BlockInteraction.NONE);
}

@Override
public void sendSuccess(CommandContext<CommandSourceStack> cmd, Component message, boolean impersonal) {
cmd.getSource().sendSuccess(message, impersonal);
}

@Override
public ServerLevel serverLevel(Entity ent) {
return (ServerLevel) ent.level;
}

public void noticePlayerAttack(Player player, Entity provoked) {
Level level = player.level;
if(level.isClientSide) return;
Expand Down
4 changes: 2 additions & 2 deletions common-1.19.4/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ dependencies {
compileOnly "org.jetbrains:annotations:24.0.1"

implementation project(":core")
implementation project(":core-plus-minecraft-1.16-thru-1.19.4")
implementation project(":core-plus-minecraft-1.16.5-thru-1.20")
}

processResources {
from project(":core").sourceSets.main.resources
from project(":core-plus-minecraft-1.16-thru-1.19.4").sourceSets.main.resources
from project(":core-plus-minecraft-1.16.5-thru-1.20").sourceSets.main.resources
}

tasks.withType(GenerateModuleMetadata) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
import agency.highlysuspect.apathy.coreplusminecraft.ApathyPlusMinecraft;
import agency.highlysuspect.apathy.coreplusminecraft.MinecraftConv;
import agency.highlysuspect.apathy.coreplusminecraft.PlayerSetManagerGuts;
import com.mojang.brigadier.context.CommandContext;
import net.minecraft.commands.CommandSourceStack;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Registry;
import net.minecraft.core.registries.BuiltInRegistries;
Expand Down Expand Up @@ -93,6 +95,16 @@ public void explodeNoBlockInteraction(Level level, Entity who, double x, double
level.explode(who, x, y, z, strength, Level.ExplosionInteraction.NONE);
}

@Override
public void sendSuccess(CommandContext<CommandSourceStack> cmd, Component message, boolean impersonal) {
cmd.getSource().sendSuccess(message, impersonal);
}

@Override
public ServerLevel serverLevel(Entity ent) {
return (ServerLevel) ent.level;
}

public void noticePlayerAttack(Player player, Entity provoked) {
Level level = player.level;
if(level.isClientSide) return;
Expand Down
50 changes: 50 additions & 0 deletions common-1.20.0/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
buildscript {
repositories {
maven { url = "https://maven.fabricmc.net/"}
maven { url = "https://repo.sleeping.town/" }
gradlePluginPortal()
}
dependencies {
classpath "agency.highlysuspect:minivan:0.2"
}
}

apply plugin: "java"
apply plugin: "agency.highlysuspect.minivan"

archivesBaseName = "${project.modId}-common-1.20.0"

java.toolchain.languageVersion = JavaLanguageVersion.of(17)
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
options.release = 17
}
java.withSourcesJar()

minivan {
version("1.20")
}

repositories {
maven {
url = "https://repo.spongepowered.org/repository/maven-public/"
content { includeGroup "org.spongepowered" }
}
}

dependencies {
compileOnly "org.spongepowered:mixin:0.8.5"
compileOnly "org.jetbrains:annotations:24.0.1"

implementation project(":core")
implementation project(":core-plus-minecraft-1.16.5-thru-1.20")
}

processResources {
from project(":core").sourceSets.main.resources
from project(":core-plus-minecraft-1.16.5-thru-1.20").sourceSets.main.resources
}

tasks.withType(GenerateModuleMetadata) {
enabled = false
}
Loading

0 comments on commit 13751cd

Please sign in to comment.