Skip to content

Commit

Permalink
feat: full support minecraft 1.19.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Kirilliriks committed Nov 13, 2022
1 parent e818291 commit 594960a
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 14 deletions.
25 changes: 15 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ version = project.mod_version
group = project.maven_group

repositories {
maven {
url 'https://jitpack.io'
}
exclusiveContent {
forRepository {
maven {
Expand Down Expand Up @@ -49,6 +46,10 @@ processResources {

def targetJavaVersion = 17
tasks.withType(JavaCompile).configureEach {
// ensure that the encoding is set to UTF-8, no matter what the system default is
// this fixes some edge cases with special characters not displaying correctly
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
// If Javadoc is generated, this must be specified in that task too.
it.options.encoding = "UTF-8"
if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
it.options.release = targetJavaVersion
Expand All @@ -61,6 +62,9 @@ java {
toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
}
archivesBaseName = project.archives_base_name
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
// if it is present.
// If you remove this line, sources will not be generated.
withSourcesJar()
}

Expand All @@ -70,19 +74,20 @@ jar {
}
}


// configure the maven publication
publishing {
publications {
mavenJava(MavenPublication) {
artifact(remapJar) {
builtBy remapJar
}
artifact(sourcesJar) {
builtBy remapSourcesJar
}
from components.java
}
}

// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
repositories {

// Add repositories to publish to here.
// Notice: This block does NOT have the same function as the block in the top level.
// The repositories here will be used for publishing your artifact, not for
// retrieving dependencies.
}
}
2 changes: 1 addition & 1 deletion src/main/java/me/kirillirik/bedrodium/Bedrodium.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import net.minecraft.client.util.InputUtil;
import org.lwjgl.glfw.GLFW;

public class Bedrodium implements ModInitializer {
public final class Bedrodium implements ModInitializer {

public static boolean passSide = true;
private static KeyBinding keyBinding;
Expand Down
15 changes: 15 additions & 0 deletions src/main/java/me/kirillirik/bedrodium/client/BedrodiumClient.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package me.kirillirik.bedrodium.client;

import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;

@Environment(EnvType.CLIENT)
public final class BedrodiumClient implements ClientModInitializer {

@Override
public void onInitializeClient() {

}

}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;

@Mixin(value = BlockOcclusionCache.class, remap = false)
public class BlockOcclusionCacheMixin {
public final class BlockOcclusionCacheMixin {

@Inject(method = "shouldDrawSide", at = @At("RETURN"), cancellable = true)
public void shouldDrawSide(BlockState selfState, BlockView view, BlockPos pos, Direction facing, CallbackInfoReturnable<Boolean> callbackInfo) {
Expand Down
6 changes: 4 additions & 2 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@
"contact": {},
"license": "LGPL-3.0",
"icon": "assets/bedrodium/icon.png",
"environment": "client",
"environment": "*",
"entrypoints": {
"client": [
"me.kirillirik.bedrodium.client.BedrodiumClient"
],
"main": [
"me.kirillirik.bedrodium.Bedrodium"
]
Expand All @@ -33,4 +36,3 @@
}
}
}

2 comments on commit 594960a

@ViNi-Arco
Copy link

@ViNi-Arco ViNi-Arco commented on 594960a Nov 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm so happy ☺️, by see that you have added support for Mine 1.19.2

@Kirilliriks
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm so happy ☺️, by see that you have added support for Mine 1.19.2

I'm sorry it didn't happen sooner, I'm glad you're happy!

Please sign in to comment.