Skip to content

Commit

Permalink
Make Blame not say servers modlist are incompatible when client with …
Browse files Browse the repository at this point in the history
…Blame connects to server without Blame.
  • Loading branch information
TelepathicGrunt committed Jan 19, 2021
1 parent 3a3c141 commit fb36629
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,17 @@ Gotta blame the broken mods!
------------------------------------------------
| Blame Forge changelog |
(V.1.9.1 Changes) (1.16.2/1.16.3/1.16.4 Minecraft)

Misc:
• Make Blame not say servers modlist are incompatible when client with Blame connects to server without Blame.
Clients with Blame could still connect to said servers just fine tho.

(V.1.9.0 Changes) (1.16.2/1.16.3/1.16.4 Minecraft)

JSON file on world loading:
Added extra info about missing block properties from broken ConfiguredFeatures files to help modders fix them better.
• Added extra info about missing block properties from broken ConfiguredFeatures files to help modders fix them better.

Template Pools:
• Will now detect and print out if a mod or datapack has a pool element with an insanely high weight that is eating up all the RAM.
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Sets default memory used for gradle commands. Can be overridden by user or command line properties.
# This is required to provide enough memory for the Minecraft decompilation process.
# This is required to provide enough me1ory for the Minecraft decompilation process.
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false
mod_version=1.9.0
mod_version=1.9.1
modid=blame
mc_version=1.16.4
forge_version=35.0.18
Expand Down
12 changes: 11 additions & 1 deletion src/main/java/com/telepathicgrunt/blame/Blame.java
Original file line number Diff line number Diff line change
@@ -1,24 +1,34 @@
package com.telepathicgrunt.blame;

import net.minecraftforge.fml.ExtensionPoint;
import net.minecraftforge.fml.ModList;
import net.minecraftforge.fml.ModLoadingContext;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.network.FMLNetworkConstants;
import org.apache.commons.lang3.tuple.Pair;
import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import java.util.function.BiPredicate;
import java.util.function.Supplier;

@Mod(Blame.MODID)
public class Blame
{
public static final String MODID = "blame";
public static final Logger LOGGER = LogManager.getLogger();
public static String VERSION = "1.9.0";
public static String VERSION = "1.9.1";

public Blame() {
ModList.get().getModContainerById(Blame.MODID)
.ifPresent(container -> VERSION = container.getModInfo().getVersion().toString());

Blame.LOGGER.log(Level.ERROR, "Blame "+VERSION+" initialized");

ModLoadingContext.get().registerExtensionPoint(ExtensionPoint.DISPLAYTEST,
() -> Pair.of(() -> FMLNetworkConstants.IGNORESERVERONLY, (a, b) -> true));

// Test detecting dispenser registry replacements
// DispenserBlock.registerDispenseBehavior(Items.HONEY_BOTTLE, new DefaultDispenseItemBehavior());

Expand Down

0 comments on commit fb36629

Please sign in to comment.