Merge remote-tracking branch 'origin/1.20' into dev/1.20.2
This commit is contained in:
commit
42688757a7
10
build.gradle
10
build.gradle
|
|
@ -177,17 +177,19 @@ tasks.withType(JavaCompile) {
|
||||||
|
|
||||||
task generateChangelog(type: se.bjurr.gitchangelog.plugin.gradle.GitChangelogTask) {
|
task generateChangelog(type: se.bjurr.gitchangelog.plugin.gradle.GitChangelogTask) {
|
||||||
def details = versionDetails();
|
def details = versionDetails();
|
||||||
|
def theVersionRef
|
||||||
if(details.commitDistance > 0) {
|
if(details.commitDistance > 0) {
|
||||||
fromRef = details.lastTag;
|
theVersionRef = details.lastTag;
|
||||||
} else {
|
} else {
|
||||||
def secondLastTagCmd = "git describe --abbrev=0 " + details.lastTag + "^"
|
def secondLastTagCmd = "git describe --abbrev=0 " + details.lastTag + "^"
|
||||||
def secondLastTag = secondLastTagCmd.execute().text.trim()
|
def secondLastTag = secondLastTagCmd.execute().text.trim()
|
||||||
fromRef = secondLastTag;
|
theVersionRef = secondLastTag;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fromRef = theVersionRef
|
||||||
|
|
||||||
file = new File("CHANGELOG.md");
|
file = new File("CHANGELOG.md");
|
||||||
def otherTemplateContent = new File('gradle/changelog.mustache').getText('UTF-8');
|
templateContent = new File('gradle/changelog.mustache').getText('UTF-8').replace("[[modernFixVersionRef]]", theVersionRef);
|
||||||
templateContent = "## Changes since " + fromRef + "\n" + otherTemplateContent;
|
|
||||||
toCommit = "HEAD";
|
toCommit = "HEAD";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,83 +17,37 @@ import java.util.function.Consumer;
|
||||||
public interface ModernFixPlatformHooks {
|
public interface ModernFixPlatformHooks {
|
||||||
ModernFixPlatformHooks INSTANCE = PlatformHookLoader.findInstance();
|
ModernFixPlatformHooks INSTANCE = PlatformHookLoader.findInstance();
|
||||||
|
|
||||||
default boolean isClient() {
|
boolean isClient();
|
||||||
throw new AssertionError();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
default boolean isDedicatedServer() {
|
boolean isDedicatedServer();
|
||||||
throw new AssertionError();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
default String getVersionString() {
|
String getVersionString();
|
||||||
throw new AssertionError();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
boolean modPresent(String modId);
|
||||||
|
|
||||||
default boolean modPresent(String modId) {
|
boolean isDevEnv();
|
||||||
throw new AssertionError();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
void injectPlatformSpecificHacks();
|
||||||
default boolean isDevEnv() {
|
|
||||||
throw new AssertionError();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
void applyASMTransformers(String mixinClassName, ClassNode targetClass);
|
||||||
default void injectPlatformSpecificHacks() {
|
|
||||||
throw new AssertionError();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
MinecraftServer getCurrentServer();
|
||||||
default void applyASMTransformers(String mixinClassName, ClassNode targetClass) {
|
|
||||||
throw new AssertionError();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
boolean isEarlyLoadingNormally();
|
||||||
default MinecraftServer getCurrentServer() {
|
|
||||||
throw new AssertionError();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
boolean isLoadingNormally();
|
||||||
default boolean isEarlyLoadingNormally() {
|
|
||||||
throw new AssertionError();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
Path getGameDirectory();
|
||||||
default boolean isLoadingNormally() {
|
|
||||||
throw new AssertionError();
|
|
||||||
}
|
|
||||||
|
|
||||||
default Path getGameDirectory() {
|
void sendPacket(ServerPlayer player, Object packet);
|
||||||
throw new AssertionError();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
Multimap<String, String> getCustomModOptions();
|
||||||
default void sendPacket(ServerPlayer player, Object packet) {
|
|
||||||
throw new AssertionError();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
void onServerCommandRegister(Consumer<CommandDispatcher<CommandSourceStack>> handler);
|
||||||
default void onServerCommandRegister(Consumer<CommandDispatcher<CommandSourceStack>> handler) {
|
|
||||||
throw new AssertionError();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
void onLaunchComplete();
|
||||||
default Multimap<String, String> getCustomModOptions() {
|
|
||||||
throw new AssertionError();
|
|
||||||
}
|
|
||||||
|
|
||||||
default void registerCreativeSearchTrees(SearchRegistry registry, SearchRegistry.TreeBuilderSupplier<ItemStack> nameSupplier, SearchRegistry.TreeBuilderSupplier<ItemStack> tagSupplier, BiConsumer<SearchRegistry.Key<ItemStack>, List<ItemStack>> populator) {
|
void registerCreativeSearchTrees(SearchRegistry registry, SearchRegistry.TreeBuilderSupplier<ItemStack> nameSupplier, SearchRegistry.TreeBuilderSupplier<ItemStack> tagSupplier, BiConsumer<SearchRegistry.Key<ItemStack>, List<ItemStack>> populator);
|
||||||
throw new AssertionError();
|
|
||||||
}
|
|
||||||
|
|
||||||
default void onLaunchComplete() {
|
|
||||||
throw new AssertionError();
|
|
||||||
}
|
|
||||||
|
|
||||||
default String getPlatformName() {
|
String getPlatformName();
|
||||||
throw new AssertionError();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,15 +4,16 @@ import net.minecraft.client.gui.components.DebugScreenOverlay;
|
||||||
import org.embeddedt.modernfix.ModernFixClientFabric;
|
import org.embeddedt.modernfix.ModernFixClientFabric;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.injection.At;
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
import org.spongepowered.asm.mixin.injection.Inject;
|
import org.spongepowered.asm.mixin.injection.ModifyVariable;
|
||||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Mixin(DebugScreenOverlay.class)
|
@Mixin(DebugScreenOverlay.class)
|
||||||
public class GuiMixin {
|
public class GuiMixin {
|
||||||
@Inject(method = "getGameInformation", at = @At("RETURN"))
|
@ModifyVariable(method = "getSystemInformation", at = @At("STORE"), ordinal = 0, require = 0)
|
||||||
private void addModernFix(CallbackInfoReturnable<List<String>> cir) {
|
private List<String> addModernFix(List<String> list) {
|
||||||
cir.getReturnValue().add(ModernFixClientFabric.commonMod.brandingString);
|
list.add("");
|
||||||
|
list.add(ModernFixClientFabric.commonMod.brandingString);
|
||||||
|
return list;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,9 @@ import net.minecraftforge.fml.util.ObfuscationReflectionHelper;
|
||||||
import org.embeddedt.modernfix.ModernFixClient;
|
import org.embeddedt.modernfix.ModernFixClient;
|
||||||
import org.embeddedt.modernfix.screen.ModernFixConfigScreen;
|
import org.embeddedt.modernfix.screen.ModernFixConfigScreen;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class ModernFixClientForge {
|
public class ModernFixClientForge {
|
||||||
private static ModernFixClient commonMod;
|
private static ModernFixClient commonMod;
|
||||||
|
|
||||||
|
|
@ -48,11 +51,27 @@ public class ModernFixClientForge {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static final List<String> brandingList = new ArrayList<>();
|
||||||
|
|
||||||
@SubscribeEvent(priority = EventPriority.HIGHEST)
|
@SubscribeEvent(priority = EventPriority.HIGHEST)
|
||||||
public void onRenderOverlay(CustomizeGuiOverlayEvent.DebugText event) {
|
public void onRenderOverlay(CustomizeGuiOverlayEvent.DebugText event) {
|
||||||
if(commonMod.brandingString != null && Minecraft.getInstance().options.renderDebug) {
|
if(commonMod.brandingString != null && Minecraft.getInstance().options.renderDebug) {
|
||||||
event.getLeft().add("");
|
if(brandingList.size() == 0) {
|
||||||
event.getLeft().add(commonMod.brandingString);
|
brandingList.add("");
|
||||||
|
brandingList.add(commonMod.brandingString);
|
||||||
|
}
|
||||||
|
int targetIdx = 0, numSeenBlanks = 0;
|
||||||
|
List<String> right = event.getRight();
|
||||||
|
while(targetIdx < right.size()) {
|
||||||
|
String s = right.get(targetIdx);
|
||||||
|
if(s == null || s.length() == 0) {
|
||||||
|
numSeenBlanks++;
|
||||||
|
}
|
||||||
|
if(numSeenBlanks == 3)
|
||||||
|
break;
|
||||||
|
targetIdx++;
|
||||||
|
}
|
||||||
|
right.addAll(targetIdx, brandingList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,7 @@
|
||||||
|
Depending on the size of this release, there may be a human-readable changelog available on [the wiki page](https://github.com/embeddedt/ModernFix/wiki/Changelog).
|
||||||
|
|
||||||
|
## Changes since [[modernFixVersionRef]]
|
||||||
|
|
||||||
{{#commits}}
|
{{#commits}}
|
||||||
{{#ifMatches messageTitle "^(?!Merge).*"}}
|
{{#ifMatches messageTitle "^(?!Merge).*"}}
|
||||||
* [{{{messageTitle}}}](https://github.com/embeddedt/ModernFix/commit/{{hashFull}}) - {{{authorName}}}
|
* [{{{messageTitle}}}](https://github.com/embeddedt/ModernFix/commit/{{hashFull}}) - {{{authorName}}}
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,2 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
git ls-remote --heads origin | awk '{print $2}' | sed 's:.*/::' | sort -V | grep -E '^1\.[0-9]*(\.[0-9]*)?$'
|
git ls-remote --heads origin | awk '{print $2}' | grep -E '^refs/heads/1\.' | sed 's:.*/::' | sort -V | grep -E '^1\.[0-9]*(\.[0-9]*)?$'
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user