9
0
mirror of https://github.com/BX-Team/DivineMC.git synced 2025-12-22 16:29:23 +00:00

some minecraft fixes

This commit is contained in:
NONPLAYT
2025-07-24 13:55:04 +03:00
parent 836fb16210
commit 4e021c3cfd
15 changed files with 121 additions and 76 deletions

View File

@@ -545,8 +545,12 @@ public class DivineConfig {
public static boolean forceMinecraftCommand = false;
public static boolean disableLeafDecay = false;
// Bug fixes (MC-*)
public static boolean slopesVisualFix = false;
// MC Bug fixes
public static boolean fixMc258859 = false;
public static boolean fixMc200418 = false;
public static boolean fixMc2025 = false;
public static boolean fixMc94054 = false;
public static boolean fixMc183990 = false;
public static void load() {
gameplayFixes();
@@ -572,8 +576,21 @@ public class DivineConfig {
}
private static void bugFixes() {
slopesVisualFix = getBoolean(ConfigCategory.FIXES.key("bug.fix-mc-258859"), slopesVisualFix,
"Fixes MC-258859, fixing slopes visual bug in biomes like Snowy Slopes, Frozen Peaks, Jagged Peaks, and including Terralith.");
fixMc258859 = getBoolean(ConfigCategory.FIXES.key("bug.fix-mc-258859"), fixMc258859,
"Fixes MC-258859: https://bugs.mojang.com/browse/MC-258859",
"Fixes slopes visual bug in biomes like Snowy Slopes, Frozen Peaks, Jagged Peaks, and including Terralith.");
fixMc200418 = getBoolean(ConfigCategory.FIXES.key("bug.fix-mc-200418"), fixMc200418,
"Fixes MC-200418: https://bugs.mojang.com/browse/MC-200418",
"Baby zombie villagers stay as jockey variant.");
fixMc2025 = getBoolean(ConfigCategory.FIXES.key("bug.fix-mc-2025"), fixMc2025,
"Fixes MC-2025: https://bugs.mojang.com/browse/MC-2025",
"Mobs going out of fenced areas/suffocate in blocks when loading chunks.");
fixMc94054 = getBoolean(ConfigCategory.FIXES.key("bug.fix-mc-94054"), fixMc94054,
"Fixes MC-94054: https://bugs.mojang.com/browse/MC-94054",
"Cave spiders spin around when walking.");
fixMc183990 = getBoolean(ConfigCategory.FIXES.key("bug.fix-mc-183990"), fixMc183990,
"Fixes MC-183990: https://bugs.mojang.com/browse/MC-183990",
"AI of some mobs breaks when their target dies.");
}
}

View File

@@ -62,7 +62,8 @@ public class DivineWorldConfig {
public boolean allowTripwireDupe = false;
private void unsupportedFeatures() {
allowEntityPortalWithPassenger = getBoolean("unsupported-features.allow-entity-portal-with-passenger", allowEntityPortalWithPassenger,
"Enables or disables the fix of MC-67 bug: https://bugs-legacy.mojang.com/browse/MC-67");
"Fixes MC-67: https://bugs-legacy.mojang.com/browse/MC-67",
"Entities with passengers cannot travel through portals");
allowTripwireDupe = getBoolean("unsupported-features.allow-tripwire-dupe", allowTripwireDupe,
"Bring back MC-59471, MC-129055 on 1.21.2+, which fixed in 1.21.2 snapshots 24w33a and 24w36a");
}

View File

@@ -0,0 +1,16 @@
package org.bxteam.divinemc.util;
import com.mojang.serialization.Codec;
import net.minecraft.Util;
import net.minecraft.world.phys.AABB;
import java.util.List;
public interface Codecs {
Codec<AABB> AABB_CODEC = Codec.DOUBLE
.listOf()
.comapFlatMap(
list -> Util.fixedSize(list, 6).map(listx -> new AABB(listx.getFirst(), listx.get(1), listx.get(2), listx.get(3), listx.get(4), listx.get(5))),
aabb -> List.of(aabb.minX, aabb.minY, aabb.minZ, aabb.maxX, aabb.maxY, aabb.maxZ)
);
}