Skip to content

Commit 4c189f8

Browse files
Merge pull request #387 from lonefelidae16/port/1.21.4
Port to 1.21.4
2 parents 2275b18 + f3b8b63 commit 4c189f8

File tree

165 files changed

+1055
-1276
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

165 files changed

+1055
-1276
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugins {
2-
id 'fabric-loom' version '1.7-SNAPSHOT'
2+
id 'fabric-loom' version '1.9-SNAPSHOT'
33
id 'maven-publish'
44
}
55

gradle.properties

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
org.gradle.jvmargs=-Xmx2048m
22
# Fabric Properties
33
# check these on https://fabricmc.net/develop/
4-
minecraft_version=1.21
5-
yarn_mappings=1.21+build.9
6-
loader_version=0.15.11
4+
minecraft_version=1.21.4
5+
yarn_mappings=1.21.4+build.1
6+
loader_version=0.16.9
77

88
# Mod Properties
99
mod_version = 1.10.1
1010
maven_group = me.juancarloscp52
1111
archives_base_name = bedrockify
1212

1313
# Dependencies
14-
fabric_version=0.102.0+1.21
15-
modmenu_version=11.0.1
16-
cloth_config_version=15.0.128
17-
apple_skin=mc1.21-3.0.5
18-
dab_version=2.6.3+1.21-fabric
14+
fabric_version=0.111.0+1.21.4
15+
modmenu_version=13.0.0-beta.1
16+
cloth_config_version=17.0.142
17+
apple_skin=mc1.21.3-3.0.6
18+
dab_version=2.6.3+1.21.3-fabric
1919
iris_version=1.7.1+1.21
2020
sodium_version=mc1.20.1-0.5.10

gradle/wrapper/gradle-wrapper.jar

130 Bytes
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

gradlew

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
# See the License for the specific language governing permissions and
1616
# limitations under the License.
1717
#
18+
# SPDX-License-Identifier: Apache-2.0
19+
#
1820

1921
##############################################################################
2022
#
@@ -55,7 +57,7 @@
5557
# Darwin, MinGW, and NonStop.
5658
#
5759
# (3) This script is generated from the Groovy template
58-
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
60+
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
5961
# within the Gradle project.
6062
#
6163
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -84,7 +86,8 @@ done
8486
# shellcheck disable=SC2034
8587
APP_BASE_NAME=${0##*/}
8688
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
87-
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
89+
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
90+
' "$PWD" ) || exit
8891

8992
# Use the maximum available, or set MAX_FD != -1 to use that value.
9093
MAX_FD=maximum

gradlew.bat

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
@rem See the License for the specific language governing permissions and
1414
@rem limitations under the License.
1515
@rem
16+
@rem SPDX-License-Identifier: Apache-2.0
17+
@rem
1618

1719
@if "%DEBUG%"=="" @echo off
1820
@rem ##########################################################################

recipeReplacer1_21_4.py

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
#!/usr/bin/python3
2+
3+
""" Recipe Replacer for Minecraft 1.21.4
4+
Created at Dec 12, 2024 by lonefelidae16 <[email protected]>
5+
6+
Usage:
7+
> recipeReplacer1_21_4.py [--help | -h] [--test | -t] /path/to/target/recipe.json
8+
9+
"""
10+
11+
import json
12+
import sys
13+
import argparse
14+
15+
parser = argparse.ArgumentParser(
16+
prog='RecipeReplacer',
17+
description='Make recipe.json compatible with MC1.21.4')
18+
parser.add_argument('filename')
19+
parser.add_argument('-t', '--test', action='store_true', help='show result JSON to STDOUT, no changes to the specified file')
20+
args = parser.parse_args()
21+
22+
if __name__ == '__main__':
23+
24+
struct = {}
25+
replaced = False
26+
with open(args.filename, 'r') as target_file:
27+
struct = json.load(target_file)
28+
if not 'type' in struct or not 'result' in struct:
29+
exit()
30+
if struct['type'] == 'minecraft:crafting_shapeless':
31+
ingredient_arr = []
32+
for ing in struct['ingredients']:
33+
if 'item' in ing:
34+
ingredient_arr.append(ing['item'])
35+
elif 'tag' in ing:
36+
ingredient_arr.append('#' + ing['tag'])
37+
struct['ingredients'] = ingredient_arr
38+
replaced = True
39+
elif struct['type'] == 'minecraft:crafting_shaped':
40+
if not 'key' in struct:
41+
exit()
42+
for k in struct['key']:
43+
if 'item' in struct['key'][k]:
44+
_item = struct['key'][k]['item']
45+
del struct['key'][k]['item']
46+
struct['key'][k] = _item
47+
replaced = True
48+
elif 'tag' in struct['key'][k]:
49+
_tag = '#' + struct['key'][k]['tag']
50+
del struct['key'][k]['tag']
51+
struct['key'][k] = _tag
52+
replaced = True
53+
if type(struct['result']) is not str and not 'count' in struct['result']:
54+
struct['result']['count'] = 1
55+
replaced = True
56+
57+
if replaced:
58+
if args.test:
59+
print(json.dumps(struct, indent=2))
60+
else:
61+
with open(args.filename, 'w') as target_file:
62+
json.dump(struct, target_file, indent=2)
63+
else:
64+
print(args.filename + ": no changes made")

src/main/java/me/juancarloscp52/bedrockify/client/BedrockifyClient.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
import net.minecraft.client.MinecraftClient;
3232
import net.minecraft.client.option.KeyBinding;
3333
import net.minecraft.client.util.InputUtil;
34+
import net.minecraft.entity.EntityPose;
3435
import net.minecraft.network.packet.c2s.play.ClientCommandC2SPacket;
3536
import net.minecraft.resource.ResourceType;
3637
import org.apache.logging.log4j.LogManager;
@@ -129,11 +130,12 @@ public void onInitializeClient() {
129130
}
130131

131132
// Stop elytra flying by pressing space
132-
if(null != client.player && settings.elytraStop && client.player.isFallFlying() && timeFlying > 10 && client.options.jumpKey.isPressed()){
133-
client.player.stopFallFlying();
133+
if(null != client.player && settings.elytraStop && client.player.getPose().equals(EntityPose.GLIDING) && timeFlying > 10 && client.options.jumpKey.isPressed()){
134+
client.player.getAbilities().flying = false;
135+
client.player.sendAbilitiesUpdate();
134136
client.player.networkHandler.sendPacket(new ClientCommandC2SPacket(client.player, ClientCommandC2SPacket.Mode.START_FALL_FLYING));
135137
}
136-
if(null != client.player && client.player.isFallFlying() && !client.options.jumpKey.isPressed())
138+
if(null != client.player && client.player.getPose().equals(EntityPose.GLIDING) && !client.options.jumpKey.isPressed())
137139
timeFlying++;
138140
else
139141
timeFlying = 0;

src/main/java/me/juancarloscp52/bedrockify/client/features/bedrockShading/BedrockSunGlareShading.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ public final class BedrockSunGlareShading {
4141
private final MinecraftClient client;
4242

4343
public BedrockSunGlareShading() {
44-
onSunlightIntensityChanged();
4544
this.sunVector3f = new Vector3f();
4645
this.client = MinecraftClient.getInstance();
4746
}
@@ -265,10 +264,11 @@ public float getSunAngleDiff() {
265264
}
266265

267266
public float getSkyAttenuation() {
268-
return this.skyAttenuation;
267+
return getSkyAttenuation(false);
269268
}
270269

271-
public void onSunlightIntensityChanged() {
272-
this.skyAttenuation = MathHelper.clampedLerp(1f, 0.60f, BedrockifyClient.getInstance().settings.sunlightIntensity / 100f);
270+
public float getSkyAttenuation(boolean darker) {
271+
this.skyAttenuation = MathHelper.clampedLerp(1f, darker? 0.40f:0.60f, BedrockifyClient.getInstance().settings.sunlightIntensity / 100f);
272+
return this.skyAttenuation;
273273
}
274274
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package me.juancarloscp52.bedrockify.client.features.eatingAnimations;
2+
3+
import net.minecraft.util.Hand;
4+
5+
import java.util.Optional;
6+
7+
public interface IEatingState {
8+
default void setEatingHand(Hand hand) {
9+
}
10+
11+
default Optional<Hand> getEatingHand() {
12+
return Optional.empty();
13+
}
14+
}

0 commit comments

Comments
 (0)